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


PHP sanitize_pageresults函数代码示例

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


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

示例1: array

 if ($vbulletin->options['searchperpage'] < 1) {
     $vbulletin->options['searchperpage'] = 20;
 }
 // trim results down to maximum $vbulletin->options[maxresults]
 if ($vbulletin->options['maxresults'] > 0 and $numitems > $vbulletin->options['maxresults']) {
     $clippedids = array();
     for ($i = 0; $i < $vbulletin->options['maxresults']; $i++) {
         $clippedids[] = $orderedids["{$i}"];
     }
     $orderedids =& $clippedids;
     $numitems = $vbulletin->options['maxresults'];
 }
 // #############################################################################
 // #############################################################################
 // get page split...
 sanitize_pageresults($numitems, $vbulletin->GPC['pagenumber'], $vbulletin->GPC['perpage'], 200, $vbulletin->options['searchperpage']);
 // get list of thread to display on this page
 $startat = ($vbulletin->GPC['pagenumber'] - 1) * $vbulletin->GPC['perpage'];
 $endat = $startat + $vbulletin->GPC['perpage'];
 $itemids = array();
 for ($i = $startat; $i < $endat; $i++) {
     if (isset($orderedids["{$i}"])) {
         $itemids["{$orderedids[$i]}"] = true;
     }
 }
 // #############################################################################
 // do data query
 if (!empty($itemids)) {
     $ids = implode(', ', array_keys($itemids));
     $dataQuery .= '(' . $ids . ')';
     $items = $db->query_read_slave($dataQuery);
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:search.php

示例2: construct_phrase

     if (isset($usergroups["{$optionvalue}"])) {
         $optiontitle = construct_phrase($vbphrase['x_y_requests'], $vbulletin->usergroupcache["{$optionvalue}"]['title'], vb_number_format($usergroups["{$optionvalue}"]));
         $optionselected = iif($optionvalue == $vbulletin->GPC['usergroupid'], 'selected="selected"', '');
         $optionclass = '';
         $usergroupbits .= render_option_template($optiontitle, $optionvalue, $optionselected, $optionclass);
     }
 }
 // set a shortcut to the vbulletin->usergroupcache entry for this group
 $usergroup =& $vbulletin->usergroupcache["{$vbulletin->GPC['usergroupid']}"];
 // initialize $joinrequestbits
 $joinrequestbits = '';
 $numrequests =& $usergroups["{$vbulletin->GPC['usergroupid']}"];
 // if there are some requests for this usergroup, display them
 if ($numrequests > 0) {
     // set defaults
     sanitize_pageresults($numrequests, $vbulletin->GPC['pagenumber'], $vbulletin->GPC['perpage'], 100, 20);
     $startat = ($vbulletin->GPC['pagenumber'] - 1) * $vbulletin->GPC['perpage'];
     $pagenav = construct_page_nav($vbulletin->GPC['pagenumber'], $vbulletin->GPC['perpage'], $numrequests, 'joinrequests.php?' . $vbulletin->session->vars['sessionurl'] . "usergroupid={$vbulletin->GPC['usergroupid']}&amp;pp=" . $vbulletin->GPC['perpage']);
     $requests = $db->query_read_slave("\n\t\t\tSELECT req.*, user.username, IF(user.displaygroupid = 0, user.usergroupid, user.displaygroupid) AS displaygroupid, infractiongroupid\n\t\t\tFROM " . TABLE_PREFIX . "usergrouprequest AS req\n\t\t\tINNER JOIN " . TABLE_PREFIX . "user AS user USING(userid)\n\t\t\tWHERE req.usergroupid = " . $vbulletin->GPC['usergroupid'] . "\n\t\t\tLIMIT {$startat}, " . $vbulletin->GPC['perpage'] . "\n\t\t");
     while ($request = $db->fetch_array($requests)) {
         fetch_musername($request);
         $request['date'] = vbdate($vbulletin->options['dateformat'], $request['dateline'], 1);
         $request['time'] = vbdate($vbulletin->options['timeformat'], $request['dateline']);
         exec_switch_bg();
         ($hook = vBulletinHook::fetch_hook('joinrequest_view_bit')) ? eval($hook) : false;
         $templater = vB_Template::create('joinrequestsbit');
         $templater->register('bgclass', $bgclass);
         $templater->register('request', $request);
         $joinrequestbits .= $templater->render();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:joinrequests.php

示例3: do_get_pms

function do_get_pms()
{
    global $vbulletin, $db, $messagecounters;
    if (!$vbulletin->userinfo['userid']) {
        json_error(ERR_INVALID_LOGGEDIN, RV_NOT_LOGGED_IN);
    }
    $vbulletin->input->clean_array_gpc('r', array('folderid' => TYPE_INT, 'perpage' => TYPE_UINT, 'pagenumber' => TYPE_UINT));
    // Fetch PM unread count
    $result = $db->query_read_slave("\n\tSELECT COUNT(messageread) AS unread\n\tFROM " . TABLE_PREFIX . "pm\n\tWHERE userid = " . $vbulletin->userinfo['userid'] . "\n\tAND messageread = 0");
    $unread = 0;
    if ($row = $db->fetch_array($result)) {
        $unread = $row['unread'];
    }
    $pm_out = array();
    // vBulletin Code Begin
    $folderjump = construct_folder_jump(0, $vbulletin->GPC['folderid']);
    $foldername = $foldernames["{$vbulletin->GPC['folderid']}"];
    // count receipts
    $receipts = $db->query_first_slave("\n\t\tSELECT\n\t\t\tSUM(IF(readtime <> 0, 1, 0)) AS confirmed,\n\t\t\tSUM(IF(readtime = 0, 1, 0)) AS unconfirmed\n\t\tFROM " . TABLE_PREFIX . "pmreceipt\n\t\tWHERE userid = " . $vbulletin->userinfo['userid']);
    // get ignored users
    $ignoreusers = preg_split('#\\s+#s', $vbulletin->userinfo['ignorelist'], -1, PREG_SPLIT_NO_EMPTY);
    $totalmessages = intval($messagecounters["{$vbulletin->GPC['folderid']}"]);
    // build pm counters bar, folder is 100 if we have no quota so red shows on the main bar
    $tdwidth = array();
    $tdwidth['folder'] = $permissions['pmquota'] ? ceil($totalmessages / $permissions['pmquota'] * 100) : 100;
    $tdwidth['total'] = $permissions['pmquota'] ? ceil($vbulletin->userinfo['pmtotal'] / $permissions['pmquota'] * 100) - $tdwidth['folder'] : 0;
    $tdwidth['quota'] = 100 - $tdwidth['folder'] - $tdwidth['total'];
    $show['thisfoldertotal'] = iif($tdwidth['folder'], true, false);
    $show['allfolderstotal'] = iif($tdwidth['total'], true, false);
    $show['pmicons'] = iif($vbulletin->options['privallowicons'], true, false);
    // build navbar
    $navbits[''] = $foldernames["{$vbulletin->GPC['folderid']}"];
    if ($totalmessages == 0) {
        $show['messagelist'] = false;
    } else {
        $show['messagelist'] = true;
        $vbulletin->input->clean_array_gpc('r', array('sort' => TYPE_NOHTML, 'order' => TYPE_NOHTML, 'searchtitle' => TYPE_NOHTML, 'searchuser' => TYPE_NOHTML, 'startdate' => TYPE_UNIXTIME, 'enddate' => TYPE_UNIXTIME, 'searchread' => TYPE_UINT));
        $search = array('sort' => 'sender' == $vbulletin->GPC['sort'] ? 'sender' : ('title' == $vbulletin->GPC['sort'] ? 'title' : 'date'), 'order' => $vbulletin->GPC['order'] == 'asc' ? 'asc' : 'desc', 'searchtitle' => $vbulletin->GPC['searchtitle'], 'searchuser' => $vbulletin->GPC['searchuser'], 'startdate' => $vbulletin->GPC['startdate'], 'enddate' => $vbulletin->GPC['enddate'], 'read' => $vbulletin->GPC['searchread']);
        // make enddate inclusive
        $search['enddate'] = $search['enddate'] ? $search['enddate'] + 86400 : 0;
        $show['openfilter'] = ($search['searchtitle'] or $search['searchuser'] or $search['startdate'] or $search['enddate']);
        $sortfield = 'sender' == $search['sort'] ? 'pmtext.fromusername' : ('title' == $search['sort'] ? 'pmtext.title' : 'pmtext.dateline');
        $desc = $search['order'] == 'desc';
        //($hook = vBulletinHook::fetch_hook('private_messagelist_filter')) ? eval($hook) : false;
        // get a sensible value for $perpage
        sanitize_pageresults($totalmessages, $vbulletin->GPC['pagenumber'], $vbulletin->GPC['perpage'], $vbulletin->options['pmmaxperpage'], $vbulletin->options['pmperpage']);
        // work out the $startat value
        $startat = ($vbulletin->GPC['pagenumber'] - 1) * $vbulletin->GPC['perpage'];
        $perpage = $vbulletin->GPC['perpage'];
        $pagenumber = $vbulletin->GPC['pagenumber'];
        // array to store private messages in period groups
        $pm_period_groups = array();
        $need_sql_calc_rows = ($search['searchtitle'] or $search['searchuser'] or $search['startdate'] or $search['enddate'] or $search['read']);
        $readstatus = array(0 => '', 1 => '= 0', 2 => '> 0', 3 => '< 2', 4 => '= 2');
        $readstatus = $search['read'] == 0 ? '' : 'AND pm.messageread ' . $readstatus[$search['read']];
        // query private messages
        $pms = $db->query_read_slave("\n\t\t\tSELECT " . ($need_sql_calc_rows ? 'SQL_CALC_FOUND_ROWS' : '') . " pm.*, pmtext.*\n\t\t\t\t" . iif($vbulletin->options['privallowicons'], ", icon.title AS icontitle, icon.iconpath") . "\n\t\t\tFROM " . TABLE_PREFIX . "pm AS pm\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "pmtext AS pmtext ON(pmtext.pmtextid = pm.pmtextid)\n\t\t\t" . iif($vbulletin->options['privallowicons'], "LEFT JOIN " . TABLE_PREFIX . "icon AS icon ON(icon.iconid = pmtext.iconid)") . "\n\t\t\tWHERE pm.userid=" . $vbulletin->userinfo['userid'] . " AND pm.folderid=" . $vbulletin->GPC['folderid'] . ($search['searchtitle'] ? " AND pmtext.title LIKE '%" . $vbulletin->db->escape_string($search['searchtitle']) . "%'" : '') . ($search['searchuser'] ? " AND pmtext.fromusername LIKE '%" . $vbulletin->db->escape_string($search['searchuser']) . "%'" : '') . ($search['startdate'] ? " AND pmtext.dateline >= {$search['startdate']}" : '') . ($search['enddate'] ? " AND pmtext.dateline <= {$search['enddate']}" : '') . "\n\t\t\t{$readstatus}\n\t\t\tORDER BY {$sortfield} " . ($desc ? 'DESC' : 'ASC') . "\n\t\t\tLIMIT {$startat}, " . $vbulletin->GPC['perpage'] . "\n\t\t");
        while ($pm = $db->fetch_array($pms)) {
            if ('title' == $search['sort']) {
                $pm_period_groups[fetch_char_group($pm['title'])]["{$pm['pmid']}"] = $pm;
            } else {
                if ('sender' == $search['sort']) {
                    $pm_period_groups["{$pm['fromusername']}"]["{$pm['pmid']}"] = $pm;
                } else {
                    $pm_period_groups[fetch_period_group($pm['dateline'])]["{$pm['pmid']}"] = $pm;
                }
            }
        }
        $db->free_result($pms);
        // ensure other group is last
        if (isset($pm_period_groups['other'])) {
            $pm_period_groups = $desc ? array_merge($pm_period_groups, array('other' => $pm_period_groups['other'])) : array_merge(array('other' => $pm_period_groups['other']), $pm_period_groups);
        }
        // display returned messages
        $show['pmcheckbox'] = true;
        require_once DIR . '/includes/functions_bigthree.php';
        foreach ($pm_period_groups as $groupid => $pms) {
            if ('date' == $search['sort'] and preg_match('#^(\\d+)_([a-z]+)_ago$#i', $groupid, $matches)) {
                $groupname = construct_phrase($vbphrase["x_{$matches['2']}_ago"], $matches[1]);
            } else {
                if ('title' == $search['sort'] or 'date' == $search['sort']) {
                    if ('older' == $groupid and sizeof($pm_period_groups) == 1) {
                        $groupid = 'old_messages';
                    }
                    $groupname = $vbphrase["{$groupid}"];
                } else {
                    $groupname = $groupid;
                }
            }
            $groupid = $vbulletin->GPC['folderid'] . '_' . $groupid;
            $collapseobj_groupid =& $vbcollapse["collapseobj_pmf{$groupid}"];
            $collapseimg_groupid =& $vbcollapse["collapseimg_pmf{$groupid}"];
            $messagesingroup = sizeof($pms);
            $messagelistbits = '';
            foreach ($pms as $pmid => $pm) {
                if (in_array($pm['fromuserid'], $ignoreusers)) {
                    // from user is on Ignore List
                    //eval('$messagelistbits .= "' . fetch_template('pm_messagelistbit_ignore') . '";');
                } else {
                    switch ($pm['messageread']) {
//.........这里部分代码省略.........
开发者ID:0hyeah,项目名称:yurivn,代码行数:101,代码来源:pms.php

示例4: addslashes_js

    }
    $vbphrase['delete_messages_js'] = addslashes_js($vbphrase['delete_messages']);
    $vbphrase['undelete_messages_js'] = addslashes_js($vbphrase['undelete_messages']);
    $vbphrase['approve_messages_js'] = addslashes_js($vbphrase['approve_messages']);
    $vbphrase['unapprove_messages_js'] = addslashes_js($vbphrase['unapprove_messages']);
    $ownerlink = 'member.php?' . $vbulletin->session->vars['sessionurl'] . 'u=' . $group['creatoruserid'];
    eval('$socialgroups_css = "' . fetch_template('socialgroups_css') . '";');
    $templatename = 'socialgroups_group';
}
// #######################################################################
if ($_REQUEST['do'] == 'viewmembers') {
    $vbulletin->input->clean_array_gpc('r', array('perpage' => TYPE_UINT, 'pagenumber' => TYPE_UINT));
    $perpage = $vbulletin->GPC['perpage'];
    $pagenumber = $vbulletin->GPC['pagenumber'];
    $totalmembers = $group['members'];
    sanitize_pageresults($totalmembers, $pagenumber, $perpage);
    $groupmembers = $vbulletin->db->query_read("\n\t\tSELECT userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate,\n\t\t\tIF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, (user.options & " . $vbulletin->bf_misc_useroptions['invisible'] . ") AS invisible,\n\t\t\t" . ($vbulletin->options['avatarenabled'] ? 'avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline, customavatar.width AS avwidth, customavatar.height AS avheight,' : '') . "\n\t\t\tcustomprofilepic.userid AS profilepic, customprofilepic.dateline AS profilepicdateline, customprofilepic.width AS ppwidth, customprofilepic.height AS ppheight,\n\t\t\tuser.icq AS icq, user.aim AS aim, user.yahoo AS yahoo, user.msn AS msn, user.skype AS skype\n\t\tFROM " . TABLE_PREFIX . "socialgroupmember AS socialgroupmember\n\t\tINNER JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = socialgroupmember.userid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON (user.userid = userfield.userid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON (usertextfield.userid = user.userid)\n\t\t" . ($vbulletin->options['avatarenabled'] ? "LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON (avatar.avatarid = user.avatarid) LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON (customavatar.userid = user.userid) " : '') . "\n\t\tLEFT JOIN " . TABLE_PREFIX . "customprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid)\n\t\tWHERE socialgroupmember.groupid = " . $vbulletin->GPC['groupid'] . " AND socialgroupmember.type = 'member'\n\t\tORDER BY user.username\n\t\tLIMIT " . ($pagenumber - 1) * $perpage . ", {$perpage}\n\t");
    require_once DIR . '/includes/functions_bigthree.php';
    while ($groupmember = $vbulletin->db->fetch_array($groupmembers)) {
        $width = 0;
        $height = 0;
        $alt = exec_switch_bg();
        fetch_avatar_from_userinfo($groupmember, true);
        fetch_musername($groupmember);
        $user =& $groupmember;
        fetch_online_status($user, true);
        construct_im_icons($user, true);
        ($hook = vBulletinHook::fetch_hook('group_memberbit')) ? eval($hook) : false;
        eval('$member_list .= "' . fetch_template('memberinfo_small') . '";');
    }
    $navbits = array('group.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['social_groups'], 'group.php?' . $vbulletin->session->vars['sessionurl'] . 'groupid=' . $group['groupid'] => $group['name'], '' => $vbphrase['member_list']);
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:group.php

示例5: print_stop_message

 $totalrep = $count['count'];
 if (!$totalrep) {
     print_stop_message('no_matches_found');
 }
 switch ($vbulletin->GPC['orderby']) {
     case 'leftbyuser':
         $orderbysql = 'leftby_user.username';
         break;
     case 'leftforuser':
         $orderbysql = 'leftfor_user.username';
         break;
     default:
         $orderbysql = 'rep.dateline';
         $orderby = 'dateline';
 }
 sanitize_pageresults($totalrep, $vbulletin->GPC['pagenumber'], $vbulletin->GPC['perpage']);
 $startat = ($vbulletin->GPC['pagenumber'] - 1) * $vbulletin->GPC['perpage'];
 $totalpages = ceil($totalrep / $vbulletin->GPC['perpage']);
 $comments = $db->query_read("\n\t\tSELECT post.postid, rep.userid AS userid, whoadded, rep.reason, rep.dateline, rep.reputationid, rep.reputation,\n\t\t\tleftfor_user.username AS leftfor_username,\n\t\t\tleftby_user.username AS leftby_username,\n\t\t\tpost.title, post.threadid\n\t\tFROM " . TABLE_PREFIX . "reputation AS rep\n\t\tLEFT JOIN " . TABLE_PREFIX . "post AS post ON (rep.postid = post.postid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS leftby_user ON (rep.whoadded = leftby_user.userid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "user AS leftfor_user ON (rep.userid = leftfor_user.userid)\n\t\t{$condition}\n\t\tORDER BY {$orderbysql}\n\t\tLIMIT {$startat}, " . $vbulletin->GPC['perpage']);
 if ($vbulletin->GPC['pagenumber'] != 1) {
     $prv = $vbulletin->GPC['pagenumber'] - 1;
     $firstpage = "<input type=\"button\" class=\"button\" value=\"&laquo; " . $vbphrase['first_page'] . "\" tabindex=\"1\" onclick=\"window.location='adminreputation.php?" . $vbulletin->session->vars['sessionurl'] . "do=dolist" . "&u=" . $vbulletin->GPC['userid'] . "&whoadded=" . $vbulletin->GPC['whoadded'] . "&pp=" . $vbulletin->GPC['perpage'] . "&page=1" . "&startstamp=" . $vbulletin->GPC['start'] . "&endstamp=" . $vbulletin->GPC['end'] . "&orderby=" . $vbulletin->GPC['orderby'] . "'\">";
     $prevpage = "<input type=\"button\" class=\"button\" value=\"&lt; " . $vbphrase['prev_page'] . "\" tabindex=\"1\" onclick=\"window.location='adminreputation.php?" . $vbulletin->session->vars['sessionurl'] . "do=dolist" . "&u=" . $vbulletin->GPC['userid'] . "&whoadded=" . $vbulletin->GPC['whoadded'] . "&pp=" . $vbulletin->GPC['perpage'] . "&page=" . $prv . "&startstamp=" . $vbulletin->GPC['start'] . "&endstamp=" . $vbulletin->GPC['end'] . "&orderby=" . $vbulletin->GPC['orderby'] . "'\">";
 }
 if ($vbulletin->GPC['pagenumber'] != $totalpages) {
     $nxt = $vbulletin->GPC['pagenumber'] + 1;
     $nextpage = "<input type=\"button\" class=\"button\" value=\"" . $vbphrase['next_page'] . " &gt;\" tabindex=\"1\" onclick=\"window.location='adminreputation.php?" . $vbulletin->session->vars['sessionurl'] . "do=dolist" . "&u=" . $vbulletin->GPC['userid'] . "&whoadded=" . $vbulletin->GPC['whoadded'] . "&pp=" . $vbulletin->GPC['perpage'] . "&page=" . $nxt . "&startstamp=" . $vbulletin->GPC['start'] . "&endstamp=" . $vbulletin->GPC['end'] . "&orderby=" . $vbulletin->GPC['orderby'] . "'\">";
     $lastpage = "<input type=\"button\" class=\"button\" value=\"" . $vbphrase['last_page'] . " &raquo;\" tabindex=\"1\" onclick=\"window.location='adminreputation.php?" . $vbulletin->session->vars['sessionurl'] . "do=dolist" . "&u=" . $vbulletin->GPC['userid'] . "&whoadded=" . $vbulletin->GPC['whoadded'] . "&pp=" . $vbulletin->GPC['perpage'] . "&page=" . $totalpages . "&startstamp=" . $vbulletin->GPC['start'] . "&endstamp=" . $vbulletin->GPC['end'] . "&orderby=" . $vbulletin->GPC['orderby'] . "'\">";
 }
 print_form_header('adminreputation', 'dolist');
 print_table_header(construct_phrase($vbphrase['x_reputation_comments_page_y_z'], vb_number_format($totalrep), $vbulletin->GPC['pagenumber'], vb_number_format($totalpages)), 7);
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:adminreputation.php

示例6: array

 // build pm counters bar, folder is 100 if we have no quota so red shows on the main bar
 $tdwidth = array();
 $tdwidth['folder'] = $permissions['pmquota'] ? ceil($totalmessages / $permissions['pmquota'] * 100) : 100;
 $tdwidth['total'] = $permissions['pmquota'] ? ceil($vbulletin->userinfo['pmtotal'] / $permissions['pmquota'] * 100) - $tdwidth['folder'] : 0;
 $tdwidth['quota'] = 100 - $tdwidth['folder'] - $tdwidth['total'];
 $show['thisfoldertotal'] = iif($tdwidth['folder'], true, false);
 $show['allfolderstotal'] = iif($tdwidth['total'], true, false);
 $show['pmicons'] = iif($vbulletin->options['privallowicons'], true, false);
 // build navbar
 $navbits[''] = $foldernames["{$vbulletin->GPC['folderid']}"];
 if ($totalmessages == 0) {
     $show['messagelist'] = false;
 } else {
     $show['messagelist'] = true;
     // get a sensible value for $perpage
     sanitize_pageresults($totalmessages, $vbulletin->GPC['pagenumber'], $vbulletin->GPC['perpage'], $vbulletin->options['pmmaxperpage'], $vbulletin->options['pmperpage']);
     // work out the $startat value
     $startat = ($vbulletin->GPC['pagenumber'] - 1) * $vbulletin->GPC['perpage'];
     // array to store private messages in period groups
     $pm_period_groups = array();
     // query private messages
     $pms = $db->query_read_slave("\n\t\t\tSELECT pm.*, pmtext.*\n\t\t\t\t" . iif($vbulletin->options['privallowicons'], ", icon.title AS icontitle, icon.iconpath") . "\n\t\t\tFROM " . TABLE_PREFIX . "pm AS pm\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "pmtext AS pmtext ON(pmtext.pmtextid = pm.pmtextid)\n\t\t\t" . iif($vbulletin->options['privallowicons'], "LEFT JOIN " . TABLE_PREFIX . "icon AS icon ON(icon.iconid = pmtext.iconid)") . "\n\t\t\tWHERE pm.userid=" . $vbulletin->userinfo['userid'] . " AND pm.folderid=" . $vbulletin->GPC['folderid'] . "\n\t\t\tORDER BY pmtext.dateline DESC\n\t\t\tLIMIT {$startat}, " . $vbulletin->GPC['perpage'] . "\n\t\t");
     while ($pm = $db->fetch_array($pms)) {
         $pm_period_groups[fetch_period_group($pm['dateline'])]["{$pm['pmid']}"] = $pm;
     }
     $db->free_result($pms);
     // display returned messages
     $show['pmcheckbox'] = true;
     require_once DIR . '/includes/functions_bigthree.php';
     foreach ($pm_period_groups as $groupid => $pms) {
         if (preg_match('#^(\\d+)_([a-z]+)_ago$#i', $groupid, $matches)) {
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:private.php

示例7: eval

     if ($vbulletin->options['ecdownloads_tops']) {
         eval('$dpanel = "' . fetch_template('downloads_panel_side') . '";');
         eval('$dmain .= "' . fetch_template('downloads_wrapper_side') . '";');
     } else {
         eval('$dmain .= "' . fetch_template('downloads_wrapper_top') . '";');
     }
 } else {
     if ($_GET['do'] == 'my') {
         $navbits['downloads.php?do=my'] = $vbphrase['ecdownloads_my_files'];
         $dlcustomtitle = $vbphrase['ecdownloads_my_files'];
         // check for category permissions
         $filesexclude = $dl->exclude_files();
         $temp = $db->query_first("SELECT COUNT(*) AS files FROM " . TABLE_PREFIX . "dl_files WHERE " . $filesexclude . " `uploaderid` = " . $vbulletin->userinfo['userid']);
         if ($temp['files'] > 0) {
             $pagenumber = $vbulletin->input->clean_gpc('r', 'pagenumber', TYPE_UINT);
             sanitize_pageresults($temp['files'], $pagenumber, $dl->perpage, $dl->perpage, $dl->perpage);
             $limit = ($pagenumber - 1) * $dl->perpage;
             $navigation = construct_page_nav($pagenumber, $dl->perpage, $temp['files'], 'downloads.php?' . $vbulletin->session->vars['sessionurl'] . 'do=my');
             $result = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "dl_files WHERE " . $filesexclude . " `uploaderid` = " . $vbulletin->userinfo['userid'] . " LIMIT " . $limit . "," . $dl->perpage);
             while ($file = $db->fetch_array($result)) {
                 $date = vbdate($vbulletin->options['dateformat'], $file['date'], true);
                 if ($file['rating'] <= 0) {
                     $grade = $vbphrase['ecdownloads_not_rated'];
                 } else {
                     if ($file['rating'] > 9.6) {
                         $grade = "A+";
                     } else {
                         if ($file['rating'] > 9.300000000000001) {
                             $grade = "A";
                         } else {
                             if ($file['rating'] > 8.9) {
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:downloads.php

示例8: eval

         break;
     default:
         $handled = false;
         ($hook = vBulletinHook::fetch_hook('moderation_posts_sort')) ? eval($hook) : false;
         if (!$handled) {
             $sqlsortfield = 'post.dateline';
             $sortfield = 'dateline';
         }
 }
 $sort = array($sortfield => 'selected="selected"');
 $hook_query_fields = $hook_query_joins = $hook_query_where = '';
 ($hook = vBulletinHook::fetch_hook('moderation_postsquery_postscount')) ? eval($hook) : false;
 $postscount = $db->query_first_slave("\n\t\tSELECT COUNT(*) AS posts\n\t\t{$hook_query_fields}\n\t\t{$postfrom}\n\t\t{$hook_query_joins}\n\t\tINNER JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)\n\t\tWHERE type = '{$posttype}'\n\t\t\tAND forumid IN (" . implode(', ', $modforums) . ")\n\t\t\t{$datecut}\n\t\t\t{$hook_query_where}\n\t");
 $totalposts = $postscount['posts'];
 // set defaults
 sanitize_pageresults($totalposts, $pagenumber, $perpage, 200, 4);
 // display posts
 $limitlower = ($pagenumber - 1) * $perpage;
 $limitupper = $pagenumber * $perpage;
 if ($limitupper > $totalposts) {
     $limitupper = $totalposts;
     if ($limitlower > $totalposts) {
         $limitlower = $totalposts - $perpage - 1;
     }
 }
 if ($limitlower < 0) {
     $limitlower = 0;
 }
 if ($totalposts) {
     $hook_query_fields = $hook_query_joins = $hook_query_where = '';
     ($hook = vBulletinHook::fetch_hook('moderation_postsquery_postid')) ? eval($hook) : false;
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:moderation.php

示例9: do_get_forum


//.........这里部分代码省略.........
                break;
                // else, use last post
            // else, use last post
            default:
                $handled = false;
                if (!$handled) {
                    $sqlsortfield = 'lastpost';
                    $sortfield = 'lastpost';
                }
        }
        $sort = array($sortfield => 'selected="selected"');
        $visiblethreads = " AND visible = 1";
        /*if (!can_moderate($forumid, 'canmoderateposts'))
            	{
            		if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canseedelnotice']))
            		{
            			$visiblethreads = " AND visible = 1 ";
            		}
            		else
            		{
            			$visiblethreads = " AND visible IN (1,2)";
            		}
            	}
            	else
            	{
            		$visiblethreads = " AND visible IN (0,1,2)";
        	}*/
        $hook_query_fields = $hook_query_joins = $hook_query_where = '';
        # Include visible IN (0,1,2) in order to hit upon the 4 column index
        $threadscount = $db->query_first_slave("\n    \t\tSELECT COUNT(*) AS threads, SUM(IF(thread.lastpost > {$lastread} AND open <> 10, 1, 0)) AS newthread\n    \t\t{$hook_query_fields}\n    \t\tFROM " . TABLE_PREFIX . "thread AS thread\n    \t\t{$tachyjoin}\n    \t\t{$hook_query_joins}\n    \t\tWHERE forumid = {$foruminfo['forumid']}\n    \t\t\tAND sticky = 0\n    \t\t\t{$prefix_filter}\n    \t\t\t{$visiblethreads}\n    \t\t\t{$globalignore}\n    \t\t\t{$limitothers}\n    \t\t\t{$datecut}\n    \t\t\t{$hook_query_where}\n    \t");
        $totalthreads = $threadscount['threads'];
        $newthreads = $threadscount['newthread'];
        // set defaults
        sanitize_pageresults($totalthreads, $pagenumber, $perpage, 200, $vbulletin->options['maxthreads']);
        // get number of sticky threads for the first page
        // on the first page there will be the sticky threads PLUS the $perpage other normal threads
        // not quite a bug, but a deliberate feature!
        if ($pagenumber == 1) {
            $stickies = $db->query_read_slave("\n    \t\t\tSELECT thread.threadid, lastpost, open\n    \t\t\tFROM " . TABLE_PREFIX . "thread AS thread\n    \t\t\tWHERE forumid = {$foruminfo['forumid']}\n    \t\t\t\tAND sticky = 1\n    \t\t\t\t{$prefix_filter}\n    \t\t\t\t{$visiblethreads}\n    \t\t\t\t{$limitothers}\n    \t\t\t\t{$globalignore}\n    \t\t");
            while ($thissticky = $db->fetch_array($stickies)) {
                $stickycount++;
                if ($thissticky['lastpost'] >= $lastread and $thissticky['open'] != 10) {
                    $newthreads++;
                }
                $stickyids .= ",{$thissticky['threadid']}";
            }
            $db->free_result($stickies);
            unset($thissticky, $stickies);
        }
        $limitlower = ($pagenumber - 1) * $perpage;
        $limitupper = $pagenumber * $perpage;
        if ($limitupper > $totalthreads) {
            $limitupper = $totalthreads;
            if ($limitlower > $totalthreads) {
                $limitlower = $totalthreads - $perpage - 1;
            }
        }
        if ($limitlower < 0) {
            $limitlower = 0;
        }
        if ($foruminfo['allowratings']) {
            $vbulletin->options['showvotes'] = intval($vbulletin->options['showvotes']);
            $votequery = "\n    \t\t\tIF(votenum >= " . $vbulletin->options['showvotes'] . ", votenum, 0) AS votenum,\n    \t\t\tIF(votenum >= " . $vbulletin->options['showvotes'] . " AND votenum > 0, votetotal / votenum, 0) AS voteavg,\n    \t\t";
        } else {
            $votequery = '';
        }
开发者ID:0hyeah,项目名称:yurivn,代码行数:67,代码来源:get_forum.php

示例10: COUNT

 } else {
     if ($_GET['approval'] == '1') {
         $approval = ' AND modqueue = 0';
         $params .= '&amp;approval=1';
         $cleanapprove = 1;
     } else {
         $approval = '';
         $cleanapprove = 1;
     }
 }
 $temp = $db->query_first("SELECT COUNT(*) AS files FROM " . TABLE_PREFIX . "dl2_files WHERE {$filesexclude} " . $category . $pin . $approval);
 $cleanpin = $vbulletin->input->clean_gpc('r', 'pin', TYPE_UINT);
 $cleancatid = $vbulletin->input->clean_gpc('r', 'category', TYPE_UINT);
 // $cleanapprove = $vbulletin->input->clean_gpc('r', 'approval', TYPE_UINT);
 $pagenumber = $vbulletin->input->clean_gpc('r', 'pagenumber', TYPE_UINT);
 sanitize_pageresults($temp['files'], $pagenumber, $vbulletin->options['dl2perpage'], $vbulletin->options['dl2perpage'], $vbulletin->options['dl2perpage']);
 $limit = ($pagenumber - 1) * $vbulletin->options['dl2perpage'];
 $pagenav = construct_page_nav($pagenumber, $vbulletin->options['dl2perpage'], $temp['files'], "downloads.php?" . $vbulletin->session->vars['sessionurl'] . "do=manfiles&amp;pin={$cleanpin}&amp;approval={$cleanapprove}", "" . (!empty($cleancatid) ? "&amp;category={$cleancatid}" : ""));
 $params .= '&amp;page=' . $pagenumber;
 $result = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "dl2_files WHERE {$filesexclude} " . $category . $pin . $approval . " ORDER BY `id` DESC LIMIT {$limit}, " . $vbulletin->options['dl2perpage']);
 if ($db->num_rows($result) > 0) {
     while ($file = $db->fetch_array($result)) {
         exec_switch_bg();
         $file['title'] = htmlspecialchars_uni($file['title']);
         if ($file['modqueue'] == 0) {
             $info = ' <span style="color: blue;">' . $vbphrase['dl2_approved'] . '</span>';
         } else {
             $info = ' <span style="color: red;">' . $vbphrase['dl2_unapproved'] . '</span>';
         }
         if ($file['pin'] == 1) {
             $info .= ', ' . $vbphrase['dl2_pinned'];
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:downloads.php

示例11: IN

     $photoplog_where_sql = 'WHERE 1=0';
     if (!empty($photoplog_album_fileids)) {
         $photoplog_where_sql = 'WHERE fileid IN (' . implode(',', $photoplog_album_fileids) . ')';
     }
     $db->free_result($photoplog_album_info);
 }
 $photoplog_catid_sql = '';
 if ($photoplog_catid_default && !in_array($photoplog_catid_default, $photoplog_perm_not_allowed_bits)) {
     $photoplog_catid_link = '&amp;cid=' . intval($photoplog_catid_default);
     $photoplog_catid_sql = 'AND catid = ' . intval($photoplog_catid_default);
 }
 ($hook = vBulletinHook::fetch_hook('photoplog_selector_sql')) ? eval($hook) : false;
 $photoplog_file_info = $db->query_first_slave("SELECT COUNT(*) AS cnt1\r\n\t\tFROM " . PHOTOPLOG_PREFIX . "photoplog_fileuploads\r\n\t\t{$photoplog_where_sql}\r\n\t\t{$photoplog_catid_sql}\r\n\t");
 $photoplog_file_tot = intval($photoplog_file_info['cnt1']);
 $db->free_result($photoplog_file_info);
 sanitize_pageresults($photoplog_file_tot, $photoplog_page_num, $photoplog_per_page, 5, 5);
 $photoplog_limit_lower = ($photoplog_page_num - 1) * $photoplog_per_page;
 if ($photoplog_limit_lower < 0) {
     $photoplog_limit_lower = 0;
 }
 $photoplog_limit_lower = intval($photoplog_limit_lower);
 $photoplog_per_page = intval($photoplog_per_page);
 $photoplog_file_infos = $db->query_read_slave("SELECT fileid,userid,filename\r\n\t\t\tFROM " . PHOTOPLOG_PREFIX . "photoplog_fileuploads\r\n\t\t\t{$photoplog_where_sql}\r\n\t\t\t{$photoplog_catid_sql}\r\n\t\t\tORDER BY dateline DESC\r\n\t\t\tLIMIT {$photoplog_limit_lower},{$photoplog_per_page}\r\n\t");
 $photoplog_sort_url = $photoplog['location'] . '/selector.php?' . $vbulletin->session->vars['sessionurl'] . 'do=view' . $photoplog_catid_link . $photoplog_albumid_link . '&amp;e=' . urlencode($photoplog_editorid);
 $photoplog['pagenav'] = construct_page_nav($photoplog_page_num, $photoplog_per_page, $photoplog_file_tot, $photoplog_sort_url);
 $photoplog_cnt = 0;
 $photoplog_selector_bits = '';
 $photoplog_bbcode_link = $vbulletin->options['photoplog_bbcode_link'];
 while ($photoplog_file_info = $db->fetch_array($photoplog_file_infos)) {
     $photoplog_cnt++;
     $photoplog['fileid'] = intval($photoplog_file_info['fileid']);
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:selector.php

示例12: count

             }
         }
     }
 }
 $db->free_result($photoplog_file_infos);
 $photoplog_search_tot = count($photoplog_fid_bits);
 $photoplog_catbit_info = array();
 $photoplog_catbit_subcats = '';
 if (!$photoplog_search_tot) {
     photoplog_output_page('photoplog_error_page', $vbphrase['photoplog_error'], $vbphrase['photoplog_no_results']);
 }
 $photoplog_numcat_thumbs = intval($vbulletin->options['photoplog_numcat_thumbs']);
 if ($photoplog_numcat_thumbs < 1) {
     photoplog_output_page('photoplog_error_page', $vbphrase['photoplog_error'], $vbphrase['photoplog_no_results']);
 }
 sanitize_pageresults($photoplog_search_tot, $photoplog_page_num, $photoplog_per_page, $photoplog_numcat_thumbs, $photoplog_numcat_thumbs);
 $photoplog_search_limit_lower = ($photoplog_page_num - 1) * $photoplog_per_page;
 if ($photoplog_search_limit_lower < 0) {
     $photoplog_search_limit_lower = 0;
 }
 $photoplog_search_limit_lower = intval($photoplog_search_limit_lower);
 $photoplog_per_page = intval($photoplog_per_page);
 $photoplog['fid_list'] = implode(",", $photoplog_fid_bits);
 $photoplog_last_comment_ids_list = "0";
 if ($photoplog_last_comment_ids) {
     $photoplog_last_comment_ids_list = implode(",", $photoplog_last_comment_ids);
 }
 $photoplog_file_infos = $db->query_read_slave("SELECT catid, fileid, userid, username, title,\r\n\t\t\tdescription, filename, filesize, dimensions, dateline, views, moderate,\r\n\t\t{$photoplog_admin_sql4}\r\n\t\tFROM " . PHOTOPLOG_PREFIX . "photoplog_fileuploads\r\n\t\tWHERE fileid IN (" . $photoplog['fid_list'] . ")\r\n\t\t{$photoplog_catid_sql1}\r\n\t\t{$photoplog_admin_sql1}\r\n\t\t{$photoplog_searchorderoption_sql}\r\n\t\tLIMIT {$photoplog_search_limit_lower},{$photoplog_per_page}\r\n\t");
 $photoplog_sort_url = $photoplog['location'] . '/search.php?' . $vbulletin->session->vars['sessionurl'] . 'do=view' . $photoplog_search_pagination_link;
 $photoplog['pagenav'] = construct_page_nav($photoplog_page_num, $photoplog_per_page, $photoplog_search_tot, $photoplog_sort_url, '');
 $photoplog_last_comment_infos = $db->query_read_slave("SELECT fileid,\r\n\t\t\tuserid, username, title, dateline, commentid\r\n\t\tFROM " . PHOTOPLOG_PREFIX . "photoplog_ratecomment\r\n\t\tWHERE commentid IN (" . $photoplog_last_comment_ids_list . ")\r\n\t\t{$photoplog_catid_sql2}\r\n\t\t{$photoplog_admin_sql2}\r\n\t\tAND comment != ''\r\n\t\tORDER BY dateline DESC\r\n\t");
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:search.php

示例13: COUNT

 }
 if ($vbulletin->GPC['next']) {
     $pagenumber = $vbulletin->GPC['pagenumber'] + 1;
     $vbulletin->GPC['pagenumber'] = $pagenumber;
 } else {
     if ($vbulletin->GPC['previous']) {
         $pagenumber = $vbulletin->GPC['pagenumber'] - 1;
         $vbulletin->GPC['pagenumber'] = $pagenumber;
     }
 }
 if ($vbulletin->GPC['marketid'] > 0) {
     $grabitem = $vbulletin->GPC['marketid'];
 }
 $cel_users = $db->query_first("\r\n    SELECT COUNT('tranid') AS users_donate\r\n    FROM " . TABLE_PREFIX . "market_transactions AS market_transactions\r\n    WHERE gift_customid='{$grabitem}'\r\n");
 // Sanitize for points user has stolen
 sanitize_pageresults($cel_users['users_stolen'], $pagenumber, $perpage, 100, 20);
 if ($vbulletin->GPC['pagenumber'] < 1) {
     $vbulletin->GPC['pagenumber'] = 1;
 } else {
     if ($vbulletin->GPC['pagenumber'] > ceil(($cel_users['users_donate'] + 1) / $perpage)) {
         $vbulletin->GPC['pagenumber'] = ceil(($cel_users['users_donate'] + 1) / $perpage);
     }
 }
 $limitlower = ($vbulletin->GPC['pagenumber'] - 1) * $perpage;
 $limitupper = $vbulletin->GPC['pagenumber'] * $perpage;
 print_cp_header($vbphrase['market_history_header']);
 print_form_header('market', 'itemcustomgifthistory');
 print_table_header($vbphrase['market_history_header'], 6);
 print_description_row($vbphrase['market_history_description'], 0, 6);
 construct_hidden_code('pagenumber', $vbulletin->GPC['pagenumber']);
 construct_hidden_code('marketid', $grabitem);
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:market.php

示例14: USING

		FROM " . TABLE_PREFIX . "user AS user
		" . ($include_userfield_join ? "LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield USING (userid)" : '') . "
		$hook_query_joins
		WHERE $condition
			AND (user.usergroupid IN ($ids)" . (defined('MEMBERLIST_INCLUDE_SECONDARY') ? (" OR FIND_IN_SET(" . implode(', user.membergroupids) OR FIND_IN_SET(', $idarray) . ", user.membergroupids)") : '') . ")
			$hook_query_where
	");
	$totalusers = $userscount['users'];

	if (!$totalusers)
	{
		eval(standard_error(fetch_error('searchnoresults', $displayCommon)));
	}

	// set defaults
	sanitize_pageresults($totalusers, $pagenumber, $perpage, 100, $vbulletin->options['memberlistperpage']);

	$sortaddon = ($vbulletin->GPC['postslower']) ? 'postslower=' . $vbulletin->GPC['postslower'] . '&amp;' : '';
	$sortaddon .= ($vbulletin->GPC['postsupper']) ? 'postsupper=' . $vbulletin->GPC['postsupper'] . '&amp;' : '';
	$sortaddon .= ($vbulletin->GPC['ausername'] != '') ? 'ausername=' . urlencode($vbulletin->GPC['ausername']) . '&amp;' : '';
	$sortaddon .= ($vbulletin->GPC['homepage'] != '') ? 'homepage=' . urlencode($vbulletin->GPC['homepage']) . '&amp;' : '';
	$sortaddon .= ($vbulletin->GPC['icq'] != '') ? 'icq=' . urlencode($vbulletin->GPC['icq']) . '&amp;' : '';
	$sortaddon .= ($vbulletin->GPC['aim'] != '') ? 'aim=' . urlencode($vbulletin->GPC['aim']) . '&amp;' : '';
	$sortaddon .= ($vbulletin->GPC['yahoo'] != '') ? 'yahoo=' . urlencode($vbulletin->GPC['yahoo']) . '&amp;' : '';
	$sortaddon .= ($vbulletin->GPC['msn'] != '') ? 'msn=' . urlencode($vbulletin->GPC['msn']) . '&amp;' : '';
	$sortaddon .= ($vbulletin->GPC['skype'] != '') ? 'skype=' . urlencode($vbulletin->GPC['skype']) . '&amp;' : '';
	$sortaddon .= ($vbulletin->GPC['joindateafter'] != '') ? 'joindateafter=' . urlencode($vbulletin->GPC['joindateafter']) . '&amp;' : '';
	$sortaddon .= ($vbulletin->GPC['joindatebefore'] != '') ? 'joindatebefore=' . urlencode($vbulletin->GPC['joindatebefore']) . '&amp;' : '';
	$sortaddon .= ($vbulletin->GPC['lastpostafter'] != '') ? 'lastpostafter=' . urlencode($vbulletin->GPC['lastpostafter']) . '&amp;' : '';
	$sortaddon .= ($vbulletin->GPC['lastpostbefore'] != '') ? 'lastpostbefore=' . urlencode($vbulletin->GPC['lastpostbefore']) . '&amp;' : '';
	$sortaddon .= ($usergroupid) ? 'usergroupid=' . $usergroupid . '&amp;' : '';
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:memberlist.php

示例15: number_format

             }
             if (!empty($row['Fourth_ET']) and !empty($row['Fourth_MPH'])) {
                 $row['Fourth_ET'] = number_format($row['Fourth_ET'], 3, '.', ',') . " @ " . number_format($row['Fourth_MPH'], 2, '.', ',') . " mph";
             }
             if (!empty($row['Sixty'])) {
                 $row['Sixty'] = number_format($row['Sixty'], 3, '.', ',');
             } else {
                 $row['Sixty'] = '';
             }
             $queue[] = array('id' => $row['ID'], 'car_id' => $row['Car_ID'], 'car_name' => get_vehicle_name($row['Car_ID']), 'driver_id' => $row['Owner'], 'driver' => get_driver_name($row['Owner']), 'date' => date("M d, Y", strtotime($row['Date'])), 'trackid' => $row['Track'], 'track' => get_track_name($row['Track']), '60ft' => $row['Sixty'], '8et' => $row['Eighth_ET'], '4et' => $row['Fourth_ET']);
         }
         $pagenav = construct_page_nav($vbulletin->GPC['pagenumber'], $perpage, $slips_count['slip_count'], 'slips.php?v=' . $vbulletin->GPC['v'] . '' . $vbulletin->session->vars['sessionurl']);
     }
 } else {
     $slips_count = $db->query_first("SELECT COUNT('ID') AS slip_count FROM " . TABLE_PREFIX . "dso_slips");
     sanitize_pageresults($slips_count['slip_count'], $pagenumber, $perpage, 100, $vbulletin->options['dso_slips_perpage_slips']);
     if ($vbulletin->GPC['pagenumber'] < 1) {
         $vbulletin->GPC['pagenumber'] = 1;
     } else {
         if ($vbulletin->GPC['pagenumber'] > ceil(($slips_count['slip_count'] + 1) / $perpage)) {
             $vbulletin->GPC['pagenumber'] = ceil(($slips_count['slip_count'] + 1) / $perpage);
         }
     }
     $limitlower = ($vbulletin->GPC['pagenumber'] - 1) * $perpage;
     $limitupper = $vbulletin->GPC['pagenumber'] * $perpage;
     $slipsqueue = $db->query_read("SELECT ID,Car_ID,Owner,Date,Track,Sixty,Eighth_ET,Eighth_MPH,Fourth_ET,Fourth_MPH FROM " . TABLE_PREFIX . "dso_slips ORDER BY Date DESC LIMIT {$limitlower}, {$perpage}");
     if ($db->num_rows($slipsqueue) == 0) {
         eval(standard_error(fetch_error('slipsqueue_noslips')));
     } else {
         while ($row = $db->fetch_array($slipsqueue)) {
             if (!empty($row['Eighth_ET']) and !empty($row['Eighth_MPH'])) {
开发者ID:Dragonsys,项目名称:dso_tso,代码行数:31,代码来源:slips.php


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