Location: PHPKode > projects > phpBlogger > 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);
$sql = "CREATE TABLE IF NOT EXISTS `abcoption` (
  `optionid` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `nameopt` varchar(255) NOT NULL DEFAULT '',
  `valueopt` text,
  `ismodule` tinyint(1) NOT NULL,
  `isactive` tinyint(1) NOT NULL,
  PRIMARY KEY (`optionid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1";
$sql2 = "INSERT INTO `abcoption` (`optionid`, `nameopt`, `valueopt`, `ismodule`, `isactive`) VALUES
(1, 'sitetitle', 'PHP Blogger', 0, 0),
(2, 'metadesc', 'Online social networking and microblogging service.', 0, 0),
(3, 'keywords', 'networking, news, headlines, technology, friends, latest news, tech news', 0, 0),
(4, 'sitepath', 'http://localhost/micro', 0, 0),
(5, 'language', 'english', 0, 0),
(6, 'caching', '0', 0, 0),
(7, 'themes', 'classic', 0, 0),
(8, 'sitemail', 'hide@address.com', 0, 0),
(9, 'sitedisabled', '2', 0, 0),
(10, 'rewritemod', '2', 0, 0),
(11, 'timelimit', '30', 0, 0),
(12, 'frontext', 'Welcome Text', 0, 0),
(13, 'notification', '2', 0, 0),
(14, 'signuprole', '2', 0, 0),
(15, 'signupapp', '2', 0, 0),
(16, 'newson', '1', 0, 0),
(17, 'newstext', 'Welcome to our new and improved website! We are still in the process of developing this website. Until this work is complete some functions are limited.', 0, 0),
(18, 'siteabout', 'About', 0, 0),
(19, 'siteprivacy', 'Privacy Text', 0, 0),
(20, 'siteterms', 'Terms Text', 0, 0),
(21, 'messaging', '1', 0, 0),
(22, 'maxposting', '6000', 0, 0),
(23, 'editortrue', '1', 0, 0),
(24, 'smilestrue', '1', 0, 0),
(25, 'smilespath', 'themes/images/smilies', 0, 0),
(26, 'maxtopic', '200', 0, 0),
(27, 'hottopic', '1', 0, 0),
(28, 'adsoffon', '1', 0, 0),
(29, 'senseup', 'Banner code 728x90', 0, 0),
(30, 'sensedown', 'Banner code 200x200', 0, 0),
(31, 'stopspam', '1', 0, 0),
(32, 'aconfig', '1', 0, 0),
(33, 'bconfig', '1', 0, 0),
(34, 'dconfig', '1', 0, 0);";
$sql3 = "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";
$sqlcat = "CREATE TABLE IF NOT EXISTS `catags` (
  `hashid` int(11) NOT NULL AUTO_INCREMENT,
  `hashtags` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `nofhash` int(11) NOT NULL,
  PRIMARY KEY (`hashid`),
  UNIQUE KEY `hashtags` (`hashtags`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
$sql4 = "CREATE TABLE IF NOT EXISTS `comment` (
  `commid` int(11) NOT NULL AUTO_INCREMENT,
  `main` tinyint(1) NOT NULL DEFAULT '0',
  `userid` text COLLATE utf8_unicode_ci,
  `texty` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `imgs` text COLLATE utf8_unicode_ci,
  `date` datetime NOT NULL,
  `amess` text COLLATE utf8_unicode_ci,
  `nocomm` varchar(11) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `views` int(11) NOT NULL DEFAULT '0',
  `visited` 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";
$sql5 = "CREATE TABLE IF NOT EXISTS `cpadmin` (
  `ausid` int(11) NOT NULL AUTO_INCREMENT,
  `ausername` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `apassword` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `aemail` varchar(55) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`ausid`),
  UNIQUE KEY `Username` (`ausername`),
  UNIQUE KEY `Email` (`aemail`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
$sql6 = "CREATE TABLE IF NOT EXISTS `reviews` (
  `revid` int(11) NOT NULL AUTO_INCREMENT,
  `comrev` int(11) NOT NULL,
  `incuser` text COLLATE utf8_unicode_ci,
  `incimage` text COLLATE utf8_unicode_ci,
  `incdate` datetime NOT NULL,
  `inctext` text COLLATE utf8_unicode_ci,
  PRIMARY KEY (`revid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";
$sql7 = "CREATE TABLE IF NOT EXISTS `users` (
  `usid` int(11) NOT NULL AUTO_INCREMENT,
  `privilege` tinyint(1) NOT NULL DEFAULT '2',
  `fullname` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `tempass` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `email` varchar(55) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `homep` text COLLATE utf8_unicode_ci,
  `biosi` text COLLATE utf8_unicode_ci,
  `ipos` varchar(11) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `thumbs` text COLLATE utf8_unicode_ci,
  `date` datetime NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `lastext` text COLLATE utf8_unicode_ci,
  `lasthour` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `keysi` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `lastime` datetime NOT NULL,
  `nofposts` int(11) NOT NULL,
  `signature` text COLLATE utf8_unicode_ci,
  `moderate` int(11) NOT NULL,
  `newsletter` tinyint(1) NOT NULL DEFAULT '0',
  `notification` tinyint(1) NOT NULL DEFAULT '0',
  `birthday` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `gender` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `location` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`usid`),
  UNIQUE KEY `Username` (`username`),
  UNIQUE KEY `Email` (`email`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;";
$sql8 = "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";
$sql9 = "CREATE TABLE IF NOT EXISTS `helptopics` (
  `faqid` int(5) NOT NULL AUTO_INCREMENT,
  `faqestion` text COLLATE utf8_unicode_ci,
  `faqanswer` text COLLATE utf8_unicode_ci,
  PRIMARY KEY (`faqid`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1;";
$result = $conn->Execute($sql);
if ($result == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$result2 = $conn->Execute($sql2);

if ($result2 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$result3 = $conn->Execute($sql3);

if ($result3 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$resultcat = $conn->Execute($sqlcat);

if ($resultcat == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$result4= $conn->Execute($sql4);

if ($result4 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$result5 = $conn->Execute($sql5);

if ($result5 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$result6 = $conn->Execute($sql6);

if ($result6 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$result7 = $conn->Execute($sql7);

if ($result7 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$result8 = $conn->Execute($sql8);

if ($result8 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$result9 = $conn->Execute($sql9);

if ($result9 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$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: phpBlogger