From 8a8cccee7bc2ff11600bf83b684e627feefeb3d6 Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Tue, 30 Jan 2018 10:42:46 -0500 Subject: Remove unused function from the list lib --- php/lib/list.php | 51 +-------------------------------------------------- 1 file changed, 1 insertion(+), 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 @@ * * $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. - * - * Example: - * - * list_edit_ids('course_id','../forms/course.php','SELECT * FROM fic_courses','1'); - * - * @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".'
'; - $record=form_array_fix_dates($dates,$datetimes,2,$record); - foreach ($record as $key=>$val) - { - $posts[$key]=clean_out($val); - } - include($form); - echo "\n".'
'; - form_submit('submit', '', 'button1'); - echo "\n".'
'; - echo "\n".'
'; - } - form_end(); - } - else - { - echo '

You must select a record. Go back.

'; - } -} -- cgit v1.2.3-65-gdbad