"; $sql_lang=" and lang in('".$_SESSION[web][lang]."','global') "; $sel_q="select * from ".$db_prefix."kv where 1 ".$sql_lang." and status='Y' order by order_num "; $sel_r=db_q($sel_q); while($rs=get_data($sel_r)) { $data_type=$rs[data_type]; $url=$rs[url]; if($rs[lang]=="global" and $_SESSION[web][lang]!="global") { $chk_q="select sn from ".$db_prefix."kv_local_status where 1 and info_sn='".$rs[sn]."' and lang='".$_SESSION[web][lang]."' and status='Y' "; $chk_r=db_q($chk_q); if(r_size($chk_r)) { $sel_q2="select url from ".$db_prefix."kv_lang where 1 and info_sn='".$rs[sn]."' and lang='".$_SESSION[web][lang]."' "; $sel_r2=db_q($sel_q2); if($rs1=get_data($sel_r2)) { $url=$rs1[url]; } } else { continue; } } if($data_type=="圖片") { if($url) print "
"; else print "
"; } else { print "
".restore_data_all($rs[pic1])."
"; } } print "
"; $sql_lang=" and lang like '%global%' "; $list_q="select * from ".$db_prefix."info where 1 ".$sql_lang." and status='Y' order by add_date desc limit 1 "; $list_r=db_q($list_q); if($rs=get_data($list_r)) { $title=$rs[title]; $content=$rs[content]; $chk_q="select sn from ".$db_prefix."info_local_status where 1 and lang='".$_SESSION[web][lang]."' and status='Y' and info_sn='".$rs[sn]."' "; $chk_r=db_q($chk_q); if(r_size($chk_r)) { if($_SESSION[web][lang]!="global") { $sel_q="select title,content from ".$db_prefix."info_lang where 1 and info_sn='".$rs[sn]."' and lang='".$_SESSION[web][lang]."'"; $sel_r=db_q($sel_q); if($rs1=get_data($sel_r)) { $title=$rs1[title]; $content=$rs1[content]; } } $pass=1; } elseif($_SESSION[web][lang]=="global") { $pass=1; } else{ $pass=0; } if($pass) { print "

".$title."

".restore_data_all($content)."

"; } } print "
    "; $sql=" select * from ".$db_prefix."var_list"; $sql.=" where 1 and var_type='產品類別' "; $sql.=" and var_status='Y'"; $sql.=" order by var_value+0 "; $temp=db_q($sql); $i=0; while($rs=get_data($temp)) { $chk_q="select sn from ".$db_prefix."pro_type_local_status where 1 and lang='".$_SESSION[web][lang]."' and status='Y' and info_sn='".$rs[sn]."' "; $chk_r=db_q($chk_q); if(r_size($chk_r)) { $pass=1; } elseif($_SESSION[web][lang]=="global") { $pass=1; } else{ $pass=0; } if($pass) { if($i==0) { $show_active="active"; $temp_sn=$rs[sn]; $temp_title=$rs[var_value2]; } else { $show_active=""; } print "
  • "; $i++; } else { //print "
  • "; } } print "

".trans_lang("Gallery")."

"; $data_type="product"; $one_page=3; $list_q="select v.sn "; $list_q.="from ".$db_prefix."video as v "; $list_q.="left join ".$db_prefix."video_local_status as vls on v.sn=vls.info_sn and vls.lang='".$_SESSION[web][lang]."'"; $list_q.="where 1 and ((v.lang ='global' and vls.status='Y') or v.lang='".$_SESSION[web][lang]."') and v.data_type='".$data_type."' and v.status='Y' order by v.order_num "; $list_r=db_q($list_q); $chk_num=r_size($list_r); if($chk_num) { $page_data=get_page($one_page,$page,$chk_num); //$list_q="select * from ".$db_prefix."video where 1 ".$sql_lang." and data_type='product' and status='Y' order by order_num limit ".$one_page." "; $list_q="select v.* "; $list_q.="from ".$db_prefix."video as v "; $list_q.="left join ".$db_prefix."video_local_status as vls on v.sn=vls.info_sn and vls.lang='".$_SESSION[web][lang]."' "; $list_q.="where 1 and ((v.lang ='global' and vls.status='Y') or v.lang='".$_SESSION[web][lang]."') and v.data_type='".$data_type."' and v.status='Y' order by v.order_num "; $list_q.=" limit ".$page_data[start_page].",".$page_data[one_page]." "; $list_r=db_q($list_q); while($rs=get_data($list_r)) { $pic1=$rs[pic1]; $sn=$rs[sn]; $title=$rs[title]; $url=restore_data_all($rs[url]); $chk_q="select url,lang from ".$db_prefix."video_lang where 1 and lang='".$_SESSION[web][lang]."' and info_sn='".$rs[sn]."' "; $chk_r=db_q($chk_q); if($rs1=get_data($chk_r)) { if($rs1[url]) { $url=restore_data_all($rs1[url]); } } $url=str_replace("\"","'",$url); $show_link=""; if($url) { if(instr($url,"youtu.be")) { $code=explode("/",$url); $y_code=$code[count($code)-1]; } else { $code=explode("&",basename($url)); $y_code=str_replace("watch?v=","",$code[0]); } $show_link="Asus

".$title."

"; } else { $show_link="Asus

".$title."

"; } if($show_link) { print "
".$show_link."
"; } }//while }//if($chk_num print "
"; if($chk_num>$one_page) print ""; else print "
"; print "
"; include("footer.php"); print " "; ?>