Просмотр файла admin/includes/time.php

Размер файла: 1.34Kb
<?php
	/**
	 *	Wap Portal Server
	 *
	 *	Copyright (C) 2002 - 2004 Emir Sakic
	 *
	 *	Wap Portal Server
	 *	Developer: Emir Sakic - [email protected]
	 *  Homepage: http://www.sakic.net
	 *	Date: 15/03/2004
	 * 	Version #: 1.2
	**/

// 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> &gt; 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>