function editDetail(&$smarty, $tour_id) { $fact = new tournament_factory(); $tour = $fact->getTournaments($tour_id); $course = new course_factory(); $course_list = $course->get_listSelect($tour->course_id); $teelist = $course->get_teelistSelect($tour->course_id, $tour->teebox); $smarty->assign('tour_id', $tour->id); $smarty->assign('tour_name', $tour->name); $smarty->assign('tour_place', $tour->place); $evt_date = substr($tour->evt_date, 0, 4) . "/" . substr($tour->evt_date, 5, 2) . "/" . substr($tour->evt_date, 8, 2); $smarty->assign('evt_date', $evt_date); $reg_date = substr($tour->reg_date, 0, 4) . "/" . substr($tour->reg_date, 5, 2) . "/" . substr($tour->reg_date, 8, 2); $smarty->assign('reg_date', $reg_date); $smarty->assign('max_player', $tour->max_player); $smarty->assign('reward', $tour->reward); $smarty->assign('points', $tour->points); $smarty->assign('descr', $tour->desc); $smarty->assign('courselist', $course_list); $smarty->assign('typelist', $teelist); switch ($tour->level) { case 1: $smarty->assign('s1', 'selected'); break; case 2: $smarty->assign('s2', 'selected'); break; case 3: $smarty->assign('s3', 'selected'); break; case 4: $smarty->assign('s4', 'selected'); break; case 5: $smarty->assign('s5', 'selected'); break; } switch ($tour->type) { case 1: $smarty->assign('t1', 'selected'); break; case 2: $smarty->assign('t2', 'selected'); break; case 3: $smarty->assign('t3', 'selected'); break; case 4: $smarty->assign('t4', 'selected'); break; } switch ($tour->status) { case 1: $smarty->assign('u1', 'selected'); break; case 2: $smarty->assign('u2', 'selected'); break; } $smarty->assign('addbtn', "Save Tournaments"); showRound($smarty, $tour->id); }
function editDetail(&$smarty, $tour_id) { $fact = new tournament_factory(); $tour = $fact->getTournaments($tour_id); $course = new course_factory(); $course_list = $course->get_course($tour->course_id); $teelist = $course->get_teelistSelect($tour->course_id, $tour->teebox); $smarty->assign('tour_id', $tour->id); $smarty->assign('tour_name', $tour->name); $smarty->assign('tour_place', $tour->place); $smarty->assign('evt_date', substr($tour->evt_date, 0, 4) . "/" . substr($tour->evt_date, 5, 2) . "/" . substr($tour->evt_date, 8, 2)); $smarty->assign('reg_date', substr($tour->reg_date, 0, 4) . "/" . substr($tour->reg_date, 5, 2) . "/" . substr($tour->reg_date, 8, 2)); $smarty->assign('max_player', $tour->max_player); $smarty->assign('reward', $tour->reward); $smarty->assign('points', $tour->points); $smarty->assign('descr', $tour->desc); $smarty->assign('courselist', $course_list->course_name); $smarty->assign('typelist', $teelist); switch ($tour->level) { case 1: $smarty->assign('s1', 'International'); break; case 2: $smarty->assign('s1', 'National'); break; case 3: $smarty->assign('s1', 'Regional'); break; case 4: $smarty->assign('s1', 'Open'); break; case 5: $smarty->assign('s1', 'Others'); break; } switch ($tour->type) { case 1: $smarty->assign('t1', 'Open'); break; case 2: $smarty->assign('t1', 'Invitational'); break; case 3: $smarty->assign('t1', 'Closed / Internal Only'); break; case 4: $smarty->assign('t1', 'Others'); break; } switch ($tour->status) { case 1: $smarty->assign('u1', 'Open / Incoming'); break; case 2: $smarty->assign('u1', 'Close / Match Play'); break; } showRound($smarty, $tour->id); }