本文整理汇总了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();