Location: PHPKode > projects > PHP Enter > install/install2.php
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta name="generator" content=
  "HTML Tidy for Linux/x86 (vers 11 February 2007), see www.w3.org" />
  <meta name="author" content="php enter" />
  <meta http-equiv="content-type" content="text/html; charset=us-ascii" />
  <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 Enter - 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,
`valueopt` text NOT NULL,
`module` tinyint(1) NOT NULL DEFAULT '0',
`active` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`optionid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1";

$sql2 = "INSERT INTO `abcoption` (`optionid`, `nameopt`, `valueopt`, `module`, `active`) VALUES
(1, 'sitetitle', 'PHP Enter', '0', '0'),
(2, 'metadesc', 'news, headline, headlines, technology, latest news, tech news', '0', '0'),
(3, 'keywords', 'news, headline, headlines, technology, latest news, tech news', '0', '0'),
(4, 'sitepath', 'http://localhost/111', '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, 'toplinks', '7', '0', '0'),
(12, 'frontext', 'ltr', '0', '0'),
(13, 'customheader', '0', '0', '0'),
(14, 'signuprole', '2', '0', '0'),
(15, 'signupapp', '2', '0', '0'),
(16, 'newson', '2', '0', '0'),
(17, 'newstext', 'An online news publishing system that features easy installation, user submission, and an admin panel for adding, editing, and removing categories and news.', '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', '25800', '0', '0'),
(23, 'editortrue', '1', '0', '0'),
(24, 'smilestrue', '1', '0', '0'),
(25, 'smilespath', 'themes/images/smilies', '0', '0'),
(26, 'maxtopic', '15', '0', '0'),
(27, 'hottopic', '1', '0', '0'),
(28, 'adsoffon', '1', '0', '0'),
(29, 'senseup', '-', '0', '0'),
(30, 'sensedown', '-', '0', '0'),
(31, 'stopspam', '1', '0', '0'),
(32, 'incitem', '0', '0', '0'),
(33, 'keypublic', '0', '0', '0'),
(34, 'keycaptcha', '0', '0', '0'),
(35, 'slider', '1', '0', '0'),
(36, 'efslide', 'scroller', '0', '0'),
(37, 'payoffon', '0', '0', '0'),
(38, 'payvalue', '10.00 $', '0', '0'),
(39,  'payday',  '180',  '0',  '0'),
(40, 'Public Timeline', 'timeline.php', '1', '0');";

$sql3 = "CREATE TABLE IF NOT EXISTS `categori` (
  `catid` int(11) unsigned NOT NULL auto_increment,
  `parent` int(11) unsigned default '1',
  `cord` int(1) unsigned default '0',
  `name` text collate utf8_unicode_ci,
  `ccount` int(11) default '0',
  `cuscat` text COLLATE utf8_unicode_ci,
  PRIMARY KEY  (`catid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";

$sql4 = "INSERT INTO categori (catid, parent, cord, name, ccount, cuscat) VALUES
(1, 1, 0, 'News', 0, 0); ";

$sql5 = "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";


$sql6 = "CREATE TABLE IF NOT EXISTS `messages` (
  `messid` int(11) NOT NULL AUTO_INCREMENT,
  `fromid` int(11) NOT NULL DEFAULT '0',
  `fromname` varchar(11) COLLATE utf8_unicode_ci DEFAULT '0',
  `fromimg` text COLLATE utf8_unicode_ci,
  `mdate` datetime NOT NULL,
  `toid` int(11) NOT NULL DEFAULT '0',
  `toname` varchar(11) COLLATE utf8_unicode_ci DEFAULT '0',
  `toimage` text COLLATE utf8_unicode_ci,
  `raeder` tinyint(1) NOT NULL DEFAULT '1',
  `messege` text COLLATE utf8_unicode_ci NOT NULL,
  `flager` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`messid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";

$sql7 = "CREATE TABLE IF NOT EXISTS `modules` (
  `modid` int(2) NOT NULL AUTO_INCREMENT,
  `idmod` int(11) NOT NULL,
  `modname` text COLLATE utf8_unicode_ci NOT NULL,
  `modimag` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `modap` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `mactive` tinyint(1) NOT NULL DEFAULT '0',
  `mabstrt` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`modid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";


$sql8 = ("INSERT INTO `modules` (`modid`, `idmod`, `modname`, `modimag`, `modap`, `mactive`, `mabstrt`) VALUES
(1, 40, 'Bookmarklet', 'folder.png', '1', 0, 'Bookmarklets (Buttons) are links you add to your browser''s Bookmarks Toolbar.

To install the bookmarklet in your browser just drag and drop the link below to your bookmarks.

<a href=\"javascript:(function(){f=''http://www.example.com/bookmark.php?urld=''+encodeURIComponent(window.location.href.replace(/http?:/i, '''').replace(/https?:/i, ''''))+''&title=''+encodeURIComponent(document.title)+''&notes''+encodeURIComponent(''''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text))+''&v=6&'';a=function(){if(!window.open(f+''noui=1&jump=doclose'',''enter'',''location=yes,links=no,scrollbars=no,toolbar=no,width=620,height=250''))location.href=f+''jump=yes''};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()\">Save on phpEnter.net</a>');");



$sql9 = "CREATE TABLE IF NOT EXISTS `newser` (
  `blogid` int(11) NOT NULL auto_increment,
  `main` tinyint(1) NOT NULL DEFAULT '0',
  `univer` varchar(255) collate utf8_unicode_ci NOT NULL,
  `idblog` int(11) NOT NULL,
  `editor` tinyint(4) NOT NULL default '2',
  `buserid` text collate utf8_unicode_ci,
  `buser` text collate utf8_unicode_ci NOT NULL,
  `btexty` varchar(255) collate utf8_unicode_ci default NULL,
  `brief` text COLLATE utf8_unicode_ci,
  `badress` varchar(255) collate utf8_unicode_ci NOT NULL default '0',
  `images` varchar(255) collate utf8_unicode_ci NOT NULL default '0',
  `bimgs` text collate utf8_unicode_ci,
  `bdate` datetime NOT NULL,
  `bamess` text collate utf8_unicode_ci NOT NULL,
  `commno` int(11) default '0',
  `rating` int(10) unsigned NOT NULL,
  `total_rating` int(10) unsigned NOT NULL,
  `total_ratings` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`blogid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";

$sql10 = "CREATE TABLE IF NOT EXISTS `onewse` (
  `oids` int(11) NOT NULL AUTO_INCREMENT,
  `oniver` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `omages` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `otexty` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `oamess` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`oids`),
  FULLTEXT KEY `otexty` (`otexty`,`oamess`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";

$sql11 = "CREATE TABLE IF NOT EXISTS `publictime` (
  `commid` int(11) NOT NULL auto_increment,
  `isitrue` tinyint(1) NOT NULL DEFAULT '1',
  `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,
  `indesc` text COLLATE utf8_unicode_ci NOT NULL,
  `incurl` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `nocomm` varchar(11) collate utf8_unicode_ci default '0',
  PRIMARY KEY  (`commid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";

$sql12 = "CREATE TABLE IF NOT EXISTS `reviews` (
  `revid` int(5) NOT NULL auto_increment,
  `comrev` varchar(15) collate utf8_unicode_ci NOT NULL,
  `cmain` tinyint(1) NOT NULL,
  `comenter` text collate utf8_unicode_ci NOT NULL,
  `comimage` text collate utf8_unicode_ci NOT NULL,
  `chomes` text collate utf8_unicode_ci,
  `cdate` datetime NOT NULL,
  `ctexte` text collate utf8_unicode_ci,
  PRIMARY KEY  (`revid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";

$sql13 = "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(255) 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,
  PRIMARY KEY  (`usid`),
  UNIQUE KEY `Username` (`username`),
  UNIQUE KEY `Email` (`email`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";

$sql14 = "CREATE TABLE IF NOT EXISTS `vgalery` (
  `galid` int(11) NOT NULL auto_increment,
  `guniver` varchar(255) collate utf8_unicode_ci default NULL,
  `gtitle` varchar(255) collate utf8_unicode_ci default NULL,
  `gdate` datetime NOT NULL,
  `gamess` text collate utf8_unicode_ci NOT NULL,
  `gnocom` varchar(11) collate utf8_unicode_ci default '0',
  PRIMARY KEY  (`galid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";

$sql15 = "CREATE TABLE IF NOT EXISTS `tubereview` (
  `yrevid` int(5) NOT NULL auto_increment,
  `ycomrev` varchar(15) collate utf8_unicode_ci NOT NULL,
  `ycmain` tinyint(1) NOT NULL,
  `ycomenter` text collate utf8_unicode_ci NOT NULL,
  `ycomimage` text collate utf8_unicode_ci NOT NULL,
  `ychomes` text collate utf8_unicode_ci,
  `ycdate` datetime NOT NULL,
  `yctexte` text collate utf8_unicode_ci,
  PRIMARY KEY  (`yrevid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1";

$sql16 = "CREATE TABLE IF NOT EXISTS `tubevideo` (
  `yuid` int(11) NOT NULL auto_increment,
  `yucvideo` varchar(255) collate utf8_unicode_ci NOT NULL,
  `yuname` text collate utf8_unicode_ci NOT NULL,
  `yuadress` varchar(255) collate utf8_unicode_ci NOT NULL,
  `yuamess` text collate utf8_unicode_ci,
  `ycommno` int(11) NOT NULL default '0',
  `ydate` datetime NOT NULL,
  `yuserid` text collate utf8_unicode_ci,
  `yuser` text collate utf8_unicode_ci NOT NULL,
  `yrating` int(10) unsigned NOT NULL,
  `ytotal_rating` int(10) unsigned NOT NULL,
  `totaly_ratings` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`yuid`)
) ENGINE=MyISAM 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 '';
}
$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 '';
}
$result10 = $conn->Execute($sql10);

if ($result10 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$result11 = $conn->Execute($sql11);

if ($result11 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$result12 = $conn->Execute($sql12);

if ($result12 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$result13 = $conn->Execute($sql13);

if ($result13 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$result14 = $conn->Execute($sql14);

if ($result14 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$result15 = $conn->Execute($sql15);

if ($result15 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
$result16 = $conn->Execute($sql16);

if ($result16 == false) {
	print 'error'  . $conn->ErrorMsg() . '<br>';
}
else {
	echo '';
}
?>
&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://phpenter.net"><font size="1"
      font="" color="#4F4F4F">powered by phpenter.net</font></a></td>
    </tr>
  </table>
</body>
</html>
Return current item: PHP Enter