Размер файла: 1.81Kb
<? include("configure.php"); ?>
<?
$hldatecolor = "#000000";
if ($view == "step_2") {
$step_x = "Step 2";
$connection = @mysql_connect("localhost", "$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_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'
);";
$result2 = mysql_query($sql2,$connection) or die("There was an error. You might have upgraded already.");
if ($result2) {
$display = "Success, you can now login to the <a href=\"admin.php\">admin center</a> again, but first delete the file called 'upgrade_1.0.php'.";
$connection2 = @mysql_connect("$db_server", "$db_name", "$db_password") or die("Couldn't connect.");
$db2 = @mysql_select_db($db_database, $connection2) or die("The database wasn't found.");
$sql3 = "INSERT INTO ns_headlines
(hldatecolor)
VALUES
(\"$hldatecolor\")
";
$result3 = @mysql_query($sql3, $connection) or die("There was an error.");
}
} else {
$step_x = "Step 1";
$display = "
<p>
This will upgrade <i>News Stream</i> to version 1.0 in the database titled <b>$db_name</b>.
<br><a href=upgrade_1.0.php?view=step_2>Click here to continue.</a>
</p>
";
}
?>
<body bgcolor=#D1E7FE>
<title>Upgrade (1.0) :: <? echo $step_x; ?></title>
<font size=4>
<? echo $display; ?>
</font>