Пример #1
0
 public function editscheduleAction()
 {
     try {
         $this->checkLogin();
         $schedule = new Schedule();
         $schedule->update($this->request->getPost());
         header("Location: " . ROOT_URL . "/admin/finish/");
     } catch (Exception $e) {
         $this->displayErrorView($e->getMessage());
     }
 }
Пример #2
0
include "large_menu.php";
/*include("small_menu_start.php");*/
?>
            <!-- MAIN SECTION -->
            <section class="main-section">
                <div class="small-12 columns">
                    <div class="row">
                        <h4>horaire - <?php 
$schedule = new Schedule();
if (isset($_POST["date"])) {
    $schedule->initProperty($_POST["MyId"], $_POST["seasonId"], $_POST["categoryId"], $_POST["teamId"], $_POST["awayTeamId"], isset($_POST["tpHome"]) ? 1 : 0, strtotime($_POST["date"]), $_POST["stade"], $_POST["city"], $_POST["refereeId1"], $_POST["refereeId2"], $_POST["refereeId3"], $_POST["refereeId4"], $_POST["markerId1"], $_POST["markerId2"], $_POST["pointTp"], $_POST["pointAwayTeam"], $mySql);
    $schedule->PageMode = $_POST["pageMode"];
    $schedule->validate($mySql);
    if (!$schedule->getHasError()) {
        if ($schedule->PageMode == Constants::PAGE_MODE_EDIT) {
            $schedule->update($mySql);
        } else {
            $schedule->addNew($mySql);
        }
    }
    header('Location: schedule.php');
    exit;
} else {
    if (isset($_GET["id"])) {
        $schedule->initDB($_GET["id"], $mySql);
        echo date("Y-m-d H:i", $schedule->Date);
        $schedule->PageMode = Constants::PAGE_MODE_EDIT;
    } else {
        echo "[Nouvelle]";
        $schedule->PageMode = Constants::PAGE_MODE_ADD;
    }
 public function updateDays()
 {
     Schedule::update();
     $this->viewDetailSchedule();
 }