static function DatabaseTest() { $res = ServerManager::ValidateDatabase($_POST[POST_INTERN_DATABASE_HOST], $_POST[POST_INTERN_DATABASE_USER], $_POST[POST_INTERN_DATABASE_PASS], $_POST[POST_INTERN_DATABASE_NAME], $_POST[POST_INTERN_DATABASE_PREFIX], $_POST["p_db_ext"], false, @$_POST["p_db_eng"]); if (empty($res)) { Server::$Response->SetStandardResponse(1, base64_encode("")); ServerManager::UpdateUserManagement($_POST[POST_INTERN_DATABASE_PREFIX]); } else { Server::$Response->SetStandardResponse(2, base64_encode($res)); } }
function getMySQL($error = "") { if (!empty(Server::$Configuration->File["gl_db_host"])) { require LIVEZILLA_PATH . "_lib/functions.internal.man.inc.php"; $extension = !empty(Server::$Configuration->File["gl_db_ext"]) ? Server::$Configuration->File["gl_db_ext"] : ""; $error = ServerManager::ValidateDatabase(Server::$Configuration->File["gl_db_host"], Server::$Configuration->File["gl_db_user"], Server::$Configuration->File["gl_db_pass"], Server::$Configuration->File["gl_db_name"], Server::$Configuration->File["gl_db_prefix"], $extension, true, Server::$Configuration->File["gl_db_eng"]); } if (!function_exists("mysql_real_escape_string") && !function_exists("mysqli_real_escape_string")) { $error = "MySQL PHP extension is not available."; } if (empty($error)) { return null; } else { return "<span class=\"lz_index_error_cat\">MySQL:<br></span><span class=\"lz_index_red\">" . $error . "</span>"; } }
} } } } } } } } } } } else { Server::$Response->SetValidationError(AUTH_RESULT); } if (OperatorRequest::IsValidated() && !SERVERSETUP) { if (LOGOFF || LOGIN) { if (LOGOFF) { Server::$Operators[CALLER_SYSTEM_ID]->GetExternalObjects(); } Server::$Operators[CALLER_SYSTEM_ID]->Reposts = array(); } Server::$Operators[CALLER_SYSTEM_ID]->Save(); } if (LOGIN && DB_ACCESS_REQUIRED) { require LIVEZILLA_PATH . "_lib/functions.internal.man.inc.php"; $extension = !empty(Server::$Configuration->File["gl_db_ext"]) ? Server::$Configuration->File["gl_db_ext"] : ""; $res = ServerManager::ValidateDatabase(Server::$Configuration->File["gl_db_host"], Server::$Configuration->File["gl_db_user"], Server::$Configuration->File["gl_db_pass"], Server::$Configuration->File["gl_db_name"], Server::$Configuration->File["gl_db_prefix"], $extension, false, Server::$Configuration->File["gl_db_eng"]); if (!empty($res)) { Server::$Response->SetValidationError(LOGIN_REPLY_DB, $res); } } $response = Server::$Response->GetXML(true);