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

📄 main.php

📁 make project on java
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?php
$vmain = array();
define('STYLE_CS', $style_type[$style_id]);
if (!file_exists('./cache/template/m_' . $style_id . '_' . $tpl_html . '.php')) {

    $_filename = file_exists('./' . $templatedir . '/' . $tpl_html . '.htm')?'./' . $templatedir . '/' . $tpl_html . '.htm': './template/default/' . $tpl_html . '.htm';
    if (@$fp = fopen($_filename, 'r')) {
        $content = fread($fp, filesize($_filename));
        $menutop = @file_get_contents('./cache/menu.twt');
        $content = str_replace('{TOPMENU}', $menutop, $content);
 if(REWRIT_E){
$content = preg_replace("/\[p\](.+?)\[\/p\]/is", '', $content);
$content = preg_replace("/\[h\](.+?)\[\/h\]/is", "\\1", $content);
}else{
$content = preg_replace("/\[p\](.+?)\[\/p\]/is", "\\1", $content);
$content = preg_replace("/\[h\](.+?)\[\/h\]/is", '', $content);
}       
        $tplvalarray = $side_array = array();
        while (preg_match("/<!--[ ]*[\^][B][E][G][I][N][ ]+[s][i][d][e][_]([0-9]+)[ ]*-->([^\^]*)<!--[ ]*[\^][E][N][D][ ]+[s][i][d][e][_]([0-9]+)[ ]*-->/" , $content, $vals)) {

            $content = in_array($vals[1], $tp3)?str_replace($vals[0], $vals[2], $content):str_replace($vals[0], '', $content);
        } 

        $result = mysql_query("select * from {$db_prefix}styles where id='$style_id'", $myconn);
        $row = mysql_fetch_array($result);
        $_mval = explode("\t", $row['code']);
        $_mcon = explode('|', $_mval[0]);
        $_mtype = explode('|', $_mval[1]);

        while (list($key, $val) = each($_mtype)) {
            if (!$val) unset($_mcon[$key]);
        } 
        $content = preg_replace("/{SYSCODE([0-9]+)}/eis", "template_ad('\\1')", $content);
        $_mhack = file_get_contents('./cache/hack.twt');
        $content = str_replace('{SYSHACK}', $_mhack, $content);
        while (preg_match("/<!--[ ]*[\^][B][E][G][I][N][ ]+([A-Za-z0-9_]+)[ ]*-->([^\^]*)<!--[ ]*[\^][E][N][D][ ]+([A-Za-z0-9_]+)[ ]*-->/", $content, $vals)) {
            if ($vals[1] == 'style') {
                $sl = '';

                reset($stylename);
                while (list ($key, $name) = @each($stylename)) {
                    $s = $vals[2];
                    $s = str_replace('{$id}', $key, $s);
                    $sl .= str_replace('{$name}', $name, $s);
                } 

                $content = str_replace($vals[0], $sl, $content);
            } else {
                $tplvalarray[$vals[1]] = $vals[2];
                $content = str_replace($vals[0], "{\$" . $vals[1] . "}", $content);
            } 
        } 
        $content = str_replace("\\", "\\\\", $content);
        $content = str_replace("'", "\\'", $content);
        $content = preg_replace("/[\{][\$]([A-Za-z0-9_\[\]]+)[\}]/eis", "template_code('\\1')", $content);

        $fp = fopen('./cache/template/m_' . $style_id . '_' . $tpl_html . '.php', 'w');
        fwrite($fp, "<?\ninclude './include/template.php';\necho '" . $content . "';\n?>");
        fclose($fp);
        $funtext = '';
        $unset = '';
        while (list ($key, $val) = each($tplvalarray)) {
            $unset .= $unset != ''?',' . '$' . $key:'$' . $key;

            $val = str_replace("\\", "\\\\", $val);
            $val = str_replace("'", "\\'", $val);
            $val = preg_replace("/[\{][\$]([A-Za-z0-9_\[\]]+)[\}]/eis", "template_code('\\1')", $val);

            $funtext .= "\n" . 'function tpl_fun_' . $key . $re . '($jjval=NULL,$jjval2=NULL){' . "\n" . $pageloadfun . 'if (is_array($jjval2)){while (list ($key,$jjvalue) = each ($jjval2)){if (is_array($jjvalue)) extract($jjvalue,EXTR_PREFIX_ALL,$key);}}if (is_array($jjval)){while (list ($key,$jjvalue) = each ($jjval)){if (is_array($jjvalue)){extract($jjvalue);}else{${$key}=$jjvalue;}}}' . "\n" . 'return \'' . $val . '\';}';
        } 

        if ($unset != '') $unset = 'unset(' . $unset . ');';

        $fp = fopen('./cache/template/tpl_' . $style_id . '_' . $tpl_html . '.php', 'w');
        fwrite($fp, "<?php\n" . $unset . $funtext . "\n?>");
        fclose($fp);
    } else {
	
        exit('1102');
    } 
} 

if (file_exists('./cache/template/tpl_' . $style_id . '_' . $tpl_html . '.php')) {
    include_once'./cache/template/tpl_' . $style_id . '_' . $tpl_html . '.php';
} else {
    @unlink('./cache/template/m_' . $style_id . '_' . $tpl_html . '.php');
    header('Location: ');
    exit;
} 
reset($tp3);

while (list(, $val) = @each($tp3)) {
    $jstime = 0;
    $content = '';
    $text = null;
    switch ($val) {
        case 5:

            jstcache($val, "where state>0 && fid>0 ORDER BY posttime DESC LIMIT 0,$_tp7[5]", 1, $tpup, $_tp4, $_tp7, $time);
            break;
        case 7:
            if (file_exists("cache/c_0.php")) {
                include"cache/c_0.php";
                clearstatcache();
            } else {
                $jstime = 0;
            } 
            if (($jstime < ($time - $intervals[7])) && $tpup) {
                $tpup--;
                $result = mysql_query("select * from {$db_prefix}bbsinfo", $myconn);
                $row = mysql_fetch_array($result);
                $hour1 = date("z", $row["ctime"]);
                $hour2 = date("z", $time);
                $hour = date("G", $time);
                $result = mysql_query("select * from {$db_prefix}forums where fid>'0'", $myconn);
                while ($row2 = mysql_fetch_array($result)) {
                    $countdatat = explode('|', $row2['countdata']);
                    $num += array_sum($countdatat);
                    for($i = 0;$i < 24;$i++) {
                        $hourdata[$i] += $countdatat[$i];
                    } 
                } 
                if ($hour1 != $hour2) {
                    if ($num >= $row['highdanum']) {
                        mysql_query("update {$db_prefix}bbsinfo set  highdanum='$num',highdatime='$row[ctime]'", $myconn);
                    } 
                } 
                for($i = 0, $n = $hour;$i < $_tp7[7];$i++, $n--) {
                    if ($n < 0) {
                        $n = 23;
                        $m = 0;
                    } else {
                        $m = $n + 1;
                    } 

                    $nf = $n < 10?'0':'';
                    $mf = $m < 10?'0':'';

                    $content .= '<li class="li-'.($i+1).'">' . $nf . $n . ':00 -' . $mf . $m . ':00<span class="s-nums">' . $hourdata[$n] . '</span></li>';
                } 
                sj($content, 'c_0', $time);
                include 'cache/c_0.php';
            } 
            $vmain[7] = $text;
            break;
        case 8:
            if (file_exists("cache/s_8.php")) {
                include"cache/s_8.php";
                clearstatcache();
            } else {
                $jstime = 0;
            } 
            if ($jstime < ($time - $intervals[8]) && $tpup) {
                $tpup--;
                $reger = $gouer = 0;
                //$i = $_tp7[8];
                $temp = $time - $onlinech;
				$result = mysql_query("select * from {$db_prefix}bbsinfo", $myconn);
                $row2 = mysql_fetch_array($result);
				
                $result = mysql_query("select * from {$db_prefix}online", $myconn);
                while ($row = mysql_fetch_array($result)) {
                    if ($row['time'] < $temp) {
                        @mysql_query("update {$db_prefix}members set lastip='$row[userip]',lasttime='$row[time]' where id='$row[uid]'" , $myconn);
                    } else {
                            $reger++;
                    } 

⌨️ 快捷键说明

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