* Date: 2002-08-20 * Last Update: 2004-08-13 * Copyright: (c) 2001-2004 Thorsten Rinne * * The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. */ define("VERSION", "1.4.1"); define("COPYRIGHT", "© 2001-2004 phpMyFAQ-Team | All rights reserved."); define("SAFEMODE", @ini_get("safe_mode")); require_once("../inc/constants.php"); function version_check ($ist = "", $soll = "", $err_msg = "") { if (empty($ist) OR empty($soll)) { return FALSE; } $ist = explode(".", $ist); $soll = explode(".", $soll); $num = count($soll); for ($i = 0; $i < $num; $i++) { if ($ist[$i] < $soll[$i]) { return FALSE; } if ($ist[$i] == $soll[$i]) { continue; } if ($ist[$i] >= $soll[$i]) { return TRUE; } } return TRUE; } function mysql_check($version) { return version_check(mysql_get_client_info(), $version); } function php_check($version) { return version_check(phpversion(), $version); } function phpmyfaq_check($file) { if (@include($file)) { include($file); // check for version 1.3.x if ((isset($mysql_server) && $mysql_server != "") || (isset($mysql_user) && $mysql_user != "") || (isset($mysql_passwort) && $mysql_passwort != "") || (isset($mysql_db) && $mysql_db != "")) { return FALSE; } // check for version 1.4.x if ((isset($DB["server"]) && $DB["server"] != "") || (isset($DB["user"]) && $DB["user"] != "") || (isset($DB["password"]) && $DB["password"] != "") || (isset($DB["db"]) && $DB["db"] != "") || (isset($DB["prefix"]) && $DB["prefix"] != "")) { return FALSE; } return TRUE; } return TRUE; } function uninstall() { global $uninst, $db; while ($each_query = each($uninst)) { $result = $db->query($each_query[1]); } } function HTMLFooter() { print "
".COPYRIGHT."
\n