本文整理匯總了PHP中messages::set_readmessage方法的典型用法代碼示例。如果您正苦於以下問題:PHP messages::set_readmessage方法的具體用法?PHP messages::set_readmessage怎麽用?PHP messages::set_readmessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類messages
的用法示例。
在下文中一共展示了messages::set_readmessage方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
<?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();