GIF89a;
Direktori : /home/serb/public_html/ |
Current File : /home/serb/public_html/deleteag-escortpics.php |
<? session_start(); include("lib/globals.php"); include("lib/common.php"); include("lib/functions.php"); include"lib/SimpleImage.php"; ?> <? if($_POST) { $post_id=$_POST['picid']; foreach($post_id as $dt) { if($row_pic['id']==$dt) { $sql_delete="DELETE from escort_photo where id='$dt'"; execute_query($sql_delete); $est_picss="SELECT * FROM escort_photo where postid='".$_POST['pid']."'"; $res_picss=execute_query($est_pics); $num_picss=mysql_num_rows($res_picss); $row_pics=mysql_fetch_array($res_picss); $image2= new SimpleImage(); $image2->load('avtar/'.$row_pics['picture']); $image2->resizeToWidth(250); $image2->resizeToHeight(350); $image2->save('thubigg/'.$row_pics['picture']); } else { $sql_delete="DELETE from escort_photo where id='$dt'"; execute_query($sql_delete); } } $date=date('Y-m-d'); $update_dt="Update escort_details SET updatedate='$date' where id='".$_POST['pid']."'"; execute_query($update_dt); ?> <script language="javascript"> /*alert("Your ad has been posted, and will be viewable soon.");*/ location.href="edit-agencyescortimg.php?estid=<?=$_POST['pid']?>"; </script> <? } ?>