本文整理汇总了PHP中Messages::msgSeen方法的典型用法代码示例。如果您正苦于以下问题:PHP Messages::msgSeen方法的具体用法?PHP Messages::msgSeen怎么用?PHP Messages::msgSeen使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Messages
的用法示例。
在下文中一共展示了Messages::msgSeen方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sanitize_id
if (!$session->is_logged_in()) {
Redirect::redirectTo("/signup.php");
}
if (!isset($_GET['msg'])) {
Redirect::redirectTo("../messages");
}
$msgid = sanitize_id($_GET['msg']);
$message = Messages::getMsg($msgid);
if (!$message) {
Redirect::redirectTo('');
}
$pageTitle = "Messages";
if (!$message) {
$session->message("Message was not found", "../messages", "warning");
}
Messages::msgSeen(USER_ID, $msgid);
$self = USER_ID == $message->u_id ? true : false;
$arch = $message->deleted == 1 ? true : false;
$staff = $message->ual == 1 ? true : false;
$img_path = $message->img_path;
$date = $message->date;
$sec = "messages";
include ROOT_PATH . "inc/head.php";
?>
<div class="ui container section messages">
<?php
echo msgs();
?>
<?php
if ($self) {
示例2: foreach
</h3>
<?php
}
?>
<?php
if (empty($messages)) {
echo "There are no messages between you and " . $user->full_name . " yet.<br><br>";
echo "<a class=\"btn btn-success\" href=\"compose.php?to={$user_id}\">Compose a new message</a>";
}
foreach ($messages as $message) {
$sender = new User($message->sender_id);
$sender = $sender->user;
$sstaf = $sender->id == 1 ? true : false;
$self = USER_ID == $sender->id ? true : false;
if (!$self) {
Messages::msgSeen($message->user_id, $message->id);
}
$img_path = $sender->img_path;
$date = displayDate($message->date);
$timeAgo = get_timeAgo($message->date);
$subject = ctrim($message->subject, 120, true);
?>
<div class="message message-row ui">
<div class="message-image">
<?php
if ($sstaf) {
?>
<img class="ui tiny image" src="<?php
echo $img_path;
?>
">