From 33f2a99f66995478b4519cc2d7699d34dab88811 Mon Sep 17 00:00:00 2001 From: konrad Date: Sun, 15 Jul 2007 19:10:36 +0000 Subject: [PATCH] small fixes git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@14 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- www/admin.php | 7 ++++++- www/config.php.template | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/www/admin.php b/www/admin.php index 9964913..55c328c 100644 --- a/www/admin.php +++ b/www/admin.php @@ -62,9 +62,14 @@ if(isset($_POST["adminuser"])&&isset($_POST["adminpwd1"])&&isset($_POST["adminpw print("Error: User already exists.

"); break; } - //create + //create user $db->insert("users",array("uname"=>$un,"passwd"=>$_POST["adminpwd1"])); + //make it admin $db->insert("userrole",array("uname"=>$un,"role"=>"_admin")); + //allow it on all hosts + $db->insert("userhosts",array("uname"=>$un,"host"=>"_anon")); + $db->insert("userhosts",array("uname"=>$un,"host"=>"_any")); + $db->insert("userhosts",array("uname"=>$un,"host"=>"_online")); } }while(0); ?> diff --git a/www/config.php.template b/www/config.php.template index add9314..c1727bb 100644 --- a/www/config.php.template +++ b/www/config.php.template @@ -20,13 +20,16 @@ $db = new MysqlEngine("localhost","smoke",""); $db->setDbName("smoke"); // set table-prefix (optional) $db->setPrefix("smoke_"); +//set this to one of the supported MySQL storage engines for DB creation +$db->setStorageEngine("InnoDB"); + +//////////// +// DB Administration //use this for DB creation and upgrading, comment it out otherwise //change the passcode before using this on a production system!!! $db->setAdminPassCode("Admin","SmokeInMyEye"); -//set this to one of the supported MySQL storage engines for DB creation -$db->setStorageEngine("InnoDB"); //////////// -- 1.7.2.5