Ejemplo n.º 1
0
 public function find_all_college_select()
 {
     $this->use->use_model('data_base');
     $this->use->use_lib('table/tpl_college');
     $tpl_college = new tpl_college();
     $db = new data_base($tpl_college->table(), array($tpl_college->id(), $tpl_college->name()));
     return $db->get();
 }
Ejemplo n.º 2
0
 public function find_all_users()
 {
     $this->use->use_model('data_base');
     $this->use->use_lib('table/tpl_users');
     $tpl = new tpl_users();
     $db = new data_base($tpl->table(), array($tpl->id(), $tpl->username()));
     echo json_encode($db->get());
 }
Ejemplo n.º 3
0
 public function find_all_specialty()
 {
     $this->use->use_model('data_base');
     $this->use->use_lib('table/tpl_specialty');
     $this->use->use_lib('table/tpl_college');
     $tpl_specialty = new tpl_specialty();
     $tpl_college = new tpl_college();
     $db = new data_base($tpl_specialty->table(), array($tpl_specialty->id(), '(select ' . $tpl_college->name() . ' from ' . $tpl_college->table() . ' where ' . $tpl_college->table() . '.' . $tpl_college->id() . ' = ' . $tpl_specialty->table() . '.' . $tpl_specialty->id_college() . ') ' . $tpl_specialty->id_college() . '_name', $tpl_specialty->id_college(), $tpl_specialty->name()));
     echo json_encode($db->get());
 }
 public function ajax_students()
 {
     $db = new data_base(tpl_specialty::specialty(), array(tpl_specialty::id(), tpl_specialty::active(), tpl_specialty::name(), data_base::select_multiple_table(tpl_college::college(), tpl_college::college() . '.' . tpl_college::id(), tpl_specialty::specialty() . '.' . tpl_specialty::id_college(), tpl_college::name(), tpl_college::college() . '_' . tpl_college::name()), data_base::select_multiple_table(tpl_students::students(), tpl_students::students() . '.' . tpl_students::id_specialty(), tpl_specialty::specialty() . '.' . tpl_specialty::id(), 'COUNT(' . tpl_students::id() . ')', tpl_students::students() . '_' . tpl_students::id())));
     echo json_encode($db->get());
 }
 public function find_all_ajax()
 {
     $db = new data_base(tpl_department::department(), array(tpl_department::id(), tpl_department::active(), tpl_department::name(), tpl_department::id_companies(), data_base::select_multiple_table(tpl_companies::companies(), tpl_companies::companies() . '.' . tpl_companies::id(), tpl_department::department() . '.' . tpl_department::id_companies(), tpl_companies::name(), tpl_companies::companies() . '_' . tpl_companies::name())));
     echo json_encode($db->get());
 }
 public function count_students()
 {
     $db = new data_base(tpl_students::students(), array(tpl_students::id()));
     return count($db->get());
 }
 public function ajax_models()
 {
     $db = new data_base(tpl_companies::companies(), array(tpl_companies::id(), tpl_companies::name(), data_base::select_multiple_table(tpl_models::models(), tpl_models::models() . '.' . tpl_models::id_companies(), tpl_companies::companies() . '.' . tpl_companies::id(), 'COUNT(' . tpl_models::id() . ')', tpl_models::models() . '_' . tpl_models::id())));
     echo json_encode($db->get());
 }
Ejemplo n.º 8
0
 public function count_all()
 {
     $this->use->use_model('data_base');
     $this->use->use_lib('table/tpl_election');
     $tpl = new tpl_election();
     $db = new data_base($tpl->table(), array($tpl->id()));
     return count($db->get());
 }
 public function find_companies()
 {
     $db = new data_base(tpl_companies::companies(), array(tpl_companies::id(), tpl_companies::name()), array(tpl_companies::active() => 1));
     $data = $db->get();
     $w = '<option></option>';
     foreach ($data as $row) {
         $w = $w . '<option value="' . $row[tpl_companies::id()] . '">' . $row[tpl_companies::name()] . '</option>';
     }
     return $w;
 }
 public function find_all_ajax()
 {
     $db = new data_base(tpl_category::category(), array(tpl_category::id(), tpl_category::active(), tpl_category::name()));
     echo json_encode($db->get());
 }
 public function ajax_students()
 {
     $db = new data_base(tpl_university::university(), array(tpl_university::id(), tpl_university::active(), tpl_university::address(), tpl_university::date_in(), tpl_university::name(), tpl_university::phone(), data_base::select_multiple_table(tpl_students::students(), tpl_students::students() . '.' . tpl_students::id_university(), tpl_university::university() . '.' . tpl_university::id(), 'COUNT(' . tpl_students::id() . ')', tpl_students::students() . '_' . tpl_students::id())));
     echo json_encode($db->get());
 }
 public function find_all_ajax()
 {
     $db = new data_base(tpl_onus::onus(), array(tpl_onus::id(), tpl_onus::active(), tpl_onus::name(), tpl_onus::description()));
     echo json_encode($db->get());
 }
 public function find_all_ajax()
 {
     $db = new data_base(tpl_degree::degree(), array(tpl_degree::id(), tpl_degree::active(), tpl_degree::name(), tpl_degree::star_number()));
     echo json_encode($db->get());
 }
 public function find_all_ajax()
 {
     $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_supervisor(), tpl_students::id_specialty(), tpl_students::id_university(), tpl_students::password(), tpl_students::status(), 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())));
     echo json_encode($db->get());
 }