function debug($msg, $file = "/_server_log.log") { $msg = print_r($msg, true); error_log($msg . "\n", 3, getDocumentRoot() . "/_server_log.log"); }
} if (isset($_SESSION) && !is_array($_SESSION)) { trigger_error("Hacking attempt (Session Variable)", E_USER_ERROR); } $http_svars = array('PHP_SELF', 'HTTP_USER_AGENT', 'SERVER_SOFTWARE', 'REMOTE_ADDR', 'SCRIPT_NAME', 'SERVER_PORT', 'SERVER_NAME', 'HTTP_REFERER', 'HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'REQUEST_URI', 'HTTP_ACCEPT_ENCODING', 'DOCUMENT_ROOT'); if (viscacha_function_exists('getallheaders')) { $ref = @getallheaders(); } else { $ref = array(); } foreach ($http_svars as $http_var) { $func_key = ''; if (substr($http_var, 0, 5) == 'HTTP_') { $func_key = strtolower(str_replace('_', ' ', substr($http_var, 5))); $func_key = str_replace(' ', '-', ucwords($func_key)); } if (empty($_SERVER[$http_var]) && !empty($ref[$func_key])) { $_SERVER[$http_var] = $ref[$func_key]; } else { $_SERVER[$http_var] = getenv($http_var); } } unset($ref); if (empty($_SERVER['DOCUMENT_ROOT'])) { $_SERVER['DOCUMENT_ROOT'] = getDocumentRoot(); if (empty($_SERVER['DOCUMENT_ROOT'])) { $_SERVER['DOCUMENT_ROOT'] = $config['fpath']; } } $_SERVER = $gpc->secure_null($_SERVER); $_ENV = $gpc->secure_null($_ENV);
protected function getFullPath($url) { return getDocumentRoot() . $url; }
return substr(jApp::wwwPath(), 0, -strlen($basepath)); } // ============ configuration of Minify if (!isset($min_allowDebugFlag)) { $min_allowDebugFlag = false; } if (!isset($min_errorLogger)) { $min_errorLogger = false; } $min_enableBuilder = false; $min_cachePath = jApp::tempPath('minify/'); if (!file_exists($min_cachePath)) { mkdir($min_cachePath, 0775); } if (!isset($min_documentRoot)) { $min_documentRoot = getDocumentRoot(); } if (!isset($min_cacheFileLocking)) { $min_cacheFileLocking = true; } if (!isset($min_serveOptions['bubbleCssImports'])) { $min_serveOptions['bubbleCssImports'] = false; } if (!isset($min_serveOptions['maxAge'])) { $min_serveOptions['maxAge'] = 1800; } $min_serveOptions['minApp']['groupsOnly'] = false; if (!isset($min_serveOptions['minApp']['maxFiles'])) { $min_serveOptions['minApp']['maxFiles'] = 10; } if (!isset($min_symlinks)) {
$c->updateconfig('default_language', int); } $c->savedata(); ok('admin.php?action=settings&job=settings'); } elseif ($job == 'ftp') { $temp = $config; if ($gpc->get('change', int) == 1) { $temp['ftp_server'] = $gpc->get('ftp_server', none); $temp['ftp_port'] = $gpc->get('ftp_port', int); $temp['ftp_user'] = $gpc->get('ftp_user', none); $temp['ftp_pw'] = $gpc->get('ftp_pw', none); $temp['ftp_path'] = $gpc->get('ftp_path', none, DIRECTORY_SEPARATOR); } $temp = $gpc->prepare($temp); $path = '-'; $doc = realpath(getDocumentRoot()); if (!empty($doc)) { $path = str_replace($doc . DIRECTORY_SEPARATOR, '', realpath('./')); } echo head(); ?> <form name="form" method="post" action="admin.php?action=settings&job=ftp2"> <table class="border" border="0" cellspacing="0" cellpadding="4" align="center"> <tr> <td class="obox" colspan="2"><?php echo $lang->phrase('admin_ftp_settings'); ?> </td> </tr> <tr> <td class="mbox" width="50%"><?php