if($forum['password']) {
	if($action == 'pwverify') {
		if($pw != $forum['password']) {
			showmessage('forum_passwd_incorrect', NULL, 'HALTED');
		} else {
			dsetcookie('fidpw'.$fid, $pw);
			showmessage('forum_passwd_correct', "forumdisplay.php?fid=$fid");
		}
	} elseif($forum['password'] != $_DCOOKIE['fidpw'.$fid]) {
		include template('forumdisplay_passwd');
		exit();
	}
}

$sdb = loadmultiserver();

foreach(array('modarea_c', 'sidebar') as $key) {
	if(!isset($_COOKIE['discuz_collapse']) || strpos($_COOKIE['discuz_collapse'], $key) === FALSE) {
		$collapseimg[$key] = 'collapsed_no';
		$collapse[$key] = '';
	} else {
		$collapseimg[$key] = 'collapsed_yes';
		$collapse[$key] = 'display: none';
	}
}

if($forum['modrecommend'] && $forum['modrecommend']['open']) {
	$forum['recommendlist'] = recommendupdate($fid, $forum['modrecommend'], '', 1);
}
Esempio n. 2
0
	$Id: viewthread.php 17531 2009-01-19 01:32:52Z tiger $
*/
if (!defined('CURSCRIPT')) {
    define('CURSCRIPT', 'viewthread');
}
define('SQL_ADD_THREAD', ' t.dateline, t.special, t.lastpost AS lastthreadpost, ');
require_once './include/common.inc.php';
require_once DISCUZ_ROOT . './include/forum.func.php';
$page = max($page, 1);
if ($cachethreadlife && $forum['threadcaches'] && !$discuz_uid && $page == 1 && !$forum['special']) {
    viewthread_loadcache();
}
require_once DISCUZ_ROOT . './include/discuzcode.func.php';
$discuz_action = 3;
$sdb = loadmultiserver('viewthread');
$thread = $sdb->fetch_first("SELECT * FROM {$tablepre}threads t WHERE tid='{$tid}'" . ($auditstatuson ? '' : " AND displayorder>='0'"));
if (!$thread) {
    showmessage('thread_nonexistence');
}
$oldtopics = isset($_DCOOKIE['oldtopics']) ? $_DCOOKIE['oldtopics'] : 'D';
if (strpos($oldtopics, 'D' . $tid . 'D') === FALSE) {
    $oldtopics = 'D' . $tid . $oldtopics;
    if (strlen($oldtopics) > 3072) {
        $oldtopics = preg_replace("((D\\d+)+D).*\$", "\\1", substr($oldtopics, 0, 3072));
    }
    dsetcookie('oldtopics', $oldtopics, 3600);
}
if ($lastvisit < $thread['lastpost'] && (!isset($_DCOOKIE['fid' . $fid]) || $thread['lastpost'] > $_DCOOKIE['fid' . $fid])) {
    dsetcookie('fid' . $fid, $thread['lastpost'], 3600);
}
Esempio n. 3
0
define('CURSCRIPT', 'wap');
require_once '../include/common.inc.php';
if (preg_match('/(mozilla|m3gate|winwap|openwave)/i', $_SERVER['HTTP_USER_AGENT'])) {
    dheader("Location: {$boardurl}index.php");
}
require_once './include/global.func.php';
require_once DISCUZ_ROOT . './include/forum.func.php';
require_once DISCUZ_ROOT . './include/chinese.class.php';
@(include_once DISCUZ_ROOT . './forumdata/cache/cache_forums.php');
$discuz_action = 191;
$action = isset($action) ? $action : 'home';
if ($action == 'goto' && !empty($url)) {
    header("Location: {$url}");
    exit;
} else {
    wapheader($bbname);
}
include language('wap');
if (!$wapstatus) {
    wapmsg('wap_disabled');
} elseif ($bbclosed) {
    wapmsg('board_closed');
}
$sdb = loadmultiserver('wap');
$chs = '';
if (in_array($action, array('home', 'login', 'register', 'search', 'stats', 'my', 'myphone', 'goto', 'forum', 'thread', 'post'))) {
    require_once './include/' . $action . '.inc.php';
} else {
    wapmsg('undefined_action');
}
wapfooter();
Esempio n. 4
0
*/

define('NOROBOT', TRUE);
define('CURSCRIPT', 'search');

require_once './include/common.inc.php';
require_once DISCUZ_ROOT.'./include/forum.func.php';
require_once DISCUZ_ROOT.'./forumdata/cache/cache_forums.php';
require_once DISCUZ_ROOT.'./forumdata/cache/cache_icons.php';

$discuz_action = 111;

$cachelife_time = 300;		// Life span for cache of searching in specified range of time
$cachelife_text = 3600;		// Life span for cache of text searching

$sdb = loadmultiserver('search');

$srchtype = empty($srchtype) ? '' : trim($srchtype);
$checkarray = array('posts' => '', 'trade' => '', 'qihoo' => '', 'threadsort' => '');

$searchid = isset($searchid) ? intval($searchid) : 0;

if($srchtype == 'trade' || $srchtype == 'threadsort' || $srchtype == 'qihoo') {
	$checkarray[$srchtype] = 'checked';
} elseif($srchtype == 'title' || $srchtype == 'fulltext') {
	$checkarray['posts'] = 'checked';
} else {
	$srchtype = '';
	$checkarray['posts'] = 'checked';
}