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


PHP Sections::allow_message方法代碼示例

本文整理匯總了PHP中Sections::allow_message方法的典型用法代碼示例。如果您正苦於以下問題:PHP Sections::allow_message方法的具體用法?PHP Sections::allow_message怎麽用?PHP Sections::allow_message使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Sections的用法示例。


在下文中一共展示了Sections::allow_message方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

 // count
 if ($users_count) {
     $box['bar'] += array('_count' => sprintf(i18n::ns('%d participant', '%d participants', $users_count), $users_count));
 }
 // add to the watch list -- $in_watch_list is set in sections/view.php
 if (Surfer::get_id() && $in_watch_list == 'N') {
     Skin::define_img('TOOLS_WATCH_IMG', 'tools/watch.gif');
     $box['bar'] += array(Users::get_url('section:' . $item['id'], 'track') => TOOLS_WATCH_IMG . i18n::s('Watch this section'));
 }
 // invite participants, for owners
 if (Sections::is_owned($item, $anchor, TRUE) && isset($context['with_email']) && $context['with_email'] == 'Y') {
     Skin::define_img('SECTIONS_INVITE_IMG', 'sections/invite.gif');
     $box['bar'] += array(Sections::get_url($item['id'], 'invite') => SECTIONS_INVITE_IMG . i18n::s('Invite participants'));
 }
 // notify participants
 if ($count > 1 && Sections::allow_message($item, $anchor) && isset($context['with_email']) && $context['with_email'] == 'Y') {
     Skin::define_img('SECTIONS_EMAIL_IMG', 'sections/email.gif');
     $box['bar'] += array(Sections::get_url($item['id'], 'mail') => SECTIONS_EMAIL_IMG . i18n::s('Notify participants'));
 }
 // manage editors, for owners
 if (Sections::is_owned($item, $anchor, TRUE) || Surfer::is_associate()) {
     Skin::define_img('SECTIONS_ASSIGN_IMG', 'sections/assign.gif');
     $box['bar'] += array(Users::get_url('section:' . $item['id'], 'select') => SECTIONS_ASSIGN_IMG . i18n::s('Manage participants'));
     // leave this section, for editors
 } elseif (Sections::is_assigned($item['id'])) {
     Skin::define_img('SECTIONS_ASSIGN_IMG', 'sections/assign.gif');
     $box['bar'] += array(Users::get_url('section:' . $item['id'], 'leave') => SECTIONS_ASSIGN_IMG . i18n::s('Leave this section'));
 }
 // headers
 $headers = array(i18n::s('Person'), i18n::s('Watcher'), i18n::s('Editor'), i18n::s('Owner'));
 // layout columns
開發者ID:rair,項目名稱:yacs,代碼行數:31,代碼來源:view_as_tabs.php

示例2: strip_tags

    $id = $context['arguments'][0];
}
$id = strip_tags($id);
// get the item from the database
$item = Sections::get($id);
// get the related anchor, if any
$anchor = NULL;
if (isset($item['anchor'])) {
    $anchor = Anchors::get($item['anchor']);
}
$overlay = NULL;
if (isset($item['overlay'])) {
    $overlay = Overlay::load($item, 'section:' . $item['id']);
}
// check surfer capability
if (Sections::allow_message($item, $anchor)) {
    $permitted = TRUE;
} else {
    $permitted = FALSE;
}
// load the skin, maybe with a variant
load_skin('sections', $anchor, isset($item['options']) ? $item['options'] : '');
// clear the tab we are in, if any
if (is_object($anchor)) {
    $context['current_focus'] = $anchor->get_focus();
}
// path to this page
if (is_object($anchor)) {
    $context['path_bar'] = $anchor->get_path_bar();
} else {
    $context['path_bar'] = array('sections/' => i18n::s('Site map'));
開發者ID:rair,項目名稱:yacs,代碼行數:31,代碼來源:mail.php


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