<?php
if(!defined('IN_DEMOSOSO')) {
	exit('this is wrong page,please back to homepage');
}
define('BASEURL',$baseurl);
define("HOSTNAME", $_SERVER['HTTP_HOST']);

ini_set('display_errors', TRUE);//false

define( 'WEB_ROOT', substr(dirname(__FILE__),0,-4) . '/' );



define('SES_ROOT',WEB_ROOT.'cache/session');
define('INCLUDE_ROOT',WEB_ROOT.'component/dm-include/');
define('TEMPLATEROOT',WEB_ROOT.'DM-template/');
define('TEMPLATEPATH',$baseurl.'DM-template/');
define('ADMINDIR',@$_COOKIE['admindir']);
define('ISADMIN',@$_COOKIE['isadmin']);

// echo dirname(__FILE__).'<br />';

//  echo TPLBASEROOT.'<br />';
 // echo WEB_ROOT.'<br />';
 //echo SES_ROOT.'<br />';
$PHP_SELF=$_SERVER['PHP_SELF'];


//--
$cfg_cinc='component/dm-config/';
require_once WEB_ROOT.$cfg_cinc.'inc_table.php';
require_once WEB_ROOT.$cfg_cinc.'config.php';
//require_once WEB_ROOT.$cfg_cinc.'text_can.php';
//require_once WEB_ROOT.$cfg_cinc.'fsession.php';
$arrdatabase =  require_once WEB_ROOT.$cfg_cinc.'database.php';
require_once WEB_ROOT.$cfg_cinc.'mysql.php';
require_once WEB_ROOT.$cfg_cinc.'global.common.php';

//front func echo SES_ROOT.'<br />';

$targetv = ''; //$targetv is set in page_search, and list_text.php
$routeid='';$alias='';$ifalias='';$offset=5;$page_total='';
 
$routeid = @htmlentitdm($_GET['routeid']);
$alias = @htmlentitdm($_GET['alias']);
$ifalias = @htmlentitdm($_GET['ifalias']);
if(@$file=='')  $file = @htmlentitdm($_GET['file']);
$detailid = @htmlentitdm($_GET['detailid']);$brandid = @htmlentitdm($_GET['brandid']);
$page = @htmlentitdm($_GET['page']);
 if (!isset($page)) $page=1; 
$pagelayout ='';

	/*------------some variable------------*/
		$title='';
		$pid=$curpidname = $pidname ='';
		$maintitle = $mainpid= $mainpidname= $mainalias='';//parent parent
		$modtype='';
		$sidebarcss =  $contentcss =  $bodycss='';

		$maxline= $listfg ='';
		$breadarr = array();
		$seo1 = array();$seo2 = array();$seo3 = array();
		//array_push($stack, "apple", "raspberry");
		//array_unshift($seo1, $row['seo1']);


//
$act = @htmlentitdm($_GET['act']);$act2 = @htmlentitdm($_GET['act2']);$pidname = @htmlentitdm($_GET['pidname']);
$alias = @htmlentitdm($_GET['alias']);$tid = @intval($_GET['tid']);
$catid = @intval($_GET['catid']);
//$page = @intval($_GET['page']);//page is in file_inc.php
$fid = @intval($_GET['fid']);$search = @htmlentitdm($_GET['search']);$searchpage = @htmlentitdm($_GET['searchpage']);//htmlspecialchars
//
if(empty($act)) $act='index';
if($catid=='') $catid=0;

/*------------some variable------------*/

$dateall = date("Y-m-d H:i:s");
$dateday = date("Y-m-d");

//-----begin lang-------------



//多站点代码 multisite code：
$mainlang = 'cn';
define('MAINLANG', $mainlang);  //must here ,only use in front
define('LANG', $mainlang);
 define('LANGPATH',  $mainlang); //when no multi lang...
 define('BASEURLPATH',  $baseurl);

//-----end lang------------- 
 

		/*---------some config, other in config.php above require*/
				$uploaddir=LANG.'/';
				$stapath=$baseurl.$stadir;
				define('STAPATH', $stapath);
				define('STAROOT',WEB_ROOT.$stadir);
				define('UPLOADROOT',STAROOT.'upload/');
				define('UPLOADROOTIMAGE',STAROOT.'upload/image/'.$uploaddir);
				define('TMIMG',STAPATH.'img/tm.gif');

				define('UPLOADPATH', $stapath.'upload/');
				define('UPLOADPATHIMAGE', UPLOADPATH.'image/'.$uploaddir);
	 
			define('DEFAULTIMG',STAPATH.'img/defaultimg.jpg');
			define('DEFAULTIMGDIV','<img src="'.DEFAULTIMG.'" alt="" />');
	  
			$userbh='bh2010079002demososo';
			define('USERBH', $userbh);
			$andlangbh=" and lang='".LANG."'  and pbh='".USERBH."' ";
			$noandlangbh=" lang='".LANG."'  and pbh='".USERBH."' ";
			define('ANDLANGBH', $andlangbh);
			define('NOANDLANGBH', $noandlangbh);
		 

?>
<?php
require_once INCLUDE_ROOT.'func_frontcommon.php';


 
require_once WEB_ROOT.'api/apiinc/file_apiinc.php';

?>
