public function get_info()
 {
     $session = new session_students();
     $id_students = $session->Get_id_user();
     $db = new data_base(tpl_students::students(), array(tpl_students::id(), tpl_students::first_name(), tpl_students::last_name(), tpl_students::email(), tpl_students::id_college(), tpl_students::id_specialty(), tpl_students::id_supervisor(), tpl_students::id_university(), data_base::select_multiple_table(tpl_college::college(), tpl_college::college() . '.' . tpl_college::id(), tpl_students::students() . '.' . tpl_students::id_college(), tpl_college::name(), tpl_college::college() . '_' . tpl_college::name()), data_base::select_multiple_table(tpl_supervisor::supervisor(), tpl_supervisor::supervisor() . '.' . tpl_supervisor::id(), tpl_students::students() . '.' . tpl_students::id_supervisor(), tpl_supervisor::name(), tpl_supervisor::supervisor() . '_' . tpl_supervisor::name()), data_base::select_multiple_table(tpl_specialty::specialty(), tpl_specialty::specialty() . '.' . tpl_specialty::id(), tpl_students::students() . '.' . tpl_students::id_specialty(), tpl_specialty::name(), tpl_specialty::specialty() . '_' . tpl_specialty::name()), data_base::select_multiple_table(tpl_university::university(), tpl_university::university() . '.' . tpl_university::id(), tpl_students::students() . '.' . tpl_students::id_university(), tpl_university::name(), tpl_university::university() . '_' . tpl_university::name())), array(tpl_students::id() => $id_students));
     return $db->get_where();
 }
 public function update()
 {
     $id = $_POST[tpl_students::students() . '_' . tpl_students::id() . '_update'];
     $first_name = $_POST[tpl_students::students() . '_' . tpl_students::first_name() . '_update'];
     $last_name = $_POST[tpl_students::students() . '_' . tpl_students::last_name() . '_update'];
     $id_supervisor = $_POST[tpl_students::students() . '_' . tpl_students::id_supervisor() . '_update'];
     $id_university = $_POST[tpl_students::students() . '_' . tpl_students::id_university() . '_update'];
     $id_college = $_POST[tpl_students::students() . '_' . tpl_students::id_college() . '_update'];
     $id_specialty = $_POST[tpl_students::students() . '_' . tpl_students::id_specialty() . '_update'];
     $db = new data_base(tpl_students::students(), array(tpl_students::first_name() => $first_name, tpl_students::last_name() => $last_name, tpl_students::id_supervisor() => $id_supervisor, tpl_students::id_university() => $id_university, tpl_students::id_college() => $id_college, tpl_students::id_specialty() => $id_specialty), array(tpl_students::id() => $id));
     $results = $db->change();
     if ($results) {
         echo json_encode(array('valid' => 1, 'title' => 'Successfully !!', 'massage' => 'I\'ve been Update ' . $first_name));
     } else {
         echo json_encode(array('valid' => 0, 'title' => 'Oops !!', 'massage' => 'Was not Update ' . $first_name . ', please try again'));
     }
 }
echo $new->find_specialty();
?>
                        </select>
                    </div>

                    <div class="form-group">
                        <label>university <?php 
echo tpl_students::students();
?>
 : </label>
                        <select name="<?php 
echo tpl_students::students() . '_' . tpl_students::id_university() . '_update';
?>
"
                                id="<?php 
echo tpl_students::students() . '_' . tpl_students::id_university() . '_update';
?>
"
                                class="form-control">
                            <?php 
$new = new students_lib_ad();
echo $new->find_university();
?>
                        </select>
                    </div>

                    <div class="form-group">
                        <label>supervisor <?php 
echo tpl_students::students();
?>
 : </label>
 public function find_all_ajax()
 {
     $db = new data_base(tpl_models::models(), array(tpl_models::id(), tpl_models::active(), tpl_models::id_student(), tpl_models::id_companies(), tpl_models::id_department(), tpl_models::id_section(), tpl_models::id_supervisor(), data_base::select_multiple_table(tpl_students::students(), tpl_students::students() . '.' . tpl_students::id(), tpl_models::models() . '.' . tpl_models::id_student(), tpl_students::first_name(), tpl_students::students() . '_' . tpl_students::first_name()), data_base::select_multiple_table(tpl_students::students(), tpl_students::students() . '.' . tpl_students::id(), tpl_models::models() . '.' . tpl_models::id_student(), tpl_students::last_name(), tpl_students::students() . '_' . tpl_students::last_name()), data_base::select_multiple_table(tpl_university::university(), tpl_university::university() . "." . tpl_university::id(), data_base::select_multiple_table(tpl_students::students(), tpl_students::students() . '.' . tpl_students::id(), tpl_models::models() . '.' . tpl_models::id_student(), tpl_students::id_university()), tpl_university::name(), tpl_university::university() . '_' . tpl_university::name()), data_base::select_multiple_table(tpl_college::college(), tpl_college::college() . "." . tpl_college::id(), data_base::select_multiple_table(tpl_students::students(), tpl_students::students() . '.' . tpl_students::id(), tpl_models::models() . '.' . tpl_models::id_student(), tpl_students::id_college()), tpl_college::name(), tpl_college::college() . '_' . tpl_college::name()), data_base::select_multiple_table(tpl_specialty::specialty(), tpl_specialty::specialty() . "." . tpl_specialty::id(), data_base::select_multiple_table(tpl_students::students(), tpl_students::students() . '.' . tpl_students::id(), tpl_models::models() . '.' . tpl_models::id_student(), tpl_students::id_specialty()), tpl_specialty::name(), tpl_specialty::specialty() . '_' . tpl_specialty::name()), data_base::select_multiple_table(tpl_companies::companies(), tpl_companies::companies() . '.' . tpl_companies::id(), tpl_models::models() . '.' . tpl_models::id_companies(), tpl_companies::name(), tpl_companies::companies() . '_' . tpl_companies::name()), data_base::select_multiple_table(tpl_department::department(), tpl_department::department() . '.' . tpl_department::id(), tpl_models::models() . '.' . tpl_models::id_department(), tpl_department::name(), tpl_department::department() . '_' . tpl_department::name()), data_base::select_multiple_table(tpl_section::section(), tpl_section::section() . '.' . tpl_section::id(), tpl_models::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_supervisor::id(), tpl_models::models() . '.' . tpl_models::id_supervisor(), tpl_supervisor::name(), tpl_supervisor::supervisor() . '_' . tpl_supervisor::name())));
     echo json_encode($db->get());
 }
 public function ajax_find_students()
 {
     $db = new data_base(tpl_students::students(), array(tpl_students::id(), tpl_students::first_name(), tpl_students::last_name(), tpl_students::id_college(), tpl_students::id_specialty(), data_base::select_multiple_table(tpl_specialty::specialty(), tpl_specialty::specialty() . '.' . tpl_specialty::id(), tpl_students::students() . '.' . tpl_students::id_specialty(), tpl_specialty::name(), tpl_specialty::specialty() . '_' . tpl_specialty::name()), data_base::select_multiple_table(tpl_college::college(), tpl_college::college() . '.' . tpl_college::id(), tpl_students::students() . '.' . tpl_students::id_college(), tpl_college::name(), tpl_college::college() . '_' . tpl_college::name())), array(tpl_students::id_university() => $_GET['id']));
     echo json_encode($db->get_where());
 }