@require_once ("etc/web.cfg.php"); @require_once ("db/open_DB.inc.php"); $db = new open_DB; $sh = new open_DB; foreach($_GET as $key=>$value) $$key = addslashes(ltrim(chop($value))); $code = "nyc_news"; if(!$cat) $cat = 'news'; $q = "SELECT * FROM $code "; $q = $q." WHERE id=$id "; $db -> query($q); $db -> next_record(); $my_title = stripslashes($db -> f("title")); $my_stitle = stripslashes($db -> f("stitle")); $my_summary = stripslashes($db -> f("summary")); $my_content = stripslashes($db -> f("contents")); $my_signdate = date("m-d-Y H:i",$db -> f("signdate")); $my_name = $db -> f("name"); $my_email = $db -> f("email"); $my_img1 = $db -> f("img1"); $my_img2 = $db -> f("img2"); $my_img3 = $db -> f("img3"); $my_dimg1 = stripslashes($db -> f("dimg1")); $my_dimg2 = stripslashes($db -> f("dimg2")); $my_dimg3 = stripslashes($db -> f("dimg3")); $my_click = $db -> f("click"); $my_formname = stripslashes($db -> f("formname")); $size1 = getimagesize("./files/".$code."/".$my_img1); $width1 = ($size1[0]>600)?600:$size1[0]; $size2 = getimagesize("./files/".$code."/".$my_img2); $width2 = ($size2[0]>600)?600:$size2[0]; $size3 = getimagesize("./files/".$code."/".$my_img3); $width3 = ($size3[0]>600)?600:$size3[0]; $click = $my_click +1; $q1 = "UPDATE $code SET click = $click"; $q1 = $q1." WHERE id = $id"; $sh -> query($q1); $sh -> next_record(); mysql_close(); ?>