public function info_onus_designate() { $session = new session_students(); $id = $session->Get_id_user(); $db = new data_base(tpl_onus_designate::onus_designate(), array(tpl_onus_designate::id(), tpl_onus_designate::id_degree(), tpl_onus_designate::id_models(), tpl_onus_designate::id_student(), tpl_onus_designate::id_onus(), data_base::select_multiple_table(tpl_onus::onus(), tpl_onus::onus() . '.' . tpl_onus::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_onus(), tpl_onus::name(), tpl_onus::onus() . '_' . tpl_onus::name()), data_base::select_multiple_table(tpl_onus::onus(), tpl_onus::onus() . '.' . tpl_onus::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_onus(), tpl_onus::description(), tpl_onus::onus() . '_' . tpl_onus::description()), data_base::select_multiple_table(tpl_degree::degree(), tpl_degree::degree() . '.' . tpl_degree::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_degree(), tpl_degree::name(), tpl_degree::degree() . '_' . tpl_degree::name())), array(tpl_onus_designate::id_student() => $id, tpl_onus_designate::status() => 1)); return $db->get_where(); }
public function update() { $id = $_POST[tpl_degree::degree() . '_' . tpl_degree::id() . '_update']; $name = $_POST[tpl_degree::degree() . '_' . tpl_degree::name() . '_update']; $star_number = $_POST[tpl_degree::degree() . '_' . tpl_degree::star_number() . '_update']; $db = new data_base(tpl_degree::degree(), array(tpl_degree::name() => $name, tpl_degree::star_number() => $star_number, tpl_degree::date_in() => date_time::Date_time_24()), array(tpl_degree::id() => $id)); $results = $db->change(); if ($results) { echo json_encode(array('valid' => 1, 'title' => 'Successfully !!', 'massage' => 'I\'ve been Update ' . $name)); } else { echo json_encode(array('valid' => 0, 'title' => 'Oops !!', 'massage' => 'Was not Update ' . $name . ', please try again')); } }
<th data-field="<?php echo tpl_onus::onus() . '_' . tpl_onus::name(); ?> " data-halign="center" data-sortable="true">onus name </th> <th data-field="<?php echo tpl_students::students() . '_' . tpl_students::first_name(); ?> " data-halign="center" data-sortable="true">students name </th> <th data-field="<?php echo tpl_degree::degree() . '_' . tpl_degree::name(); ?> " data-halign="center" data-sortable="true">degree name </th> <th data-field="<?php echo tpl_companies::companies() . '_' . tpl_companies::name(); ?> " data-halign="center" data-sortable="true">companies name </th> <th data-field="<?php echo tpl_onus_designate::status(); ?>
public function ajax_onus_designate() { $db = new data_base(tpl_onus_designate::onus_designate(), array(data_base::select_multiple_table(tpl_students::students(), tpl_students::students() . '.' . tpl_students::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_student(), tpl_students::first_name(), tpl_students::students() . '_' . tpl_students::first_name()), data_base::select_multiple_table(tpl_degree::degree(), tpl_degree::degree() . '.' . tpl_degree::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_degree(), tpl_degree::name(), tpl_degree::degree() . '_' . tpl_degree::name()), data_base::select_multiple_table(tpl_department::department(), tpl_department::department() . '.' . tpl_department::id(), data_base::select_multiple_table(tpl_models::models(), tpl_models::models() . '.' . tpl_models::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_models(), tpl_models::id_department()), tpl_department::name(), tpl_department::department() . '_' . tpl_department::name()), data_base::select_multiple_table(tpl_companies::companies(), tpl_companies::companies() . '.' . tpl_companies::id(), data_base::select_multiple_table(tpl_models::models(), tpl_models::models() . '.' . tpl_models::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_models(), tpl_models::id_companies()), tpl_companies::name(), tpl_companies::companies() . '_' . tpl_companies::name()), data_base::select_multiple_table(tpl_section::section(), tpl_section::section() . '.' . tpl_section::id(), data_base::select_multiple_table(tpl_models::models(), tpl_models::models() . '.' . tpl_models::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_models(), tpl_models::id_section()), tpl_section::name(), tpl_section::section() . '_' . tpl_section::name()), data_base::select_multiple_table(tpl_supervisor::supervisor(), tpl_supervisor::supervisor() . '.' . tpl_section::id(), data_base::select_multiple_table(tpl_models::models(), tpl_models::models() . '.' . tpl_models::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_models(), tpl_models::id_supervisor()), tpl_supervisor::name(), tpl_supervisor::supervisor() . '_' . tpl_supervisor::name()))); echo json_encode($db->get()); }
</thead> <tbody> <?php foreach ($lib->info_onus_designate($row[tpl_students::id()]) as $rows) { ?> <tr> <td><?php echo $rows[tpl_onus::onus() . '_' . tpl_onus::name()]; ?> </td> <td><?php echo $rows[tpl_onus::onus() . '_' . tpl_onus::description()]; ?> </td> <td><?php echo $rows[tpl_degree::degree() . '_' . tpl_degree::name()]; ?> </td> </tr> <?php } ?> </tbody> </table> </div> <?php } ?> </div> </div>
public function info_onus_designate($id = null) { $db = new data_base(tpl_onus_designate::onus_designate(), array(tpl_onus_designate::id(), tpl_onus_designate::id_degree(), tpl_onus_designate::id_models(), tpl_onus_designate::id_student(), tpl_onus_designate::id_onus(), data_base::select_multiple_table(tpl_onus::onus(), tpl_onus::onus() . '.' . tpl_onus::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_onus(), tpl_onus::name(), tpl_onus::onus() . '_' . tpl_onus::name()), data_base::select_multiple_table(tpl_onus::onus(), tpl_onus::onus() . '.' . tpl_onus::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_onus(), tpl_onus::description(), tpl_onus::onus() . '_' . tpl_onus::description()), data_base::select_multiple_table(tpl_degree::degree(), tpl_degree::degree() . '.' . tpl_degree::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_degree(), tpl_degree::name(), tpl_degree::degree() . '_' . tpl_degree::name())), array(tpl_onus_designate::id_student() => $id)); return $db->get_where(); }
public function find_degree() { $db = new data_base(tpl_degree::degree(), array(tpl_degree::id(), tpl_degree::name()), array(tpl_degree::active() => 1)); $data = $db->get(); $w = ''; foreach ($data as $row) { $w = $w . '<option value="' . $row[tpl_degree::id()] . '">' . $row[tpl_degree::name()] . '</option>'; } return $w; }
?> "/> </div> <div class="form-group"> <label for=""><?php echo tpl_degree::name() . ' ' . tpl_degree::degree(); ?> : </label> <input type="text" class="form-control" id="<?php echo tpl_degree::degree() . '_' . tpl_degree::name() . '_update'; ?> " name="<?php echo tpl_degree::degree() . '_' . tpl_degree::name() . '_update'; ?> "/> </div> <div class="form-group"> <label for=""><?php echo tpl_degree::star_number() . ' ' . tpl_degree::degree(); ?> : </label> <input type="text" class="form-control" id="<?php echo tpl_degree::degree() . '_' . tpl_degree::star_number() . '_update'; ?> " name="<?php