示例#1
0
 public function update()
 {
     // id value has already been sent into <form action string>
     // just call simple_table_ops class, which will process $_POST['variables']
     $update = new simple_table_ops();
     $columns = array('nom', 'date_from', 'date_to');
     $update->set_id_column('timetable_period_id');
     $update->set_table_name('timetable_periods');
     $update->set_table_column_names($columns);
     $update->update();
     header("Location: http://" . WEBSITE_URL . "/index.php?controller={$_GET['controller']}&action=index");
 }
示例#2
0
 public function update()
 {
     // id value has already been sent into <form action string>
     // just call simple_table_ops class, which will process $_POST['variables']
     $update = new simple_table_ops();
     $columns = array('level_id');
     $update->set_id_column('course_id');
     $update->set_table_name('courses');
     $update->set_table_column_names($columns);
     return $update->update();
 }
示例#3
0
 public function update()
 {
     // id value has already been sent into <form action string>
     // just call simple_table_ops class, which will process $_POST['variables']
     $update = new simple_table_ops();
     $columns = array('course_id', 'teacher_id', 'subject_id');
     $update->set_id_column('curriculum_id');
     $update->set_table_name('curricula');
     $update->set_table_column_names($columns);
     $update->update();
     header("Location: http://" . WEBSITE_URL . "/index.php?controller={$_GET['controller']}&action=index");
 }
示例#4
0
 public function update()
 {
     if (!isset($_GET['id'])) {
         // id = timetable_period_id, NOT timetable_id !
         $content = "<p>Error in timetable controller, update action - id index is not set!";
         $output['content'] = $content;
         return $output;
     }
     $update = new simple_table_ops();
     $columns = array('curriculum_id', 'start_time_id', 'end_time_id', 'weekday_id', 'classroom_id', 'timetable_period_id');
     $update->set_id_column('timetable_id');
     $update->set_table_name('timetables');
     $update->set_table_column_names($columns);
     $update->update();
     header("Location: http://" . WEBSITE_URL . "/index.php?controller=timetable&action=show&submit=yes&timetable_period_id={$_POST['timetable_period_id']}");
 }
示例#5
0
 public function update()
 {
     $update = new simple_table_ops();
     $columns = array('course_id');
     $update->set_id_column('classe_id');
     $update->set_table_name('classes');
     $update->set_table_column_names($columns);
     $update->update();
     header("Location: http://" . WEBSITE_URL . "/index.php?controller={$_GET['controller']}&action=index");
 }