public function getBRoom($brain_room) { $pdo = Database::getDB(); $rid = $brain_room->getRid(); $room_id = $brain_room->getRoom_id(); $user_id = $brain_room->getUser_id(); $stmt = $pdo->prepare("SELECT brain_rooms.category, brain_rooms.players, brain_joinroom.player_type, brain_joinroom.room_num FROM brain_rooms, brain_joinroom WHERE brain_rooms.room_num = brain_joinroom.room_num AND user_id = ?"); $stmt->execute(array($user_id)); $row = $stmt->fetch(); $brain_room = new brain_Room(); $brain_room->setRoom_id($row['room_num']); $brain_room->setCategory($row['category']); $brain_room->setPlayer_type($row['player_type']); $brain_room->setPlayers($row['players']); // $brain_room->setRoom_id($row['room_num']); return $brain_room; }
require './model/brain_joinRoom.php'; require './model/brain_joinRoomDB.php'; require './model/brain_reserveQuestion.php'; require './model/brain_reserveQuestionDB.php'; require './model/BrainJoinRoom.php'; require './model/BrainRoom.php'; // require './model/brain_Game.php'; // require './model/brain_GameDB.php'; //--------------------------------------------// $brain_User = new brain_User(); $brain_UserDB = new brain_UserDB(); $brain_Category = new brain_Category(); $brain_CategoryDB = new brain_CategoryDB(); $brain_Question = new brain_Question(); $brain_QuestionDB = new brain_QuestionDB(); $brain_room = new brain_Room(); $brain_roomDB = new brain_RoomDB(); $brain_joinRoom = new brain_joinRoom(); $brain_joinRoomDB = new brain_joinRoomDB(); $brain_reserveQuestion = new brain_reserveQuestion(); $brain_reserveQuestionDB = new brain_reserveQuestionDB(); $brainJoinRoom = new BrainJoinRoom(); $brainRoom = new BrainRoom(); // $brain_room = new brain_Game(); // $brain_roomDB = new brain_GameDB(); $values = array(); //--------------------------------------------// if ($action == 'login_form') { if (isset($_GET['error'])) { $error = $_GET['error']; } else {