<?php

define('IN_MOBILE', true);



define('ROOT_PATH', str_replace("\\", '/', substr(__FILE__, 0, strrpos(dirname(__FILE__), DIRECTORY_SEPARATOR))).'/');

define('APP_PATH', ROOT_PATH.'source/');

define('MOD_PATH', ROOT_PATH.'m/module/');


require(APP_PATH.'init.php');
require(APP_PATH.'module/link.php');
require(APP_PATH.'module/adver.php');
require(APP_PATH.'module/label.php');
require(APP_PATH.'module/diypage.php');
require(APP_PATH.'module/category.php');
require(APP_PATH.'module/city.php');
require(APP_PATH.'module/article.php');
require(APP_PATH.'module/user.php');
require(APP_PATH.'module/stats.php');
require(APP_PATH.'module/mprelink.php');
require(APP_PATH.'module/mrewrite.php');

/** module */
$module = $_GET['mod'] ? $_GET['mod'] : $_POST['mod'];
if (!isset($module)) $module = 'index';

$modarr = array('index','area', 'article', 'weblink', 'category', 'city','update', 'archives','mobile','home', 'author','search','read','top', 'feedback', 'diypage', 'rssfeed', 'sitemap', 'ajaxget', 'getdata', 'api');
if (in_array($module, $modarr)) {
	$modpath = MOD_PATH.$module.'.php';
	if (is_file($modpath)) {
		require(MOD_PATH.'common.php');
		require($modpath);
		
		
	} else {
		exit('“'.$module.'.php” 模块文件不存在！文件路径：“'.MOD_PATH.'”。');
	}
}
?>