Location: PHPKode > projects > php Blogger > install/install2.php
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<title></title>
</head>
<body>
<center>
<table width="70%" align="center" border="0">
<tr>
<td align="center" width="120" height="100px"></td>
</tr>
</table>
<div id="incral">
<table width="80%" align="center" border="0">
<tr>
<td align="center">
<h3><img src="css/icon.png" />&nbsp;&nbsp;&nbsp;Install PHP Blogger - Step 3</h3>MySQL Database
Server<br />
</td>
</tr>
</table>
<?php
require_once('../admin/config.php');
include ('../classes/adodb/adodb.inc.php');
$dbdriver = "mysql";
$conn = &ADONewConnection($dbdriver);
$conn->Connect($server,$user,$password,$database);
//$conn->debug = true;
mysql_query("CREATE TABLE IF NOT EXISTS `abcoption` (
`optionid` int(11) unsigned NOT NULL AUTO_INCREMENT,
`nameopt` varchar(255) NOT NULL,
`valueopt` text NOT NULL,
PRIMARY KEY (`optionid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1") or die(mysql_error());
mysql_query("INSERT INTO `abcoption` (`optionid`, `nameopt`, `valueopt`) VALUES
(1, 'sitetitle', 'PHP Blogger'),
(2, 'metadesc', 'news, headlines, technology, latest news, tech news'),
(3, 'keywords', 'news, headlines, technology, latest news, tech news'),
(4, 'sitepath', 'http://localhost/aaa'),
(5, 'language', 'english'),
(6, 'caching', '1'),
(7, 'themes', 'classic'),
(8, 'sitemail', 'hide@address.com'),
(9, 'sitedisabled', '2'),
(10, 'rewritemod', '2'),
(11, 'timelimit', '30'),
(12, 'frontext', 'Welcome Text'),
(13, 'notification', '2'),
(14, 'signuprole', '2'),
(15, 'signupapp', '2'),
(16, 'newson', '2'),
(17, 'newstext', 'PHP Blogger is an open source microblogging system.'),
(18, 'siteabout', 'About'),
(19, 'siteprivacy', 'Privacy Text'),
(20, 'siteterms', 'Terms Text'),
(21, 'messaging', '1'),
(22, 'maxposting', '6000'),
(23, 'editortrue', '1'),
(24, 'smilestrue', '1'),
(25, 'smilespath', 'themes/images/smilies'),
(26, 'maxtopic', '200'),
(27, 'hottopic', '1'),
(28, 'adsoffon', '1'),
(29, 'senseup', 'Banner code 728x90'),
(30, 'sensedown', 'Banner code 200x200'),
(31, 'stopspam', '1');")
or die(mysql_error());
mysql_query("CREATE TABLE IF NOT EXISTS `banip` (
`banid` int(11) NOT NULL AUTO_INCREMENT,
`banipad` varchar(25) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`banid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;")
or die(mysql_error());
mysql_query("CREATE TABLE IF NOT EXISTS `comment` (
`commid` int(11) NOT NULL AUTO_INCREMENT,
`userid` text COLLATE utf8_unicode_ci,
`texty` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`imgs` text COLLATE utf8_unicode_ci,
`date` datetime NOT NULL,
`amess` text COLLATE utf8_unicode_ci NOT NULL,
`nocomm` varchar(11) COLLATE utf8_unicode_ci DEFAULT '0',
`views` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`commid`),
  FULLTEXT KEY `amess` (`amess`,`texty`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;") or die(mysql_error());
mysql_query("CREATE TABLE IF NOT EXISTS `cpadmin` (
`ausid` int(11) NOT NULL AUTO_INCREMENT,
`ausername` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`apassword` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`aemail` varchar(55) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`ausid`),
UNIQUE KEY `Username` (`ausername`),
UNIQUE KEY `Email` (`aemail`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;")
or die(mysql_error());
mysql_query("CREATE TABLE IF NOT EXISTS `reviews` (
`revid` int(11) NOT NULL AUTO_INCREMENT,
`comrev` int(11) DEFAULT NULL,
`incuser` text COLLATE utf8_unicode_ci NOT NULL,
`incimage` text COLLATE utf8_unicode_ci NOT NULL,
`incdate` datetime DEFAULT NULL,
`inctext` text COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`revid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=79 ;")
or die(mysql_error());
mysql_query("CREATE TABLE IF NOT EXISTS `users` (
`usid` int(11) NOT NULL AUTO_INCREMENT,
`privilege` tinyint(1) DEFAULT '2',
`fullname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`username` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`tempass` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
`email` varchar(55) COLLATE utf8_unicode_ci DEFAULT NULL,
`homep` text COLLATE utf8_unicode_ci NOT NULL,
`biosi` text COLLATE utf8_unicode_ci NOT NULL,
`ipos` varchar(11) COLLATE utf8_unicode_ci NOT NULL,
`thumbs` text COLLATE utf8_unicode_ci NOT NULL,
`date` datetime DEFAULT NULL,
`active` tinyint(1) DEFAULT '0',
`keysi` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
`lastime` datetime NOT NULL,
`nofposts` int(11) NOT NULL,
`signature` text COLLATE utf8_unicode_ci NOT NULL,
`moderate` int(11) NOT NULL,
PRIMARY KEY (`usid`),
UNIQUE KEY `Username` (`username`),
UNIQUE KEY `Email` (`email`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=92 ") or die(mysql_error());
mysql_query("CREATE TABLE IF NOT EXISTS `userson` (
`uvon` varchar(32) NOT NULL,
`dt` int(10) unsigned NOT NULL,
PRIMARY KEY (`uvon`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;")
or die(mysql_error());
$conn->Close();
?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Database tables successfully created. <a href="install3.php"><b>Step 4</b></a>
</div>
<table width="100%" height="422px"  align="center" border="0">
<tr>
<td align="center" valign="bottom"><a href="http://phpblogger.org"><font size="1">powered by phpblogger.org</font></a></td>
</tr>
</table>
</body>
</html>
Return current item: php Blogger