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


PHP db_simpleSelect函数代码示例

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


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

示例1: load_header

            //inserted post successfully
        } else {
            $errorMSG = $l_antiSpam;
            $correctErr = $backErrorLink;
            $title .= $l_antiSpam;
            echo load_header();
            echo ParseTpl(makeUp('main_warning'));
            return;
        }
    } else {
        $errorMSG = $l_forbidden;
        $correctErr = $backErrorLink;
        $title .= $l_forbidden;
        echo load_header();
        echo ParseTpl(makeUp('main_warning'));
        return;
    }
    if (isset($themeDesc) and in_array($topic, $themeDesc)) {
        $anchor = 1;
    } else {
        $totalPosts = db_simpleSelect(0, $Tt, 'posts_count', 'topic_id', '=', $topic);
        $vmax = $viewmaxreplys;
        $anchor = $totalPosts[0];
        if ($anchor > $vmax) {
            $anchor = $totalPosts[0] - floor($totalPosts[0] / $vmax) * $vmax;
            if ($anchor == 0) {
                $anchor = $vmax;
            }
        }
    }
}
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:31,代码来源:bb_func_pthread.php

示例2: user_logged_in

function user_logged_in()
{
    if (isset($GLOBALS['cook']) and trim($GLOBALS['cook']) != '') {
        $c = explode('|', $GLOBALS['cook']);
    } elseif (isset($_SESSION['minimalistBBSession'])) {
        $c = explode('|', $_SESSION['minimalistBBSession']);
    } else {
        $c = getMyCookie();
    }
    $username = $c[0];
    $userpassword = $c[1];
    $exptime = $c[2];
    $returned = FALSE;
    $resetCookie = FALSE;
    if ($username == '') {
        $returned = FALSE;
        return;
    }
    $GLOBALS['user_usr'] = $username;
    $pasttime = $exptime - time();
    if ($username == $GLOBALS['admin_usr'] and $userpassword == md5($GLOBALS['admin_pwd'])) {
        $returned = TRUE;
        $GLOBALS['logged_user'] = 0;
        $GLOBALS['logged_admin'] = 1;
        $GLOBALS['user_id'] = 1;
        if ($row = db_simpleSelect(0, $GLOBALS['Tu'], $GLOBALS['dbUserSheme']['user_sorttopics'][1] . ',' . $GLOBALS['dbUserSheme']['language'][1], $GLOBALS['dbUserId'], '=', 1)) {
            $GLOBALS['user_sort'] = $row[0];
        }
        $GLOBALS['langu'] = $row[1];
        if ($pasttime <= $GLOBALS['cookie_renew']) {
            // if expiration time of cookie is less than defined in setup, we redefine it below
            $resetCookie = TRUE;
        }
    } elseif ($userpassword != '' and $row = db_simpleSelect(0, $GLOBALS['Tu'], $GLOBALS['dbUserId'] . ',' . $GLOBALS['dbUserSheme']['user_sorttopics'][1] . ',' . $GLOBALS['dbUserSheme']['language'][1] . ',' . $GLOBALS['dbUserAct'], $GLOBALS['dbUserId'], '=', $GLOBALS['USER']->user_id, '', 1)) {
        $returned = TRUE;
        $GLOBALS['user_id'] = $row[0];
        $GLOBALS['user_sort'] = $row[1];
        $GLOBALS['logged_user'] = 1;
        $GLOBALS['logged_admin'] = 0;
        $GLOBALS['langu'] = $row[2];
        $GLOBALS['user_activity'] = $row[3];
        //modify based on geograph user status
        global $USER;
        if ($USER->hasPerm('admin')) {
            $GLOBALS['logged_user'] = 0;
            $GLOBALS['logged_admin'] = 1;
        }
        if ($pasttime <= $GLOBALS['cookie_renew']) {
            $resetCookie = TRUE;
        }
    } else {
        $returned = FALSE;
        if ($pasttime <= $GLOBALS['cookie_renew']) {
            $userpassword = '';
            $resetCookie = TRUE;
        }
    }
    if ($resetCookie) {
        deleteMyCookie();
        setMyCookie($username, $userpassword, $GLOBALS['cookieexptime']);
    }
    return $returned;
}
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:63,代码来源:bb_cookie.php

示例3: getClForums

            $ordb = 'topic_id';
            $ordSql = 'ASC';
        }
        $xtr = getClForums($lPosts, 'where', '', $ordb, 'or', '=');
    } else {
        $xtr = '';
    }
    if ($xtr != '') {
        if ($row = db_simpleSelect(0, $Tp, 'poster_id, poster_name, post_time, topic_id, post_text, post_id', '', '', '', 'post_id ' . $ordSql)) {
            do {
                if (!isset($pVals[$row[3]])) {
                    $pVals[$row[3]] = array($row[0], $row[1], $row[2], $row[4], $row[5]);
                } else {
                    continue;
                }
            } while ($row = db_simpleSelect(1));
        }
    }
}
$list_topics = '';
unset($result);
$i = 1;
if (!isset($startPageModern) or !$startPageModern) {
    $tpl = makeUp('main_last_discuss_cell');
} else {
    $tpl = makeUp('main_modern_lcell');
}
foreach ($colls as $cols) {
    $forum = $cols[5];
    $numReplies = $cols[6];
    if ($numReplies >= 1) {
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:bb_func_ldisc.php

示例4: Copyright

<?php

/*
This file is part of miniBB. miniBB is free discussion forums/message board software, without any warranty. See COPYING file for more details. Copyright (C) 2004 Paul Puzyrev, Sergei Larionov. www.minibb.net
*/
if (!defined('INCLUDED776')) {
    die('Fatal error.');
}
if ($logged_admin == 1 or $isMod == 1) {
    if ($res = db_simpleSelect(0, $Tt, 'topic_id', 'topic_id', '>', $topic, '', '', 'forum_id', '=', $forum)) {
        $h = $res[0];
    } else {
        $h = 0;
    }
    if ($h == 0) {
        $return = 0;
    } else {
        $numRows = $countRes;
        $rP = $numRows / $viewmaxtopic;
        $rPInt = floor($numRows / $viewmaxtopic);
        $return = $rPInt;
        if ($rP == $rPInt) {
            $return -= 1;
        }
    }
    db_delete($Ts, 'topic_id', '=', $topic);
    $topicsDel = db_delete($Tt, 'topic_id', '=', $topic, 'forum_id', '=', $forum);
    $postsDel = db_delete($Tp, 'topic_id', '=', $topic, 'forum_id', '=', $forum);
    $postsDel--;
    db_forumReplies($forum, $Tp, $Tf);
    db_forumTopics($forum, $Tt, $Tf);
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:31,代码来源:bb_func_deltopic.php

示例5: db_simpleSelect

     $post += 0;
     if (!isset($poster_id)) {
         $rww = db_simpleSelect(0, $Tp, 'poster_id', 'post_id', '=', $post);
         $poster_id = $rww[0];
     }
     db_delete($Tp, 'post_id', '=', $post);
     if ($poster_id != 0) {
         db_calcAmount($Tp, 'poster_id', $poster_id, $Tu, $dbUserSheme['num_posts'][1], $dbUserId);
     }
     //}
     if (file_exists($pathToFiles . 'bb_plugins2.php')) {
         require $pathToFiles . 'bb_plugins2.php';
     }
 }
 // deletion cycle
 if ($pp = db_simpleSelect(0, $Tp, 'post_id, post_time, poster_name', 'topic_id', '=', $topic, 'post_id DESC', 1)) {
     $topic_last_post_id = $pp[0];
     $topic_last_post_time = $pp[1];
     $topic_last_poster = $pp[2];
     updateArray(array('topic_last_post_id', 'topic_last_post_time', 'topic_last_poster'), $Tt, 'topic_id', $topic);
     db_calcAmount($Tp, 'forum_id', $forum, $Tf, 'posts_count');
     db_calcAmount($Tp, 'topic_id', $topic, $Tt, 'posts_count');
     if (defined('DELETE_PREMOD')) {
         return;
     }
     //CSRF cookie delete
     setcookie($cookiename . 'csrf', '', time() - 2592000, $cookiepath, $cookiedomain, $cookiesecure);
     if (isset($metaLocation)) {
         $meta_relocate = "{$main_url}/{$indexphp}action=vthread&forum={$forum}&topic={$topic}&page={$page}";
         echo ParseTpl(makeUp($metaLocation));
         exit;
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:bb_func_delmsg.php

示例6: switch

     $login = $user_usr;
 }
 $userTitle = $l_newUserRegister;
 switch ($step) {
     case 1:
         if (isset($closeRegister) and $closeRegister == 1) {
             $_POST['passwd'] = substr(ereg_replace("[^0-9A-Za-z]", "A", md5(uniqid(rand()))), 0, 8);
             $_POST['passwd2'] = $_POST['passwd'];
         }
         require $pathToFiles . 'bb_func_usrdat.php';
         if ($DB == 'mysql' or $DB == 'pgsql') {
             $case = 'lower';
         } elseif ($DB == 'mssql') {
             $case = 'lcase';
         }
         if (db_simpleSelect(0, $Tu, $dbUserId, $dbUserId, '=', 1) and !db_simpleSelect(0, $Tu, $dbUserId, $case . "({$dbUserSheme['username'][1]})", '=', strtolower(${$dbUserSheme['username'][1]})) and !db_simpleSelect(0, $Tu, $dbUserId, $dbUserSheme['user_email'][1], '=', ${$dbUserSheme['user_email'][1]}) and ${$dbUserSheme['username'][1]} != $admin_usr and ${$dbUserSheme['user_email'][1]} != $admin_email) {
             $act = 'reg';
             require $pathToFiles . 'bb_func_checkusr.php';
             if ($correct == 0) {
                 ${$dbUserDate} = 'now()';
                 ${$dbUserSheme['user_password'][1]} = md5(${$dbUserSheme['user_password'][1]});
                 if (isset($registerInactiveUsers) and $registerInactiveUsers) {
                     ${$dbUserAct} = 0;
                 } else {
                     ${$dbUserAct} = 1;
                 }
                 $ins = insertArray(array($dbUserSheme['username'][1], $dbUserDate, $dbUserSheme['user_password'][1], $dbUserSheme['user_email'][1], $dbUserSheme['user_icq'][1], $dbUserSheme['user_website'][1], $dbUserSheme['user_occ'][1], $dbUserSheme['user_from'][1], $dbUserSheme['user_interest'][1], $dbUserSheme['user_viewemail'][1], $dbUserSheme['user_sorttopics'][1], $dbUserSheme['language'][1], $dbUserAct, $dbUserSheme['user_custom1'][1], $dbUserSheme['user_custom2'][1], $dbUserSheme['user_custom3'][1]), $Tu);
                 if ($ins == 0) {
                     if (($emailusers == 1 or isset($closeRegister) and $closeRegister == 1) and $genEmailDisable != 1) {
                         $emailMsg = ParseTpl(makeUp('email_user_register'));
                         $sub = explode('SUBJECT>>', $emailMsg);
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:31,代码来源:bb_func_regusr.php

示例7: die

    die('Fatal error.');
}
if (!isset($genEmailDisable) or $genEmailDisable != 1) {
    $newPasswd = '';
    $confirmCode = '';
    $email = isset($_POST['email']) ? htmlspecialchars(trim($_POST['email']), ENT_QUOTES) : '';
    if ($email == $admin_email) {
        $email = '';
    }
    if ($step != 1) {
        $title .= $l_sub_pass;
        echo load_header();
        echo ParseTpl(makeUp('tools_send_password'));
        return;
    } else {
        if (!($updId = db_simpleSelect(0, $Tu, "{$dbUserId},{$dbUserSheme['language'][1]},{$dbUserSheme['username'][1]}", $dbUserSheme['user_email'][1], '=', $email))) {
            $title .= $l_emailNotExists;
            $errorMSG = $l_emailNotExists;
            $correctErr = $backErrorLink;
            echo load_header();
            echo ParseTpl(makeUp('main_warning'));
            return;
        } else {
            $ulang = $updId[1];
            $loginName = $updId[2];
            ${$dbUserNp} = substr(ereg_replace("[^0-9A-Za-z]", "A", writeUserPwd(uniqid(rand()))), 0, 8);
            $newPasswd = ${$dbUserNp};
            ${$dbUserNk} = substr(md5(uniqid(rand())), 0, 32);
            $confirmCode = ${$dbUserNk};
            $updArr = array($dbUserNp, $dbUserNk);
            $fs = updateArray($updArr, $Tu, $dbUserId, $updId[0]);
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:bb_func_sendpwd.php

示例8: db_searchDeSlice

function db_searchDeSlice($lsTopics, $id)
{
    /* Search page/anchor reconstruction */
    if (isset($GLOBALS['xtr'])) {
        $xtrT = $GLOBALS['xtr'];
        $GLOBALS['xtr'] = '';
    } else {
        $xtrT = '';
    }
    if ($lsTopics) {
        $GLOBALS['user_sort'] += 0;
        if ($GLOBALS['user_sort'] == 1) {
            $i = db_simpleSelect(2, $GLOBALS['Tt'], 'count(*)', 'forum_id', '=', $GLOBALS['forum'], '', '', 'topic_id', '<=', $id);
        } else {
            $GLOBALS['xtr'] = 'AND ' . $GLOBALS['Tt'] . '.forum_id=' . $GLOBALS['forum'] . ' AND ' . $GLOBALS['Tt'] . '.topic_last_post_id>' . db_simpleSelect(2, $GLOBALS['Tt'], 'topic_last_post_id', 'topic_id', '=', $id);
            $i = db_simpleSelect(2, $GLOBALS['Tt'] . ',' . $GLOBALS['Tp'], 'count(*)', $GLOBALS['Tt'] . '.topic_last_post_id', '=', $GLOBALS['Tp'] . '.post_id');
        }
        $GLOBALS['xtr'] = $xtrT;
        return intval(($i - 1) / $GLOBALS['viewmaxtopic']);
    } else {
        $sign = isset($GLOBALS['themeDesc']) && in_array($GLOBALS['topic'], $GLOBALS['themeDesc']) ? '>=' : '<=';
        $i = db_simpleSelect(2, $GLOBALS['Tp'], 'count(*)', 'topic_id', '=', $GLOBALS['topic'], '', '', 'post_id', $sign, $id);
        $vmax = $GLOBALS['forum'] == $CONF['forum_submittedarticles'] || $GLOBALS['forum'] == $CONF['forum_gallery'] ? 10 : $GLOBALS['viewmaxreplys'];
        $pageAnchor[0] = intval(($i - 1) / $vmax);
        $a = $i - intval($i / $vmax) * $vmax;
        if ($i > 0 && $a == 0) {
            $a = $vmax;
        }
        $pageAnchor[1] = '#' . $a;
        $GLOBALS['xtr'] = $xtrT;
        return $pageAnchor;
    }
}
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:33,代码来源:setup_mysql.php

示例9: load_header

 if ($step != 1 and $step != 0) {
     $step = 0;
 }
 if ($row[3] == 1 and !($user_id == 1 or $isMod == 1)) {
     $whoEdited = 2;
 }
 if (($whoEdited == 2 or $whoEdited == 3) and !($logged_admin == 1 or $isMod == 1)) {
     $errorMSG = $l_onlyAdminCanEdit;
     $correctErr = $backErrorLink;
     $title .= $l_onlyAdminCanEdit;
     echo load_header();
     echo ParseTpl(makeUp('main_warning'));
     return;
 } else {
     /*First post?*/
     if ($frt = db_simpleSelect(0, $Tp, 'post_id', 'topic_id', '=', $topic, 'post_id', 1) and $frt[0] == $post and ($logged_admin == 1 or $isMod == 1 or isset($usersEditTopicTitle) and $usersEditTopicTitle)) {
         $first = TRUE;
     } else {
         $first = FALSE;
     }
     if ($step == 1) {
         $errorMSG = '';
         if (!isset($_POST['disbbcode']) or isset($_POST['disbbcode']) and $_POST['disbbcode'] == '') {
             $disbbcode = FALSE;
         } else {
             $disbbcode = TRUE;
         }
         $post_text = textFilter($_POST['postText'], $post_text_maxlength, $post_word_maxlength, 1, $disbbcode, 1, $logged_admin);
         $compareTL = strlen(trim(strip_tags($post_text)));
         $sce = FALSE;
         if (isset($simpleCodes)) {
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:bb_func_editmsg.php

示例10: die

Latest File Update: 2006-May-02
*/
if (!defined('INCLUDED776')) {
    die('Fatal error.');
}
$confirmCode = isset($_GET['confirmCode']) ? htmlspecialchars($_GET['confirmCode'], ENT_QUOTES) : '';
$confEmail = FALSE;
if (substr($confirmCode, 0, 5) == 'email') {
    $confirmCode = substr($confirmCode, 5, strlen($confirmCode) - 1);
    $confEmail = TRUE;
}
if ($confirmCode == '') {
    $title .= $l_forbidden;
    $errorMSG = $l_forbidden;
    $correctErr = '';
} elseif ($curr = db_simpleSelect(0, $Tu, $dbUserNp, $dbUserNk, '=', $confirmCode)) {
    if ($confEmail) {
        ${$dbUserNk} = '';
        ${$dbUserNp} = '';
        ${$dbUserAct} = 1;
        $updArr = array($dbUserAct, $dbUserNk, $dbUserNp);
        $fs = updateArray($updArr, $Tu, $dbUserNk, $confirmCode);
        $mes = $l_emailCodeConfirm;
    } else {
        ${$dbUserSheme['user_password'][1]} = writeUserPwd($curr[0]);
        ${$dbUserNk} = '';
        ${$dbUserNp} = '';
        $updArr = array($dbUserSheme['user_password'][1], $dbUserNk, $dbUserNp);
        $fs = updateArray($updArr, $Tu, $dbUserNk, $confirmCode);
        $mes = $l_passwdUpdate;
    }
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:bb_func_confpwd.php

示例11: getTopicTitleById

function getTopicTitleById($topic_id)
{
    $tName = '';
    if ($tn = db_simpleSelect(0, $GLOBALS['Tt'], 'topic_title', 'topic_id', '=', $topic_id)) {
        $tName = $tn[0];
    }
    return $tName;
}
开发者ID:amenski,项目名称:BookSharing,代码行数:8,代码来源:bb_functions.php

示例12: Copyright

This file is part of miniBB. miniBB is free discussion forums/message board software, without any warranty. See COPYING file for more details. Copyright (C) 2004 Paul Puzyrev, Sergei Larionov. www.minibb.net
*/
if (!defined('INCLUDED776')) {
    die('Fatal error.');
}
if (isset($_POST['post'])) {
    $post = $_POST['post'];
} elseif (isset($_GET['post'])) {
    $post = $_GET['post'];
} else {
    $post = 0;
}
$first = db_simpleSelect(0, $Tp, 'post_id', 'topic_id', '=', $topic, 'post_id ASC', 1);
$first = $first[0];
if (($logged_admin == 1 or $isMod == 1) and $first != $post) {
    if (db_delete($Tp, 'post_id', '=', $post) and $pp = db_simpleSelect(0, $Tp, 'post_id', 'topic_id', '=', $topic, 'post_id DESC', 1)) {
        $topic_last_post_id = $pp[0];
        updateArray(array('topic_last_post_id'), $Tt, 'topic_id', $topic);
        db_forumReplies($forum, $Tp, $Tf);
        db_topicPosts($topic, $Tt, $Tp);
        if (isset($metaLocation)) {
            $meta_relocate = "{$main_url}/{$indexphp}action=vthread&forum={$forum}&topic={$topic}&page={$page}";
            echo ParseTpl(makeUp($metaLocation));
            exit;
        } else {
            header("Location: {$main_url}/{$indexphp}action=vthread&forum={$forum}&topic={$topic}&page={$page}");
            exit;
        }
    } else {
        $errorMSG = $l_itseemserror;
        $correctErr = $backErrorLink;
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:31,代码来源:bb_func_delmsg.php

示例13: die

    die('Fatal error.');
}
if (!isset($genEmailDisable) or $genEmailDisable != 1) {
    $newPasswd = '';
    $confirmCode = '';
    $email = isset($_POST['email']) ? $_POST['email'] : '';
    if ($email == $admin_email) {
        $email = '';
    }
    if ($step != 1) {
        $title .= $l_sub_pass;
        echo load_header();
        echo ParseTpl(makeUp('tools_send_password'));
        return;
    } else {
        if (!($updId = db_simpleSelect(0, $Tu, $dbUserId, $dbUserSheme['user_email'][1], '=', $email))) {
            $title .= $l_emailNotExists;
            $errorMSG = $l_emailNotExists;
            $correctErr = $backErrorLink;
            echo load_header();
            echo ParseTpl(makeUp('main_warning'));
            return;
        } else {
            ${$dbUserNp} = substr(ereg_replace("[^0-9A-Za-z]", "A", md5(uniqid(rand()))), 0, 8);
            $newPasswd = ${$dbUserNp};
            ${$dbUserNk} = substr(md5(uniqid(rand())), 0, 32);
            $confirmCode = ${$dbUserNk};
            $updArr = array($dbUserNp, $dbUserNk);
            $fs = updateArray($updArr, $Tu, $dbUserId, $updId[0]);
            if ($fs > 0) {
                $msg = ParseTpl(makeUp('email_user_password'));
开发者ID:s-a-r-id,项目名称:geograph-project,代码行数:31,代码来源:bb_func_sendpwd.php

示例14: array

            $loginError = 2;
            $displayFormElements = array('userData' => 1, 'topicTitle' => 1, 'postText' => 1);
            $antiWarn = $l_fixData;
            include $pathToFiles . 'bb_func_posthold.php';
        }
    }
    // if this is not admin, this is anonymous or registered user; check registered first
} else {
    if (isset($loginsCase) and $loginsCase) {
        $caseComp1 = $caseComp . '(';
        $caseComp2 = ')';
    } else {
        $caseComp1 = '';
        $caseComp2 = '';
    }
    if ($row = db_simpleSelect(FALSE, $Tu, $dbUserSheme['username'][1] . ',' . $dbUserSheme['user_password'][1], $caseComp1 . $dbUserSheme['username'][1] . $caseComp2, '=', $user_usr, '', 1)) {
        // It means that username exists in database; so let's check a password
        $username = $row[0];
        $userpassword = $row[1];
        if (($user_usr == $username or isset($loginsCase) and $loginsCase and strtolower($user_usr) == strtolower($username)) and $userpassword == writeUserPwd($user_pwd)) {
            $logged_user = 1;
            $cook = $username . "|" . writeUserPwd($user_pwd) . "|" . $cookieexptime;
            deleteMyCookie();
            setMyCookie($username, $user_pwd, $cookieexptime);
            setCSRFCheckCookie();
            if ($action == '') {
                if (isset($metaLocation)) {
                    $meta_relocate = "{$main_url}/{$indexphp}{$queryStr}";
                    echo ParseTpl(makeUp($metaLocation));
                    exit;
                } elseif ($queryStr2 != '') {
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:bb_func_login.php

示例15: round

    do {
        if ($cols[1]) {
            if (isset($preModerationType) and $preModerationType > 0 and isset($premodTopics) and in_array($cols[0], $premodTopics)) {
                $cols[2] = $l_topicQueued;
            }
            if (!isset($vMax)) {
                $vMax = $cols[1];
            }
            $val = $cols[1];
            $stats_barWidth = round(100 * ($val / $vMax));
            if ($stats_barWidth > $stats_barWidthLim) {
                $key = '<a href="' . gen_vthread_url($cols[3], $forumNames[$cols[3]], $cols[0], $cols[2], PAGE1_OFFSET + 1) . '"' . $nof . '>' . $cols[2] . '</a>';
            } else {
                $key2 = '<a href="' . gen_vthread_url($cols[3], $forumNames[$cols[3]], $cols[0], $cols[2], PAGE1_OFFSET + 1) . '"' . $nof . '>' . $cols[2] . '</a>';
                $key = '<a href="' . gen_vthread_url($cols[3], $forumNames[$cols[3]], $cols[0], $cols[2], PAGE1_OFFSET + 1) . '"' . $nof . '>...</a>';
            }
            $list_stats_viewed .= ParseTpl($tpl);
        } else {
            break;
        }
    } while ($cols = db_simpleSelect(1));
}
unset($xtr);
$numUsers = db_simpleSelect(2, $Tu, 'count(*)') - 1;
$numTopics = db_simpleSelect(2, $Tf, 'SUM(topics_count)');
$numPosts = db_simpleSelect(2, $Tf, 'SUM(posts_count)') - $numTopics;
$adminInf = db_simpleSelect(2, $Tu, $dbUserSheme['username'][1], $dbUserId, '=', 1);
$lastRegUsr = db_simpleSelect(0, $Tu, "{$dbUserId}, {$dbUserSheme['username'][1]}", '', '', '', "{$dbUserId} DESC", 1);
$title = $title . $l_stats;
echo load_header();
echo ParseTpl(makeUp('stats'));
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:bb_func_stats.php


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