PHP Classes

File: src/test/tz-select.php

Recommend this page to a friend!
  Classes of ASCOOS CMS   PHP Timezone Select List   src/test/tz-select.php   Download  
File: src/test/tz-select.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Timezone Select List
Show a form input to let the user pick a timezone
Author: By
Last change:
Date: 1 year ago
Size: 918 bytes
 

Contents

Class file image Download
<?php
require_once('..\kernel\coreTimezones.php');

$objTZ = new \ASCOOS\CMS\KERNEL\CORE\Timezones\TTimezonesHandler();

$params = [
   
'class="default"',
   
'data-role="timezones"'
];

?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>ASCOOS - Test timezones select box</title>
   
    <link rel="icon" href="../favicon.ico" />
  </head>

  <body>
    <form>
        <label for="timezones">Choose a PHP Timezone:</label>
        <?php
          $start
= microtime(true);
          echo
$objTZ->getHtmlSelect('timezones', $params);
         
$profile_ascoos = number_format(microtime(true) - $start, 25);
          unset(
$start);
         
?>
</form>
    <div>
      <p>The list of timezones was created in : <?php echo $profile_ascoos; unset($profile_ascoos); ?></p>
    </div>
  </body>
</html>