Mercurial > owls
view Setup.php @ 10:144bc36a6c27
moved login form from nav to top of content
added last modified date
author | meillo@marmaro.de |
---|---|
date | Sun, 27 May 2007 02:13:46 +0200 |
parents | 3021ce32ee14 |
children |
line wrap: on
line source
<?php // you can customize the config here $dbPrefix = 'rem__2_'; // the names of the db-tables will be prefixed with this string //$modifyProtected = true; // are guests allowed to modify data? (true or false) $defaultUser = 'admin'; // useraccount if "modifyProtected = true" above $defaultUserPassword = 'admin'; // password for useraccount if "modifyProtected = true" above // dont change anything form here on (except you know what you do) //################################################################## // write db-login-data to textfile // connect to db and create tables require('../Db.inc.php'); // table 'Owls' for the content data mysql_query(" CREATE TABLE IF NOT EXISTS `". $dbPrefix ."Owls` ( `id` int(11) NOT NULL auto_increment, `idParent` int(11) default '0', `name` text NOT NULL, `text` longtext NOT NULL, `permission` tinyint(4) NOT NULL default '1', `date` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ") or die(mysql_error()); // insert startup nodes 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()); // login should be managed via text file in future mysql_query("CREATE TABLE IF NOT EXISTS `". $dbPrefix ."User` ( `id` int(11) NOT NULL auto_increment, `loginname` tinytext NOT NULL, `password` tinytext NOT NULL, PRIMARY KEY (`id`) )") or die(mysql_error()); mysql_query("INSERT INTO `". $dbPrefix ."User` VALUES (1, '". $defaultUser ."', '". md5($defaultUserPassword) ."')") or die(mysql_error()); ?>