school and school_city class
user edit with parent edit included (ajax) city and school connected overview updated
This commit is contained in:
@@ -16,15 +16,27 @@ if ($this->is_id()) {
|
||||
//SCHOOL ARRAY
|
||||
$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 $key => $value) {
|
||||
$new_school = new school();
|
||||
$new_school->set_school_data_by_id($value['sc_id']);
|
||||
$schools[] = $new_school;
|
||||
}
|
||||
//SCHOOL CITY ARRAY
|
||||
$school_city_query = "SELECT * FROM school_city WHERE scc_deleted = 0 ORDER BY scc_city ASC;";
|
||||
$school_city_query = "SELECT * 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;
|
||||
}
|
||||
//REGION ARRAY
|
||||
$region_query = "SELECT * FROM region WHERE reg_deleted = 0 ORDER BY reg_name ASC;";
|
||||
$region_assoc_array = $sql->assoc_array($region_query);
|
||||
//smarty thingz
|
||||
$smarty->assign('school_assoc_array', $school_assoc_array);
|
||||
$smarty->assign('school_city_assoc_array', $school_city_assoc_array);
|
||||
$smarty->assign('school_assoc_array', $schools);
|
||||
$smarty->assign('school_city_assoc_array', $school_cities);
|
||||
$smarty->assign('region_assoc_array', $region_assoc_array);
|
||||
$smarty->assign('user_data', $user_data_assoc_array[0]);
|
||||
$smarty->assign('shirt_size_assoc_array', $shirt_size_assoc_array);
|
||||
|
||||
Reference in New Issue
Block a user