本文整理匯總了PHP中lms_steam::is_reader方法的典型用法代碼示例。如果您正苦於以下問題:PHP lms_steam::is_reader方法的具體用法?PHP lms_steam::is_reader怎麽用?PHP lms_steam::is_reader使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類lms_steam
的用法示例。
在下文中一共展示了lms_steam::is_reader方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: user_count_unread_mails
public static function user_count_unread_mails($login)
{
$user = steam_factory::username_to_object($GLOBALS["STEAM"]->get_id(), $login);
$mails = $user->get_mails();
$unread = 0;
$tnr = array();
$i = 0;
foreach ($mails as $mail) {
$tnr[$i] = lms_steam::is_reader($mail, $user, TRUE);
$i++;
}
$result = $GLOBALS["STEAM"]->buffer_flush();
$i = 0;
foreach ($mails as $mail) {
if (!$result[$tnr[$i]]) {
$unread++;
}
$i++;
}
return $unread;
}
示例2: gettext
}
$content->setCurrentBlock("BLOCK_MESSAGES_AVAILABLE");
$content->setVariable("CONFIRMATION_MESSAGE", gettext("Are you sure you want delete this?"));
$content->setVariable("SUBJECT", gettext("Subject"));
$content->setVariable("SELECT_ALL", gettext("Select all"));
$content->setVariable("DELETE", gettext("Delete"));
$attributequery = array(OBJ_NAME, OBJ_CREATION_TIME);
if ($is_sent) {
$attributequery[] = "mailto";
}
// Query the receivers too
$data_tnr = array();
for ($i = $start; $i < $end; $i++) {
$data_tnr[$i] = array();
$message = $messages[$i];
$data_tnr[$i]["IS_READ"] = lms_steam::is_reader($message, $user, TRUE);
$data_tnr[$i]["CREATOR"] = $message->get_creator(TRUE);
$data_tnr[$i]["ATTRIBUTES"] = $message->get_attributes($attributequery, TRUE);
}
$data_result = $GLOBALS["STEAM"]->buffer_flush();
$message_sender_html = array();
if (!$is_sent) {
$sender_tnr = array();
for ($i = $start; $i < $end; $i++) {
$sender_tnr[$i] = $data_result[$data_tnr[$i]["CREATOR"]]->get_attributes(array(OBJ_NAME, OBJ_ICON, USER_FIRSTNAME, USER_FULLNAME), TRUE);
}
$sender_result = $GLOBALS["STEAM"]->buffer_flush();
for ($i = $start; $i < $end; $i++) {
$message = $messages[$i];
$message_unread = !$data_result[$data_tnr[$i]["IS_READ"]];
$unread_start = $message_unread ? "<strong>" : "";