function check_setup() { echo "<center><small><pre>"; echo check_msg("PHP Version >= 5.3", true, "5.3.6"); echo check_msg("Write access to folder PATH_CACHE (" . PATH_CACHE . ")", true, "777"); echo check_msg("Write access to folder PATH_TEMP (" . PATH_TEMP . ")", true, "777"); echo check_msg("Write access to file LOG_ERROR (" . LOG_ERROR . ")", true, "766"); echo check_msg("Write access to file LOG_MESSAGES (" . LOG_MESSAGES . ")", true, "766"); echo check_msg("Write access to file LOG_SECURITY (" . LOG_SECURITY . ")", true, "766"); echo check_msg("PHP Module: mysql"); echo check_msg("PHP Module: mcrypt"); echo check_msg("PHP Module: ldap"); echo check_msg("PHP Module: gd"); echo check_msg("PHP Module: iimagick"); echo check_msg("PHP Module: gettext"); echo check_msg("PHP Module: curl"); echo check_msg("PHP Module: zip"); echo check_msg("PHP Option: TIMEZONE"); echo check_msg("PHP Option: MAGIC_QUOTES_GPC"); echo check_msg("PHP Option: MAGIC_QUOTES_RUNTIME"); echo check_msg("PHP Option: MAGIC_QUOTES_SYBASE"); echo check_msg("PHP Option: MEMORY_LIMIT"); echo check_msg("PHP Option: SAFE_MODE"); echo check_msg("sTeam: check connection"); echo check_msg("sTeam: check root access"); echo check_msg("sTeam: check guest access"); echo check_msg("sTeam: version"); echo check_msg("sTeam: koala_support"); echo check_msg("sTeam: client_support"); echo check_msg("mysql: check connection"); echo check_msg("mysql: check access"); echo "</pre></small></center>"; }
function check_stocket($ary) { $ary['pass'] = check_msg(socket_create(AF_INET, SOCK_STREAM, SOL_TCP)); return $ary; }
function check_online($ary) { if (@fsockopen("www.baidu.com", 80, &$errno, &$errstr, 5) || @fsockopen("www.g.cn", 80, &$errno, &$errstr, 5)) { $ary['pass'] = check_msg(true); } else { $ary['pass'] = check_msg(false); } return $ary; }
function page($index, $title, $where, $time, $wysiwyg = '') { global $db, $userid, $userip, $tmpdir, $secureLogin, $chkMe, $charset; global $u_b1, $u_b2, $designpath, $maxwidth, $language, $cp_color; // user gebannt? Logge aus! if ($chkMe == 'banned') { header("Location: ../user/?action=logout"); } // JS-Dateine einbinden $lng = $language == 'deutsch' ? 'de' : 'en'; $edr = $wysiwyg == '_word' ? 'advanced' : 'normal'; $lcolor = $cp_color == 1 ? 'lcolor=true;' : ''; $java_vars = '<script language="javascript" type="text/javascript"> <!-- var maxW = ' . $maxwidth . ',lng = \'' . $lng . '\',dzcp_editor = \'' . $edr . '\';' . $lcolor . ' //--> </script> <script language="javascript" type="text/javascript" src="' . $designpath . '/_js/wysiwyg' . $wysiwyg . '.js"></script>'; if (settings("wmodus") && $chkMe != 4) { if ($secureLogin == 1) { $secure = show("menu/secure", array("help" => _login_secure_help, "security" => _register_confirm)); } $login = show("errors/wmodus_login", array("what" => _login_login, "secure" => $secure, "signup" => _login_signup, "permanent" => _login_permanent, "lostpwd" => _login_lostpwd)); echo show("errors/wmodus", array("wmodus" => _wartungsmodus, "head" => _wartungsmodus_head, "tmpdir" => $tmpdir, "java_vars" => $java_vars, "dir" => $designpath, "title" => re(strip_tags($title)), "login" => $login)); } else { updateCounter(); update_maxonline(); //check permissions if ($chkMe == "unlogged") { include_once basePath . '/inc/menu-functions/login.php'; } else { $check_msg = check_msg(); set_lastvisit(); db("UPDATE " . $db['users'] . "\n SET `time` = '" . (int) time() . "',\n `whereami` = '" . up($where) . "'\n WHERE id = '" . intval($userid) . "'"); } //init templateswitch $tmps = get_files('../inc/_templates_/'); for ($i = 0; $i < count($tmps); $i++) { if ($gets['tmpdir'] == $tmps[$i]) { $selt = "selected=\"selected\""; } else { $selt = ""; } $tmpldir .= show(_select_field, array("value" => "../user/?action=switch&set=" . $tmps[$i], "what" => $tmps[$i], "sel" => $selt)); } //misc vars $template_switch = show("menu/tmp_switch", array("templates" => $tmpldir)); $clanname = re(settings("clanname")); $time = show(_generated_time, array("time" => $time)); $headtitle = show(_index_headtitle, array("clanname" => $clanname)); $rss = $clanname; $dir = $designpath; $title = re(strip_tags($title)); $index = empty($index) ? '' : (empty($check_msg) ? '' : $check_msg) . '<table class="mainContent" cellspacing="1" style="margin-top:0">' . $index . '</table>'; //-> Sort & filter placeholders //default placeholders $arr = array("idir" => '../inc/images/admin', "dir" => $designpath); //check if placeholders are given $pholder = file_get_contents($designpath . "/index.html"); //filter placeholders $blArr = array("[title]", "[copyright]", "[java_vars]", "[login]", "[template_switch]", "[headtitle]", "[index]", "[time]", "[rss]", "[dir]", "[charset]"); for ($i = 0; $i <= count($blArr) - 1; $i++) { if (preg_match("#" . $blArr[$i] . "#", $pholder)) { $pholdervars .= $blArr[$i]; } } for ($i = 0; $i <= count($blArr) - 1; $i++) { $pholder = str_replace($blArr[$i], "", $pholder); } $pholder = pholderreplace($pholder); $pholdervars = pholderreplace($pholdervars); //put placeholders in array $pholder = explode("^", $pholder); for ($i = 0; $i <= count($pholder) - 1; $i++) { if (strstr($pholder[$i], 'nav_')) { eval("\$arr[" . $pholder[$i] . "] = navi('" . $pholder[$i] . "');"); } else { if (@file_exists(basePath . '/inc/menu-functions/' . $pholder[$i] . '.php')) { include_once basePath . '/inc/menu-functions/' . $pholder[$i] . '.php'; } @eval("if(function_exists('" . $pholder[$i] . "')){\$arr[" . $pholder[$i] . "] = " . $pholder[$i] . "();}"); } } $pholdervars = explode("^", $pholdervars); for ($i = 0; $i <= count($pholdervars) - 1; $i++) { eval("\$arr[" . $pholdervars[$i] . "] = \$" . $pholdervars[$i] . ";"); } //index output echo show("index", $arr); } }