Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<?php

/**
 * Exotic Island Real Estate SIM/Parcel Management
 *
 * @author Original by Randy Cram (Raven Beamish) <http://logicdepths.net/>
 * @version 1.0a
 * @file settings.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">&nbsp;</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=" " /> &nbsp;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">&nbsp;</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'])) {

							// Define Variables
							$websitename = $_POST['websitename'];
							$tagline = $_POST['tagline'];
							$websiteurl = $_POST['websiteurl'];
							$contactemail = $_POST['contactemail'];
							
						// Attempt To Update
						$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">&nbsp;</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
				}
				?>