<div class="content"> <div class="half"><?php renderSmallGroupList($db, $group, $groupLeader); ?> </div> <div class="half"> <h2>Posts</h2> <form enctype="multipart/form-data" action="?action=newPost" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="10000000" /> <textarea name="content" placeholder="What's on your mind?" minlength="2" required></textarea> <input type="file" name="attachment"></input> <input type="submit" value="Post"> </form> <?php renderGroupPosts(getGroupPosts($db, $group), $db); ?> </div> </div> <?php } ?> <?php include 'footer.php'; ?> </main> <script src="jquery.js"></script> <script src="jquery.validate.min.js"></script> <script> $("mainForm").validate(); </script>
} ?> <body> <main> <?php include "header.inc"; ?> <div class="half"> <form action="?action=newPost" method="post"> <label for="bulletin">Send Global Announcement</label> <input type="text" name="content" id="bulletin" placeholder="Enter Announcement Here"/> <input type="submit" value="Send"/> </form> <?php renderGroupPosts(getAllPosts($db), $db); ?> </div> <div class="half"> <?php $query = 'SELECT * FROM groups WHERE tutor = :teacherId'; $statement = $db->prepare($query); $statement->bindValue(':teacherId', $sessionId); if (!$statement->execute()) { print_r($statement->errorInfo()); return false; } else { $result = $statement->fetchAll(PDO::FETCH_ASSOC); } ?>