public function get_info()
 {
     $session = new session_supervisor();
     $id = $session->Get_id_user();
     $db = new data_base(tpl_supervisor::supervisor(), array(tpl_supervisor::name(), tpl_supervisor::id_college(), tpl_supervisor::id_university(), data_base::select_multiple_table(tpl_college::college(), tpl_college::college() . '.' . tpl_college::id(), tpl_supervisor::supervisor() . '.' . tpl_supervisor::id_college(), tpl_college::name(), tpl_college::college() . '_' . tpl_college::name()), data_base::select_multiple_table(tpl_university::university(), tpl_university::university() . '.' . tpl_university::id(), tpl_supervisor::supervisor() . '.' . tpl_supervisor::id_university(), tpl_university::name(), tpl_university::university() . '_' . tpl_university::name())), array(tpl_supervisor::id() => $id));
     return $db->get_where();
 }
 public function ajax_students()
 {
     $db = new data_base(tpl_supervisor::supervisor(), array(tpl_supervisor::id(), tpl_supervisor::name(), tpl_supervisor::id_university(), tpl_supervisor::id_college(), data_base::select_multiple_table(tpl_students::students(), tpl_students::students() . '.' . tpl_students::id_supervisor(), tpl_supervisor::supervisor() . '.' . tpl_supervisor::id(), 'COUNT(' . tpl_students::id() . ')', tpl_students::students() . '_' . tpl_students::id()), data_base::select_multiple_table(tpl_college::college(), tpl_college::college() . '.' . tpl_college::id(), tpl_supervisor::supervisor() . '.' . tpl_supervisor::id_college(), tpl_college::name(), tpl_college::college() . '_' . tpl_college::name()), data_base::select_multiple_table(tpl_university::university(), tpl_university::university() . '.' . tpl_university::id(), tpl_supervisor::supervisor() . '.' . tpl_supervisor::id_university(), tpl_university::name(), tpl_university::university() . '_' . tpl_university::name())));
     echo json_encode($db->get());
 }
 public function get_all_supervisor()
 {
     if (isset($_POST['id_university']) && isset($_POST['id_college'])) {
         $id_university = $_POST['id_university'];
         $id_college = $_POST['id_university'];
         if (!empty($id_university) && !empty($id_college)) {
             $db = new data_base(tpl_supervisor::supervisor(), array(tpl_supervisor::id(), tpl_supervisor::name()), array(tpl_supervisor::id_university() => $id_university, tpl_supervisor::id_college() => $id_college, tpl_supervisor::active() => 1));
             $data = $db->get_where();
             $w = '   <option></option>';
             foreach ($data as $row) {
                 $w = $w . '<option value="' . $row[tpl_specialty::id()] . '">' . $row[tpl_specialty::name()] . '</option>';
             }
             echo $w;
         } else {
             echo json_encode(array('valid' => false, 'title' => 'Oops !!', 'massage' => 'error empty'));
         }
     } else {
         echo json_encode(array('valid' => false, 'title' => 'Oops !!', 'massage' => 'error isset'));
     }
 }
'+row.<?php 
echo tpl_supervisor::id_college();
?>
+'">'+value+'</a>'
    }

    function operate<?php 
echo tpl_university::university();
?>
(value, row) {

        return '<a href="<?php 
echo site_url('admin/university/view_student/?id=');
?>
'+row.<?php 
echo tpl_supervisor::id_university();
?>
+'">'+value+'</a>'
    }

    function operate<?php 
echo tpl_supervisor::supervisor();
?>
(value, row) {

        return '<a href="<?php 
echo site_url('admin/supervisor/view_student/?id=');
?>
'+row.<?php 
echo tpl_supervisor::id();
?>
echo tpl_supervisor::supervisor() . '_' . tpl_supervisor::username() . '_update';
?>
"/>
                    </div>

                    <div class="form-group">
                        <label>College <?php 
echo tpl_supervisor::supervisor();
?>
 : </label>
                        <select name="<?php 
echo tpl_supervisor::supervisor() . '_' . tpl_supervisor::id_university() . '_update';
?>
"
                                id="<?php 
echo tpl_supervisor::supervisor() . '_' . tpl_supervisor::id_university() . '_update';
?>
"
                                class="form-control">
                            <?php 
$new = new supervisor_lib_ad();
echo $new->find_university();
?>
                        </select>
                    </div>

                    <button type="submit" class="btn btn-success" id="update" name="update">Save</button>
                </form>
                </br>
                </br>
                <div class="" id="result_massages_update"></div>