} } //city $_SESSION['loc']['citycode'] = $_SESSION['loc']['citycode'] != '' ? $_SESSION['loc']['citycode'] : ""; } } //end of location $educations = Education::find_all(); if (is_array($educations) and !empty($educations)) { $education_t = array(); foreach ($educations as $education) { $education_t[$education->id] = $education->education_name; } $smarty->assign('education', $education_t); } $careers = CareerDegree::find_all(); if (is_array($careers) and !empty($careers)) { $career_t = array(); foreach ($careers as $career) { $career_t[$career->id] = $career->career_name; } $smarty->assign('career', $career_t); } $experiences = Experience::find_all(); if (is_array($experiences) and !empty($experiences)) { $experience_t = array(); foreach ($experiences as $experience) { $experience_t[$experience->id] = $experience->experience_name; } $smarty->assign('experience', $experience_t); }
if (isset($_POST['bt_add'])) { $add_new = new CareerDegree(); $add_new->career_name = $_POST['txt_career_name']; $add_new->var_name = $add_new->mod_write_check($_POST['txt_career_name']); $add_new->is_active = $_POST['txt_is_active']; if ($add_new->save()) { $session->message("New Career Degree added."); redirect_to($_SERVER['PHP_SELF']); die; } else { $message = join("<br />", $add_new->errors); } } } $delete_message = "Are you sure you wont to delete this CareerDegree name"; $career_degree = CareerDegree::find_all(); $manage_lists = array(); if ($career_degree && is_array($career_degree)) { $i = 1; foreach ($career_degree as $list) { $manage_lists[$i]['id'] = $list->id; $manage_lists[$i]['career_name'] = $list->career_name; $manage_lists[$i]['is_active'] = $list->is_active; $i++; } $smarty->assign('manage_lists', $manage_lists); } $query = ""; if (!empty($_GET)) { foreach ($_GET as $key => $data) { if (!empty($data) && $data != "" && $key != "page" && $key != "bt_search") {