}
    }
}
$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);
        $smarty->assign('course_id', $course->course_id);
        $smarty->assign('course_name', $course->course_name);
        $smarty->assign('course_addr', $course->course_addr);
        $smarty->assign('course_phone', $course->course_phone);
        $smarty->assign('course_desc', $course->course_desc);
        $smarty->assign('savebtn', "Save course");