query("SELECT `aid`,`tid`,`filename`,`description` FROM `$table_attachments_2` where `aid`='$aid' AND `filetype` LIKE 'image%' LIMIT 1"); if($myrow=$db->fetch_array($query)) { $db->query("UPDATE `$table_attachments_2` SET `downloads`=downloads+1 WHERE `aid`='$aid'"); $query2 = $db->query("SELECT `tid`, `subject` FROM `$table_articles` WHERE `tid`='$myrow[tid]' LIMIT 1"); $myrow2=$db->fetch_array($query2); $title = stripslashes($myrow2['subject']); $description = stripslashes($myrow['description']); eval("\$out .= \"".template("header")."\";"); $center = "
$title
$description


\"$title\"
"; }else{ eval("\$out .= \"".template("header")."\";"); eval("\$menuleft .= \"".template("menuleft_index")."\";"); $mes = "Ошибка! По данному адресу фотография не найдена!"; eval("\$center .= \"".template("error")."\";"); } $mtime2 = explode(" ", microtime()); $endtime = $mtime2[1] + $mtime2[0]; $totaltime = ($endtime - $starttime); $totaltime = number_format($totaltime, 7); eval("\$out .= \"".template("footer")."\";"); finish(); ?>