有错误。后台会出现://------------------内容页单选/复选框以图片ICON形式列出所有项目的标签 function btnimg($type,$property){ global $empire,$dbtbpre,$navinfor,$public_r; $classid=$navinfor['classid']; $provalue=$navinfor[$property]; $sql="SELECT f.fvalue fvalue FROM {$dbtbpre}enewsclass c,{$dbtbpre}enewsmod m,{$dbtbpre}enewsf f WHERE c.modid=m.mid
AND m.tid=f.tid AND c.classid={$classid} AND f.f='{$property}'"; $r=$empire->fetch1($sql); $allstr=$r['fvalue']; $cbar=explode("|",$allstr); $str=""; if($type==0){ $radioon="<img src=\"{$public_r['siteurl']}e/data/images/radioon.gif\"/>";//单选选中图标 $radiooff="<img src=\"{$public_r['siteurl']}e/data/images/radiooff.gif\"/>";//单选没选中图标 foreach($cbar as $value){ if($provalue==$value){ $str=$str.$radioon.$value." "; }else{ $str=$str.$radiooff.$value." "; } } }elseif($type==1){ $cbon="<img src=\"{$public_r['siteurl']}e/data/images/cbon.gif\"/>";//复选选中图标 $cboff="<img src=\"{$public_r['siteurl']}e/data/images/cboff.gif\"/>";//复选没选中图标 foreach($cbar as $value){ if(strstr($provalue,"|".$value."|")){ $str=$str.$cbon.$value." "; }else{ $str=$str.$cboff.$value." "; } } } echo $str; }
|