File size: 1.35Kb
<?php
/**
* Wap Portal русская версия
*
* Copyright (C) 2002 - 2005 Красников Виктор
*
* Wap Portal
* Developer: Красников Виктор - [email protected]
* Homepage: http://tut.spb.su
* Date: 05/05/2005
* Version #: 1.0
**/
// Update database
if (isset($update)) {
$query = "UPDATE wps_timediff SET timediff = '$select' WHERE id = 1";
$result = mysql_query($query)
or die("Update failed");
$update = 0;
}
?>
<table width="600">
<tr>
<td><a href='index.php' border=0>Home</a> > Time Management</td>
</tr>
<tr>
<td align="center"><b>Edit Server Time Offset</b></td>
</tr>
<tr>
<td align="center"><br>
<form name="form" method="post" action="index.php?option=time">
<p>
<?
// Read timediff from mySQL database
$query = "SELECT * FROM wps_timediff";
$result = mysql_query($query);
$row = mysql_fetch_row($result);
print " <select name=\"select\">\n";
for ($count=-24; $count <= 24; ++$count) {
if ($row[1] == $count) {
print " <option selected>$count</option>\n";
} else {
print " <option>$count</option>\n";
}
}
print " </select>\n";
?>
</p>
<input type="hidden" name="update" value="1">
<input type="submit" name="Submit" value="Submit">
</form>
</td>
</tr>
</table>