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


PHP paging::getSqlOrderBy方法代码示例

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


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

示例1: 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 == 'admins' && $userinfo['change_serversettings'] == '1') {
    if ($action == '') {
        $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_admins");
        $fields = array('loginname' => $lng['login']['username'], 'name' => $lng['customer']['name'], 'diskspace' => $lng['customer']['diskspace'], 'diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')', 'traffic' => $lng['customer']['traffic'], 'traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')', 'deactivated' => $lng['admin']['deactivated']);
        $paging = new paging($userinfo, $db, TABLE_PANEL_ADMINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
        $admins = '';
        $result = $db->query("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` " . $paging->getSqlWhere(false) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
        $paging->setEntries($db->num_rows($result));
        $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 = $db->fetch_array($result)) {
            if ($paging->checkDisplay($i)) {
                $row['traffic_used'] = round($row['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']);
                $row['traffic'] = round($row['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
                $row['diskspace_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
                $row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
                /**
                 * percent-values for progressbar
开发者ID:Alkyoneus,项目名称:Froxlor,代码行数:31,代码来源:admin_admins.php

示例2: intval

 */
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);
        } else {
开发者ID:Alkyoneus,项目名称:Froxlor,代码行数:31,代码来源:customer_email.php

示例3: intval

 */
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_ftp');
    eval('echo "' . getTemplate('ftp/ftp') . '";');
} elseif ($page == 'accounts') {
    if ($action == '') {
        $log->logAction(USR_ACTION, LOG_NOTICE, 'viewed customer_ftp::accounts');
        $fields = array('username' => $lng['login']['username'], 'homedir' => $lng['panel']['path']);
        $paging = new paging($userinfo, $db, TABLE_FTP_USERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
        $result = $db->query('SELECT `id`, `username`, `homedir` FROM `' . TABLE_FTP_USERS . "` WHERE `customerid`='" . $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;
        $accounts = '';
        while ($row = $db->fetch_array($result)) {
            if ($paging->checkDisplay($i)) {
                if (strpos($row['homedir'], $userinfo['documentroot']) === 0) {
                    $row['documentroot'] = substr($row['homedir'], strlen($userinfo['documentroot']));
                } else {
                    $row['documentroot'] = $row['homedir'];
                }
开发者ID:markc,项目名称:syscp,代码行数:31,代码来源:customer_ftp.php

示例4: elseif

} 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('c.classname' => $lng['billing']['taxclass'], 'r.taxrate' => $lng['billing']['taxrate'], 'r.valid_from' => $lng['service']['valid_from']);
        $paging = new paging($userinfo, $db, TABLE_BILLING_TAXRATES, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
        $customers = '';
        $result = $db->query('SELECT `r`.*, `c`.*  ' . 'FROM `' . TABLE_BILLING_TAXRATES . '` `r` LEFT JOIN `' . TABLE_BILLING_TAXCLASSES . '` `c` ON( `r`.`taxclass` = `c`.`classid` ) ' . $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;
        $taxrates = '';
        while ($row = $db->fetch_array($result)) {
            if ($paging->checkDisplay($i)) {
                $row['taxrate_percent'] = $row['taxrate'] * 100;
                $row = htmlentities_array($row);
                eval('$taxrates.="' . getTemplate('billing/taxrates_row') . '";');
            }
            ++$i;
        }
开发者ID:markc,项目名称:syscp,代码行数:31,代码来源:billing_taxrates.php

示例5: intval

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_mysql");
    $lng['mysql']['description'] = str_replace('<SQL_HOST>', $sql['host'], $lng['mysql']['description']);
    eval("echo \"" . getTemplate("mysql/mysql") . "\";");
} elseif ($page == 'mysqls') {
    if ($action == '') {
        $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_mysql::mysqls");
        $fields = array('databasename' => $lng['mysql']['databasename'], 'description' => $lng['mysql']['databasedescription']);
        $paging = new paging($userinfo, $db, TABLE_PANEL_DATABASES, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
        $result = $db->query("SELECT * FROM `" . TABLE_PANEL_DATABASES . "` WHERE `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;
        $mysqls = '';
        // Begin root-session
        $db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
        while ($row = $db->fetch_array($result)) {
            if ($paging->checkDisplay($i)) {
                $row = htmlentities_array($row);
                $mbdata = $db_root->query_first("SELECT SUM( data_length + index_length) / 1024 / 1024 'MB' FROM information_schema.TABLES WHERE table_schema = '" . $db_root->escape($row['databasename']) . "' GROUP BY table_schema ;");
                $row['size'] = number_format($mbdata['MB'], 3, '.', '');
开发者ID:Alkyoneus,项目名称:Froxlor,代码行数:31,代码来源:customer_mysql.php

示例6: intval

 */
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_ftp");
    eval("echo \"" . getTemplate("ftp/ftp") . "\";");
} elseif ($page == 'accounts') {
    if ($action == '') {
        $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_ftp::accounts");
        $fields = array('username' => $lng['login']['username'], 'homedir' => $lng['panel']['path']);
        $paging = new paging($userinfo, $db, TABLE_FTP_USERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
        $result = $db->query("SELECT `id`, `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . $userinfo['customerid'] . "'  AND `username` NOT LIKE '%_backup'" . $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;
        $accounts = '';
        while ($row = $db->fetch_array($result)) {
            if ($paging->checkDisplay($i)) {
                if (strpos($row['homedir'], $userinfo['documentroot']) === 0) {
                    $row['documentroot'] = substr($row['homedir'], strlen($userinfo['documentroot']));
                } else {
                    $row['documentroot'] = $row['homedir'];
                }
开发者ID:Alkyoneus,项目名称:Froxlor,代码行数:31,代码来源:customer_ftp.php

示例7: array

 *
 * @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;
        }
        if ($paging->sortfield == 'date' && $paging->sortorder == 'desc') {
            krsort($clog);
开发者ID:asemen,项目名称:Froxlor,代码行数:31,代码来源:admin_logger.php

示例8: isset

 $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_stmt = Database::query('SELECT COUNT(`id`) as `ccount` FROM `' . TABLE_PANEL_TICKET_CATS . '`');
 $cat = $cat_stmt->fetch(PDO::FETCH_ASSOC);
 for ($x = 0; $x < $cat['ccount']; $x++) {
     $categories[$x] = isset($_POST['category' . $x]) ? $_POST['category' . $x] : '';
 }
 $archive_search = ticket::getArchiveSearchStatement($subject, $priority, $fromdate, $todate, $message, $customer, $userinfo['adminid'], $categories);
 $query = $archive_search[0];
 $archive_params = $archive_search[1];
 $fields = array('lastchange' => $lng['ticket']['lastchange'], 'subject' => $lng['ticket']['subject'], 'lastreplier' => $lng['ticket']['lastreplier']);
 $paging = new paging($userinfo, TABLE_PANEL_TICKETS, $fields);
 $result_stmt = Database::prepare($query . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
 Database::pexecute($result_stmt, $archive_params);
 $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 = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
     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:cobrafast,项目名称:Froxlor,代码行数:31,代码来源:admin_tickets.php

示例9: intval

 *
 */
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 == 'admins' && $userinfo['change_serversettings'] == '1') {
    if ($action == '') {
        $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_admins");
        $fields = array('loginname' => $lng['login']['username'], 'name' => $lng['customer']['name'], 'diskspace' => $lng['customer']['diskspace'], 'diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')', 'traffic' => $lng['customer']['traffic'], 'traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')', 'deactivated' => $lng['admin']['deactivated']);
        $paging = new paging($userinfo, TABLE_PANEL_ADMINS, $fields);
        $admins = '';
        $result_stmt = Database::query("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` " . $paging->getSqlWhere(false) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
        $numrows_admins = Database::num_rows();
        $paging->setEntries($numrows_admins);
        $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;
        $dec_places = Settings::Get('panel.decimal_places');
        while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
            if ($paging->checkDisplay($i)) {
                $row['traffic_used'] = round($row['traffic_used'] / (1024 * 1024), $dec_places);
                $row['traffic'] = round($row['traffic'] / (1024 * 1024), $dec_places);
                $row['diskspace_used'] = round($row['diskspace_used'] / 1024, $dec_places);
                $row['diskspace'] = round($row['diskspace'] / 1024, $dec_places);
开发者ID:asemen,项目名称:Froxlor,代码行数:31,代码来源:admin_admins.php

示例10: while

 while ($customers_row = $db->fetch_array($customers_result)) {
     $customers[$customers_row['customerid']] = $customers_row['loginname'] . ' (' . $customers_row['name'] . ', ' . $customers_row['firstname'] . ')';
     $customers_option .= makeoption($customers_row['loginname'] . ' (' . $customers_row['name'] . ', ' . $customers_row['firstname'] . ')', $customers_row['customerid']);
 }
 $taxclasses = array('0' => $lng['panel']['default']);
 $taxclasses_option = makeoption($lng['panel']['default'], 0, 0, true);
 $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('c.loginname' => $lng['login']['username'], 'c.name' => $lng['customer']['name'], 'c.firstname' => $lng['customer']['firstname'], 'c.company' => $lng['customer']['company'], 'o.caption_setup' => $lng['billing']['caption_setup'], 'o.caption_interval' => $lng['billing']['caption_interval'], 'o.quantity' => $lng['service']['quantity'], 'o.interval_fee' => $lng['service']['interval_fee'], 'o.interval_length' => $lng['service']['interval_length'], 'o.setup_fee' => $lng['service']['setup_fee'], 'o.service_active' => $lng['service']['active'], 'o.servicestart_date' => $lng['service']['start_date'], 'o.lastinvoiced_date' => $lng['service']['lastinvoiced_date']);
     $paging = new paging($userinfo, $db, TABLE_BILLING_SERVICE_OTHER, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
     $customers = '';
     $result = $db->query("SELECT `o`.*, `c`.`loginname`, `c`.`name`, `c`.`firstname`, `c`.`company` " . "FROM `" . TABLE_BILLING_SERVICE_OTHER . "` `o` LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` ON( `o`.`customerid` = `c`.`customerid` ) " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
     $paging->setEntries($db->num_rows($result));
     $sortcode = $paging->getHtmlSortCode($lng, true);
     $arrowcode = $paging->getHtmlArrowCode($filename . '?s=' . $s);
     $searchcode = $paging->getHtmlSearchCode($lng);
     $pagingcode = $paging->getHtmlPagingCode($filename . '?s=' . $s);
     $i = 0;
     $otherservices = '';
     while ($row = $db->fetch_array($result)) {
         if ($paging->checkDisplay($i)) {
             $enable_billing_data_edit = $row['servicestart_date'] == '0000-00-00' || $row['interval_payment'] == CONST_BILLING_INTERVALPAYMENT_PREPAID && calculateDayDifference(time(), $row['lastinvoiced_date']) >= 0;
             $row = htmlentities_array($row);
             eval("\$otherservices.=\"" . getTemplate("billing/other_row") . "\";");
         }
         $i++;
     }
开发者ID:HobbyNToys,项目名称:SysCP,代码行数:31,代码来源:billing_other.php

示例11: elseif

} elseif (isset($_GET['id'])) {
    $id = intval($_GET['id']);
}
if ($userinfo['customers_see_all'] == '1') {
    if (isset($_GET['mode']) && intval($_GET['mode']) === 1) {
        $mode = 1;
    } elseif (isset($_POST['mode']) && intval($_POST['mode']) === 1) {
        $mode = 1;
    } else {
        $mode = 0;
    }
    if ($action == '') {
        $fields = array('i.invoice_number' => $lng['billing']['number'], 'i.invoice_date' => $lng['billing']['invoice_date'], 'i.state' => $lng['invoice']['state'], 'i.state_change' => $lng['invoice']['state_change'], 'i.total_fee' => $lng['invoice']['total_fee'], 'i.total_fee_taxed' => $lng['invoice']['total_fee_taxed'], 'c.loginname' => $lng['login']['username'], 'c.name' => $lng['customer']['name'], 'c.firstname' => $lng['customer']['firstname'], 'c.company' => $lng['customer']['company']);
        $paging = new paging($userinfo, $db, TABLE_BILLING_INVOICES, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
        $customers = '';
        $result = $db->query("SELECT `i`.*, `c`.* " . "FROM `" . getModeDetails($mode, 'TABLE_BILLING_INVOICES', 'table') . "` `i` LEFT JOIN `" . getModeDetails($mode, 'TABLE_PANEL_USERS', 'table') . "` `c` USING (`" . getModeDetails($mode, 'TABLE_PANEL_USERS', 'key') . "`) " . $paging->getSqlWhere() . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
        $paging->setEntries($db->num_rows($result));
        $sortcode = $paging->getHtmlSortCode($lng, true);
        $arrowcode = $paging->getHtmlArrowCode($filename . '?mode=' . $mode . '&s=' . $s);
        $searchcode = $paging->getHtmlSearchCode($lng);
        $pagingcode = $paging->getHtmlPagingCode($filename . '?mode=' . $mode . '&s=' . $s);
        $i = 0;
        $count = 0;
        while ($row = $db->fetch_array($result)) {
            if ($paging->checkDisplay($i)) {
                $row['invoice_date'] = makeNicePresentableDate($row['invoice_date'], $lng['panel']['dateformat_function']);
                $row['state_change'] = date($lng['panel']['dateformat_function'], $row['state_change']);
                $row = htmlentities_array($row);
                eval("\$customers.=\"" . getTemplate("billing/invoices_row") . "\";");
                $count++;
            }
开发者ID:HobbyNToys,项目名称:SysCP,代码行数:31,代码来源:billing_invoices.php

示例12: makeoption

     $taxclasses_option = makeoption($lng['panel']['default'], 0, 0, true);
     $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']);
     }
 }
 // Let's see how many customers we have
 $countcustomers = $db->query_first("SELECT COUNT(`customerid`) as `countcustomers` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int) $userinfo['adminid'] . "' ") . "");
 $countcustomers = (int) $countcustomers['countcustomers'];
 if ($action == '') {
     $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_domains");
     $fields = array('d.domain' => $lng['domains']['domainname'], 'ip.ip' => $lng['admin']['ipsandports']['ip'], 'ip.port' => $lng['admin']['ipsandports']['port'], 'c.name' => $lng['customer']['name'], 'c.firstname' => $lng['customer']['firstname'], 'c.company' => $lng['customer']['company'], 'c.loginname' => $lng['login']['username'], 'd.aliasdomain' => $lng['domains']['aliasdomain']);
     $paging = new paging($userinfo, $db, TABLE_PANEL_DOMAINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
     $domains = '';
     $result = $db->query("SELECT `d`.*, `c`.`loginname`, `c`.`name`, `c`.`firstname`, `c`.`company`, `c`.`standardsubdomain`, `ad`.`id` AS `aliasdomainid`, `ad`.`domain` AS `aliasdomain`, `ip`.`id` AS `ipid`, `ip`.`ip`, `ip`.`port` " . "FROM `" . TABLE_PANEL_DOMAINS . "` `d` " . "LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `ad` ON `d`.`aliasdomain`=`ad`.`id` " . "LEFT JOIN `" . TABLE_PANEL_IPSANDPORTS . "` `ip` ON (`d`.`ipandport` = `ip`.`id`) " . "WHERE `d`.`parentdomainid`='0' " . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int) $userinfo['adminid'] . "' ") . " " . $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);
     $domain_array = array();
     while ($row = $db->fetch_array($result)) {
         $row['domain'] = $idna_convert->decode($row['domain']);
         $row['aliasdomain'] = $idna_convert->decode($row['aliasdomain']);
         if (filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
             $row['ipandport'] = '[' . $row['ip'] . ']:' . $row['port'];
         } else {
             $row['ipandport'] = $row['ip'] . ':' . $row['port'];
         }
         if (!isset($domain_array[$row['domain']])) {
开发者ID:HobbyNToys,项目名称:SysCP,代码行数:31,代码来源:admin_domains.php

示例13: elseif

} 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++;
        }
        eval("echo \"" . getTemplate("billing/domains_templates") . "\";");
开发者ID:HobbyNToys,项目名称:SysCP,代码行数:31,代码来源:billing_domains_templates.php

示例14: array

 *
 * @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', 'customer');
require './lib/init.php';
if ($page == 'log') {
    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::prepare('
			SELECT * FROM `' . TABLE_PANEL_LOG . '` WHERE `user` = :loginname ' . $paging->getSqlWhere(true) . ' ' . $paging->getSqlOrderBy() . ' ' . $paging->getSqlLimit());
        Database::pexecute($result_stmt, array("loginname" => $userinfo['loginname']));
        $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;
        }
        if ($paging->sortfield == 'date' && $paging->sortorder == 'desc') {
开发者ID:asemen,项目名称:Froxlor,代码行数:31,代码来源:customer_logger.php

示例15: elseif

        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++;
                $row = htmlentities_array($row);
                $row['lastchange'] = date("d.m.y H:i", $row['lastchange']);
                if ($row['status'] >= 0 && $row['status'] <= 2) {
开发者ID:Alkyoneus,项目名称:Froxlor,代码行数:31,代码来源:customer_tickets.php


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