コード例 #1
0
 public static function run()
 {
     // Perform actions related to Betting
     $action = array_key_exists('action', $_SESSION) ? $_SESSION['action'] : "";
     $arguments = $_SESSION['arguments'];
     switch ($action) {
         case "generate":
             GameController::generateNewGame();
             BetView::showGames();
             break;
         default:
             BetController::show();
     }
 }
コード例 #2
0
ファイル: index.php プロジェクト: Trivette/cs4413
<?php

include "includer.php";
$url = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
$urlPieces = split("/", $url);
//print_r($urlPieces);
if (count($urlPieces) < 2) {
    $control = "none";
} else {
    $control = $urlPieces[2];
}
switch ($control) {
    case "login":
        LoginController::run();
        break;
    case "signup":
        SignupController::run();
        break;
    case "profile":
        ProfileController::run();
        break;
    case "bet":
        BetController::run();
        break;
    default:
        HomeView::show();
}