コード例 #1
0
ファイル: results_event.php プロジェクト: rjoverph/flip-turn
 function content_block()
 {
     //  Add the InfoTableCSS so the tables look right
     $this->add_head_css(new DefaultGUIDataListCSS());
     //  This allows passing arguments eithers as a GET or a POST
     $scriptargs = array_merge($_GET, $_POST);
     //  The eventid is the argument which must be
     //  dealt with differently for GET and POST operations
     if (array_key_exists("eventid", $scriptargs)) {
         $eventid = $scriptargs["eventid"];
     } else {
         if (array_key_exists("_eventid", $scriptargs)) {
             $eventid = $scriptargs["_eventid"];
         } else {
             if (array_key_exists(FT_DB_PREFIX . "radio", $scriptargs)) {
                 $eventid = $scriptargs[FT_DB_PREFIX . "radio"][0];
             } else {
                 $eventid = null;
             }
         }
     }
     //  Need better error handling but for now just die!
     if (is_null($eventid)) {
         die('Bad Event Id:  ' . basename(__FILE__) . '::' . __LINE__);
     }
     $container = container();
     $e = explode('-', $eventid);
     //$it = new SwimMeetInfoTable('Swim Meet Details', '500') ;
     //$it->setSwimMeetId($eventid) ;
     //$it->BuildInfoTable(false) ;
     //$container->add($it, html_br(2)) ;
     //  Complex order by clause to make sure DQ and NS are shown
     //  after valid times.
     $swimresults = new SwimResultsDataList('Results', '100%', 'event_number,
         case when finals_time_ft = 0.0 then 1 else 0 end, finals_time_ft', null, null, null, sprintf('event_gender="%s" AND event_age_code="%s"
         AND stroke_code="%s" AND event_distance="%s"', $e[0], $e[1], $e[2], $e[3]));
     $swimresults->set_save_vars(array('eventid' => $eventid));
     $div = html_div();
     $div->set_id("swimresultsgdl");
     $div->add($swimresults);
     $container->add($div);
     $container->add(FlipTurnGUIButtons::getBackHomeButtons());
     return $container;
 }
コード例 #2
0
 function content_block()
 {
     //  Add the InfoTableCSS so the tables look right
     $this->add_head_css(new DefaultGUIDataListCSS());
     //  This allows passing arguments eithers as a GET or a POST
     $scriptargs = array_merge($_GET, $_POST);
     //  The swimmeetid is the argument which must be
     //  dealt with differently for GET and POST operations
     if (array_key_exists("swimmeetid", $scriptargs)) {
         $swimmeetid = $scriptargs["swimmeetid"];
     } else {
         if (array_key_exists("_swimmeetid", $scriptargs)) {
             $swimmeetid = $scriptargs["_swimmeetid"];
         } else {
             if (array_key_exists(FT_DB_PREFIX . "radio", $scriptargs)) {
                 $swimmeetid = $scriptargs[FT_DB_PREFIX . "radio"][0];
             } else {
                 $swimmeetid = null;
             }
         }
     }
     $container = container();
     $it = new SwimMeetInfoTable('Swim Meet Details', '500');
     $it->setSwimMeetId($swimmeetid);
     $it->BuildInfoTable(false);
     $container->add($it, html_br(2));
     //  Complex order by clause to make sure DQ and NS are shown
     //  after valid times.
     $swimresults = new SwimResultsDataList('Results', '100%', 'event_number,
         case when finals_time_ft = 0.0 then 1 else 0 end,
         finals_time_ft');
     $swimresults->set_save_vars(array('swimmeetid' => $swimmeetid));
     $div = html_div();
     $div->set_id("swimresultsgdl");
     $div->add($swimresults);
     $container->add($div);
     $container->add(FlipTurnGUIButtons::getBackHomeButtons());
     return $container;
 }