コード例 #1
0
ファイル: view_as_tabs.php プロジェクト: rair/yacs
 if ($items = Sections::list_editors_by_name($item, 0, 1000, 'watch')) {
     foreach ($items as $user_id => $user_label) {
         $owner_state = '';
         if ($user_id == $item['owner_id']) {
             $owner_state = CHECKED_IMG;
         }
         $editor_state = CHECKED_IMG;
         $watcher_state = '';
         if (Members::check($anchors, 'user:'******'watch')) {
     foreach ($items as $user_id => $user_label) {
         // this is a true participant to the item
         $users_count += 1;
         // add the checkmark to existing row
         if (isset($rows[$user_id])) {
             $rows[$user_id][1] = CHECKED_IMG;
         } else {
             $owner = '';
             if ($user_id == $item['owner_id']) {
                 $owner = CHECKED_IMG;
             }
             $editor = '';
             $watcher = CHECKED_IMG;
             $rows[$user_id] = array($user_label, $watcher, $editor, $owner);
         }
コード例 #2
0
ファイル: view.php プロジェクト: rair/yacs
 // expired section
 if (Surfer::is_empowered() && Surfer::is_logged() && $item['expiry_date'] > NULL_DATE && $item['expiry_date'] <= $context['now']) {
     $details[] = EXPIRED_FLAG . ' ' . sprintf(i18n::s('Section has expired %s'), Skin::build_date($item['expiry_date']));
 }
 // provide more details to authenticated surfers
 if (Surfer::is_logged()) {
     // section owner
     if (isset($item['owner_id']) && ($owner = Users::get($item['owner_id']))) {
         $details[] = sprintf(i18n::s('%s: %s'), i18n::s('Owner'), Users::get_link($owner['full_name'], $owner['email'], $owner['id']));
     }
     // section editors
     if ($items = Sections::list_editors_by_name($item, 0, 7, 'comma5')) {
         $details[] = sprintf(i18n::s('%s: %s'), Skin::build_link(Users::get_url('section:' . $item['id'], 'select'), i18n::s('Editors')), $items);
     }
     // section watchers
     if ($items = Sections::list_watchers_by_posts($item, 0, 7, 'comma5')) {
         $details[] = sprintf(i18n::s('%s: %s'), Skin::build_link(Users::get_url('section:' . $item['id'], 'watch'), i18n::s('Watchers')), $items);
     }
 }
 // display details, if any
 if (count($details)) {
     $text .= ucfirst(implode(BR . "\n", $details)) . BR . "\n";
 }
 // additional details for associates and editors
 if (Surfer::is_empowered()) {
     // other details
     $details =& Sections::build_dates($anchor, $item);
     // the number of hits
     if ($item['hits'] > 1) {
         $details[] = Skin::build_number($item['hits'], i18n::s('hits'));
     }