if ($note['imp'] == 1) { $content .= '<span class="imp">Imp</span>'; } $content .= ' </h5> <span>' . $note['class'] . ' | ' . $note['facultyName'] . ' | ' . $note['subjectName'] . '</span> </div> <div class="cleaner"></div> </div> </a>'; } } } } else { //$notes = getPostList($postTypId); $notes = post::all(1, $postTypId); if (!$notes) { die($e); } else { if ($notes == 'empty') { $title = 'No Note posted'; $titleBar = 'Notes'; $content = '<center><img src="' . $website . 'assets/img/smile_face.png" /><br /><p style="color:#AAA;font-size:1.5em;">No Notes to Show</p></center>'; } else { $title = 'Notes'; $titleBar = $title; $content = ''; foreach ($notes as $note) { $dateArray = getdate(strtotime($note['postDate'])); $content .= ' <a href="' . generate_link($note['postTitle'], $note['postId']) . '" class="pl-anchor">
<h5>' . $note['postTitle']; if ($note['imp'] == 1) { $content .= '<span class="imp">Imp</span>'; } $content .= ' </h5> <span>' . $note['class'] . ' | ' . $note['facultyName'] . ' | ' . $note['subjectName'] . '</span> </div> <div class="cleaner"></div> </div> </a>'; } } } } else { $questions = post::all(1, $postTypId); if (!$questions) { die($e); } else { if ($questions == 'empty') { $title = 'No Question posted'; $titleBar = 'Questions'; $content = '<center><img src="' . $website . 'assets/img/smile_face.png" /><br /><p style="color:#AAA;font-size:1.5em;">No Questions to Show</p></center>'; } else { $title = 'Questions'; $titleBar = $title; $content = ''; foreach ($questions as $note) { $dateArray = getdate(strtotime($note['postDate'])); $content .= ' <a href="' . generate_link($note['postTitle'], $note['postId']) . '" class="pl-anchor">
<?php require_once "../../includes/conf.inc.php"; require_once "../../includes/functions.inc.php"; if (isset($_SESSION['login'])) { $adminId = $_SESSION['adminId']; $admin = get_admin_info($adminId); $postTrash = post::all(3); if ($postTrash == 'empty') { echo "<center><img src=\"../../assets/img/smile_face.png\" /><h4 style=\"color:#AAA;\">Yay! No posts in trash.</h4></center>"; } else { echo ' <table class="tbl_list" cellspacing="0"> <tr> <td>Id</td> <td width="200">Title</td> <td>Date</td> <td>Class</td> <td>Faculty</td> <td>Subject</td> <td>Category</td> <td>File</td> <td>Posted By</td> <td>Imp?</td> <td>Actions</td> </tr>'; foreach ($postTrash as $post) { echo ' <tr data-postId="' . $post['postId'] . '" data-postTypId="' . $post['postTypId'] . '"> <td>' . $post['postId'] . '</td> <td>' . $post['postTitle'] . '</td>
<?php require_once "../../includes/conf.inc.php"; require_once "../../includes/functions.inc.php"; if (isset($_SESSION['login'])) { $adminId = $_SESSION['adminId']; $admin = get_admin_info($adminId); $posts = post::all(); if ($posts == 'empty') { echo "<center><img src=\"../../assets/img/smile_face.png\" /><h4 style=\"color:#AAA;\">There are no posts yet.</h4></center>"; } else { echo ' <table class="tbl_list" cellspacing="0"> <tr> <td>Id</td> <td width="200">Title</td> <td>Date</td> <td>Class</td> <td>Faculty</td> <td>Subject</td> <td>Category</td> <td>File</td> <td>Posted By</td> <td>Imp?</td> <td>Actions</td> <td width="80">Status</td> </tr>'; //while($post = mysql_fetch_array($selResult)){ foreach ($posts as $post) { if ($post['statusId'] == 1) { $status = "Posted";
<?php require "../includes/conf.inc.php"; require "../includes/functions.inc.php"; if (isset($_GET['limitStart'], $_GET['numPosts'])) { $limitStart = $_GET['limitStart']; $numPosts = $_GET['numPosts']; $posts = post::all(1, 0, 0, $limitStart, $numPosts); if (!$posts) { $postList['success'] = 0; $postList['message'] = 'Whoops! Something Went Wrong'; } else { if ($posts == 'empty') { $postList['success'] = 0; $postList['message'] = 'Post Not Found'; } else { $postList['success'] = 1; $postList['posts'] = array(); $postList['posts'] = $posts; } } echo json_encode($postList); }
<?php require "../includes/conf.inc.php"; require "../includes/functions.inc.php"; $syllabus = 'empty'; $postTypId = 3; if (isset($_GET['subjectId'])) { $subId = intval($_GET['subjectId']); $syllabus = post::all(1, $postTypId, $subId); if (!$syllabus) { die($e); } else { if ($syllabus != 'empty') { $class = $syllabus[0]['class']; $facultyName = $syllabus[0]['facultyName']; $subjectName = $syllabus[0]['subjectName']; $content = ''; foreach ($syllabus as $syll) { $dateArray = getdate(strtotime($syll['postDate'])); $content .= ' <a href="' . generate_link($syll['postTitle'], $syll['postId']) . '" class="pl-anchor"> <div class="pl"> <div class="plDate"> <span>' . $dateArray['mday'] . '</span> <span>' . $dateArray['month'] . '</span> </div> <div class="plDetail"> <h5>' . $syll['postTitle']; if ($syll['imp'] == 1) { $content .= '<span class="imp">Imp</span>'; }
<?php require "../includes/conf.inc.php"; require "../includes/functions.inc.php"; $refrence = 'empty'; $postTypId = 4; if (isset($_GET['subjectId'])) { $subId = intval($_GET['subjectId']); $refrence = post::all(1, $postTypId, $subId); if (!$refrence) { die($e); } else { if ($refrence != 'empty') { $class = $refrence[0]['class']; $facultyName = $refrence[0]['facultyName']; $subjectName = $refrence[0]['subjectName']; $content = ''; foreach ($refrence as $ref) { $dateArray = getdate(strtotime($ref['postDate'])); $content .= ' <a href="' . generate_link($ref['postTitle'], $ref['postId']) . '" class="pl-anchor"> <div class="pl"> <div class="plDate"> <span>' . $dateArray['mday'] . '</span> <span>' . $dateArray['month'] . '</span> </div> <div class="plDetail"> <h5>' . $ref['postTitle']; if ($ref['imp'] == 1) { $content .= '<span class="imp">Imp</span>'; }