⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 begin.php

📁 make project on java
💻 PHP
📖 第 1 页 / 共 2 页
字号:
return end($ranknames);

}

function ranknum($val, $jisu, $xisu)
{
    if ($jisu != 0) {
        $sun = 0;
        for($ji = 0;$val >= $sun;) {
            $sun += $jisu * (1 + $ji * $xisu);
            $ji++;
        } 
        $ji--;
    } else {
        $ji = 255;
    } 
    return $ji;
} 
function forumpurview()
{
    global $username, $user, $userp3, $forumnames, $fid, $bbsmessage, $bbsmessagefix, $f_admin;
    global $style_id, $templatedir, $styledir, $twt_co, $webnav;
    global $menufile, $fid, $hid,$fuclose,$reurl;

if ($fuclose) echoerror(144);
 $hid=(int)$hid;
 $fmid = $hid > 0?$hid:$fid;
 $menufile = 'fmenu' . $fmid;

    if (!is_numeric($fid)) echoerror(135);
		
    if (!file_exists('cache/forums_' . $fid . '.php')) {
        include_once 'include/sporadic.php';
        forumcache();
        clearstatcache();
    } 
    include'cache/forums_' . $fid . '.php';


	$webnav=$forumnames[($bbsmessage[1]>0?$bbsmessage[1]:$bbsmessage[0])];
  
    if ($bbsmessagefix == 1) $bbsmessage[2] = 0;
    if (empty($username)) {
        $userp3 = $purview3[0]; 
    } else {
        $userforums = $user['forums']?explode('|', $user['forums']):array();
        if ($bbsmessage[2] == 0) {
            if ($user['admin'] > 0) {
                $userp3 = $purview3[($user['admin'] + 3)];
            } else if (@in_array($fid, $userforums)) {
                $userp3 = $purview3[3];
            } else {
                $userp3 = $purview3[1];
            } 
        } else if ($bbsmessage[2] == 1) {
            if ($user['admin'] > 0 && in_array($user['admin'], $bbsmessage[3])) {
                $userp3 = $purview3[($user['admin'] + 3)];
            } else if (@in_array($fid, $userforums)) {
                $userp3 = $purview3[3];
            } else if ($user['forums'] != '' && @in_array(11, $bbsmessage[3])) {
                $userp3 = $purview3[1];
            } else {
                $userp3 = $purview3[2];
            } 
        } else if ($bbsmessage[2] == 2) {
            if ($user['admin'] > 0) {
                $userp3 = $purview3[($user['admin'] + 3)];
            } else if (@in_array($fid, $userforums)) {
                $userp3 = $purview3[3];
            } else {
                $userp3 = $purview3[2];
                while (list (, $val) = @each($bbsmessage[3])) {
                    if (eregi("\|$val,", $user['groups'])) {
                        $userp3 = $purview3[1];
                        break;
                    } 
                } 
            } 
        } else {
            echoerror(6);
        } 
    } 

    $userp3 = explode('|', $userp3);
    if ($f_style == 0) $f_style = $style_id;

    if ($_COOKIE['f_' . $twt_co][$fid] && isset($styledir[$_COOKIE['f_' . $twt_co][$fid]]) && !$userstyle) {
        $f_style = $_COOKIE['f_' . $twt_co][$fid];
    } 
    $style_id = $f_style;
    $templatedir = 'template/' . $styledir[$style_id];
	$reurl='tread.php?fid='.$fid;
} 

function wstyle($w_style)
{
    global $templatedir, $style_id, $twt_co, $wid, $styledir;
    if ($w_style == 0) $w_style = $style_id;

    if ($_COOKIE['w_' . $twt_co][$wid] && isset($styledir[$_COOKIE['w_' . $twt_co][$wid]]) && !$userstyle) {
        $w_style = $_COOKIE['w_' . $twt_co][$wid];
    } 

    $style_id = $w_style;
    $templatedir = 'template/' . $styledir[$style_id];
} 

function printeot($template)
{
    global $templatedir;
    $path = file_exists('./' . $templatedir . '/' . $template . '.htm') ? './' . $templatedir . '/' . $template . '.htm' : './template/default/' . $template . '.htm';
    return $path;
} 
function language()
{
    global $templatedir;
    return file_exists('./' . $templatedir . '/language.php') ? './' . $templatedir . '/language.php' : './template/default/language.php';
} 
function sm($_tp7, $sql)
{
    global $db_prefix, $myconn, $softdir;
    $result = mysql_query("select * from {$db_prefix}title $sql", $myconn);

    while ($row = mysql_fetch_array($result)) {
        $imgdir = $softdir . '/thumbs/' . floor($row['cid'] / 10000) . '/' . $row['cid'] . '.jpg';
        $hlist .= '<a class="simg" href="'.(REWRIT_E?'vread-' . $row['cid'] . '.html':'vread.php?tid='.$row['cid']).'" style="background-image: url(' . $imgdir . ');" title="' . htmlspecialchars($row['title']) . '"><span>' . htmlspecialchars(substrs($row['title'], 18)) . '</span></a>';
    } 

    return $hlist;

} 
function jsjcache($id, $sql, &$tpup, $_tp7, $time, $file = 's_')
{
    global $intervals;

    $interval = $intervals[$id];
    if (file_exists('cache/' . $file . $id . '.php')) {
        include 'cache/' . $file . $id . '.php';
        clearstatcache();
    } else {
        $jstime = '0';
    } 
    if ($tpup && ($jstime < ($time - $interval))) {
        $tpup--;

        $ctxt = sm($_tp7[$id], $sql);
        sj($ctxt, $file . $id, $time);
        include 'cache/' . $file . $id . '.php';
    } 

    return $text;
} 
function jstcache($id, $sql, $type, &$tpup, $_tp4, $_tp7, $time, $file = 's_', $return = 0)
{
    global $intervals, $vmain, $ts_id, $ts_txt;

    $ts = $id == 23 || $id == 22?true:false;
    $interval = $intervals[$id];
    if (file_exists('cache/' . $file . $id . '.php')) {
        include 'cache/' . $file . $id . '.php';
        clearstatcache();
    } else {
        $jstime = '0';
    } 
    if ($tpup && ($jstime < ($time - $interval))) {
        $tpup--;
        $ctxt = sc($_tp4[$id], $_tp7[$id], $sql, $type, $ts);

        sj($ctxt, $file . $id, $time, null, $ts);
        include 'cache/' . $file . $id . '.php';
    } 
    if ($return == 1) return $text[STYLE_CS];

    $vmain[$id] = $text[STYLE_CS];
} 

function sc($_tp4, $_tp7, $sql, $type = 0, $ts)
{
    global $forumnames, $wname, $db_prefix, $myconn, $softdir, $ts_id, $ts_txt;
    $t_title = array();
    $title_array[0] = '';
    $title_array[1] = '';
	$tmm=NULL;
    $result = mysql_query("select * from {$db_prefix}title $sql", $myconn);
    for($i = 1;$i <= $_tp7;$i++) {
        $row = mysql_fetch_array($result);

        if ($row) {
            $htmltitle = htmlspecialchars($row['title']);

            if ($row['thumb'] > 0) $tmm[$row['cid']] = $htmltitle;

            if ($type == 1) {

                $tmb[$row['cid']] = '1';

                $t_title[0] = '<li class="li-' . $i . '"><span class="li-time">' . date('[m-d]', $row['posttime']) . '</span><a href="'.(REWRIT_E?'read-' . $row['cid'] . '.html':'read.php?tid='.$row['cid']).'" title="' . $htmltitle . '">' . substrs($row['title'], $_tp4[0]) . '</a></li>';
                $t_title[1] = '<li class="li-' . $i . '"><span class="li-time">' . date('[m-d]', $row['posttime']) . '</span><a href="'.(REWRIT_E?'read-' . $row['cid'] . '.html':'read.php?tid='.$row['cid']).'" title="' . $htmltitle . '">' . substrs($row['title'], $_tp4[1]) . '</a></li>';
            } else if ($type == 2) {

                $tmb[$row['cid']] = '2';
                $t_title[0] = '<li class="li-' . $i . '"><span class="li-time">' . date('[m-d]', $row['posttime']) . '</span><a href="'.(REWRIT_E?'vread-' . $row['cid'] . '.html':'vread.php?tid='.$row['cid']).'" title="' . $htmltitle . '">' . substrs($row['title'], $_tp4[0]) . '</a></li>';
                $t_title[1] = '<li class="li-' . $i . '"><span class="li-time">' . date('[m-d]', $row['posttime']) . '</span><a href="'.(REWRIT_E?'vread-' . $row['cid'] . '.html':'vread.php?tid='.$row['cid']).'" title="' . $htmltitle . '">' . substrs($row['title'], $_tp4[1]) . '</a></li>';
            } else {
                if ($row['wid'] > 0) {
                    $tmb[$row['cid']] = '2';

                    $t_title[0] = '<li class="li-' . $i . '"><span class="li-time">' . date('[m-d]', $row['posttime']) . '</span><a href="'.(REWRIT_E?'vread-' . $row['cid'] . '.html':'vread.php?tid='.$row['cid']).'" title="' . $htmltitle . '">' . substrs($row['title'], $_tp4[0]) . '</a></li>';
                    $t_title[1] = '<li class="li-' . $i . '"><span class="li-time">' . date('[m-d]', $row['posttime']) . '</span><a href="'.(REWRIT_E?'vread-' . $row['cid'] . '.html':'vread.php?tid='.$row['cid']).'" title="' . $htmltitle . '">' . substrs($row['title'], $_tp4[1]) . '</a></li>';
                } else {
                    $tmb[$row['cid']] = '1';

                    $t_title[0] = '<li class="li-' . $i . '"><span class="li-time">' . date('[m-d]', $row['posttime']) . '</span><a href="'.(REWRIT_E?'read-' . $row['cid'] . '.html':'read.php?tid='.$row['cid']).'" title="' . $htmltitle . '">' . substrs($row['title'], $_tp4[0]) . '</a></li>';
                    $t_title[1] = '<li class="li-' . $i . '"><span class="li-time">' . date('[m-d]', $row['posttime']) . '</span><a href="'.(REWRIT_E?'read-' . $row['cid'] . '.html':'read.php?tid='.$row['cid']).'" title="' . $htmltitle . '">' . substrs($row['title'], $_tp4[1]) . '</a></li>';
                } 
            } 
        } else {
            $t_title[0] = '<li class="li-' . $i . '"><a>鈥

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -