本文整理汇总了PHP中erLhcoreClassModelChatOnlineUser::cleanAllRecords方法的典型用法代码示例。如果您正苦于以下问题:PHP erLhcoreClassModelChatOnlineUser::cleanAllRecords方法的具体用法?PHP erLhcoreClassModelChatOnlineUser::cleanAllRecords怎么用?PHP erLhcoreClassModelChatOnlineUser::cleanAllRecords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类erLhcoreClassModelChatOnlineUser
的用法示例。
在下文中一共展示了erLhcoreClassModelChatOnlineUser::cleanAllRecords方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
<?php
$tpl = erLhcoreClassTemplate::getInstance('lhchat/onlineusers.tpl.php');
if (is_numeric($Params['user_parameters_unordered']['clear_list']) && $Params['user_parameters_unordered']['clear_list'] == 1) {
if (!$currentUser->validateCSFRToken($Params['user_parameters_unordered']['csfr'])) {
die('Invalid CSRF Token');
exit;
}
erLhcoreClassModelChatOnlineUser::cleanAllRecords();
erLhcoreClassModule::redirect('chat/onlineusers');
exit;
}
if (is_numeric($Params['user_parameters_unordered']['deletevisitor']) && $Params['user_parameters_unordered']['deletevisitor'] > 0) {
if (!$currentUser->validateCSFRToken($Params['user_parameters_unordered']['csfr'])) {
die('Invalid CSRF Token');
exit;
}
try {
$visitor = erLhcoreClassModelChatOnlineUser::fetch($Params['user_parameters_unordered']['deletevisitor']);
$visitor->removeThis();
} catch (Exception $e) {
}
erLhcoreClassModule::redirect('chat/onlineusers');
exit;
}
$is_ajax = isset($Params['user_parameters_unordered']['method']) && $Params['user_parameters_unordered']['method'] == 'ajax';
$timeout = isset($Params['user_parameters_unordered']['timeout']) && is_numeric($Params['user_parameters_unordered']['timeout']) ? (int) $Params['user_parameters_unordered']['timeout'] : 30;
$maxrows = isset($Params['user_parameters_unordered']['maxrows']) && is_numeric($Params['user_parameters_unordered']['maxrows']) ? (int) $Params['user_parameters_unordered']['maxrows'] : 50;
$filter = array('offset' => 0, 'limit' => $maxrows, 'sort' => 'last_visit DESC', 'filtergt' => array('last_visit' => time() - $timeout));
$department = isset($Params['user_parameters_unordered']['department']) && is_numeric($Params['user_parameters_unordered']['department']) ? (int) $Params['user_parameters_unordered']['department'] : false;
if ($department !== false) {