<?php
/**
 *----------------------------------------------------------------------------*
 * 版权所有 2005-2010 GV32.COM，并保留所有权利。
 * 网站地址: http://www.gv32.com；
 * 作者: GV32.COM
 *----------------------------------------------------------------------------*
**/
class Contactus
{
	function Contactus()
	{
		//缓存
		if($GLOBALS["WebConfig"]["webtmp"]==1)
		{
			$GLOBALS['Templ'] -> caching = true;
			if($GLOBALS["WebConfig"]["webtmptime"] > 0 ){
				$GLOBALS['Templ'] -> cache_lifetime = $GLOBALS["WebConfig"]["webtmptime"] ;  //60 *  60 * 24
			}else{
				$GLOBALS['Templ'] -> cache_lifetime = 3600 ;  //60 *  60 * 24
			}
			$GLOBALS['Templ'] -> cache_dir = ROOT_PATH.$GLOBALS['cache_path'];
		}
		
		$getconfig = $GLOBALS['Helpe'] -> get_config();
		$GLOBALS['Templ'] -> assign('getconfig',$getconfig);

		$getmenu = $GLOBALS['Helpe'] -> get_menu();
		$GLOBALS['Templ'] -> assign('getmenu',$getmenu);
		
		$getartsort = $GLOBALS['Helpe'] -> get_artsort();
		$GLOBALS['Templ'] -> assign('getartsort',$getartsort);
		

		$getlink = $GLOBALS['Helpe'] -> get_link();
		$GLOBALS['Templ'] -> assign('getlink',$getlink);
		
		$getads = $GLOBALS['Helpe'] -> get_ads( $instr = '1,2,3,4,5,6,7,8,9,10,11' );
		$GLOBALS['Templ'] -> assign('getads',$getads);
		
		$getuserlink = $GLOBALS['WebSe']->getuserlink();
		$GLOBALS['Templ']->assign('getuserlink',$getuserlink);
		$this -> infolist();
	}
	
	function infolist( $strArray = array( 0 => 1 ) )
	{
		if( $GLOBALS["WebConfig"]["webhtml"] == 1 )
		{
			$nowaddress = '您现在所在的位置：<a href="'.BASE_WEBURL.'/">首页</a> > <a href="'.BASE_WEBURL.'/contactus.html">联系我们</a>';
		}else{
			$nowaddress = '您现在所在的位置：<a href="'.BASE_WEBURL.'/">首页</a> > <a href="'.BASE_WEBURL.'/?load=contactus">联系我们</a>';
		}
			$sqlQuery 	= " SELECT a.* ,s.ars_name  FROM  ".SQL_PREFIX."artlice as a ,".SQL_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 	= $GLOBALS['MySql']  ->  selectOne($sqlQuery);
			
			$webtitle  		= $infodetail["art_title"];
			
			$GLOBALS['Templ'] -> assign('webtitle',$webtitle);
			$GLOBALS['Templ'] -> assign('nowaddress',$nowaddress);
			$GLOBALS['Templ'] -> assign('infodetail',$infodetail);
			
			$GLOBALS['Templ'] -> display('contactus_tpl.html');
	}
}


$Contactus = new Contactus();


?>