<?php
/**
 *----------------------------------------------------------------------------*
 * 版权所有 2010-2016 HuCart.COM，并保留所有权利。
 * 网站地址: http://Www.HuCart.Com；
 * 作者: HuCart.COM
 *----------------------------------------------------------------------------*
**/
class Contactus
{
	function Contactus()
	{
		//缓存
		if($GLOBALS["WebConfig"]["webtmp"]==1)
		{
			$this -> view -> caching = true;
			if($GLOBALS["WebConfig"]["webtmptime"] > 0 ){
				$this -> view -> cache_lifetime = $GLOBALS["WebConfig"]["webtmptime"] ;  //60 *  60 * 24
			}else{
				$this -> view -> cache_lifetime = 3600 ;  //60 *  60 * 24
			}
			$this -> view -> cache_dir = ROOT_PATH.$GLOBALS['cache_path'];
		}
 

		$getmenu = $this -> helper -> get_menu();
		$this -> view -> assign('getmenu',$getmenu);
		
		$getartsort = $this -> personal  -> get_artsort();
		$this -> view -> assign('getartsort',$getartsort);
		

		$getlink = $this -> helper -> get_link();
		$this -> view -> assign('getlink',$getlink);
		
		$getads = $this -> helper -> get_ads( $instr = '1,2,3,4,5,6,7,8,9,10,11' );
		$this -> view -> assign('getads',$getads);
		
		$getuserlink = $GLOBALS['WebSe']->getuserlink();
		$this -> view ->assign('getuserlink',$getuserlink);
		$this -> infolist();
	}
	
	function infolist( $strArray = array( 0 => 1 ) )
	{

			$now_address = '您的位置：<a href="'.BASE_WEBURL.'/">首页</a> > <a href="'.BASE_WEBURL.'?/contactus.html">联系我们</a>';

			$sql_query 	= " SELECT a.* ,s.ars_name  FROM  ".$this -> db -> prefix."article as a ,".$this -> db -> prefix."artsort  as s   WHERE a.ars_id = s.ars_id and a.art_enabled = 1  and a.art_sysfile = 'contactus' ORDER BY a.`art_id`  ";
			
			$infodetail 	= $this -> db ->  select_one($sql_query);
			
			$webtitle  		= $infodetail["art_title"];
			
			$this -> view -> assign('webtitle',$webtitle);
			$this -> view -> assign('now_address',$now_address);
			$this -> view -> assign('infodetail',$infodetail);
			
			$this -> view -> display('contactus_tpl.html');
	}
}


$Contactus = new Contactus();


?>