本文整理汇总了PHP中pagination::print_nums方法的典型用法代码示例。如果您正苦于以下问题:PHP pagination::print_nums方法的具体用法?PHP pagination::print_nums怎么用?PHP pagination::print_nums使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pagination
的用法示例。
在下文中一共展示了pagination::print_nums方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$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);
$udata = $SQL->fetch($result);
示例2: time
$affected = true;
}
}
}
*/
} else {
$no_results = true;
}
#update f_lastvisit
if (!$is_search) {
if (filter_exists('i_lastvisit', 'filter_uid')) {
update_filter('i_lastvisit', time());
} else {
insert_filter('lastvisit', time(), false, false, '', 'i_lastvisit');
}
}
//pages
$total_pages = $Pager->get_total_pages();
$page_nums = $Pager->print_nums(ADMIN_PATH . '?cp=' . basename(__FILE__, '.php') . (isset($_GET['last_visit']) ? '&last_vists=' . intval($_GET['last_visit']) : ''), 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"');
$current_page = g('page', 'int', 1);
}
/*
//after submit
if(isset($_POST['submit']))
{
$text = ($affected ? $lang['FILES_UPDATED'] : $lang['NO_UP_CHANGE_S']) .
'<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . ADMIN_PATH . '?cp=' . basename(__file__, '.php') .
'&page=' . (isset($_GET['page']) ? intval($_GET['page']) : '1') . '\');", 2000);</script>' . "\n";
$current_template = info";
}*/
示例3: intval
$send = send_mail($to, $message, $subject, $config['sitemail'], $config['sitename']);
if ($send) {
//
//We will redirect to pages of results and show info msg there !
//
kleeja_admin_info($lang['IS_SEND_MAIL'], true, '', true, ADMIN_PATH . '?cp=messages&page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1) . '&sent=' . $row['id']);
} else {
kleeja_admin_err($lang['ERR_SEND_MAIL'], true, '', true, ADMIN_PATH . '?cp=messages&page=' . (isset($_GET['page']) ? intval($_GET['page']) : 1) . '&sent=' . $row['id']);
}
}
}
}
$SQL->free($result);
} else {
$no_results = true;
}
//if deleted
if (sizeof($del_nums)) {
$query_del = array('DELETE' => "`{$dbprefix}messages`", 'WHERE' => "id IN('" . implode("', '", $del_nums) . "')");
$SQL->build($query_del);
}
$total_pages = $pagination->get_total_pages();
$page_nums = $pagination->print_nums(ADMIN_PATH . '?cp=messages', 'onclick="javascript:get_kleeja_link($(this).attr(\'href\'), \'#content\'); return false;"');
//after submit
if (isset($_POST['submit'])) {
$text = $SQL->affected() ? $lang['MESSAGES_UPDATED'] : $lang['NO_UP_CHANGE_S'];
$text .= '<script type="text/javascript"> setTimeout("get_kleeja_link(\'' . $action . '\'); check_msg_and_reports();", 2000);</script>' . "\n";
kleeja_admin_info($text, true, '', true, $action);
}
//secondary menu
$go_menu = array('general' => array('name' => $lang['R_MESSAGES'], 'link' => ADMIN_PATH . '?cp=messages&smt=general', 'goto' => 'general', 'current' => $current_smt == 'general'), 'show_h24' => array('name' => $lang['SHOW_FROM_24H'], 'link' => ADMIN_PATH . '?cp=messages&smt=show_h24', 'goto' => 'show_h24', 'current' => $current_smt == 'show_h24'), 'del_d30' => array('name' => $lang['DELETE_EARLIER_30DAYS'], 'link' => ADMIN_PATH . '?cp=messages&smt=del_d30', 'goto' => 'del_d30', 'current' => $current_smt == 'del_d30', 'confirm' => true), 'del_all' => array('name' => $lang['DELETE_ALL'], 'link' => ADMIN_PATH . '?cp=messages&smt=del_all', 'goto' => 'del_all', 'current' => $current_smt == 'del_all', 'confirm' => true));
示例4: array
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;
//run hook
$result = $SQL->build($query);
$i = $current_page * $perpage - $perpage;
示例5: array
if ($row['user'] != '-1' and (int) $config['user_system'] != 1) {
if (!in_array($row['user'], $ids_and_names)) {
$row['username'] = $usrcp->usernamebyid($row['user']);
$ids_and_names[$row['user']] = $row['username'];
} else {
$row['username'] = $ids_and_names[$row['user']];
}
}
#files array
$files_list[$row['id']] = array('id' => $row['id'], 'name' => "<a title=\" " . ($row['real_filename'] == '' ? $row['name'] : $row['real_filename']) . "\" href=\"./" . PATH . $row['folder'] . "/" . $row['name'] . "\" target=\"blank\">" . ($row['real_filename'] == '' ? strlen($row['name']) > 20 ? substr($row['name'], 0, 20) . '...' : $row['name'] : (strlen($row['real_filename']) > 20 ? substr($row['real_filename'], 0, 20) . '...' : $row['real_filename'])) . "</a>", 'size' => readable_size($row['size']), 'ups' => $row['uploads'], 'direct' => $row['id_form'] == 'direct' ? true : false, 'time_human' => kleeja_date($row['time']), 'time' => kleeja_date($row['time'], false), 'type' => $row['type'], 'typeicon' => file_exists(PATH . "images/filetypes/" . $row['type'] . ".png") ? PATH . "images/filetypes/" . $row['type'] . ".png" : PATH . 'images/filetypes/file.png', 'folder' => $row['folder'], 'report' => $row['report'] > 4 ? "<span style=\"color:red;font-weight:bold\">" . $row['report'] . "</span>" : $row['report'], 'user' => $row['user'] == '-1' ? $lang['GUST'] : '<a href="' . $userfile . '" target="_blank">' . $row['username'] . '</a>', 'ip' => '<a href="http://www.ripe.net/whois?form_type=simple&full_query_string=&searchtext=' . $row['user_ip'] . '&do_search=Search" target="_new">' . $row['user_ip'] . '</a>', 'showfilesbyip' => ADMIN_PATH . '?cp=h_search&s_input=1&s_value=' . $row['user_ip']);
$del[$row['id']] = isset($_POST['del_' . $row['id']]) ? $_POST['del_' . $row['id']] : '';
}
$SQL->free($result);
} else {
//no result ..
$no_results = true;
}
#update f_lastvisit
if (!$is_search) {
if (filter_exists('f_lastvisit', 'filter_uid')) {
update_filter('f_lastvisit', time());
} else {
insert_filter('lastvisit', time(), false, false, '', 'f_lastvisit');
}
}
#some vars
$total_pages = $Pager->get_total_pages();
$total_pages = $total_pages == 0 ? 1 : $total_pages;
$page_nums = $Pager->print_nums($page_action, '');
$current_page = g('page', 'int', 1);
}