GIF89a;
Direktori : /home/serb/www/ |
Current File : /home/serb/www/deletepics_process.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) { $est_pics="SELECT * FROM escort_photo where userid='".$_SESSION['userid']."'"; $res_pics=execute_query($est_pics); $num_pics=mysql_num_rows($res_pics); $row_pic=mysql_fetch_array($res_pics); 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 userid='".$_SESSION['userid']."'"; $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); } } ?> <script language="javascript"> /*alert("Your ad has been posted, and will be viewable soon.");*/ location.href="escortimages.php"; </script> <? } ?>