require("../../inc/include.php");
$str=red("str");
switch($str){
case 'ad': get_ad(); break;
case 'online': online(); break;
}
function online(){
$row=rdb("select title,cotxt from zs_class where copad>99 and coist='online' and cohtm='online' and coqas=1 LIMIT 0,1");
if($row){
$sty = $row[0]; $sty = is(substr($sty,-1),0);
$str=jsb();
$str.='';
$str.='
';
$str.='
';
$str.='
';
$str.=re($row[1],'\'','');
$str.='
';
$str.='';
$str.='
';
$str.='';
$str.='
';
$str.='';
$str.=jse();
echo r3($str);
}
}
function get_ad(){
$id=rid('id');
$ad='';
$row=rdb("select id,title,exurl,expic from zs_extend where exitem='ad' and cohtm='ad' and id=".$id." and exqas=1 LIMIT 0,1");
if($row){
$ad.=jsb().''.jse();
}else{
$ad.=jsb()."广告未启用".jse();
}echo r3($ad);
}
function jsb(){
return "document.write('";
}
function jse(){
return "');";
}
?>