<?php

/*
	[Discuz!] (C)2001-2006 Comsenz Inc.
	This is NOT a freeware, use is subject to license terms

	$RCSfile: index.php,v $
	$Revision: 1.7.8.1 $
	$Date: 2006/09/26 08:27:30 $
*/

define('CURSCRIPT', 'wap');
require_once '../include/common.inc.php';
require_once './include/global.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');
}

$chs = '';
if(in_array($action, array('home', 'login', 'stats', 'myphone', 'goto', 'forum', 'thread', 'post', 'pm'))) {
	require_once './include/'.$action.'.inc.php';
} else {
	wapmsg('undefined_action');
}

wapfooter();

?>
