20 defined(
'XOOPS_ROOT_PATH') or die('Restricted access');
43 $this->XoopsFormElementTray($caption,
' ');
44 $value = intval($value);
45 $value = ($value > 0) ? $value : time();
46 $datetime = getDate($value);
49 for (
$i = 0;
$i < 24;
$i ++) {
50 for (
$j = 0;
$j < 60;
$j =
$j + 10) {
51 $key = (
$i * 3600) + (
$j * 60);
52 $timearray[$key] = (
$j != 0) ?
$i .
':' .
$j :
$i .
':0' .
$j;
57 $timeselect =
new XoopsFormSelect(
'', $name .
'[time]', $datetime[
'hours'] * 3600 + 600 * ceil($datetime[
'minutes'] / 10));
58 $timeselect->addOptionArray($timearray);
59 $this->addElement($timeselect);