示例#1
0
 /** get the title of the item
  * this method returns the item title in the right formatted style
  *
  * @return string title
  */
 function _getType($item)
 {
     $title_text = $this->_text_as_html_short($item->getType());
     $params = array();
     $params['iid'] = $item->getItemID();
     $title = ahref_curl($this->_environment->getCurrentContextID(), type2module($item->getType()), 'detail', $params, $title_text);
     unset($params);
     $title .= $this->_getChangeStatus($item);
     $title .= $this->_getAnnotationChangeStatus($item);
     return $title;
 }
示例#2
0
    } elseif ( isset($item) )  {
       $item->setLinkedItemsByIDArray($entry_array);
       $item->save();
    }
    $session->unsetValue('cid'.$environment->getCurrentContextID().'_linked_items_index_selected_ids');
    $session->unsetValue('cid'.$environment->getCurrentContextID().'_linked_items_index_selected_ids2');
    unset($params['attach_view']);
    unset($params['attach_type']);
    unset($params['from']);
    unset($params['pos']);
    unset($params['mode']);
    unset($params['return_attach_item_list']);
    if ( $environment->getCurrentModule() == type2module(CS_DATE_TYPE) ) {
       unset($params['date_option']);
    }
    if ( $environment->getCurrentModule() == type2module(CS_TODO_TYPE) ) {
       unset($params['todo_option']);
    }
    redirect($environment->getCurrentContextID(),$environment->getCurrentModule(), $environment->getCurrentFunction(), $params);
}

$item_list = new cs_list();
$item_ids = array();
$count_all = 0;
$params = array();
$params['environment'] = $environment;
$params['with_modifying_actions'] = true;
$item_attach_index_view = $class_factory->getClass(ITEM_ATTACH_INDEX_VIEW,$params);
unset($params);

$context_item = $environment->getCurrentContextItem();
示例#3
0
 public function _getOutput($item_id)
 {
     $retour = '';
     $item_manager = $this->_environment->getItemManager();
     $item_type = $item_manager->getItemType($item_id);
     if (!empty($item_type)) {
         $class_factory = $this->_environment->getClassFactory();
         $params = array();
         $params['environment'] = $this->_environment;
         // only room now
         $page = $class_factory->getClass(PAGE_ROOM_VIEW, $params);
         // only room now
         unset($params);
         // title
         if ($this->_environment->isOutputModeNot('XML')) {
             $environment = $this->_environment;
             $page->setCurrentUser($this->_environment->getCurrentUserItem());
             // set title
             $context_item_current = $this->_environment->getCurrentContextItem();
             $translator = $this->_environment->getTranslationObject();
             $title = $context_item_current->getTitle();
             if ($context_item_current->isProjectRoom() and $context_item_current->isTemplate()) {
                 $title .= ' (' . $translator->getMessage('PROJECTROOM_TEMPLATE') . ')';
             } elseif ($context_item_current->isClosed()) {
                 $title .= ' (' . $translator->getMessage('PROJECTROOM_CLOSED') . ')';
             }
             $user = $this->_environment->getCurrentUserItem();
             if ($context_item_current->isPrivateRoom() and $user->isGuest()) {
                 $page->setRoomName($translator->getMessage('COMMON_FOREIGN_ROOM'));
                 $page->setPageName($translator->getMessage('COMMON_FOREIGN_ROOM'));
             } elseif ($context_item_current->isPrivateRoom()) {
                 $page->setRoomName($translator->getMessage('COMMON_PRIVATEROOM'));
                 $tempModule = mb_strtoupper($this->_environment->getCurrentModule(), 'UTF-8');
                 $tempMessage = "";
                 include_once 'include/inc_commsy_php_case_pagetitle.php';
                 $page->setPageName($tempMessage);
             } else {
                 $page->setRoomName($title);
                 $tempModule = mb_strtoupper($environment->getCurrentModule(), 'UTF-8');
                 $tempMessage = "";
                 include_once 'include/inc_commsy_php_case_pagetitle.php';
                 $page->setPageName($tempMessage);
             }
         }
         include_once 'functions/misc_functions.php';
         $detail_page = 'pages/' . type2module($item_type) . '_detail.php';
         if (file_exists($detail_page)) {
             $session = $this->_environment->getSessionItem();
             $current_user = $this->_environment->getCurrentUserItem();
             $current_context = $this->_environment->getCurrentContextItem();
             $this->_environment->setCurrentParameter('iid', $item_id);
             $_GET['iid'] = $item_id;
             include $detail_page;
             unset($current_user);
             unset($session);
             unset($current_context);
         }
         //Put page into string
         $page->setPrintableView();
         if ($this->_view_mode == 'print') {
             $this->_environment->setCurrentParameter('mode', 'print');
             $_GET['mode'] = 'print';
             $this->_environment->setCurrentParameter('download', 'zip');
             $_GET['download'] = 'zip';
         }
         $retour .= $page->asHTMLFirstPart();
         $retour .= $page->asHTMLSecondPart();
         $retour .= $page->asHTML();
     }
     return $retour;
 }
示例#4
0
 /** get detail view as HTML
  * this method returns the detail view in HTML-Code
  *
  * @returns string detail view as HMTL
  */
 function asHTML()
 {
     $item = $this->getItem();
     $current_user_item = $this->_environment->getCurrentUserItem();
     $html = LF . '<!-- BEGIN OF DETAIL VIEW -->' . LF;
     $html .= $this->addJavaScriptForSearch();
     $html .= '<div style="width:100%;">' . LF;
     $rubric = $this->_environment->getCurrentModule();
     $current_context = $this->_environment->getCurrentContextItem();
     $detail_box_conf = $current_context->getDetailBoxConf();
     $html .= $this->_getDetailPageHeaderAsHTML();
     if (!(isset($_GET['mode']) and $_GET['mode'] == 'print') and $item->maySee($current_user_item) and (!$current_context->isPrivateRoom() or $current_user_item->getContextID() == $current_context->getItemID())) {
         $this->_right_box_config['size_string'] = '';
         $current_context = $this->_environment->getCurrentContextItem();
         $html .= '<div style="float:right; font-size:10pt; width:28%; margin-top:5px; vertical-align:top; text-align:left;">' . LF;
         $html .= '<div>' . LF;
         $html .= '<div style="width:250px;">' . LF;
         $html .= '<div id="commsy_panels">' . LF;
         if (!isset($this->_browse_ids) or count($this->_browse_ids) == 0) {
             $this->_browse_ids[] = $this->_item->getItemID();
         }
         $html .= '<div class="commsy_no_panel" style="margin-bottom:1px;">' . LF;
         $from_display_mode = "";
         $session = $this->_environment->getSessionItem();
         if ($session->issetValue($this->_environment->getCurrentContextID() . '_dates_seldisplay_mode')) {
             $from_display_mode = $session->getValue($this->_environment->getCurrentContextID() . '_dates_seldisplay_mode');
         } else {
             $from_display_mode = $current_context->getDatesPresentationStatus();
         }
         unset($session);
         // display calendar in date detail view, when request came from calendar
         if ($rubric == CS_DATE_TYPE && $from_display_mode != 'normal') {
             $html .= '<div class="column" style="width: 100%;">' . LF;
             $html .= '<div class="right_box">' . LF;
             $html .= '<div class="right_box_title">' . LF;
             $date = $this->_item->getStartingDay();
             $date_array = explode('-', $date);
             $month = $date_array[1];
             $year = $date_array[0];
             $first_char = mb_substr($month, 0, 1);
             if ($first_char == '0') {
                 $month = mb_substr($month, 1, 2);
             }
             $month_array = array($this->_translator->getMessage('DATES_JANUARY_LONG'), $this->_translator->getMessage('DATES_FEBRUARY_LONG'), $this->_translator->getMessage('DATES_MARCH_LONG'), $this->_translator->getMessage('DATES_APRIL_LONG'), $this->_translator->getMessage('DATES_MAY_LONG'), $this->_translator->getMessage('DATES_JUNE_LONG'), $this->_translator->getMessage('DATES_JULY_LONG'), $this->_translator->getMessage('DATES_AUGUST_LONG'), $this->_translator->getMessage('DATES_SEPTEMBER_LONG'), $this->_translator->getMessage('DATES_OCTOBER_LONG'), $this->_translator->getMessage('DATES_NOVEMBER_LONG'), $this->_translator->getMessage('DATES_DECEMBER_LONG'));
             $tempMessage = $month_array[$month - 1] . ' ' . $year;
             $html .= '<div style="white-space:nowrap;">' . $tempMessage . '</div>' . LF;
             $html .= '</div>' . LF;
             $html .= '<div class="right_box_main">' . LF;
             $html .= '<div style="margin-left: 20px;">' . LF;
             $html .= $this->_getAdditionalCalendarAsHTML();
             $html .= '</div>' . LF;
             $html .= '<div style="float:right; font-size:8pt; padding: 5px 3px 3px 0px;">' . LF;
             $params = array();
             $params['back_to_index'] = 'true';
             $link_module = $this->_environment->getCurrentModule();
             $link_text = $this->_translator->getMessage('DATE_BACK_TO_CALENDAR');
             $html .= ahref_curl($this->_environment->getCurrentContextID(), $link_module, 'index', $params, $link_text);
             $html .= '</div>' . LF;
             $html .= '<div style="clear:both;"></div>' . LF;
             $html .= '</div>' . LF;
             $html .= '</div>' . LF;
             $html .= '</div>' . LF;
             $html .= '</div>' . LF;
             // end div commsy_no_panel
             $html .= '<div style="clear:both;"></div>' . LF;
         } else {
             $html .= $this->_getForwardBoxAsHTML($item);
             $html .= '</div>' . LF;
         }
         /***********Buzzwords*************/
         if ($this->showBuzzwords()) {
             $html .= '<div class="commsy_panel" style="margin-bottom:1px;">' . LF;
             $html .= $this->_getBuzzwordBoxAsHTML($item);
             $html .= '</div>' . LF;
         }
         if ($this->_environment->getCurrentModule() == 'account') {
             $html .= $this->_getConfigurationOverviewAsHTML();
         }
         /***********Tags*************/
         if ($this->showTags()) {
             $html .= '<div class="commsy_panel" style="margin-bottom:1px;">' . LF;
             $session_item = $this->_environment->getSessionItem();
             if ($session_item->issetValue('javascript')) {
                 if ($session_item->getValue('javascript') == "1") {
                     $with_javascript = true;
                 } else {
                     $with_javascript = false;
                 }
             } else {
                 $with_javascript = true;
             }
             if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
                 $with_javascript = false;
             }
             // UMSTELLUNG MUSEUM
             if ($with_javascript and true) {
                 #$html .= $this->_getTagBoxAsHTMLWithJavaScript($item);
                 $tag_manager = $this->_environment->getTagManager();
                 $html .= $this->_getTagBoxAsHTMLWithJavaScript($tag_manager->getRootTagItem(), 0, 0, true, $item);
             } else {
                 $html .= $this->_getTagBoxAsHTML($item);
             }
             $html .= '</div>' . LF;
         }
         /**********Netnaviation*********/
         if ($this->showNetnavigation()) {
             $html .= $this->_getAllLinkedItemsAsHTML($item);
         }
         /***********Workflow*************/
         if ($this->showWorkflow()) {
             #$html .= '<div class="commsy_panel" style="margin-bottom:1px;">'.LF;
             #$html .= $this->_getWorkflowBoxAsHTML($item);
             #$html .='</div>'.LF;
         }
         $html .= '<div>&nbsp;' . LF;
         $html .= '</div>' . LF;
         $html .= '</div>' . LF;
         $html .= '</div>' . LF;
         $html .= '</div>' . LF;
         $html .= '</div>' . LF;
     }
     $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:100%; padding-right:10px; ';
     } else {
         $width = '';
     }
     if (isset($_GET['mode']) and $_GET['mode'] == 'print') {
         $html .= '<div class="infoborder" style="width:100%; margin-top:5px; vertical-align:bottom;">' . LF;
     } else {
         $html .= '<div class="infoborder_display_content"  style="' . $width . 'margin-top:5px; vertical-align:bottom;">' . LF;
     }
     if (!$this->_show_content_without_window) {
         $html .= '<div id="detail_headline">' . LF;
         $html .= '<div style="padding:3px 5px 4px 5px;">' . LF;
         if ($rubric == CS_DISCUSSION_TYPE) {
             $html .= '<h2 class="contenttitle">' . $this->_getTitleAsHTML();
         } elseif ($rubric != CS_USER_TYPE and $rubric != 'account') {
             $html .= '<h2 class="contenttitle">' . $this->_text_as_html_short($this->_compareWithSearchText($item->getTitle(), false));
         } elseif ($rubric == 'account') {
             $html .= '<h2 class="contenttitle">' . $this->_text_as_html_short($this->_compareWithSearchText($item->getFullName(), false));
         } else {
             $html .= '<h2 class="contenttitle">' . $this->_text_as_html_short($this->_compareWithSearchText($item->getFullName(), false));
         }
         $html .= '</h2>' . LF;
         $html .= '</div>' . LF;
         $html .= '</div>' . LF;
         $html .= '<div id="detail_content" style="font-size:10pt; ' . $width . '">' . LF;
         if ($rubric == CS_MATERIAL_TYPE || $rubric == CS_DISCUSSION_TYPE || $rubric == CS_ANNOUNCEMENT_TYPE) {
             // check if assessment is active for this room
             $current_context = $this->_environment->getCurrentContextItem();
             if ($current_context->isAssessmentActive()) {
                 $html .= '<script type="text/javascript">' . LF;
                 $html .= '<!--' . LF;
                 $html .= 'var ajax_cid = "' . $current_context->getItemID() . '"' . LF;
                 $html .= '-->' . LF;
                 $html .= '</script>' . LF;
                 //$html .= '<div class="detail_content" style="border: none;">'.LF;
                 $html .= $this->_getAssessmentsAsHTML();
                 //$html .= '</div>'.LF;
             }
         }
         if ($rubric == CS_MATERIAL_TYPE) {
             $current_context = $this->_environment->getCurrentContextItem();
             if ($current_context->withWorkflow()) {
                 $html .= $this->_getWorkflowAsHTML();
             }
         }
     }
     $formal_data1 = array();
     if ($item->isNotActivated()) {
         $temp_array = array();
         $temp_array[] = $this->_translator->getMessage('COMMON_RIGHTS');
         $activating_date = $item->getActivatingDate();
         if (strstr($activating_date, '9999-00-00')) {
             $title = $this->_translator->getMessage('COMMON_NOT_ACTIVATED');
         } else {
             $title = $this->_translator->getMessage('COMMON_ACTIVATING_DATE') . ' ' . getDateInLang($item->getActivatingDate());
         }
         $temp_array[] = $title;
         $formal_data1[] = $temp_array;
     }
     if ($this->_environment->getCurrentModule() == CS_DATE_TYPE and $item->issetPrivatDate()) {
         $temp_array = array();
         $temp_array[] = $this->_translator->getMessage('COMMON_PRIVATE_DATE');
         $title = $this->_translator->getMessage('COMMON_NOT_ACCESSIBLE');
         $temp_array[] = $title;
         $formal_data1[] = $temp_array;
     }
     if (!empty($formal_data1)) {
         $html .= $this->_getFormalDataAsHTML($formal_data1);
     }
     $formal_data1 = array();
     if ($this->_item->issetExternalViewerStatus()) {
         $temp_array = array();
         $temp_array[] = $this->_translator->getMessage('COMMON_EXTERNAL_VIEWER');
         $external_viewer_array = $this->_item->getExternalViewerArray();
         $user_manager = $this->_environment->getUserManager();
         $tmp_html = '';
         foreach ($external_viewer_array as $external_viewer) {
             $user_manager->setUserIDLimit($external_viewer);
             $user_manager->setContextLimit($this->_environment->getCurrentPortalID());
             $user_manager->select();
             $user_list = $user_manager->get();
             $user_item = $user_list->getFirst();
             if (isset($user_item) and is_object($user_item)) {
                 $tmp_html .= $user_item->getFullname() . ', ';
             }
         }
         if (!empty($tmp_html)) {
             $tmp_html = substr($tmp_html, 0, -2);
         }
         $temp_array[] = $tmp_html;
         $formal_data1[] = $temp_array;
     }
     if (!empty($formal_data1)) {
         $html .= $this->_getFormalDataAsHTML($formal_data1);
     }
     $html .= $this->_getContentAsHTML();
     if (!$this->_show_content_without_window) {
         if (!(isset($_GET['mode']) and $_GET['mode'] == 'print')) {
             $html .= '<div class="infoborder" style="margin-top:5px; padding-top:10px; vertical-align:top;">';
             $mode = 'short';
             if (in_array($item->getItemID(), $this->_openCreatorInfo)) {
                 $mode = 'long';
             }
             $html .= $this->_getCreatorInformationAsHTML($item, 3, $mode) . LF;
         }
     }
     if (($this->_environment->getCurrentModule() != 'user' or !$this->_environment->inPrivateRoom()) and !($rubric == CS_TODO_TYPE and !$current_context->withTodoManagement())) {
         ############SQL-Statements reduzieren
         $html .= $this->_getSubItemsAsHTML($item);
         $current_user = $this->_environment->getCurrentUser();
         if ($rubric == CS_DISCUSSION_TYPE and !$item->isClosed() and $this->_with_modifying_actions and $current_user->isUser()) {
             $html .= $this->_getDiscussionFormAsHTML();
             $html .= '</div>' . LF;
         }
         if ($rubric == CS_TODO_TYPE and $this->_with_modifying_actions) {
             if ($current_context->withTodoManagement()) {
                 $html .= $this->_getTodoFormAsHTML();
             }
             $html .= '</div>' . LF;
         }
     }
     if ($rubric != CS_GROUP_TYPE and $rubric != CS_TOPIC_TYPE and $rubric != CS_INSTITUTION_TYPE and $rubric != CS_USER_TYPE and $rubric != CS_DISCUSSION_TYPE and $this->_environment->getCurrentModule() != 'account') {
         $html .= $this->_getAnnotationsAsHTML();
         $html .= $this->_getAnnotationFormAsHTML();
     }
     if ($rubric == CS_DISCUSSION_TYPE and $current_context->isPrivateRoom()) {
         $html .= $this->_getAnnotationsAsHTML();
         $html .= $this->_getAnnotationFormAsHTML();
     }
     if ($rubric == CS_TOPIC_TYPE) {
         $anno_list = $item->getAnnotationList();
         $anno_item = $anno_list->getFirst();
         if (isset($anno_item) and !empty($anno_item)) {
             $html .= $this->_getAnnotationsAsHTML();
         }
     }
     if ($rubric == CS_INSTITUTION_TYPE) {
         $anno_list = $item->getAnnotationList();
         $anno_item = $anno_list->getFirst();
         if (isset($anno_item) and !empty($anno_item)) {
             $html .= $this->_getAnnotationsAsHTML();
         }
     }
     $html .= '</div>' . LF;
     if (!$this->_show_content_without_window or $this->_environment->getCurrentModule() == type2module(CS_PROJECT_TYPE)) {
         $html .= '</div>' . LF;
     }
     $html .= '<div style="clear:both;">' . LF;
     $html .= '</div>' . LF;
     if (!$this->_show_content_without_window or $this->_environment->getCurrentModule() == type2module(CS_PROJECT_TYPE)) {
         $html .= '</div>' . LF;
     }
     $html .= '<!-- END OF DETAIL VIEW -->' . LF . LF;
     if (!(isset($_GET['mode']) and $_GET['mode'] == 'print')) {
         $html .= '<script type="text/javascript">' . LF;
         $current_browser = mb_strtolower($this->_environment->getCurrentBrowser(), 'UTF-8');
         $current_browser_version = $this->_environment->getCurrentBrowserVersion();
         if ($this->_environment->getCurrentModule() == CS_DISCUSSION_TYPE and $current_browser == 'msie' and !strstr($current_browser_version, '7.')) {
             $html .= 'preInitCommSyPanels(Array(' . $this->_right_box_config['title_string'] . '),Array(' . $this->_right_box_config['desc_string'] . '),Array(' . $this->_right_box_config['config_string'] . '), Array(),Array(' . $this->_right_box_config['size_string'] . '));' . LF;
         } else {
             $html .= 'initCommSyPanels(Array(' . $this->_right_box_config['title_string'] . '),Array(' . $this->_right_box_config['desc_string'] . '),Array(' . $this->_right_box_config['config_string'] . '), Array(),Array(' . $this->_right_box_config['size_string'] . '),Array(),null,null);' . LF;
         }
         $html .= '</script>' . LF;
     }
     return $html;
 }
示例#5
0
 function _getAttachedItemInfoAsHTML()
 {
     $html = '';
     $ref_iid = $this->getRefIID();
     $ref_user = $this->getRefUser();
     if (!empty($ref_iid) or !empty($ref_user)) {
         $ref_item = $this->getRefItem();
         $ref_item_type = $ref_item->getItemType();
         if ($ref_item_type == 'user') {
             if ($this->_environment->inCommunityRoom()) {
                 $module = 'contact';
             } else {
                 $module = 'user';
             }
             $html .= '<span> ' . $this->_translator->getMessage('MODIFIED_ITEMS_LISTVIEW_SEPERATOR') . ' ';
             $params = array();
             $params['iid'] = $ref_user;
             $html .= ahref_curl($this->_environment->getCurrentContextID(), $module, 'detail', $params, $ref_item->getFullName(), '', '', $this->getFragment());
             unset($params);
             $html .= '</span>' . LF;
         } elseif ($ref_item_type == CS_ANNOTATION_TYPE) {
             $ref_item2 = $ref_item->getLinkedItem();
             $module = type2module($ref_item2->getItemType());
             $html .= '<span> ' . $this->_translator->getMessage('ASSIGNED_ITEMS_LISTVIEW_SEPERATOR') . ' ';
             $params = array();
             $params['iid'] = $ref_item2->getItemID();
             $html .= ahref_curl($this->_environment->getCurrentContextID(), $module, 'detail', $params, $ref_item->getTitle(), '', '', $ref_item->getItemID());
             unset($params);
             $html .= '</span>' . LF;
         } elseif ($ref_item_type == CS_SECTION_TYPE) {
             $ref_item2 = $ref_item->getLinkedItem();
             $html .= '<span> ' . $this->_translator->getMessage('ASSIGNED_ITEMS_LISTVIEW_SEPERATOR') . ' ';
             $params = array();
             $params['iid'] = $ref_item2->getItemID();
             $html .= ahref_curl($this->_environment->getCurrentContextID(), CS_MATERIAL_TYPE, 'detail', $params, $ref_item->getTitle(), '', '', $ref_item->getItemID());
             unset($params);
             $html .= '</span>' . LF;
         } elseif ($ref_item_type == CS_DISCARTICLE_TYPE) {
             $ref_item2 = $ref_item->getLinkedItem();
             $html .= '<span> ' . $this->_translator->getMessage('ASSIGNED_ITEMS_LISTVIEW_SEPERATOR') . ' ';
             $params = array();
             $params['iid'] = $ref_item2->getItemID();
             $html .= ahref_curl($this->_environment->getCurrentContextID(), CS_DISCUSSION_TYPE, 'detail', $params, $ref_item->getTitle(), '', '', $ref_item->getItemID());
             unset($params);
             $html .= '</span>' . LF;
         } else {
             $module = type2module($ref_item_type);
             $html .= '<span> ' . $this->_translator->getMessage('ASSIGNED_ITEMS_LISTVIEW_SEPERATOR') . ' ';
             $params = array();
             $params['iid'] = $ref_iid;
             $html .= ahref_curl($this->_environment->getCurrentContextID(), $module, 'detail', $params, $ref_item->getTitle(), '', '', $this->getFragment());
             unset($params);
             $html .= '</span>' . LF;
         }
     }
     return $html;
 }
示例#6
0
 function getAdditionalRestrictionTextAsHTML()
 {
     $html = '';
     $params = $this->_environment->getCurrentParameterArray();
     $context_item = $this->_environment->getCurrentContextItem();
     $session = $this->_environment->getSessionItem();
     if (isset($_GET['back_to_search']) and $session->issetValue('cid' . $this->_environment->getCurrentContextID() . '_campus_search_parameter_array')) {
         $campus_search_parameter_array = $session->getValue('cid' . $this->_environment->getCurrentContextID() . '_campus_search_parameter_array');
         $params['search'] = $campus_search_parameter_array['search'];
         $params['selrestriction'] = $campus_search_parameter_array['selrestriction'];
         $params['selrubric'] = $campus_search_parameter_array['selrubric'];
         $params['selbuzzword'] = $campus_search_parameter_array['selbuzzword'];
         $params['seltag_array'] = $campus_search_parameter_array['seltag_array'];
         $params['only_files'] = $campus_search_parameter_array['selfiles'];
         $params['interval'] = $campus_search_parameter_array['interval'];
         $params['sel_activating_status'] = $campus_search_parameter_array['sel_activating_status'];
     }
     if (isset($params['only_files']) and !empty($params['only_files']) and $params['only_files'] == 1) {
         $this->_additional_selects = true;
         $html_text = '<tr>' . LF;
         $html_text .= '<td>' . LF;
         $html_text .= '<span class="infocolor" style="white-space:nowrap;">' . $this->_translator->getMessage('MATERIAL_FILES') . ': </span>';
         $html_text .= '</td>' . LF;
         $html_text .= '<td style="text-align:right;">' . LF;
         $html_text .= $this->_translator->getMessage('COMMON_ONLY_FILES');
         $picture = '<img src="images/delete_restriction.gif" alt="x" border="0"/>';
         $new_params = $params;
         unset($new_params['only_files']);
         $html_text .= '&nbsp;' . ahref_curl($this->_environment->getCurrentContextID(), $this->_environment->getCurrentModule(), 'index', $new_params, $picture, $this->_translator->getMessage('COMMON_DELETE_RESTRICTIONS')) . LF;
         $html_text .= '</td>' . LF;
         $html_text .= '</tr>' . LF;
         $html .= $html_text;
     }
     if (isset($params['selrubric']) and !empty($params['selrubric']) and $params['selrubric'] != 'all') {
         $this->_additional_selects = true;
         $html_text = '<tr>' . LF;
         $html_text .= '<td>' . LF;
         $html_text .= '<span class="infocolor">' . $this->_translator->getMessage('COMMON_RUBRIC') . ': </span>';
         $html_text .= '</td>' . LF;
         $html_text .= '<td style="text-align:right;">' . LF;
         switch (mb_strtoupper($params['selrubric'], 'UTF-8')) {
             case 'ANNOUNCEMENT':
                 $text = $this->_translator->getMessage('ANNOUNCEMENT_INDEX');
                 break;
             case 'DATE':
                 $text = $this->_translator->getMessage('DATE_INDEX');
                 break;
             case 'DISCUSSION':
                 $text = $this->_translator->getMessage('DISCUSSION_INDEX');
                 break;
             case 'GROUP':
                 $text = $this->_translator->getMessage('GROUP_INDEX');
                 break;
             case 'INSTITUTION':
                 $text = $this->_translator->getMessage('INSTITUTION_INDEX');
                 break;
             case 'MATERIAL':
                 $text = $this->_translator->getMessage('MATERIAL_INDEX');
                 break;
             case 'PROJECT':
                 $text = $this->_translator->getMessage('PROJECT_INDEX');
                 break;
             case 'TODO':
                 $text = $this->_translator->getMessage('TODO_INDEX');
                 break;
             case 'TOPIC':
                 $text = $this->_translator->getMessage('TOPIC_INDEX');
                 break;
             case 'USER':
                 $text = $this->_translator->getMessage('USER_INDEX');
                 break;
             default:
                 $text = $this->_translator->getMessage('COMMON_MESSAGETAG_ERROR' . ' cs_item_index_view(1396) ');
                 break;
         }
         $html_text .= '<span>' . $text . '</span>';
         $picture = '<img src="images/delete_restriction.gif" alt="x" border="0"/>';
         $new_params = $params;
         $new_params['selrubric'] = 'all';
         unset($new_params['selrestriction']);
         $html_text .= '&nbsp;' . ahref_curl($this->_environment->getCurrentContextID(), $this->_environment->getCurrentModule(), 'index', $new_params, $picture, $this->_translator->getMessage('COMMON_DELETE_RESTRICTIONS')) . LF;
         $html_text .= '</td>' . LF;
         $html_text .= '</tr>' . LF;
         $html .= $html_text;
     }
     if (isset($params['selrestriction']) and !empty($params['selrestriction']) and $params['selrestriction'] != 'all') {
         $this->_additional_selects = true;
         $html_text = '<tr>' . LF;
         $html_text .= '<td>' . LF;
         $html_text .= '<span class="infocolor" style="white-space:nowrap;">' . $this->_translator->getMessage('SEARCH_FIELD_RESTRICTION') . ': </span>';
         $html_text .= '</td>' . LF;
         $html_text .= '<td style="text-align:right;">' . LF;
         switch (mb_strtoupper($params['selrestriction'], 'UTF-8')) {
             case '1':
                 $text = $this->_translator->getMessage('COMMON_TITLE');
                 break;
             case '2':
                 $text = $this->_translator->getMessage('COMMON_AUTHOR');
                 break;
             default:
                 $text = $this->_translator->getMessage('COMMON_TITLE');
                 break;
         }
         $html_text .= '<span>' . $text . '</span>';
         $picture = '<img src="images/delete_restriction.gif" alt="x" border="0"/>';
         $new_params = $params;
         $new_params['selrestriction'] = 'all';
         $html_text .= '&nbsp;' . ahref_curl($this->_environment->getCurrentContextID(), $this->_environment->getCurrentModule(), 'index', $new_params, $picture, $this->_translator->getMessage('COMMON_DELETE_RESTRICTIONS')) . LF;
         $html_text .= '</td>' . LF;
         $html_text .= '</tr>' . LF;
         $html .= $html_text;
     } elseif (!empty($params['selrubric']) and mb_strtoupper($params['selrubric'], 'UTF-8') == mb_strtoupper(type2module(CS_MATERIAL_TYPE), 'UTF-8')) {
         $width = '150';
         $html_text = '<tr>' . LF;
         $html_text .= '<td>' . LF;
         $html_text .= '<span class="infocolor" style="white-space:nowrap;">' . $this->_translator->getMessage('SEARCH_FIELD_RESTRICTION') . ': </span>';
         $html_text .= '</td>' . LF;
         $html_text .= '<td style="text-align:right;">' . LF;
         // jQuery
         //$html_text .= '   <select style="width: '.$width.'px; font-size:10pt; font-family: \'Trebuchet MS\',\'lucida grande\',tahoma,\'ms sans serif\',verdana,arial,sans-serif;" name="selrestriction" size="1" onChange="javascript:document.indexform.submit()">'.LF;
         $html_text .= '   <select style="width: ' . $width . 'px; font-size:10pt; font-family: \'Trebuchet MS\',\'lucida grande\',tahoma,\'ms sans serif\',verdana,arial,sans-serif;" name="selrestriction" size="1" id="submit_form">' . LF;
         // jQuery
         $html_text .= '      <option value="0"';
         $html_text .= ' selected="selected"';
         $html_text .= '>*' . $this->_translator->getMessage('COMMON_NO_RESTRICTION') . '</option>' . LF;
         $html_text .= '   <option class="disabled" disabled="disabled" value="-2">-------------------</option>' . LF;
         $html_text .= '      <option value="1"';
         $html_text .= '>' . $this->_translator->getMessage('COMMON_TITLE') . '</option>' . LF;
         $html_text .= '      <option value="2"';
         $html_text .= '>' . $this->_translator->getMessage('COMMON_AUTHOR') . '</option>' . LF;
         $html_text .= '   </select>' . LF;
         $html_text .= '   <input type="hidden" name="selrubric" value="material" />' . LF;
         $html_text .= '</td>' . LF;
         $html_text .= '</tr>' . LF;
         $html .= $html_text;
     }
     if ($context_item->withActivatingContent()) {
         if (!isset($params['selactivatingstatus']) or isset($params['selactivatingstatus']) and $params['selactivatingstatus'] == 2) {
             $this->_additional_selects = true;
             $html_text = '<tr>' . LF;
             $html_text .= '<td>' . LF;
             $html_text .= '<span class="infocolor">' . $this->_translator->getMessage('COMMON_ACTIVATION_RESTRICTION') . ': </span>';
             $html_text .= '</td>' . LF;
             $html_text .= '<td style="text-align:right;">' . LF;
             $html_text .= '<span>' . $this->_translator->getMessage('COMMON_SHOW_ONLY_ACTIVATED_ENTRIES') . '</span>';
             $picture = '<img src="images/delete_restriction.gif" alt="x" border="0"/>';
             $new_params = $params;
             $new_params['selactivatingstatus'] = 1;
             $html_text .= '&nbsp;' . ahref_curl($this->_environment->getCurrentContextID(), $this->_environment->getCurrentModule(), 'index', $new_params, $picture, $this->_translator->getMessage('COMMON_DELETE_RESTRICTIONS')) . LF;
             $html_text .= '</td>' . LF;
             $html_text .= '</tr>' . LF;
             $html .= $html_text;
         }
     }
     return $html;
 }
示例#7
0
 function _getSearchAsHTML($search_with = '220')
 {
     $html = '';
     $search_module = 'campus_search';
     if ($this->_environment->inPrivateRoom() and $this->_environment->inConfigArray('c_use_new_private_room', $this->_environment->getCurrentContextID())) {
         $search_module = type2module(CS_DATE_TYPE);
     }
     $html .= '<form style="padding:0px; margin:0px;" action="' . curl($this->_environment->getCurrentContextID(), $search_module, 'index', '') . '" method="get" name="searchform">' . LF;
     $html .= '   <input type="hidden" name="cid" value="' . $this->_text_as_form($this->_environment->getCurrentContextID()) . '"/>' . LF;
     $html .= '   <input type="hidden" name="mod" value="' . $search_module . '"/>' . LF;
     $html .= '   <input type="hidden" name="SID" value="' . $this->_environment->getSessionItem()->getSessionID() . '"/>' . LF;
     $html .= '   <input type="hidden" name="fct" value="index"/>' . LF;
     $html .= '   <input type="hidden" name="selrubric" value="' . $this->_environment->getCurrentModule() . '"/>' . LF;
     // Abfrage von Kategorien... Schleife für jeden seltag_i
     if (isset($_GET['seltag'])) {
         $i = 0;
         // Schleife: Alles Tags, die gesetzt sind abfragen
         while (isset($_GET['seltag'])) {
             if (isset($_GET['seltag_' . $i . ''])) {
                 $html .= '<input type="hidden" name="seltag_' . $i . '" value="' . $_GET['seltag_' . $i . ''] . '">' . LF;
                 $html .= '<input type="hidden" name="seltag" value="yes">' . LF;
                 break;
             }
             $i++;
         }
     }
     if (isset($_GET['selbuzzword'])) {
         $html .= '<input type="hidden" name="selbuzzword" value="' . $_GET['selbuzzword'] . '">' . LF;
     }
     if (isset($_GET['seluser'])) {
         $html .= '<input type="hidden" name="seluser" value="' . $_GET['seluser'] . '">' . LF;
     }
     if (isset($_GET['selgroup'])) {
         $html .= '<input type="hidden" name="selgroup" value="' . $_GET['selgroup'] . '">' . LF;
     }
     if (isset($_GET['selcolor'])) {
         $html .= '<input type="hidden" name="selcolor" value="' . $_GET['selcolor'] . '">' . LF;
     }
     if (isset($_GET['selstatus'])) {
         $html .= '<input type="hidden" name="selstatus" value="' . $_GET['selstatus'] . '">' . LF;
     }
     #$html .= '	  <input type="hidden" name="seltag" value="'.$_GET['seltag_0'].'"'.LF;
     $html .= '<input id="searchtext" onclick="javascript:resetSearchText(\'searchtext\');" style="width:' . $search_with . 'px; font-size:10pt; margin-bottom:0px;" name="search" type="text" size="20" value="' . $this->_text_as_form($this->getSearchText()) . '"/>' . LF;
     if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
         $html .= '<input type="image" src="images/commsyicons_msie6/22x22/search.gif" style="vertical-align:top;" alt="' . $this->_translator->getMessage('COMMON_SEARCH_BUTTON') . '"/>';
     } else {
         $html .= '<input type="image" src="images/commsyicons/22x22/search.png" style="vertical-align:top;" alt="' . $this->_translator->getMessage('COMMON_SEARCH_BUTTON') . '"/>';
     }
     $html .= '</form>';
     return $html;
 }