<?php require '../admin/coreclass.php'; session_start(); // if user is not login..redirect him to login page if (!isset($_SESSION['login'])) { header('Location: login.php'); } if (isset($_SESSION['login'])) { $userID = $_SESSION['clientID']; } $msgID = $_GET['messageID']; // saved the messageID $_SESSION['msgID'] = $msgID; $msg = new messages(); // read his message $resultdata = $msg->read_message($userID, $msgID); // saved the msg subject $_SESSION['title'] = $resultdata[0]->subject; // set the message as read $msg->set_readmessage($userID, $msgID); $from = getUser_info($resultdata[0]->userID_from, 'fullname'); $from_userID = getUser_info($resultdata[0]->userID_from, 'userID'); $_SESSION['$from_userID'] = $from_userID; $author = getUser_info($resultdata[0]->receiverID, 'fullname'); // compile the page now! go! go! go! $tpl = new template_parser('../templates/view_private_message_detail.tpl.php'); $tags = array('{FROM}' => $from, '{POSTED}' => friendlyDate($resultdata[0]->date_time), '{SUBJECT}' => $resultdata[0]->subject, '{AUTHOR}' => $author, '{MESSAGE}' => $resultdata[0]->message, '{SITENAME}' => 'CMS Adminss', '{HEADER}' => ' ', '{TOPNAV}' => '../templates/client_top_menu.tpl.php', '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();
$row_data .= 'class="red">'; break; } $row_data .= $tasks[$i]->priority; $row_data .= '</td>'; $row_data .= '<td '; switch ($tasks[$i]->status) { case 'Completed': $row_data .= 'class="green">'; break; case 'In Progress': $row_data .= 'class="viola">'; break; case 'Not Started': $row_data .= 'class="blue">'; break; } $row_data .= $tasks[$i]->status; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= ' ' . getUser_info($tasks[$i]->assignedto, 'fullname'); $row_data .= '</td>'; $row_data .= '</tr>'; } } $currentdate = friendlydate(time()); // ok baby, let start compiling the page now..go! go! go! {mh} $tpl = new template_parser('../templates/task_manager.tpl.php'); $tags = array('{SUBJECT}' => 'Subject', '{DUE_DATE}' => 'Due Date', '{PRIORITY}' => 'Priority', '{STATUS}' => 'Status', '{SITENAME}' => 'CMS Adminss', '{DATE_CREATED}' => 'Date Created', '{DATE_STARTED}' => 'Date Started', '{ASSIGN_TO}' => 'Assigned to', '{CURRENTDATE}' => $currentdate, '{MESSAGE}' => $message, '{NUMITEMS}' => '' . $totalrows, '{TABLE_DATA}' => $row_data, '{FROM_MONTH}' => $optmonth, '{FROM_DAY}' => $optday, '{FROM_YEAR}' => $optyear, '{PAGELINK}' => $pagelink->pagelinks, '{TOPNAV}' => 'top_menu.php', '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();
if ($allmessages[$i]->messageID) { $i % 2 == 0 ? $bgcolor = "" : ($bgcolor = "#F5F5F5"); $row_data .= '<tr class="tdhover" id="tdata" bgcolor = "' . $bgcolor . '">'; $row_data .= '<td>'; $row_data .= $j++; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= '<input type="checkbox" name="cid[]" id="cb' . $i . '" value="' . $allmessages[$i]->messageID . '" onClick="isChecked(this.checked);"/>'; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= '<a href="' . VIEW_MESSAGE_URL2 . $allmessages[$i]->messageID . '">'; $row_data .= $allmessages[$i]->subject; $row_data .= '</a>'; $row_data .= '</td>'; $row_data .= '<td>'; $from = getUser_info($allmessages[$i]->userID_from, 'fullname'); $row_data .= ' ' . $from; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= friendlyDate($allmessages[$i]->date_time); $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= friendlyDate($allmessages[$i]->date_archive); $row_data .= '</td>'; $row_data .= '</tr>'; } } // ok baby, let start compiling the page now..go! go! go! {mh} $tpl = new template_parser('../templates/message_archive_manager.tpl.php'); $tags = array('{MESSAGE_SUBJECT}' => 'Subject', '{FROM}' => 'From', '{DATE}' => 'Date', '{DATE_DELETED}' => 'Date Last Deleted', '{READ}' => 'Read', '{MESSAGE}' => $message, '{TABLE_DATA}' => $row_data, '{PAGELINK}' => $pagelink->pagelinks, '{NUMITEMS}' => ' ' . $totalrows, '{SITENAME}' => 'CMS Adminss', '{HEADER}' => ' ', '{TOPNAV}' => 'top_menu.php', '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags);
$_SESSION['articleID'] = $articleID; // PROBLEM MIGHT BE SOMETHING HERE..... /* $sql = " select * from articles a, "; $sql .= " article_author aa "; $sql .= " where aa.userID = " . intval($userID); $sql .= " and aa.articleID = " . intval($articleID) ; */ $sql = " select * from article_versions av "; $sql .= " where av.stageID=2"; // editing stage $sql .= " and av.articleID=" . $articleID; $sql .= " order by av.created ASC "; print $sql; if (!($result = $db->query($sql))) { die('Error:' . $db->error()); } $view_article_detail = array(); while ($row = $db->fetcharray()) { $view_article_detail[] = $row; } //print_r ($view_article_detail); $db->freeresult(); $category_name = getCategory_name($articleID); $article_authors = getUser_info($userID, 'fullname'); // ok baby, let start compiling the page now..go! go! go! {mh} $tpl = new template_parser('../templates/view_article_detail.tpl.php'); $tags = array('{ARTICLE_TITLE}' => $view_article_detail[0]->title, '{CATEGORY}' => $category_name, '{AUTHOR}' => $article_authors, '{DATE_CREATED}' => friendlyDate($view_article_detail[0]->created), '{ARTICLE_BODY}' => $view_article_detail[0]->article_body, '{SITENAME}' => 'CMS Adminss', '{HEADER}' => ' ', '{TOPNAV}' => 'Place the fixed button here like #. of users - online, log-out btn can also place here..', '{SIDENAV}' => 'user_menu2.php', '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display(); //print '<h1>So far you have ' . $n . ' article(s) been written :)</h1>';
$title = $my_articles[$i]->title; $row_data .= ' ' . $title; $row_data .= '</td>'; $row_data .= '<td class="blue2">'; $category_name = getCategory_name($my_articles[$i]->articleID); $row_data .= $category_name; $row_data .= '</td>'; $row_data .= '<td class="viola" >'; $category_name = getFrontpage_type($my_articles[$i]->articleID); $row_data .= ' ' . $category_name; $row_data .= '</td>'; $row_data .= '<td class="black">'; $row_data .= getArticle_authors_info($my_articles[$i]->articleID, 'fullname'); $row_data .= '</td>'; $row_data .= '<td class="brown">'; $row_data .= getUser_info($my_articles[$i]->edited_by, 'fullname'); $row_data .= '</td>'; $row_data .= '<td class="blue2">'; $row_data .= ' ' . friendlyDate2($my_articles[$i]->created); $row_data .= '</td>'; $row_data .= '<td class="black">'; $date = $my_articles[$i]->dateline ? friendlyDate2($my_articles[$i]->dateline) : '0'; $row_data .= $date; $row_data .= '</td>'; $row_data .= '<td class="green">'; $row_data .= $my_articles[$i]->status; $row_data .= '</td>'; $row_data .= '</tr">'; } } }
<?php include 'configuration.php'; require 'coreclass.php'; session_start(); // if user is not login..redirect him to login page if (!isset($_SESSION['login'])) { header('Location: login.php'); } if (isset($_SESSION['login'])) { $userID = $_SESSION['userID']; $usertype = $_SESSION['usertype']; } $fullname = getUser_info($userID, 'fullname'); $position = $usertype; $month = $_SESSION['month']; $year = $_SESSION['year']; $writer_articles_reports = $_SESSION['report_writer_articles']; for ($i = 0; $i < count($writer_articles_reports) - 1; $i++) { if ($writer_articles_reports[$i]->articleID) { $i % 2 == 0 ? $bgcolor = "" : ($bgcolor = "#F5F5F5"); $row_data .= '<tr class="tdhover" id= "tdata" bgcolor = "' . $bgcolor . '">'; $row_data .= '<td>'; $row_data .= $i + 1; $row_data .= '</td>'; $row_data .= '<td>'; $title = getArticleTitle($writer_articles_reports[$i]->articleID); $row_data .= ' ' . $title; $row_data .= '</td>'; $row_data .= '<td class="blue2">'; $category_name = getCategory_info($writer_articles_reports[$i]->categoryID, 'category_name');
if ($_POST['evaluating'] > 0) { $sql = "select * from user_stage where userID = '{$userID}' and stageID = 4 "; $db->query($sql); $db->fetcharray(); if (!$db->getnumrows() > 0) { $sql = "insert into user_stage(userID, stageID) values( '{$userID}', '4' ) "; $db->query($sql); } } else { // remove user rights $sql = "delete from user_stage where userID = '{$userID}' and stageID = 4 "; $db->query($sql); } // PUBLISHING ACCESS PERMISSION if ($_POST['publishing'] > 0) { $sql = "select * from user_stage where userID = '{$userID}' and stageID = 5 "; $db->query($sql); $db->fetcharray(); if (!$db->getnumrows() > 0) { $sql = "insert into user_stage(userID, stageID) values( '{$userID}', '5' ) "; $db->query($sql); } } else { // remove user rights $sql = "delete from user_stage where userID = '{$userID}' and stageID = 5 "; $db->query($sql); } $_SESSION['task'] = 'edit'; $_SESSION['title'] = getUser_info($userID, 'fullname'); header('location: user_access_permissions.php'); }
$sdday = $_SESSION['sdday']; $sdyear = $_SESSION['sdyear']; $edmonth = $_SESSION['edmonth']; $edday = $_SESSION['edday']; $edyear = $_SESSION['edyear']; $rpt_title .= " Audit trail report from {$sdmonth} {$sdday}, {$sdyear} to {$edmonth} {$edday}, {$edyear}. "; $all_activity = $_SESSION['all_activity']; for ($i = 0; $i < count($all_activity); $i++) { if ($all_activity[$i]->userID) { $i % 2 == 0 ? $bgcolor = "" : ($bgcolor = "#F5F5F5"); $row_data .= '<tr class="tdhover" id="tdata" bgcolor = "' . $bgcolor . '" align = "left">'; $row_data .= '<td>'; $row_data .= $i + 1; $row_data .= '</td>'; $row_data .= '<td align="left">'; $row_data .= ' ' . getUser_info($all_activity[$i]->userID, 'username'); $row_data .= '</td>'; $row_data .= '<td align="left">'; $row_data .= ' ' . $all_activity[$i]->activity; $row_data .= '</td>'; $row_data .= '<td align="left">'; $row_data .= ' ' . $all_activity[$i]->itemname; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= ' ' . niceDate($all_activity[$i]->activity_date); $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= ' ' . niceTime($all_activity[$i]->activity_date); $row_data .= '</td>'; $row_data .= '</tr>'; }
$row_data .= '</a>'; $row_data .= '</td>'; $row_data .= '<td '; $status = $other_contents[$i]->status; switch ($status) { case 'Published': $row_data .= 'class="green">'; break; case 'Unpublished': $row_data .= 'class="red">'; break; } $row_data .= ' ' . $status; $row_data .= '</td>'; $row_data .= '<td>'; $from = getUser_info($other_contents[$i]->author, 'fullname'); $row_data .= ' ' . $from; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= friendlyDate($other_contents[$i]->created); $row_data .= '</td>'; $row_data .= '<td class="black">'; $date = $other_contents[$i]->last_modified ? friendlyDate2($other_contents[$i]->last_modified) : '0'; $row_data .= ' ' . $date; $row_data .= '</td>'; $row_data .= '</tr>'; } } // ok baby, let start compiling the page now..go! go! go! {mh} $tpl = new template_parser('../templates/other_site_content.tpl.php'); $tags = array('{TITLE}' => 'Subject', '{STATUS}' => 'Status', '{CATEGORY}' => 'Category', '{SITENAME}' => 'CMS Adminss', '{DATE_CREATED}' => 'Date Created', '{LAST_MODIFIED}' => 'Last Modified', '{AUTHOR}' => 'Author', '{MESSAGE}' => $message, '{NUMITEMS}' => '' . $totalrows, '{TABLE_DATA}' => $row_data, '{PAGELINK}' => $pagelink->pagelinks, '{TOPNAV}' => 'top_menu.php', '{FOOTER}' => 'footer.php');
$row_data .= '<tr class="tdhover" id= "tdata" bgcolor = "' . $bgcolor . '">'; $row_data .= '<td>'; $row_data .= $i + 1; $row_data .= '</td>'; $row_data .= '<td class="blue">'; $row_data .= $reports[$i]->title; $row_data .= '</td>'; $row_data .= '<td class="viola">'; $category_name = getCategory_name($reports[$i]->articleID); $row_data .= $category_name; $row_data .= '</td>'; $row_data .= '<td class="brown" >'; $row_data .= getArticle_authors_info($reports[$i]->articleID, 'fullname'); $row_data .= '</td>'; $row_data .= '<td class="cyan">'; $row_data .= getUser_info($reports[$i]->edited_by, 'fullname'); $row_data .= '</td>'; $row_data .= '<td class="black">'; $row_data .= friendlyDate2($reports[$i]->created); $row_data .= '</td>'; $row_data .= '<td class="brown">'; $date = $reports[$i]->modified ? friendlyDate2($reports[$i]->modified) : '0'; $row_data .= $date; $row_data .= '</td>'; $row_data .= '<td class="green">'; $row_data .= $reports[$i]->status; $row_data .= '</td>'; $row_data .= '</tr>'; } } }
while ($user_log[] = $db->fetcharray()) { } $db->freeresult(); for ($i = 0; $i < count($user_log) - 1; $i++) { $i % 2 == 0 ? $bgcolor = "" : ($bgcolor = "#F5F5F5"); $row_data .= '<tr class="tdhover" id="tdata" bgcolor = "' . $bgcolor . '" align = "center">'; $row_data .= '<td align="left">'; $row_data .= '<a href="' . VIEW_PROFILE_URL . $user_log[$i]->userID . '">'; //$row_data .= '<input type="hidden" value = "' . $user_log[$i]->userID . '">'; $user_fullname = getUser_info($user_log[$i]->userID, 'fullname'); $row_data .= $user_fullname; $row_data .= $user_log[$i]->fullname; $row_data .= '</a>'; $row_data .= '</td>'; $row_data .= '<td>'; $username = getUser_info($user_log[$i]->userID, 'username'); $row_data .= $username; $row_data .= '</td>'; $row_data .= '<td align = "center" >'; $row_data .= '<label>'; $row_data .= $user_log[$i]->log_day; $row_data .= '</label>'; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= '<label>'; $row_data .= $user_log[$i]->log_month; $row_data .= '</label>'; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= '<label>'; $row_data .= $user_log[$i]->log_year;
$row_data .= '<td>'; $row_data .= $i + 1; $row_data .= '</td>'; $row_data .= '<td class="blue">'; $title = $newsdirector_articles_reports[$i]->title; $row_data .= ' ' . $title; $row_data .= '</td>'; $row_data .= '<td class="viola">'; $category_name = getCategory_name($newsdirector_articles_reports[$i]->articleID); $row_data .= $category_name; $row_data .= '</td>'; $row_data .= '<td class="brown" >'; $row_data .= getArticle_authors_info($newsdirector_articles_reports[$i]->articleID, 'fullname'); $row_data .= '</td>'; $row_data .= '<td class="cyan">'; $row_data .= getUser_info($newsdirector_articles_reports[$i]->edited_by, 'fullname'); $row_data .= '</td>'; $row_data .= '<td class="black">'; $row_data .= friendlyDate2($newsdirector_articles_reports[$i]->created); $row_data .= '</td>'; $row_data .= '<td class="brown">'; $date = $newsdirector_articles_reports[$i]->modified ? friendlyDate2($newsdirector_articles_reports[$i]->modified) : '0'; $row_data .= $date; $row_data .= '</td>'; $row_data .= '<td '; switch ($newsdirector_articles_reports[$i]->status) { case 'revise': $row_data .= 'class="blue">'; break; case 'rejected': $row_data .= 'class="red">';
require 'coreclass.php'; session_start(); // if user is not login..redirect him to login page if (!isset($_SESSION['login'])) { header('Location: login.php'); } if (isset($_SESSION['login'])) { $userID = $_SESSION['userID']; $usertype = $_SESSION['usertype']; } // print_r($_POST); if (isset($_POST['send'])) { $to = $_POST['to']; $subject = $_POST['subject']; $message = $_POST['message']; $date_msg_created = time(); $msg = new messages(); $result = $msg->sendMessage($_SESSION['userID'], $to, $date_msg_created, 'Unread', $subject, $message); if ($result) { $_SESSION['task'] = 'sent'; $_SESSION['title'] = $subject; $_SESSION['to'] = $to; // Log the activity $action = new activity(); $action->track_activity($userID, $action->sending_msg, 'Sending a message " ' . $_SESSION['title'] . ' " to ' . getUser_info($_SESSION['to'], 'fullname')); header('location: view_messages.php'); } } if (isset($_POST['cancel'])) { header('location: view_messages.php'); }
include 'configuration.php'; require 'coreclass.php'; session_start(); if (!isset($_SESSION['login'])) { header('Location: login.php'); } if (isset($_SESSION['login'])) { $userID = $_SESSION['userID']; $usertype = $_SESSION['usertype']; } $db = new database(); $id = $_GET['id']; $sql = " select * from other_site_content \r\n\t\twhere id = '{$id}' "; if (!($result = $db->query($sql))) { die('Error:' . $db->error()); } while ($content[] = $db->fetcharray()) { } $db->freeresult(); $category = $content[0]->category; $datecreated = friendlydate($content[0]->created); $author = getUser_info($content[0]->author, 'fullname'); // start generating page $tpl = new template_parser('../templates/preview_sitecontent.tpl.php'); $tags = array('{CATEGORY}' => $category, '{AUTHOR}' => $author, '{DATE_CREATED}' => $datecreated, '{TITLE}' => $content[0]->title, '{BODY}' => $content[0]->body); $tpl->parse_template($tags); print $tpl->display(); ?>
require 'coreclass.php'; session_start(); // if user is not login..redirect him to login page if (!isset($_SESSION['login'])) { header('Location: login.php'); } if (isset($_SESSION['login'])) { $userID = $_SESSION['userID']; $username = $_SESSION['username']; // Log the activity $action = new activity(); $action->track_activity($userID, $action->loggedin, '--'); } $x = new online_tracker(); $x->tracker(); $usertypeID = getUser_info($userID, 'usertypeID'); $position = getGroup_name($usertypeID); $message = ' Welcome ' . $username . '!'; switch ($position) { case 'Administrator': $message .= ', you logged in as ' . $position . '.'; $_SESSION['stageID'] = 6; break; case 'Writer': $x = checkUserAccessRights($userID, 2); if (!$x) { $message .= ' Sorry, the admin restrict you to act as a Writer.'; } else { $message .= ', you logged in as ' . $position . '.'; } $_SESSION['stageID'] = 1;
$row_data .= ' ' . $title; $row_data .= '</a>'; $row_data .= '</td>'; $row_data .= '<td class="blue2">'; $category_name = getCategory_name($publisher_articles_reports[$i]->articleID); $row_data .= $category_name; $row_data .= '</td>'; $row_data .= '<td>'; $category_name = getFrontpage_type($publisher_articles_reports[$i]->articleID); $row_data .= ' ' . $category_name; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= getArticle_authors_info($publisher_articles_reports[$i]->articleID, 'fullname'); $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= getUser_info($publisher_articles_reports[$i]->edited_by, 'fullname'); $row_data .= '</td>'; $row_data .= '<td class="brown">'; $row_data .= ' ' . friendlydate2($publisher_articles_reports[$i]->created); $row_data .= '</td>'; $row_data .= '<td>'; $date = $publisher_articles_reports[$i]->modified ? friendlyDate2($publisher_articles_reports[$i]->modified) : '0'; $row_data .= $date; $row_data .= '</td>'; $row_data .= '<td>'; $row_data .= $publisher_articles_reports[$i]->status; $row_data .= '</td>'; $row_data .= '</tr">'; } } $dateprepared = time();
while ($row = $db->fetcharray()) { $task_detail[] = $row; } $db->freeresult(); $_SESSION['taskID'] = $task_detail[0]->taskID; $_SESSION['subject'] = $task_detail[0]->subject; $_SESSION['description'] = $task_detail[0]->description; $_SESSION['created_t'] = $task_detail[0]->created_t; $_SESSION['startdate'] = $task_detail[0]->startdate; $_SESSION['enddate'] = $task_detail[0]->enddate; $_SESSION['priority'] = $task_detail[0]->priority; $_SESSION['status'] = $task_detail[0]->status; $_SESSION['assignedto'] = $task_detail[0]->assignedto; switch ($_SESSION['stageID']) { case 1: case 2: $set_template = "../templates/view_task_detail_writer.tpl.php"; break; case 3: $set_template = "../templates/view_task_detail.tpl.php"; break; } //print_r($_SESSION); // Log the activity $action = new activity(); $action->track_activity($userID, $action->viewing_quotes, 'Viewing the task detail of ' . $category_name); // start compiling the page.. $tpl = new template_parser($set_template); $tags = array('{SUBJECT}' => $task_detail[0]->subject, '{DESCRIPTION}' => $task_detail[0]->description, '{CREATED}' => friendlydate($task_detail[0]->created_t), '{STARTDATE}' => friendlydate($task_detail[0]->startdate), '{DUEDATE}' => friendlydate($task_detail[0]->enddate), '{STATUS}' => $task_detail[0]->status, '{PRIORITY}' => $task_detail[0]->priority, '{ASSIGNEDTO}' => getUser_info($task_detail[0]->assignedto, 'fullname'), '{SITENAME}' => 'CMS Adminss', '{HEADER}' => ' ', '{TOPNAV}' => 'top_menu.php', '{CONTENT}' => $row_data, '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();
for ($i = 0; $i < count($article_images) - 1; $i++) { foreach ($article_images as $field => $value) { if ($field == 'imageID') { $thumbnail .= '<img src="' . '" name="Image1" width="50" height="50" border="0">'; } } } } // set the default stage to be choose $stage .= '<option value="1" selected >'; $stage .= 'News draft'; $stage .= '</option>'; $stage .= '<option value="2" >'; $stage .= 'Writing'; $stage .= '</option>'; if ($_SESSION['dateline']) { // Get from the session date $date = friendlyDate($_SESSION['dateline']); } else { // Get the current date/time $date = date("F d, Y h:i:s A"); } // Get the authors name of the articles.. $author_name2 = getUser_info($userID, 'fullname'); //print_r($_SESSION); $article_title = $_SESSION['article_title']; // ok baby, let start compiling the page now..go! go! go! {mh} $tpl = new template_parser('../templates/add_article2.tpl.php'); $tags = array('{TITLE}' => $article_title, '{BODY}' => $article_body, '{DATE_CREATED}' => $date, '{MESSAGE}' => $message, '{AUTHOR}' => $author_name2, '{CATEGORY_NAMES}' => $category_names, '{TASKS}' => $tasklist, '{UPLOADED_IMAGES}' => $uploaded_imgs, '{STAGE}' => $stage, '{THUMBNAIL}' => $thumbnail, '{SITENAME}' => 'CMS Adminss', '{HEADER}' => ' ', '{TOPNAV}' => '../admin/top_menu.php', '{BREADCRUMB}' => $url, '{FOOTER}' => 'footer.php'); $tpl->parse_template($tags); print $tpl->display();
$usertype = $_SESSION['usertype']; } $articleID = $_SESSION['articleID']; $title = $_SESSION['title']; $article_body = $_SESSION['article_body']; $created = $_SESSION['created']; $dateline = $_SESSION['dateline']; if (isset($_SESSION['edited_by']) && $_SESSION['edited_by']) { $editorID = $_SESSION['edited_by']; } else { $editorID = $userID; } // Get the writers name of the article $writer_name = getArticle_authors_info($articleID, 'fullname'); // Get the editor's name of the article $editor_name = getUser_info($editorID, 'fullname'); // Get the category name of this article $category_name = getCategory_name($articleID); if (isset($_GET['status'])) { switch ($_GET['status']) { case 'reject': $msg = " The article was rejected by the News Director. "; $subject = "REJECTED " . $title; $_SESSION['status'] = 'Reject'; break; case 'approve': $msg = " The article was approved by the News Director. "; $subject = "APPROVED " . $title; $_SESSION['status'] = 'Approve'; break; case 'revise':