[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/joomla/html/parameter/element/ -> timezones.php (source)

   1  <?php
   2  /**
   3  * @version        $Id:timezones.php 6961 2007-03-15 16:06:53Z tcp $
   4  * @package        Joomla.Framework
   5  * @subpackage    Parameter
   6  * @copyright    Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
   7  * @license        GNU/GPL, see LICENSE.php
   8  * Joomla! is free software. This version may have been modified pursuant
   9  * to the GNU General Public License, and as distributed it includes or
  10  * is derivative of works licensed under the GNU General Public License or
  11  * other free or open source software licenses.
  12  * See COPYRIGHT.php for copyright notices and details.
  13  */
  14  
  15  // Check to ensure this file is within the rest of the framework
  16  defined('JPATH_BASE') or die();
  17  
  18  /**
  19   * Renders a timezones element
  20   *
  21   * @package     Joomla.Framework
  22   * @subpackage        Parameter
  23   * @since        1.5
  24   */
  25  
  26  class JElementTimezones extends JElement
  27  {
  28      /**
  29      * Element name
  30      *
  31      * @access    protected
  32      * @var        string
  33      */
  34      var    $_name = 'Timezones';
  35  
  36  	function fetchElement($name, $value, &$node, $control_name)
  37      {
  38          if(!strlen($value)) {
  39              $conf =& JFactory::getConfig();
  40              $value = $conf->getValue('config.offset');
  41          }
  42  
  43          // LOCALE SETTINGS
  44          $timezones = array (
  45              JHTML::_('select.option', -12, JText::_('(UTC -12:00) International Date Line West')),
  46              JHTML::_('select.option', -11, JText::_('(UTC -11:00) Midway Island, Samoa')),
  47              JHTML::_('select.option', -10, JText::_('(UTC -10:00) Hawaii')),
  48              JHTML::_('select.option', -9.5, JText::_('(UTC -09:30) Taiohae, Marquesas Islands')),
  49              JHTML::_('select.option', -9, JText::_('(UTC -09:00) Alaska')),
  50              JHTML::_('select.option', -8, JText::_('(UTC -08:00) Pacific Time (US &amp; Canada)')),
  51              JHTML::_('select.option', -7, JText::_('(UTC -07:00) Mountain Time (US &amp; Canada)')),
  52              JHTML::_('select.option', -6, JText::_('(UTC -06:00) Central Time (US &amp; Canada), Mexico City')),
  53              JHTML::_('select.option', -5, JText::_('(UTC -05:00) Eastern Time (US &amp; Canada), Bogota, Lima')),
  54              JHTML::_('select.option', -4, JText::_('(UTC -04:00) Atlantic Time (Canada), Caracas, La Paz')),
  55              JHTML::_('select.option', -4.5, JText::_('(UTC -04:30) Venezuela')),
  56              JHTML::_('select.option', -3.5, JText::_('(UTC -03:30) St. John\'s, Newfoundland, Labrador')),
  57              JHTML::_('select.option', -3, JText::_('(UTC -03:00) Brazil, Buenos Aires, Georgetown')),
  58              JHTML::_('select.option', -2, JText::_('(UTC -02:00) Mid-Atlantic')),
  59              JHTML::_('select.option', -1, JText::_('(UTC -01:00) Azores, Cape Verde Islands')),
  60              JHTML::_('select.option', 0, JText::_('(UTC 00:00) Western Europe Time, London, Lisbon, Casablanca')),
  61              JHTML::_('select.option', 1, JText::_('(UTC +01:00) Amsterdam, Berlin, Brussels, Copenhagen, Madrid, Paris')),
  62              JHTML::_('select.option', 2, JText::_('(UTC +02:00) Istanbul, Jerusalem, Kaliningrad, South Africa')),
  63              JHTML::_('select.option', 3, JText::_('(UTC +03:00) Baghdad, Riyadh, Moscow, St. Petersburg')),
  64              JHTML::_('select.option', 3.5, JText::_('(UTC +03:30) Tehran')),
  65              JHTML::_('select.option', 4, JText::_('(UTC +04:00) Abu Dhabi, Muscat, Baku, Tbilisi')),
  66              JHTML::_('select.option', 4.5, JText::_('(UTC +04:30) Kabul')),
  67              JHTML::_('select.option', 5, JText::_('(UTC +05:00) Ekaterinburg, Islamabad, Karachi, Tashkent')),
  68              JHTML::_('select.option', 5.5, JText::_('(UTC +05:30) Bombay, Calcutta, Madras, New Delhi, Colombo')),
  69              JHTML::_('select.option', 5.75, JText::_('(UTC +05:45) Kathmandu')),
  70              JHTML::_('select.option', 6, JText::_('(UTC +06:00) Almaty, Dhaka')),
  71              JHTML::_('select.option', 6.5, JText::_('(UTC +06:30) Yagoon')),
  72              JHTML::_('select.option', 7, JText::_('(UTC +07:00) Bangkok, Hanoi, Jakarta')),
  73              JHTML::_('select.option', 8, JText::_('(UTC +08:00) Beijing, Perth, Singapore, Hong Kong')),
  74              JHTML::_('select.option', 8.75, JText::_('(UTC +08:00) Ulaanbaatar, Western Australia')),
  75              JHTML::_('select.option', 9, JText::_('(UTC +09:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk')),
  76              JHTML::_('select.option', 9.5, JText::_('(UTC +09:30) Adelaide, Darwin, Yakutsk')),
  77              JHTML::_('select.option', 10, JText::_('(UTC +10:00) Eastern Australia, Guam, Vladivostok')),
  78              JHTML::_('select.option', 10.5, JText::_('(UTC +10:30) Lord Howe Island (Australia)')),
  79              JHTML::_('select.option', 11, JText::_('(UTC +11:00) Magadan, Solomon Islands, New Caledonia')),
  80              JHTML::_('select.option', 11.5, JText::_('(UTC +11:30) Norfolk Island')),
  81              JHTML::_('select.option', 12, JText::_('(UTC +12:00) Auckland, Wellington, Fiji, Kamchatka')),
  82              JHTML::_('select.option', 12.75, JText::_('(UTC +12:45) Chatham Island')),
  83              JHTML::_('select.option', 13, JText::_('(UTC +13:00) Tonga')),
  84              JHTML::_('select.option', 14, JText::_('(UTC +14:00) Kiribati')),);
  85  
  86          return JHTML::_('select.genericlist',  $timezones, ''.$control_name.'['.$name.']', ' class="inputbox"', 'value', 'text', $value, $control_name.$name );
  87      }
  88  }


Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1