/**
  * Returns a list of all categories and all faqs
  * The list can be filtered by categories
  *
  * @return string
  * @autoTestable
  * @permissions view
  */
 protected function actionList()
 {
     $this->setStrCurObjectTypeName("Cat");
     $this->setCurObjectClassName("class_module_faqs_cat");
     $objIterator = new class_array_section_iterator(class_module_faqs_category::getObjectCount());
     $objIterator->setIntElementsPerPage(class_module_faqs_category::getObjectCount());
     $objIterator->setPageNumber(1);
     $objIterator->setArraySection(class_module_faqs_category::getObjectList("", $objIterator->calculateStartPos(), $objIterator->calculateEndPos()));
     $strReturn = $this->renderList($objIterator, false, class_module_faqs_admin::STR_CAT_LIST);
     $this->setStrCurObjectTypeName("Faq");
     $this->setCurObjectClassName("class_module_faqs_faq");
     $objIterator = new class_array_section_iterator(class_module_faqs_faq::getObjectCount($this->getParam("filterId")));
     $objIterator->setPageNumber($this->getParam("pv"));
     $objIterator->setArraySection(class_module_faqs_faq::getObjectList($this->getParam("filterId"), $objIterator->calculateStartPos(), $objIterator->calculateEndPos()));
     $strReturn .= $this->renderList($objIterator, false, class_module_faqs_admin::STR_FAQ_LIST);
     return $strReturn;
 }
 /**
  * Returns a list of all posts in the current gb
  *
  * @return string
  * @permissions view
  */
 protected function actionList()
 {
     $strReturn = "";
     $arrTemplate = array();
     $arrTemplate["liste_posts"] = "";
     //Load all posts
     $objArraySectionIterator = new class_array_section_iterator(class_module_guestbook_post::getPostsCount($this->arrElementData["guestbook_id"], true));
     $objArraySectionIterator->setIntElementsPerPage($this->arrElementData["guestbook_amount"]);
     $objArraySectionIterator->setPageNumber((int) ($this->getParam("pv") != "" ? $this->getParam("pv") : 1));
     $objArraySectionIterator->setArraySection(class_module_guestbook_post::getPosts($this->arrElementData["guestbook_id"], true, $objArraySectionIterator->calculateStartPos(), $objArraySectionIterator->calculateEndPos()));
     $arrObjPosts = $this->objToolkit->simplePager($objArraySectionIterator, $this->getLang("commons_next"), $this->getLang("commons_back"), "", $this->getPagename());
     //and put posts into a template
     /** @var class_module_guestbook_post $objOnePost */
     foreach ($objArraySectionIterator as $objOnePost) {
         if ($objOnePost->rightView()) {
             $strTemplatePostID = $this->objTemplate->readTemplate("/module_guestbook/" . $this->arrElementData["guestbook_template"], "post");
             $arrTemplatePost = array();
             $arrTemplatePost["post_name"] = "<a href=\"mailto:" . $objOnePost->getStrGuestbookPostEmail() . "\">" . $objOnePost->getStrGuestbookPostName() . "</a>";
             $arrTemplatePost["post_name_plain"] = $objOnePost->getStrGuestbookPostName();
             $arrTemplatePost["post_email"] = $objOnePost->getStrGuestbookPostEmail();
             $arrTemplatePost["post_page"] = "<a href=\"http://" . $objOnePost->getStrGuestbookPostPage() . "\">" . $objOnePost->getStrGuestbookPostPage() . "</a>";
             //replace encoded newlines
             $arrTemplatePost["post_text"] = uniStrReplace("&lt;br /&gt;", "<br />", $objOnePost->getStrGuestbookPostText());
             $arrTemplatePost["post_date"] = timeToString($objOnePost->getIntGuestbookPostDate());
             $arrTemplate["liste_posts"] .= $this->objTemplate->fillTemplate($arrTemplatePost, $strTemplatePostID, false);
         }
     }
     //link to the post-form & pageview links
     $arrTemplate["link_newentry"] = getLinkPortal($this->getParam("page") ? $this->getParam("page") : "", "", "", $this->getLang("eintragen"), "insertGuestbook");
     $arrTemplate["link_forward"] = $arrObjPosts["strForward"];
     $arrTemplate["link_pages"] = $arrObjPosts["strPages"];
     $arrTemplate["link_back"] = $arrObjPosts["strBack"];
     $strTemplateID = $this->objTemplate->readTemplate("/module_guestbook/" . $this->arrElementData["guestbook_template"], "list");
     $strReturn .= $this->fillTemplate($arrTemplate, $strTemplateID);
     return $strReturn . "";
 }
 /**
  * Returns a list of comments.
  *
  * @return string
  * @permissions view
  */
 protected function actionList()
 {
     $strReturn = "";
     $strPosts = "";
     $strForm = "";
     $strNewButton = "";
     //pageid or systemid to filter?
     $strSystemidfilter = "";
     $strPagefilter = $this->strPagefilter;
     if ($this->getSystemid() != "") {
         $strSystemidfilter = $this->getSystemid();
     }
     if ($strPagefilter === null && class_module_pages_page::getPageByName($this->getPagename()) !== null) {
         $strPagefilter = class_module_pages_page::getPageByName($this->getPagename())->getSystemid();
     }
     $intNrOfPosts = isset($this->arrElementData["int1"]) ? $this->arrElementData["int1"] : 0;
     //Load all posts
     $objArraySectionIterator = new class_array_section_iterator(class_module_postacomment_post::getNumberOfPostsAvailable(true, $strPagefilter, $strSystemidfilter, $this->getStrPortalLanguage()));
     $objArraySectionIterator->setIntElementsPerPage($intNrOfPosts);
     $objArraySectionIterator->setPageNumber((int) ($this->getParam("pvPAC") != "" ? $this->getParam("pvPAC") : 1));
     $objArraySectionIterator->setArraySection(class_module_postacomment_post::loadPostList(true, $strPagefilter, $strSystemidfilter, $this->getStrPortalLanguage(), $objArraySectionIterator->calculateStartPos(), $objArraySectionIterator->calculateEndPos()));
     //params to add?
     $strAdd = "";
     if ($this->getParam("action") != "") {
         $strAdd .= "&action=" . $this->getParam("action");
     }
     if ($this->getParam("systemid") != "") {
         $strAdd .= "&systemid=" . $this->getParam("systemid");
     }
     if ($this->getParam("pv") != "") {
         $strAdd .= "&pv=" . $this->getParam("pv");
     }
     $arrComments = $this->objToolkit->simplePager($objArraySectionIterator, $this->getLang("commons_next"), $this->getLang("commons_back"), "", $this->getPagename(), $strAdd, "pvPAC");
     $strTemplateID = $this->objTemplate->readTemplate("/module_postacomment/" . $this->arrElementData["char1"], "postacomment_post");
     if (!$objArraySectionIterator->valid()) {
         $strPosts .= $this->getLang("postacomment_empty");
     }
     //Check rights
     /** @var class_module_postacomment_post $objOnePost */
     foreach ($objArraySectionIterator as $objOnePost) {
         if ($objOnePost->rightView()) {
             $strOnePost = "";
             $arrOnePost = array();
             $arrOnePost["postacomment_post_name"] = $objOnePost->getStrUsername();
             $arrOnePost["postacomment_post_subject"] = $objOnePost->getStrTitle();
             $arrOnePost["postacomment_post_message"] = $objOnePost->getStrComment();
             $arrOnePost["postacomment_post_systemid"] = $objOnePost->getSystemid();
             $arrOnePost["postacomment_post_date"] = timeToString($objOnePost->getIntDate(), true);
             //ratings available?
             if ($objOnePost->getFloatRating() !== null) {
                 /** @var $objRating class_module_rating_portal */
                 $objRating = class_module_system_module::getModuleByName("rating")->getPortalInstanceOfConcreteModule();
                 $arrOnePost["postacomment_post_rating"] = $objRating->buildRatingBar($objOnePost->getFloatRating(), $objOnePost->getIntRatingHits(), $objOnePost->getSystemid(), $objOnePost->isRateableByUser(), $objOnePost->rightRight2());
             }
             $strOnePost .= $this->objTemplate->fillTemplate($arrOnePost, $strTemplateID, false);
             //Add pe code
             $arrPeConfig = array("pe_module" => "postacomment", "pe_action_edit" => "edit", "pe_action_edit_params" => "&systemid=" . $objOnePost->getSystemid(), "pe_action_new" => "", "pe_action_new_params" => "", "pe_action_delete" => "delete", "pe_action_delete_params" => "&systemid=" . $objOnePost->getSystemid());
             $strPosts .= class_element_portal::addPortalEditorCode($strOnePost, $objOnePost->getSystemid(), $arrPeConfig);
         }
     }
     //Create form
     if ($this->getObjModule()->rightRight1()) {
         $strTemplateID = $this->objTemplate->readTemplate("/module_postacomment/" . $this->arrElementData["char1"], "postacomment_form");
         $arrForm = array();
         if ($this->getParam("comment_name") == "" && $this->objSession->isLoggedin()) {
             $this->setParam("comment_name", $this->objSession->getUsername());
         }
         $arrForm["formaction"] = class_link::getLinkPortalHref($this->getPagename(), "", "postComment", "", $this->getSystemid());
         $arrForm["comment_name"] = $this->getParam("comment_name");
         $arrForm["comment_subject"] = $this->getParam("comment_subject");
         $arrForm["comment_message"] = $this->getParam("comment_message");
         $arrForm["comment_template"] = $this->arrElementData["char1"];
         $arrForm["comment_systemid"] = $this->getSystemid();
         $arrForm["comment_page"] = $this->getPagename();
         $arrForm["validation_errors"] = $this->strErrors;
         foreach ($arrForm as $strKey => $strValue) {
             if (uniStrpos($strKey, "comment_") !== false) {
                 $arrForm[$strKey] = htmlspecialchars($strValue, ENT_QUOTES, "UTF-8", false);
             }
         }
         $strForm .= $this->objTemplate->fillTemplate($arrForm, $strTemplateID, false);
         //button to show the form
         $strTemplateNewButtonID = $this->objTemplate->readTemplate("/module_postacomment/" . $this->arrElementData["char1"], "postacomment_new_button");
         $strNewButton = $this->objTemplate->fillTemplate(array("comment_systemid" => $this->getSystemid()), $strTemplateNewButtonID, false);
     }
     //add sourrounding list template
     $strTemplateID = $this->objTemplate->readTemplate("/module_postacomment/" . $this->arrElementData["char1"], "postacomment_list");
     //link to the post-form & pageview links
     $arrTemplate = array();
     $arrTemplate["postacomment_forward"] = $arrComments["strForward"];
     $arrTemplate["postacomment_pages"] = $arrComments["strPages"];
     $arrTemplate["postacomment_back"] = $arrComments["strBack"];
     $arrTemplate["postacomment_form"] = $strForm;
     $arrTemplate["postacomment_new_button"] = $strNewButton;
     $arrTemplate["postacomment_systemid"] = $this->getSystemid();
     $arrTemplate["postacomment_list"] = $strPosts;
     $strReturn .= $this->fillTemplate($arrTemplate, $strTemplateID);
     return $strReturn;
 }
 /**
  * Creates a list of thumbnails
  *
  * @return string
  * @permissions view
  */
 protected function actionList()
 {
     $strReturn = "";
     //Determin the prev_id to load
     if (!validateSystemid($this->getSystemid()) || !$this->checkIfRequestedIdIsInElementsTree()) {
         $this->setSystemid($this->arrElementData["repo_id"]);
     }
     $bitPageview = true;
     if ($this->arrElementData["repo_elementsperpage"] <= 0) {
         $this->arrElementData["repo_elementsperpage"] = $this->getNumberOfEntriesOnLevel();
         $bitPageview = false;
     }
     $objArraySectionIterator = new class_array_section_iterator($this->getNumberOfEntriesOnLevel());
     $objArraySectionIterator->setIntElementsPerPage($this->arrElementData["repo_elementsperpage"]);
     $objArraySectionIterator->setPageNumber($this->getParam("pv"));
     $objArraySectionIterator->setArraySection($this->getArrFiles($objArraySectionIterator->calculateStartPos(), $objArraySectionIterator->calculateEndPos()));
     $arrPagerContent = $this->objToolkit->simplePager($objArraySectionIterator, $this->getLang("commons_next"), $this->getLang("commons_back"), $this->getParam("action"), $this->getPagename(), "&systemid=" . $this->getSystemid(), "pv", "/module_mediamanager/" . $this->arrElementData["repo_template"]);
     //Loop over every item and collect them
     $arrWrappingTemplate = array();
     $arrWrappingTemplate["systemid"] = $this->arrElementData["content_id"];
     $arrWrappingTemplate["folderlist"] = "";
     $arrWrappingTemplate["filelist"] = "";
     if ($objArraySectionIterator->getNumberOfElements() == 0) {
         $strReturn = $this->getLang("commons_list_empty");
     }
     $intFileCounter = 0;
     $arrRemainingFiles = array();
     //calc number of images outside the loop
     $intNrOfFilesPerRow = $this->getFilesPerRow($this->arrElementData["repo_template"]);
     /** @var class_module_mediamanager_file $objOneFile */
     foreach ($objArraySectionIterator as $objOneFile) {
         //Check rights and the existance of placeholders
         if ($intNrOfFilesPerRow > 0 && $objOneFile->rightView()) {
             //Folder or file?
             //file
             if ($objOneFile->getIntType() == class_module_mediamanager_file::$INT_TYPE_FILE) {
                 $arrWrappingTemplate["filelist"] .= $this->renderFileListEntry($objOneFile, $intFileCounter++, $intNrOfFilesPerRow, $arrRemainingFiles);
             }
             //Folder
             if ($objOneFile->getIntType() == class_module_mediamanager_file::$INT_TYPE_FOLDER) {
                 $arrWrappingTemplate["folderlist"] .= $this->renderFolderListEntry($objOneFile);
             }
         }
     }
     //Print remaining files
     if (count($arrRemainingFiles) > 0) {
         $strTemplateID = $this->objTemplate->readTemplate("/module_mediamanager/" . $this->arrElementData["repo_template"], "filelist");
         $arrWrappingTemplate["filelist"] .= $this->objTemplate->fillTemplate($arrRemainingFiles, $strTemplateID, false);
     }
     //and load the sourrounding template
     if ($bitPageview) {
         $arrWrappingTemplate["link_forward"] = $arrPagerContent["strForward"];
         $arrWrappingTemplate["link_pages"] = $arrPagerContent["strPages"];
         $arrWrappingTemplate["link_back"] = $arrPagerContent["strBack"];
     }
     $strTemplateID = $this->objTemplate->readTemplate("/module_mediamanager/" . $this->arrElementData["repo_template"], "list");
     $arrWrappingTemplate["pathnavigation"] = $this->generatePathnavi();
     $strReturn .= $this->fillTemplate($arrWrappingTemplate, $strTemplateID);
     $strReturn = $this->addPortaleditorCode($strReturn);
     return $strReturn;
 }
 /**
  * Show a logbook of all downloads
  *
  * @return string
  * @permissions edit
  * @autoTestable
  */
 protected function actionLogbook()
 {
     $strReturn = "";
     $intNrOfRecordsPerPage = 25;
     $strReturn .= $this->objToolkit->getTextRow(class_link::getLinkAdmin($this->getArrModule("modul"), "logbookFlush", "", $this->getLang("action_logbook_flush"), "") . "<br />");
     $objLogbook = new class_module_mediamanager_logbook();
     $objArraySectionIterator = new class_array_section_iterator($objLogbook->getLogbookDataCount());
     $objArraySectionIterator->setIntElementsPerPage($intNrOfRecordsPerPage);
     $objArraySectionIterator->setPageNumber((int) ($this->getParam("pv") != "" ? $this->getParam("pv") : 1));
     $objArraySectionIterator->setArraySection($objLogbook->getLogbookData($objArraySectionIterator->calculateStartPos(), $objArraySectionIterator->calculateEndPos()));
     $arrLogs = array();
     foreach ($objArraySectionIterator as $intKey => $arrOneLog) {
         $arrLogs[$intKey][0] = $arrOneLog["downloads_log_id"];
         $arrLogs[$intKey][1] = timeToString($arrOneLog["downloads_log_date"]);
         $arrLogs[$intKey][2] = $arrOneLog["downloads_log_file"];
         $arrLogs[$intKey][3] = $arrOneLog["downloads_log_user"];
         $arrLogs[$intKey][4] = $arrOneLog["downloads_log_ip"];
         $strUtraceLinkMap = "href=\"http://www.utrace.de/ip-adresse/" . $arrOneLog["downloads_log_ip"] . "\" target=\"_blank\"";
         $strUtraceLinkText = "href=\"http://www.utrace.de/whois/" . $arrOneLog["downloads_log_ip"] . "\" target=\"_blank\"";
         if ($arrOneLog["downloads_log_ip"] != "127.0.0.1" && $arrOneLog["downloads_log_ip"] != "::1") {
             $arrLogs[$intKey][5] = class_link::getLinkAdminManual($strUtraceLinkMap, "", $this->getLang("login_utrace_showmap", "user"), "icon_earth") . " " . class_link::getLinkAdminManual($strUtraceLinkText, "", $this->getLang("login_utrace_showtext", "user"), "icon_text");
         } else {
             $arrLogs[$intKey][5] = class_adminskin_helper::getAdminImage("icon_earthDisabled", $this->getLang("login_utrace_noinfo", "user")) . " " . class_adminskin_helper::getAdminImage("icon_textDisabled", $this->getLang("login_utrace_noinfo", "user"));
         }
     }
     //Create a data-table
     $arrHeader = array();
     $arrHeader[0] = $this->getLang("header_id");
     $arrHeader[1] = $this->getLang("commons_date");
     $arrHeader[2] = $this->getLang("header_file");
     $arrHeader[3] = $this->getLang("header_user");
     $arrHeader[4] = $this->getLang("header_ip");
     $arrHeader[5] = $this->getLang("login_utrace", "user");
     $strReturn .= $this->objToolkit->dataTable($arrHeader, $arrLogs);
     $strReturn .= $this->objToolkit->getPageview($objArraySectionIterator, $this->getArrModule("modul"), "logbook");
     return $strReturn;
 }
 /**
  * Returns a list of news.
  * As defined in the element, this could be an archive or a normal list
  *
  * @return string
  */
 protected function actionNewsList()
 {
     $strReturn = "";
     //Load news using the correct filter
     if ($this->getParam("filterid") != "") {
         $strFilterId = $this->getParam("filterid");
     } else {
         $strFilterId = $this->arrElementData["news_category"];
     }
     $strPageview = 1;
     if ($this->getParam("pv") != 1 && $this->getSystemid() == $this->arrElementData["content_id"]) {
         $strPageview = $this->getParam("pv");
     }
     //Load all posts
     $objArraySectionIterator = new class_array_section_iterator(class_module_news_news::getNewsCountPortal($this->arrElementData["news_mode"], $strFilterId));
     $objArraySectionIterator->setIntElementsPerPage($this->arrElementData["news_amount"]);
     $objArraySectionIterator->setPageNumber((int) $strPageview);
     $objArraySectionIterator->setArraySection(class_module_news_news::loadListNewsPortal($this->arrElementData["news_mode"], $strFilterId, $this->arrElementData["news_order"], $objArraySectionIterator->calculateStartPos(), $objArraySectionIterator->calculateEndPos()));
     $arrNews = $this->objToolkit->simplePager($objArraySectionIterator, $this->getLang("commons_next"), $this->getLang("commons_back"), "", $this->getPagename(), "&systemid=" . $this->arrElementData["content_id"], "pv", "/module_news/" . $this->arrElementData["news_template"]);
     //Check rights
     if (!$objArraySectionIterator->valid()) {
         $strReturn .= $this->getLang("news_list_empty");
     }
     foreach ($objArraySectionIterator as $objOneNews) {
         /** @var $objOneNews class_module_news_news */
         if ($objOneNews instanceof class_module_news_news && $objOneNews->rightView()) {
             $objMapper = new class_template_mapper($objOneNews);
             //generate a link to the details
             $objMapper->addPlaceholder("news_more_link", class_link::getLinkPortal($this->arrElementData["news_detailspage"], "", "", $this->getLang("news_mehr"), "newsDetail", "", $objOneNews->getSystemid(), "", "", $objOneNews->getStrTitle()));
             $objMapper->addPlaceholder("news_more_link_href", class_link::getLinkPortalHref($this->arrElementData["news_detailspage"], "", "newsDetail", "", $objOneNews->getSystemid(), "", $objOneNews->getStrTitle()));
             $objMapper->addPlaceholder("news_start_date", dateToString($objOneNews->getObjStartDate(), false));
             $objMapper->addPlaceholder("news_id", $objOneNews->getSystemid());
             $objMapper->addPlaceholder("news_title", $objOneNews->getStrTitle());
             $objMapper->addPlaceholder("news_intro", $objOneNews->getStrIntro());
             $objMapper->addPlaceholder("news_text", $objOneNews->getStrText());
             //reset more link? -> no text, no image and no redirect page
             if (uniStrlen(htmlStripTags($objOneNews->getStrText())) == 0 && uniStrlen($objOneNews->getStrImage()) == 0 && ($objOneNews->getIntRedirectEnabled() == "0" || $objOneNews->getStrRedirectPage() == "")) {
                 $objMapper->addPlaceholder("news_more_link", "");
             }
             //postacomment
             $arrPAC = $this->loadPostacomments($objOneNews->getSystemid(), $objOneNews->getStrImage() != "" ? "news_list_image" : "news_list");
             if ($arrPAC != null) {
                 $objMapper->addPlaceholder("news_nrofcomments", $arrPAC["nrOfComments"]);
                 $objMapper->addPlaceholder("news_commentlist", $arrPAC["commentList"]);
             }
             //ratings
             if ($objOneNews->getFloatRating() !== null) {
                 /** @var $objRating class_module_rating_portal */
                 $objRating = class_module_system_module::getModuleByName("rating")->getPortalInstanceOfConcreteModule();
                 $objMapper->addPlaceholder("news_rating", $objRating->buildRatingBar($objOneNews->getFloatRating(), $objOneNews->getIntRatingHits(), $objOneNews->getSystemid(), $objOneNews->isRateableByUser(), $objOneNews->rightRight3()));
             }
             //categories
             $objMapper->addPlaceholder("news_categories", $this->renderCategoryTitles($objOneNews));
             //load template section with or without image?
             if ($objOneNews->getStrImage() != "") {
                 $objMapper->addPlaceholder("news_image", urlencode($objOneNews->getStrImage()));
                 $strOneNews = $objMapper->writeToTemplate("/module_news/" . $this->arrElementData["news_template"], "news_list_image");
             } else {
                 $strOneNews = $objMapper->writeToTemplate("/module_news/" . $this->arrElementData["news_template"], "news_list");
             }
             //Add pe code
             $arrPeConfig = array("pe_module" => "news", "pe_action_edit" => "editNews", "pe_action_edit_params" => "&systemid=" . $objOneNews->getSystemid(), "pe_action_new" => "newNews", "pe_action_new_params" => "", "pe_action_delete" => "delete", "pe_action_delete_params" => "&systemid=" . $objOneNews->getSystemid());
             $strReturn .= class_element_portal::addPortalEditorCode($strOneNews, $objOneNews->getSystemid(), $arrPeConfig);
         }
     }
     $arrWrapperTemplate = array();
     $arrWrapperTemplate["news"] = $strReturn;
     $arrWrapperTemplate["link_forward"] = $arrNews["strForward"];
     $arrWrapperTemplate["link_pages"] = $arrNews["strPages"];
     $arrWrapperTemplate["link_back"] = $arrNews["strBack"];
     $strReturn = $this->fillTemplate($arrWrapperTemplate, $this->objTemplate->readTemplate("/module_news/" . $this->arrElementData["news_template"], "news_list_wrapper"));
     return $strReturn;
 }
 /**
  * Returns a list of all categories and all news
  * The list could be filtered by categories
  *
  * @return string
  * @autoTestable
  * @permissions view
  */
 protected function actionListNewsAndCategories()
 {
     $objIterator = new class_array_section_iterator(class_module_news_category::getObjectCount());
     $objIterator->setIntElementsPerPage(class_module_news_category::getObjectCount());
     $objIterator->setPageNumber(1);
     $objIterator->setArraySection(class_module_news_category::getObjectList("", $objIterator->calculateStartPos(), $objIterator->calculateEndPos()));
     $strReturn = $this->renderList($objIterator, false, class_module_news_admin::STR_CAT_LIST);
     $objIterator = new class_array_section_iterator(class_module_news_news::getObjectCount($this->getParam("filterId")));
     $objIterator->setPageNumber($this->getParam("pv"));
     $objIterator->setArraySection(class_module_news_news::getObjectList($this->getParam("filterId"), $objIterator->calculateStartPos(), $objIterator->calculateEndPos()));
     $strReturn .= $this->renderList($objIterator, false, class_module_news_admin::STR_NEWS_LIST, false, "&filterId=" . $this->getParam("filterId"));
     return $strReturn;
 }
 /**
  * Show a log of all queries
  *
  * @return string
  * @permissions edit
  * @autoTestable
  */
 protected function actionLogs()
 {
     $strReturn = "";
     $intNrOfRecordsPerPage = 25;
     $objLog = new class_module_packageserver_log();
     $objArraySectionIterator = new class_array_section_iterator($objLog->getLogDataCount());
     $objArraySectionIterator->setIntElementsPerPage($intNrOfRecordsPerPage);
     $objArraySectionIterator->setPageNumber((int) ($this->getParam("pv") != "" ? $this->getParam("pv") : 1));
     $objArraySectionIterator->setArraySection($objLog->getLogData($objArraySectionIterator->calculateStartPos(), $objArraySectionIterator->calculateEndPos()));
     $arrLogs = array();
     foreach ($objArraySectionIterator as $intKey => $arrOneLog) {
         $arrLogs[$intKey][0] = dateToString(new class_date($arrOneLog["log_date"]));
         $arrLogs[$intKey][1] = $arrOneLog["log_ip"];
         $arrLogs[$intKey][2] = $arrOneLog["log_hostname"];
         $arrLogs[$intKey][3] = $arrOneLog["log_query"];
     }
     //Create a data-table
     $arrHeader = array();
     $arrHeader[0] = $this->getLang("commons_date");
     $arrHeader[1] = $this->getLang("header_ip");
     $arrHeader[2] = $this->getLang("header_hostname");
     $arrHeader[3] = $this->getLang("header_query");
     $strReturn .= $this->objToolkit->dataTable($arrHeader, $arrLogs);
     $strReturn .= $this->objToolkit->getPageview($objArraySectionIterator, $this->getArrModule("modul"), "logs");
     return $strReturn;
 }