当前位置: 首页>>代码示例>>PHP>>正文


PHP Pagenate::setURL方法代码示例

本文整理汇总了PHP中Pagenate::setURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagenate::setURL方法的具体用法?PHP Pagenate::setURL怎么用?PHP Pagenate::setURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pagenate的用法示例。


在下文中一共展示了Pagenate::setURL方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: count

    $order=$orderWays[strtoupper($_REQUEST['order'])];
}
$order=$order?$order:'ASC';

if($order_column && strpos($order_column,',')){
    $order_column=str_replace(','," $order,",$order_column);
}
$x=$sort.'_sort';
$$x=' class="'.strtolower($order).'" ';
$order_by="$order_column $order ";

$total=db_count('SELECT count(*) FROM '.EMAIL_TABLE.' email ');
$page=($_GET['p'] && is_numeric($_GET['p']))?$_GET['p']:1;
$pageNav=new Pagenate($total, $page, PAGE_LIMIT);
$qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']);
$pageNav->setURL('emails.php', $qs);
$qstr = '&order='.($order=='DESC' ? 'ASC' : 'DESC');
$query="$sql GROUP BY email.email_id ORDER BY $order_by LIMIT ".$pageNav->getStart().",".$pageNav->getLimit();
$res=db_query($query);
if($res && ($num=db_num_rows($res)))
    $showing=$pageNav->showing().' '.__('emails');
else
    $showing=__('No emails found!');

$def_dept_id = $cfg->getDefaultDeptId();
$def_dept_name = $cfg->getDefaultDept()->getName();
$def_priority = $cfg->getDefaultPriority()->getDesc();

?>
<div class="pull-left" style="width:700px;padding-top:5px;">
 <h2><?php echo __('Email Addresses');?></h2>
开发者ID:KingsleyGU,项目名称:osticket,代码行数:31,代码来源:emails.inc.php

示例2: __

echo __('Currently Installed Plugins');
?>
</h2>
</div>
<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">
 <b><a href="plugins.php?a=add" class="Icon form-add"><?php 
echo __('Add New Plugin');
?>
</a></b></div>
<div class="clear"></div>

<?php 
$page = $_GET['p'] && is_numeric($_GET['p']) ? $_GET['p'] : 1;
$count = count($ost->plugins->allInstalled());
$pageNav = new Pagenate($count, $page, PAGE_LIMIT);
$pageNav->setURL('forms.php');
$showing = $pageNav->showing() . ' ' . _N('plugin', 'plugins', $count);
?>

<form action="plugins.php" method="POST" name="forms">
<?php 
csrf_token();
?>
<input type="hidden" name="do" value="mass_process" >
<input type="hidden" id="action" name="a" value="" >
<table class="list" border="0" cellspacing="1" cellpadding="0" width="940">
    <thead>
        <tr>
            <th width="7">&nbsp;</th>
            <th><?php 
echo __('Plugin Name');
开发者ID:gizur,项目名称:osticket,代码行数:31,代码来源:plugins.inc.php

示例3: __

if ($_REQUEST['order'] && $orderWays[strtoupper($_REQUEST['order'])]) {
    $order = $orderWays[strtoupper($_REQUEST['order'])];
}
$order = $order ? $order : 'ASC';
if ($order_column && strpos($order_column, ',')) {
    $order_column = str_replace(',', " {$order},", $order_column);
}
$x = $sort . '_sort';
${$x} = ' class="' . strtolower($order) . '" ';
$order_by = "{$order_column} {$order} ";
$total = db_count('SELECT count(*) FROM ' . FILTER_TABLE . ' filter ');
$page = $_GET['p'] && is_numeric($_GET['p']) ? $_GET['p'] : 1;
$pageNav = new Pagenate($total, $page, PAGE_LIMIT);
$qstr = '&amp;' . Http::build_query($qs);
$qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']);
$pageNav->setURL('filters.php', $qs);
$qstr .= '&amp;order=' . ($order == 'DESC' ? 'ASC' : 'DESC');
$query = "{$sql} ORDER BY {$order_by} LIMIT " . $pageNav->getStart() . "," . $pageNav->getLimit();
$res = db_query($query);
if ($res && ($num = db_num_rows($res))) {
    $showing = $pageNav->showing() . ' ' . _N('filter', 'filters', $num);
} else {
    $showing = __('No filters found!');
}
?>

<div class="pull-left" style="width:700px;padding-top:5px;">
 <h2><?php 
echo __('Ticket Filters');
?>
</h2>
开发者ID:dmiguel92,项目名称:osTicket-1.8,代码行数:31,代码来源:filters.inc.php

示例4: __

if ($_REQUEST['order'] && $orderWays[strtoupper($_REQUEST['order'])]) {
    $order = $orderWays[strtoupper($_REQUEST['order'])];
}
$order = $order ? $order : 'ASC';
if ($order_column && strpos($order_column, ',')) {
    $order_column = str_replace(',', " {$order},", $order_column);
}
$x = $sort . '_sort';
${$x} = ' class="' . strtolower($order) . '" ';
$order_by = "{$order_column} {$order} ";
$total = db_count('SELECT count(DISTINCT rule.id) ' . $from . ' ' . $where);
$page = $_GET['p'] && is_numeric($_GET['p']) ? $_GET['p'] : 1;
$pageNav = new Pagenate($total, $page, PAGE_LIMIT);
$qstr = '&amp;' . Http::build_query($qs);
$qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']);
$pageNav->setURL('banlist.php', $qs);
$qstr .= '&amp;order=' . ($order == 'DESC' ? 'ASC' : 'DESC');
$query = "{$select} {$from} {$where} ORDER BY {$order_by} LIMIT " . $pageNav->getStart() . "," . $pageNav->getLimit();
//echo $query;
?>
<h2><?php 
echo __('Banned Email Addresses');
?>
    <i class="help-tip icon-question-sign" href="#ban_list"></i>
    </h2>
<div class="pull-left" style="width:600;padding-top:5px;">
    <form action="banlist.php" method="GET" name="filter">
     <input type="hidden" name="a" value="filter" >
     <div>
       <?php 
echo __('Query');
开发者ID:gizur,项目名称:osticket,代码行数:31,代码来源:banlist.inc.php

示例5: AND

        //Deep search!
        $queryterm = db_real_escape($_REQUEST['q'], false);
        //escape the term ONLY...no quotes.
        $qwhere .= ' AND ( ' . " cdata.subject LIKE '%{$queryterm}%'" . " OR thread.body LIKE '%{$queryterm}%'" . ' ) ';
        $deep_search = true;
        //Joins needed for search
        $qfrom .= ' LEFT JOIN ' . TICKET_THREAD_TABLE . ' thread ON (' . 'ticket.ticket_id=thread.ticket_id AND thread.thread_type IN ("M","R"))';
    }
}
TicketForm::ensureDynamicDataView();
$total = db_count('SELECT count(DISTINCT ticket.ticket_id) ' . $qfrom . ' ' . $qwhere);
$page = $_GET['p'] && is_numeric($_GET['p']) ? $_GET['p'] : 1;
$pageNav = new Pagenate($total, $page, PAGE_LIMIT);
$qstr = '&amp;' . Http::build_query($qs);
$qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']);
$pageNav->setURL('tickets.php', $qs);
//more stuff...
$qselect .= ' ,count(attach_id) as attachments ';
$qfrom .= ' LEFT JOIN ' . TICKET_ATTACHMENT_TABLE . ' attach ON  ticket.ticket_id=attach.ticket_id ';
$qgroup = ' GROUP BY ticket.ticket_id';
$query = "{$qselect} {$qfrom} {$qwhere} {$qgroup} ORDER BY {$order_by} {$order} LIMIT " . $pageNav->getStart() . "," . $pageNav->getLimit();
//echo $query;
$res = db_query($query);
$showing = $res && db_num_rows($res) ? $pageNav->showing() : "";
if (!$results_type) {
    $results_type = ucfirst($status) . ' Tickets';
}
$showing .= $status ? ' ' . $results_type : ' ' . __('All Tickets');
if ($search) {
    $showing = __('Search Results') . ": {$showing}";
}
开发者ID:jmangarret,项目名称:ostickets,代码行数:31,代码来源:tickets_20150916.inc.php

示例6: __

if ($_REQUEST['order'] && $orderWays[strtoupper($_REQUEST['order'])]) {
    $order = $orderWays[strtoupper($_REQUEST['order'])];
}
$order = $order ? $order : 'ASC';
if ($order_column && strpos($order_column, ',')) {
    $order_column = str_replace(',', " {$order},", $order_column);
}
$x = $sort . '_sort';
${$x} = ' class="' . strtolower($order) . '" ';
$order_by = "{$order_column} {$order} ";
$total = db_count('SELECT count(*) FROM ' . CANNED_TABLE . ' canned ');
$page = $_GET['p'] && is_numeric($_GET['p']) ? $_GET['p'] : 1;
$pageNav = new Pagenate($total, $page, PAGE_LIMIT);
$qstr = '&amp;' . Http::build_query($qs);
$qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']);
$pageNav->setURL('canned.php', $qs);
//Ok..lets roll...create the actual query
$qstr .= '&order=' . ($order == 'DESC' ? 'ASC' : 'DESC');
$query = "{$sql} GROUP BY canned.canned_id ORDER BY {$order_by} LIMIT " . $pageNav->getStart() . "," . $pageNav->getLimit();
$res = db_query($query);
if ($res && ($num = db_num_rows($res))) {
    $showing = $pageNav->showing() . ' ' . _N('premade response', 'premade responses', $total);
} else {
    $showing = __('No premade responses found!');
}
?>
<div class="pull-left" style="width:700px;padding-top:5px;">
 <h2><?php 
echo __('Canned Responses');
?>
</h2>
开发者ID:gizur,项目名称:osticket,代码行数:31,代码来源:cannedresponses.inc.php

示例7: __

if ($_REQUEST['order'] && $orderWays[strtoupper($_REQUEST['order'])]) {
    $order = $orderWays[strtoupper($_REQUEST['order'])];
}
$order = $order ? $order : 'ASC';
if ($order_column && strpos($order_column, ',')) {
    $order_column = str_replace(',', " {$order},", $order_column);
}
$x = $sort . '_sort';
${$x} = ' class="' . strtolower($order) . '" ';
$order_by = "{$order_column} {$order} ";
$total = db_count('SELECT count(DISTINCT staff.staff_id) ' . $from . ' ' . $where);
$page = $_GET['p'] && is_numeric($_GET['p']) ? $_GET['p'] : 1;
$pageNav = new Pagenate($total, $page, PAGE_LIMIT);
$qstr = '&amp;' . Http::build_query($qs);
$qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']);
$pageNav->setURL('directory.php', $qs);
//Ok..lets roll...create the actual query
$qstr .= '&amp;order=' . ($order == 'DESC' ? 'ASC' : 'DESC');
$query = "{$select} {$from} {$where} GROUP BY staff.staff_id ORDER BY {$order_by} LIMIT " . $pageNav->getStart() . "," . $pageNav->getLimit();
//echo $query;
?>
<h2><?php 
echo __('Agents');
?>
&nbsp;<i class="help-tip icon-question-sign" href="#staff_members"></i></h2>
<div class="pull-left" style="width:700px">
    <form action="directory.php" method="GET" name="filter">
       <input type="text" name="q" value="<?php 
echo Format::htmlchars($_REQUEST['q']);
?>
" >
开发者ID:dmiguel92,项目名称:osTicket-1.8,代码行数:31,代码来源:directory.inc.php

示例8: count

    $order=$orderWays[strtoupper($_REQUEST['order'])];
}
$order=$order?$order:'ASC';

if($order_column && strpos($order_column,',')){
    $order_column=str_replace(','," $order,",$order_column);
}
$x=$sort.'_sort';
$$x=' class="'.strtolower($order).'" ';
$order_by="$order_column $order ";

$total=db_count('SELECT count(*) FROM '.FAQ_CATEGORY_TABLE.' cat ');
$page=($_GET['p'] && is_numeric($_GET['p']))?$_GET['p']:1;
$pageNav=new Pagenate($total, $page, PAGE_LIMIT);
$qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']);
$pageNav->setURL('categories.php', $qs);
$qstr = '&amp;order='.($order=='DESC'?'ASC':'DESC');
$query="$sql GROUP BY cat.category_id ORDER BY $order_by LIMIT ".$pageNav->getStart().",".$pageNav->getLimit();
$res=db_query($query);
if($res && ($num=db_num_rows($res)))
    $showing=$pageNav->showing().' '.__('categories');
else
    $showing=__('No FAQ categories found!');

?>
<div class="pull-left" style="width:700px;padding-top:5px;">
 <h2><?php echo __('FAQ Categories');?></h2>
 </div>
<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">
    <b><a href="categories.php?a=add" class="Icon newCategory"><?php echo __('Add New Category');?></a></b></div>
<div class="clear"></div>
开发者ID:KingsleyGU,项目名称:osticket,代码行数:31,代码来源:categories.inc.php

示例9: count

$order=$order?$order:'ASC';

if($order_column && strpos($order_column,',')){
    $order_column=str_replace(','," $order,",$order_column);
}
$x=$sort.'_sort';
$$x=' class="'.strtolower($order).'" ';
$order_by="$order_column $order ";

$total=db_count('SELECT count(*) FROM '.SLA_TABLE.' sla ');
$page=($_GET['p'] && is_numeric($_GET['p']))?$_GET['p']:1;
$pageNav=new Pagenate($total, $page, PAGE_LIMIT);
$qstr = '&amp;'. Http::build_query($qs);
$qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']);

$pageNav->setURL('slas.php', $qs);
//Ok..lets roll...create the actual query
$qstr .= '&amp;order='.($order=='DESC' ? 'ASC' : 'DESC');
$query="$sql ORDER BY $order_by LIMIT ".$pageNav->getStart().",".$pageNav->getLimit();
$res=db_query($query);
if($res && ($num=db_num_rows($res)))
    $showing=$pageNav->showing().' '._N('SLA plan',
        'SLA plans' /* SLA is abbreviation for Service Level Agreement */,
        $total);
else
    $showing=__('No SLA plans found!' /* SLA is abbreviation for Service Level Agreement */);

?>

<div class="pull-left" style="width:700px;padding-top:5px;">
 <h2><?php echo __('Service Level Agreements');?></h2>
开发者ID:KingsleyGU,项目名称:osticket,代码行数:31,代码来源:slaplans.inc.php

示例10: Pagenate

        </tr>
    <?php 
}
?>
    </tbody>
</table>
</div>
<div id="items" class="tab_content" style="display:none">
    <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
    <thead>
    <?php 
if ($list) {
    $page = $_GET['p'] && is_numeric($_GET['p']) ? $_GET['p'] : 1;
    $count = $list->getItemCount();
    $pageNav = new Pagenate($count, $page, PAGE_LIMIT);
    $pageNav->setURL('dynamic-list.php', 'id=' . urlencode($_REQUEST['id']));
    $showing = $pageNav->showing() . ' list items';
    ?>
    <?php 
} else {
    $showing = 'Add a few initial items to the list';
}
?>
        <tr>
            <th colspan="5">
                <em><?php 
echo $showing;
?>
</em>
            </th>
        </tr>
开发者ID:ed00m,项目名称:osTicket-1.8,代码行数:31,代码来源:dynamic-list.inc.php

示例11: count

}
$order=$order?$order:'DESC';

if($order_column && strpos($order_column,',')){
    $order_column=str_replace(','," $order,",$order_column);
}
$x=$sort.'_sort';
$$x=' class="'.strtolower($order).'" ';
$order_by="$order_column $order ";

$total=db_count('SELECT count(*) FROM '.API_KEY_TABLE.' ');
$page=($_GET['p'] && is_numeric($_GET['p']))?$_GET['p']:1;
$pageNav=new Pagenate($total,$page,PAGE_LIMIT);
$qstr = '&amp;'. Http::build_query($qs);
$qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']);
$pageNav->setURL('apikeys.php', $qs);

$qstr.='&amp;order='.($order=='DESC'?'ASC':'DESC');
$query="$sql ORDER BY $order_by LIMIT ".$pageNav->getStart().",".$pageNav->getLimit();
$res=db_query($query);
if($res && ($num=db_num_rows($res)))
    $showing=$pageNav->showing().' '.__('API Keys');
else
    $showing=__('No API keys found!');

?>

<div class="pull-left" style="width:700px;padding-top:5px;">
 <h2><?php echo __('API Keys');?></h2>
</div>
<div class="pull-right flush-right" style="padding-top:5px;padding-right:5px;">
开发者ID:KingsleyGU,项目名称:osticket,代码行数:31,代码来源:apikeys.inc.php

示例12: count

$order=$order?$order:'ASC';
if($order_column && strpos($order_column,',')){
    $order_column=str_replace(','," $order,",$order_column);
}
$x=$sort.'_sort';
$$x=' class="'.strtolower($order).'" ';
$order_by="$order_column $order ";

$total=db_count('SELECT count(DISTINCT staff.staff_id) '.$from.' '.$where);
$page=($_GET['p'] && is_numeric($_GET['p']))?$_GET['p']:1;
$pageNav=new Pagenate($total,$page,PAGE_LIMIT);
$qstr = '&amp;'. Http::build_query($qs);
$qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']);

$pageNav->setURL('staff.php', $qs);
$qstr .= '&amp;order='.($order=='DESC' ? 'ASC' : 'DESC');
$query="$select $from $where GROUP BY staff.staff_id ORDER BY $order_by LIMIT ".$pageNav->getStart().",".$pageNav->getLimit();
//echo $query;
?>
<h2><?php echo __('Agents');?></h2>
<div class="pull-left" style="width:700px;">
    <form action="staff.php" method="GET" name="filter">
     <input type="hidden" name="a" value="filter" >
        <select name="did" id="did">
             <option value="0">&mdash; <?php echo __('All Department');?> &mdash;</option>
             <?php
             $sql='SELECT dept.dept_id, dept.dept_name,count(staff.staff_id) as users  '.
                  'FROM '.DEPT_TABLE.' dept '.
                  'INNER JOIN '.STAFF_TABLE.' staff ON(staff.dept_id=dept.dept_id) '.
                  'GROUP By dept.dept_id HAVING users>0 ORDER BY dept_name';
开发者ID:KingsleyGU,项目名称:osticket,代码行数:30,代码来源:staffmembers.inc.php

示例13: __

if ($_REQUEST['order'] && $orderWays[strtoupper($_REQUEST['order'])]) {
    $order = $orderWays[strtoupper($_REQUEST['order'])];
}
$order = $order ?: 'ASC';
if ($order_column && strpos($order_column, ',')) {
    $order_column = str_replace(',', " {$order},", $order_column);
}
$x = $sort . '_sort';
${$x} = ' class="' . strtolower($order) . '" ';
$order_by = "{$order_column} {$order} ";
$total = db_count('SELECT count(DISTINCT org.id) ' . $from . ' ' . $where);
$page = $_GET['p'] && is_numeric($_GET['p']) ? $_GET['p'] : 1;
$pageNav = new Pagenate($total, $page, PAGE_LIMIT);
$qstr = '&amp;' . Http::build_query($qs);
$qs += array('sort' => $_REQUEST['sort'], 'order' => $_REQUEST['order']);
$pageNav->setURL('orgs.php', $qs);
$qstr .= '&amp;order=' . ($order == 'DESC' ? 'ASC' : 'DESC');
$select .= ', count(DISTINCT user.id) as users ';
$from .= ' LEFT JOIN ' . USER_TABLE . ' user ON (user.org_id = org.id) ';
$query = "{$select} {$from} {$where} GROUP BY org.id ORDER BY {$order_by} LIMIT " . $pageNav->getStart() . "," . $pageNav->getLimit();
//echo $query;
$qhash = md5($query);
$_SESSION['orgs_qs_' . $qhash] = $query;
?>
<h2><?php 
echo __('Organizations');
?>
</h2>
<div class="pull-left" style="width:700px;">
    <form action="orgs.php" method="get">
        <?php 
开发者ID:dmiguel92,项目名称:osTicket-1.8,代码行数:31,代码来源:orgs.inc.php

示例14: Pagenate

        </tr>
    <?php 
}
?>
    </tbody>
</table>
</div>
<div id="items" class="tab_content" style="display:none">
    <table class="form_table" width="940" border="0" cellspacing="0" cellpadding="2">
    <thead>
    <?php 
if ($list) {
    $page = $_GET['p'] && is_numeric($_GET['p']) ? $_GET['p'] : 1;
    $count = $list->getNumItems();
    $pageNav = new Pagenate($count, $page, PAGE_LIMIT);
    $pageNav->setURL('list.php', array('id' => $list->getId()));
    $showing = $pageNav->showing() . ' ' . __('list items');
    ?>
    <?php 
} else {
    $showing = __('Add a few initial items to the list');
}
?>
        <tr>
            <th colspan="5">
                <em><?php 
echo $showing;
?>
</em>
            </th>
        </tr>
开发者ID:dmiguel92,项目名称:osTicket-1.8,代码行数:31,代码来源:dynamic-list.inc.php

示例15: urlencode

        $qstr .= '&startDate=' . urlencode($_REQUEST['startDate']);
    }
    if ($endTime) {
        $qwhere .= ' AND created<=FROM_UNIXTIME(' . $endTime . ')';
        $qstr .= '&endDate=' . urlencode($_REQUEST['endDate']);
    }
}
$qselect = 'SELECT log.* ';
$qfrom = ' FROM ' . SYSLOG_TABLE . ' log ';
//get log count based on the query so far..
$total = db_count("SELECT count(*) {$qfrom} {$qwhere}");
$pagelimit = 30;
$page = $_GET['p'] && is_numeric($_GET['p']) ? $_GET['p'] : 1;
//pagenate
$pageNav = new Pagenate($total, $page, $pagelimit, $trl);
$pageNav->setURL('admin.php', $qstr);
$query = "{$qselect} {$qfrom} {$qwhere} ORDER BY log.created DESC LIMIT " . $pageNav->getStart() . "," . $pageNav->getLimit();
//echo $query;
$result = db_query($query);
$showing = db_num_rows($resp) ? $pageNav->showing() : "";
?>
<div class="msg">System Logs</div>
<div id='filter' >
 <form action="admin.php?t=syslog" method="get">
    <input type="hidden" name="t" value="syslog" />
    <div style="padding-left:15px;">
        Date Span:
        &nbsp;From&nbsp;<input id="sd" size=15 name="startDate" value="<?php 
echo Format::htmlchars($_REQUEST['startDate']);
?>
" 
开发者ID:KingsleyGU,项目名称:OSTicket-Reloaded,代码行数:31,代码来源:syslogs.inc.php


注:本文中的Pagenate::setURL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。