<?php
session_start();

header("Cache-control: private");
require_once("../common/init.php");


require_once "../admin/init.php";


if($_GET[page_id]){
$page_id=$_GET[page_id];
$sqllang = "select * from menu   where IDProduct='$page_id' ";
$pagelang  = $DB->getdata($sqllang);
$page_lang=$pagelang[lang];
$sqllanginfo = "select * from ch_lang  where ProductName='$page_lang'  ";

}

elseif ($_GET[lang]=="")
{

$sqllanginfo = "select * from ch_lang  where AutoDo='1'   ";
}
else
{
	

$lang=$_GET[lang];
$sqllanginfo = "select * from ch_lang  where ProductName='$lang'  ";
}



$langInfo  = $DB->getdata($sqllanginfo);
$lang_agentname=$langInfo[ProductIntro];

$lang=$langInfo[ProductName];


$smarty->assign('lang_zc',$langInfo[zc]);
$smarty->assign('lang_wjmm',$langInfo[wjmm]);
$smarty->assign('lang_sjb',$langInfo[sjb]);

$smarty->assign('lang_dl',$langInfo[dl]);
$smarty->assign('lang_jrsc',$langInfo[jrsc]);
$smarty->assign('lang_jg',$langInfo[jg]);
$smarty->assign('lang_ckxq',$langInfo[ckxq]);

$smarty->assign('lang_rmb',$langInfo[rmb]);
$smarty->assign('lang_yuan',$langInfo[yuan]);
$smarty->assign('lang_sjtime',$langInfo[sjtime]);
$smarty->assign('lang_zz',$langInfo[zz]);
$smarty->assign('lang_sl',$langInfo[sl]);
$smarty->assign('lang_cpjs',$langInfo[cpjs]);
$smarty->assign('lang_cply',$langInfo[cply]);
$smarty->assign('lang_dqwz',$langInfo[dqwz]);
$smarty->assign('lang_syindex',$langInfo[syindex]);

$smarty->assign('lang_soshuo',$langInfo[soshuo]);
$smarty->assign('lang_cpsoshuo',$langInfo[cpsoshuo]);
$smarty->assign('lang_wzsoshuo',$langInfo[wzsoshuo]);

$smarty->assign('lang_tjwt',$langInfo[tjwt]);
$smarty->assign('lang_wtlx',$langInfo[wtlx]);

$smarty->assign('lang_lxr',$langInfo[lxr]);
$smarty->assign('lang_lybt',$langInfo[lybt]);
$smarty->assign('lang_lylr',$langInfo[lylr]);
$smarty->assign('lang_yzm',$langInfo[yzm]);
$smarty->assign('lang_yzmzq',$langInfo[yzmzq]);
$smarty->assign('lang_yzmcw',$langInfo[yzmcw]);
$smarty->assign('lang_wtlb',$langInfo[wtlb]);
$smarty->assign('lang_gong',$langInfo[gong]);
$smarty->assign('lang_gong1',$langInfo[gong1]);
$smarty->assign('lang_gong2',$langInfo[gong2]);
$smarty->assign('lang_gong3',$langInfo[gong3]);
$smarty->assign('lang_oprice',$langInfo[oprice]);
$smarty->assign('lang_nprice',$langInfo[nprice]);

$smarty->assign('lang_welcome',$langInfo[welcome]);
$smarty->assign('lang_logout',$langInfo[logout]);
$smarty->assign('lang_gl',$langInfo[gl]);

$smarty->assign('lang_lb',$langInfo[lb]);
$smarty->assign('lang_ljgm',$langInfo[ljgm]);
$smarty->assign('lang_cz',$langInfo[cz]);
$smarty->assign('lang_more',$langInfo[more]);
$smarty->assign('lang_fh',$langInfo[fh]);
$smarty->assign('lang_wdl',$langInfo[wdl]);
$smarty->assign('lang_ydl',$langInfo[ydl]);
$smarty->assign('lang_yhm',$langInfo[yhm]);
$smarty->assign('lang_mm',$langInfo[mm]);
$smarty->assign('lang_qrmm',$langInfo[qrmm]);
$smarty->assign('lang_lxrz',$langInfo[lxrz]);
$smarty->assign('lang_lxry',$langInfo[lxry]);
$smarty->assign('lang_gsmz',$langInfo[gsmz]);
$smarty->assign('lang_gsmy',$langInfo[gsmy]);
$smarty->assign('lang_gj',$langInfo[gj]);
$smarty->assign('lang_sf',$langInfo[sf]);
$smarty->assign('lang_cs',$langInfo[cs]);
$smarty->assign('lang_txdzz',$langInfo[txdzz]);
$smarty->assign('lang_txdzy',$langInfo[txdzy]);
$smarty->assign('lang_yb',$langInfo[yb]);
$smarty->assign('lang_czh',$langInfo[czh]);
$smarty->assign('lang_email',$langInfo[email]);
$smarty->assign('lang_cp',$langInfo[cp]);
$smarty->assign('lang_cg',$langInfo[cg]);
$smarty->assign('lang_sb',$langInfo[sb]);
$smarty->assign('lang_dg',$langInfo[dg]);
if($lang==""){
$lang="Chinese";
}

$sql = 'select max(id) from notes';
$rs1=$DB->query($sql);
$maxID=mysql_fetch_array($rs1);
$maxid=$maxID['max(id)'];

//$notes = '';  
//$left='';  
//$top='';  
//$zindex='';  
//$width='';  
//$height=''; 

//$sql = 'select * from notes order by id desc';
//$rs=$DB->query($sql);
//while($row=mysql_fetch_array($rs)){
	//list($left,$top,$zindex) = explode('|',$row['xyz']); 
//$content =html_entity_decode($row['content']);

	//$notes.= '

	//<div  class="note '.$row['color'].'" ID='.$row['id'].' style="left:'.$left.'px;top:'.$top.'px;z//-index:'.$zindex.';width:'.$row['width'].';height:'.$row['height'].';">
		
//<h3 >标题栏</h3>

//<span class="data">'.$row['id'].'.</span>'.$content.'
	//</div>';
//}


function cutStr($str,$len){
	$str=trim(strip_tags($str));
	$str=str_replace("　","",$str);
	$str=str_replace("&nbsp;","",$str);
	$str=mb_substr($str,0,$len,'gbk');
	return $str;
}


$arProType = array();
$proType = new ProductType4();
$tree = $proType->ShowmenuTree('0',0,$arProType);


	      $treestring .= "<ul id='nav_all'>";


	  for($i=0;$i<count($tree);$i++){
	
		if($tree[$i]['showindex']==1& $tree[$i]['lang']==$lang){
          $treestring .="".$tree[$i]['Disp']."";
}
		
		
	  }
   	
	 $treestring .= "</ul>";



$arProType_lang = array();
$proType_lang = new ProductType5();
$tree_lang = $proType_lang->ShowProTypeTree1('0',0,$arProType_lang);
 $treestringlang .= "<span class='select-box select'   ><select id='menu_lang'  onchange='pagelang()' name='lang' >";

   $treestringlang .="<option value='Chinese' $selected>默认中文</option>";
	  for($i=0;$i<count($tree_lang);$i++){
	
		$selected = ($lang==$tree_lang[$i]['ProductName'])?"selected":"";
if($tree_lang[$i]['ProductName']!="Chinese"){
   $treestringlang .="<option value='".$tree_lang[$i]['Disp']."' $selected>".$tree_lang[$i]['Disp']."</option>";


		
		
		 }
		 $name_lang1="-";
		if($tree_lang[$i]['ProductName']=="Chinese"){
			if($lang=="Chinese"){
				$name_lang="中文";
				$name_lang1="-";
			}
			else{
$name_lang="中文";

			}
}
else
		  {
$name_lang=$tree_lang[$i]['ProductName'];
}
		  $treestringlang1.="<a href='index.php?lang=".$tree_lang[$i]['ProductName']."'> ".$name_lang1." ".$name_lang."</a>";
	  }
   	
	 $treestringlang .= "</select></span>";





$sql = "select * from menu   where isindex=1 and lang='$lang' ";
$isindexInfo  = $DB->getdata($sql);

if($_GET[page_id]){

$page_id=$_GET[page_id];
$page_no="0";
}

else
{
$page_id=$isindexInfo[IDProduct] ;
$page_no="1";
}
$sqlpageinfo = "select * from menu  where IDProduct='$page_id' and lang='$lang'   ORDER BY IDProduct DESC";
$pageInfo  = $DB->getdata($sqlpageinfo);
$head_width=$pageInfo[head_width];
$head_height=$pageInfo[head_height];
$main_width=$pageInfo[main_width];
$main_height=$pageInfo[main_height];
$foot_width=$pageInfo[foot_width];
$foot_height=$pageInfo[foot_height];
$foot_css=$pageInfo[foot_css];
$head_css=$pageInfo[head_css];
$main_css=$pageInfo[main_css];
$title_new=$pageInfo[title];
 $treestringParentID=$pageInfo['ParentID'];
$keywords=$pageInfo[keywords];
$description=$pageInfo[description];
$menu_name=$pageInfo[ProductName];
$head_width_mobile=$pageInfo[head_width_mobile];
$head_height_mobile=$pageInfo[head_height_mobile];
$main_width_mobile=$pageInfo[main_width_mobile];
$main_height_mobile=$pageInfo[main_height_mobile];
$foot_width_mobile=$pageInfo[foot_width_mobile];
$foot_height_mobile=$pageInfo[foot_height_mobile];
$foot_css_mobile=$pageInfo[foot_css_mobile];
$head_css_mobile=$pageInfo[head_css_mobile];
$main_css_mobile=$pageInfo[main_css_mobile];



//$sql = "select * from notes   where note_class!='news' and  note_class!='product' and showIndex=1 and page_id='$page_id' //or share=1  ORDER BY id DESC";

//$result = $db->query($sql);
//$notesItems = array();
//while($notesI=$db->fetch_array($result)){

 //$notesI['Content'] = $notesI['Content'];
	  
	 // list($notesI['left'],$notesI['top'],$notesI['zindex']) = explode('|',$notesI['xyz']); 
	 // $notesItems[] = $notesI;	  
//}





//这是什么

//$sql = "select * from doc ORDER BY dtCreate DESC limit 3";
//$result = $db->query($sql);
//$pageList = GetPageList($_SERVER[PHP_SELF],"page","15",$totalPage,$page);
//$DocItems = array();
//while($DocI=$db->fetch_array($result)){
	//$DocI['dtCreate'] = date("Y-m-d",strtotime($DocI['dtCreate']));
	//$DocI['Content'] = cutStr($DocI['Content'],70)."...";
	//if(strlen($DocI['Title'])>28)$DocI['Title'] = msubstr($DocI['Title'],0,16)."...";
	 // $DocItems[] = $DocI;	  
//};

if($_GET[page_id] && $page_id != $isindexInfo[IDProduct] ){
$query1 ="select * from notes  where showIndex=1 and page_id='$page_id' and mobile='1' and lang='$lang' or  share=2 and mobile='1' and lang='$lang' or   share='1' and mobile='1' and lang='$lang' ORDER BY id DESC";}
else
{
$query1 ="select * from notes  where showIndex=1 and page_id='$page_id' and mobile='1' and lang='$lang' or  share=1 and mobile='1' and lang='$lang' ORDER BY id DESC";

}
$rs1=$DB->query($query1);

//循环所有模块

while($row_c=$db->fetch_array($rs1)){

if($row_c['news_open_pageid']==""){
$row_c['news_open_pageid']=$page_id;
}
if($row_c['pro_open_pageid']==""){
$row_c['pro_open_pageid']=$page_id;
}
	  list($row_c['left'],$row_c['top'],$row_c['zindex']) = explode('|',$row_c['xyz']); 

if($row_c['note_class']=='search_news'){
$smarty->assign("news_search_page",$row_c['news_open_pageid']);
}

if($row_c['note_class']=='search_pro'){
$smarty->assign("pro_search_page",$row_c['pro_open_pageid']);
}

if($row_c['note_class']=='news' )
 {

//如果为新闻模块
$news_id=$row_c['news_id'];
$smarty->assign("news_ms",$row_c['news_ms']);
if($row_c['news_nub']){
$news_nub=$row_c['news_nub'];}
else{
$news_nub=5;
}
$page=$_GET['page'];
$NewsID=$_GET['NewsID'];

if($news_id==0){
$sql3 = "select count(*) from news where showIndex=1 and lang='$lang' ";
}
else{
$sql3 = "select count(*) from news where showIndex=1 and  ClassName='$news_id'  ";
}
if($_GET['news_fl']){
$news_fl=$_GET['news_fl'];
$sql3= "select  count(*) from  news where ClassName ='$news_fl'    ";

}

if($_POST['keyword_news']){
$keyword_news = $_POST['keyword_news'];

$keyword_news=trim($keyword_news);
if($keyword_news){
	$wheres_news=" AND (NewsID like '%$keyword_news%' or Title like '%$keyword_news%' or Content like '%$keyword_news%') ";
}
//得到总记录数
$sql3="select count(*) from news where 1 $wheres_news";
}

$rs3  = $db->query($sql3);
$pageSize = $news_nub;
$totalRecord = $db->result($rs3,0,0);
$totalPage = @ceil($totalRecord/$pageSize);
$noteid=$row_c['id'];
$page_variable_name="page".$noteid;
$page=$_GET[$page_variable_name];
if(!$page)$page = 1;
$offset = ($page-1)*$pageSize;


if($news_id==0){
$query2 ="select * from news where showIndex=1  and lang='$lang' ORDER BY dtCreate DESC limit $offset,$pageSize";
}
else
{


$query2 ="select * from news where showIndex=1 and  ClassName='$news_id'  ORDER BY dtCreate DESC limit $offset,$pageSize";
}

if($_GET['news_fl']!=''){
$news_fl=$_GET['news_fl'];
$query2= "select * from news where ClassName ='$news_fl'    ORDER BY dtCreate DESC limit $offset,$pageSize";

}

$keyword_news = $_POST['keyword_news'];

$keyword_news=trim($keyword_news);
if($keyword_news){
	$where_news=" AND (NewsID like '%$keyword_news%' or Title like '%$keyword_news%' or Content like '%$keyword_news%') ";

	$query2 = "select * from news where 1 $where_news order by dtCreate desc limit $offset,$pageSize";


}

$rs2=$DB->query($query2);

$pageList = GetPageList($_SERVER[PHP_SELF],$page_variable_name,"15",$totalPage,$page);
$PNum = $DB->num_rows($rs2);
$pagers="$langInfo[gong] $totalRecord $langInfo[gong1] $totalPage $langInfo[gong2] $page $langInfo[gong3]";
if($pageList) $pagers.= " <br><br>$pageList[0] $pageList[1]";

while($row_p=$db->fetch_array($rs2)){
	  /* $row_p['dtCreate'] = date("Y-m-d",strtotime($row_p['dtCreate']));*/
 $row_p['dtCreate'] = $row_p['dtCreate'];
	  $row_p['month'] = date("m",strtotime($row_p['dtCreate']));
	  $row_p['day'] = date("d",strtotime($row_p['dtCreate']));
	 $row_p['Content'] = cutStr($row_p['Content'],70)."...";
$Contentall=$row_p['Content'];
	  if(strlen($row_p['Title'])>28)$row_p['Title'] = msubstr($row_p['Title'],0,16)."...";
	  $produ[]=array("NewsID"=>$row_p['NewsID'],"Title"=>$row_p['Title'],"Content"=>$row_p['Content'],"dtCreate"=>$row_p['dtCreate'],"Pic"=>$row_p['pic'],"Contentall"=>$Contentall); 	
	  
	
}

if($row_c['news_fy']){
$pagers=$pagers;
}
else
{
$pagers="";
}

}
//如果为新闻完
if($row_c['note_class']=='product'){

//如果为产品模块

$pro_id=$row_c['pro_id'];
if($row_c['pro_nub']){
$pro_nub=$row_c['pro_nub'];}
else{
$pro_nub=15;
}
$page=$_GET['page'];
$proID=$_GET['proID'];

if($pro_id==0){
	

$sql3 = "select count(*) from products where show_index=0 and Type='product' ";

}
else{

	
$sql3 = "select count(*) from products where show_index=0 and  ParentID='$pro_id' and Type='product' and lang='$lang' ";


}
if($_GET['pro_fl']){
$pro_fl=$_GET['pro_fl'];
$sql3= "select  count(*) from products where ParentID ='$pro_fl' and Type='product'   ";

}
if($_POST['keyword_pro']){
$keyword_pro = $_POST['keyword_pro'];

$keyword_pro=trim($keyword_pro);
if($keyword_pro){
	$wheres_pro=" AND (ProductName like '%$keyword_pro%' or txtDetail like '%$keyword_pro%') ";
}
//得到总记录数
$sql3="select count(*) from products where 1 $wheres_pro";
}

$rs3  = $db->query($sql3);
$pageSize = $pro_nub;
$totalRecord = $db->result($rs3,0,0);
$totalPage = @ceil($totalRecord/$pageSize);
$noteid=$row_c['id'];
$page_variable_name="page".$noteid;
$page=$_GET[$page_variable_name];
if(!$page)$page = 1;
$offset = ($page-1)*$pageSize;


if($pro_id==0){
$query2 ="select * from products where show_index=0   and Type='product' and lang='$lang' ORDER BY dtCreate DESC limit $offset,$pageSize";
}
else
{


$query2 ="select * from products where show_index=0 and  ParentID='$pro_id'  and Type='product' ORDER BY dtCreate DESC limit $offset,$pageSize";
}

if($_GET['pro_fl']!=''){
$pro_fl=$_GET['pro_fl'];
$query2= "select * from products where ParentID ='$pro_fl' and Type='product'  and show_index=0   ORDER BY dtCreate DESC limit $offset,$pageSize";

}


if($_POST['keyword_pro']){
$keyword_pro = $_POST['keyword_pro'];

$keyword_pro=trim($keyword_pro);
if($keyword_pro){
	$wheres_pro=" AND (ProductName like '%$keyword_pro%' or txtDetail like '%$keyword_pro%') ";
}
//得到总记录数
$query2="select * from  products where 1 $wheres_pro and lang='$lang' order by dtCreate desc limit $offset,$pageSize";
}

$rs2=$DB->query($query2);



$pageList = GetPageList($_SERVER[PHP_SELF],$page_variable_name,"15",$totalPage,$page);
$PNum = $DB->num_rows($rs2);
$pagers="$langInfo[gong] $totalRecord $langInfo[gong1] $totalPage $langInfo[gong2] $page $langInfo[gong3]";
if($pageList) $pagers.= "<br> <br>$pageList[0] $pageList[1]";

while($row_p=$db->fetch_array($rs2)){
	   $row_p['dtCreate'] = date("Y-m-d",strtotime($row_p['dtCreate']));

	  $row_p['month'] = date("m",strtotime($row_p['dtCreate']));
	  $row_p['day'] = date("d",strtotime($row_p['dtCreate']));
	 $row_p['txtDetail'] = cutStr($row_p['txtDetail'],70)."...";
$txtDetailall=$row_p['txtDetail'];
	  if(strlen($row_p['ProductName'])>28)$row_p['ProductName'] = msubstr($row_p['ProductName'],0,16)."...";

$PInfo=PInfo($row_p['IDProduct']);


	  $produ[]=array("proID"=>$row_p['IDProduct'],"ProductName"=>$row_p['ProductName'],"Price"=> intval($PInfo['iPrice']),"txtDetail"=>$row_p['txtDetail'],"dtCreate"=>$row_p['dtCreate'],"Pic"=>$row_p['pic'],"txtDetailall"=>$txtDetailall); 	
	  
	
}

if($row_c['pro_fy']){
$pagers=$pagers;
}
else
{
$pagers="";
}

}




if($row_c['note_class']=='gongge'){


$pics = json_decode($row_c['pics'], true);


$resultpicinfo = iconv('gbk', 'utf-8', $row_c['picinfo']);

$picinfo = json_decode($resultpicinfo, true);

$alink = json_decode($row_c['alink'], true);

   if (isset($pics)) {
                                        foreach ($pics as $key=>$v) {
$picinfo[$key]=iconv('UTF-8', 'GBK', $picinfo[$key]);
$htmlgongge.="<a href='$alink[$key]'><span style='background:#e0e0e0 url($v) no-repeat  center;background-size:80px 80px;'></span>$picinfo[$key]</a>";


}
}

$smarty->assign('htmlgongge',$htmlgongge);




}



if($row_c['note_class']=='mobile_foot_menu'){


$pics = json_decode($row_c['pics'], true);


$resultpicinfo = iconv('gbk', 'utf-8', $row_c['picinfo']);

$picinfo = json_decode($resultpicinfo, true);

$alink = json_decode($row_c['alink'], true);

   if (isset($pics)) {
                                        foreach ($pics as $key=>$v) {
$picinfo[$key]=iconv('UTF-8', 'GBK', $picinfo[$key]);
$mobile_foot_menu.="<a href='$alink[$key]'><span style='background: url($v) no-repeat center bottom;background-size:23px 23px;' class='iconb'></span>$picinfo[$key]</a>";


}
}

$smarty->assign('mobile_foot_menu',$mobile_foot_menu);




}







if($row_c['note_class']=='banner'){


$pics = json_decode($row_c['pics'], true);


$resultpicinfo = iconv('gbk', 'utf-8', $row_c['picinfo']);

$picinfo = json_decode($resultpicinfo, true);

$alink = json_decode($row_c['alink'], true);

   if (isset($pics)) {
                                        foreach ($pics as $key=>$v) {
$picinfo[$key]=iconv('UTF-8', 'GBK', $picinfo[$key]);
$html3.="<li><a href='$alink[$key]'><img style='background: url($v) no-repeat  center;background-size:100% 100%;' src='resources/jiaoben3555/images/alpha.png'  height='100%'  alt='$picinfo[$key]' /></a></li>";

  $html8.="<div class='slide'><a href='$alink[$key]' target='_blank'><img src='$v'  alt='$picinfo[$key]' /></a></div>";

   $html9.="<li class='menuItem'><a href='javascript:;'></a></li>";

if($key==0){
$html4.="<li  class='current'><a href='javascript:void(0)'><img src='$v' alt='$picinfo[$key]'  width='64' height='34' /></a></li>";
}
else
{

$html4.="<li  class='normal'><a href='javascript:void(0)'><img src='$v' alt='$ProductName'  width='64' height='34' /></a></li>";
}
if($key==0){
	$key=$key+1;
$html5.="<li  class='current'><a>$key</a></li>";}
else
{
	$key=$key+1;
$html5.="<li  class='normal'><a>$key</a></li>";}
}

}
$smarty->assign("UnitPrice",$PInfo['iPrice']);
$smarty->assign("IDProduct",$proID);
$smarty->assign('Price',$Price);
$smarty->assign('html4',$html4);
$smarty->assign('html5',$html5);
$smarty->assign('html3',$html3);

$smarty->assign('html8',$html8);
$smarty->assign('html9',$html9);


}




if($row_c['note_class']=='product_fl'){

$arProType = array();
$proType = new ProductType();
$tree = $proType->ShowProTypeTree_pro('0',0,$arProType);
 for($i=0;$i<count($tree);$i++){
					if($tree[$i]['Type']=="class")	{
	
                    $product_fl.= "<tr class='text-c' style='padding:10px;'><td><a href='index.php?page_id=".$row_c['pro_open_pageid']."&pro_fl=".$tree[$i]['IDProduct']."' >".$tree[$i]['Disp']."</a></td></tr>";
					

 if($tree[$i]['ParentID']=="0"  && $tree[$i]['lang']==$lang){
	
$parr_id=$tree[$i]['IDProduct'];
	 	$sql_pr0 = "select * from products where ParentID='".$tree[$i]['IDProduct']."' and Type='class'";
		
$rs_pro=$DB->query($sql_pr0);

if(mysql_num_rows($rs_pro) > 0){
$erjs[$i].="<dd class='menv03'><div class='sideleft'>";
$erjs2[$i].="<div class='div3'><ul>";
while($row_pro=$db->fetch_array($rs_pro)){

$erjs[$i].="<a href='index.php?page_id=".$row_c['pro_open_pageid']."&pro_fl=".$row_pro['IDProduct']."' >".$row_pro['ProductName']."</a> | ";

$erjs2[$i].="<li> <a href='index.php?page_id=".$row_c['pro_open_pageid']."&pro_fl=".$row_pro['IDProduct']."' >".$row_pro['ProductName']."</a></li>";

 }
	$erjs[$i].="</div></dd>";
$erjs2[$i].="</ul></div>";
	 }
	 else
	 {
	 $erjs[$i]="";
 $erjs2[$i]="";
	 }
$product_fl_1.= "<dl>";

 $product_fl_1.= "<dt class='icon03'><a href='index.php?page_id=".$row_c['pro_open_pageid']."&pro_fl=".$tree[$i]['IDProduct']."' >".$tree[$i]['Disp']."</a></dt> ".$erjs[$i]." ";
 	$product_fl_1.="</dl>";



	
$product_fl_2.= "<div class='div2'>";

if(mysql_num_rows($rs_pro) > 0){
 $product_fl_2.= " <span class='left'>+</span> <a href='index.php?page_id=".$row_c['pro_open_pageid']."&pro_fl=".$tree[$i]['IDProduct']."' >".$tree[$i]['Disp']."</a><span class='right'>∨</span></div> ".$erjs2[$i]."  ";
}
else
	 {
 $product_fl_2.= " <span class='left'>&nbsp; </span>  <a href='index.php?page_id=".$row_c['pro_open_pageid']."&pro_fl=".$tree[$i]['IDProduct']."' >".$tree[$i]['Disp']."</a></div> ".$erjs2[$i]."  ";
}
 	











		$smarty->assign('product_fl',$product_fl);
$smarty->assign('product_fl_1',$product_fl_1);
$smarty->assign('product_fl_2',$product_fl_2);
  }

			

					}

				
				
}


}





if($row_c['note_class']=='news_fl'){
$arProType = array();
$proType = new ProductType1();
$tree = $proType->ShowProTypeTree_news('0',0,$arProType);

 for($i=0;$i<count($tree);$i++){
					
                    $news_fl.= "<tr class='text-c' style='padding:10px;'><td><a href='index.php?page_id=".$row_c['news_open_pageid']."&news_fl=".$tree[$i]['IDProduct']."' >".$tree[$i]['Disp']."</a></td></tr>";
					
					
					
		
 if($tree[$i]['ParentID']=="0" & $tree[$i]['lang']==$lang){
	

	 	$sql_news = "select * from types where ParentID='".$tree[$i]['IDProduct']."' ";
		
$rs_news=$DB->query($sql_news);
if(mysql_num_rows($rs_news) > 0){
$erjs1[$i].="<dd class='menv03'><div class='sideleft'>";

$erjs3[$i].="<div class='div3'><ul>";
while($row_news=$db->fetch_array($rs_news)){

$erjs1[$i].="<a href='index.php?page_id=".$row_c['news_open_pageid']."&news_fl=".$row_news['IDProduct']."' >".$row_news['ProductName']."</a> | ";
$erjs3[$i].="<li> <a href='index.php?page_id=".$row_c['news_open_pageid']."&news_fl=".$row_news['IDProduct']."' >".$row_news['ProductName']."</a></li>";

 }
	$erjs1[$i].="</div></dd>";
	$erjs3[$i].="</ul></div>";
	 }
	 else
	 {
	 $erjs1[$i]="";
	 $erjs3[$i]="";
	 }
$news_fl_1.= "<dl>";

 $news_fl_1.= "<dt class='icon03'><a href='index.php?page_id=".$row_c['news_open_pageid']."&news_fl=".$tree[$i]['IDProduct']."' >".$tree[$i]['Disp']."</a></dt> ".$erjs1[$i]." ";
 	$news_fl_1.="</dl>";
			
					

$news_fl_2.= "<div class='div2'>";

if(mysql_num_rows($rs_news) > 0){
 $news_fl_2.= " <span class='left'>+</span> <a href='index.php?page_id=".$row_c['news_open_pageid']."&news_fl=".$tree[$i]['IDProduct']."' >".$tree[$i]['Disp']."</a><span class='right'>∨</span></div> ".$erjs3[$i]."  ";
}
else
	 {
 $news_fl_2.= " <span class='left'>&nbsp; </span>  <a href='index.php?page_id=".$row_c['news_open_pageid']."&news_fl=".$tree[$i]['IDProduct']."' >".$tree[$i]['Disp']."</a></div> ".$erjs3[$i]."  ";
}					
					}
}

$smarty->assign('news_fl',$news_fl);
$smarty->assign('news_fl_1',$news_fl_1);
$smarty->assign('news_fl_2',$news_fl_2);
}
        $color_bgrgb=implode(',', hex2rgb ( $row_c['color_bg'] ));   
 $color_bgyrrgb=implode(',', hex2rgb ( $row_c['color_bgyr'] )); 
  $link_bgrgb=implode(',', hex2rgb ( $row_c['link_bg'] ));   
 $link_bgyrrgb=implode(',', hex2rgb ( $row_c['link_bgyr'] ));   
$bt_bgrgb=implode(',', hex2rgb ( $row_c['bt_bg'] ));


$class[]=array("link_bgrgb"=>$link_bgrgb,"link_bgyrrgb"=>$link_bgyrrgb,"bt_bgrgb"=>$bt_bgrgb,"color_bgrgb"=>$color_bgrgb,"color_bgyrrgb"=>$color_bgyrrgb,"repeat_bg_qh"=>$row_c['repeat_bg_qh'],"biaoti_bg_qh_repeat"=>$row_c['biaoti_bg_qh_repeat'],"biaoti_bg_qh"=>$row_c['biaoti_bg_qh'],"biaoti_bg"=>$row_c['biaoti_bg'],"biaoti_bg_qh_dq"=>$row_c['biaoti_bg_qh_dq'],"note_bg_qh"=>$row_c['note_bg_qh'],"biaoti_bg_dq"=>$row_c['biaoti_bg_dq'],"biaoti_bg_repeat"=>$row_c['biaoti_bg_repeat'],"note_bg_qh_dq"=>$row_c['note_bg_qh_dq'],"note_bg_qh"=>$row_c['note_bg_qh'],"note_bg_dq"=>$row_c['note_bg_dq'],"color_bgtm"=>$row_c['color_bgtm'],"color_bgyr"=>$row_c['color_bgyr'],"link_bgtm"=>$row_c['link_bgtm'],"link_bgyr"=>$row_c['link_bgyr'],"bt_kd"=>$row_c['bt_kd'],"bt_nbj"=>$row_c['bt_nbj'],"bt_wbj"=>$row_c['bt_wbj'],"bt_gd"=>$row_c['bt_gd'],"bt_bg"=>$row_c['bt_bg'],"bt_font"=>$row_c['bt_font'],"bt_color"=>$row_c['bt_color'],"border_ybj"=>$row_c['border_ybj'],"border_zbj"=>$row_c['border_zbj'],"border_xbj"=>$row_c['border_xbj'],"border_sbj"=>$row_c['border_sbj'],"border_yysyr"=>$row_c['border_yysyr'],"border_yyyr"=>$row_c['border_yyyr'],"border_yjyr"=>$row_c['border_yjyr'],"border_xxyr"=>$row_c['border_xxyr'],"border_xkyr"=>$row_c['border_xkyr'],"border_coloryr"=>$row_c['border_coloryr'], "border_yys"=>$row_c['border_yys'],"border_yy"=>$row_c['border_yy'],"border_yj"=>$row_c['border_yj'],"border_xx"=>$row_c['border_xx'],"border_xk"=>$row_c['border_xk'],"border_color"=>$row_c['border_color'],"font_color"=>$row_c['font_color'],"donghua"=>$row_c['donghua'],"link_bg"=>$row_c['link_bg'],"link_color"=>$row_c['link_color'],"fontsize"=>$row_c['fontsize'],"repeat_bg"=>$row_c['repeat_bg'],"color_bg"=>$row_c['color_bg'],"note_bg"=>$row_c['note_bg'],"news_ms"=>$row_c['news_ms'],"pro_ms"=>$row_c['pro_ms'],"c_align"=>$row_c['c_align'],"note_class"=>$row_c['note_class'],"id"=>$row_c['id'],"note_weiz"=>$row_c['note_weiz'],"farther_note"=>$row_c['farther_note'],"color"=>$row_c['color'],"produ"=>$produ,"left"=>$row_c['left'],"top"=>$row_c['top'],"zindex"=>$row_c['zindex'],"width"=>$row_c['width'],"height"=>$row_c['height'],"color"=>$row_c['color'],"Content"=>$row_c['Content'],"title"=>$row_c['title'],"pagers"=>$pagers,"news_fy"=>$news_fy,"pro_fy"=>$pro_fy,"title_right"=>$row_c['title_right'],"title_right_url"=>$row_c['title_right_url'],"$NewsID"=>$NewsID,"$proID"=>$proID,"news_open_pageid"=>$row_c['news_open_pageid'],"pro_open_pageid"=>$row_c['pro_open_pageid'],"note_css"=>$row_c['note_css'],"pro_pic_w"=>$row_c['pro_pic_w'],"pro_pic_y"=>$row_c['pro_pic_y']);  

unset($produ);  	
  

};




//这是什么
if($_GET['proID']!=''){
$sql = "select * from products where IDProduct ='$proID' ";

$proinfo = $db->getdata($sql);
$pro_title=$proinfo[ProductName];
 $pro_description = cutStr($proinfo['txtDetail'],70)."...";
$ProductName=$proinfo[ProductName];
$txtDetail=$proinfo[txtDetail];
$PInfo=PInfo($proID);
$Price=$PInfo[iPrice];
$product_pic=$PInfo[pic];
$dtCreate=date("Y.m.d",strtotime($proinfo[dtCreate]));
$pics = json_decode($proinfo['pics'], true);
$resultpicinfo = iconv('gbk', 'utf-8', $proinfo['picinfo']);

$picinfo = json_decode($resultpicinfo, true);
$alink = json_decode($proinfo['alink'], true);
	$json_string = $PInfo['product_info'];//iconv("UTF-8", "GBK", $proInfo['product_info']);

							$json_string= iconv('GBK', 'UTF-8', $json_string);


				
							$product_info_arr = json_decode($json_string,true);
							//print_r($product_info_arr);
							if($product_info_arr)
							{
								foreach($product_info_arr as $key=>$info)
								{
$name_cs=iconv('UTF-8', 'GBK', $key);
$info_cs=iconv('UTF-8', 'GBK', $info);

$html_cs.="<li>$name_cs : $info_cs</li>";
$smarty->assign('html_cs',$html_cs);
	}
							}



   if (isset($pics)) {
                                        foreach ($pics as $key=>$v) {

$picinfo[$key]=iconv('UTF-8', 'GBK', $picinfo[$key]);
$html.="<li><a href='$alink[$key]'><img src='$v'  width='660' height='330' /></a></li>";
$html10="<a href='$pics[0]' class='MagicZoom' id='MagicZoom'><img src='$pics[0]'  width='100%' height='100%'  /></a>";
$html12.="<li><img src='$v' class='sliderimg' HEIGHT='100%'  alt='$picinfo[$key]' /></li>";

if($key==0){
	$key=$key+1;
$html5.="<li  class='current'><a>$key</a></li>";
$html13.="<li  class='current'><a>$key</a></li>";
$html14.="<a href='#'>&nbsp;</a>";
}
else
{
	$key=$key+1;
$html5.="<li  class='normal'><a>$key</a></li>";
$html13.="<li  class='current'><a>$key</a></li>";
$html14.="<a href='#'>&nbsp;</a>";
}





if($key==0){
$html1.="<li  class='current'><a href='javascript:void(0)'><img src='/admin/settings/$v' alt='$ProductName'  width='64' height='34' /></a></li>";
$html11.="<li onclick='showPic($key)' rel='MagicZoom' ><img src='$v' height='42' width='42' alt='$picinfo[$key]'  tsImgS='$v' /></a></li>";

}
else
{

$html1.="<li  class='normal'><a href='javascript:void(0)'><img src='/admin/settings/$v' alt='$ProductName'  width='64' height='34' /></a></li>";
$html11.="<li onclick='showPic($key)' rel='MagicZoom'  class='tsSelectImg'><img src='$v' height='42' width='42' alt='$picinfo[$key]'  tsImgS='$v' /></a></li>";

}
if($key==0){
$html2.="<li  class='current'> $picinfo[$key]</li>";}
else
{
$html2.="<li  class='normal'>$picinfo[$key]</li>";}
}

}
$smarty->assign("UnitPrice",$PInfo['iPrice']);
$smarty->assign("product_pic",$PInfo['pic']);
$smarty->assign("IDProduct",$proID);
$smarty->assign('Price',$Price);
$smarty->assign('html1',$html1);
$smarty->assign('html2',$html2);
$smarty->assign('html10',$html10);
$smarty->assign('html11',$html11);
$smarty->assign('html12',$html12);
$smarty->assign('html13',$html13);
$smarty->assign('html14',$html14);
$smarty->assign('html',$html);
}







//这是什么
if($_GET['NewsID']!=''){
$sql = "select * from news where NewsID = '$NewsID' ";
$result = $db->query($sql);
$NewsItems = array();
while($NewsI=$db->fetch_array($result)){
	  $NewsItems[] = $NewsI;	  
}
$newsinfo = $db->getdata($sql);
$news_title=$newsinfo[Title];
 $news_description = cutStr($newsinfo['Content'],70)."...";

}


if($_GET['edit']=='del')
{
$id = $_GET['ID'];
$key = $_GET['key'];
$sql = "select * from notes where ID='$id'";
$noteInfo  = $DB->getdata($sql);

$sql = "delete from notes where id='$id'";
$DB->query($sql);

}
if($_GET['action']=='login')
{
$UserName = $_POST['UserName'];
$Password = $_POST['Password'];
$GoUrl = $_GET['GoUrl'];
//die($GoUrl);
if($UserName != ''){
   $sql = "select * from users where UserName='$UserName'";
   $UInfo = $db->getdata($sql);
   if($UInfo && $UInfo['Password']==MD5($Password)){
	   if($UInfo['iStatus']==1){
		  $sql = "update users set dtLogin=now() where UserName='$UserName'";
		  $db->query($sql);
		  $db->close();
		  $_SESSION['User_S'] = $UInfo['UserName'];
		  $_SESSION['iLevel_S'] = $UInfo['iLevel'];
		  if($GoUrl){header("Location: $GoUrl");}
		  else {header("Location: /user/index.php");}
		  exit;
	   }else{
	     $mess = '<span>'.$langInfo[zhjy].'</span>';
 echo '<script>alert('.$langInfo[zhjy].');</script>';

	   }
   }else{
      $mess = '<span>'.$langInfo[mmcw].'</span>';
 echo '<script>alert('.$langInfo[mmcw].');</script>';
}
$action="login";

}

}

if($_GET['action']=='usereg')
{
/**
 * 兼容post函数
 *
 * date 2012-05-25 13:40:41
 */
$UserName = $_POST['UserName'];
$Password = $_POST['Password'];
$Password2 = $_POST['Password2'];
$Company_GB = $_POST['Company_GB'];
$Company_EN = $_POST['Company_EN'];
$Contact_GB = $_POST['Contact_GB'];
$Contact_EN = $_POST['Contact_EN'];
$Country = $_POST['Country'];
$Province_GB = $_POST['Province_GB'];
$City_GB = $_POST['City_GB'];
$Addr_GB = $_POST['Addr_GB'];
$Addr_EN = $_POST['Addr_EN'];
$PostCode = $_POST['PostCode'];
$Email = $_POST['Email'];
$Tel = $_POST['Tel'];
$Fax = $_POST['Fax'];
$QQ_openid = $_POST['openid'];

if($UserName == null || $Password == null || $Password2 == null || $Contact_GB == null||  $Addr_GB ==null ||  $Tel == null || $Email == null)
{
	echo ''.$langInfo[srkz].'。';
	exit();
}


$sql="select count(*) from users where UserName='$UserName'";
$rs=$db->query($sql);
$exist = $db->result($rs,0,0);
if($exist){
   $db->close();
     die('<script>alert('.$langInfo[yhm].' '.$UserName.''.$langInfo[ybzy].');history.back();</script>');
}

$sql="insert into users set UserName='$UserName',Password=MD5('$Password'),Company_GB='$Company_GB',".
	"Company_EN='$Company_EN',Contact_GB='$Contact_GB',Contact_EN='$Contact_EN',Country='$Country',Province_GB='$Province_GB',".
	"City_GB='$City_GB',Addr_GB='$Addr_GB',Addr_EN='$Addr_EN',".
	"PostCode='$PostCode',Email='$Email',QQ_openid='$QQ_openid',Tel='$Tel',Fax='$Fax',iStatus ='1',dtCreate=now()";
$db->query($sql);
 echo '<script>alert('.$langInfo[zc].'Success！);</script>';

$mailvars['UserName'] = $UserName;
$mailvars['Password'] = $Password;

$smarty->assign('UserName',$UserName);
$smarty->assign('Password',$Password);
if($mailvars){
@SendTemplateMail("user_reg.htm",$mailvars,$Email,$langInfo[zc]."Success！".$_CFG['Company'].$langInfo[yhm]);}

}




if($_GET['action']=='getpwd')
{
$UserName = $_POST['UserName'];
$UserMail = $_POST['UserMail'];

if($UserName!='' && $UserMail != ''){
    $sql="select * from users where UserName='$UserName'";
	$rs=$db->query($sql);
	$UserInfo=$db->fetch_array($rs);
	if(!$UserInfo || $UserInfo['Email'] != $UserMail) {
	   $message.= "<font color='red'>".$langInfo[yhbz]."</font>";
  echo '<script>alert('.$langInfo[yhbz].');</script>';
	} else {
		$UserName = $UserInfo['UserName'];
	   	$Password = $UserInfo['Password'];
		$num = md5($UserName.$Password.rand());
		
		$sql = 'INSERT INTO `getpwd` (`id`, `user`, `key`, `istart`, `time`) VALUES (NULL, \''.$UserName.'\', \''.$num.'\', \'0\', UNIX_TIMESTAMP());';
		$db->query($sql);
		$ID=$db->insert_id();
		$mailvars['UserName'] = $UserInfo['UserName'];
		$mailvars['url'] = $parentpath.'/user/get_pwd.php?id='.$ID.'&key='.md5($num).'&sj='.time(); 
	  
	   $sent = SendTemplateMail("user_pass.htm",$mailvars,$UserInfo['Email'],"会员密码取回");
	   if($sent) {
		  $message = '<font color=#009900>Send mail successfull: '.$UserInfo[Email].' </font>';
	    echo '<script>alert(Send mail successfull'.$UserInfo[Email].');</script>';
	   }
	   else $message = "SMTP server does not exist or SMTP authentication failed<br>SMTP服务器不存在 或 SMTP认证失败";
	      echo "<script>alert('SMTP server does not exist or SMTP authentication failed<br>SMTP服务器不存在 或 SMTP认证失败');</script>";
	}
} elseif($submit) {
	$message = $langInfo[yhbz];
	   echo '<script>alert('.$langInfo[yhbz].');</script>';
}


$smarty->assign("message",$message);

}





if($_GET['action']=='question')
{

$QuesType = $_POST['QuesType'];
$Subject = $_POST['Subject'];
$Content = $_POST['Content'];
$UserName = $_POST['UserName'];
$Password = $_POST['Password'];
$Contact = $_POST['Contact'];
$Email = $_POST['Email'];

$action = $_POST['act'];
$code = trim($_POST['code']);
if($action=='num'){ //检验数字验证码
	if($code==$_SESSION["helloweba_num"]){
       echo '1';
    }
}elseif($action=='char'){
	if($code==$_SESSION["helloweba_char"]){
       echo '1';
    }
}elseif($action=='zh'){
	$code = uniDecode($code,'utf-8');
	$ses = iconv('gbk','utf-8',$_SESSION["helloweba_zh"]);
	if($code==$ses){
       echo '1';
    }
}elseif($action=='gg'){
	//echo $_SESSION["helloweba_gg"];exit;
	if(strtolower($code)==$_SESSION["helloweba_gg"]){
       echo '1';
    }
}elseif($action=='math'){
	if($code==$_SESSION["helloweba_math"]){
       
    }
}else{

}

//处理接收中文字符串
function uniDecode($str, $charcode) {
	$text = preg_replace_callback("/%u[0-9A-Za-z]{4}/", toUtf8, $str);
	return mb_convert_encoding($text, $charcode, 'utf-8');
}
function toUtf8($ar) {
	foreach ($ar as $val) {
		$val = intval(substr($val, 2), 16);
		if ($val < 0x7F) { // 0000-007F
			$c .= chr($val);
		}
		elseif ($val < 0x800) { // 0080-0800
			$c .= chr(0xC0 | ($val / 64));
			$c .= chr(0x80 | ($val % 64));
		} else { // 0800-FFFF
			$c .= chr(0xE0 | (($val / 64) / 64));
			$c .= chr(0x80 | (($val / 64) % 64));
			$c .= chr(0x80 | ($val % 64));
		}
	}
	return $c;
}


if($_SESSION[User_S]){
	$UserName = $_SESSION[User_S];
	$sql="select * from users where UserName='$UserName'";
	$urow = $db->getRow($sql);
	$Contact = $urow[Contact_GB];
	$Email = $urow[Email];
}elseif($UserName){
	$sql="select count(*) from users where UserName='$UserName' AND Password='".md5($Password)."'";
	$exists=$db->result($db->query($sql),0,0);
	if(!$exists)$error=1;
	$errmsg .= ''.$langInfo[srkz].'！<br><br>';
$errmsg1=''.$langInfo[mmcw].'！<br><br>';
}
if($Contact==""){
	$error=1;
	$errmsg .= ''.$langInfo[srkz].'！<br><br>';
$errmsg2=''.$langInfo[srkz].'！<br><br>';
}
if($Subject==""){
	$error=1;
	$errmsg .= ''.$langInfo[srkz].'！<br><br>';
$errmsg3=''.$langInfo[srkz].'！<br><br>';
}
if($Content==""){
	$error=1;
	$errmsg .= ''.$langInfo[srkz].'！<br><br>';
$errmsg4=''.$langInfo[srkz].'！<br><br>';
}
if($Email==""){
	$error=1;
	$errmsg .= ''.$langInfo[srkz].'！<br><br>';
$errmsg5=''.$langInfo[srkz].'！<br><br>';
}
if($code==""){
	$error=1;
	$errmsg .= ''.$langInfo[srkz].'！<br><br>';
$errcode=''.$langInfo[srkz].'！<br><br>';
}
else{
if($code==$_SESSION["helloweba_math"]){

}
else{
		$error=1;
 $errcode = ''.$langInfo[yzmcw].'！<br><br>';
}
}
if(!$error){
	$sql="insert into question set UserName='$UserName',QuesType='$QuesType',Contact='$Contact',".
		 "Email='$Email',Subject='$Subject',Content='$Content',dtCreate=now()";
	$db->query($sql);
	$message = 'Good!'.$langInfo[tjwt].' Success!<br><br>';
	  echo '<script>alert(Good!"'.$langInfo[tjwt].'"Success!);window.parent.location.href="index.php?page_id="'.$page_id.';</script>';
}else{
	$message = "";
	
}


$smarty->assign("message",$message);
$smarty->assign("errmsg5",$errmsg5);
$smarty->assign("errmsg4",$errmsg4);
$smarty->assign("errmsg3",$errmsg3);
$smarty->assign("errmsg2",$errmsg2);
$smarty->assign("errmsg1",$errmsg1);
$smarty->assign("errcode",$errcode);
}







$QuesType = GetQuestionTypes();
for($i=0;$i<count($QuesType);$i++){
   $option_type .= "<option value='".$QuesType[$i]."'>".$QuesType[$i]."</option>";
}

$smarty->assign("option_type",$option_type);
$smarty->assign("displayuser",$_SESSION['User_S']?false:true);


$openid = $_GET['openid'];
$smarty->assign('openid',$openid);
$smarty->assign('GoUrl',$GoUrl);
$smarty->assign('mess',$mess);








//得到总记录数
$sql         = "select count(*) from question where 1 $wheres and lang='$lang'";
$rs          = $db->query($sql);
$pageSize    = 30;
$totalRecord = $db->result($rs,0,0);
$totalPage   = ceil($totalRecord/$pageSize);
if(!$page)$page = 1;
$offset      = ($page-1) * $pageSize;
//查询
$sql         = "select * from question where 1 $wheres and lang='$lang' order by ID DESC limit $offset,$pageSize";
$result      = $db->query($sql);
$pageList    = GetPageList($_SERVER[PHP_SELF],"page","15",$totalPage,$page);
while($QuesI = $db->fetch_array($result)){
	  $bg          = $bg=="#FFFFFF"?"#EEEEEE":"#FFFFFF";
	  $QuesI['bg'] = $bg;
	  $QuesItems[] = $QuesI;
}
$pagers="$langInfo[gong] $totalRecord $langInfo[gong1] $totalPage $langInfo[gong2] $page $langInfo[gong3]";
if($pageList) $pagers .= "$pageList[0] <br> $pageList[1]";
/************* end of 查询财务信息 *******************/
//输出
$smarty->assign("QuesItems",$QuesItems);
$smarty->assign("pagers",$pagers);


	$sql = "select * from question_class where  lang='$lang' order by id desc";
$rs=$DB->query($sql);
while($row=mysql_fetch_array($rs)){
	

	$questionclass.= '<option value='.$row['QuesType'].'>'.$row['QuesType'].'</option>';
}


$edit=0;



/*** 查询 *************/
$sql = "SELECT * FROM `order` limit  10  ";
$result = $DB->query($sql);
while($OrderI=$DB->fetch_array($result)){
		       $dkey = GetHashKey('order'.$OrderI[OrderID]);
			   $ukey = GetHashKey('users'.$OrderI[UserName]);
$orderlist.='<b>'.$langInfo[yhm].' '.$OrderI[UserName].'</b><br><font color=#3399cc>'.$OrderI[About].'</font><br>';

}




$smarty->assign('orderlist',$orderlist);

$smarty->assign('questionclass',$questionclass);


$smarty->assign('header_note_bg_mobile',$pageInfo[header_note_bg_mobile]);
$smarty->assign('header_color_bg_mobile',$pageInfo[header_color_bg_mobile]);
$smarty->assign('header_repeat_bg_mobile',$pageInfo[header_repeat_bg_mobile]);

$smarty->assign('head_note_bg_mobile',$pageInfo[head_note_bg_mobile]);
$smarty->assign('head_color_bg_mobile',$pageInfo[head_color_bg_mobile]);
$smarty->assign('head_repeat_bg_mobile',$pageInfo[head_repeat_bg_mobile]);


$smarty->assign('middle_note_bg_mobile',$pageInfo[middle_note_bg_mobile]);
$smarty->assign('middle_color_bg_mobile',$pageInfo[middle_color_bg_mobile]);
$smarty->assign('middle_repeat_bg_mobile',$pageInfo[middle_repeat_bg_mobile]);

$smarty->assign('middler_note_bg_mobile',$pageInfo[middler_note_bg_mobile]);
$smarty->assign('middler_color_bg_mobile',$pageInfo[middler_color_bg_mobile]);
$smarty->assign('middler_repeat_bg_mobile',$pageInfo[middler_repeat_bg_mobile]);

$smarty->assign('foot_note_bg_mobile',$pageInfo[foot_note_bg_mobile]);
$smarty->assign('foot_color_bg_mobile',$pageInfo[foot_color_bg_mobile]);
$smarty->assign('foot_repeat_bg_mobile',$pageInfo[foot_repeat_bg_mobile]);


$smarty->assign('footer_note_bg_mobile',$pageInfo[footer_note_bg_mobile]);
$smarty->assign('footer_color_bg_mobile',$pageInfo[footer_color_bg_mobile]);
$smarty->assign('footer_repeat_bg_mobile',$pageInfo[footer_repeat_bg_mobile]);







$smarty->assign('head_width',$head_width);
$smarty->assign('head_height',$head_height);
$smarty->assign('head_css',$head_css);
$smarty->assign('head_width_mobile',$head_width_mobile);


$smarty->assign('head_height_mobile',$head_height_mobile);
$smarty->assign('head_css_mobile',$head_css_mobile);
$smarty->assign('main_width_mobile',$main_width_mobile);
$smarty->assign('main_height_mobile',$main_height_mobile);
$smarty->assign('main_css_mobile',$main_css_mobile);
$smarty->assign('foot_width_mobile',$foot_width_mobile);
$smarty->assign('foot_height_mobile',$foot_height_mobile);
$smarty->assign('foot_css_mobile',$foot_css_mobile);
$smarty->assign('main_width',$main_width);
$smarty->assign('main_height',$main_height);
$smarty->assign('main_css',$main_css);
$smarty->assign('foot_width',$foot_width);
$smarty->assign('foot_height',$foot_height);
$smarty->assign('foot_css',$foot_css);
$smarty->assign('menu_name',$menu_name);
$smarty->assign('title_new',$title_new);
$smarty->assign('keywords',$keywords);
$smarty->assign('description',$description);
$smarty->assign('maxid',$maxid);
$smarty->assign('NewsItems',$NewsItems);
$smarty->assign('treestringall',$treestringall);
$smarty->assign('treestring',$treestring);
$smarty->assign('treestringParentID',$treestringParentID);
$smarty->assign('treestringlang',$treestringlang);
$smarty->assign('treestringlang1',$treestringlang1);
$smarty->assign('class',$class);
$smarty->assign('admins',$adminS);
$AgentInfo = load_config(1);
$smarty->assign('parentpath',$AgentInfo['API_WEB_URL']);
$smarty->assign('AgentInfo_show_mobile',$AgentInfo['show_mobile']);
$smarty->assign('qq_weizi',$AgentInfo['qq_weizi']);
$smarty->assign('AgentInfo_background',$AgentInfo['Banner']);
$smarty->assign('bg_repeat',$AgentInfo['bg_repeat']);
$smarty->assign('bg_color',$AgentInfo['bg_color']);

$smarty->assign('product_pic',$product_pic);
$smarty->assign('txtDetail',$txtDetail);
$smarty->assign('dtCreate',$dtCreate);
$smarty->assign('ProductName',$ProductName);
$smarty->assign('news_title',$news_title);
$smarty->assign('news_description',$news_description);
$smarty->assign('pro_title',$pro_title);
$smarty->assign('pro_description',$pro_description);
$smarty->assign('lang',$lang);
$smarty->assign('arrBoxNo',$arrBoxNo);

$smarty->assign('page_id',$page_id);
$smarty->assign('page_no',$page_no);
$smarty->assign('edit',$edit);
$smarty->assign('action',$action);
$smarty->assign('proID',$proID);
$smarty->assign('NewsID',$NewsID);
$smarty->assign('Content',$Content);
$smarty->assign('HProducts',$HProducts);
$smarty->assign('lang_agentname',$lang_agentname);
$smarty->assign('notesItems',$notesItems);
$smarty->display('mobile_index.html');
$db->close();


?>

