<?php
$time_start = microtime(TRUE);
define('IN_HBS',TRUE);
include("../inc/include.php");
?>
<?php include("password_protect.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>HBS Administrative Control Panel</title>
</head>
<?php include ("default_style.css"); ?>
<body>
<div align="center"><img src="images/header.png" />
</div>
<table id="table" align="center">
<tr>
<td id="menu">
<?php include ("navigation.php"); ?>
</td>
<td id="content">
<table width="100%">
<tr>
<td style="background-color:#FFFFD9; border: #FFFFB7 1px solid;">
<?php
if($_GET['do'] == "save") {
echo '<br />';
$title = $_POST['title'];
$subtitle = $_POST['subtitle'];
$user = $_POST['user'];
$pass = $_POST['pass'];
$pass2 = $_POST['pass2'];
if(empty($title) || empty($user) || empty($template)) {
echo 'You left something blank that was required, go back and fix the problem.';
exit;
}
$sql = "UPDATE `" . $mysql["db_prefix"] . "config`
SET `title` = '$title',
`subtitle` = '$subtitle',
`a_user` = '$user'
WHERE `id` = 1 LIMIT 1 ;";
$res = mysql_query($sql) or die("Couldn't save settings. MySQL said: " . mysql_error());
echo "Settings saved. Bringing you back to your ACP home...<a href=\"index.php\">Click here if you don't want to wait.</a>";
if($pass == $pass2 && !empty($pass) && !empty($pass2)) {
$sql = "UPDATE `" . $mysql["db_prefix"] . "config`
SET `a_pass` = MD5('$pass')
WHERE `id` = 1 LIMIT 1 ;";
$res = mysql_query($sql) or die("Couldn't update password. MySQL said: " . mysql_error());
echo '<br /><br />Password updated successfully.';
}
echo '<br /><br /><head><meta http-equiv="refresh" content="2;url=index.php"></head>';
} else {
$sql = "SELECT * FROM `" . $mysql["db_prefix"] . "config` WHERE `id` = 1 LIMIT 1;";
$res = mysql_query($sql) or die("Can't retrieve settings. MySQL said: " . mysql_error());
$data = mysql_fetch_row($res);
?>
<br />
<table align="center"><tr><td>
<form name="form1" method="post" action="configuration.php?do=save">
Blog Title: </td><td>
<input type="text" name="title" value="<?php echo $data['1']; ?>"></tr></td>
<tr><td>
Blog Subtitle: </td><td>
<input type="text" name="subtitle" value="<?php echo $data['2']; ?>"></tr></td>
<tr><td>
Control Panel Username: </td><td>
<input type="text" name="user" value="<?php echo $data['3']; ?>"></tr></td>
<tr><td>
Type New Password: </td><td>
<input type="password" name="pass"></tr></td>
<tr><td>
Retype New Password: </td><td>
<input type="password" name="pass2"><tr><td>
</td></td>
</table>
<p>
<center> <input type="submit" name="Submit" value="Save Settings"></center>
<br>
</p>
</form>
<?php
}
?>
</td>
</tr>
</table>
</td>
</table>
<?php include("footer.php");?>
</body>
</html>