示例#1
0
文件: index.php 项目: jechiy/PHPWind
<?php

define('SCR', 'index');
require_once 'global.php';
$cateid = (int) S::getGP('cateid');
$m = S::getGP('m');
if ($db_channeldomain && ($secdomain = array_search($pwServer['HTTP_HOST'], $db_channeldomain))) {
    $m = 'area';
    //	$db_bbsurl = $_mainUrl;
    $alias = $secdomain;
    define('HTML_CHANNEL', 1);
}
selectMode($m);
if (defined('M_P') && file_exists(M_P . 'index.php')) {
    pwCache::getData(S::escapePath(D_P . 'data/bbscache/' . $db_mode . '_config.php'));
    if (file_exists(M_P . 'require/core.php')) {
        require_once M_P . 'require/core.php';
    }
    $basename = "index.php?m={$m}";
    require_once M_P . 'index.php';
    exit;
}
pwCache::getData(D_P . 'data/bbscache/cache_index.php');
pwCache::getData(D_P . 'data/bbscache/forum_cache.php');
//notice
$noticedb = array();
foreach ($notice_A as $value) {
    if ($value['startdate'] <= $timestamp && (!$value['enddate'] || $value['enddate'] >= $timestamp)) {
        $value['startdate'] = $value['stime'] ? $value['stime'] : get_date($value['startdate'], 'y-m-d');
        !$value['url'] && ($value['url'] = 'notice.php#' . $value['aid']);
        $noticedb[$value['aid']] = $value;
示例#2
0
文件: mode.php 项目: jechiy/PHPWind
<?php

define('SCR', 'mode');
require_once 'global.php';
require_once R_P . 'require/functions.php';
$m = S::getGP('m');
S::gp(array('q'));
selectMode($m, $q);
if ($m == 'bbs') {
    ObHeader($_mainUrl);
}
/*APP 应用跳转*/
if ($m == 'o' && $q) {
    if ($q == 'user') {
        S::gp(array('u'));
        ObHeader(USER_URL . "={$u}");
    } elseif ($q == 'app') {
        S::gp(array('id'), 'G', 2);
        ObHeader("apps.php?id={$id}");
    } elseif ($q == 'friend') {
        ObHeader("u.php?a=friend");
    } elseif (!in_array($q, array('user', 'friend', 'browse', 'invite', 'board', 'myapp', 'home'))) {
        $QUERY_STRING = substr($pwServer['QUERY_STRING'], 4);
        ObHeader("apps.php?" . $QUERY_STRING);
    }
}
if ($m == 'o') {
    $pwModeImg = "{$imgpath}/apps";
    $q = 'browse';
}
if (strpos($q, '..') !== false) {