public function info_students() { $session = new session_supervisor(); $id = $session->Get_id_user(); $db = new data_base(tpl_students::students(), array(tpl_students::id(), tpl_students::first_name(), tpl_students::last_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()), data_base::select_multiple_table(tpl_university::university(), tpl_university::university() . '.' . tpl_university::id(), tpl_students::students() . '.' . tpl_students::id_college(), tpl_university::name(), tpl_university::university() . '_' . tpl_university::name()), data_base::select_multiple_table(tpl_specialty::specialty(), tpl_specialty::specialty() . '.' . tpl_specialty::id(), tpl_students::students() . '.' . tpl_students::id_college(), tpl_specialty::name(), tpl_specialty::specialty() . '_' . tpl_specialty::name())), array(tpl_students::id_supervisor() => $id, tpl_students::status() => 1)); return $db->get_where(); }
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_specialty(), tpl_students::id_college(), 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_specialty::name())), array(tpl_students::id_specialty() => $_GET['id'])); echo json_encode($db->get_where()); }
</th> <th data-field="<?php echo tpl_students::last_name(); ?> " data-halign="center" data-sortable="true"> last_name </th> <th data-field="<?php echo tpl_college::college() . '_' . tpl_college::name(); ?> " data-halign="center" data-sortable="true"> college </th> <th data-field="<?php echo tpl_specialty::specialty() . '_' . tpl_specialty::name(); ?> " data-halign="center" data-sortable="true"> specialty </th> </tr> </thead> </table> </div> </div> </div> </div> <script type="text/javascript">
public function count_specialty() { $db = new data_base(tpl_specialty::specialty(), array(tpl_specialty::id()), array(tpl_specialty::active() => 1)); return count($db->get_where()); }
echo tpl_specialty::specialty() . '_' . tpl_specialty::name() . '_update'; ?> "/> </div> <div class="form-group"> <label>College <?php echo tpl_specialty::specialty(); ?> : </label> <select name="<?php echo tpl_specialty::specialty() . '_' . tpl_specialty::id_college() . '_update'; ?> " id="<?php echo tpl_specialty::specialty() . '_' . tpl_specialty::id_college() . '_update'; ?> " class="form-control"> <?php $new = new specialty_lib_ad(); echo $new->find_college(); ?> </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>
public function ajax_find_students() { $db = new data_base(tpl_models::models(), array(tpl_models::id(), tpl_models::id_companies(), 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_supervisor::supervisor(), tpl_supervisor::supervisor() . '.' . tpl_supervisor::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_supervisor()), tpl_supervisor::name(), tpl_supervisor::supervisor() . '_' . tpl_supervisor::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_supervisor()), 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_supervisor()), 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_supervisor()), tpl_specialty::name(), tpl_specialty::specialty() . '_' . tpl_specialty::name()), data_base::select_multiple_table(tpl_department::department(), tpl_department::department() . '.' . tpl_department::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_supervisor()), tpl_department::name(), tpl_department::department() . '_' . tpl_department::name()), data_base::select_multiple_table(tpl_section::section(), tpl_section::section() . '.' . tpl_section::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_supervisor()), tpl_section::name(), tpl_section::section() . '_' . tpl_section::name())), array(tpl_models::id_companies() => $_GET['id'])); echo json_encode($db->get_where()); }
echo $data[tpl_college::college() . '_' . tpl_college::name()]; ?> </h4> </div> </div> <?php foreach ($lib->info_students() as $row) { ?> <div class="row"> <hr> <h4>Name : <?php echo $row[tpl_students::first_name()] . ' ' . $row[tpl_students::last_name()]; ?> </h4> <h4>Specialty : <?php echo $row[tpl_specialty::specialty() . '_' . tpl_specialty::name()]; ?> </h4> <h4>University : <?php echo $row[tpl_university::university() . '_' . tpl_university::name()]; ?> </h4> <h4>College : <?php echo $row[tpl_college::college() . '_' . tpl_college::name()]; ?> </h4> <table class="table table-bordered"> <thead> <tr>
public function get_all_specialty() { if (isset($_POST['id_college'])) { $id = $_POST['id_college']; if (!empty($id)) { $db = new data_base(tpl_specialty::specialty(), array(tpl_specialty::id(), tpl_specialty::name()), array(tpl_specialty::id_college() => $id, tpl_specialty::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')); } }
<script type="text/javascript"> function operate<?php echo tpl_college::college(); ?> (value, row) { return '<a href="<?php echo site_url('admin/college/view_student/?id='); ?> '+row.<?php echo tpl_specialty::id(); ?> +'">'+value+'</a>' } function operate<?php echo tpl_specialty::specialty(); ?> (value, row) { return '<a href="<?php echo site_url('admin/specialty/view_student/?id='); ?> '+row.<?php echo tpl_specialty::id(); ?> +'">'+value+'</a>' } </script>
$data = array_shift($lib->get_info()); $data_co = array_shift($lib->info_companies()); ?> <div class="col-sm-12 main"> <div class="col-sm-6"> <h4>Name : <?php echo $data[tpl_students::first_name()] . ' ' . $data[tpl_students::last_name()]; ?> </h4> <h4>Supervisor : <?php echo $data[tpl_supervisor::supervisor() . '_' . tpl_supervisor::name()]; ?> </h4> <h4>Specialty : <?php echo $data[tpl_specialty::specialty() . '_' . tpl_specialty::name()]; ?> </h4> <h4>University : <?php echo $data[tpl_university::university() . '_' . tpl_university::name()]; ?> </h4> <h4>College : <?php echo $data[tpl_college::college() . '_' . tpl_college::name()]; ?> </h4> </div> <div class="col-sm-6">
public function find_specialty() { $db = new data_base(tpl_specialty::specialty(), array(tpl_specialty::id(), tpl_specialty::name()), array(tpl_specialty::active() => 1)); $data = $db->get_where(); $w = ''; foreach ($data as $row) { $w = $w . '<option value="' . $row[tpl_specialty::id()] . '">' . $row[tpl_specialty::name()] . '</option>'; } return $w; }