• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getDateInLang函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getDateInLang函数的典型用法代码示例。如果您正苦于以下问题:PHP getDateInLang函数的具体用法?PHP getDateInLang怎么用?PHP getDateInLang使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getDateInLang函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getForwardInformation

 private function getForwardInformation($ids)
 {
     $return = array();
     $converter = $this->_environment->getTextConverter();
     if (empty($ids) and isset($this->_item)) {
         $ids = array();
         $ids[] = $this->_item->getItemID();
     }
     // determe item positions for forward box
     $count = 0;
     $pos = 0;
     foreach ($ids as $id) {
         if (isset($this->_item) and $id == $this->_item->getItemID()) {
             $pos = $count;
         } else {
             $count++;
         }
     }
     $start = $pos - 4;
     $end = $pos + 4;
     if ($start < 0) {
         $end -= $start;
     }
     if ($end > count($ids)) {
         $end = count($ids);
         $start = $end - 9;
         if ($start < 0) {
             $start = 0;
         }
     }
     // get information
     $listed_ids = array();
     $count_items = 0;
     $i = 1;
     foreach ($ids as $id) {
         if ($count_items >= $start && $count_items <= $end) {
             $item_manager = $this->_environment->getItemManager();
             $tmp_item = $item_manager->getItem($id);
             //$text = '';
             if (isset($tmp_item)) {
                 $manager = $this->_environment->getManager($tmp_item->getItemType());
                 $item = $manager->getItem($ids[$count_items]);
                 $type = $tmp_item->getItemType();
                 if ($type == 'label') {
                     $label_manager = $this->_environment->getLabelManager();
                     $label_item = $label_manager->getItem($tmp_item->getItemID());
                     $type = $label_item->getLabelType();
                 }
             }
             $link_title = '';
             if (isset($item) && is_object($item) && $item->isA(CS_USER_TYPE)) {
                 $link_title = $item->getFullName();
             } elseif (isset($item) && is_object($item)) {
                 $link_title = $item->getTitle();
             }
             $params = $this->_environment->getCurrentParameterArray();
             unset($params['iid']);
             // append to return
             $activating_text = '';
             $current_user_item = $this->_environment->getCurrentUserItem();
             if (isset($item) && $item->isNotActivated() && !($item->getCreatorID() === $current_user_item->getItemID()) && !$current_user_item->isModerator()) {
                 $activating_date = $item->getActivatingDate();
                 if (strstr($activating_date, '9999-00-00')) {
                     $activating_text = $this->_environment->getTranslationObject()->getMessage('COMMON_NOT_ACTIVATED');
                 } else {
                     $activating_text = $this->_environment->getTranslationObject()->getMessage('COMMON_ACTIVATING_DATE') . ' ' . getDateInLang($item->getActivatingDate());
                 }
             }
             if (isset($item)) {
                 $return[] = array('title' => $link_title, 'is_current' => $item->getItemID() == $this->_item->getItemID(), 'item_id' => $item->getItemID(), 'type' => $type, 'params' => $params, 'position' => $count_items + 1, 'activating_text' => $activating_text);
                 unset($item);
             }
         }
         $count_items++;
     }
     return $return;
 }
开发者ID:a2call,项目名称:commsy,代码行数:77,代码来源:cs_detail_controller.php


示例2: getNetnavigation

 public function getNetnavigation($item)
 {
     $return = array();
     if (isset($item)) {
         $current_context = $this->_environment->getCurrentContextItem();
         $current_user = $this->_environment->getCurrentUser();
         $translator = $this->_environment->getTranslationObject();
         $converter = $this->_environment->getTextConverter();
         $link_items = $item->getAllLinkItemList();
         // remove items from list the current user is not allowed to see or ???
         $count_item = $link_items->getFirst();
         while ($count_item) {
             $linked_item = $count_item->getLinkedItem($item);
             if (isset($linked_item)) {
                 $type = $linked_item->getType();
             }
             // 					$module = Type2Module($type);
             // 					if($module === CS_USER_TYPE && ($item->getItemType()== CS_GROUP_TYPE || (!$linked_item->isUser() || !$linked_item->maySee($current_user)))) {
             // 						$link_items->removeElement($count_item);
             // 					}
             $count_item = $link_items->getNext();
         }
         $count_link_item = $link_items->getCount();
         $return['count'] = $count_link_item;
         /*
          *
         $this->_right_box_config['title_string'] .= $separator.'"'.$this->_translator->getMessage('COMMON_NETNAVIGATION_ENTRIES').' ('.$count_link_item.')"';
         $this->_right_box_config['desc_string'] .= $separator.'""';
         $this->_right_box_config['size_string'] .= $separator.'"10"';
         	
         if($current_context->isNetnavigationShowExpanded()){
         $this->_right_box_config['config_string'] .= $separator.'true';
         } else {
         $this->_right_box_config['config_string'] .= $separator.'false';
         }
         $html .= '<div class="commsy_panel" style="margin-bottom:1px;">'.LF;
         $html .= '<div class="right_box">'.LF;
         */
         $return['items'] = array();
         if (!$link_items->isEmpty()) {
             $link_item = $link_items->getFirst();
             while ($link_item) {
                 $entry = array('creator' => '');
                 $link_creator = $link_item->getCreatorItem();
                 if (isset($link_creator) && !$link_creator->isDeleted()) {
                     $entry['creator'] = $link_creator->getFullname();
                     // create the list entry
                     $linked_item = $link_item->getLinkedItem($item);
                     if (isset($linked_item)) {
                         $type = $linked_item->getType();
                         if ($type === 'label') {
                             $type = $linked_item->getLabelType();
                         }
                         $link_created = $translator->getDateInLang($link_item->getCreationDate());
                         switch (mb_strtoupper($type, 'UTF-8')) {
                             case 'ANNOUNCEMENT':
                                 $text = $translator->getMessage('COMMON_ONE_ANNOUNCEMENT');
                                 $img = 'announcement.png';
                                 break;
                             case 'DATE':
                                 $text = $translator->getMessage('COMMON_ONE_DATE');
                                 $img = 'date.png';
                                 break;
                             case 'DISCUSSION':
                                 $text = $translator->getMessage('COMMON_ONE_DISCUSSION');
                                 $img = 'discussion.png';
                                 break;
                             case 'GROUP':
                                 $text = $translator->getMessage('COMMON_ONE_GROUP');
                                 $img = 'group.png';
                                 break;
                             case 'INSTITUTION':
                                 $text = $translator->getMessage('COMMON_ONE_INSTITUTION');
                                 $img = '';
                                 break;
                             case 'MATERIAL':
                                 $text = $translator->getMessage('COMMON_ONE_MATERIAL');
                                 $img = 'material.png';
                                 break;
                             case 'PROJECT':
                                 $text = $translator->getMessage('COMMON_ONE_PROJECT');
                                 $img = '';
                                 break;
                             case 'TODO':
                                 $text = $translator->getMessage('COMMON_ONE_TODO');
                                 $img = 'todo.png';
                                 break;
                             case 'TOPIC':
                                 $text = $translator->getMessage('COMMON_ONE_TOPIC');
                                 $img = 'topic.png';
                                 break;
                             case 'USER':
                                 $text = $translator->getMessage('COMMON_ONE_USER');
                                 $img = 'user.png';
                                 break;
                             default:
                                 $text = $translator->getMessage('COMMON_MESSAGETAB_ERROR');
                                 $img = '';
                                 break;
                         }
//.........这里部分代码省略.........
开发者ID:a2call,项目名称:commsy,代码行数:101,代码来源:cs_utils_controller.php


示例3: _prepareValues

 /** loads the selected and given values to the form
  * this methods loads the selected and given values to the form from the material item or the form_post data
  */
 function _prepareValues()
 {
     $current_context = $this->_environment->getCurrentContextItem();
     if (isset($this->_form_post)) {
         $this->_values = $this->_form_post;
         $tmp_array = array();
         if (isset($this->_form_post['dayStart'])) {
             $tmp_array['dayStart'] = $this->_form_post['dayStart'];
         } else {
             $tmp_array['dayStart'] = '';
         }
         if (isset($this->_form_post['timeStart'])) {
             $tmp_array['timeStart'] = $this->_form_post['timeStart'];
         } else {
             $tmp_array['timeStart'] = '';
         }
         $this->_values['start_date_time'] = $tmp_array;
         if ($current_context->withWorkflow()) {
             $this->_values['workflow_traffic_light'] = $this->_form_post['workflow_traffic_light'];
             $this->_values['workflow_resubmission_date'] = array('workflow_resubmission_date' => $this->_form_post['workflow_resubmission_date']);
             $this->_values['workflow_resubmission_who'] = $this->_form_post['workflow_resubmission_who'];
             $this->_values['workflow_resubmission_who_additional'] = $this->_form_post['workflow_resubmission_who_additional'];
             $this->_values['workflow_resubmission_traffic_light'] = $this->_form_post['workflow_resubmission_traffic_light'];
             $this->_values['workflow_validity_date'] = array('workflow_validity_date' => $this->_form_post['workflow_validity_date']);
             $this->_values['workflow_validity_who'] = $this->_form_post['workflow_validity_who'];
             $this->_values['workflow_validity_who_additional'] = $this->_form_post['workflow_validity_who_additional'];
             $this->_values['workflow_validity_traffic_light'] = $this->_form_post['workflow_validity_traffic_light'];
         }
     } elseif (isset($this->_item)) {
         $this->_values['modification_date'] = $this->_item->getModificationDate();
         $this->_values['iid'] = $this->_item->getItemID();
         $this->_values['vid'] = $this->_item->getVersionID();
         $this->_values['publishing_date'] = $this->_item->getPublishingDate();
         $this->_values['title'] = $this->_item->getTitle();
         $this->_values['description'] = $this->_item->getDescription();
         $this->_values['external_viewer'] = $this->_item->issetExternalViewerStatus();
         $this->_values['external_viewer_accounts'] = $this->_item->getExternalViewerString();
         // file
         $file_array = array();
         $file_list = $this->_item->getFileList();
         if ($file_list->getCount() > 0) {
             $file_item = $file_list->getFirst();
             while ($file_item) {
                 $file_array[] = $file_item->getFileID();
                 $file_item = $file_list->getNext();
             }
         }
         if (isset($this->_form_post['filelist'])) {
             $this->_values['filelist'] = $this->_form_post['filelist'];
         } else {
             $this->_values['filelist'] = $file_array;
         }
         if ($current_context->withActivatingContent()) {
             if ($this->_item->isPrivateEditing()) {
                 $this->_values['private_editing'] = 1;
             } else {
                 $this->_values['private_editing'] = $this->_item->isPrivateEditing();
             }
         } else {
             $this->_values['public'] = $this->_item->isPublic();
         }
         if ($current_context->withWorkflow()) {
             $this->_values['workflow_traffic_light'] = $this->_item->getWorkflowTrafficLight();
             $this->_values['workflow_resubmission'] = $this->_item->getWorkflowResubmission();
             if ($this->_item->getWorkflowResubmissionDate() != '' and $this->_item->getWorkflowResubmissionDate() != '0000-00-00 00:00:00') {
                 $this->_values['workflow_resubmission_date']['workflow_resubmission_date'] = getDateInLang($this->_item->getWorkflowResubmissionDate());
             } else {
                 $this->_values['workflow_resubmission_date']['workflow_resubmission_date'] = '';
             }
             $this->_values['workflow_resubmission_who'] = $this->_item->getWorkflowResubmissionWho();
             $this->_values['workflow_resubmission_who_additional'] = $this->_item->getWorkflowResubmissionWhoAdditional();
             $this->_values['workflow_resubmission_traffic_light'] = $this->_item->getWorkflowResubmissionTrafficLight();
             $this->_values['workflow_validity'] = $this->_item->getWorkflowValidity();
             if ($this->_item->getWorkflowValidityDate() != '' and $this->_item->getWorkflowValidityDate() != '0000-00-00 00:00:00') {
                 $this->_values['workflow_validity_date']['workflow_validity_date'] = getDateInLang($this->_item->getWorkflowValidityDate());
             } else {
                 $this->_values['workflow_validity_date']['workflow_validity_date'] = '';
             }
             $this->_values['workflow_validity_who'] = $this->_item->getWorkflowValidityWho();
             $this->_values['workflow_validity_who_additional'] = $this->_item->getWorkflowValidityWhoAdditional();
             $this->_values['workflow_validity_traffic_light'] = $this->_item->getWorkflowValidityTrafficLight();
         }
         // rubric connections
         $this->_setValuesForRubricConnections();
         $this->_values['author'] = $this->_item->getAuthor();
         // no encode here - encode in form-views
         $this->_values['bib_kind'] = $this->_item->getBibKind();
         $this->_values['publisher'] = $this->_item->getPublisher();
         $this->_values['address'] = $this->_item->getAddress();
         $this->_values['edition'] = $this->_item->getEdition();
         $this->_values['series'] = $this->_item->getSeries();
         $this->_values['volume'] = $this->_item->getVolume();
         $this->_values['isbn'] = $this->_item->getISBN();
         $this->_values['issn'] = $this->_item->getISSN();
         $this->_values['editor'] = $this->_item->getEditor();
         $this->_values['booktitle'] = $this->_item->getBooktitle();
         $this->_values['pages'] = $this->_item->getPages();
//.........这里部分代码省略.........
开发者ID:a2call,项目名称:commsy,代码行数:101,代码来源:cs_material_form.php


示例4: _getItemAsHTML

 /** get the item of the list view as HTML
  * this method returns the single item in HTML-Code
  *
  * overwritten method form the upper class
  *
  * @return string item as HMTL
  */
 function _getItemAsHTML($item, $pos = 0, $with_links = TRUE)
 {
     $html = '';
     $shown_entry_number = $pos;
     $shown_entry_number = $pos + $this->_count_headlines;
     if ($shown_entry_number % 2 == 0) {
         $style = 'class="odd"';
     } else {
         $style = 'class="even"';
     }
     if ($this->_clipboard_mode) {
         $sort_criteria = $item->getContextID();
         if ($sort_criteria != $this->_last_sort_criteria) {
             $this->_last_sort_criteria = $sort_criteria;
             $this->_count_headlines++;
             $room_manager = $this->_environment->getProjectManager();
             $sort_room = $room_manager->getItem($sort_criteria);
             $html .= '                     <tr class="list"><td ' . $style . ' width="100%" style="font-weight:bold;" colspan="6">' . LF;
             if (empty($sort_room)) {
                 $community_manager = $this->_environment->getCommunityManager();
                 $sort_community = $community_manager->getItem($sort_criteria);
                 $html .= '                        ' . $this->_translator->getMessage('COPY_FROM') . '&nbsp;' . $this->_translator->getMessage('COMMON_COMMUNITY_ROOM_TITLE') . '&nbsp;"' . $sort_community->getTitle() . '"' . "\n";
             } elseif ($sort_room->isPrivateRoom()) {
                 $user = $this->_environment->getCurrentUserItem();
                 $html .= '                        ' . $this->_translator->getMessage('COPY_FROM_PRIVATEROOM') . '&nbsp;"' . $user->getFullname() . '"' . "\n";
             } elseif ($sort_room->isGroupRoom()) {
                 $html .= '                        ' . $this->_translator->getMessage('COPY_FROM_GROUPROOM') . '&nbsp;"' . $sort_room->getTitle() . '"' . LF;
             } else {
                 $html .= '                        ' . $this->_translator->getMessage('COPY_FROM_PROJECTROOM') . '&nbsp;"' . $sort_room->getTitle() . '"' . "\n";
             }
             $html .= '                     </td></tr>' . "\n";
             if ($style == 'class="odd"') {
                 $style = 'class="even"';
             } else {
                 $style = 'class="odd"';
             }
         }
     }
     $html .= '   <tr class="list">' . LF;
     $checked_ids = $this->getCheckedIDs();
     $dontedit_ids = $this->getDontEditIDs();
     $key = $item->getItemID();
     $fileicons = $this->_getItemFiles($item, $with_links);
     if (!empty($fileicons)) {
         $fileicons = ' ' . $fileicons;
     }
     if (!(isset($_GET['mode']) and $_GET['mode'] == 'print') or !empty($download) and $download == 'zip') {
         $html .= '      <td ' . $style . ' style="vertical-align:middle;" width="2%">' . LF;
         if (empty($download) or $download != 'zip') {
             $html .= '         <input style="color:blue; font-size:8pt; padding-left:0px; padding-right:0px; margin-left:0px; margin-right:0px;" type="checkbox" onClick="quark(this)" name="attach[' . $key . ']" value="1"';
             $user = $this->_environment->getCurrentUser();
             if ($item->isNotActivated() and !($item->getCreatorID() == $user->getItemID() or $user->isModerator())) {
                 $html .= ' disabled="disabled"' . LF;
             } elseif (isset($checked_ids) and !empty($checked_ids) and in_array($key, $checked_ids)) {
                 $html .= ' checked="checked"' . LF;
                 if (in_array($key, $dontedit_ids)) {
                     $html .= ' disabled="disabled"' . LF;
                 }
             }
             $html .= '/>' . LF;
             $html .= '         <input type="hidden" name="shown[' . $this->_text_as_form($key) . ']" value="1"/>' . LF;
         }
         $html .= '      </td>' . LF;
         if ($item->isNotActivated()) {
             $title = $item->getTitle();
             $title = $this->_compareWithSearchText($title);
             $user = $this->_environment->getCurrentUser();
             if ($item->getCreatorID() == $user->getItemID() or $user->isModerator()) {
                 $params = array();
                 $params['iid'] = $item->getItemID();
                 $title = ahref_curl($this->_environment->getCurrentContextID(), CS_DATE_TYPE, 'detail', $params, $title, '', '', '', '', '', '', '', '', CS_DATE_TYPE . $item->getItemID());
                 unset($params);
             }
             $activating_date = $item->getActivatingDate();
             if (strstr($activating_date, '9999-00-00')) {
                 $title .= BR . $this->_translator->getMessage('COMMON_NOT_ACTIVATED');
             } else {
                 $title .= BR . $this->_translator->getMessage('COMMON_ACTIVATING_DATE') . ' ' . getDateInLang($item->getActivatingDate());
             }
             $title = '<span class="disabled">' . $title . '</span>';
             $html .= '      <td ' . $style . '>' . $title . LF;
         } else {
             if ($with_links) {
                 $html .= '      <td ' . $style . '>' . $this->_getItemTitle($item) . $fileicons . LF;
             } else {
                 $title = $this->_text_as_html_short($item->getTitle());
                 $html .= '      <td ' . $style . '>' . $title . LF;
             }
         }
     } else {
         $html .= '      <td colspan="2" ' . $style . ' style="font-size:10pt;">' . $this->_getItemTitle($item) . $fileicons . '</td>' . LF;
     }
     $html .= '      <td ' . $style . ' style="font-size:8pt;">' . $this->_getItemDate($item);
//.........这里部分代码省略.........
开发者ID:a2call,项目名称:commsy,代码行数:101,代码来源:cs_date_index_view.php


示例5: _getTodosListAsHTML

 function _getTodosListAsHTML($todo_list, $number_of_portlets)
 {
     $html = '';
     #$html .= '</div>'.LF;
     #$html .= '</div>'.LF;
     $html .= '<div class="portlet" style="width:200px;">' . LF;
     $html .= '<div id="mycalendar_todo_portlet" class="portlet-header">';
     $html .= $this->_translator->getMessage('TODO_INDEX');
     $html .= '<div style="float:right;"><a name="mycalendar_remove" style="cursor:pointer;"><img src="images/commsyicons/16x16/delete.png" /></a></div>';
     $html .= '</div>' . LF;
     $html .= '<div class="portlet-content">' . LF;
     $width = '';
     #$current_browser = mb_strtolower($this->_environment->getCurrentBrowser(), 'UTF-8');
     #$current_browser_version = $this->_environment->getCurrentBrowserVersion();
     #if ( $current_browser == 'msie' and (strstr($current_browser_version,'5.') or (strstr($current_browser_version,'6.'))) ){
     #   $width = 'width:170px;';
     #} else {
     #   $width = 'width:170px;';
     #}
     #if ( isset($parameter_array['show_todo_selections'])
     #     and $parameter_array['show_todo_selections'] == 'true'
     #   ) {
     #   if ( $current_browser == 'msie' and (strstr($current_browser_version,'5.') or (strstr($current_browser_version,'6.'))) ){
     #      $width = 'width:170px;'; // TBD
     #   } else {
     #      $width = 'width:190px;';
     #   }
     #   if ($this->_presentation_mode == '2'){
     #      $html .= '<div class="" style="'.$width.' height:393px; overflow-y:auto;">'.LF;
     #   }else{
     #      $html .= '<div class="" style="'.$width.' height:273px; overflow-y:auto;">'.LF;
     #   }
     #   $html .= $this->_getAdditionalFormFieldsForPrivateRoomAsHTML(CS_TODO_TYPE);
     #   $html .= '</div>'.LF;
     #}else{
     #if ($this->_presentation_mode == '2'){
     #   $html .= '<div class="" style="'.$width.' height:398px; overflow-y:auto; padding:0px;">'.LF;
     #}else{
     #   $html .= '<div class="" style="'.$width.' height:278px; overflow-y:auto; padding:0px;">'.LF;
     #}
     $height = '300px';
     if ($number_of_portlets == 1) {
         $height = '614px';
     } elseif ($number_of_portlets == 2) {
         $height = '369px';
     } elseif ($number_of_portlets == 3) {
         $height = '200px';
     }
     $html .= '<div class="" style="height:' . $height . '; overflow-y:auto; padding:0px;">' . LF;
     // show selections
     $html .= $this->_getTodoSelectionsAsHTML();
     if (isset($todo_list) and !$todo_list->isEmpty()) {
         $todo_array_for_jQuery = array();
         $todo_tooltip_array = array();
         $todo_item = $todo_list->getFirst();
         $i = 1;
         while ($todo_item) {
             if ($i % 2 == 0) {
                 $color = '#DFDFDF';
             } else {
                 $color = '#FFFFFF';
             }
             $html .= '<div style="background-color:' . $color . '; width:100%; overflow-x:hidden; white-space:nowrap;">';
             $html .= '<div style="padding:2px 3px;" id="todo_tooltip_' . $todo_item->getItemID() . '" data-tooltip="todo_tooltip_' . $todo_item->getItemID() . '">' . LF;
             $params = array();
             $params['iid'] = $todo_item->getItemID();
             $original_date = $todo_item->getDate();
             $date = getDateInLang($original_date);
             $actual_date = date("Y-m-d H:i:s");
             if ($original_date < $actual_date) {
                 $style = 'class="required" style="font-weight:normal;"';
                 $color_link = 'red';
             } else {
                 $style = 'style="color:#05860F;"';
                 $color_link = '#05860F';
             }
             $link = ahref_curl($todo_item->getContextID(), CS_TODO_TYPE, 'detail', $params, $this->_text_as_html_short($todo_item->getTitle()), '', '', '', '', '', '', $style) . LF;
             $html .= $link;
             $html .= '</div></div>';
             // tooltip
             $todo_tooltip = array();
             $todo_tooltip['iid'] = $todo_item->getItemID();
             $todo_tooltip['title'] = $todo_item->getTitle();
             $todo_tooltip['participants'] = $todo_item->getProcessorItemList();
             $original_date = $todo_item->getDate();
             $date = getDateTimeInLang($original_date);
             if ($date != '00.00.0000, 00:00 Uhr' and $date != '00.00.9999, 00:00 Uhr') {
                 $todo_tooltip['date'] = $date;
             } else {
                 $todo_tooltip['date'] = $this->_translator->getMessage('TODO_NO_END_DATE_LONG');
             }
             $todo_tooltip['color'] = $color_link;
             $todo_context_item = $todo_item->getContextItem();
             if (isset($todo_context_item)) {
                 $room_title = $todo_context_item->getTitle();
                 if (!empty($room_title)) {
                     $todo_tooltip['context'] = encode(AS_HTML_SHORT, $room_title);
                 }
                 unset($todo_context_item);
             }
//.........这里部分代码省略.........
开发者ID:a2call,项目名称:commsy,代码行数:101,代码来源:cs_date_calendar_index_view.php


示例6: getFormalData

 private function getFormalData()
 {
     $return = array();
     $translator = $this->_environment->getTranslationObject();
     $converter = $this->_environment->getTextConverter();
     $context_item = $this->_environment->getCurrentContextItem();
     $current_user = $this->_environment->getCurrentUserItem();
     $formal_data = array();
     if ($this->_item->isNotActivated()) {
         $activating_date = $this->_item->getActivatingDate();
         $text = '';
         if (strstr($activating_date, '9999-00-00')) {
             $activating_text = $translator->getMessage('COMMON_NOT_ACTIVATED');
         } else {
             $activating_text = $translator->getMessage('COMMON_ACTIVATING_DATE') . ' ' . getDateInLang($this->_item->getActivatingDate());
         }
         $temp_array = array();
         $temp_array[] = $translator->getMessage('COMMON_RIGHTS');
         $temp_array[] = $activating_text;
         $return[] = $temp_array;
     }
     $temp_array = array();
     $temp_array[0] = $translator->getMessage('ANNOUNCEMENT_SHOW_HOME_DATE');
     $temp_array[1] = getDateTimeInLang($this->_item->getSeconddateTime());
     $return[] = $temp_array;
     return $return;
 }
开发者ID:a2call,项目名称:commsy,代码行数:27,代码来源:cs_announcement_detail_controller.php


示例7: _getNewestLinkedItemsAsHTML

 function _getNewestLinkedItemsAsHTML($item)
 {
     $current_context = $this->_environment->getCurrentContextItem();
     $path_shown = false;
     $html = '';
     if ($current_context->withPath() and $item->isPathActive()) {
         $item_list = $item->getPathItemList();
         if (!$item_list->isEmpty()) {
             $path_shown = true;
             $html .= '<h3 class="subitemtitle" style="margin-top:0px; margin-bottom:5px;">' . $this->_translator->getMessage('TOPIC_PATH');
             $html .= '</h3>' . LF;
             $i = 0;
             $html .= '<ul style="list-style-type: none; list-style-position:inside; font-size:8pt; padding-left:0px; margin-left:0px; margin-top:0px; margin-bottom:20px; padding-bottom:0px;">  ' . LF;
             $linked_item = $item_list->getFirst();
             while ($linked_item) {
                 $params = array();
                 $params['iid'] = $linked_item->getItemID();
                 $params['path'] = $item->getItemID();
                 $mod = type2Module($linked_item->getItemType());
                 $type = $linked_item->getItemType();
                 if ($type == 'date') {
                     $type .= 's';
                 }
                 $temp_type = mb_strtoupper($type, 'UTF-8');
                 switch ($temp_type) {
                     case 'ANNOUNCEMENT':
                         $type = $this->_translator->getMessage('COMMON_ANNOUNCEMENT');
                         break;
                     case 'DATES':
                         $type = $this->_translator->getMessage('COMMON_DATES');
                         break;
                     case 'DISCUSSION':
                         $type = $this->_translator->getMessage('COMMON_DISCUSSION');
                         break;
                     case 'GROUP':
                         $type = $this->_translator->getMessage('COMMON_GROUP');
                         break;
                     case 'INSTITUTION':
                         $type = $this->_translator->getMessage('COMMON_INSTITUTION');
                         break;
                     case 'MATERIAL':
                         $type = $this->_translator->getMessage('COMMON_MATERIAL');
                         break;
                     case 'PROJECT':
                         $type = $this->_translator->getMessage('COMMON_PROJECT');
                         break;
                     case 'TODO':
                         $type = $this->_translator->getMessage('COMMON_TODO');
                         break;
                     case 'TOPIC':
                         $type = $this->_translator->getMessage('COMMON_TOPIC');
                         break;
                     case 'USER':
                         $type = $this->_translator->getMessage('COMMON_USER');
                         break;
                     default:
                         $type = $this->_translator->getMessage('COMMON_MESSAGETAG_ERROR' . ' cs_topic_detail(' . __LINE__ . ') ');
                         break;
                 }
                 $user = $this->_environment->getCurrentUser();
                 if ($linked_item->isNotActivated() and !($linked_item->getCreatorID() == $user->getItemID() or $user->isModerator())) {
                     $activating_date = $linked_item->getActivatingDate();
                     if (strstr($activating_date, '9999-00-00')) {
                         $link_creator_text = $this->_translator->getMessage('COMMON_NOT_ACTIVATED');
                     } else {
                         $link_creator_text = $this->_translator->getMessage('COMMON_ACTIVATING_DATE') . ' ' . getDateInLang($linked_item->getActivatingDate());
                     }
                     $html_text = ahref_curl($this->_environment->getCurrentContextID(), $mod, 'detail', $params, $linked_item->getTitle(), $link_creator_text, '', '', '', '', '', 'class="disabled"', '', '', true) . LF;
                 } else {
                     $html_text = ahref_curl($this->_environment->getCurrentContextID(), $mod, 'detail', $params, $linked_item->getTitle(), $type . ' - ' . $linked_item->getTitle()) . LF;
                 }
                 $html .= '      <li style="font-size:10pt;">' . ($i + 1) . '. ' . $html_text . '</li>' . LF;
                 unset($params);
                 $linked_item = $item_list->getNext();
                 $i++;
             }
             $html .= '</ul>' . LF . LF;
         }
     }
     return $html;
 }
开发者ID:a2call,项目名称:commsy,代码行数:81,代码来源:cs_topic_detail_view.php


示例8: _getLinkedItemsAsHTML

 function _getLinkedItemsAsHTML($item, $link_items, $connection, $is_perspective = false, $always = false, $attach_link = false)
 {
     $current_context = $this->_environment->getCurrentContextItem();
     $user = $this->_environment->getCurrentUserItem();
     $mod = $this->_with_modifying_actions;
     $module = Type2Module($connection);
     $html = '<div>' . LF;
     $html .= '<ul style="list-style-type: circle; font-size:8pt;">  ' . LF;
     if (isset($link_items) and $link_items->isEmpty()) {
         $html .= '   <li><a><span class="disabled">' . $this->_translator->getMessage('COMMON_NONE') . '</span></a></li>' . LF;
     } else {
         $count = $link_items->getCount();
         if (!$is_perspective and $count > 10) {
             // Only show up to five items
             $limit = 9;
             $count_shown = 1;
         } else {
             $limit = 0;
             $count_shown = 0;
         }
         $link_item = $link_items->getFirst();
         while ($link_item and $count_shown <= $limit) {
             // Get link creator
             $link_creator = $link_item->getCreatorItem();
             if (isset($link_creator) and !$link_creator->isDeleted()) {
                 $fullname = $link_creator->getFullname();
             } else {
                 $fullname = $this->_translator->getMessage('COMMON_DELETED_USER');
             }
             $link_created = $this->_translator->getDateInLang($link_item->getCreationDate());
             $link_creator_text = $this->_translator->getMessage('COMMON_LINK_CREATOR') . ' ' . $fullname . ', ' . $link_created;
             // Create the list entry
             $linked_item = $link_item->getLinkedItem($item);
             // Get the linked item
             if (isset($linked_item)) {
                 $fragment = '';
                 // there is no anchor defined by default
                 switch ($connection) {
                     case CS_DISCARTICLE_TYPE:
                         $linked_iid = $linked_item->getDiscussionID();
                         $fragment = $linked_item->getItemID();
                         $discussion_manager = $this->_environment->getDiscussionManager();
                         $linked_item = $discussion_manager->getItem($linked_iid);
                         break;
                     case CS_SECTION_TYPE:
                         $linked_iid = $linked_item->getLinkedItemID();
                         $fragment = $linked_item->getItemID();
                         $material_manager = $this->_environment->getMaterialManager();
                         $linked_item = $material_manager->getItem($linked_iid);
                         break;
                     default:
                         $linked_iid = $linked_item->getItemID();
                 }
                 $html .= '   <li>';
                 $params = array();
                 $params['iid'] = $linked_iid;
                 $user = $this->_environment->getCurrentUser();
                 if ($linked_item->isNotActivated() and !($linked_item->getCreatorID() == $user->getItemID() or $user->isModerator())) {
                     $activating_date = $linked_item->getActivatingDate();
                     if (strstr($activating_date, '9999-00-00')) {
                         $link_creator_text .= ' (' . $this->_translator->getMessage('COMMON_NOT_ACTIVATED') . ')';
                     } else {
                         $link_creator_text .= ' (' . $this->_translator->getMessage('COMMON_ACTIVATING_DATE') . ' ' . getDateInLang($linked_item->getActivatingDate()) . ')';
                     }
                     $html .= ahref_curl($this->_environment->getCurrentContextID(), $module, 'detail', $params, chunkText($linked_item->getTitle(), 27), $link_creator_text, '_self', $fragment, '', '', '', 'class="disabled"', '', '', true);
                     unset($params);
                 } else {
                     $html .= ahref_curl($this->_environment->getCurrentContextID(), $module, 'detail', $params, chunkText($linked_item->getTitle(), 27), $link_creator_text, '_self', $fragment);
                     unset($params);
                 }
                 $html .= '</li>' . LF;
             }
             // Show all linked perspectives
             if ($limit > 0) {
                 $count_shown++;
             }
             $link_item = $link_items->getNext();
         }
         if ($limit > 0) {
             $html .= '   <li>';
             $params = array();
             $params['ref_iid'] = $item->getItemID();
             $params['mode'] = 'attached';
             $html .= ahref_curl($this->_environment->getCurrentContextID(), $module, 'index', $params, $this->_translator->getMessage('RUBRIC_ALL_ATTACHMENTS', $link_items->getCount()));
             unset($params);
             $html .= '</li>' . LF;
         }
     }
     $html .= '</ul> ';
     $html .= '				<div style="text-align:right; border-top:0px solid black; padding-bottom:5px; font-size:8pt; padding-right: 3px; font-size:8pt;">' . LF;
     if ($attach_link) {
         if ($user->isUser() and $mod) {
             $params = array();
             $params['ref_iid'] = $item->getItemID();
             $params['mode'] = 'detailattach';
             $html .= ahref_curl($this->_environment->getCurrentContextID(), $module, 'index', $params, $this->_translator->getMessage('COMMON_ATTACH_LINK')) . LF;
             unset($params);
         } else {
             $html .= $this->_translator->getMessage('COMMON_ATTACH_LINK') . LF;
         }
//.........这里部分代码省略.........
开发者ID:a2call,项目名称:commsy,代码行数:101,代码来源:cs_detail_view.php


示例9: _getItemAsHTML

 function _getItemAsHTML($item, $pos = 0, $with_links = TRUE)
 {
     $html = '';
     $shown_entry_number = $pos;
     $shown_entry_number = $pos + $this->_count_headlines;
     if ($shown_entry_number % 2 == 0) {
         $style = 'class="odd"';
     } else {
         $style = 'class="even"';
     }
     if ($this->_clipboard_mode) {
         $sort_criteria = $item->getContextID();
         if ($sort_criteria != $this->_last_sort_criteria) {
             $this->_last_sort_criteria = $sort_criteria;
             $this->_count_headlines++;
             $room_manager = $this->_environment->getProjectManager();
             $sort_room = $room_manager->getItem($sort_criteria);
             $html .= '                     <tr class="list"><td ' . $style . ' width="100%" style="font-weight:bold;" colspan="5">' . "\n";
             if (empty($sort_room)) {
                 $community_manager = $this->_environment->getCommunityManager();
                 $sort_community = $community_manager->getItem($sort_criteria);
                 if (!empty($sort_community)) {
                     $html .= '                        ' . $this->_translator->getMessage('COPY_FROM') . '&nbsp;' . $this->_translator->getMessage('COMMON_COMMUNITY_ROOM_TITLE') . '&nbsp;"' . $sort_community->getTitle() . '"' . "\n";
                 }
             } elseif ($sort_room->isPrivateRoom()) {
                 $user = $this->_environment->getCurrentUserItem();
                 $html .= '                        ' . $this->_translator->getMessage('COPY_FROM_PRIVATEROOM') . '&nbsp;"' . $user->getFullname() . '"' . LF;
             } elseif ($sort_room->isGroupRoom()) {
                 $html .= '                        ' . $this->_translator->getMessage('COPY_FROM_GROUPROOM') . '&nbsp;"' . $sort_room->getTitle() . '"' . LF;
             } else {
                 $html .= '                        ' . $this->_translator->getMessage('COPY_FROM_PROJECTROOM') . '&nbsp;"' . $sort_room->getTitle() . '"' . LF;
             }
             $html .= '                     </td></tr>' . "\n";
             if ($style == 'class="odd"') {
                 $style = 'class="even"';
             } else {
                 $style = 'class="odd"';
             }
         }
     }
     $html .= '   <tr class="list">' . LF;
     $checked_ids = $this->getCheckedIDs();
     $dontedit_ids = $this->getDontEditIDs();
     $key = $item->getItemID();
     $fileicons = $this->_getItemFiles($item, $with_links);
     if (!empty($fileicons)) {
         $fileicons = ' ' . $fileicons;
     }
     if (!(isset($_GET['mode']) and $_GET['mode'] == 'print')) {
         $html .= '      <td ' . $style . ' style="vertical-align:middle;" width="2%">' . LF;
         $html .= '         <input style="font-size:8pt; padding-left:0px; padding-right:0px; margin-left:0px; margin-right:0px;" type="checkbox" onClick="quark(this)" name="attach[' . $key . ']" value="1"';
         $user = $this->_environment->getCurrentUser();
         if ($item->isNotActivated() and !($item->getCreatorID() == $user->getItemID() or $user->isModerator())) {
             $html .= ' disabled="disabled"' . LF;
         } elseif (isset($checked_ids) and !empty($checked_ids) and in_array($key, $checked_ids)) {
             $html .= ' checked="checked"' . LF;
             if (in_array($key, $dontedit_ids)) {
                 $html .= ' disabled="disabled"' . LF;
             }
         }
         $html .= '/>' . LF;
         $html .= '         <input type="hidden" name="shown[' . $this->_text_as_form($key) . ']" value="1"/>' . LF;
         $html .= '      </td>' . LF;
         if ($item->isNotActivated()) {
             $title = $item->getTitle();
             $title = $this->_compareWithSearchText($this->_text_as_html_short($title));
             $user = $this->_environment->getCurrentUser();
             if ($item->getCreatorID() == $user->getItemID() or $user->isModerator()) {
                 $params = array();
                 $params['iid'] = $item->getItemID();
                 $title = ahref_curl($this->_environment->getCurrentContextID(), CS_ANNOUNCEMENT_TYPE, 'detail', $params, $title, '', '', '', '', '', '', '', '', CS_ANNOUNCEMENT_TYPE . $item->getItemID());
                 unset($params);
                 if (!$this->_environment->inPrivateRoom()) {
                     $title .= $this->_getItemChangeStatus($item);
                     $title .= $this->_getItemAnnotationChangeStatus($item);
                 }
             }
             $activating_date = $item->getActivatingDate();
             if (strstr($activating_date, '9999-00-00')) {
                 $title .= BR . $this->_translator->getMessage('COMMON_NOT_ACTIVATED');
             } else {
                 $title .= BR . $this->_translator->getMessage('COMMON_ACTIVATING_DATE') . ' ' . getDateInLang($item->getActivatingDate());
             }
             $title = '<span class="disabled">' . $title . '</span>';
             $html .= '      <td ' . $style . '>' . $title . LF;
         } else {
             if ($with_links) {
                 $html .= '      <td ' . $style . '>' . $this->_getItemTitle($item) . LF;
             } else {
                 $title = $this->_text_as_html_short($item->getTitle());
                 $html .= '      <td ' . $style . '>' . $title . LF;
             }
         }
     } else {
         $html .= '      <td colspan="2" ' . $style . ' style="font-size:10pt;">' . $this->_getItemTitle($item) . $fileicons . '</td>' . LF;
     }
     $text = '';
     switch (mb_strtoupper($item->getItemType(), 'UTF-8')) {
         case 'ANNOUNCEMENT':
             $text .= $this->_translator->getMessage('ANNOUNCEMENTS');
//.........这里部分代码省略.........
开发者ID:a2call,项目名称:commsy,代码行数:101,代码来源:cs_copy_index_view.php


示例10: actionUpdateLinkedItem


//.........这里部分代码省略.........
                 $img = 'discussion.png';
                 break;
             case 'GROUP':
                 $text = $translator->getMessage('COMMON_ONE_GROUP');
                 $img = 'group.png';
                 break;
             case 'INSTITUTION':
                 $text = $translator->getMessage('COMMON_ONE_INSTITUTION');
                 $img = '';
                 break;
             case 'MATERIAL':
                 $text = $translator->getMessage('COMMON_ONE_MATERIAL');
                 $img = 'material.png';
                 break;
             case 'PROJECT':
                 $text = $translator->getMessage('COMMON_ONE_PROJECT');
                 $img = '';
                 break;
             case 'TODO':
                 $text = $translator->getMessage('COMMON_ONE_TODO');
                 $img = 'todo.png';
                 break;
             case 'TOPIC':
                 $text = $translator->getMessage('COMMON_ONE_TOPIC');
                 $img = 'topic.png';
                 break;
             case 'USER':
                 $text = $translator->getMessage('COMMON_ONE_USER');
                 $img = 'user.png';
                 break;
             default:
                 $text = $translator->getMessage('COMMON_MESSAGETAB_ERROR');
                 $img = '';
                 break;
         }
         $link_creator_text = $text . ' - ' . $translator->getMessage('COMMON_LINK_CREATOR') . ' ' . $entry['creator'];
         switch ($type) {
             case CS_DISCARTICLE_TYPE:
                 $linked_iid = $linked_item->getDiscussionID();
                 $discussion_manager = $this->_environment->getDiscussionManager();
                 $linked_item = $discussion_manager->getItem($linked_iid);
                 break;
             case CS_SECTION_TYPE:
                 $linked_iid = $linked_item->getLinkedItemID();
                 $material_manager = $this->_environment->getMaterialManager();
                 $linked_item = $material_manager->getItem($linked_iid);
                 break;
             default:
                 $linked_iid = $linked_item->getItemID();
         }
         $entry['linked_iid'] = $linked_iid;
         $module = Type2Module($type);
         if ($linked_item->isNotActivated() && !($linked_item->getCreatorID() === $user->getItemID() || $user->isModerator())) {
             $activating_date = $linked_item->getActivatingDate();
             if (strstr($activating_date, '9999-00-00')) {
                 $link_creator_text .= ' (' . $translator->getMessage('COMMON_NOT_ACTIVATED') . ')';
             } else {
                 $link_creator_text .= ' (' . $translator->getMessage('COMMON_ACTIVATING_DATE') . ' ' . getDateInLang($linked_item->getActivatingDate()) . ')';
             }
             if ($module === CS_USER_TYPE) {
                 $title = $linked_item->getFullName();
             } else {
                 $title = $linked_item->getTitle();
             }
             $title = $converter->text_as_html_short($title);
             $entry['module'] = $module;
             $entry['img'] = $img;
             $entry['title'] = $link_creator_text;
             $entry['link_text'] = $title;
         } else {
             if ($module === CS_USER_TYPE) {
                 $title = $linked_item->getFullName();
             } else {
                 $title = $linked_item->getTitle();
             }
             $title = $converter->text_as_html_short($title);
             $entry['module'] = $module;
             $entry['img'] = $img;
             $entry['title'] = $link_creator_text;
             $entry['link_text'] = $title;
         }
         $return['linked_item'] = $entry;
     } else {
         // remove
         if (($offset = array_search($link_id, $ 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getDateTime函数代码示例发布时间:2022-05-15
下一篇:
PHP getDateFormate函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap