本文整理汇总了PHP中pagination::get_total_pages方法的典型用法代码示例。如果您正苦于以下问题:PHP pagination::get_total_pages方法的具体用法?PHP pagination::get_total_pages怎么用?PHP pagination::get_total_pages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pagination
的用法示例。
在下文中一共展示了pagination::get_total_pages方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$no_results = false;
$arr = array();
if ($nums_rows > 0) {
$query['SELECT'] = 'id, name, founder, group_id, last_visit';
$query['LIMIT'] = "{$start}, {$perpage}";
$result = $SQL->build($query);
while ($row = $SQL->fetch($result)) {
$userfile = $config['siteurl'] . ($config['mod_writer'] ? 'fileuser-' . $row['id'] . '.html' : 'ucp.php?go=fileuser&id=' . $row['id']);
$arr[$row['id']] = array('id' => $row['id'], 'name' => $row['name'], 'userfile_link' => $userfile, 'delusrfile_link' => $row['founder'] && (int) $user->data['founder'] == 0 ? false : ADMIN_PATH . '?cp=' . basename(__FILE__, '.php') . '&deleteuserfile=' . $row['id'] . (isset($_GET['page']) ? '&page=' . intval($_GET['page']) : ''), 'delusr_link' => $user->data['id'] == $row['id'] || $row['founder'] && (int) $user->data['founder'] == 0 ? false : ADMIN_PATH . '?cp=' . basename(__FILE__, '.php') . '&del_user=' . $row['id'] . (isset($_GET['page']) ? '&page=' . intval($_GET['page']) : ''), 'editusr_link' => $row['founder'] && (int) $user->data['founder'] == 0 ? false : ADMIN_PATH . '?cp=' . basename(__FILE__, '.php') . '&smt=edit_user&uid=' . $row['id'] . (isset($_GET['page']) ? '&page=' . intval($_GET['page']) : ''), 'founder' => (int) $row['founder'], 'last_visit' => empty($row['last_visit']) ? $lang['NOT_YET'] : kleeja_date($row['last_visit']), 'group' => get_group_name($row['group_id']));
}
$SQL->free($result);
} else {
$no_results = true;
}
//pages
$total_pages = $Pager->get_total_pages();
$page_nums = $Pager->print_nums(ADMIN_PATH . '?cp=' . basename(__FILE__, '.php') . (isset($_GET['search_id']) ? '&search_id=' . htmlspecialchars($_GET['search_id']) : '') . (isset($_GET['qg']) ? '&qg=' . intval($_GET['qg']) : '') . (isset($_GET['smt']) ? '&smt=' . $current_smt : ''), 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"');
$show_results = true;
break;
#editing a user, form
#editing a user, form
case 'edit_user':
//is exists ?
if (!isset($userid)) {
$userid = intval($_GET['uid']);
if (!$SQL->num($SQL->query("SELECT * FROM {$dbprefix}users WHERE id=" . $userid))) {
kleeja_admin_err('ERROR-NO-USER-FOUND', true, '', true, ADMIN_PATH . '?cp=' . basename(__FILE__, '.php'));
}
}
$query = array('SELECT' => 'name, mail, group_id, founder, show_my_filecp', 'FROM' => "{$dbprefix}users", 'WHERE' => 'id=' . $userid);
$result = $SQL->build($query);
示例2: array
kleeja_error($lang['NOT_EXSIT_USER'], $lang['PLACE_NO_YOU']);
}
#this user closed his folder, and it's not the current user folder
if (!$data_user['show_my_filecp'] && $user->id() != $user_id && !user_can('enter_acp')) {
kleeja_info($lang['USERFILE_CLOSED'], $lang['CLOSED_FEATURE']);
}
$query = array('SELECT' => 'f.id, f.name, f.real_filename, f.folder, f.type, f.uploads, f.time, f.size', 'FROM' => "{$dbprefix}files f", 'WHERE' => 'f.user=' . $user_id, 'ORDER BY' => 'f.id DESC');
#set variables
$perpage = 16;
$result_p = $SQL->build($query);
$nums_rows = $SQL->num($result_p);
$current_page = g('page', 'int', 1);
$pagination = new pagination($perpage, $nums_rows, $current_page);
$start = $pagination->get_start_row();
$your_fileuser_link = $config['siteurl'] . ($config['mod_writer'] ? 'fileuser-' . $user->data['id'] . '.html' : 'ucp.php?go=fileuser&id=' . $user->data['id']);
$total_pages = $pagination->get_total_pages();
$pagination_link = $config['siteurl'] . ($config['mod_writer'] ? 'fileuser-' . $user_id . '-' : 'ucp.php?go=fileuser&id=' . $user_id);
$linkgoto = $config['siteurl'] . ($config['mod_writer'] ? 'fileuser-' . $user_id . '-' . $current_page . '.html' : 'ucp.php?go=fileuser&id=' . $user_id . '&page=' . $current_page);
$page_nums = $pagination->print_nums($pagination_link);
$no_results = true;
if ((int) $config['user_system'] != 1 && $user->data['id'] != $user_id) {
$data_user['name'] = $user->usernamebyid($user_id);
}
$username = !$data_user['name'] ? false : $data_user['name'];
#set page title
$current_title = $lang['FILEUSER'] . ': ' . $username;
#there is result ? show them
if ($nums_rows) {
$no_results = false;
$query['LIMIT'] = "{$start}, {$perpage}";
($hook = $plugin->run_hook('qr_select_files_in_fileuser')) ? eval($hook) : null;