Ejemplo n.º 1
0
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;
    }
}
?>
                        </h4>
                    </div>
                    <div class="row">					
                        <form action="schedule_edit.php" id="form_schedule" method="post">
                            <div class="row">
                                <div class="small-6 columns">
                                    <label <?php 
Ejemplo n.º 2
0
                <div class="row">
                    <h4>horaire - match</h4>
                </div>
                    <div class="row">				
                        <table id="saison" width="100%">
                            <thead>
                            <tr>
                                <th>Action</th><th>Date</th><th>Catégorie</th></th><th>Équipe pistoloise</th><th>Équipe adversaire</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php 
if ($result = $mySql->execute("SELECT * FROM schedule ORDER BY Date ASC")) {
    while ($row = $result->fetch_object("Schedule")) {
        $schedule = new Schedule();
        $schedule->initDB($row->Id, $mySql);
        ?>
                                        <tr>
                            				<td>
                                                <a title="Modifier" href="schedule_edit.php?id=<?php 
        echo $row->Id;
        ?>
">
                                                    <i class="fi-page-edit size-32"> </i>
                                                </a> 
                                                 <a title="Supprimer"  
                                                   onclick="javascript:return confirm('Voulez-vous supprimer l\'enregistrement?');" 
                                                   href='schedule.php?delete=<?php 
        echo $row->Id;
        ?>
'>