exit; } if ($uri[0] == 'new') { $s = $app->db->prepare("insert into DoodleBoard (timeCreated, schoolId) values (:t,:s)"); $s->bindParam(':t', time()); $s->bindParam(':s', $school->id); $s->execute(); $newId = $app->db->lastInsertId(); header('Location: /' . $newId); exit; } $board = null; if (is_numeric($uri[0])) { $board = Whiteboard::getBySchoolId($uri[0], $school->id); } else { $board = Whiteboard::getbySchoolName($uri[0], $school->id); } if ($board) { $roomId = $board->id; $board->brandImage = $school->bgImg; $board->backgroundColor = $school->bgColor; $color = randomColor(); $inviteText = $board->getNameUrl($school->domain . ".sneffel.com"); $embedText = $board->getEmbed(500, 500, $school->domain . ".sneffel.com"); if ($board->brandImage) { $size = getimagesize("./" . $board->brandImage); $heightAdjust = $size[1] + 25; } else { $heightAdjust = 25; } $controller = "subdomainBoard";