<?php
/*****************************************************************
************* BKWORKS PRO PHP V 0.5 BETA 1 ***********************
******************** BRYAN KOOIENGA ******************************
****************** DECEMBER 20, 2007 *****************************
*****************************************************************/
if(!defined("INDEX")) {
header("location: ../../?view=home");
}
if(!strtoupper($username) == "ADMIN") {
echo "<h3>Access is denied</h3>";
} else {
if($_POST) {
if($_POST['url']) {
$query = "UPDATE settings
SET install_url = '$_POST[url]'
WHERE always_one = '1'";
mysql_query($query) or die("Can't query because " . mysql_error());
echo "Settings saved successfully.<br>
<a href=\"?view=admin\">Click here to go back to the admin panel.</a>";
} else {
echo ("You need to include an installation URL. Please <a href=\"?view=admin\">click here</a> to go back and fix this problem.");
}
} else {
echo ("You can not access this page directly. Please <a href=\"?view=admin\">go back to the admin panel.</a>");
}
}
?>