<?php
session_start();
require('../inc/config.php');
$starttime = microtime();
$startarray = explode(" ", $starttime);
$starttime = $startarray[1] + $startarray[0];
$settingsquery = mysql_query("SELECT * FROM settings") or die(mysql_error());
$setingsresult = mysql_fetch_array( $settingsquery );
$sitename = $setingsresult['sitename'];
$siteurl = $setingsresult['siteurl'];
$build = $setingsresult['build'];
$notesquery = mysql_query("SELECT * FROM user WHERE `username` = '$username' && `password` = '$password'") or die(mysql_error());
$notesresult = mysql_fetch_array( $notesquery );
$notes = $notesresult['notes'];
?>
<!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-9" />
<title><?php echo $sitename ?> Dashboard</title>
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<script src="../js/jquery-1.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
//tabbed forms box
$(function () {
var tabContainers = $('div#forms > div.innerContent'); // change div#forms to your new div id (example:div#pages) if you want to use tabs on another page or div.
tabContainers.hide().filter(':first').show();
$('ul.switcherTabs a').click(function () {
tabContainers.hide();
tabContainers.filter(this.hash).show();
$('ul.switcherTabs li').removeClass('selected');
$(this).parent().addClass('selected');
return false;
}).filter(':first').click();
});
</script>
</head>
<?php
if(!$_SESSION['username'])
{
?>
<body>
<div id="container">
<div id="header">
<div id="logo">
<h1><span><a href="#"><?php echo $sitename ?> Admin</a></span></h1>
<p><?php echo $sitename ?></p>
</div>
<div id="menu">
<!-- MENU -->
</div>
</div><!-- end of #header -->
<hr />
<div id="content">
<div id="leftBox">
<div id="pageIntro">
<h2>Administrative Error!</h2>
</div>
<hr />
<div class="errorBox"><div class="errorBoxTop"> </div>
<div class="msgBoxContent errorIcon">
<p>No Login Session Found! </p>
<p><strong>Uh Oh!</strong>
<br />It appears that you are either trying to get into the managemetn dashboard without a login or you have bookmarked this page and
your session was destroyed, Yes we destroy sessions to prevent others that use your computer from being able to gain access.
<br />Please go <a href="../index.php">back</a> and try again.</p>
</div>
<hr />
</div>
<hr />
</div><!-- end of #leftBox -->
<?php
}
else
{
$username = $_SESSION['username'];
?>
<div id="container">
<div id="header">
<div id="logo">
<h1><span><a href="#"><?php echo $sitename ?> Admin</a></span></h1>
<p><?php echo $sitename ?></p>
</div>
<div id="userBox">
<p><img src="../images/icon_user.gif" width="16" height="19" alt=" " /> Welcome, <span class="white"><?php echo $username ?></span>. | <a href="profile.php">User CP</a> | <a href="logout.php">Logout</a></p>
<p class="small">Current Date & Time: <span class="white">
<script type="text/javascript">
<!-- CURRENT DATE -->
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
document.write(month + "/" + day + "/" + year)
</script>
-
<script type="text/javascript">
<!-- CURRENT TIME -->
var currentTime = new Date()
var hours = currentTime.getHours()
var minutes = currentTime.getMinutes()
if (minutes < 10){
minutes = "0" + minutes
}
document.write(hours + ":" + minutes + " ")
if(hours > 11){
document.write("PM")
} else {
document.write("AM")
}
</script>
</span></p>
</div><!-- end of #userBox -->
<div id="menu">
<ul>
<li class="selected">
<span class="selected-arrow"> </span><!-- place this span inside the selected list element like on this one -->
<a href="index.php">Dashboard</a>
<ul>
<li><a href="index.php">Welcome</a></li>
<li class="selected"><a href="settings.php">Basic Settings</a></li>
</ul>
</li>
<li><a href="users.php">Users</a></li>
<li><a href="pages.php">Pages</a></li>
<li><a href="#">Modules</a></li>
</ul>
<p id="rightLink"><a href="<?php echo $siteurl ?>">View Site</a></p>
</div><!-- end of #menu -->
</div><!-- end of #header -->
<hr />
<div id="content">
<div id="leftBox">
<div id="pageIntro">
<h2>Basic Settings</h2>
<p>This page will let you manage all your general settings for the website. There are a few options that it is recommeneded that you only modify if you know what you are doing.
If you have questions about the functionality of any of these features please check the user manual or contact us on the support forums.</p>
</div>
<div class="contentBox" id="forms">
<div class="contentBoxTop">
<h3>General Settings</h3>
</div>
<div class="innerContent" id="box-1">
<?php
if (isset($_POST['submit'])) {
$websitename = $_POST['websitename'];
$tagline = $_POST['tagline'];
$websiteurl = $_POST['websiteurl'];
$contactemail = $_POST['contactemail'];
$update = mysql_query"UPDATE settings SET `sitename` = '$websitename' ") or die(mysql_error());
if(mysql_num_rows($update) > 0
{
echo 'SUCCESS';
}
else
{
echo 'FAILZOR';
}
} else {
?>
<form action="" method="POST" id="settings" name="settings ">
Website Name: <br />
<label class="mediumInput">
<input name="websitename" id="websitename" type="text" size="75" />
</label>
<br />
<small>This will show up in the tab bar in your browser and all over the website.</small>
<p>Tagline (Description): <br />
<label class="textareasmall">
<textarea name="tagline" id="tagline" rows="2" cols="5"></textarea>
</label>
<br />
<small>This will show up on search engines under the name and will give a basic description of your website.</small></p>
<p>Website URL: <br />
<label class="mediumInput">
<input type="text" name="websiteurl" id="websiteurl" size="75"/>
</label>
<br />
<small>This is the URL to where you have this installed, It is recommend you do not change unless you know what you are doing.</small></p>
<p>Contact Email: <br />
<label class="mediumInput">
<input name="contactemail" id="contactemail" type="text" size="75" />
</label>
<br />
<small>This is where emails will be sent to when contact form is used, as well as when emails are sent out.</small></p>
<p>
<input name="submit" id="submit" type="image" src="../images/bt_submit.gif" />
</p>
</form>
<?php
}
?>
</div><!--end of #box-1-->
</div>
<hr />
<div class="successBox">
<div class="successBoxTop"> </div>
<div class="msgBoxContent successIcon">
<p>Latest News</p>
<p>Get all the latest news from the <a href="http://www.dev.logicdepths.net/">Logic Depths Development Blog</a>.
<br /> Tracker Coming Soon!!!</p>
</div>
</div>
<hr />
<hr />
</div><!-- end of #leftBox -->
<div id="sidebar" class="rightBoxes">
<div class="rightBoxesTop"><h3>Sidebar</h3></div>
<div class="rightContent">
<ul id="sidebarLinks">
<li><a href="#">Themeforest Templates</a></li>
<li><a href="#">Development Server</a></li>
<li><a href="#">AudioJungle Loops</a></li>
<li><a href="#">Flashden Templates</a></li>
<li><a href="#">In the Woods Blog</a></li>
</ul>
</div>
</div><!-- end of #sidebar -->
</div><!-- end of #content -->
<br class="clearFix" />
</div><!-- end of #container -->
<hr />
<div id="footerWrap">
<div id="footer">
<ul>
<li><a href="#">Dashboard</a></li>
<li><a href="#">Users</a></li>
<li><a href="#">Pages</a></li>
<li><a href="#">Modules</a></li>
</ul>
<div id="footRight">
<div id="footStats">
<?php
$endtime = microtime();
$endarray = explode(" ", $endtime);
$endtime = $endarray[1] + $endarray[0];
$totaltime = $endtime - $starttime;
$totaltime = round($totaltime,5);
?>
<p>Page loaded in <strong><?php echo $totaltime ?></strong> seconds.</p>
</div>
Copyright 2009, All Rights Reserved<br />
<span class="white"><a href="http://www.logicdepths.net/">Logic Depths</a></span>
<p class="version">Build <?php echo $build ?></p>
</div>
</div>
<br class="clearFix" />
</div>
</body>
</html>
<?php
}
?>