setQuery("select i.id,i.views,i.name,i.size,i.width,i.height,s.domain,u.gid,i.server_id from images as i left join users as u on u.id=i.uid left join server as s on s.server_id=i.server_id where i.id='$id'"); $db->query(); if($db->getNumRows()==0) { header('location:'.$baseWeb); exit; } $row=$db->loadRow(); /** * generate authcode for specified(non-images) files */ $type=substr(strtolower(strrchr($row[name],'.')),1); if(in_array($type,$user->ant_hotlink_filetype)) { $_SESSION['authid']=substr(md5($input[IP_CLIENT]),0,16).encryptStr(substr(time(),4)); setCookies('authid',$_SESSION['authid']); $hotlink_code="?id='+getcookie('yab_authid')+'"; } require_once("header.php"); $templatefile=array( 'show.package'.$row[gid].'.server'.$row[server_id].'.html', 'show.'.$row[gid].'.html', 'show.html', ); foreach($templatefile as $file) { if(file_exists('skin/'.$user->setting['skin_dir'].'/'.$file)) $showtemplate=$file; } $template->set_filenames(array( 'body' => $showtemplate) ); $template->assign_vars($row); $template->assign_vars(array( 'filesize'=>convertsize($row[size]), 'imagecode'=>buildShowLinksCode($row), 'showstatus'=>((in_array($type,$VideoFile)||$type=='.swf')?'visible':'hidden'), 'showurl'=>$showurl, 'imageurl'=>$imageurl.$hotlink_code, )); $template->pparse('body'); include "footer.php"; ?>