Created
November 23, 2012 16:04
-
-
Save asanchez75/4136256 to your computer and use it in GitHub Desktop.
store constants list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** APC-AA configuration file */ | |
require_once "include/config.php3"; | |
/** Main include file for using session management function on a page */ | |
require_once AA_INC_PATH."locsess.php3"; | |
/** Set of useful functions used on most pages */ | |
require_once AA_INC_PATH."util.php3"; | |
$AA_CP_Session = $_POST['AA_CP_Session']; | |
$group_id = $_POST['group_id']; | |
$name = $_POST['name']; | |
$value = $_POST['value']; | |
$cid = $_POST['cid']; | |
$pri = $_POST['pri']; | |
$db = new DB_AA(); | |
$db->query("DELETE FROM constant WHERE group_id = '" . $group_id . "'"); | |
foreach ($cid as $k => $v) { | |
if ($value[$k] !== '') { | |
$db->query("INSERT INTO constant(id, group_id, name, value, class, pri, ancestors, description, short_id) VALUES('" . $cid[$k] . "', '" . $group_id . "', '" . $name[$k] . "', '" . $value[$k] . "', '', '" . $pri[$k] . "', '', '', '');"); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment