本文整理汇总了PHP中XoopsUser::getValues方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsUser::getValues方法的具体用法?PHP XoopsUser::getValues怎么用?PHP XoopsUser::getValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsUser
的用法示例。
在下文中一共展示了XoopsUser::getValues方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_users
/**
* Shows all registered users in a list with filter and manage options
*/
function show_users()
{
global $xoopsSecurity;
define('RMCSUBLOCATION', 'allusers');
RMTemplate::get()->add_style('users.css', 'rmcommon');
RMTemplate::get()->add_style('js-widgets.css');
//Scripts
RMTemplate::get()->add_local_script('users.js', 'rmcommon', 'include');
RMTemplate::get()->add_local_script('jquery.checkboxes.js', 'rmcommon', 'include');
RMTemplate::get()->add_head('<script type="text/javascript">var rmcu_select_message = "' . __('You have not selected any user!', 'rmcommon') . '";
var rmcu_message = "' . __('Dou you really wish to delete selected users?', 'rmcommon') . '";</script>');
$form = new RMForm('', '', '');
// Date Field
$login1 = new RMFormDate('', 'login1', '');
$login2 = new RMFormDate('', 'login2', '');
// Registered Field
$register1 = new RMFormDate('', 'registered1', '');
$register2 = new RMFormDate('', 'registered2', '');
xoops_cp_location(__('Users Management', 'rmcommon'));
RMFunctions::create_toolbar();
// Show the theme
xoops_cp_header();
$db = XoopsDatabaseFactory::getDatabaseConnection();
$sql = "SELECT COUNT(*) FROM " . $db->prefix("users") . " " . formatSQL();
$page = rmc_server_var($_REQUEST, 'pag', 1);
$limit = rmc_server_var($_REQUEST, 'limit', 15);
$order = rmc_server_var($_GET, 'order', 'uid');
list($num) = $db->fetchRow($db->query($sql));
$tpages = ceil($num / $limit);
$page = $page > $tpages ? $tpages : $page;
$start = $num <= 0 ? 0 : ($page - 1) * $limit;
$nav = new RMPageNav($num, $limit, $page, 5);
$nav->target_url('users.php?limit=' . $limit . '&order=' . $order . '&pag={PAGE_NUM}');
$sql = str_replace("COUNT(*)", '*', $sql);
$sql .= "ORDER BY {$order} LIMIT {$start}, {$limit}";
$result = $db->query($sql);
$users = array();
$user = new XoopsUser();
$t = array();
// Temporary
while ($row = $db->fetchArray($result)) {
$user->assignVars($row);
$t = $user->getValues();
$t['groups'] = $user->groups();
$t = RMEvents::get()->run_event('rmcommon.loading.users.list', $t);
$users[] = $t;
$t = array();
}
$xgh = new XoopsGroupHandler($db);
$users = RMEvents::get()->run_event('rmcommon.users.list.loaded', $users);
// Users template
include RMTemplate::get()->get_template('rmc_users.php', 'module', 'rmcommon');
xoops_cp_footer();
}