function show() { global $gorumroll, $lll, $gorumuser, $dontRemoveInstallFiles, $CONFIG_FILE_DIR, $noahVersion; JavaScript::addCss(CSS_DIR . "/checkconf.css?{$noahVersion}"); $_GS = new GlobalStat(); if ($_GS->congrat) { View::assign("congrat", $lll["congrat"]); $_GS->congrat = FALSE; modify($_GS); } $report = array(); $st = join("", file($CONFIG_FILE_DIR . "/config.php")); $p = "^<\\?"; $cfe = FALSE; if (!ereg($p, $st)) { $cfe = TRUE; $report[] = array($lll["confpreerr"], 'conferr'); } $p = "\\?>\$"; $p1 = "\\?>\n\$"; $p2 = "\\?>\r\n\$"; if (!ereg($p, $st) && !ereg($p1, $st) && !ereg($p2, $st)) { $cfe = TRUE; $report[] = array($lll["confposterr"], 'conferr'); } if ($cfe) { $report[] = array($lll["conffileok"], 'confok'); } if ($gorumuser->password == getPassword("admin")) { $report[] = array($lll["chadmpass"], 'conferr'); } $_S =& new AppSettings(); if ($_S->adminEmail == "") { $report[] = array($lll["chsyspass"], 'conferr'); $report[] = array($lll["chsyspass_expl"], 'confexpl'); } else { $ctrl = new AppController("checkconf/mailtest"); $report[] = array($ctrl->generAnchor($lll["triggerMailTest"]), 'confok'); } if (!defined("IMG_GIF") || !function_exists("ImageTypes")) { $report[] = array($lll["nogd"], 'conferr'); $report[] = array($lll["nogd_expl"], 'confexpl'); } if (!is_writeable(ini_get("session.save_path"))) { $error_message = "The configured Path for Session files (" . ini_get("session.save_path") . ") is not writeable!"; } $this->checkWritePermission($noPermDirs); if (count($noPermDirs)) { $report[] = array(sprintf($lll["nopermission"], implode(", ", $noPermDirs)), 'conferr'); $report[] = array($lll["nopermission_expl"], 'confexpl'); } $this->checkReadPermission($noPermDirs); if (count($noPermDirs)) { $report[] = array(sprintf($lll["nopermission_read"], implode(", ", $noPermDirs)), 'conferr'); $report[] = array($lll["nopermission_read_expl"], 'confexpl'); } // Nice URL section: View::assign("rewriteOn", $gorumroll->rewriteOn); if (!$gorumroll->rewriteOn) { if (function_exists("apache_get_modules")) { View::assign("rewriteModuleEnabled", in_array("mod_rewrite", apache_get_modules())); } else { View::assign("rewriteModuleEnabled", "unsure"); } } // CAPTCHA test: View::assign("captchaLink", Controller::getBaseURL() . "gorum/captcha/captcha.php"); if ((!empty($dontRemoveInstallFiles) || $this->installFilesRemoved()) && $this->appFilesRemoved() && $this->backupFilesRemoved() && $_GS->defPageConf) { $ctrl =& new AppController("checkconf", "remove_first_check"); View::assign("clickToDisappear", "{$lll['confdisapp']} " . $ctrl->generAnchor($lll["here1"]) . ".<br>{$lll['confclicheck']}"); } View::assign("report", $report); }
function initCaptchaField() { global $lll; $lll["captchaField_embedfield"] = "\n <table><tr><td width='1' style='padding-right: 20px;'>\n <img src='" . Controller::getBaseURL() . "gorum/captcha/captcha.php' alt='CAPTCHA'></td><td>%s</td></tr>\n </table>"; }