<?php
if(!defined('IN_SYS')){	exit('Access Denied' );}
date_default_timezone_set("Asia/Shanghai");//设置默认的时区
$ReturnUrl=$_SERVER["HTTP_REFERER"]; //获取上一个网页地址

//数据为空时函数
function EofInfo($E_info){
	echo ("<div class=\"NoInformation\">暂无 <span class=\"NoInformation_shineText\">".$E_info."</span> 信息!</div>");
}

//获取表单项目
function GetForm(){
	global $HTTP_POST_VARS;
	global $HTTP_GET_VARS;
	if(function_exists(array_merge)){
		$ArrPostAndGet=array_merge((array)$HTTP_POST_VARS,(array)$HTTP_GET_VARS);
	}else{
		foreach($HTTP_POST_VARS as $key=>$value){
		$ArrPostAndGet[]=$value;
		}
		foreach($HTTP_GET_VARS as $key=>$value){
		$ArrPostAndGet[]=$value;
		}
	}	
	foreach($ArrPostAndGet as $key=>$value)
	{
		echo $key.':--------------'.$value.'<br>';
	}
}

function ShowXiaNav($cataid,$nowID,$openlink,$show=0){
	global $conn;
	$cataid = floatval($cataid);
	$nowID  = floatval($nowID);
	$conn->query("select id,title from site_category where CatalogParentId ='$cataid' order by SortId asc");
	while($rs = $conn->fetch_array()){
		if($rs['id']==$nowID){
			if($show==0){
				echo '<a href="'.$openlink.'?cid='.$rs['id'].'"  id="Active">'.$rs['title'].'<span></span></a>';
			}else{
				echo '<li><a href="'.$openlink.'?cid='.$rs['id'].'">'.$rs['title'].'</a></li>';
			}
		}else{
			if($show==0){
				echo '<a href="'.$openlink.'?cid='.$rs['id'].'">'.$rs['title'].'<span></span></a>';
			}else{
				echo '<li><a href="'.$openlink.'?cid='.$rs['id'].'">'.$rs['title'].'</a></li>';
			}
		}
	}
	echo '<script type="text/javascript">
			//菜单
				jQuery("#navmenu").slide({ type:"menu", titCell:".nLi", targetCell:".sub",effect:"slideDown",delayTime:300,triggerTime:0,defaultPlay:false,returnDefault:true});
		</script>';
}

//JS转向函数
function GoLink($StrLink){
	echo '<script type="text/javascript">';
	echo "window.location.href = '".$StrLink."';";
	echo '</script>';
	exit;
}

//JS弹出提示然后返回
function OutErrorBack($Erinfo){
	//echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";
	echo '<script type="text/javascript">';
	echo "alert('".$Erinfo."');";
	echo 'history.back(-1);';
	echo '</script>';
	exit;
}

//JS弹出提示然后转向页面
function OutErrorGo($Erinfo,$StrLink){
	echo '<script type="text/javascript">';
	echo "alert('".$Erinfo."');";
	echo "window.location.href = '".$StrLink."';";
	echo '</script>';
	exit;
}

//显示当前日期函数
function Now(){
	$Now = date('Y-m-d H:i:s');
	return $Now;
}

//格式化时间
function FormatTime($Atype,$Adate){
	switch($Atype){
		case 1:
			$Adate = date("Y-m-d",strtotime($Adate));
			return $Adate;
		break;
		case 2:
			$Adate = date("m-d",strtotime($Adate));
			return $Adate;
		break;
		case 3:
			$Adate = date("d",strtotime($Adate));
			return $Adate;
		break;
		case 4:
			$Adate = date("m",strtotime($Adate));
			return $Adate;
		break;
		case 5:
			$Adate = date("Y",strtotime($Adate));
			return $Adate;
		break;
		case 6:
			$Adate = date("Y-m",strtotime($Adate));
			return $Adate;
		break;
	}
}

//判断是否选中
function Check_s($C_str,$InfoType){
	if($C_str == $InfoType){
		$Check_s = " checked";
		return $Check_s;
	}
}
function Check_option($C_str,$InfoType){
	if($C_str==$InfoType){
		$Check_option = " selected";
		return $Check_option;
	}
}

// 得到两日期之间间隔的秒数
function DateDiff ($interval, $date1,$date2){ 
	$timedifference = strtotime($date2) - strtotime($date1); 
	switch ($interval){  
	case "w": $retval = bcdiv($timedifference ,604800); break;
	case "d": $retval = bcdiv( $timedifference,86400); break;
	case "h": $retval = bcdiv ($timedifference,3600); break;
	case "n": $retval = bcdiv( $timedifference,60); break;
	case "s": $retval = $timedifference; break;
	}
	return $retval;
}

/*获取数据信息总条数*/
function RequestCount($table,$cond){
	$db = mysql_query("select * from ".$table." where ($cond)");
	$rs = mysql_num_rows($db);
	if($rs>0){
		return $rs;
	}else{
		return 0;
	}
}

/*自定义信息展示*/
function Info($id){
	$id = intval($id);
	$db = mysql_query("select content from ".DB_TablePre."singlepage where id=".$id."");
	$rs = mysql_fetch_row($db);
	if($rs){
		return $rs[0];
	}
}

//栏目下级分类显示，横向显示
function ShowMenu($maxType,$xia_t,$oplink,$table){
	$maxType = intval($maxType);
	$db = mysql_query("select id,title from ".DB_TablePre.$table." where CatalogParentId=".$maxType." order by Sortid asc");
	while($rsginfo = mysql_fetch_array($db)){	
		if (instr(','.$xia_t.',',','.$rsginfo["id"].',')>0){
			echo "<a href='$oplink?cid=".$rsginfo["id"]."' style=color:#FF6600;><b>".$rsginfo["title"]."</b></a>&nbsp;&nbsp;";
		}else{
			echo "<a href='$oplink?cid=".$rsginfo["id"]."'>".$rsginfo["title"]."</a>&nbsp;&nbsp;";
		}
	}
}

/*信息打开页面程序*/
function InfoView($table,$gotoUrl){
	$id=intval($_REQUEST["aid"]);
	if($id=="" || !is_numeric($id)){
		OutErrorBack("Error, please return!");
	}else{
		$db = mysql_query("select id,type,title,content,adate,aAuthor,aCount,pic,attachments from ".DB_TablePre.$table." where id = ".$id."");
		$rs = mysql_fetch_row($db);
		if($rs){
			mysql_query("update ".DB_TablePre.$table." set aCount = aCount + 1 where id = ".$id."");
			$clickCount = $rs[6]+1;
		}
			$thisTypeA = Request_table("type","content",$id);
			$thisTypeB = Request_table("InfoType","category",$thisTypeA);
		switch ($thisTypeB){
			case "ClsVideosList":

				echo "<div id=\"article_view_content\">";
				echo "<div class=\"aContent\" style=\"text-align:center;\">";
				echo '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="480" height="320">';
				echo '<param name="movie" value="/lib/swf/videoPlayer.swf">';
				echo '<param name="quality" value="high">';
				echo '<param name="allowFullScreen" value="true" />';
				echo "<param name=\"FlashVars\" value=\"file=".$rs[8]."&autostart=false&repeat=0&image=".$rs[7]."\" />";
				echo "<embed src=\"/lib/swf/videoPlayer.swf\" allowfullscreen=\"true\" allowscriptaccess=\"always\" quality=\"high\" wmode=\"\" pluginspage=\"http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" flashvars=\"file=".$rs[8]."&autostart=false&repeat=0&image=".$rs[7]."\" width=\"480\" height=\"320\" id=\"vPlayer\" name=\"vPlayer\"></embed>";
				echo '</object>';
				echo '</div>';
				echo "</div>\n";
				ShowNext($rs[0],$rs[1],$gotoUrl,$rs[4]);

			break;
			case "ClsDownloadsList":
/*
				echo '<script type="text/javascript">';
				echo "location.href='".$rs[7]."';";
				echo '</script>';
*/
				echo '<p style="text-align:center;">';
				echo "<a href=\"".$rs[7]."\"><img src=\"/temp/common/btn_download.gif\" /></a>";
				echo '</p>';
			break;
			default:

				echo "<div id=\"article_view_content\">\n";
					echo "<h2 class=\"aTitle\"><strong>".$rs[2]."</strong></h2>\n";

					if ($thisTypeB == "ClsNewsList"){
					echo "<div class=\"aProperties\">作者:".$rs[5]."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;点击:".$clickCount."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;时间:".FormatTime(1,$rs[4])."</div>\n";
					}        

					echo "<div class=\"aContent\" id=\"aContent\">";
						ShowPage($rs[3]);
					echo "</div>\n";
				echo "</div>\n";
				ShowNext($rs[0],$rs[1],$gotoUrl,$rs[4]);

			break;
		}
	}
}

/*处理有翻页标签的函数*/
function ShowPage($infoContent){
	//获取当前URL地址以及参数
	$action = "http://".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
    $query = explode('&', $_SERVER['QUERY_STRING']);
	if(count($query)>0){
		for($i=0;$i<count($query);$i++){
			$a = explode("=",$query[$i]);
			if(strcmp ("page",$a[0]) <> 0){			
				$temp .= $a[0] . "=" . $a[1] . "&";
			}
		}
	}
	if(instr($infoContent,'$$SplitPage$$')==0){
		echo $infoContent;
	}else{
		$S_N_p = explode('$$SplitPage$$' , $infoContent);//此处为单引号，双引号会被认为是变量
				
		if(isset($_GET["page"])){
			$page = intval($_GET["page"]);
		}else{
			$page = 1;
		}
		if($page>count($S_N_p)){
			$page = count($S_N_p);
		}
		echo $S_N_p[$page-1];
		
		echo '<div class="infoViewPage">';
			for($i=0;$i<count($S_N_p);$i++){	
				$j = $i +1;
				if($j == $page){
					echo "<span class=\"visited\">$j</span>&nbsp;&nbsp;";
				}else{
					echo "<a href=\"".$action."?".$temp."page=$j\">$j</a>&nbsp;&nbsp;";
				}
			}
		echo '</div>';
	}
}

/*上一篇、下一篇*/
function ShowNext($SN_ID,$SN_Type,$SN_Link,$SN_adate){
	echo '<div class="show_next">';
	$dbA = mysql_query("select id,title,adate,type from ".DB_TablePre."content where adate>'".$SN_adate."' and type=".$SN_Type." and id<>".$SN_ID."  order by adate asc limit 0,1");
	$rsA = mysql_fetch_array($dbA);
	if($rsA){
		echo "上一篇：<a href=\"".$SN_Link."?aid=".$rsA[0]."\">".$rsA[1]."</a><br>";
	}else{
		echo '上一篇：没有了<br>';
	}
	$dbC = mysql_query("select id,title,adate,type from ".DB_TablePre."content where adate<'".$SN_adate."' and type=".$SN_Type." and id<>".$SN_ID."  order by adate desc limit 0,1");
	$rsC = mysql_fetch_array($dbC);
	if($rsC){
		echo "下一篇：<a href=\"".$SN_Link."?aid=".$rsC[0]."\">".$rsC[1]."</a><br>";
	}else{
		echo '下一篇：没有了<br>';
	}
	echo '</div>';
}

/*
instr()函数
第一句strstr()函数改用stristr()不区分大小写
如果要找的字符(串)$needle不存在返回0
*/
function instr($string,$needle){
   $strend   = @stristr($string,$needle);   //$needle不存在则stristr()函数返回为空
   if(empty($strend)) return 0;           //$needle不存在主函数返回0
   else{
     $strstart = str_replace("$strend", "", "$string");
     $strlen    = strlen($strstart);
     $start     = $strlen+1;
     return $start;
   }
}

/*
instrrev()函数
从VBScript转换到PHP的InStrRev函数，从末尾查找，然后返回字符串所在位置.
*/
function instrrev($n,$s){ 
	$x=strpos(chr(0).strrev($n),$s)+0; 
	return (($x==0) ? 0 : strlen($n)-$x+1);
}

//删除单个文件
function ImgDelpic($dpic,$del_folder){
	if(instr($dpic,"://")==0){
		$file = $del_folder.$dpic;
		//允许删uploads中的a和b中的文件
		if (instr($file,"a")>0 || instr($file,"b")>0){
			if(file_exists($file)){
				@unlink($file); //删除文件
			}
		}
	}
}

//批量判断删除图片程序
function ImgDel($Oldpic,$NowPic,$Pic_path){
//$Pic_path是关键字段，在php中路径是比较重要的。
//函数操作时需要对文件路径做好设置 如：/images_1/ == ../images_1/ 
	$O_P_A = explode(",",$Oldpic);
	for($i=0;$i<=count($O_P_A);$i++){	
		if(instr($O_P_A[$i],'://')==0 && $O_P_A[$i] != ""){	
			//判断现在的图片是否存在老地址中
			if(instr($NowPic,$O_P_A[$i])==0){
				//echo $O_P_A[$i].'<br>';
				ImgDelpic($O_P_A[$i],$Pic_path);
			}
		}
	}
}
//批量判断删除图片程序

//地址转化，适用于修改页面后跳转回上一个操作页面。
function ReturnUrlGo($R_url,$R_tpye){
	if($R_tpye==1){
		$R_url=str_replace("&","{|}",$R_url);
	}elseif($R_tpye=0){
		$R_url=str_replace("{|}","&",$R_url);
	}
	$ReturnUrlGo=$R_url;
	return $ReturnUrlGo;
}
//地址转化，适用于修改页面后跳转回上一个操作页面。

//检测是否被选择高亮显示
function Check_color($Check_ID,$Type_2){
     $Type_2=(int)$Type_2;
	 if ($Check_ID == $Type_2) {
	 	$Check_color="font-weight:bold;color:#FF3300;";	
	 }
	 return $Check_color;
}
//检测是否被选择高亮显示

//===显示所有分类====
//==parentID是父目录ID==
//==Table是数据库表格==
//==Mcataid被选中的ID号==
//==Check_Xia显示的目录深度 如：4  则显示到第三级目录==
function ShowSelect($parentID,$Table,$Mcataid,$Check_Xia,$Check_Recursion){
	$db = mysql_query("select * from ".DB_TablePre.$Table." where CatalogParentId = ".$parentID." order by SortId asc");
	while($rs_Sel = mysql_fetch_array($db)){
		if($Check_Xia > $rs_Sel["Mlevel"]){
			 $M_title=$rs_Sel["title"];			 
			 $tempcataStr="<option value=\"".trim($rs_Sel["id"])."\"";
			 if (instr(','.$Mcataid.',',','.$rs_Sel["id"].',')>0){
				$tempcataStr = $tempcataStr." selected";
			 }
			 $tempcataStr = $tempcataStr.">";			 
			 $tempcataStr = $tempcataStr."&nbsp;&nbsp;";		
			 $tempcataStr .= str_repeat("&nbsp;→",$rs_Sel["Mlevel"]-1);		
			 $tempcataStr = $tempcataStr."&nbsp;".trim($rs_Sel["title"])."</option>" ;			
				echo  $tempcataStr;
			if ($Check_Recursion == true){
				ShowSelect($rs_Sel["id"],$Table,$Mcataid,$Check_Xia,$Check_Recursion);
			}
		}
	}
}

//获取栏目自己分类程序
//根据修改的数据库结构进行SQL查询。
//因为添加了一个Myrootid字段，该字段在rootid的基础上添加了“,”号区别，便于sql的查找。
//以下sql语句查询也可以写成"Myrootid like '%,8,%' "这样的形式,在运用其他数据中可以这样写。
//如果是ACCESS数据库用instr(Myrootid,',".$Get_ID.",')>0，如果是Mysql用Myrootid like '%,".$Get_ID.",%'。
function GetSqlSuper($Get_ID,$Table){
	if(isset($Get_ID)){
		$GetSqlSuper=$Get_ID;
		$db = mysql_query("select id from ".DB_TablePre.$Table." where instr(Myrootid,',".$Get_ID.",')>0 order by id asc");
		$rs = mysql_fetch_array($db);
		if($rs){
			while($rs = mysql_fetch_array($db)){
				$GetSqlSuper .= ",".$rs[0];
			}
		}
		return $GetSqlSuper;
	}else{
		return 0;
	}
}

//无限极栏目的递归调用函数
//$ShowType表示显示类型:S表示是下拉菜单形式,A表示是连接列表带连接的
function ShowTree($parentID,$ShowType){
	global $conn;
	global $OpenLink;
	global $selectType;
	if($parentID !="" && is_numeric($parentID)){
		//echo $parentID."<br>";
		$rootid=Request_table("rootid","category","id=".$parentID."",0);
		$rs_St=$conn->execute("select ID,title,leiid,rootid,Mlevel from ".DB_TablePre."category where CatalogParentId='".$rootid."' order by SortId asc");
		while(!$rs_St->Eof){
			$ss=RepeatStr("&rarr;",$rs_St["Mlevel"]);
			$Menu=$ss.$rs_St[1];
			if($ShowType=="S"){
			//判断当是下拉列表的时候谁被选中
				if($rs_St[0] != $selectType){
					$select="";
				}else{
					$select="selected";
				}
				$Menu="<option value=\"".$rs_St[0]."\" $select>$Menu</option>".chr(10);
			}elseif($ShowType=="A"){
				$Menu="<a href=\"$OpenLink?cataid=".$rs_St[0]."\">$Menu</a>".'<br>'.chr(10);
			}
			echo $Menu;			
			ShowTree((int)$rs_St["id"],$ShowType);//传递过去必须是数字类型,因为默认从数据中读取出来时字符类型.
			$rs_St->MoveNext();
		}
		$rs_St->close();
	}
}

//无限极菜单展示可拓展型
//$coll表示SQL条件，$ShowType表示显示类型:S表示是下拉菜单形式,A表示是连接列表带连接的。
function ShowAllMenu_select($coll,$ShowType){
	global $OpenLink;
	global $selectType;	
	$db = mysql_query("select id,title,rootid,Mlevel,leiid from ".DB_TablePre."category where ".$coll." order by SortId asc");
	while($rs_Sa = mysql_fetch_array($db)){
		$ShowM=$rs_Sa[1];
		if($ShowType=="S"){
			//判断当是下拉列表的时候谁被选中
				if($rs_Sa[0] != $selectType){
					$select="";
				}else{
					$select="selected";
				}
			$ShowM="<option value=\"".$rs_Sa[0]."\" $select>$rs_Sa[1]</option>".chr(10);
		}elseif($ShowType=="A"){
			$ShowM="<a href=\"$OpenLink?cataid=".$rs_Sa[0]."\">$rs_Sa[1]</a>".'<br>'.chr(10);
		}		
		echo $ShowM;
		ShowTree((int)$rs_Sa[0],$ShowType);
	}
}

//获取任意表中单独数据函数
//0代表string
//1其他是bool
function Request_table($files,$table,$fid){
	$fid = intval($fid);
	$db = mysql_query("select ".$files." from ".DB_TablePre.$table." where id='".$fid."'");
	$rs = mysql_fetch_row($db);
	if($rs){
		$var_str=$rs[0];
		return $var_str;
	}
}
function Request_Col($files,$table,$where){
	$db = mysql_query("select ".$files." from ".DB_TablePre.$table." where ".$where);
	$rs = mysql_fetch_row($db);
	if($rs){
		return $rs[0];
	}else{
		return "";
	}
}
function Request_fildes($files,$table,$fid){
	$db = mysql_query("select ".$files." from ".DB_TablePre.$table." where ".$fid."");
	$rs = mysql_fetch_row($db);
	if($rs){
		$var_str=$rs[0];
		return $var_str;
	}
}

/**  
 *  将一个字串中含有全角的数字字符、字母、空格或'%+-()'字符转换为相应半角字符  
 * @access  public  
 * @param   string       $str         待转换字串  
 * @return  string       $str         处理后字串  
**/  
function make_semiangle($str){   
    $arr = array('０' => '0', '１' => '1', '２' => '2', '３' => '3', '４' => '4',   
                 '５' => '5', '６' => '6', '７' => '7', '８' => '8', '９' => '9',   
                 'Ａ' => 'A', 'Ｂ' => 'B', 'Ｃ' => 'C', 'Ｄ' => 'D', 'Ｅ' => 'E',   
                 'Ｆ' => 'F', 'Ｇ' => 'G', 'Ｈ' => 'H', 'Ｉ' => 'I', 'Ｊ' => 'J',   
                 'Ｋ' => 'K', 'Ｌ' => 'L', 'Ｍ' => 'M', 'Ｎ' => 'N', 'Ｏ' => 'O',   
                 'Ｐ' => 'P', 'Ｑ' => 'Q', 'Ｒ' => 'R', 'Ｓ' => 'S', 'Ｔ' => 'T',   
                 'Ｕ' => 'U', 'Ｖ' => 'V', 'Ｗ' => 'W', 'Ｘ' => 'X', 'Ｙ' => 'Y',   
                 'Ｚ' => 'Z', 'ａ' => 'a', 'ｂ' => 'b', 'ｃ' => 'c', 'ｄ' => 'd',   
                 'ｅ' => 'e', 'ｆ' => 'f', 'ｇ' => 'g', 'ｈ' => 'h', 'ｉ' => 'i',   
                 'ｊ' => 'j', 'ｋ' => 'k', 'ｌ' => 'l', 'ｍ' => 'm', 'ｎ' => 'n',   
                 'ｏ' => 'o', 'ｐ' => 'p', 'ｑ' => 'q', 'ｒ' => 'r', 'ｓ' => 's',   
                 'ｔ' => 't', 'ｕ' => 'u', 'ｖ' => 'v', 'ｗ' => 'w', 'ｘ' => 'x',   
                 'ｙ' => 'y', 'ｚ' => 'z',   
                 '（' => '(', '）' => ')', '〔' => '[', '〕' => ']', '【' => '[',   
                 '】' => ']', '〖' => '[', '〗' => ']', '“' => '[', '”' => ']',   
                 '‘' => '[', '’' => ']', '｛' => '{', '｝' => '}', '《' => '<',   
                 '》' => '>',   
                 '％' => '%', '＋' => '+', '—' => '-', '－' => '-', '～' => '-',   
                 '：' => ':', '。' => '.', '、' => ',', '，' => '.', '、' => '.',   
                 '；' => ',', '？' => '?', '！' => '!', '…' => '-', '‖' => '|',   
                 '”' => '"', '’' => '`', '‘' => '`', '｜' => '|', '〃' => '"',   
                 '　' => ' ');   
    return strtr($str, $arr);   
}

//循环连接字符串
function RepeatStr($Str,$R_count){
	for($R_i=1;$R_i<=$R_count-1;$R_i++){
		$RepeatStr .=$Str;
	}
	return $RepeatStr;
}

//获取菜单名称
function GetTitle($typeID,$table){
	$typeID=intval($typeID);
	if($typeID && is_numeric($typeID)){
		$db = mysql_query("select title from ".DB_TablePre.$table." where id='".$typeID."'");
		$rs = mysql_fetch_row($db);
		if($rs){
			$GetTitle = $rs[0];
		}
	}
	return $GetTitle;
}

//获取哦栏目上一级菜单ID或者名称
//$TypeID类别ID号，$SType显示类型，0是显示标题，1是表示显示ID号。
function GetBigTop($typeID,$sType,$table){
	$GetBigTop=$typeID;
	if($typeID && is_numeric($typeID)){
		$db = mysql_query("select id,title,Mlevel,rootid from ".DB_TablePre.$table." where id='".$typeID."'");
		$rs = mysql_fetch_row($db); 
		if($rs){
			if($rs[2]>1){	//当分类深度大于1时说明属于子级分类.
				$T_split=explode(",",$rs[3]);	//分割rootid
				$id_menu=$T_split[$rs[2]-2];	//得到上一级ID号
				$id_f = $T_split[0];//第一大类
				if($sType==1){
					$GetBigTop = $id_menu;
				}else{
					$GetBigTop = $id_f;
				}
			}		
		}
	}
	return $GetBigTop;
}

//GetTop递归显示当前栏目
//==根据当前ID号依次获取上一级栏目显示==
//==parentID是信息ID号==
//==Table是数据库表名==今后可能有很多表，但是表的结构是一样的，只是表名称不一样。
//==NowType是当前的ID号====
function GetTop($parentID,$table,$checkLink,$nowType,$menu_OpenLink){
	$parentID = intval($parentID);
	if(isset($parentID)){
		$db = mysql_query("select id,CatalogParentId,title from ".DB_TablePre.$table." where id=".$parentID."");
		$rs_GT = mysql_fetch_row($db);
		if($rs_GT){			
			$rs_Gtid = $rs_GT[0];				
			GetTop($rs_GT[1],$table,$checkLink,$nowType,$menu_OpenLink);

			if($rs_GT[1]==0){
				//$tag="<a href=\"".CO_SitePath."\" id=\"home\">首页</a> &gt; ";
				//$tag ='<li><a href="'.CO_SitePath.'" id="home">首页</a><span>&nbsp;&gt;&nbsp;</span></li>';
			}else{
				$tag=" &gt; ";
			}
			if(instr(",".$rs_Gtid.",",",".$nowType.",")>0){
				//$G_t="<strong><a href=\"".$menu_OpenLink."?cid=".$rs_GT[0]."\">".$rs_GT[2]."</a></strong>";
				$tag ='<li><a href="'.$menu_OpenLink.'?cid='.$rs_GT[0].'">'.$rs_GT[2].'</a><span>&nbsp;</span></li>';
			}else{
				if($checkLink){
					//$G_t="<a href=\"".$menu_OpenLink."?cid=".$rs_GT[0]."\">".$rs_GT[2]."</a>";
					$G_t="<li><a href=\"".$menu_OpenLink."?cid=".$rs_GT[0]."\">".$rs_GT[2]."</a><span>&nbsp;&gt;&nbsp;</span></li>";
				}else{
					$G_t = '<li><a href="#none">'.$rs_GT[2]."</a><span>&nbsp;&gt;&nbsp;</span></li>";
				}
			}
			echo $tag.$G_t;
		}else{
			$tag ='<li><a href="'.CO_SitePath.'" id="home">首页</a><span>&nbsp;&gt;&nbsp;</span></li>';
			echo $tag;
		}
	}
}



//GetTop递归显示当前栏目
//==根据当前ID号依次获取上一级栏目显示==
//==parentID是信息ID号==
//==Table是数据库表名==今后可能有很多表，但是表的结构是一样的，只是表名称不一样。
//==NowType是当前的ID号====
function GetTop_Link($parentID,$table,$checkLink,$nowType,$menu_OpenLink){
	$parentID = intval($parentID);
	if(isset($parentID)){
		$db = mysql_query("select id,CatalogParentId,title from ".DB_TablePre.$table." where id=".$parentID."");
		$rs_GT = mysql_fetch_row($db);
		if($rs_GT){			
			$rs_Gtid = $rs_GT[0];				
			GetTop_Link($rs_GT[1],$table,$checkLink,$nowType,$menu_OpenLink);

			if($rs_GT[1]==0){
				//$tag="<a href=\"".CO_SitePath."\" id=\"home\">首页</a> &gt; ";
				//$tag ='<li><a href="'.CO_SitePath.'" id="home">首页</a><span>&nbsp;&gt;&nbsp;</span></li>';
			}else{
				$tag=" &gt; ";
			}
			if(instr(",".$rs_Gtid.",",",".$nowType.",")>0){
				//$G_t="<strong><a href=\"".$menu_OpenLink."?cid=".$rs_GT[0]."\">".$rs_GT[2]."</a></strong>";
				$tag ='<a href="'.$menu_OpenLink.'?cid='.$rs_GT[0].'">'.$rs_GT[2].'</a><span>&nbsp;</span>';
			}else{
				if($checkLink){
					//$G_t="<a href=\"".$menu_OpenLink."?cid=".$rs_GT[0]."\">".$rs_GT[2]."</a>";
					$G_t="<a href=\"".$menu_OpenLink."?cid=".$rs_GT[0]."\">".$rs_GT[2]."</a><span>&nbsp;&gt;&nbsp;</span>";
				}else{
					$G_t = '<a href="#none">'.$rs_GT[2]."</a><span>&nbsp;&gt;&nbsp;</span>";
				}
			}
			echo $tag.$G_t;
		}else{
			$tag ='<a href="'.CO_SitePath.'" id="home">首页</a><span>&nbsp;&gt;&nbsp;</span>';
			echo $tag;
		}
	}
}

//正则表单获取html图片地址
function RequestImg($test){
	//preg_match_all("<p>.*src=\"([^^]*?)\".*<\/p>/i",$test,$match); 
	preg_match_all("/<img\s+?.*?src=(\"|\'|)?(.+?\.(?:jpg|gif|png|bmp))\\1.*?>/i",$test,$match);
	foreach ($match[2] as $key => $value){
    	$RequestImg .= "$value,";
	}
	return $RequestImg;
}

//获取文件大小
function GetSize($filename){
	$size = filesize($filename);
	//$size = filesize(str_replace("/uploads/a/","",$filename));
	$count = 0;
	$format = array("B","KB","MB","GB","TB","PB","EB","ZB","YB");
	while(($size/1024)>1 && $count<8){
       $size=$size/1024;
       $count++;
	}
	$return = number_format($size,0,'','.')." ".$format[$count];
	return $return;
}

#**************************************
//翻页显示网站前台程序
function PageControlMain($num_cnt,$page_cnt,$page,$isFeedbackPage,$wap=''){
//翻页处理总函数  $num_cnt总记录数  $page_cnt总页数  $page当前页码	
    $action = "http://".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
    $query = explode("&", $_SERVER['QUERY_STRING']);
	if(count($query)>0){
		for($i=0;$i<count($query);$i++){
			$a = explode("=",$query[$i]);
			if(strcmp ("page",$a[0]) <> 0){			
				$temp .= $a[0] . "=" . $a[1] . "&";
			}
		}
	}
	echo "<div class=\"PageProgram\">\n";
	echo "<form method=\"get\" onsubmit=\"document.location = '".$action ."?".$temp ."page='+ this.page.value;return false;\">\n";
	if($page<=1){
		echo "<span id=\"p_first\">首页</span>\n";
		echo "<span id=\"p_previous\">上一页</span>\n";
	}else{
		echo "<span id=\"p_first\"><a href=".$action."?".$temp."page=1>首页</a></span>\n";
		echo "<span id=\"p_previous\"><a href=".$action."?".$temp."page=".($page-1).">上一页</a></span>\n";
	}	
    if($page>=$page_cnt){
		echo "<span id=\"p_next\">下一页</span>\n";
		echo "<span id=\"p_last\">尾页</span>\n";
	} else{
		echo "<span id=\"p_next\"><a href=".$action."?".$temp."page=".($page+1).">下一页</a></span>\n";
		echo "<span id=\"p_last\"><a href=".$action."?".$temp."page=".$page_cnt.">尾页</a></span>\n";     
	}
	//echo "<span id=\"p_perPage\">每页共".$page_size."条信息</span>\n";
	echo "<span id=\"p_page\">页次: ".$page."/".$page_cnt."</span>\n";
	//echo "<span id=\"p_total\">共有".$num_cnt."条信息</span>\n";
	global $page_size;
		
	echo "<span id=\"p_jump\">跳转到:<input type=\"text\" name=\"page\" maxlength=\"6\" value=\"".$page."\" class=\"PageProgram_inputA\" onkeyup=\"this.value=this.value.replace(/\D/g,'')\" onafterpaste=\"this.value=this.value.replace(/\D/g,'')\"><input type=\"submit\" value=\"GO\" class=\"PageProgram_inputB\"></span>";
	
	echo "\n</form>\n";
	echo "</div>\n";
}

/* 
Utf-8、gb2312都支持的汉字截取函数 
KillWord(字符串, 截取长度, 开始长度, 编码); 
编码默认为 utf-8 
开始长度默认为 0 
*/
function KillWord($string, $sublen, $start = 0, $code = 'UTF-8') { 
    if($code == 'UTF-8') { 
        $pa = "/[\x01-\x7f]|[\xc2-\xdf][\x80-\xbf]|\xe0[\xa0-\xbf][\x80-\xbf]|[\xe1-\xef][\x80-\xbf][\x80-\xbf]|\xf0[\x90-\xbf][\x80-\xbf][\x80-\xbf]|[\xf1-\xf7][\x80-\xbf][\x80-\xbf][\x80-\xbf]/"; 
        preg_match_all($pa, $string, $t_string); 
		if(count($t_string[0]) - $start > $sublen) return join('', array_slice($t_string[0], $start, $sublen))."..."; 
		return join('', array_slice($t_string[0], $start, $sublen)); 
		}else{ 
		$start = $start*2; 
		$sublen = $sublen*2; 
		$strlen = strlen($string); 
		$tmpstr = ''; 
			for($i=0; $i< $strlen; $i++) { 
            if($i>=$start && $i< ($start+$sublen)) { 
                if(ord(substr($string, $i, 1))>129) { 
                    $tmpstr.= substr($string, $i, 2); 
                } else { 
                    $tmpstr.= substr($string, $i, 1); 
                } 
            } 
            if(ord(substr($string, $i, 1))>129) $i++; 
        } 
        if(strlen($tmpstr)< $strlen ) $tmpstr.= "..."; 
        return $tmpstr; 
    } 
}

function Html($string){
	$string = str_replace(chr(13),"<br>",$string);
	$string = str_replace(chr(32),"&nbsp;",$string);
	$string = str_replace("<","&lt;",$string);
	$string = str_replace(">","&gt;",$string);
	return $string;
}

function AreaHtml($string){
	$string = str_replace(chr(13),"<br>",$string);
	$string = str_replace(chr(32),"&nbsp;",$string);
	$string = str_replace("&lt;","<",$string);
	$string = str_replace("&gt;",">",$string);
	return $string;
}

function NoHtml($strcontent){
	if(!empty($strcontent)){
        $strcontent=str_replace("<","&lt;",$strcontent);
		$strcontent=str_replace(">","&gt;",$strcontent);
		$strcontent=str_replace("'","&acute;",$strcontent);
        $strcontent=str_replace(chr(13),"<br>",$strcontent);
		$strcontent=str_replace(chr(32),"&nbsp;",$strcontent);
	}
	return $strcontent;
}

//文章列表展示函数
function ArticleList($Table,$Cond,$ListCSS,$All_count,$OPEN_LINK){
	global $InfoType_xia;
	global $page_size;
	$order = "adate desc";
	$sql = "select id,title,content,adate,tColor,jumpUrl,pic,aCount from ".DB_TablePre.$Table." where ".$Cond." order by ".$order;
	$conn = new dbo();
	$conn->query($sql);
	$page_size = $All_count;				 //定义每页显示多少记录
	$num_cnt = mysql_num_rows($conn->res); //获取总记录数
	$page_cnt = ceil($num_cnt/$page_size);  //计算总页数
	if(isset($_GET["page"])){
		$page = intval($_GET["page"]);
	}else{
		$page = 1;
	}
    if ($page<1){
        $page=1;
	}
    elseif ($page>$page_cnt){
        $page=$page_cnt;
    }
	$query_start = ($page - 1 ) * $page_size;   //计算每页开始的记录号
	$query_sql = $sql." limit $query_start,$page_size"; //使用limit获取记录
	$conn->query($query_sql);
	
	if($num_cnt==0){
		EofInfo(GetTitle($InfoType_xia,"category"));
	}else{
		
		while($rs = mysql_fetch_array($conn->res)){
			echo "<ul>";
			//获取标题颜色
			//if(isset($rs["tColor"])) $Color=" style=\"color:".$rs["tColor"].";\""; else $Color="";
			if(!empty($rs["tColor"])) $Color=" style=\"color:".$rs["tColor"].";\""; else $Color="";
			if($rs["jumpUrl"] !="") $aUrl=$rs["jumpUrl"]; else $aUrl="$OPEN_LINK?aid=".$rs["id"]."";	
			$date = FormatTime(1,$rs["adate"]);
			$content = replaceHtmlAndJs($rs['content']);
			$content = KillWord($content,80);
			$pic = $rs['pic'];
			if(empty($pic)){$pic = 'temp/images/companyNews.jpg';}
			$title = $rs['title'];
			$acount = $rs['aCount'];
			
			echo "<li class=\"clear\"><a href=\"".$aUrl."\" title=\"".$rs["title"]."\"".$Color.">".KillWord($rs["title"],39)."</a><span>".FormatTime(1,$rs["adate"])."</span></li>";
			
			//echo '<a href="'.$aUrl.'"><div class="newsList fl" '.$Color.'><h3>'.KillWord($rs["title"],40).'</h3><p>'.$content.'</p></div><div class="newsDate fl"><p>'.$date.'</p></div></a>';
			
/*			echo '<li class="clear">
                    <div class="left fl">
                        <a href="'.$aUrl.'"><img src="'.$pic.'" onerror="this.src=\'temp/images/companyNews.jpg\'" alt="'.$title.'"/></a>
                    </div>
                    <div class="right fr">
                        <h3><a href="'.$aUrl.'">'.KillWord($title,48).'</a></h3>
                        <h4><span class="first">发布日期：'.$date.'</span><span>点击：'.$acount.'</span></h4>
                        <p>'.$content.'</p>
                    </div>
                </li>';*/
			
			echo "</ul>";
		}
		if($num_cnt > $page_size){
			PageControlMain($num_cnt,$page_cnt,$page,0);
		}
	}
}

//文章列表展示函数
function ArticleList_wap($Table,$Cond,$ListCSS,$All_count,$OPEN_LINK){
	global $InfoType_xia;
	global $page_size;
	$order = "adate desc";
	$sql = "select id,title,content,adate,tColor,jumpUrl from ".DB_TablePre.$Table." where ".$Cond." order by ".$order;
	$conn = new dbo();
	$conn->query($sql);
	$page_size = $All_count;				 //定义每页显示多少记录
	$num_cnt = mysql_num_rows($conn->res); //获取总记录数
	$page_cnt = ceil($num_cnt/$page_size);  //计算总页数
	if(isset($_GET["page"])){
		$page = intval($_GET["page"]);
	}else{
		$page = 1;
	}
    if ($page<1){
        $page=1;
	}
    elseif ($page>$page_cnt){
        $page=$page_cnt;
    }
	$query_start = ($page - 1 ) * $page_size;   //计算每页开始的记录号
	$query_sql = $sql." limit $query_start,$page_size"; //使用limit获取记录
	$conn->query($query_sql);
	
	if($num_cnt==0){
		EofInfo(GetTitle($InfoType_xia,"category"));
	}else{
		echo '<div class="subpageNews"><ul>';
		while($rs = mysql_fetch_array($conn->res)){
			//echo "<ul class=\"$ListCSS item2\">";
			//获取标题颜色
			//if(isset($rs["tColor"])) $Color=" style=\"color:".$rs["tColor"].";\""; else $Color="";
			if(!empty($rs["tColor"])) $Color=" style=\"color:".$rs["tColor"].";\""; else $Color="";
			if($rs["jumpUrl"] !="") $aUrl=$rs["jumpUrl"]; else $aUrl="$OPEN_LINK?aid=".$rs["id"]."";	
			$date = FormatTime(6,$rs["adate"]);
			$content = replaceHtmlAndJs($rs['content']);
			$content = KillWord($content,80);
			$day = FormatTime(3,$rs["adate"]);
			//echo "<li><a href=\"".$aUrl."\" title=\"".$rs["title"]."\"".$Color.">".KillWord($rs["title"],39)."</a><span class=\"adate\">".FormatTime(1,$rs["adate"])."</span></li>";
			//echo '<a href="'.$aUrl.'"><div class="newsList fl" '.$Color.'><h3>'.KillWord($rs["title"],40).'</h3><p>'.$content.'</p></div><div class="newsDate fl"><p>'.$date.'</p></div></a>';
			//echo "</ul>";
			
			echo '<li class="newsList1">
					<a href="'.$aUrl.'">
						<div class="newsLeft fl"><p class="day">'.$day.'</p><p class="date">'.$date.'</p></div>
						<div class="newsRight fl"><p>'.KillWord($rs["title"],42).'<img src="temp/images/greatThan2.jpg"/></p></div>
					</a>
            	</li>
             	<div class="clr"></div>';			
		}
		echo '</ul>';
		//if($num_cnt > $page_size){
			PageControlMain($num_cnt,$page_cnt,$page,0);
		//}
		echo '</div>';

	}
}

//图片列表展示函数
function ImagesList($Table,$Coll,$ListCSS,$thumbnailStyle,$All_count,$TextNum,$ImgW,$ImgH,$Show_Link){
	global $InfoType_xia;
	global $page_size;
	$order = "adate desc";
	$sql = "select * from ".DB_TablePre.$Table." where "  . $Coll ." order by ".$order;	
	$conn = new dbo();
	$conn->query($sql);
	$page_size = $All_count;					 //定义每页显示多少记录
	$num_cnt = mysql_num_rows($conn->res); //获取总记录数
	$page_cnt = ceil($num_cnt/$page_size);  //计算总页数	
	if(isset($_GET["page"])){
		$page = intval($_GET["page"]);
	}else{
		$page = 1;
	}
	if ($page<1){
		$page=1;
	}
	elseif ($page_cnt > 0 && $page > $page_cnt){
		$page=$page_cnt;
	}
	$query_start = ($page - 1 ) * $page_size;   //计算每页开始的记录号
	$query_sql = $sql." limit $query_start,$page_size"; //使用limit获取记录
	$conn->query($query_sql);
	if($num_cnt==0){
		EofInfo(GetTitle($InfoType_xia,"category"));
	}else{
		echo "<ul class=\"clear\">";
		$i=1;
		while($rs = mysql_fetch_array($conn->res)){
			//获取标题颜色
			if(!empty($rs["tColor"])) $Color=" style=\"color:".$rs["tColor"].";\""; else $Color="";			
			$ntitle = $rs["title"];
			$MyPic = $rs["pic"];
			
			//$prodL = "<li class=\"show$i\">";
			//$prodL .= "<img src=\"$MyPic\" border=0 width=\"$ImgW\" height=\"$ImgH\" alt=\"$ntitle\" onclick=\"window.location.href='$Show_Link?aid=$rs[0]'\"/>";
			//$prodL .= "<h3><a href=\"$Show_Link?aid=$rs[0]\" title=\"$ntitle\"$Color>".KillWord($rs["title"],$TextNum)."</a></h3></li>";
			$prodL = "<li><a href=".$Show_Link.'?aid='.$rs[0]."><img src=\"".$MyPic."\" alt=\"\"  width=\"168\" height=\"151\"/><span>".KillWord($rs["title"],$TextNum)."</span></a></li>";
			$i++;
			if($i==5){$i=1;}
			echo $prodL;
		}
		echo '</div>';
		if($num_cnt > $page_size){
			PageControlMain($num_cnt,$page_cnt,$page,0);
		}
	}
}

        //读取文件函数
        function readfromfile($file_name){
            if (file_exists($file_name)){
                $filenum=fopen($file_name,"r");
                flock($filenum,LOCK_EX);
                $file_data=fread($filenum, filesize($file_name));
                rewind($filenum);
                fclose($filenum);
                return $file_data;
            }else{
                return 0;
            }
        }

        //文件读取函式
        function PHP_Read($file_name){
            $fd=fopen($file_name,"r");
            while($bufline=fgets($fd, 4096)){
                $buf.=$bufline;
            }
            fclose($fd);
            return $buf;
        }
        //文件写入函式
        function PHP_Write($file_name,$data,$method="w") {
            $filenum=fopen($file_name,$method);
            flock($filenum,LOCK_EX);
            $file_data=fwrite($filenum,$data);
            fclose($filenum);
            return $file_data;
        }

//图片列表展示函数
function ImagesList_wap($Table,$Coll,$ListCSS,$thumbnailStyle,$All_count,$TextNum,$ImgW,$ImgH,$Show_Link){
	global $InfoType_xia;
	global $page_size;
	$order = "adate desc";
	$sql = "select * from ".DB_TablePre.$Table." where "  . $Coll ." order by ".$order;	
	$conn = new dbo();
	$conn->query($sql);
	$page_size = $All_count;					 //定义每页显示多少记录
	$num_cnt = mysql_num_rows($conn->res); //获取总记录数
	$page_cnt = ceil($num_cnt/$page_size);  //计算总页数	
	if(isset($_GET["page"])){
		$page = intval($_GET["page"]);
	}else{
		$page = 1;
	}
	if ($page<1){
		$page=1;
	}
	elseif ($page_cnt > 0 && $page > $page_cnt){
		$page=$page_cnt;
	}
	$query_start = ($page - 1 ) * $page_size;   //计算每页开始的记录号
	$query_sql = $sql." limit $query_start,$page_size"; //使用limit获取记录
	$conn->query($query_sql);
	if($num_cnt==0){
		EofInfo(GetTitle($InfoType_xia,"category"));
	}else{
		echo "<div class=\"".$ListCSS."\"><ul>";
		$i=1;
		while($rs = mysql_fetch_array($conn->res)){
			//获取标题颜色
			if(!empty($rs["tColor"])) $Color=" style=\"color:".$rs["tColor"].";\""; else $Color="";			
			$ntitle = $rs["title"];
			$MyPic = $rs["pic"];
			$prodL = "<li class=\"show$i\">";
			$prodL .= "<img src=\"$MyPic\" border=0 width=\"$ImgW\" height=\"$ImgH\" alt=\"$ntitle\" onclick=\"window.location.href='$Show_Link?aid=$rs[0]'\"/>";
			$prodL .= "<h3><a href=\"$Show_Link?aid=$rs[0]\" title=\"$ntitle\"$Color>".KillWord($rs["title"],$TextNum)."</a></h3></li>";
			$i++;
			if($i==5){$i=1;}			
			echo $prodL;
		}
		echo '<div class="clear"></div></ul></div>';
		if($num_cnt > $page_size){
			PageControlMain($num_cnt,$page_cnt,$page,0);
		}
	}
}


//下载列表展示函数
function DownloadList($Table,$Cond,$ListCSS,$All_count,$Open_link){
	global $InfoType_xia;
	global $page_size;
	global $sitPath;
	$order = "adate desc";
	$sql = "select * from ".DB_TablePre.$Table." where ".$Cond." order by ".$order;
	$conn = new dbo();
	$conn->query($sql);
	$page_size = $All_count;				 //定义每页显示多少记录
	$num_cnt = mysql_num_rows($conn->res); //获取总记录数
	$page_cnt = ceil($num_cnt/$page_size);  //计算总页数
	if(isset($_GET["page"])){
		$page = intval($_GET["page"]);
	}else{
		$page = 1;
	}
    if ($page<1){
        $page=1;
	}
    elseif ($page>$page_cnt){
        $page=$page_cnt;
    }
	$query_start = ($page - 1 ) * $page_size;   //计算每页开始的记录号
	$query_sql = $sql." limit $query_start,$page_size"; //使用limit获取记录
	$conn->query($query_sql);
	
	if($num_cnt==0){
		EofInfo(GetTitle($InfoType_xia,"category"));
	}else{
		echo "<ul class=\"$ListCSS\">";
		while($rs = mysql_fetch_array($conn->res)){
			//获取标题颜色
			if(!empty($rs["tColor"])){
				$Color=" style=\"color:".$rs["tColor"].";\"";
			}else{
				$Color="";
			}
			if($rs["jumpUrl"] !="") $aUrl=$rs["jumpUrl"]; else $aUrl="/".$Open_link."?aid=".$rs["id"]."";	
			echo "<li><a href=\"".$aUrl."\" title=\"点击下载：".$rs["title"]."\"".$Color." target=\"_blank\">".KillWord($rs["title"],55)."</a><span class=\"adate\"><img src=\"".CO_SitePath."temp/common/btn_download.gif\" alt=\"点击下载".$rs["title"]."\" onclick=\"window.open('".$aUrl."');\" /></span></li>";
		}
		echo "</ul>";
		if($num_cnt > $page_size){
			PageControlMain($num_cnt,$page_cnt,$page,0);
		}
	}
}

//===信息显示函数终极版====
function ShowInfo($Stype,$catalogTable,$infoTable,$Show_Link,$wap=''){
	global $listNumberA;
	global $listNumberB;
	global $listNumberC;
	global $listNumberD;
	global $maxType;
	$Stype = intval($Stype);
	$db = mysql_query("select * from ".DB_TablePre.$catalogTable." where id =".$Stype."");
	$rs = mysql_fetch_array($db);
	if($rs){
		$InfoType = $rs["InfoType"];
		$ImgW = $rs["ImgW"];
		$ImgH = $rs["ImgH"];
	}
	switch($InfoType){
		case "ClsNewsList": //新闻性质
			$condition = "type in (".GetSqlSuper($Stype,$catalogTable).")";
			ArticleList($infoTable,$condition,"item1",$listNumberA,$Show_Link);
		break;
		
		case "ClsImagesList": //略缩图片展示
			$condition = "type in (".GetSqlSuper($Stype,$catalogTable).")";
			
			//if($maxType==3){$Show_Link='productsDetail.php';}
			ImagesList($infoTable,$condition,"clear","thumbnail_product",$listNumberB,10,$ImgW,$ImgH,$Show_Link);
		break;

		case "ClsSinglePage"://一整篇信息
			$db = mysql_query("select content from ".DB_TablePre.$infoTable." where type=".$Stype." order by adate desc");
			$rs = mysql_fetch_row($db);
			if($rs){
				echo '<div class="ClsSinglePage">';
				ShowPage($rs[0]);
				echo '</div>';
			}
		break;
		
		case "ClsVideosList": //视频略缩图片展示
			$condition = "type in (".GetSqlSuper($Stype,$catalogTable).")";
			ImagesList($infoTable,$condition,"landShow","show1",$listNumberB,14,$ImgW,$ImgH,$Show_Link);
		break;

		case "ClsDownloadsList"://下载模式展示
			$condition = "type in (".GetSqlSuper($Stype,$catalogTable).")";
			DownloadList($infoTable,$condition,"newsList",$listNumberC,$sitPath."apps/down/");
		break;
		
/*
		case "ClsJobsList"://招聘信息展示
			$condition = "type in (".GetSqlSuper($Stype,$catalogTable).")";
			JobsList("jobs",$condition,"jobsListTable",$listNumberD,$Show_Link)
		break;
*/
	}
}


//===WAP信息显示函数终极版====
function ShowInfo_wap($Stype,$catalogTable,$infoTable,$Show_Link){
	global $listNumberA;
	global $listNumberB;
	global $listNumberC;
	global $listNumberD;
	$Stype = intval($Stype);
	$db = mysql_query("select * from ".DB_TablePre.$catalogTable." where id =".$Stype."");
	$rs = mysql_fetch_array($db);
	if($rs){
		$InfoType = $rs["InfoType"];
		$ImgW = $rs["ImgW"];
		$ImgH = $rs["ImgH"];
	}
	switch($InfoType){
		case "ClsNewsList": //新闻性质
			$condition = "type in (".GetSqlSuper($Stype,$catalogTable).")";
			ArticleList_wap($infoTable,$condition,"item1",$listNumberA,$Show_Link);
		break;
		
		case "ClsImagesList": //略缩图片展示
			$condition = "type in (".GetSqlSuper($Stype,$catalogTable).")";
			ImagesList($infoTable,$condition,"landShow","show1",$listNumberB,10,$ImgW,$ImgH,$Show_Link);
		break;

		case "ClsSinglePage"://一整篇信息
			$db = mysql_query("select content from ".DB_TablePre.$infoTable." where type=".$Stype." order by adate desc");
			$rs = mysql_fetch_row($db);
			if($rs){
				echo '<div class="ClsSinglePage">';
				ShowPage($rs[0]);
				echo '</div>';
			}
		break;
		
		case "ClsVideosList": //视频略缩图片展示
			$condition = "type in (".GetSqlSuper($Stype,$catalogTable).")";
			ImagesList($infoTable,$condition,"landShow","show1",$listNumberB,14,$ImgW,$ImgH,$Show_Link);
		break;

		case "ClsDownloadsList"://下载模式展示
			$condition = "type in (".GetSqlSuper($Stype,$catalogTable).")";
			DownloadList($infoTable,$condition,"newsList",$listNumberC,$sitPath."apps/down/");
		break;
		
/*
		case "ClsJobsList"://招聘信息展示
			$condition = "type in (".GetSqlSuper($Stype,$catalogTable).")";
			JobsList("jobs",$condition,"jobsListTable",$listNumberD,$Show_Link)
		break;
*/
	}
}


//调用一级子类别（一般用于下拉菜单）
function dropDownMenu($Table,$Type,$GetURL,$CSS){
	echo "<ul class=\"$CSS\">\n";
	$db = mysql_query("select id,title,CatalogParentId,SortId from ".DB_TablePre.$Table." where CatalogParentId = '$Type' order by SortId asc");
	while( $rs=mysql_fetch_row($db) ){
		echo "<li><a href=\"".$GetURL."?cid=".$rs[0]."\">".$rs[1]."</a></li>";
	}
	echo "</ul>\n";
}

function dropMenu($Table,$Type,$GetURL){
	$db = mysql_query("select id,title,CatalogParentId,SortId from ".DB_TablePre.$Table." where CatalogParentId = '$Type' order by SortId asc");
	while( $rs=mysql_fetch_row($db) ){
		echo "<li><a href=\"".$GetURL."?cid=".$rs[0]."\">".$rs[1]."</a></li>";
	}
}


//留言板表单
function feedbackFormBox($feedbackSumbitUrl,$feedbackViewUrl){
	global $FeedbackText;
	echo '<div class="feedbackFormBox">';
	echo "\n<form action=\"".CO_SitePath.$feedbackSumbitUrl."\" method=\"post\" name=\"formFeedback\" id=\"formFeedback\">\n";
	echo "<dl><dt>".$FeedbackText[1]."</dt><dd><input name=\"f_Name\" type=\"text\" class=\"feedbackModuleBorder_1 feedbackInput_w1\" id=\"f_Name\" datatype=\"*\" nullmsg=\"".$FeedbackText[8]."\" errormsg=\"".$FeedbackText[9]."\" /></dd></dl>\n";
	echo "<dl><dt>".$FeedbackText[2]."</dt><dd><input name=\"f_MobTel\" type=\"text\" class=\"feedbackModuleBorder_1 feedbackInput_w1\" id=\"f_MobTel\" datatype=\"nTel\" nullmsg=\"".$FeedbackText[10]."\" errormsg=\"".$FeedbackText[11]."\" /><span class=\"Validform_checktip\">".$FeedbackText[17]."</span></dd></dl>\n";
	echo "<dl><dt>".$FeedbackText[3]."</dt><dd><input name=\"f_Mail\" type=\"text\" class=\"feedbackModuleBorder_1 feedbackInput_w1\" id=\"f_Mail\" /></dd></dl>\n";
	echo "<dl><dt>".$FeedbackText[4]."</dt><dd><textarea name=\"f_Content\" rows=\"8\" class=\"feedbackModuleBorder_1 feedbackInput_w1\" id=\"f_Content\" datatype=\"*\" nullmsg=\"".$FeedbackText[14]."\" errormsg=\"".$FeedbackText[15]."\"></textarea></dd></dl>\n";
	//echo "<dl><dt>".$FeedbackText[18]."</dt><dd><input name=\"f_Captcha\" type=\"text\" class=\"feedbackModuleBorder_1 feedbackInput_w2\" id=\"f_Captcha\" datatype=\"n\" nullmsg=\"".$FeedbackText[19]."\" errormsg=\"".$FeedbackText[20]."\" /><img src=\"".CO_SitePath."lib/captcha.php\" alt=\"".$FeedbackText[21]."\" height=\"10\" onClick=\"this.src='".CO_SitePath."lib/captcha.php?t='+(new Date().getTime());\" class=\"imgCaptcha\" /></dd></dl>\n";
	echo "<dl><dt>&nbsp;</dt><dd><input name=\"sumbit\" type=\"submit\" value=\"".$FeedbackText[5]."\" class=\"feedbackBtn_1\" />&nbsp;<input name=\"reset\" type=\"reset\" value=\"".$FeedbackText[6]."\" class=\"feedbackBtn_1\" /></dd></dl>\n";
	//&nbsp;<input name=\"\" type=\"button\" value=\"".$FeedbackText[7]."\" class=\"feedbackBtn_1\" onclick=\"location.href='".$feedbackViewUrl."';\" />
	echo "</form>\n";
	echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"".CO_SitePath."lib/validform/validform.css\">";
	echo "<script type=\"text/javascript\" src=\"".CO_SitePath."lib/validform/source.js\"></script>";
	echo '<script type="text/javascript">$(function(){$("#formFeedback").Validform({datatype:{"nTel":/^((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)$/},tiptype:3,showAllError:true});})</script>';
	echo '</div>';
}

//查看留言
function feedbackViewList($All_count){
	global $FeedbackViewText;
	$Cond  = "okDisplay = '1'";
	$order = "addDate desc";
	$sql = "select * from ".DB_TablePre."feedback where ".$Cond." order by ".$order;
	$conn = new dbo();
	$conn->query($sql);
	$page_size = $All_count;				//定义每页显示多少记录
	$num_cnt = mysql_num_rows($conn->res); //获取总记录数
	$page_cnt = ceil($num_cnt/$page_size);  //计算总页数
	if(isset($_GET["page"])){
		$page = intval($_GET["page"]);
	}else{
		$page = 1;
	}
    if ($page<1){
        $page=1;
	}elseif ($page>$page_cnt){
        $page=$page_cnt;
    }
	$query_start = ($page - 1 ) * $page_size;   //计算每页开始的记录号
	$query_sql = $sql." limit $query_start,$page_size"; //使用limit获取记录
	$conn->query($query_sql);

	if($num_cnt==0){
		EofInfo($FeedbackViewText[5]);
	}else{
		echo '<div class="feedbackViewLisxBox">';
		while($rs_Msg = mysql_fetch_array($conn->res)){
			echo "<dl><a name=\"FID_".$rs_Msg["id"]."\"></a>\n";
			echo "<dt><strong><span class=\"f_FieldT\">$FeedbackViewText[1]</span></strong><span class=\"f_Name\">".$rs_Msg["f_Name"]."</span><span class=\"f_Date\"> - ".$rs_Msg["addDate"]."</span></dt>\n";			
			echo "<dd>\n";
			echo "<p><strong><span class=\"f_FieldT\">$FeedbackViewText[2]</span></strong>".Html($rs_Msg["f_Content"])."</p>\n";
			if( $rs_Msg["okReply"] == 1 ){
				echo "<p class=\"f_Reply\"><strong><span class=\"f_FieldT\">$FeedbackViewText[3]</span></strong>".Html($rs_Msg["f_Reply"])." <span class=\"f_Date\">".$rs_Msg["reTime"]."</span></p>";
			}
			echo "</dd>\n";
			echo "</dl>\n";
		}
		echo '</div>';
		if($num_cnt > $page_size){
			PageControlMain($num_cnt,$page_cnt,$page,1);
		}
	}
}

function PageLocation($textName1,$textUrl1){
	echo '当前位置：<a href="'.CO_SitePath.'">首页</a> &gt; <strong><a href="'.$textUrl1.'">'.$textName1.'</a></strong>';
}

function CheckDateTime($data){
    if (date('Y-m-d H:i:s', strtotime($data)) == $data){
        return true;
    }else{
        return false;
    }
} 

//显示所有类别
function ShowMenuAll($ID,$Table){
	$db = mysql_query("select * from ".DB_TablePre.$Table." where CatalogParentId=".$ID." order by SortId asc");
	while($rsSM = mysql_fetch_array($db)){
		$tempcataStr="";
		$Smt=$rsSM["title"];//==标题==
		$repat = str_repeat("→",$rsSM["Mlevel"]-1);
		//$tempcataStr .= $repat;
		$tempcataStr .= "<li><span class='cTitle'>".$repat."<a href='?cataid=".trim($rsSM["id"])."'>".trim($rsSM["title"])."</a></span><span class='addCat_up'><a href='?action=up&cataid=".$rsSM["id"]."&Mlevel=".$rsSM["Mlevel"]."&CatalogParentId=".$rsSM["CatalogParentId"]."' title='上移'>&uarr;</a><span class='addCat_down'><a href='?action=down&cataid=".$rsSM["id"]."&Mlevel=".$rsSM["Mlevel"]."&CatalogParentId=".$rsSM["CatalogParentId"]."' title='下移'>&darr;</a></span></li>";
		echo  $tempcataStr;
		ShowMenuAll($rsSM["id"],$Table);
	}
}

/*
调用FLASH自定义函数
swfPath=路径
swfWidth=宽度
swfHeight=高度
swfIsTransparent=是否透明
swfVersion=版本
*/
function showSWF($swfPath,$swfWidth,$swfHeight,$swfIsTransparent,$swfVersion){
if ($swfIsTransparent=true){
	$swfIsTransparent="transparent";
}else{
	$swfIsTransparent="opaque";
}
echo "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=".$swfVersion."' width='".$swfWidth."' height='".$swfHeight."'><param name='movie' value='".$swfPath."' /><param name='quality' value='high' /><param name='wmode' value='".$swfIsTransparent."' /><embed src='".$swfPath."' quality='high' wmode='".$swfIsTransparent."' pluginspage='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='".$swfWidth."' height='".$swfHeight."'></embed></object>";
}

function showBanner($bModuleType,$bDataType,$bImgNum,$bImgWidth,$bImgHeight){
	switch($bModuleType){
		case 1:
			echo '<div id="kinMaxShow">';
			$db = mysql_query("select id,type,title,pic,jumpUrl,adate from ".DB_TablePre."content where type=".$bDataType." order by adate desc limit 0,".$bImgNum."");
			while($rsBanner = mysql_fetch_array($db)){
				echo "<div><a href=\"".$rsBanner["jumpUrl"]."\"><img src=\"".$rsBanner["pic"]."\" width=\"".$bImgWidth."\" height=\"".$bImgHeight."\" alt=\"".$rsBanner["title"]."\" /></a></div>";
			}
			echo '</div><script type="text/javascript" src="/lib/jquery/jquery_kinMaxShow.js"></script>';
			echo "<script type=\"text/javascript\">\$(function(){\$(\"#kinMaxShow\").kinMaxShow({height:". $bImgHeight ."});});</script>";
			break;
		case 2:
			echo '<div id="focus"><ul>';
			$db = mysql_query("select id,type,title,pic,jumpUrl,adate from ".DB_TablePre."content where type=".$bDataType." order by adate desc limit 0,".$bImgNum."");
			while($rsBanner = mysql_fetch_array($db)){
				echo "<li><a href=\"".$rsBanner["jumpUrl"]."\"><img src=\"".$rsBanner["pic"]."\" width=\"".$bImgWidth."\" height=\"".$bImgHeight."\" alt=\"".$rsBanner["title"]."\" /></a></li>";
			}
			echo '</ul></div>';
			break;
		default:
			break;
	}
}


//截取HTML然后再截取
function KillHtml($word,$Kill){
	if(empty($word)){
		return ;
	}else{
		$content = replaceHtmlAndJs($word);
		$content = KillWord($content,$Kill);
		return $content;
	}
}

//去掉所有的HTML标记和JavaScript标记
function replaceHtmlAndJs($documentHtmlTag){
	$documentHtmlTag = trim($documentHtmlTag);
	if (strlen($documentHtmlTag) <= 0){
		return $documentHtmlTag;
	}
	$searchHtmlTag = array ("'<script[^>]*?>.*?</script>'si",	// 去掉 javascript
					"'<[\/\!]*?[^<>]*?>'si",					// 去掉 HTML 标记
					"'([\r\n])[\s]+'",							// 去掉空白字符
					"'&(quot|#34);'i",							// 替换 HTML 实体
					"'&(amp|#38);'i",
					"'&(lt|#60);'i",
					"'&(gt|#62);'i",
					"'&(nbsp|#160);'i",
					"'　'",
	);
	$replaceHtmlTag = array ("","","","","","","","","");
	//$replace = array ("","","\","\"","&","<",">"," ");
	return @preg_replace ($searchHtmlTag, $replaceHtmlTag, $documentHtmlTag);
}

//信息列表调用
function homeArticleV1($aType,$CSS,$listNum,$textNumber,$aUrl,$isShowDate){
	echo "<ul class=\"$CSS\">";
	$db = mysql_query("select id,title,type,adate,tColor,jumpUrl from ".DB_TablePre."content where type in(".GetSqlSuper($aType,"category").") order by adate desc limit $listNum");
	while($rsHomeArticle = mysql_fetch_row($db)){
		if($rsHomeArticle[4] != "") $Color=" style=\"color:".$rsHomeArticle[4].";\""; else $Color="";
		if($rsHomeArticle[5] != "") $GetURL_show=$rsHomeArticle[5]; else $GetURL_show="$aUrl?aid=$rsHomeArticle[0]";
		switch ($isShowDate){
			case 0:
				$ShowDate = "<span>>></span>";
				break;
			case 1:
				$ShowDate = "<span class=\"adate\">(".FormatTime(2,$rsHomeArticle[3]).")</span>";
				break;
			case 2:
				$ShowDate = "<span class=\"adate\">(".FormatTime(1,$rsHomeArticle[3]).")</span>";
				break;
		}
		echo "<li>".$ShowDate."<a href=\"$GetURL_show\" title=\"".$rsHomeArticle[1]."\"$Color target=\"_blank\">".KillWord($rsHomeArticle[1],$textNumber)."</a></li>\n";
	}
	echo "<div class=\"clearfix\"></div></ul>";
}

//单个栏目简介
function homeCategoryDescription($hInfoID){
	$hInfoID = intval($hInfoID);
	$db = mysql_query("select id,thisDescription from ".DB_TablePre."category where id=".$hInfoID."");
	$rs = mysql_fetch_row($db);
	if($rs){
		echo $rs[1];
	}
}

//单个栏目子分类调用
function categoryListV1($aType,$aUrl,$aCss){
	//echo "<ul class=\"".$aCss."\">\n";
	$db = mysql_query("select id,title from ".DB_TablePre."category where CatalogParentId=".$aType." order by SortId asc");
	while($rs=mysql_fetch_row($db)){
		echo "<a href=\"".$aUrl."?cid=".$rs[0]."\" title=\"".$rs[1]."\" id=\"cate_".$rs[0]."\">".$rs[1]."</a>";
		//echo "<li class=\"bg2\"><a href=\"".$aUrl."?cid=".$rs[0]."\" title=\"".$rs[1]."\" id=\"cate_".$rs[0]."\">".$rs[1]."</a></li>\n";
	}
	//echo "<div class=\"clearfix\"></div></ul>";
}

//Select链接
function showSelectLinks($sType){
	$db = mysql_query("select id,title,jumpUrl from ".DB_TablePre."content where type=".$sType." order by adate desc");
	while($rs = mysql_fetch_row($db)){
		echo "<option value=\"".$rs[2]."\">".$rs[1]."</option>";
	}
}

//招聘信息表单
function recruitmentBox($recruitmentUrl){
global $recruitmentText;
global $id;
$ed = Request_table ("j_Name","recruitment",$id);
echo "<form action=\"".CO_SitePath.$recruitmentUrl."\" method=\"post\" name=\"formJobs\" id=\"formJobs\">";
echo "<input type=\"hidden\" name=\"Name\" value=".$ed." />";
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0" class="jobsView">';

echo "<tbody> <tr class=\"tHead_a\">";
echo "<td colspan=\"2\">应聘申请</td> </tr>";
echo "</tbody> <tbody> <tr>";	

echo "<td width=\"70\" class=\"tR\">".$recruitmentText[1]."</td><td class=\"tL\" width=\"655\"><input name=\"j_a\" type=\"text\" class=\"moduleJobsBorderA\" id=\"j_a\" size=\"20\" datatype=\"*\" nullmsg=\"".$recruitmentText[15]."\"  errormsg=\"".$recruitmentText[27]."\" /><span class=\"isRequired\">*</span></td>";
echo "</tr> </tbody> <tbody> <tr>";
echo "<td class=\"tR\">".$recruitmentText[2]."</td><td class=\"tL\"><select name=\"j_b\" id=\"j_b\" class=\"moduleJobsBorderA\"><option value=\"男\">男</option><option value=\"女\">女</option></select><span class=\"isRequired\">*</span></td>";
echo "</tr> </tbody> <tbody> <tr>";
echo "<td class=\"tR\">".$recruitmentText[3]."</td><td class=\"tL\"><input name=\"j_c\" type=\"text\" class=\"moduleJobsBorderA\" id=\"j_c\" size=\"20\" datatype=\"*\" onClick=\"WdatePicker()\" value=\"\"/><span class=\"isRequired\">*</span></td>";
echo "</tr> </tbody> <tbody> <tr>";
echo "<td class=\"tR\">".$recruitmentText[4]."</td><td class=\"tL\"><select name=\"j_d\" id=\"j_d\" class=\"moduleJobsBorderA\"><option value=\"未婚\">未婚</option><option value=\"已婚\">已婚</option></select><span class=\"isRequired\">*</span></td>";
echo "</tr> </tbody> <tbody> <tr>";
echo "<td class=\"tR\">".$recruitmentText[5]."</td><td class=\"tL\"><input name=\"j_e\" type=\"text\" class=\"moduleJobsBorderA\" id=\"j_e\" size=\"20\"  datatype=\"*\" nullmsg=\"".$recruitmentText[16]."\" /><span class=\"isRequired\">*</span></td>";
echo "</tr> </tbody> <tbody> <tr>";
echo "<td class=\"tR\">".$recruitmentText[6]."</td><td class=\"tL\"><input name=\"j_f\" type=\"text\" class=\"moduleJobsBorderA\" id=\"j_f\" size=\"20\"  datatype=\"*\" nullmsg=\"".$recruitmentText[17]."\" /><span class=\"isRequired\">*</span></td>";
echo "</tr> </tbody> <tbody> <tr>";	
echo "<td class=\"tR\">".$recruitmentText[7]."</td><td class=\"tL\"><input name=\"j_g\" type=\"text\" class=\"moduleJobsBorderA\" id=\"j_g\" size=\"20\"  datatype=\"*\" nullmsg=\"".$recruitmentText[18]."\" /><span class=\"isRequired\">*</span></td>";
echo "</tr> </tbody> <tbody> <tr>";
echo "<td class=\"tR\">".$recruitmentText[8]."</td><td class=\"tL\"><input name=\"j_h\" type=\"text\" class=\"moduleJobsBorderA\" id=\"j_h\" size=\"20\" datatype=\"*\" onClick=\"WdatePicker()\" value=\"\" /><span class=\"isRequired\">*</span></td>";
echo "</tr> </tbody> <tbody> <tr>";
echo "<td class=\"tR\">".$recruitmentText[9]."</td><td class=\"tL\"><input name=\"j_i\" type=\"text\" class=\"moduleJobsBorderA\" id=\"j_i\" size=\"20\"  datatype=\"*\" nullmsg=\"".$recruitmentText[19]."\" errormsg=\"".$recruitmentText[26]."\" /><span class=\"isRequired\">*</span></td>";
echo "</tr> </tbody> <tbody> <tr>";
echo "<td class=\"tR\">".$recruitmentText[10]."</td><td class=\"tL\"><input name=\"j_j\" type=\"text\" class=\"moduleJobsBorderA\" id=\"j_j\" size=\"88\" datatype=\"*\" nullmsg=\"".$recruitmentText[20]."\" /><span class=\"isRequired\">*</span></td>";
echo "</tr> </tbody> <tbody> <tr>";
echo "<td class=\"tR\">".$recruitmentText[11]."</td><td class=\"tL\"><input name=\"j_k\" type=\"text\" class=\"moduleJobsBorderA\" id=\"j_k\" size=\"20\"  datatype=\"*\" nullmsg=\"".$recruitmentText[21]."\" errormsg=\"".$recruitmentText[25]."\" /><span class=\"isRequired\">*</span></td>";
echo "</tr> </tbody> <tbody> <tr>";
echo "<td class=\"tR\">".$recruitmentText[12]."</td><td class=\"tL\"><input name=\"j_l\" type=\"text\" class=\"moduleJobsBorderA\" id=\"j_l\" size=\"20\"  datatype=\"*\" nullmsg=\"".$recruitmentText[22]."\" /><span class=\"isRequired\">*</span></td>";

echo "</tr> </tbody> <tbody> <tr>";
echo "<td class=\"tR\">".$recruitmentText[13]."</td><td class=\"tL\"><textarea name=\"j_m\" cols=\"90\" rows=\"5\" class=\"moduleJobsBorderA\" id=\"j_m\"  datatype=\"*\" nullmsg=\"".$recruitmentText[23]."\" ></textarea><span class=\"isRequired\">*</span></td>";
echo "</tr> </tbody> <tbody> <tr>";
echo "<td class=\"tR\">".$recruitmentText[14]."</td><td class=\"tL\"><textarea name=\"j_n\" cols=\"90\" rows=\"5\" class=\"moduleJobsBorderA\" id=\"j_n\"  datatype=\"*\" nullmsg=\"".$recruitmentText[24]."\" ></textarea><span class=\"isRequired\">*</span></td>";
echo "</tr> </tbody> <tbody> <tr>";
echo "<td class=\"tR\">&nbsp;</td><td class=\"tL\"><input name=\"\" type=\"submit\" value=\"提交\" class=\"moduleJobsBtnA\" /></td>";
echo "</tr> </tbody> </table> </form>";	
echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"".CO_SitePath."lib/validform/validform.css\">";	
echo "<script type=\"text/javascript\" src=\"lib/datePicker/WdatePicker.js\"></script>";
echo "<script type=\"text/javascript\" src=\"".CO_SitePath."lib/validform/source.js\"></script>";
echo '<script type="text/javascript">$(function(){$("#formJobs").Validform({datatype:{"nTel":/^((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)$/},tiptype:3,showAllError:true});})</script>';
}


include("language/zh-cn.php");
include("Jqlib.class.php");
?>