diff -r ac0ca51809b1 -r 47dd15d8bb8c install.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/install.php Sun Apr 22 07:20:09 2007 +0000 @@ -0,0 +1,213 @@ + trancer nl> | +// | Sjeemz sjeemz nl> | +// | Add-ons: Wim Mostrey mostrey be> | +// +--------------------------------------------------------------------+ + +// Filename: install.php +// Description: installs your PowerAdmin +// +// $Id: install.php,v 1.12 2003/01/07 23:29:24 lyon Exp $ +// + +// addslashes to vars if magic_quotes_gpc is off +function slash_input_data(&$data) +{ + if ( is_array($data) ) + { + foreach ( $data as $k => $v ) + { + $data[$k] = ( is_array($v) ) ? slash_input_data($v) : addslashes($v); + } + } + return $data; +} + +set_magic_quotes_runtime(0); + +// If magic quotes is off, addslashes +if ( !get_magic_quotes_gpc() ) +{ + $_GET = slash_input_data($_GET); + $_POST = slash_input_data($_POST); + $_COOKIE = slash_input_data($_COOKIE); +} + + +error_reporting(E_ALL); +if(!@require_once("inc/config.inc.php")) +{ + error("You have to create a config.inc.php!"); +} +include_once("inc/header.inc.php"); + +$sup_types = array('mysql'); + +function error($msg=false) +{ + // General function for printing critical errors. + if ($msg) + { + ?> +

+
+

<< back

+ query($sqlusers); + + if($db->isError($resusers)) + { + error("Can not create table users in $dbdatabase"); + } + + $reszones = $db->query($sqlzones); + + if($db->isError($reszones)) + { + error("Can not create zones table in $dbdatabase"); + } + + $id = $db->nextID('users'); + + /* TODO next version: fix the strip_slashes. might give trouble upgrading :/ -Lyon */ + $sqlinsert = "INSERT INTO + users + VALUES ( + $id, + '". $_POST['login'] ."', + '". md5(stripslashes($_POST['password'])) ."', + '". $_POST["fullname"] ."', + '". $_POST["email"] ."', + '". $_POST["description"] ."', + 10, + 1)"; + + $resadmin = $db->query($sqlinsert); + + if($db->isError($resadmin)) + { + + error("Can not add the admin to database $dbdatabase.users"); + } + else + { + + ?> +

+
+
+:
+
+ here + +" . _('You didnt fill in one of the required fields!') . ""; + } +} + +else +{ +?> + +

+
+
+ * +


+ +
+ + + + + + + +
: *
: *
: *
: *
:
 
+
+ +

+PowerAdmin v1.0 Copyright ©2002 The +PowerAdmin Team