Example #1
0
             }
             break;
     }
     echo json_encode(array('query' => $_GET['query'], 'suggestions' => array_values($objs), 'data' => array_keys($objs)));
     break;
     /* League Tables */
 /* League Tables */
 case 'scheduler':
     $subtype = '';
     if (isset($_POST['subtype'])) {
         $subtype = $_POST['subtype'];
     }
     if ($subtype != '') {
         switch ($subtype) {
             case 'apa_schedule_available':
                 Scheduler::apa_schedule_available();
                 break;
             case 'apa_generate_draw':
                 Scheduler::apa_generate_draw();
                 break;
             case 'manual_draw':
                 Scheduler::show_manual_draw();
                 break;
             case 'manual_schedule':
                 $teams = json_decode($_POST['teams']);
                 $draw = array();
                 foreach ($teams->teams as $team) {
                     $draw[] = str_replace("pool", "", $team);
                 }
                 Scheduler::apa_generate_schedule($draw);
                 break;