$smarty->assign("content",str_replace(array("\r","\n","\e"),"",eraseStrange($_POST['content']))); $status = preg_replace("@[^0-9]@i","",$_POST['status']); if($status==1){ $smarty->assign("checked","checked"); }else{ $smarty->assign("checked",""); } $smarty->assign('pesan',$links->pesan); } $template = "links_add_edit.tpl"; break; case "edit": $id = @preg_replace("@[^0-9]@i","",$_GET['id']); if($links->edit_news($id)){ if($_FILES['gambar']['size']>0){ if(!$links->uploadFile(100000,$id)){ $meta = $links->pesan; $smarty->assign('kembali',true); $smarty->assign('id',$id); }else{ $sql = "update tbl_links set gambar='$links->thumbName' where id=$id"; #echo $sql; $links->exQ($sql); } } $smarty->assign('pesan',"Products edited !<br>".$meta); $smarty->assign('dShowMe',true); }else{ $sql = "select content,gambar,link,status from tbl_links where id=$id"; #echo $sql; if($r = $links->exQ($sql)){