} else { if (strtolower(trim($_POST['refreshbtn'])) == "reload") { $aksi2 = "reload"; } else { if (strtolower(trim($_POST['cancelbtn'])) == "close & back to list") { $aksi2 = "reload"; } } } $smarty->assign('aksi2', $aksi2); // Process aksi2 switch ($aksi2) { case "search": $showList = true; $val = trim($_POST['search_val']); $course_list = $course_fact->get_listByName($val); $smarty->assign('courselist', $course_list); $smarty->assign('course_msg', "There are currently no such type of course. Click reload button to refresh."); break; case "reload": $showList = true; $course_list = $course_fact->get_list(); $smarty->assign('courselist', $course_list); $smarty->assign('course_msg', "There are currently no type of course. Please create one."); break; case "edit": $showDetail = true; $id = trim($_REQUEST['id']); $course = $course_fact->get_course($id); $smarty->assign('editDetail', true); $smarty->assign('pathimage', $course->course_logopath);