function execute() { $limit = (int) Settings::getValue('users_on_page'); $page = Request::get('page') ? Request::get('page') : 1; $users = ConnectionSearchUser::create()->search(array('online' => 1), $limit, ($page - 1) * $limit, Request::get('sort') ? Request::get('sort') : 'date'); $pages = ceil($users['count'] / $limit); $this->setSeoPage('online'); return array('online_page' => $page, 'online_pages' => $pages, 'online_count' => $users['count'], 'users' => $users['result']); }
function execute() { $search = Request::post('search'); $searchUser = ConnectionSearchUser::create(); $saveTemp = false; $user = ConnectionHelper::userLogin(); if (ConnectionHelper::isLogin() && !$search) { $saveTemp = Temp::get('user_' . $user['id'] . '_advanced_filter'); $saveTemp = $saveTemp ? unserialize($saveTemp) : false; } if (!$saveTemp) { $saveTemp = array('query' => $search, 'filter' => $searchUser->filterSearchField($search)); if (ConnectionHelper::isLogin()) { Temp::set('user_' . $user['id'] . '_advanced_filter', serialize($saveTemp)); } } $this->setSeoPage('advanced_search'); if ($search || true) { print_r($saveTemp); } }
public function execute() { $this->template = 'connectionUserList'; $user = ConnectionSearchUser::create()->search(array('online' => 1), false, 0, 'date', false, true); $this->smarty->assign('user', $user['result']); }