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

Размер файла: 3.27Kb
<?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) && $update=="1") {
	$query = "UPDATE wps_dateformat SET dateformatlong = '$dateformatlong', dateformatmiddle = '$dateformatmiddle', dateformatshort = '$dateformatshort' WHERE id = 1";
	$result = mysql_query($query)
	    or die("Update failed");
}
// Read date format
$query = "SELECT * FROM wps_dateformat WHERE id = 1";
$result = mysql_query($query);
$row = mysql_fetch_object($result);
$dateformatlong = $row->dateformatlong;
$dateformatmiddle = $row->dateformatmiddle;
$dateformatshort = $row->dateformatshort;
?>

<table width="600">
  <tr>
      <td colspan="2"><a href='index.php' border=0>Home</a> &gt; Date Format Management</td>
    </tr>
    <tr>
      <td align="center" width="75%"><b>Choose Preferable Date Format</b></td>
      <td align="center" width="25%"><b>Help</b></td>
    </tr>
    <tr>
    <td valign="top"><br>
<br>
      <form name="form" method="post" action="index.php?option=date">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>Long format:&nbsp;</td>
            <td><input type="text" name="dateformatlong" value="<?php echo $dateformatlong; ?>">
            </td>
          </tr>
          <tr>
            <td>Middle format:&nbsp;</td>
            <td><input type="text" name="dateformatmiddle" value="<?php echo $dateformatmiddle; ?>"></td>
          </tr>
          <tr>
            <td>Short format:</td>
            <td><input type="text" name="dateformatshort" value="<?php echo $dateformatshort; ?>"></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td><input type="hidden" name="update" value="1"></td>
            <td><input type="submit" name="Submit" value="Submit"></td>
          </tr>
        </table>
      </form>
      </td>

    <td valign="top">
      <small>
      %a - abbreviated weekday name<br><br>
      %A - full weekday name<br><br>
      %b - abbreviated month name<br><br>
      %B - full month name<br><br>
      %d - day of the month as a decimal number (range 01 to 31) <br><br>
      %e - day of the month as a decimal number, a single digit is preceded
        by a space (range ' 1' to '31') <br><br>
      %H - hour as a decimal number using a 24-hour clock (range 00 to 23)<br><br>
      %I - hour as a decimal number using a 12-hour clock (range 01 to 12)<br><br>
      %m - month as a decimal number (range 01 to 12) <br><br>
      %M - minute as a decimal number<br><br>
      %p - either `am' or `pm'<br><br>
      %r - time in a.m. and p.m. notation<br><br>
      %R - time in 24 hour notation<br><br>
      %S - second as a decimal number<br><br>
      %y - year as a decimal number without a century (range 00 to 99)<br><br>
      %Y - year as a decimal number including the century<br><br>
      %Z - time zone or name or abbreviation<br><br>
      <a href="http://www.php.net/manual/en/function.strftime.php" target="_blank">more
      help</a></small></td>
    </tr>
  </table>