public function info_companies() { $session = new session_students(); $id = $session->Get_id_user(); $db = new data_base(tpl_models::models(), array(tpl_models::id(), tpl_models::id_student(), tpl_models::active(), tpl_models::id_companies(), tpl_models::id_department(), tpl_models::id_section(), 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())), array(tpl_models::id_student() => $id)); return $db->get_where(); }
public function index() { $lib_students = new session_students(); $lib_supervisor = new session_supervisor(); if ($lib_students->get_login_students()) { redirect('students/home_stu'); } else { if ($lib_supervisor->get_login_supervisors()) { redirect('supervisor/home_sup'); } else { $template = new render_site(); $template->page_index(); } } }
public function logout() { $lib_students = new session_students(); $lib_students->remove_login_students(); redirect('site'); }