Location: PHPKode > projects > Utopia News Pro > upgrade/upgrade8.php
<?php
/*
////////////////////////////////////////////////
//             Utopia Software                //
//      http://www.utopiasoftware.net         //
//             Utopia News Pro                //
////////////////////////////////////////////////
*/

/*
	+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
	| Upgrade Script
	| Version - 1.2.0 to 1.3.0
	| Instructions: Upload to Utopia News Pro directory and
	|               run. Immediately remove file from server
	|               after use.
	+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

*/

/* General Config */
$version_current = '1.2.0'; $version_current_pdless = 120;
$version_next = '1.3.0'; $version_next_pdless = 130;

$this_upgrade = 'upgrade8.php';
$next_upgrade = 'upgrade9.php';
/* General Config */

require('functions.inc.php');

// +------------------------------------------------------------------+
// | Step Setup                                                       |
// +------------------------------------------------------------------+
if (isset($_POST['step1']))     // <--Create New Tables
{
	$step = '1';
}
elseif (isset($_POST['step2'])) // <--Update FAQs
{
	$step = '2';
}
elseif (isset($_POST['step3'])) // <--Settings Update
{
	$step = '3';
}
elseif (isset($_POST['step4'])) // <--Table Alteration
{
	$step = '4';
}
elseif (isset($_POST['step5'])) // <--Updating Templates
{
	$step = '5';
}
elseif (isset($_POST['step6'])) // <--Complete
{
	$step = '6';
}
elseif (isset($_POST['fulltemplateupdate']))
{
	$action = 'fulltemplateupdate';
}
elseif (isset($_GET['action'])) // <--Miscellaneous Actions
{
	$action = $_GET['action'];
	$step = 'X';
}
else							// <--Introduction
{
	$step = '0';
}

// +------------------------------------------------------------------+
// | Global HTML                                                      |
// +------------------------------------------------------------------+
$p_header = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="stylesheet" href="style.css" media="all" />
	<title>Utopia News Pro '.$version_current.' to '.$version_next.' Upgrade</title>
<meta name="generator" content="Utopia News Pro - http://www.utopiasoftware.net/" />
<meta name="robots" content="noindex, nofollow" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>

<center>
<div align="left" class="hbox">
<div class="lbox"><img src="images/unp_logo.jpg" alt="Utopia News Pro" border="0" /></div>
</div></center>
<br />';

$p_openbox = '<center>
<div align="left" class="box">
<font class="normalfont">
<strong>Utopia News Pro Installer - Step '.$step.' of 6</strong><br /><br />';

$p_closebox = '</font></div></center>';

$p_footer = '
<br />
<center>
<div align="center" class="fbox">
<span class="smallfont">
Utopia News Pro Upgrade<br />
Copyright &copy;2003-2007 UtopiaSoft, UtopiaSoftware.net
</span>
</div></center>
</body>
</html>';

// +------------------------------------------------------------------+
// | Step 0 - Introduction                                            |
// +------------------------------------------------------------------+
if ($step == '0')
{
	if (str_strip('.', $version) <= $version_current_pdless)
	{
		unp_msgbox('You are attempting to upgrade from version '.$version_current.' to '.$version_next.', but you are running version '.$version.'.');
		exit;
	}
	echo ($p_header);
	echo ($p_openbox);
	echo 'Welcome to the Utopia News Pro upgrade! The upgrade will first add any new tables that were not present in version '.$version_current.'<br /><br />';
	echo '<form action="'.$this_upgrade.'" method="post"><input type="submit" name="step1" value="Continue -&gt;" /></form>';
	echo ($p_closebox);
	echo ($p_footer);
}

// +------------------------------------------------------------------+
// | Step 1 - Add New Tables                                          |
// +------------------------------------------------------------------+
if ($step == '1')
{
	echo ($p_header);
	echo ($p_openbox);
	echo 'Upgrade is now adding new tables that appear in '.$version_next.'<br /><br />';
	$DB->query("CREATE TABLE `unp_origtemplate` (
	`id` smallint(4) unsigned NOT NULL auto_increment,
	`setid` smallint(3) unsigned NOT NULL default '0',
	`templatename` varchar(50) NOT NULL default '',
	`template` mediumtext NOT NULL,
	PRIMARY KEY  (`id`),
	KEY `templatename` (`templatename`)
	) TYPE=MyISAM
	");

	$DB->query("INSERT INTO `unp_origtemplate` (`id`, `setid`, `templatename`, `template`) VALUES
	(1, 3, 'news_newsbit', '<!-- News.Bit - NewsID {\$newsid} -->\r\n<a name=\"unpnews{\$newsid}\" />\r\n<table width=\"90%\" align=\"center\"><tr><td>\r\n<table width=\"100%\" cellpadding=\"1\" cellspacing=\"1\" border=\"0\" style=\"background-color: {\$bordercolor}; font-family: verdana, arial, helvetica, sans-serif; font-size: 12px;\">\r\n\r\n<tr style=\"background-color: {\$subjectbg}; color: {\$subjecttext}; font-weight: bold; padding: 4px;\">\r\n	<td width=\"100%\" style=\"padding: 4px;\">{\$subject}</td>\r\n</tr>\r\n\r\n<tr style=\"background-color: {\$newsbg}; color: {\$newstextcolor}; padding: 4px;\">\r\n	<td width=\"100%\" style=\"padding: 4px;\">{\$useravatar}{\$newstext}</td>\r\n</tr>\r\n\r\n<tr style=\"background-color: {\$postdatebg}; color: {\$postdatetext}; font-size: 10px; clear: both;\">\r\n	<td width=\"100%\" style=\"padding: 4px;\"><div style=\"float: left\">{\$commentsinfo} <a href=\"{\$unpurl}news.php?action=printable&newsid={\$newsid}\"><font face=\"verdana, arial, helvetica\" color=\"{\$postdatetext}\" size=\"1\">Print</span></a></div><div style=\"font-weight: bold; float: right;\">Posted by <a href=\"{\$unpurl}news.php?action=mail&amp;uname={\$poster}\"><span style=\"color :{\$tableheadlink}\">{\$poster}</span></a> on {\$postdate} at {\$posttime}</div></td>\r\n</tr>\r\n</table>\r\n</td></tr></table>\r\n<!-- News.Bit - NewsID {\$newsid} -->\r\n'),
	(2, 3, 'news_newsbit_commentslink', '<a onClick=''open(\"{\$unpurl}/comments.php?action=list&amp;newsid={\$newsid}\",\"View\",\"width=550, height=580, top=20,left=20,scrollbars=yes, status=no, toolbar=no, menubar=no\")'' href=\"javascript:void(0)\"><font face=\"verdana, arial, helvetica\" color=\"{\$postdatetext}\" size=\"1\"><strong>Comments:</strong> {\$comments}</font></a>&nbsp;<a onClick=''open(\"{\$unpurl}/comments.php?action=post&amp;newsid={\$newsid}\",\"Post\",\"width=550, height=580, top=20,left=20,scrollbars=yes, status=no, toolbar=no, menubar=no\")'' href=\"javascript:void(0)\"><font face=\"verdana, arial, helvetica\" color=\"{\$postdatetext}\" size=\"1\">(Add Comment)</font></a>'),
	(3, 2, 'headlines_displaybit', '<a href=\"{\$siteurl}#unpnews{\$newsid}\"><font size=\"1\" color=\"{\$newstextcolor}\" face=\"verdana,arial,helvetica\">{\$subject}</a> - {\$date}</font><br />'),
	(4, 4, 'printable_header', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n	\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>{\$sitetitle} - Powered by Utopia News Pro</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n<style type=\"text/css\">\r\nbody {\r\n	background-color: #ffffff;\r\n	color: #000000;\r\n	margin: 10px;\r\n	font-family: verdana,arial,helvetica,sans-serif;\r\n	font-size: 12px;\r\n}\r\na:link, a:active, a:visited {\r\n	color: #000000;\r\n}\r\nh1 {\r\n	font-variant: small-caps;\r\n	font-size: 18px;\r\n	font-weight: bold;\r\n	margin: 0;\r\n}\r\n.sf {\r\n	font-size: 10px;\r\n	text-align: center;\r\n}\r\n</style>\r\n</head>\r\n<body>\r\n<h1>{\$sitetitle} News</h1>\r\nPowered by Utopia News Pro<br />\r\n{\$siteurl}\r\n{\$showall_link}\r\n<hr />\r\n<strong>News:</strong>\r\n<br />'),
	(23, 5, 'archive_header', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n	\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>{\$sitetitle} - Archive - Powered by Utopia News Pro</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n<style type=\"text/css\">\r\nbody {\r\n	background-color: #ffffff;\r\n	color: #000000;\r\n	margin: 10px;\r\n	font-family: verdana,arial,helvetica,sans-serif;\r\n	font-size: 12px;\r\n}\r\na:link, a:active, a:visited {\r\n	color: #000000;\r\n}\r\nh1 {\r\n	font-variant: small-caps;\r\n	font-size: 18px;\r\n	font-weight: bold;\r\n	margin: 0;\r\n}\r\n.sf {\r\n	font-size: 10px;\r\n	text-align: center;\r\n}\r\n</style>\r\n</head>\r\n<body>\r\n<h1>{\$sitetitle} News Archive</h1>\r\nPowered by Utopia News Pro<br />\r\n{\$siteurl}\r\n{\$showall_link}\r\n<hr />\r\n<strong>News:</strong>\r\n<br />'),
	(17, 3, 'news_avatarbit', '<img src=\"{\$avatar}\" alt=\"{\$poster}''s Avatar\" align=\"left\" />'),
	(5, 4, 'printable_footer', '<div class=\"sf\">News generated by <a href=\"http://www.utopiasoftware.net\">Utopia News Pro</a></div>\r\n</body>\r\n</html>'),
	(6, 3, 'news_footer', '<center><a href=\"{\$unpurl}news.php?action=archive\"><font size=\"1\" color=\"{\$newstextcolor}\" face=\"verdana,arial,helvetica\">Archive</font></a> | <a href=\"{\$unpurl}news.php?action=printable\"><font size=\"1\" color=\"{\$newstextcolor}\" face=\"verdana,arial,helvetica\">Printable</font></a></center><br />\r\n\r\n<center><font size=\"1\" color=\"{\$newstextcolor}\" face=\"verdana,arial,helvetica\">News generated by </font><a href=\"http://www.utopiasoftware.net\"><font face=\"verdana,arial,helvetica\" size=\"1\" color=\"{\$linkcolor}\">Utopia News Pro</font></a></center>'),
	(7, 4, 'printable_newsbit', '<!-- PrintNews.Bit -->\r\n<strong>{\$subject}</strong><br />\r\n<em>Posted by {\$poster} on {\$postdate} at {\$posttime}</em>\r\n<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n	<tr>\r\n		<td>{\$newstext}</td>\r\n	</tr>\r\n</table>\r\n<hr />\r\n<!-- PrintNews.Bit -->\r\n\r\n'),
	(8, 1, 'comments_submit', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>Post Comments - {\$subject}</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n<style type=\"text/css\">\r\nbody {\r\n	background-color: {\$bgcolor};\r\n	color: {\$newstextcolor};\r\n	margin: 10px;\r\n	font-family: verdana, arial, helvetica, sans-serif;\r\n	font-size: 12px;\r\n}\r\nform {\r\n	display: inline;\r\n}\r\n.nf {\r\n	color: {\$newstextcolor};\r\n}\r\n.subject {\r\n	color: {\$subjecttext};\r\n}\r\n.postdate {\r\n	color: {\$postdatetext};\r\n}\r\n.sf {\r\n	font-size: 10px;\r\n}\r\n</style>\r\n</head>\r\n<body>\r\n<table width=\"90%\" align=\"center\">\r\n	<tr><td>\r\n	<table border=\"0\" width=\"100%\" style=\"border: {\$bordercolor} 1px solid\" cellpadding=\"5\" cellspacing=\"0\">\r\n	<tr><td bgcolor=\"{\$subjectbg}\" style=\"border-bottom: {\$bordercolor} 1px solid\" colspan=\"2\"><span class=\"subject\"><strong>Submit Comments</strong> - {\$subject}</span></td></tr>\r\n	<tr><td bgcolor=\"{\$newsbg}\" colspan=\"2\" style=\"border-bottom: {\$bordercolor} 1px solid\">\r\n<!-- Submission Form -->\r\n<form action=\"comments.php\" method=\"post\">\r\n<span class=\"nf\">\r\n<strong>Name:</strong><br />\r\n<input type=\"text\" name=\"name\" value=\"{\$username}\" size=\"30\" /><br />\r\n<strong>Password: <span style=\"sf\">(if applicable)</span></strong><br />\r\n<input type=\"password\" name=\"password\" value=\"\" size=\"30\" /><br />\r\n<strong>Email Address:</strong><br />\r\n<input type=\"text\" name=\"email\" value=\"\" size=\"30\" /><br />\r\n<strong>Subject:</strong><br />\r\n<input type=\"text\" name=\"title\" value=\"Re: {\$subject}\" size=\"30\" /><br />\r\n<strong>Comments:</strong><br />\r\n<textarea rows=\"15\" cols=\"55\" name=\"comments\"></textarea><br />\r\n<input type=\"hidden\" value=\"{\$newsid}\" name=\"newsid\" /><input type=\"hidden\" value=\"{\$ipaddress}\" name=\"ipaddress\" /><input type=\"hidden\" value=\"{\$proxy}\" name=\"proxy\" />\r\n<input type=\"submit\" name=\"submitcomment\" value=\"Post Comment\" />\r\n</span>\r\n</form>\r\n<!-- / Submission Form -->\r\n</td></tr>\r\n	<tr><td bgcolor=\"{\$postdatebg}\" align=\"right\" width=\"100%\">\r\n	<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n	<tr><td align=\"left\"><span class=\"postdate sf\"><strong>Date:</strong> {\$date} at {\$time}</span></td>\r\n	<td align=\"right\"><span class=\"postdate sf\"><strong>IP Address:</strong> {\$ipaddress} <strong>Proxy:</strong> {\$proxy}</span></td>\r\n	</tr>\r\n	</table>\r\n	</td>\r\n	</tr>\r\n</table>\r\n<br />\r\n</td></tr></table>\r\n</body>\r\n</html>'),
	(20, 5, 'archive_showall_link', '<br /><a href=\"{\$unpurl}news.php?action=archive&amp;showall\">Show Full Archive</a>'),
	(21, 5, 'archive_footer', '<div class=\"sf\">Archive generated by <a href=\"http://www.utopiasoftware.net\">Utopia News Pro</a></div>\r\n</body>\r\n</html>'),
	(9, 1, 'comments_list_header', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>Post Comments - {\$subject}</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n<style type=\"text/css\">\r\nbody {\r\n	background-color: {\$bgcolor};\r\n	color: {\$newstextcolor};\r\n	margin: 10px;\r\n	font-family: verdana, arial, helvetica, sans-serif;\r\n	font-size: 12px;\r\n}\r\na:link, a:active, a:visited {\r\n	color: {\$linkcolor};\r\n	font-size: 12px;\r\n}\r\na:hover {\r\n	color: {\$linkcolor};\r\n	font-size: 12px;\r\n}\r\n.nf {\r\n	color: {\$newstextcolor};\r\n	font-size: 12px;\r\n}\r\n.subject {\r\n	color: {\$subjecttext};\r\n	font-size: 12px;\r\n}\r\n.big {\r\n	font-size: 16px;\r\n}\r\n</style>\r\n</head>\r\n<body>\r\n<table width=\"90%\" align=\"center\">\r\n	<tr><td>\r\n	<table border=\"0\" width=\"100%\" style=\"border: {\$bordercolor} 1px solid\" cellpadding=\"5\" cellspacing=\"0\">\r\n	<tr><td bgcolor=\"{\$subjectbg}\" style=\"border-bottom: {\$bordercolor} 1px solid\" colspan=\"2\"><span class=\"subject\"><strong>{\$subject}</strong></span></td></tr>\r\n	<tr><td bgcolor=\"{\$newsbg}\" colspan=\"2\" style=\"border-bottom: {\$bordercolor} 1px solid\"><span class=\"nf\"><strong>News:</strong></span><br />\r\n<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td>\r\n<span class=\"nf\">\r\n{\$news}\r\n</span></td></tr></table>\r\n<hr />\r\n<!-- Comments -->\r\n<strong>Comments:</strong><br /><br />'),
	(10, 1, 'comments_list_commentbit', '<!-- Comments.Bit -->\r\n<table border=\"0\" width=\"100%\" cellpadding=\"4\" cellspacing=\"1\" align=\"center\" bgcolor=\"#000000\">\r\n	<tr>\r\n		<td bgcolor=\"{\$subjectbg}\" colspan=\"2\"><span class=\"subject\"><strong>{\$c_title}</strong></span></td>\r\n	</tr>\r\n	<tr>\r\n		<td bgcolor=\"{\$newsbg}\" width=\"30%\">\r\n		<center><span class=\"nf\"><strong><a href=\"mailto:{\$c_email}\">{\$c_name}</a></strong></span></center>\r\n		<span class=\"nf\"><strong>Date:</strong> {\$c_date} at {\$c_time}<br />\r\n		{\$ipaddressinfo}\r\n		{\$removecommentlink}</span>\r\n		</td>\r\n\r\n		<td bgcolor=\"{\$newsbg}\" width=\"70%\" valign=\"top\"><span class=\"nf\">{\$c_text}</span></td>\r\n	</tr>\r\n</table><br />\r\n<!-- Comments.Bit -->\r\n'),
	(13, 1, 'comments_redirect_posted', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<link rel=\"stylesheet\" href=\"style.css\" />\r\n<title>Comments Added</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n<meta http-equiv=\"refresh\" content=\"1; url=comments.php?action=list&newsid={\$newsid}\" />\r\n<style type=\"text/css\">\r\nbody {\r\n	background-color: {\$bgcolor};\r\n	color: {\$newstextcolor};\r\n	margin: 10px;\r\n}\r\n</style>\r\n</head>\r\n<body>\r\n<center>\r\n<div align=\"center\" style=\"color: black; background-color: #FFFFFF; border: 1px solid black; padding:5px; width: 750px\">\r\n<span class=\"smallfont\"><strong>Comments Added - Taking You Back To Comments</strong><br />\r\n<a href=\"comments.php?action=list&amp;newsid={\$newsid}\">Click here if you do not wish to wait<br />(Or if your browser doesn''t forward you)</a></span>\r\n</div></center>\r\n</body>\r\n</html>'),
	(11, 1, 'comments_list_commentbit_removecomment', '<br /><a href=\"comments.php?action=delete&amp;cid={\$c_id}\">[Remove Comment]</a>'),
	(12, 1, 'comments_list_commentbit_ipaddress', '<strong>IP Address:</strong> {\$c_ipaddress}<br /><strong>Proxy:</strong> {\$c_proxy}<br />'),
	(14, 1, 'comments_redirect_deleted', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<link rel=\"stylesheet\" href=\"style.css\" />\r\n<title>Comment(s) Removed</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n<meta http-equiv=\"refresh\" content=\"1; url=comments.php?action=list&newsid={\$newsid}\" />\r\n<style type=\"text/css\">\r\nbody {\r\n	background-color: {\$bgcolor};\r\n	color: {\$newstextcolor};\r\n	margin: 10px;\r\n}\r\n</style>\r\n</head>\r\n<body>\r\n<center>\r\n<div align=\"center\" style=\"color: black; background-color: #FFFFFF; border: 1px solid black; padding:5px; width: 750px\">\r\n<span class=\"smallfont\"><strong>Comment(s) Removed - Taking You Back To Comments</strong><br />\r\n		<a href=\"comments.php?action=list&amp;newsid={\$newsid}\">Click here if you do not wish to wait<br />(Or if your browser doesn''t forward you)</a></span>\r\n</div></center>\r\n</body>\r\n</html>'),
	(15, 1, 'comments_list_footer', '						<!-- / Comments -->\r\n						</td>\r\n					</tr>\r\n					<tr>\r\n						<td bgcolor=\"{\$postdatebg}\" align=\"right\" width=\"100%\">&nbsp;</td>\r\n					</tr>\r\n				</table>\r\n			<br />\r\n		</td></tr></table>\r\n</body>\r\n</html>'),
	(16, 4, 'printable_showall_link', '<br /><a href=\"{\$unpurl}news.php?action=printable&amp;showall\">Show All News</a>'),
	(18, 3, 'news_header', '<!-- news_header -->'),
	(19, 3, 'news_newsbit_readmorelink', '...<br /><br /><a onClick=''open(\"{\$unpurl}/comments.php?action=list&amp;newsid={\$newsid}\",\"View\",\"width=550, height=580, top=20,left=20,scrollbars=yes, status=no, toolbar=no, menubar=no\")'' href=\"javascript:void(0)\"><font face=\"verdana,arial,helvetica\" size=\"2\" color=\"{\$linkcolor}\">Read More</font></a>'),
	(22, 5, 'archive_newsbit', '<!-- PrintNews.Bit -->\r\n<strong>{\$subject}</strong><br />\r\n<em>Posted by {\$poster} on {\$postdate} at {\$posttime}</em>\r\n<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n	<tr>\r\n		<td>{\$newstext}</td>\r\n	</tr>\r\n</table>\r\n<hr />\r\n<!-- PrintNews.Bit -->\r\n\r\n');
	");
	echo 'Successfully created new tables!';
	echo '<form action="'.$this_upgrade.'" method="post"><input type="submit" name="step2" value="Continue -&gt;" /></form>';
	echo ($p_closebox);
	echo ($p_footer);
}

// +------------------------------------------------------------------+
// | Step 2 - Update FAQs                                             |
// +------------------------------------------------------------------+
if ($step == '2')
{
	echo ($p_header);
	echo ($p_openbox);
	echo 'The upgrade will now update the internal FAQ.<br /><br />';
	echo 'The internal FAQ has been redone. Removing FAQ tables.';
	$DB->query("DROP TABLE `unp_faq_categories`");
	$DB->query("DROP TABLE `unp_faq_questions`");
	echo '<form action="'.$this_upgrade.'" method="post"><input type="submit" name="step3" value="Continue -&gt;" /></form>';
	echo ($p_closebox);
	echo ($p_footer);
}

// +------------------------------------------------------------------+
// | Step 3 - Settings Update                                         |
// +------------------------------------------------------------------+
if ($step == '3')
{
	echo ($p_header);
	echo ($p_openbox);
	echo 'Upgrade will now add any settings introduced by features that appear in '.$version_next.'<br /><br />';
	unp_getSettings();
	$DB->query("INSERT INTO `unp_setting` (`id`, `display`, `title`, `varname`, `value`, `description`, `optioncode`) VALUES
	(21, 13, 'RSS Display Limit', 'rsslimit', '6', 'The maximum number of news articles to display in the RSS XML file.', 'text'),
	(22, 3, 'Site Description', 'sitedescription', 'A news site', 'A general description of your site and its news. This description is displayed in your RSS feed.', 'text')
	");
	echo 'Successfully updated settings!';
	echo '<form action="'.$this_upgrade.'" method="post"><input type="submit" name="step4" value="Continue -&gt;" /></form>';
	echo ($p_closebox);
	echo ($p_footer);
}

// +------------------------------------------------------------------+
// | Step 4 - Table Alteration                                        |
// +------------------------------------------------------------------+
if ($step == '4')
{
	echo ($p_header);
	echo ($p_openbox);
	echo 'Upgrade is now altering any tables that changed between '.$version_current.' and '.$version_next.'<br /><br />';
	$DB->query("DELETE FROM `unp_setting` WHERE id='14' LIMIT 1");
	$DB->query("UPDATE `unp_setting` SET display='1' WHERE varname='sitetitle'");
	$DB->query("UPDATE `unp_setting` SET display='2' WHERE varname='siteurl'");
	$DB->query("UPDATE `unp_setting` SET display='3' WHERE varname='sitedescription'");
	$DB->query("UPDATE `unp_setting` SET display='4' WHERE varname='unpdir'");
	$DB->query("UPDATE `unp_setting` SET display='5' WHERE varname='unpurl'");
	$DB->query("UPDATE `unp_setting` SET display='6' WHERE varname='htmlallowance'");
	$DB->query("UPDATE `unp_setting` SET display='7' WHERE varname='unpallowance'");
	$DB->query("UPDATE `unp_setting` SET display='8' WHERE varname='smiliesallowance'");
	$DB->query("UPDATE `unp_setting` SET display='9' WHERE varname='newstruncate'");
	$DB->query("UPDATE `unp_setting` SET display='10' WHERE varname='newstruncatelength'");
	$DB->query("UPDATE `unp_setting` SET display='11' WHERE varname='newslimit'");
	$DB->query("UPDATE `unp_setting` SET display='12' WHERE varname='headlineslimit'");
	$DB->query("UPDATE `unp_setting` SET display='13' WHERE varname='rsslimit'");
	$DB->query("UPDATE `unp_setting` SET display='14' WHERE varname='autocache'");
	$DB->query("UPDATE `unp_setting` SET display='15' WHERE varname='commentsallowance'");
	$DB->query("UPDATE `unp_setting` SET display='16' WHERE varname='avatarallowance'");
	$DB->query("UPDATE `unp_setting` SET display='17' WHERE varname='avatardimensions'");
	$DB->query("UPDATE `unp_setting` SET display='18' WHERE varname='timeoffset'");
	$DB->query("UPDATE `unp_setting` SET display='19' WHERE varname='dateformat'");
	$DB->query("UPDATE `unp_setting` SET display='20' WHERE varname='timeformat'");
	echo 'Successfully altered tables!';
	echo '<form action="'.$this_upgrade.'" method="post"><input type="submit" name="step5" value="Continue -&gt;" /></form>';
	echo ($p_closebox);
	echo ($p_footer);
}

// +------------------------------------------------------------------+
// | Step 5 - Updating Templates                                      |
// +------------------------------------------------------------------+
if ($step == '5')
{
	// No need to delete old templates
	$insertNewTemplate = $DB->query("INSERT INTO `unp_template` (`setid`, `templatename`, `template`) VALUES 
	(5, 'archive_showall_link', '<br /><a href=\"{\$unpurl}news.php?action=archive&amp;showall\">Show Full Archive</a>'),
	(5, 'archive_footer', '<div class=\"sf\">Archive generated by <a href=\"http://www.utopiasoftware.net\">Utopia News Pro</a></div>\r\n</body>\r\n</html>'),
	(5, 'archive_newsbit', '<!-- PrintNews.Bit -->\r\n<strong>{\$subject}</strong><br />\r\n<em>Posted by {\$poster} on {\$postdate} at {\$posttime}</em>\r\n<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n	<tr>\r\n		<td>{\$newstext}</td>\r\n	</tr>\r\n</table>\r\n<hr />\r\n<!-- PrintNews.Bit -->\r\n\r\n'),
	(5, 'archive_header', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n	\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>{\$sitetitle} - Archive - Powered by Utopia News Pro</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n<style type=\"text/css\">\r\nbody {\r\n	background-color: #ffffff;\r\n	color: #000000;\r\n	margin: 10px;\r\n	font-family: verdana,arial,helvetica,sans-serif;\r\n	font-size: 12px;\r\n}\r\na:link, a:active, a:visited {\r\n	color: #000000;\r\n}\r\nh1 {\r\n	font-variant: small-caps;\r\n	font-size: 18px;\r\n	font-weight: bold;\r\n	margin: 0;\r\n}\r\n.sf {\r\n	font-size: 10px;\r\n	text-align: center;\r\n}\r\n</style>\r\n</head>\r\n<body>\r\n<h1>{\$sitetitle} News Archive</h1>\r\nPowered by Utopia News Pro<br />\r\n{\$siteurl}\r\n{\$showall_link}\r\n<hr />\r\n<strong>News:</strong>\r\n<br />')
	");
	echo ($p_header);
	echo ($p_openbox);
	echo 'Upgrade will now update old '.$version_current.' templates.<br /><br />';
	echo 'New templates added! Some of the templates that existed in '.$version_current.' have changed in '.$version_new.'. Because you may have customized your templates, this update will not update the templates automatically.<br /><br />';
	echo 'In the event that you have NOT changed any of the default templates, you should click &quot;Continue and update templates&quot;. This action cannot be undone. If you have updated templates, you should just click &quot;Continue&quot;, which will skip the template updates. You will be able to update to the new templates in the future by clicking &quot;revert to original&quot; in the templates manager.<br /><br />';
	echo '<form action="'.$this_upgrade.'" method="post"><input type="submit" name="step6" value="Continue -&gt;" />&nbsp;<input type="submit" name="fulltemplateupdate" value="Continue and update templates -&gt;" /></form>';
	echo ($p_closebox);
	echo ($p_footer);
}

// +------------------------------------------------------------------+
// | Step 6 - Complete                                                |
// +------------------------------------------------------------------+
if ($step == '6')
{
	echo ($p_header);
	echo ($p_openbox);
	echo 'Congratulations! You have successfully upgraded Utopia News Pro from '.$version_current.' to '.$version_next.'!<br /><br />';
	echo 'Be sure to configure the new settings that were added in this version.</font><br /><br />';
	echo '<font class="highlight">NOTICE:</font> <font class="normalfont">Please <strong>delete</strong> this file once you have finished reading. Leaving this file on the server can pose a <strong>serious</strong> security threat!<br /><br />
	You may now access ';
	if (file_exists($next_upgrade))
	{
		echo 'the next upgrade script <a href="'.$next_upgrade.'">here</a>.';
	}
	else
	{
		echo 'the admin control panel <a href="index.php">here</a>.';
	}
	echo ($p_closebox);
	echo ($p_footer);
}

// +------------------------------------------------------------------+
// | Update All Templates                                             |
// +------------------------------------------------------------------+
if ($action == 'fulltemplateupdate')
{
	echo ($p_header);
	echo ($p_openbox);
	$DB->query("DELETE FROM `unp_template`");
	$DB->query("INSERT INTO `unp_template` (`id`, `setid`, `templatename`, `template`) VALUES
	(1, 3, 'news_newsbit', '<!-- News.Bit - NewsID {\$newsid} -->\r\n<a name=\"unpnews{\$newsid}\" />\r\n<table width=\"90%\" align=\"center\"><tr><td>\r\n<table width=\"100%\" cellpadding=\"1\" cellspacing=\"1\" border=\"0\" style=\"background-color: {\$bordercolor}; font-family: verdana, arial, helvetica, sans-serif; font-size: 12px;\">\r\n\r\n<tr style=\"background-color: {\$subjectbg}; color: {\$subjecttext}; font-weight: bold; padding: 4px;\">\r\n	<td width=\"100%\" style=\"padding: 4px;\">{\$subject}</td>\r\n</tr>\r\n\r\n<tr style=\"background-color: {\$newsbg}; color: {\$newstextcolor}; padding: 4px;\">\r\n	<td width=\"100%\" style=\"padding: 4px;\">{\$useravatar}{\$newstext}</td>\r\n</tr>\r\n\r\n<tr style=\"background-color: {\$postdatebg}; color: {\$postdatetext}; font-size: 10px; clear: both;\">\r\n	<td width=\"100%\" style=\"padding: 4px;\"><div style=\"float: left\">{\$commentsinfo} <a href=\"{\$unpurl}news.php?action=printable&newsid={\$newsid}\"><font face=\"verdana, arial, helvetica\" color=\"{\$postdatetext}\" size=\"1\">Print</span></a></div><div style=\"font-weight: bold; float: right;\">Posted by <a href=\"{\$unpurl}news.php?action=mail&amp;uname={\$poster}\"><span style=\"color :{\$tableheadlink}\">{\$poster}</span></a> on {\$postdate} at {\$posttime}</div></td>\r\n</tr>\r\n</table>\r\n</td></tr></table>\r\n<!-- News.Bit - NewsID {\$newsid} -->\r\n'),
	(2, 3, 'news_newsbit_commentslink', '<a onClick=''open(\"{\$unpurl}/comments.php?action=list&amp;newsid={\$newsid}\",\"View\",\"width=550, height=580, top=20,left=20,scrollbars=yes, status=no, toolbar=no, menubar=no\")'' href=\"javascript:void(0)\"><font face=\"verdana, arial, helvetica\" color=\"{\$postdatetext}\" size=\"1\"><strong>Comments:</strong> {\$comments}</font></a>&nbsp;<a onClick=''open(\"{\$unpurl}/comments.php?action=post&amp;newsid={\$newsid}\",\"Post\",\"width=550, height=580, top=20,left=20,scrollbars=yes, status=no, toolbar=no, menubar=no\")'' href=\"javascript:void(0)\"><font face=\"verdana, arial, helvetica\" color=\"{\$postdatetext}\" size=\"1\">(Add Comment)</font></a>'),
	(3, 2, 'headlines_displaybit', '<a href=\"{\$siteurl}#unpnews{\$newsid}\"><font size=\"1\" color=\"{\$newstextcolor}\" face=\"verdana,arial,helvetica\">{\$subject}</a> - {\$date}</font><br />'),
	(4, 4, 'printable_header', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n	\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>{\$sitetitle} - Powered by Utopia News Pro</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n<style type=\"text/css\">\r\nbody {\r\n	background-color: #ffffff;\r\n	color: #000000;\r\n	margin: 10px;\r\n	font-family: verdana,arial,helvetica,sans-serif;\r\n	font-size: 12px;\r\n}\r\na:link, a:active, a:visited {\r\n	color: #000000;\r\n}\r\nh1 {\r\n	font-variant: small-caps;\r\n	font-size: 18px;\r\n	font-weight: bold;\r\n	margin: 0;\r\n}\r\n.sf {\r\n	font-size: 10px;\r\n	text-align: center;\r\n}\r\n</style>\r\n</head>\r\n<body>\r\n<h1>{\$sitetitle} News</h1>\r\nPowered by Utopia News Pro<br />\r\n{\$siteurl}\r\n{\$showall_link}\r\n<hr />\r\n<strong>News:</strong>\r\n<br />'),
	(23, 5, 'archive_header', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n	\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>{\$sitetitle} - Archive - Powered by Utopia News Pro</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n<style type=\"text/css\">\r\nbody {\r\n	background-color: #ffffff;\r\n	color: #000000;\r\n	margin: 10px;\r\n	font-family: verdana,arial,helvetica,sans-serif;\r\n	font-size: 12px;\r\n}\r\na:link, a:active, a:visited {\r\n	color: #000000;\r\n}\r\nh1 {\r\n	font-variant: small-caps;\r\n	font-size: 18px;\r\n	font-weight: bold;\r\n	margin: 0;\r\n}\r\n.sf {\r\n	font-size: 10px;\r\n	text-align: center;\r\n}\r\n</style>\r\n</head>\r\n<body>\r\n<h1>{\$sitetitle} News Archive</h1>\r\nPowered by Utopia News Pro<br />\r\n{\$siteurl}\r\n{\$showall_link}\r\n<hr />\r\n<strong>News:</strong>\r\n<br />'),
	(17, 3, 'news_avatarbit', '<img src=\"{\$avatar}\" alt=\"{\$poster}''s Avatar\" align=\"left\" />'),
	(5, 4, 'printable_footer', '<div class=\"sf\">News generated by <a href=\"http://www.utopiasoftware.net\">Utopia News Pro</a></div>\r\n</body>\r\n</html>'),
	(6, 3, 'news_footer', '<center><a href=\"{\$unpurl}news.php?action=archive\"><font size=\"1\" color=\"{\$newstextcolor}\" face=\"verdana,arial,helvetica\">Archive</font></a> | <a href=\"{\$unpurl}news.php?action=printable\"><font size=\"1\" color=\"{\$newstextcolor}\" face=\"verdana,arial,helvetica\">Printable</font></a></center><br />\r\n\r\n<center><font size=\"1\" color=\"{\$newstextcolor}\" face=\"verdana,arial,helvetica\">News generated by </font><a href=\"http://www.utopiasoftware.net\"><font face=\"verdana,arial,helvetica\" size=\"1\" color=\"{\$linkcolor}\">Utopia News Pro</font></a></center>'),
	(7, 4, 'printable_newsbit', '<!-- PrintNews.Bit -->\r\n<strong>{\$subject}</strong><br />\r\n<em>Posted by {\$poster} on {\$postdate} at {\$posttime}</em>\r\n<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n	<tr>\r\n		<td>{\$newstext}</td>\r\n	</tr>\r\n</table>\r\n<hr />\r\n<!-- PrintNews.Bit -->\r\n\r\n'),
	(8, 1, 'comments_submit', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>Post Comments - {\$subject}</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n<style type=\"text/css\">\r\nbody {\r\n	background-color: {\$bgcolor};\r\n	color: {\$newstextcolor};\r\n	margin: 10px;\r\n	font-family: verdana, arial, helvetica, sans-serif;\r\n	font-size: 12px;\r\n}\r\nform {\r\n	display: inline;\r\n}\r\n.nf {\r\n	color: {\$newstextcolor};\r\n}\r\n.subject {\r\n	color: {\$subjecttext};\r\n}\r\n.postdate {\r\n	color: {\$postdatetext};\r\n}\r\n.sf {\r\n	font-size: 10px;\r\n}\r\n</style>\r\n</head>\r\n<body>\r\n<table width=\"90%\" align=\"center\">\r\n	<tr><td>\r\n	<table border=\"0\" width=\"100%\" style=\"border: {\$bordercolor} 1px solid\" cellpadding=\"5\" cellspacing=\"0\">\r\n	<tr><td bgcolor=\"{\$subjectbg}\" style=\"border-bottom: {\$bordercolor} 1px solid\" colspan=\"2\"><span class=\"subject\"><strong>Submit Comments</strong> - {\$subject}</span></td></tr>\r\n	<tr><td bgcolor=\"{\$newsbg}\" colspan=\"2\" style=\"border-bottom: {\$bordercolor} 1px solid\">\r\n<!-- Submission Form -->\r\n<form action=\"comments.php\" method=\"post\">\r\n<span class=\"nf\">\r\n<strong>Name:</strong><br />\r\n<input type=\"text\" name=\"name\" value=\"{\$username}\" size=\"30\" /><br />\r\n<strong>Password: <span style=\"sf\">(if applicable)</span></strong><br />\r\n<input type=\"password\" name=\"password\" value=\"\" size=\"30\" /><br />\r\n<strong>Email Address:</strong><br />\r\n<input type=\"text\" name=\"email\" value=\"\" size=\"30\" /><br />\r\n<strong>Subject:</strong><br />\r\n<input type=\"text\" name=\"title\" value=\"Re: {\$subject}\" size=\"30\" /><br />\r\n<strong>Comments:</strong><br />\r\n<textarea rows=\"15\" cols=\"55\" name=\"comments\"></textarea><br />\r\n<input type=\"hidden\" value=\"{\$newsid}\" name=\"newsid\" /><input type=\"hidden\" value=\"{\$ipaddress}\" name=\"ipaddress\" /><input type=\"hidden\" value=\"{\$proxy}\" name=\"proxy\" />\r\n<input type=\"submit\" name=\"submitcomment\" value=\"Post Comment\" />\r\n</span>\r\n</form>\r\n<!-- / Submission Form -->\r\n</td></tr>\r\n	<tr><td bgcolor=\"{\$postdatebg}\" align=\"right\" width=\"100%\">\r\n	<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n	<tr><td align=\"left\"><span class=\"postdate sf\"><strong>Date:</strong> {\$date} at {\$time}</span></td>\r\n	<td align=\"right\"><span class=\"postdate sf\"><strong>IP Address:</strong> {\$ipaddress} <strong>Proxy:</strong> {\$proxy}</span></td>\r\n	</tr>\r\n	</table>\r\n	</td>\r\n	</tr>\r\n</table>\r\n<br />\r\n</td></tr></table>\r\n</body>\r\n</html>'),
	(20, 5, 'archive_showall_link', '<br /><a href=\"{\$unpurl}news.php?action=archive&amp;showall\">Show Full Archive</a>'),
	(21, 5, 'archive_footer', '<div class=\"sf\">Archive generated by <a href=\"http://www.utopiasoftware.net\">Utopia News Pro</a></div>\r\n</body>\r\n</html>'),
	(9, 1, 'comments_list_header', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>Post Comments - {\$subject}</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n<style type=\"text/css\">\r\nbody {\r\n	background-color: {\$bgcolor};\r\n	color: {\$newstextcolor};\r\n	margin: 10px;\r\n	font-family: verdana, arial, helvetica, sans-serif;\r\n	font-size: 12px;\r\n}\r\na:link, a:active, a:visited {\r\n	color: {\$linkcolor};\r\n	font-size: 12px;\r\n}\r\na:hover {\r\n	color: {\$linkcolor};\r\n	font-size: 12px;\r\n}\r\n.nf {\r\n	color: {\$newstextcolor};\r\n	font-size: 12px;\r\n}\r\n.subject {\r\n	color: {\$subjecttext};\r\n	font-size: 12px;\r\n}\r\n.big {\r\n	font-size: 16px;\r\n}\r\n</style>\r\n</head>\r\n<body>\r\n<table width=\"90%\" align=\"center\">\r\n	<tr><td>\r\n	<table border=\"0\" width=\"100%\" style=\"border: {\$bordercolor} 1px solid\" cellpadding=\"5\" cellspacing=\"0\">\r\n	<tr><td bgcolor=\"{\$subjectbg}\" style=\"border-bottom: {\$bordercolor} 1px solid\" colspan=\"2\"><span class=\"subject\"><strong>{\$subject}</strong></span></td></tr>\r\n	<tr><td bgcolor=\"{\$newsbg}\" colspan=\"2\" style=\"border-bottom: {\$bordercolor} 1px solid\"><span class=\"nf\"><strong>News:</strong></span><br />\r\n<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td>\r\n<span class=\"nf\">\r\n{\$news}\r\n</span></td></tr></table>\r\n<hr />\r\n<!-- Comments -->\r\n<strong>Comments:</strong><br /><br />'),
	(10, 1, 'comments_list_commentbit', '<!-- Comments.Bit -->\r\n<table border=\"0\" width=\"100%\" cellpadding=\"4\" cellspacing=\"1\" align=\"center\" bgcolor=\"#000000\">\r\n	<tr>\r\n		<td bgcolor=\"{\$subjectbg}\" colspan=\"2\"><span class=\"subject\"><strong>{\$c_title}</strong></span></td>\r\n	</tr>\r\n	<tr>\r\n		<td bgcolor=\"{\$newsbg}\" width=\"30%\">\r\n		<center><span class=\"nf\"><strong><a href=\"mailto:{\$c_email}\">{\$c_name}</a></strong></span></center>\r\n		<span class=\"nf\"><strong>Date:</strong> {\$c_date} at {\$c_time}<br />\r\n		{\$ipaddressinfo}\r\n		{\$removecommentlink}</span>\r\n		</td>\r\n\r\n		<td bgcolor=\"{\$newsbg}\" width=\"70%\" valign=\"top\"><span class=\"nf\">{\$c_text}</span></td>\r\n	</tr>\r\n</table><br />\r\n<!-- Comments.Bit -->\r\n'),
	(13, 1, 'comments_redirect_posted', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<link rel=\"stylesheet\" href=\"style.css\" />\r\n<title>Comments Added</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n<meta http-equiv=\"refresh\" content=\"1; url=comments.php?action=list&newsid={\$newsid}\" />\r\n<style type=\"text/css\">\r\nbody {\r\n	background-color: {\$bgcolor};\r\n	color: {\$newstextcolor};\r\n	margin: 10px;\r\n}\r\n</style>\r\n</head>\r\n<body>\r\n<center>\r\n<div align=\"center\" style=\"color: black; background-color: #FFFFFF; border: 1px solid black; padding:5px; width: 750px\">\r\n<span class=\"smallfont\"><strong>Comments Added - Taking You Back To Comments</strong><br />\r\n<a href=\"comments.php?action=list&amp;newsid={\$newsid}\">Click here if you do not wish to wait<br />(Or if your browser doesn''t forward you)</a></span>\r\n</div></center>\r\n</body>\r\n</html>'),
	(11, 1, 'comments_list_commentbit_removecomment', '<br /><a href=\"comments.php?action=delete&amp;cid={\$c_id}\">[Remove Comment]</a>'),
	(12, 1, 'comments_list_commentbit_ipaddress', '<strong>IP Address:</strong> {\$c_ipaddress}<br /><strong>Proxy:</strong> {\$c_proxy}<br />'),
	(14, 1, 'comments_redirect_deleted', '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<link rel=\"stylesheet\" href=\"style.css\" />\r\n<title>Comment(s) Removed</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n<meta http-equiv=\"refresh\" content=\"1; url=comments.php?action=list&newsid={\$newsid}\" />\r\n<style type=\"text/css\">\r\nbody {\r\n	background-color: {\$bgcolor};\r\n	color: {\$newstextcolor};\r\n	margin: 10px;\r\n}\r\n</style>\r\n</head>\r\n<body>\r\n<center>\r\n<div align=\"center\" style=\"color: black; background-color: #FFFFFF; border: 1px solid black; padding:5px; width: 750px\">\r\n<span class=\"smallfont\"><strong>Comment(s) Removed - Taking You Back To Comments</strong><br />\r\n		<a href=\"comments.php?action=list&amp;newsid={\$newsid}\">Click here if you do not wish to wait<br />(Or if your browser doesn''t forward you)</a></span>\r\n</div></center>\r\n</body>\r\n</html>'),
	(15, 1, 'comments_list_footer', '						<!-- / Comments -->\r\n						</td>\r\n					</tr>\r\n					<tr>\r\n						<td bgcolor=\"{\$postdatebg}\" align=\"right\" width=\"100%\">&nbsp;</td>\r\n					</tr>\r\n				</table>\r\n			<br />\r\n		</td></tr></table>\r\n</body>\r\n</html>'),
	(16, 4, 'printable_showall_link', '<br /><a href=\"{\$unpurl}news.php?action=printable&amp;showall\">Show All News</a>'),
	(18, 3, 'news_header', '<!-- news_header -->'),
	(19, 3, 'news_newsbit_readmorelink', '...<br /><br /><a onClick=''open(\"{\$unpurl}/comments.php?action=list&amp;newsid={\$newsid}\",\"View\",\"width=550, height=580, top=20,left=20,scrollbars=yes, status=no, toolbar=no, menubar=no\")'' href=\"javascript:void(0)\"><font face=\"verdana,arial,helvetica\" size=\"2\" color=\"{\$linkcolor}\">Read More</font></a>'),
	(22, 5, 'archive_newsbit', '<!-- PrintNews.Bit -->\r\n<strong>{\$subject}</strong><br />\r\n<em>Posted by {\$poster} on {\$postdate} at {\$posttime}</em>\r\n<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n	<tr>\r\n		<td>{\$newstext}</td>\r\n	</tr>\r\n</table>\r\n<hr />\r\n<!-- PrintNews.Bit -->\r\n\r\n');
	");
	echo 'All templates updated!<br /><br />';
	echo '<form action="'.$this_upgrade.'" method="post"><input type="submit" name="step6" value="Continue -&gt;" /></form>';
	echo ($p_closebox);
	echo ($p_footer);
}
?>
Return current item: Utopia News Pro