當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Messages::msgSeen方法代碼示例

本文整理匯總了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) {
開發者ID:khaledkhalil94,項目名稱:SH.A,代碼行數:31,代碼來源:message.php

示例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;
        ?>
">
開發者ID:khaledkhalil94,項目名稱:SH.A,代碼行數:31,代碼來源:convo.php


注:本文中的Messages::msgSeen方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。