コード例 #1
0
 /**
  * Method invoking the hook-methods to generate a form.
  *
  * @param string $strTargetModule
  * @param string $strTargetAction
  * @param string|class_admin_formgenerator $objAdminForm
  *
  * @return string
  */
 public final function generateAdminForm($strTargetModule = "system", $strTargetAction = "systemTasks", $objAdminForm = null)
 {
     $strReturn = "";
     $objAdminForm = $objAdminForm == null ? $this->getAdminForm() : $objAdminForm;
     if ($objAdminForm instanceof class_admin_formgenerator) {
         $objAdminForm->addField(new class_formentry_hidden("", "execute"))->setStrValue("true");
         $objAdminForm->addField(new class_formentry_button("", "systemtask_run"))->setStrLabel($this->objLang->getLang("systemtask_run", "system"))->setStrValue("submit");
         if ($this->bitMultipartform) {
             $objAdminForm->setStrFormEncoding(class_admin_formgenerator::FORM_ENCTYPE_MULTIPART);
         }
         $strLink = class_link::getLinkAdminHref($strTargetModule, $strTargetAction, "task=" . $this->getStrInternalTaskName());
         $strReturn = $objAdminForm->renderForm($strLink, 0);
     } else {
         if ($objAdminForm != "") {
             if ($this->bitMultipartform) {
                 $strReturn .= $this->objToolkit->formHeader(class_link::getLinkAdminHref($strTargetModule, $strTargetAction, "task=" . $this->getStrInternalTaskName()), "taskParamForm", class_admin_formgenerator::FORM_ENCTYPE_MULTIPART);
             } else {
                 $strReturn .= $this->objToolkit->formHeader(class_link::getLinkAdminHref($strTargetModule, $strTargetAction, "task=" . $this->getStrInternalTaskName()), "taskParamForm");
             }
             $strReturn .= $objAdminForm;
             $strReturn .= $this->objToolkit->formInputHidden("execute", "true");
             $strReturn .= $this->objToolkit->formInputSubmit($this->objLang->getLang("systemtask_run", "system"));
             $strReturn .= $this->objToolkit->formClose();
         }
     }
     return $strReturn;
 }
コード例 #2
0
ファイル: class_root.php プロジェクト: jinshana/kajonacms
 /**
  * Used to load a property.
  * If you want to provide a list of parameters but no module (automatic loading), pass
  * the parameters array as the second argument (an array). In this case the module is resolved
  * internally.
  *
  * @param string $strName
  * @param string|array $strModule Either the module name (if required) or an array of parameters
  * @param array $arrParameters
  *
  * @return string
  */
 public function getLang($strName, $strModule = "", $arrParameters = array())
 {
     if (is_array($strModule)) {
         $arrParameters = $strModule;
     }
     if ($strModule == "" || is_array($strModule)) {
         $strModule = $this->getArrModule("modul");
     }
     //Now we have to ask the Text-Object to return the text
     return $this->objLang->getLang($strName, $strModule, $arrParameters);
 }
コード例 #3
0
 /**
  * @return string
  */
 public function getReport()
 {
     $strReturn = "";
     //Create Data-table
     $arrHeader = array();
     $arrValues = array();
     //Fetch data
     $arrStats = $this->getTopVisitors();
     //calc a few values
     $intSum = 0;
     foreach ($arrStats as $arrOneStat) {
         $intSum += $arrOneStat["anzahl"];
     }
     $intI = 0;
     $objUser = new class_module_user_user(class_session::getInstance()->getUserID());
     foreach ($arrStats as $arrOneStat) {
         //Escape?
         if ($intI >= $objUser->getIntItemsPerPage()) {
             break;
         }
         $arrValues[$intI] = array();
         $arrValues[$intI][] = $intI + 1;
         if ($arrOneStat["stats_hostname"] != "" and $arrOneStat["stats_hostname"] != "na") {
             $arrValues[$intI][] = $arrOneStat["stats_hostname"];
         } else {
             $arrValues[$intI][] = $arrOneStat["stats_ip"];
         }
         $arrValues[$intI][] = $arrOneStat["anzahl"];
         $arrValues[$intI][] = $this->objToolkit->percentBeam($arrOneStat["anzahl"] / $intSum * 100);
         $strUtraceLinkMap = "href=\"http://www.utrace.de/ip-adresse/" . $arrOneStat["stats_ip"] . "\" target=\"_blank\"";
         $strUtraceLinkText = "href=\"http://www.utrace.de/whois/" . $arrOneStat["stats_ip"] . "\" target=\"_blank\"";
         if ($arrOneStat["stats_ip"] != "127.0.0.1" && $arrOneStat["stats_ip"] != "::1") {
             $arrValues[$intI][] = class_link::getLinkAdminManual($strUtraceLinkMap, "", $this->objLang->getLang("login_utrace_showmap", "user"), "icon_earth") . " " . class_link::getLinkAdminManual($strUtraceLinkText, "", $this->objLang->getLang("login_utrace_showtext", "user"), "icon_text");
         } else {
             $arrValues[$intI][] = getImageAdmin("icon_earthDisabled", $this->objLang->getLang("login_utrace_noinfo", "user")) . " " . getImageAdmin("icon_textDisabled", $this->objLang->getLang("login_utrace_noinfo", "user"));
         }
         $intI++;
     }
     //HeaderRow
     $arrHeader[] = "#";
     $arrHeader[] = $this->objLang->getLang("top_visitor_titel", "stats");
     $arrHeader[] = $this->objLang->getLang("commons_hits_header", "stats");
     $arrHeader[] = $this->objLang->getLang("anteil", "stats");
     $arrHeader[] = $this->objLang->getLang("login_utrace", "user");
     $strReturn .= $this->objToolkit->dataTable($arrHeader, $arrValues);
     $strReturn .= $this->objToolkit->getTextRow($this->objLang->getLang("stats_hint_task", "stats"));
     return $strReturn;
 }
コード例 #4
0
 /**
  * Loads a text-fragement from the textfiles
  *
  * @param string $strKey
  * @param array $arrParameters
  *
  * @return string
  */
 public final function getLang($strKey, $arrParameters = array())
 {
     return $this->objLang->getLang($strKey, "adminwidget", $arrParameters);
 }
コード例 #5
0
ファイル: installer.php プロジェクト: jinshana/kajonacms
 /**
  * Loads a text
  *
  * @param string $strKey
  * @param array $arrParameters
  *
  * @return string
  */
 private function getLang($strKey, $arrParameters = array())
 {
     return $this->objLang->getLang($strKey, "installer", $arrParameters);
 }