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