diff options
author | 2018-01-30 10:33:33 -0500 | |
---|---|---|
committer | 2018-01-30 10:33:33 -0500 | |
commit | 027ec56ccf00551af10c7c1f3918c6340fdbb956 (patch) | |
tree | 14ab84a79ce7bde91565149ae4aa174a57caff27 | |
parent | Revert "Remove the unused php/lib/list.php" (diff) | |
download | bouncer-027ec56ccf00551af10c7c1f3918c6340fdbb956.tar.gz bouncer-027ec56ccf00551af10c7c1f3918c6340fdbb956.tar.bz2 bouncer-027ec56ccf00551af10c7c1f3918c6340fdbb956.zip |
Restore lists
-rw-r--r-- | php/cfg/init.php | 1 | ||||
-rw-r--r-- | php/lib/list.php | 26 |
2 files changed, 1 insertions, 26 deletions
diff --git a/php/cfg/init.php b/php/cfg/init.php index 3e8f6fb..80f545f 100644 --- a/php/cfg/init.php +++ b/php/cfg/init.php @@ -10,6 +10,7 @@ require_once(LIB.'/csv.php'); // util file for random functions (no SQL here) $start = microtime_float(); // start timer require_once(LIB.'/mirror.php'); // user and admin functions for the mirror app (some SQL) require_once(LIB.'/db.php'); // core mysql wrappers used in mirror functions +require_once(LIB.'/list.php'); DB::connect(DBHOST,DBUSER,DBPASS,DBNAME); // open persistent connection to db if (!empty($protect)) { require_once('admin_init.php'); diff --git a/php/lib/list.php b/php/lib/list.php index 5deb5e9..c7e872b 100644 --- a/php/lib/list.php +++ b/php/lib/list.php @@ -363,29 +363,3 @@ function list_edit_ids($name,$form,$q_front,$q_where='1',$dates=null,$datetimes= echo '<p>You must select a record. <a href="javascript:history.back();">Go back</a>.</p>'; } } - -/** - * Process a submitted list_edit_ids form. - * @param array $name array of primary ids posted from the form, these are vital to the WHERE clause of the UPDATE statements. - * @param string $table name of table being affected - */ -function list_update_ids($name,$table) -{ - $keys=array_keys($_POST[$name]); - foreach ($keys as $index) - { - foreach ($_POST as $key=>$val) - { - if ($key!='submit') - { - $posts[$index][$key]=$val[$index]; - } - } - } - foreach ($posts as $dataset) - { - $query=db_makeupdate($dataset,$table," WHERE $name='".$dataset[$name]."' "); - db_query($query); - } -} -?> |