11 include
'../../../mainfile.php';
12 include_once XOOPS_ROOT_PATH.
'/modules/rmcommon/loader.php';
20 _e(
'Sorry, you are not allowed to view this page',
'rmcommon');
27 $db = XoopsDatabaseFactory::getDatabaseConnection();
35 foreach($_REQUEST as $k => $v){
40 _e(
'Sorry, you are not allowed to view this page',
'rmcommon');
47 if (is_string(
$s) &&
$s!=
''){
48 $selected = explode(
',',
$s);
57 $sql =
"SELECT COUNT(*) FROM ".$db->prefix(
"users").
" WHERE level>0";
59 $sql .=
" AND (uname LIKE '%$kw%' OR name LIKE '%$kw%')";
74 $nav->target_url(
'javascript:usersField.goto_page({PAGE_NUM}, '.
$type.
');');
76 $sql = str_replace(
'COUNT(*)',
'uid, uname',
$sql);
79 $sql .=
" ORDER BY user_regdate";
82 $sql .=
" ORDER BY uname";
85 $sql .=
" ORDER BY uid";
88 $sql .=
" LIMIT $start,$limit";
94 $users[] = array(
'id'=>0,
'name'=>
__(
'All',
'rmcommon'),
'check'=>in_array(0, $selected));
98 $users[] = array(
'id'=>$row[
'uid'],
'name'=>$row[
'uname'],
'check'=>in_array($row[
'uid'], $selected));
102 if (is_array($selected) && count($selected)>0){
103 $sql =
"SELECT uid,uname FROM ".$db->prefix(
"users").
" WHERE level>0 AND uid IN (".implode(
',',$selected).
")";
106 $selecteds[] = array(
'id'=>$row[
'uid'],
'name'=>$row[
'uname'],
'check'=>
true);
115 include
RMTemplate::get()->get_template(
"form_users.php",
'module',
'rmcommon');