コード例 #1
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 swimteamid is the argument which must be
     //  dealt with differently for GET and POST operations
     if (array_key_exists("swimteamid", $scriptargs)) {
         $swimteamid = $scriptargs["swimteamid"];
     } else {
         if (array_key_exists("_swimteamid", $scriptargs)) {
             $swimteamid = $scriptargs["_swimteamid"];
         } else {
             if (array_key_exists(FT_DB_PREFIX . "radio", $scriptargs)) {
                 $swimteamid = $scriptargs[FT_DB_PREFIX . "radio"][0];
             } else {
                 $swimteamid = null;
             }
         }
     }
     $container = container();
     $it = new SwimTeamInfoTable("Swim Team Details");
     $it->setSwimTeamId($swimteamid);
     $it->BuildInfoTable();
     $container->add($it);
     $container->add(FlipTurnGUIButtons::getBackHomeButtons());
     return $container;
 }
コード例 #2
0
ファイル: widgets.class.php プロジェクト: rjoverph/flip-turn
 /**
  * Get Back and Home buttons
  *
  * @return object - HTML span containing Back and Home buttons.
  */
 function getBackHomeButtons()
 {
     //$back = html_button("button", "Back") ;
     //$back->set_tag_attribute("onclick", "javascript:history.go(-1)") ;
     //$back->set_style("margin: 10px; vertical-align: middle; width: 90px;") ;
     //$home = html_button("button", "Home") ;
     //$home->set_tag_attribute("onclick", "javascript:document.location='/';") ;
     //$home->set_style("margin: 10px; vertical-align: middle; width: 90px;") ;
     return html_span(null, FlipTurnGUIButtons::getBackButton(), FlipTurnGUIButtons::getHomeButton());
 }
コード例 #3
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;
 }
コード例 #4
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;
 }