<?
include("configure.php");
$connection = @mysql_connect("$db_server", "$db_name", "$db_password") or
die("The database was not found.");
$db = @mysql_select_db($db_database, $connection) or die("The database was not found.");
$sql2 = "CREATE TABLE ns_news (
title VARCHAR (50),
item TEXT,
postby VARCHAR (50),
email VARCHAR (50),
timestamp TIMESTAMP,
today VARCHAR (50),
hldate VARCHAR (50),
id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
);";
$result2 = mysql_query($sql2,$connection) or die("There was an error. Try running the uninstallation script, then try installing again.");
$sql3 = "CREATE TABLE ns_display (
bsize VARCHAR (50) DEFAULT '1',
bcolor VARCHAR (50) DEFAULT '#007EFF',
titlebgcolor VARCHAR (50) DEFAULT '#007EFF',
titletextsize VARCHAR (50) DEFAULT '4',
titletextcolor VARCHAR (50) DEFAULT '#FFFFFF',
datelinetextsize VARCHAR (50) DEFAULT '3',
msgbgcolor VARCHAR (50) DEFAULT '#D1E7FE',
msgtextsize VARCHAR (50) DEFAULT '3',
msgtextcolor VARCHAR (50) DEFAULT '#000000',
hldatecolor VARCHAR (50) DEFAULT '#000000',
newswidth VARCHAR (50) DEFAULT '400',
headlines VARCHAR (50) DEFAULT '5'
);";
$result3 = mysql_query($sql3,$connection) or die("There was an error. Try running the uninstallation script, then try installing again.");
$sql4 = "CREATE TABLE ns_staff (
username VARCHAR (50),
password VARCHAR (50),
id VARCHAR (50),
email VARCHAR (50),
delall VARCHAR (50),
delown VARCHAR (50),
addmembers VARCHAR (50),
delmembers VARCHAR (50),
modifydisplay VARCHAR (50)
);";
$result4 = mysql_query($sql4,$connection) or die("There was an error. Try running the uninstallation script, then try installing again.");
$sql5 = "CREATE TABLE ns_headlines (
bsize VARCHAR (50) DEFAULT '1',
bcolor VARCHAR (50) DEFAULT '#007EFF',
titlebgcolor VARCHAR (50) DEFAULT '#007EFF',
titletextsize VARCHAR (50) DEFAULT '4',
titletextcolor VARCHAR (50) DEFAULT '#FFFFFF',
msgbgcolor VARCHAR (50) DEFAULT '#D1E7FE',
msgtextsize VARCHAR (50) DEFAULT '3',
msgtextcolor VARCHAR (50) DEFAULT '#000000',
hldatecolor VARCHAR (50) DEFAULT '#000000',
newswidth VARCHAR (50) DEFAULT '200',
headlines VARCHAR (50) DEFAULT '5'
);";
$result5 = mysql_query($sql5,$connection) or die("There was an error. Try running the uninstallation script, then try installing again.");
if ($result2) {
$id = time ();
$msg = "Add an admin.
<form action=install_3.php method=post>
<P>
Username
<br><input type=text name=username>
</p>
<P>
Password
<br><input type=password name=password>
</p>
<P>
Email Address
<br><input type=text name=email>
</p>
<input type=hidden name=iconurl value=moo>
<input type=hidden name=delall value=yes>
<input type=hidden name=delown value=yes>
<input type=hidden name=addmembers value=yes>
<input type=hidden name=delmembers value=yes>
<input type=hidden name=modifydisplay value=yes>
<input type=hidden name=id value=\"$id\">
<input type=hidden name=hldatecolor value=\"#000000\">
<p>
<input type=submit value=Continue>
</form>";
}
?>
<body bgcolor=#D1E7FE>
<title>Install :: Step 2</title>
<font size=4>
<? echo "$msg"; ?>
</font>