예제 #1
0
    <thead>
        <tr>
            <th>№</th>
            <th>Создатель</th>
            <th>Длина</th>
            <th>Фигур</th>
            <th>Очки</th>
            <th>Блиц</th>
            <th>Игроков</th>
            <th>Зашло</th>
            <th>Заявка</th>
        </tr>
    </thead>
    <tbody>
    <?php 
echo view::viewRooms($rooms);
?>
    </tbody>
</table>
<?php 
if ($userBusyInfo['action'] !== 'creater' and $userBusyInfo['action'] !== 'created') {
    ?>
    <div class="addRoom">
        <a href="<?php 
    echo DOMEN . '/' . TICTACTOE;
    ?>
/addRoom">
            <input type="button" value="Создать комнату">
        </a>
    </div>
<?php 
예제 #2
0
파일: ajax.php 프로젝트: exlant/tictactoe
 private function updateRoomsPage($login)
 {
     $tictactoe = new tictactoePlayGame($login);
     $data = array();
     $userBusyInfo = $tictactoe->getUserBusyInfo();
     $data['rooms'] = view::viewRooms($tictactoe->getSingleRooms());
     $data['roomsHash'] = md5($data['rooms']);
     $data['status'] = $userBusyInfo['roomStatus'];
     if ($userBusyInfo['roomStatus'] === 'created') {
         $data['addPlayers'] = view::addPlayers($userBusyInfo['players'], $userBusyInfo['freeFigure'], $login, $userBusyInfo['action']);
         $data['addPlayersHash'] = md5($data['addPlayers']);
         $data['readyTogo'] = $userBusyInfo['creater'] === $login ? $userBusyInfo['readyToGo'] : 'notCreater';
     }
     echo json_encode($data);
 }