<?php
/**
 *----------------------------------------------------------------------------*
 * 版权所有 2005-2010 GV32.COM，并保留所有权利。
 * 网站地址: http://www.gv32.com；
 * 作者: GV32.COM
 *----------------------------------------------------------------------------*
**/
class Company
{
	function Company()
	{
		//缓存
		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);	
		
		$act = trim($_REQUEST["act"]);
		
		if($act=='')
		{
			$this -> infolist();
		}
			
	}
	
	function infolist()
	{
			$sqlQuery 	= " SELECT a.* ,s.artsort_name  FROM  artlice as a ,artsort  as s   WHERE a.artsort_id = s.artsort_id and a.art_enabled = 1  and a.art_sysfile = 'company' ORDER BY a.`art_id`  ";
			$infodetail 	= $GLOBALS['MySql']  ->  selectOne($sqlQuery);
			$GLOBALS['Templ'] -> assign('infodetail',$infodetail);
			$GLOBALS['Templ'] -> display('art_tpl.html');
	}
}

$Company = new Company();

?>