aboutsummaryrefslogtreecommitdiff
path: root/php
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2018-01-30 10:42:46 -0500
committerBrian Evans <grknight@gentoo.org>2018-01-30 10:42:46 -0500
commit8a8cccee7bc2ff11600bf83b684e627feefeb3d6 (patch)
treef75767c68566ceae5b4afd3569b5e7a04bb08126 /php
parentRemove old index backup (diff)
downloadbouncer-8a8cccee7bc2ff11600bf83b684e627feefeb3d6.tar.gz
bouncer-8a8cccee7bc2ff11600bf83b684e627feefeb3d6.tar.bz2
bouncer-8a8cccee7bc2ff11600bf83b684e627feefeb3d6.zip
Remove unused function from the list lib
Diffstat (limited to 'php')
-rw-r--r--php/lib/list.php51
1 files changed, 1 insertions, 50 deletions
diff --git a/php/lib/list.php b/php/lib/list.php
index c7e872b..9f480bc 100644
--- a/php/lib/list.php
+++ b/php/lib/list.php
@@ -9,7 +9,7 @@
* <code>
* $orderby=get_order();
* $query="SELECT * FROM fic_courses $orderby";
- * $courses=db_get($query,MYSQL_ASSOC);
+ * $courses=DB::get($query,PDO::FETCH_ASSOC);
* $headers=array(
* 'course_id'=>'',
* 'title'=>'Course Title',
@@ -314,52 +314,3 @@ function get_orderby($method='get')
}
else return null;
}
-
-/**
- * Parses $_POST for ids, shows edit forms for each id with populated data.
- * <ul>
- * <li>name will be used to retrieve an _array_ from $_POST of the same name</li>
- * <li>the form will be an include, with $posts[col_name] as the default for all values</li>
- * <li>try to keep your query simple (no crazy sorting, etc.) -- we're talking one record at a time here anyway</li>
- * </ul>
- * Example:
- * <code>
- * list_edit_ids('course_id','../forms/course.php','SELECT * FROM fic_courses','1');
- * </code>
- * @param string $name name of id field
- * @param string $form path to form to be used to items
- * @param string $q_front front half of query
- * @param string $q_where where statement
- * @param array $dates array of date field names, so they can be fixed for forms
- * @param array $datetimes array of datetime field names, so they can be fixed for forms
- */
-function list_edit_ids($name,$form,$q_front,$q_where='1',$dates=null,$datetimes=null)
-{
- if ( !empty($_SESSION[$name]) && is_array($_SESSION[$name]) )
- {
- $ids=implode(',',$_SESSION[$name]);
- $orderby=get_orderby('session');
- $query=$q_front.' WHERE '.$q_where." AND $name IN($ids) ".$orderby;
- $records=db_get($query);
- form_start($name);
- foreach ($records as $record)
- {
- echo "\n".'<div class="record">';
- $record=form_array_fix_dates($dates,$datetimes,2,$record);
- foreach ($record as $key=>$val)
- {
- $posts[$key]=clean_out($val);
- }
- include($form);
- echo "\n".'<div class="record-submit">';
- form_submit('submit', '', 'button1');
- echo "\n".'</div>';
- echo "\n".'</div>';
- }
- form_end();
- }
- else
- {
- echo '<p>You must select a record. <a href="javascript:history.back();">Go back</a>.</p>';
- }
-}