owls
view Setup.php @ 12:682b4a24469c
optimized layout of ctrl bar
author | meillo@marmaro.de |
---|---|
date | Sun, 27 May 2007 02:28:20 +0200 |
parents | 3021ce32ee14 |
children |
line source
1 <?php
3 // you can customize the config here
5 $dbPrefix = 'rem__2_'; // the names of the db-tables will be prefixed with this string
7 //$modifyProtected = true; // are guests allowed to modify data? (true or false)
9 $defaultUser = 'admin'; // useraccount if "modifyProtected = true" above
10 $defaultUserPassword = 'admin'; // password for useraccount if "modifyProtected = true" above
14 // dont change anything form here on (except you know what you do)
15 //##################################################################
17 // write db-login-data to textfile
20 // connect to db and create tables
21 require('../Db.inc.php');
24 // table 'Owls' for the content data
25 mysql_query("
26 CREATE TABLE IF NOT EXISTS `". $dbPrefix ."Owls` (
27 `id` int(11) NOT NULL auto_increment,
28 `idParent` int(11) default '0',
29 `name` text NOT NULL,
30 `text` longtext NOT NULL,
31 `permission` tinyint(4) NOT NULL default '1',
32 `date` int(11) NOT NULL default '0',
33 PRIMARY KEY (`id`)
34 )
35 ") or die(mysql_error());
37 // insert startup nodes
38 mysql_query("INSERT INTO `". $dbPrefix ."Owls` VALUES (1, 0, 'Index', 'Thanks for using [url=http://prog.marmaro.de/owls/]Owls[/url]!', 0, now())") or die(mysql_error());
42 // login should be managed via text file in future
43 mysql_query("CREATE TABLE IF NOT EXISTS `". $dbPrefix ."User` (
44 `id` int(11) NOT NULL auto_increment,
45 `loginname` tinytext NOT NULL,
46 `password` tinytext NOT NULL,
47 PRIMARY KEY (`id`)
48 )") or die(mysql_error());
50 mysql_query("INSERT INTO `". $dbPrefix ."User` VALUES (1, '". $defaultUser ."', '". md5($defaultUserPassword) ."')") or die(mysql_error());
52 ?>