本文整理汇总了PHP中Pagination::setPageQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagination::setPageQuery方法的具体用法?PHP Pagination::setPageQuery怎么用?PHP Pagination::setPageQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pagination
的用法示例。
在下文中一共展示了Pagination::setPageQuery方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ON
<?php
require_once 'init.php';
require_once LIB_PATH . 'functions.lib.php';
require_once LIB_PATH . 'paging.lib.php';
chkLicense();
chkSession();
$page_title = "Log History";
$page_id = "11";
chkSecurity($page_id);
$log_list_q = "SELECT lh.id, \r\n\t\t\t\tCONCAT(u.fname,' ',u.lname) AS fullname, \r\n\t\t\t\tlh.ip_addr, \r\n\t\t\t\tlh.time, \r\n\t\t\t\tCONCAT(lc.notes,' ',lh.notes) AS notes " . "FROM log_history lh \r\n\t\t \tLEFT JOIN user u ON (u.id = lh.uid) \r\n\t\t \tLEFT JOIN log_code lc ON (lc.id = lh.cid) \r\n\t\t WHERE lh.del = '0' \r\n\t\t ORDER BY lh.time DESC ";
$pagingResult = new Pagination();
$pagingResult->setPageQuery($log_list_q);
$pagingResult->paginate();
$this_page = $_SERVER['PHP_SELF'] . "?" . $pagingResult->getPageQString();
include THEME_DEFAULT . 'header.php';
?>
<//-----------------CONTENT-START-------------------------------------------------//>
<h1 class="page-header"><?php
echo $page_title;
?>
Page</h1>
<div class="panel panel-default">
<div class="panel-heading">
</div>
<div class="panel-body">
<?php
echo $pagingResult->pagingMenu();
?>
<br>
示例2: ON
<?php
require_once 'init.php';
require_once LIB_PATH . 'functions.lib.php';
require_once LIB_PATH . 'paging.lib.php';
chkLicense();
chkSession();
$page_title = "Report";
$page_id = "12";
chkSecurity($page_id);
$ev_q = "SELECT e.id,\n\t\t\t\tCONCAT(u.fname,' ',u.lname) AS fullname,\n\t\t e.name AS evname,\n\t\t \t\te.ticker,\n\t\t\t\te.sdate,\n\t\t\t\te.edate,\n\t\t\t\te.createBy,\n\t\t\t\te.createDate,\n\t\t\t\te.qty_locket\n\t\t FROM events e\n\t\t INNER JOIN user u ON (u.id = e.createBy)\n\t WHERE e.createBy = '" . $_SESSION["uid"] . "' AND e.del = '0'\n\t\t ORDER BY e.sdate DESC ";
$pagingResult = new Pagination();
$pagingResult->setPageQuery($ev_q);
$pagingResult->paginate();
$this_page = $_SERVER['PHP_SELF'] . "?" . $pagingResult->getPageQString();
include THEME_DEFAULT . 'header.php';
?>
<//-----------------CONTENT-START-------------------------------------------------//>
<h1 class="page-header"><?php
echo $page_title;
?>
Page</h1>
<div class="sub-header">
<div class="panel panel-default">
<div class="panel-heading">
</div>
<div class="panel-body">
<?php
echo $pagingResult->pagingMenu();
示例3: die
$page_title = "Conversion Tool";
$page_id = "5";
chkSecurity($page_id);
$comm_list_q = "SELECT c.id, c.name, c.unit, c.sku
FROM commodity c
WHERE c.del = 0;";
$comm_list_SQL = @mysql_query($comm_list_q) or die(mysql_error());
$query ="SELECT co.id, c.id AS cid, c.sku, c.name AS cname, c.unit, co.conv
FROM conv AS co
LEFT JOIN commodity AS c ON (c.id = co.cid)
WHERE co.del = '0' AND co.conv != '' ORDER BY c.name ASC ";
$pagingResult = new Pagination();
$pagingResult->setPageQuery($query);
$pagingResult->paginate();
$this_page = $_SERVER['PHP_SELF']."?".$pagingResult->getPageQString();
$status = " ";
if (isset($_POST['add_co'])){
$comm = trim($_POST['commodity']);
$conv = trim($_POST['conv']);
$uid = $_SESSION['uid'];
$date = date('Y-m-d H:i:s');
$add_q ="INSERT INTO conv (cid,conv,createID,createDate,updID,updDate) VALUES ('$comm','$conv','$uid','$date','$uid','$date');";
if (!empty($comm) AND !empty($conv)){
mysql_query($add_q) or die(mysql_error());
log_hist(13,$comm);
示例4: Pagination
<?php
require_once 'init.php';
require_once LIB_PATH . 'functions.lib.php';
require_once LIB_PATH . 'paging.lib.php';
chkLicense();
chkSession();
$page_title = "Log Code";
$page_id = "10";
chkSecurity($page_id);
$code_q = "SELECT id, notes FROM log_code WHERE del = '0' ORDER BY id ASC ";
$pagingResult = new Pagination();
$pagingResult->setPageQuery($code_q);
$pagingResult->paginate();
$this_page = $_SERVER['PHP_SELF'] . "?" . $pagingResult->getPageQString();
$status = "";
if (isset($_POST['add_code']) && isset($_POST['log_code'])) {
$notes = strtolower(trim($_POST['log_code']));
$uid = $_SESSION['uid'];
$date = date('Y-m-d H:i:s');
$add_code_q = "INSERT INTO log_code (notes,createBy,createDate,updBy,updDate) VALUES ('{$notes}','{$uid}','{$date}','{$uid}','{$date}');";
if (@mysql_query($add_code_q)) {
log_hist(43, $notes);
header("location:{$this_page}");
exit;
} else {
$status .= "<div class=\"alert alert-danger alert-dismissable\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>\r\n\t\t\t\t\t\tFailed to create log code. Please check all available parameters.\r\n\t\t\t\t </div>";
log_hist(44, $notes);
}
}
if (isset($_POST['upd_code']) && !empty($_POST['lcnotes']) && is_numeric($_POST['lcid'])) {
示例5: die
FROM user_level ul
WHERE ul.id > '".$_SESSION['level']."' AND ul.del = 0 AND ul.hidden = 0;";
$level_list_SQL = @mysql_query($level_list_q) or die(mysql_error());
$members_list_q = "SELECT u.id,
CONCAT(u.fname,' ',u.lname) AS fullname,
u.email,
ul.name as level,
u.createDate as joindate,
u.active
FROM user u
LEFT JOIN user_level ul ON (ul.id = u.lid)
WHERE u.del = '0' AND u.hidden = '0'
ORDER BY u.fname ASC ";
$pagingResult = new Pagination();
$pagingResult->setPageQuery($members_list_q);
$pagingResult->paginate();
$this_page = $_SERVER['PHP_SELF']."?".$pagingResult->getPageQString();
$status = "";
$lastupd = date('Y-m-d H:i:s');
if(isset($_POST['add_user'])){
$password = trim(md5(DEFAULT_PASS));
$salut = strtolower(trim($_POST['salut']));
$fname = strtolower(trim($_POST['fname']));
$lname = strtolower(trim($_POST['lname']));
$email = strtolower(trim($_POST['email']));
$level = strtolower(trim($_POST['level']));
$uid = $_SESSION['uid'];
$date = date('Y-m-d H:i:s');
示例6: Pagination
* Created by : M. Aryo N. Pratama
* -----------------------------------------------------
* Purpose : Manage FAQ data.
* -----------------------------------------------------
*/
require_once 'init.php';
require_once LIB_PATH . 'functions.lib.php';
require_once LIB_PATH . 'paging.lib.php';
chkLicense();
chkSession();
$page_title = "FAQ";
$page_id = "7";
chkSecurity($page_id);
$faq_list_query = "SELECT id, question, answer FROM faq WHERE del = '0' ORDER BY id ASC ";
$pagingResult = new Pagination();
$pagingResult->setPageQuery($faq_list_query);
$pagingResult->paginate();
$this_page = $_SERVER['PHP_SELF'] . "?" . $pagingResult->getPageQString();
$status = "";
if (isset($_POST['add_faq'])) {
$question = mysql_real_escape_string(strip_tags(trim($_POST['faq_question'])));
$answer = mysql_real_escape_string(strip_tags(trim($_POST['faq_answer'])));
$uid = $_SESSION['uid'];
$date = date('Y-m-d H:i:s');
$add_faq_q = "INSERT INTO faq (question, answer, createBy, createDate, updBy, updDate) \r\n\t\t\t VALUES ('{$question}','{$answer}','{$uid}','{$date}','{$uid}','{$date}');";
if (!empty($question) and !empty($answer)) {
if (@mysql_query($add_faq_q)) {
log_hist(31, $question);
header("location:{$this_page}");
exit;
} else {
示例7: Pagination
<?php
require_once 'init.php';
require_once LIB_PATH . 'functions.lib.php';
require_once LIB_PATH . 'paging.lib.php';
chkLicense();
chkSession();
$page_title = "MOTD";
$page_id = "6";
chkSecurity($page_id);
$motd_list_q = "SELECT id, message FROM motd WHERE del = 0 ORDER BY id ASC ";
$pagingResult = new Pagination();
$pagingResult->setPageQuery($motd_list_q);
$pagingResult->paginate();
$this_page = $_SERVER['PHP_SELF'] . "?" . $pagingResult->getPageQString();
$status = "";
if (isset($_POST['add_motd'])) {
$message = strtolower(trim($_POST['motd_msg']));
$uid = $_SESSION['uid'];
$date = date('Y-m-d H:i:s');
$add_motd_q = "INSERT INTO motd (message,createBy,createDate,updBy,updDate) VALUES ('{$message}','{$uid}','{$date}','{$uid}','{$date}');";
if (!empty($message)) {
if (@mysql_query($add_motd_q)) {
log_hist(19, $message);
header("location:{$this_page}");
exit;
} else {
$status .= "<div class=\"alert alert-danger alert-dismissable\" role=\"alert\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">×</span><span class=\"sr-only\">Close</span></button>\r\n\t\t\t\t\t\t\tFailed to create new message of the day. Internal error occured.\r\n\t\t\t\t \t</div>";
log_hist(20, $message);
}
} else {