[wpkg_web] / pack_ext_sub.php Repository:
ViewVC logotype

View of /pack_ext_sub.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 25 - (download) (annotate)
Wed Jan 10 20:17:26 2007 UTC (11 years, 10 months ago) by linuxkidd
File size: 926 byte(s)
Modified to support translations.

<?php
  
include "connect.php";
  include 
"header.php";
  
$fields=array('pack_id','exttype_id','value');
  if(isset(
$_GET['Add'])) {
    
$sql="insert into pack_extras values ( NULL";
    foreach (
$fields as $field) {
      
$sql.=", " quote_smart($_GET[$field]);
    }
    
$sql.=")";
    
mysql_query($sql) or error_report($sql,mysql_error());
  } else if (isset(
$_GET['Update'])) {
    
$sql=sprintf("update pack_extras set value=%s where id=%s"quote_smart($_GET['value']), quote_smart($_GET['extid']));
    
mysql_query($sql) or error_report($sql,mysql_error());
  } else if (isset(
$_GET['del'])) {
    
$sql=sprintf("delete from pack_extras where id=%s"quote_smart($_GET['extid']));
    
mysql_query($sql) or error_report($sql,mysql_error());
  }
  print 
"<META HTTP-EQUIV=Refresh content='0; URL=packages.php";
  if(isset(
$_GET['pack_id'])) {
    print 
"?pack_id=" $_GET['pack_id'] . "&page=extras";
  }
  print 
"'>";

?>

ViewVC Help
Powered by ViewVC 1.0.3