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


PHP paging类代码示例

本文整理汇总了PHP中paging的典型用法代码示例。如果您正苦于以下问题:PHP paging类的具体用法?PHP paging怎么用?PHP paging使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: define

 * @license    GPLv2 http://files.froxlor.org/misc/COPYING.txt
 * @package    Panel
 *
 */
define('AREA', 'admin');
require './lib/init.php';
if (isset($_POST['id'])) {
    $id = intval($_POST['id']);
} elseif (isset($_GET['id'])) {
    $id = intval($_GET['id']);
}
if ($page == 'ipsandports' || $page == 'overview') {
    if ($action == '') {
        $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_ipsandports");
        $fields = array('ip' => $lng['admin']['ipsandports']['ip'], 'port' => $lng['admin']['ipsandports']['port']);
        $paging = new paging($userinfo, TABLE_PANEL_IPSANDPORTS, $fields);
        $ipsandports = '';
        $result_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_IPSANDPORTS . "` " . $paging->getSqlWhere(false) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
        Database::pexecute($result_stmt);
        $paging->setEntries(Database::num_rows());
        $sortcode = $paging->getHtmlSortCode($lng);
        $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
        $searchcode = $paging->getHtmlSearchCode($lng);
        $pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
        $i = 0;
        $count = 0;
        while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
            if ($paging->checkDisplay($i)) {
                $row = htmlentities_array($row);
                if (filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
                    $row['ip'] = '[' . $row['ip'] . ']';
开发者ID:mowamed,项目名称:Froxlor,代码行数:31,代码来源:admin_ipsandports.php

示例2: session_start

<?php

session_start();
//include_once("../include/db_mysqli.inc");
include_once "../include/template.inc";
include_once "../include/confGral.php";
require "../include/paging_class.php";
include_once "../include/acceso.class.php";
$usuario = new Acceso();
$t = new Template("../templates", "keep");
$paging = new paging(15, 5, "<< prev", "next >>", "(%%number%%) ");
$paging->db("localhost", "nesoftwa_root", ";L9Nehbfaxts", "nesoftwa_ALMARTCON");
// Identificar si pertenece a una Naviera
$sesIdUsr = $_SESSION['sesIdUsuario'];
$idNaviera = getValueTable("id_naviera", "USUARIO", "id_usuario", $sesIdUsr);
if ($usuario->havePerm("1,3,4", $_SESSION['sesArrPerms'])) {
    // fffffffffffffffffffffffffffffffffffffffffffffffffffffff
    function explode_keyword($q)
    {
        //trim
        $q = trim($q);
        $q = preg_replace("/[\\s]+/", " ", $q);
        $mode = "AND ";
        if (!empty($q)) {
            $condition = $condition . " eir='{$q}' " . $mode;
        }
        //$condition= substr($condition,0,-4);
        return $condition;
    }
    // fffffffffffffffffffffffffffffffffffffffffffffffffffffff
    function explode_keyword2($q)
开发者ID:nesmaster,项目名称:almartcon,代码行数:31,代码来源:invInSearch2.php

示例3: auth

$_SESSION['s_page_admin'] = $_SERVER['PHP_SELF'];
$OPERADOR_AREA = false;
if (isset($_SESSION['s_area_admin']) && $_SESSION['s_area_admin'] == '1' && $_SESSION['s_nivel'] != '1') {
    $OPERADOR_AREA = true;
}
print "<HTML>";
print "<BODY bgcolor='" . BODY_COLOR . "'>";
$auth = new auth();
if ($OPERADOR_AREA) {
    $auth->testa_user($_SESSION['s_usuario'], $_SESSION['s_nivel'], $_SESSION['s_nivel_desc'], 2);
} else {
    $auth->testa_user($_SESSION['s_usuario'], $_SESSION['s_nivel'], $_SESSION['s_nivel_desc'], 1);
}
print "<BR><B>" . TRANS('ADM_PROBS') . "</B><BR>";
print "<FORM method='POST' action='" . $_SERVER['PHP_SELF'] . "' onSubmit=\"return valida()\">";
$PAGE = new paging("PRINCIPAL");
$PAGE->setRegPerPage($_SESSION['s_page_size']);
if (!isset($_GET['cellStyle'])) {
    $cellStyle = "cellpadding='5' cellspacing='0'";
} else {
    $cellStyle = "cellpadding='0' cellspacing='1'";
}
print "<TABLE border='0' align='left' " . $cellStyle . "  width='100%' bgcolor='" . BODY_COLOR . "'>";
if (isset($_POST['search'])) {
    $search = $_POST['search'];
} else {
    $search = "";
}
$qry_config = "SELECT * FROM config ";
$exec_config = mysql_query($qry_config) or die(TRANS('ERR_TABLE_CONFIG'));
$row_config = mysql_fetch_array($exec_config);
开发者ID:JusCes,项目名称:ocomonv3,代码行数:31,代码来源:problemas.php

示例4: cleartext

}
global $koneksi_db, $maxdata;
$tengah = '<h4 class="bg">Hasil Pencarian</h4>';
$query = cleartext($_GET['query']);
if ($query == '' or !isset($query)) {
    $tengah .= "<div class=\"error\">Tidak Ada Pencarian</div>";
} else {
    $limit = 10;
    $s1 = '';
    $query = htmlentities($query);
    $hasil = $koneksi_db->sql_query("SELECT * FROM artikel WHERE ((judul LIKE '%{$query}%' OR konten LIKE '%{$query}%' OR user LIKE '%{$query}%')AND publikasi=1)");
    $jumlah = $koneksi_db->sql_numrows($hasil);
    if ($jumlah < 1) {
        $s1 = "tidak ada";
    }
    $a = new paging($limit);
    if (!$s1) {
        $tengah .= '<div class="border">';
        $tengah .= "Yang dicari <b>\"{$query}\"</b>";
        $tengah .= '</div>';
        $offset = int_filter(@$_GET['offset']);
        $pg = int_filter(@$_GET['pg']);
        $stg = int_filter(@$_GET['stg']);
        $hasil2 = $koneksi_db->sql_query("SELECT * FROM artikel WHERE ((judul LIKE '%{$query}%' OR konten LIKE '%{$query}%' OR user LIKE '%{$query}%')AND publikasi=1) ORDER By id LIMIT {$offset},{$limit}");
        $tengah .= '<div class="border">';
        $tengah .= "Ditemukan <b>" . $jumlah . "</b> artikel mengandung kata: <b>{$query}</b>";
        $tengah .= '</div>';
        $tengah .= '<div class="border">';
        while ($data = $koneksi_db->sql_fetchrow($hasil2)) {
            $tengah .= "<p class=\"konten\"><a href=\"?pilih=news&amp;mod=yes&amp;aksi=lihat&amp;id={$data['0']}\">{$data['1']}</a><br />";
            $data[5] = datetimes($data['tgl']);
开发者ID:rekysda,项目名称:indorepair,代码行数:31,代码来源:search.php

示例5: session_start

<?php

session_start();
//include_once("../include/db_mysqli.inc");
include_once "../include/template.inc";
include_once "../include/confGral.php";
require "../include/paging_class.php";
$t = new Template("../templates", "keep");
$paging = new paging(15, 5, "<< prev", "next >>", "(%%number%%) ");
$paging->db("localhost", "nesoftwa_root", ";L9Nehbfaxts", "nesoftwa_MOPSAPRO");
// Identificar si pertenece a una Naviera
$idUsr = $_SESSION['sesIdUsuario'];
$sesIdOficina = $_SESSION['sesIdOficina'];
// fffffffffffffffffffffffffffffffffffffffffffffffffffffff
function explode_keyword1($q)
{
    //trim
    $q = trim($q);
    $q = preg_replace("/[\\s]+/", " ", $q);
    $mode = "AND ";
    $condition = $condition . "posicion like '%{$q}%' " . $mode;
    //$condition= substr($condition,0,-4);
    return $condition;
}
// fffffffffffffffffffffffffffffffffffffffffffffffffffffff
function explode_keyword2($q)
{
    //trim
    $q = trim($q);
    //$q= preg_replace("/[\s]+/"," ",$q);
    $mode = "AND ";
开发者ID:nesmaster,项目名称:mopsapro,代码行数:31,代码来源:logConsAereo.php

示例6: intval

if (isset($_POST['id'])) {
    $id = intval($_POST['id']);
} elseif (isset($_GET['id'])) {
    $id = intval($_GET['id']);
}
if ($userinfo['customers_see_all'] == '1') {
    $taxclasses = array();
    $taxclasses_option = '';
    $taxclasses_result = $db->query('SELECT `classid`, `classname` FROM `' . TABLE_BILLING_TAXCLASSES . '` ');
    while ($taxclasses_row = $db->fetch_array($taxclasses_result)) {
        $taxclasses[$taxclasses_row['classid']] = $taxclasses_row['classname'];
        $taxclasses_option .= makeoption($taxclasses_row['classname'], $taxclasses_row['classid']);
    }
    if ($action == '') {
        $fields = array('tld' => $lng['domains']['topleveldomain'], 'valid_from' => $lng['service']['valid_from'], 'valid_to' => $lng['service']['valid_to'], 'interval_fee' => $lng['service']['interval_fee'], 'interval_length' => $lng['service']['interval_length'], 'setup_fee' => $lng['service']['setup_fee']);
        $paging = new paging($userinfo, $db, TABLE_BILLING_SERVICE_DOMAINS_TEMPLATES, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
        $customers = '';
        $result = $db->query('SELECT *  ' . 'FROM `' . TABLE_BILLING_SERVICE_DOMAINS_TEMPLATES . '` ' . $paging->getSqlWhere() . ' ' . $paging->getSqlOrderBy() . ' ' . $paging->getSqlLimit());
        $paging->setEntries($db->num_rows($result));
        $sortcode = $paging->getHtmlSortCode($lng);
        $arrowcode = $paging->getHtmlArrowCode($filename . '?s=' . $s);
        $searchcode = $paging->getHtmlSearchCode($lng);
        $pagingcode = $paging->getHtmlPagingCode($filename . '?s=' . $s);
        $i = 0;
        $domainstemplates = '';
        while ($row = $db->fetch_array($result)) {
            if ($paging->checkDisplay($i)) {
                $row = htmlentities_array($row);
                eval('$domainstemplates.="' . getTemplate('billing/domains_templates_row') . '";');
            }
            ++$i;
开发者ID:markc,项目名称:syscp,代码行数:31,代码来源:billing_domains_templates.php

示例7: session_start

<?php

session_start();
//include_once("../include/db_mysqli.inc");
include_once "../include/template.inc";
include_once "../include/confGral.php";
require "../include/paging_class.php";
$t = new Template("../templates", "keep");
$paging = new paging(15, 5, "<< prev", "next >>", "(%%number%%) ");
$paging->db("localhost", "nesoftwa_root", ";L9Nehbfaxts", "nesoftwa_ANAKOSTA");
// Identificar si pertenece a una Naviera
$idUsr = $_SESSION['sesIdUsuario'];
$idNaviera = getValueTable("id_naviera", "USUARIO", "id_usuario", $idUsr);
// fffffffffffffffffffffffffffffffffffffffffffffffffffffff
function explode_keyword1($q)
{
    //trim
    $q = trim($q);
    $q = preg_replace("/[\\s]+/", " ", $q);
    $idConte = getValueTable("id_contenedor", "CONTENEDOR", "numero", $q);
    if (empty($idConte) && !empty($q)) {
        $idConte = '-';
    }
    $mode = "AND ";
    $condition = $condition . "i.id_contenedor like '{$idConte}%' " . $mode;
    //$condition= substr($condition,0,-4);
    return $condition;
}
// fffffffffffffffffffffffffffffffffffffffffffffffffffffff
function explode_keyword2($q)
{
开发者ID:nesmaster,项目名称:anakosta,代码行数:31,代码来源:navInvGen13.php

示例8: define

 * file that was distributed with this source code. You can also view the
 * COPYING file online at http://files.froxlor.org/misc/COPYING.txt
 *
 * @copyright  (c) the authors
 * @author     Florian Lippert <flo@syscp.org> (2003-2009)
 * @author     Froxlor team <team@froxlor.org> (2010-)
 * @license    GPLv2 http://files.froxlor.org/misc/COPYING.txt
 * @package    Panel
 *
 */
define('AREA', 'admin');
require './lib/init.php';
if ($page == 'log' && $userinfo['change_serversettings'] == '1') {
    if ($action == '') {
        $fields = array('date' => $lng['logger']['date'], 'type' => $lng['logger']['type'], 'user' => $lng['logger']['user'], 'text' => $lng['logger']['action']);
        $paging = new paging($userinfo, TABLE_PANEL_LOG, $fields, null, null, 0, 'desc');
        $result_stmt = Database::query('
			SELECT * FROM `' . TABLE_PANEL_LOG . '` ' . $paging->getSqlWhere(false) . ' ' . $paging->getSqlOrderBy() . ' ' . $paging->getSqlLimit());
        $logs_count = Database::num_rows();
        $paging->setEntries($logs_count);
        $sortcode = $paging->getHtmlSortCode($lng);
        $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
        $searchcode = $paging->getHtmlSearchCode($lng);
        $pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
        $clog = array();
        while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
            if (!isset($clog[$row['action']]) || !is_array($clog[$row['action']])) {
                $clog[$row['action']] = array();
            }
            $clog[$row['action']][$row['logid']] = $row;
        }
开发者ID:asemen,项目名称:Froxlor,代码行数:31,代码来源:admin_logger.php

示例9: customPaging

function customPaging($sql, $ListRecPerPage = 20, $rewrite_url = false)
{
    //var_dump($rewrite_url);
    global $link;
    //===============Paging========================
    //$ListRecPerPage = 10;
    $pg = new paging($link, "page", $ListRecPerPage, "&raquo;", "&laquo;", 5, @$CurlLink);
    $pg->sql = $sql;
    $r = $pg->get_page_result();
    // result set
    $num_rows = $pg->get_page_num_rows();
    // number of records in result set
    $data = array();
    if ($num_rows > 0) {
        while ($o = GetArr($r)) {
            array_push($data, $o);
        }
    }
    mysql_data_seek($r, 0);
    //if( @$iscurl )
    //$nav_links = $pg->navigation_curl(" | ", "price" ); // the navigation links (define a CSS class selector for the current link)
    //else $separator = " | ", $css_current = "", $back_forward = false, $rewrite_url = false
    $nav_links = $pg->navigation(" ", "current", false, $rewrite_url);
    // the navigation links (define a CSS class selector for the current link)
    $nav_info = $pg->page_info("to");
    // information about the number of records on page ("to" is the text between the number)
    $simple_nav_links = $pg->back_forward_link();
    // the navigation with only the back and forward links
    $total_recs = $pg->get_total_rows();
    // the total number of records*/
    //=============================================
    return array('data' => $data, 'result' => $r, 'total_recs' => $total_recs, 'nav_links' => $nav_links, 'nav_info' => $nav_info, 'simple_nav_links' => $simple_nav_links);
}
开发者ID:Khum,项目名称:SDFU,代码行数:33,代码来源:functions.inc.php

示例10: define

 *
 */
define('AREA', 'admin');
require './lib/init.php';
if (isset($_POST['id'])) {
    $id = intval($_POST['id']);
} elseif (isset($_GET['id'])) {
    $id = intval($_GET['id']);
}
if ($page == 'customers' && $userinfo['customers'] != '0') {
    if ($action == '') {
        // clear request data
        unset($_SESSION['requestData']);
        $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_customers");
        $fields = array('c.loginname' => $lng['login']['username'], 'a.loginname' => $lng['admin']['admin'], 'c.name' => $lng['customer']['name'], 'c.email' => $lng['customer']['email'], 'c.firstname' => $lng['customer']['firstname'], 'c.company' => $lng['customer']['company'], 'c.diskspace' => $lng['customer']['diskspace'], 'c.diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')', 'c.traffic' => $lng['customer']['traffic'], 'c.traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')');
        $paging = new paging($userinfo, TABLE_PANEL_CUSTOMERS, $fields);
        $customers = '';
        $result_stmt = Database::prepare("\n\t\t\tSELECT `c`.*, `a`.`loginname` AS `adminname`\n\t\t\tFROM `" . TABLE_PANEL_CUSTOMERS . "` `c`, `" . TABLE_PANEL_ADMINS . "` `a`\n\t\t\tWHERE " . ($userinfo['customers_see_all'] ? '' : " `c`.`adminid` = :adminid AND ") . "\n\t\t\t`c`.`adminid` = `a`.`adminid` " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
        Database::pexecute($result_stmt, array('adminid' => $userinfo['adminid']));
        $num_rows = Database::num_rows();
        $paging->setEntries($num_rows);
        $sortcode = $paging->getHtmlSortCode($lng, true);
        $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
        $searchcode = $paging->getHtmlSearchCode($lng);
        $pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
        $i = 0;
        $count = 0;
        while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
            if ($paging->checkDisplay($i)) {
                $domains_stmt = Database::prepare("\n\t\t\t\t\tSELECT COUNT(`id`) AS `domains`\n\t\t\t\t\tFROM `" . TABLE_PANEL_DOMAINS . "`\n\t\t\t\t\tWHERE `customerid` = :cid\n\t\t\t\t\tAND `parentdomainid` = '0'\n\t\t\t\t\tAND `id`<> :stdd");
                Database::pexecute($domains_stmt, array('cid' => $row['customerid'], 'stdd' => $row['standardsubdomain']));
开发者ID:mowamed,项目名称:Froxlor,代码行数:31,代码来源:admin_customers.php

示例11: showTable

 function showTable()
 {
     global $error_msg;
     global $report_msg;
     global $warning_msg_displayed;
     global $num_ajaxCRUD_tables_instantiated;
     $num_ajaxCRUD_tables_instantiated++;
     /* Sort Table
           Note: this cancels out default sorting set by addOrderBy()
        */
     if ($this->db_table == $_REQUEST['table'] && $_REQUEST['sort_field'] != '') {
         $sort_field = $_REQUEST['sort_field'];
         $user_sort_order_direction = $_REQUEST['sort_direction'];
         if ($user_sort_order_direction == 'asc') {
             $this->sort_direction = "desc";
         } else {
             $this->sort_direction = "asc";
         }
         $sort_sql = " ORDER BY {$sort_field} {$this->sort_direction}";
         $this->addOrderBy($sort_sql);
         $this->sorted_table = true;
     }
     //the HTML to display
     $top_html = "";
     //top header stuff
     $table_html = "";
     //for the html table itself
     $bottom_html = "";
     $add_html = "";
     //for the add form
     $html = "";
     //all combined
     if ($num_ajaxCRUD_tables_instantiated == 1) {
         //pull in the  css and javascript files
         $this->insertHeader($this->ajax_file);
     }
     if ($this->doActionOnShowTable) {
         if ($_REQUEST['action'] != '') {
             $this->doAction($_REQUEST['action']);
         }
     }
     $item = $this->item;
     $top_html .= "<a name='ajaxCRUD" . $num_ajaxCRUD_tables_instantiated . "' id='ajaxCRUD" . $num_ajaxCRUD_tables_instantiated . "'></a>\n";
     if (count($this->ajaxFilter_fields) > 0) {
         $top_html .= "<form id=\"" . $this->db_table . "_filter_form\">\n";
         $top_html .= "<table cellspacing='5' align='center'><tr>";
         foreach ($this->ajaxFilter_fields as $filter_field) {
             $display_field = $filter_field;
             if ($this->displayAs_array[$filter_field] != '') {
                 $display_field = $this->displayAs_array[$filter_field];
             }
             $textbox_size = $this->ajaxFilterBoxSize[$filter_field];
             $filter_value = "";
             if ($_REQUEST[$filter_field] != '') {
                 $filter_value = $_REQUEST[$filter_field];
             }
             $top_html .= "<td><b>{$display_field}</b>: <input type=\"text\" size=\"{$textbox_size}\" name=\"{$filter_field}\" value=\"{$filter_value}\" onKeyUp=\"filterTable(this, '" . $this->db_table . "', '{$filter_field}', '{$extra_query_params}');\"></td>";
         }
         $top_html .= "</tr></table>\n";
         $top_html .= "</form>\n";
     }
     #############################################
     #
     # Begin code for displaying database elements
     #
     #############################################
     $select_fields = implode(",", $this->fields);
     $sql = "SELECT * FROM " . $this->db_table . $this->sql_where_clause . $this->sql_order_by;
     if ($this->showPaging) {
         $pageid = $_GET['pid'];
         //Get the pid value
         if (intval($pageid) == 0) {
             $pageid = 1;
         }
         $Paging = new paging();
         $Paging->tableName = $this->db_table;
         $total_records = $Paging->myRecordCount($sql);
         //count records
         $totalpage = $Paging->processPaging($this->limit, $pageid);
         $rows = $Paging->startPaging($sql);
         //get records in the databse
         $links = $Paging->pageLinks(basename($PHP_SELF));
         //1234 links
         unset($Paging);
     } else {
         $rows = q($sql . $this->sql_limit);
     }
     //$rows = q("SELECT * FROM " . $this->db_table");
     $row_count = count($rows);
     $this->row_count = $row_count;
     $_SESSION['row_count'] = $row_count;
     if ($row_count == 0) {
         $report_msg[] = $this->emptyTableMessage;
     }
     #this is an optional function which will allow you to display errors or report messages as desired. comment it out if desired
     //only show the message box if it hasn't been displayed already
     if ($warning_msg_displayed == 0 || $warning_msg_displayed == '') {
         echo_msg_box();
     }
     $dropdown_array = array();
//.........这里部分代码省略.........
开发者ID:JJWTimmer,项目名称:BLAM,代码行数:101,代码来源:ajaxCRUD.class.php

示例12: array

 $categories = array();
 $subject = validate($_POST['subject'], 'subject');
 $priority[0] = isset($_POST['priority1']) ? $_POST['priority1'] : '';
 $priority[1] = isset($_POST['priority2']) ? $_POST['priority2'] : '';
 $priority[2] = isset($_POST['priority3']) ? $_POST['priority3'] : '';
 $fromdate = validate($_POST['fromdate'], 'fromdate');
 $todate = validate($_POST['todate'], 'todate');
 $message = validate($_POST['message'], 'message');
 $customer = validate($_POST['customer'], 'customer');
 $cat = $db->query_first('SELECT COUNT(`id`) as `ccount` FROM `' . TABLE_PANEL_TICKET_CATS . '`');
 for ($x = 0; $x < $cat['ccount']; $x++) {
     $categories[$x] = isset($_POST['category' . $x]) ? $_POST['category' . $x] : '';
 }
 $query = ticket::getArchiveSearchStatement($db, $subject, $priority, $fromdate, $todate, $message, $customer, $userinfo['adminid'], $categories);
 $fields = array('lastchange' => $lng['ticket']['lastchange'], 'ticket_answers' => $lng['ticket']['ticket_answers'], 'subject' => $lng['ticket']['subject'], 'lastreplier' => $lng['ticket']['lastreplier'], 'priority' => $lng['ticket']['priority']);
 $paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
 $result = $db->query($query . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
 $sortcode = $paging->getHtmlSortCode($lng);
 $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
 $searchcode = $paging->getHtmlSearchCode($lng);
 $pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
 $ctickets = array();
 while ($row = $db->fetch_array($result)) {
     if (!isset($ctickets[$row['customerid']]) || !is_array($ctickets[$row['customerid']])) {
         $ctickets[$row['customerid']] = array();
     }
     $ctickets[$row['customerid']][$row['id']] = $row;
 }
 if ($paging->sortfield == 'customerid' && $paging->sortorder == 'desc') {
     krsort($ctickets);
 } else {
开发者ID:Alkyoneus,项目名称:Froxlor,代码行数:31,代码来源:admin_tickets.php

示例13: intval

                $oClass->actives($id, 0);
            }
        }
        $hook->redirect($refresh);
    } else {
        $hook->redirect($refresh);
    }
} else {
    $tpl->setfile(array('body' => 'member.tpl'));
    $cond = " active=0";
    $cat = $oClass->view($cond);
    $total = $cat->num_rows();
    $orderby = "timestamp DESC";
    $start = LIMIT * intval($_GET['page']);
    $url = './?mod=' . $system->module . '&parentid=' . intval($_GET['parentid']) . '&type=' . intval($_GET['type']);
    $dp = new paging($url, $total, LIMIT);
    $request['divpage'] = $dp->simple();
    $cat = $oClass->view($cond, $start, LIMIT, $orderby);
    while ($rs = $cat->fetch()) {
        //$rs['delete'] = $rs['is_admin']?'':'style="display: inline;"';
        $rs['checked'] = $rs['active'] ? 'checked' : '';
        $rs['avatar'] = $rs['avatar'] ? '<a href="' . _UPLOAD . $rs['avatar'] . '" class="divbox"><img src="' . _UPLOAD . $rs['avatar'] . '" width="30" height="30" /></a>' : '';
        $tpl->assign($rs, 'user');
    }
    $breadcrumb->reset();
    $menu = explode('.', $_SESSION['cms_menu']);
    $breadcrumb->assign("", $MenuName[$menu[0]]);
    $level = $MenuLink[$menu[0]][$menu[1]];
    $breadcrumb->assign($level['link'], $level['name']);
}
$request['breadcrumb'] = $breadcrumb->parse();
开发者ID:ngukho,项目名称:mvc-cms,代码行数:31,代码来源:action.viewinactive.php

示例14: standard_error

    $result = $db->query_first($sql);
    if ($result == null) {
        // no rights to see the requested ticket
        standard_error(array('ticketnotaccessible'));
    }
} elseif (isset($_GET['id'])) {
    $id = intval($_GET['id']);
}
if ($page == 'overview') {
    $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets");
    eval("echo \"" . getTemplate("tickets/ticket") . "\";");
} elseif ($page == 'tickets') {
    if ($action == '') {
        $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets::tickets");
        $fields = array('status' => $lng['ticket']['status'], 'priority' => $lng['ticket']['priority'], 'lastchange' => $lng['ticket']['lastchange'], 'ticket_answers' => $lng['ticket']['ticket_answers'], 'subject' => $lng['ticket']['subject'], 'lastreplier' => $lng['ticket']['lastreplier']);
        $paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
        $paging->sortfield = 'lastchange';
        $paging->sortorder = 'desc';
        $result = $db->query('SELECT `main`.`id`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `customerid`="' . (int) $userinfo['customerid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
        $paging->setEntries($db->num_rows($result));
        $sortcode = $paging->getHtmlSortCode($lng);
        $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
        $searchcode = $paging->getHtmlSearchCode($lng);
        $pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
        $i = 0;
        $count = 0;
        $tickets = '';
        $tickets_count = 0;
        while ($row = $db->fetch_array($result)) {
            if ($paging->checkDisplay($i)) {
                $tickets_count++;
开发者ID:Alkyoneus,项目名称:Froxlor,代码行数:31,代码来源:customer_tickets.php

示例15: intval

 * Include our init.php, which manages Sessions, Language etc.
 */
require "./lib/init.php";
if (isset($_POST['id'])) {
    $id = intval($_POST['id']);
} elseif (isset($_GET['id'])) {
    $id = intval($_GET['id']);
}
if ($page == 'overview') {
    $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_email");
    eval("echo \"" . getTemplate("email/email") . "\";");
} elseif ($page == 'emails') {
    if ($action == '') {
        $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_email::emails");
        $fields = array('d.domain' => $lng['domains']['domainname'], 'm.email_full' => $lng['emails']['emailaddress'], 'm.destination' => $lng['emails']['forwarders']);
        $paging = new paging($userinfo, $db, TABLE_MAIL_VIRTUAL, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
        $result = $db->query('SELECT `m`.`id`, `m`.`domainid`, `m`.`email`, `m`.`email_full`, `m`.`iscatchall`, `u`.`quota`, `m`.`destination`, `m`.`popaccountid`, `d`.`domain` FROM `' . TABLE_MAIL_VIRTUAL . '` `m` LEFT JOIN `' . TABLE_PANEL_DOMAINS . '` `d` ON (`m`.`domainid` = `d`.`id`) LEFT JOIN `' . TABLE_MAIL_USERS . '` `u` ON (`m`.`popaccountid` = `u`.`id`) WHERE `m`.`customerid`="' . $db->escape($userinfo['customerid']) . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
        $paging->setEntries($db->num_rows($result));
        $sortcode = $paging->getHtmlSortCode($lng);
        $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
        $searchcode = $paging->getHtmlSearchCode($lng);
        $pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
        $emails = array();
        while ($row = $db->fetch_array($result)) {
            if (!isset($emails[$row['domain']]) || !is_array($emails[$row['domain']])) {
                $emails[$row['domain']] = array();
            }
            $emails[$row['domain']][$row['email_full']] = $row;
        }
        if ($paging->sortfield == 'd.domain' && $paging->sortorder == 'desc') {
            krsort($emails);
开发者ID:Alkyoneus,项目名称:Froxlor,代码行数:31,代码来源:customer_email.php


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