school and school_city class

user edit with parent edit included (ajax)
city and school connected
overview updated
This commit is contained in:
Ricsi
2017-01-12 22:59:36 +01:00
parent 9c7f678e74
commit 20781a0847
20 changed files with 617 additions and 184 deletions

View File

@@ -7,6 +7,24 @@ if ($this->is_id()) {
# ISKOLA SZERKESZTÉSE
$new_school = new school();
$new_school->set_school_data_by_id($this->get_id());
//SCC LIST
$school_city_query = "SELECT scc_id FROM school_city WHERE scc_deleted = 0 ORDER BY - scc_order DESC, scc_city ASC;";
$school_city_assoc_array = $sql->assoc_array($school_city_query);
$school_cities = array();
foreach ($school_city_assoc_array as $key => $value) {
$new_scc = new school_city();
$new_scc->set_school_city_data_by_id($value['scc_id']);
$school_cities[] = $new_scc;
}
//var_dump($school_cities);
$smarty->assign('school', $new_school);
$smarty->assign('school_cities', $school_cities);
$smarty->display('school_data_edit.tpl');
}
@@ -14,10 +32,17 @@ else {
# ISKOLA LISTA
$tr_type_query = "SELECT * FROM school WHERE sc_deleted = 0 ORDER BY sc_name ASC";
$tr_type_assoc_array = $sql->assoc_array($tr_type_query);
$school_query = "SELECT * FROM school WHERE sc_deleted = 0 ORDER BY sc_name ASC";
$school_assoc_array = $sql->assoc_array($school_query);
$schools = array();
foreach ($school_assoc_array as $school_array) {
$new_school = new school();
$new_school->set_school_data_by_id($school_array['sc_id']);
$schools[] = $new_school;
}
$smarty->assign('school_assoc_array',$tr_type_assoc_array);
$smarty->assign('schools',$schools);
$smarty->display('school_list.tpl');