[wpkg_web] / pack_del.php Repository:
ViewVC logotype

View of /pack_del.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 38 - (download) (annotate)
Fri Jan 19 13:06:31 2007 UTC (11 years, 9 months ago) by linuxkidd
File size: 1024 byte(s)
BugFix: Removed priority references.

<?php
  
include "connect.php";
  include 
"header.php";

  if(isset(
$_GET['pack_id'])) {
    foreach(array(
'pack_checks','pack_cmds','pack_downloads','pack_extras','prof_packs')
            as 
$table) {
      if(
$table=='pack_cmds') {
        
$sql=sprintf("select id from pack_cmds where pack_id=%s",quote_smart($_GET['pack_id']));
        
$sql_handle=mysql_query($sql) or error_report($sql,mysql_error());
        while(list(
$cmd_id)=mysql_fetch_array($sql_handle)) {
          
$sql2=sprintf("delete from pack_cmdexits where cmd_id=%s",quote_smart($cmd_id));
          
mysql_query($sql) or error_report($sql,mysql_error());
        }
      }
      
$sql=sprintf("delete from %s where pack_id=%s"$tablequote_smart($_GET['pack_id']));
      
mysql_query($sql) or error_report($sql,mysql_error());
    }
    
$sql=sprintf("delete from packages where id=%s",quote_smart($_GET['pack_id']));
    
mysql_query($sql) or error_report($sql,mysql_error());
  }
  print 
"<META HTTP-EQUIV=Refresh content='0; URL=packages_list.php'>";
?>

ViewVC Help
Powered by ViewVC 1.0.3