<?php if (!isset($_SERVER['HTTP_REFERER'])) { header("location: ../../access_denied.php?data=You don't have direct access to this page"); } require_once '../../db/alumni_blog.php'; require_once '../../db/site_log_class.php'; require_once '../../db/user_class.php'; session_start(); if (!isset($_GET['id'])) { die("go to blog management page"); } $ti = $_GET['id']; //session_start(); $a = Alumni_Blog::deleteBlog($ti); $_SESSION['answer'] = $a; $l = new site_log(NULL, NULL, $_SESSION['user']->username, $_SERVER['REMOTE_ADDR'], $ti . " blog deleted"); $l->insertlog(); header('Location: ../../alumni_blog_manage_detail.php');
<?php if (isset($_POST['page'])) { $page = $_POST['page']; } else { header('Location: index.php'); } if (trim($page) == "blog") { if (isset($_POST['id'])) { $id = $_POST['id']; } require_once '../CMS/db/alumni_blog.php'; require_once '../CMS/db/alumni_detail.php'; $blog = Alumni_Blog::getBlogObject($id); if ($blog === 0) { die("No blog with this id."); } if ($blog->alumni_blog_status == 0 || $blog->alumni_blog_status == "0") { die("This blog is not approved yet"); } $alumni = Alumni_Detail::getAlumniObject($blog->alumni_uname); echo " <h3>Alumni Blog</h3><hr /><br /><div class='articles'>\r\n <article class='clearfix'>\t\t\t\r\n <header>\r\n <span class='post-format-quote'></span>\r\n <h1><a href='BlogPost.php'>" . trim($blog->alumni_blog_subject) . "</a></h1>\r\n <p class='article-meta-extra'> " . date("F jS, Y", strtotime($blog->alumni_blog_date)) . ", by <a href=''>{$alumni->alumni_first_name} {$alumni->alumni_last_name}</a></p>\r\n\r\n </header>\r\n\r\n <figure class='article-preview-image'>\r\n <a href=''><img src='../cms/{$alumni->alumni_photo_url}' alt='Preview image'></a>\r\n </figure>\r\n\r\n <p>" . trim($blog->alumni_blog_detail) . "</p>\r\n\r\n </article> <hr class='fancy-hr'></div>"; }
<?php if (isset($_GET['id'])) { $page = $_GET['id']; $ratio = 5; $minlimit = $ratio * ($page - 1); require_once '../CMS/db/alumni_blog.php'; require_once '../CMS/db/alumni_detail.php'; $blogs = Alumni_Blog::getAllBlogswithlimit("1", $minlimit, 5); if ($blogs != 0) { foreach ($blogs as $blog) { $alumni = Alumni_Detail::getAlumniObject($blog->alumni_uname); echo "<article class='clearfix'>\t\t\t\r\n <header>\r\n <span class='post-format-quote'></span>\r\n <h1><a href='blog.php?id={$blog->blog_id}'>" . trim($blog->alumni_blog_subject) . "</a></h1>\r\n <p class='article-meta-extra'> " . date("F jS, Y", strtotime($blog->alumni_blog_date)) . ", by <a href='blog.php?id={$blog->blog_id}'>{$alumni->alumni_first_name} {$alumni->alumni_last_name}</a></p>\r\n\r\n </header>\r\n\r\n <figure class='article-preview-image'>\r\n <a href='blog.php?id={$blog->blog_id}'><img src='../cms/{$alumni->alumni_photo_url}' alt='Preview image'></a>\r\n </figure>\r\n\r\n <p>" . trim($blog->alumni_blog_detail) . "...</p>\r\n <p><a href='blog.php?id={$blog->blog_id}'>Read more...</a></p>\r\n\r\n </article> <hr class='fancy-hr'>"; } } else { echo "no blogs inserted yet"; } } else { header('Location: bloglist.php'); }
<?php require_once '../../db/alumni_detail.php'; require_once '../../db/alumni_blog.php'; require_once '../../db/ImageManipulator.php'; require_once '../../db/site_log_class.php'; require_once '../../db/user_class.php'; if (!isset($_SESSION)) { session_start(); } if (!isset($_SESSION['alumniuser'])) { header("location:../../../talumniportal/login.php"); } if (!isset($_SERVER['HTTP_REFERER'])) { header("location: ../../access_denied.php?data=You don't have direct access to this page"); } define('INCLUDE_CHECK', true); if (isset($_POST['subject'])) { $subject = $_POST['subject']; } else { die("sebject needed."); } if (isset($_POST['blog'])) { $blog = $_POST['blog']; } else { die("blog needed."); } $bl = new Alumni_Blog(NULL, $_SESSION['alumniuser']->alumni_uname, $subject, $blog, NULL, "0"); echo $bl->InsertBlog(); $l = new site_log(NULL, NULL, $_SESSION['alumniuser']->alumni_uname, $_SERVER['REMOTE_ADDR'], $subject . " blog added"); $l->insertlog();
<?php if (!isset($_SERVER['HTTP_REFERER'])) { header("location: ../../access_denied.php?data=You don't have direct access to this page"); } require_once '../../db/alumni_blog.php'; require_once '../../db/site_log_class.php'; require_once '../../db/user_class.php'; session_start(); if (!isset($_GET['id'])) { die("go to blog management page"); } $ti = $_GET['id']; //session_start(); $a = Alumni_Blog::ApproveBlog($ti); $_SESSION['answer'] = $a; $l = new site_log(NULL, NULL, $_SESSION['user']->username, $_SERVER['REMOTE_ADDR'], $ti . " blog approved"); $l->insertlog(); header('Location: ../../alumni_blog_manage_detail.php');
<?php //if(!isset($_SERVER['HTTP_REFERER'])){ // header("location: ../../access_denied.php?data=You don't have direct access to this page"); //} require_once 'db/alumni_blog.php'; $a = Alumni_Blog::getAllBlogs(0); $b = Alumni_Blog::getAllBlogs(1); if ($a === 0 && $b === 0) { die("No Blogs are Added Yet"); } echo "<table><tr><th>ID</th><th>User Name</th><th>Subject</th><th colspan='3'>Manage Detail</th></tr>"; if ($a != 0) { foreach ($a as $arr) { echo "<tr><td>{$arr->blog_id}</td><td>{$arr->alumni_uname}</td><td>{$arr->alumni_blog_subject}</td><td><a href='alumni_blog_view.php?id={$arr->blog_id}'>View Blog</a></td><td><a id='delete' href='server/alumni/blog_delete_blog.php?id={$arr->blog_id}'>Delete Blog</a></td><td><a href='server/alumni/blog_approve_blog.php?id={$arr->blog_id}'>Approve Blog</a></td>"; } } if ($b != 0) { foreach ($b as $arr) { echo "<tr><td>{$arr->blog_id}</td><td>{$arr->alumni_uname}</td><td>{$arr->alumni_blog_subject}</td><td><a href='alumni_blog_view.php?id={$arr->blog_id}'>View Blog</a></td><td><a id='delete' href='server/alumni/blog_delete_blog.php?id={$arr->blog_id}'>Delete Blog</a></td>"; } } echo "</table>";
<?php require_once '../includes/header.php'; require_once '../CMS/db/alumni_blog.php'; $total = Alumni_Blog::countblog("1"); $re = ceil($total / 5); ?> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="../jscript/jquery-1.10.2.min.js"><\/script>')</script> <script> var count=0; getarticles(); var myVar = setInterval(function(){getarticles();},10000); function getarticles() { if(count==<?php echo $re; ?> ){ clearInterval(myVar); document.getElementById("ajaxload").style.display="none"; return; } count++; var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else