";
$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 "