<?php ini_set("display_errors", 1); include_once "class.olympicPage.inc"; // every page relies on the platformPage, in this case the olympicPage $page = new olympicPage(); // presentation layer. actually an html page $page->setDefaultPage("signup.tpl"); $page->addItem("InputField", "company", "in_template"); $page->m_items['company']->addValidation("NotEmpty", "1"); $page->m_items['company']->setSize("40"); $page->m_items['company']->m_validationrule->setErrorMessage("Please enter the company name!"); $page->addItem("InputField", "emailadres", "in_template"); $page->m_items['emailadres']->addValidation("IsEmail"); $page->m_items['emailadres']->setSize("40"); $page->m_items['emailadres']->m_validationrule->setErrorMessage("Please enter a valid emailaddress!"); $page->addItem("PasswordField", "passwd", "in_template"); $page->m_items['passwd']->addValidation("NotEmpty", "4"); $page->m_items['passwd']->setSize("40"); $page->m_items['passwd']->m_validationrule->setErrorMessage("Please enter passwd with at least 5 characters!"); // show the page $page->showPlatformPage("processForm"); // also show some debug information $page->printDebug(); function processForm() { global $page; // check whether this account already exists // we skip this for now. if ($page->subscribeUser($_POST['emailadres'], $_POST['passwd'], 'user', $_POST['company'])) { $page->login($_POST['emailadres'], $_POST['passwd'], "user");
<?php ini_set("display_errors", 1); include_once "class.olympicPage.inc"; // every page relies on the platformPage, in this case the olympicPage $page = new olympicPage(); // presentation layer. actually an html page $page->setDefaultPage("addplayer.tpl"); $page->addItem("InputField", "name", "in_template"); if ($_POST['name'] != "") { $page->m_items['name']->setValue($_POST['name']); } $page->m_items['name']->addValidation("NotEmpty", "3"); $page->m_items['name']->setSize("20"); $page->m_items['name']->m_validationrule->setErrorMessage("please provide a full Name"); $page->addItem("InputField", "height", "in_template"); if ($_POST['height'] != "") { $page->m_items['height']->setValue($_POST['height']); } $page->m_items['height']->addValidation("MinMaxFloat", "0", "240", "2"); $page->m_items['height']->setSize("10"); $page->m_items['height']->m_validationrule->setErrorMessage("Please enter a height"); $page->addItem("InputField", "weight", "in_template"); if ($_POST['weight'] != "") { $page->m_items['weight']->setValue($_POST['weight']); } $page->m_items['weight']->addValidation("MinMaxFloat", "0", "240", "1"); $page->m_items['weight']->setSize("10"); $page->m_items['weight']->m_validationrule->setErrorMessage("Please enter a weight"); $page->addItem("Hidden", "token", "in_template"); $page->m_items['token']->setValue("test");
<?php ini_set("display_errors", 1); include_once "class.olympicPage.inc"; $page = new olympicPage(); $page->mustBeUser("login.php"); // presentation layer. actually an html page $page->setDefaultPage("schedule.tpl"); // show the page $page->showPlatformPage("processForm"); // also show some debug information $page->printDebug(); function processForm() { global $page; }
<?php ini_set("display_startup_errors", 1); ini_set("display_errors", 1); include_once "class.olympicPage.inc"; // every page relies on the platformPage, in this case the olympicPage $page = new olympicPage(); $page->mustBeUser("login.php"); // presentation layer. actually an html page $page->setDefaultPage("judge.tpl"); // first we get the schedule of the assigned round. $round_id = 1; $scheduleround = $page->getRoundSchedule($round_id); // var_dump(count($scheduleround)); for ($i = 0; count($scheduleround) > $i; $i++) { $players[$scheduleround[$i]['player_id']] = $scheduleround[$i]['surname']; } // first get the players of this session_id in sequence how it is scheduled. if (count($players) == 0) { if ($_GET['alternative']) { $page->m_smarty->assign("message", "The selected round is already judged, please choose another..."); } $page->m_smarty->assign("noplayers", "true"); $page->addItem("DropDown", "roundname", "in_template"); $page->m_items['roundname']->changeOnSubmit(); $page->m_items['roundname']->setValues($page->getRounds()); $page->m_items['roundname']->startEmpty("------"); $page->m_items['roundname']->addValidation("IsInt"); $page->m_items['roundname']->m_validationrule->setErrorMessage("Please select a round"); } else { $page->addItem("InputFieldNoEdit", "roundname", "in_template");
<?php ini_set("display_errors", 1); include_once "class.olympicPage.inc"; // every page relies on the platformPage, in this case the olympicPage $page = new olympicPage(); $page->mustComeFrom("subscribe.php"); // presentation layer. actually an html page $page->setDefaultPage("subscribed.tpl"); // show the page $page->showPlatformPage("processForm"); // also show some debug information $page->printDebug(); function processForm() { global $page; }
<?php ini_set("display_errors", 1); include_once "class.olympicPage.inc"; // every page relies on the platformPage, in this case the olympicPage $page = new olympicPage(); $page->mustBeUser("login.php"); // presentation layer. actually an html page $page->setDefaultPage("rounds.tpl"); $rounds = $page->getRoundsData(); $page->m_smarty->assign("rounds", $rounds); // show the page $page->showPlatformPage("processForm"); // also show some debug information $page->printDebug(); function processForm() { global $page; }
<?php ini_set("display_errors", 1); include_once "class.olympicPage.inc"; $page = new olympicPage(); $page->mustBeUser("login.php"); // presentation layer. actually an html page $page->setDefaultPage("search.tpl"); $page->addItem("InputField", "search", "in_template"); $page->m_items['search']->addValidation("NotEmpty", "2"); $page->m_items['search']->setSize("30"); $page->m_items['search']->m_validationrule->setErrorMessage("Please provide an search term with at least 3 characters..."); $page->addItem("RadioButton", "criteria", "in_template"); $page->m_items['criteria']->setValues(array("players.surname" => "name", "countries.country" => "nationality", "players.history" => "history")); $page->m_items['criteria']->addValidation("NotEmpty", "1"); $page->m_items['criteria']->m_validationrule->setErrorMessage("Please select one of the search criterion"); if (count($_GET) > 0) { $results = $page->searchOn($_GET['criteria'], $_GET['search']); $page->m_smarty->assign("results", $results); } // show the page $page->showPlatformPage("processForm"); // also show some debug information $page->printDebug(); function processForm() { global $page; if ($_POST != "") { $results = $page->searchOn($_POST['criteria'], $_POST['search']); if (count($results) > 0) { //forward
<?php ini_set("display_startup_errors", 1); ini_set("display_errors", 1); include_once "class.olympicPage.inc"; // every page relies on the platformPage, in this case the olympicPage $page = new olympicPage(); $page->mustBeUser("login.php"); // presentation layer. actually an html page $page->setDefaultPage("judgedsummary.tpl"); $results = $page->getResult($_GET['result_id']); $page->m_smarty->assign("results", $results); // show the page $page->showPlatformPage("processForm"); // also show some debug information $page->printDebug(); function processForm() { global $page; }
<?php ini_set("display_errors", 1); include_once "class.olympicPage.inc"; // every page relies on the platformPage, in this case the olympicPage $page = new olympicPage(); // presentation layer. actually an html page $page->setDefaultPage("index.tpl"); $page->addItem("InputField", "name", "in_template"); $page->m_items['name']->addValidation("NotEmpty", "2"); $page->m_items['name']->setSize("40"); $page->m_items['name']->m_validationrule->setErrorMessage("please enter a name"); $page->addItem("InputField", "height", "in_template"); $page->m_items['height']->addValidation("MinMaxFloat", "1", "10", "2"); $page->m_items['height']->setSize("40"); $page->m_items['height']->m_validationrule->setErrorMessage("please enter the grade between 1 and 10 and at most 2 decimals"); // show the page $page->showPlatformPage("processForm"); // also show some debug information $page->printDebug(); function processForm() { global $page; }
<?php include_once "class.olympicPage.inc"; $page = new olympicPage(); $page->unregisterUser(); $page->forwardTo("index.php"); $page->printDebug();
<?php ini_set("display_errors", 1); include_once "class.olympicPage.inc"; // every page relies on the platformPage, in this case the olympicPage $page = new olympicPage(); $page->mustBeUser("login.php"); // presentation layer. actually an html page $page->setDefaultPage("round_details.tpl"); if ($_GET['round_id'] != "") { $round = $page->getRoundResults($_GET['round_id']); if (is_array($round) && count($round) > 0) { $page->m_smarty->assign("round", $round); } else { // shit no round data? } } else { // no round_id so forward $page->forwardTo("rounds.php"); } // show the page $page->showPlatformPage("processForm"); // also show some debug information $page->printDebug(); function processForm() { global $page; }