small fixes
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sun, 15 Jul 2007 19:10:36 +0000 (19:10 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sun, 15 Jul 2007 19:10:36 +0000 (19:10 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@14 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

www/admin.php
www/config.php.template

index 9964913..55c328c 100644 (file)
@@ -62,9 +62,14 @@ if(isset($_POST["adminuser"])&&isset($_POST["adminpwd1"])&&isset($_POST["adminpw
                print("Error: User already exists.<p>");
                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);
 ?>
index add9314..c1727bb 100644 (file)
@@ -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");
 
 
 ////////////