]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/userprefs.tmpl
Static timezone selector html replaced with code which builds a timezone popup and...
[SourceForge/phpwiki.git] / themes / default / templates / userprefs.tmpl
1 <?php // -*-html-*-
2
3 $serverzone = intval( array_pop(explode(" ", Rfc2822DateTime())));
4 $select = HTML();
5 for ($z = -14; $z < 12; $z++) {
6     // would prefer to actually have the string formatted like: "GMT+0430"
7     $selected = $serverzone == intval(sprintf("%s00", $z)) ? array('selected' => 'true') : '';
8     $select->pushContent(HTML::option(
9                          array_merge(array('value' => sprintf("%s00", $z)),
10                                      $selected),
11                          sprintf("GMT%s00",$z)
12                          ));
13
14     $selected = $serverzone == intval(sprintf("%s30", $z)) ? array('selected' => 'true') : '';
15
16     $select->pushContent(HTML::option(
17                          array_merge(array('value' => sprintf("%s30", $z - 1)),
18                                      $selected),
19                          sprintf("GMT%s30", $z - 1)
20                          ));
21 }
22 $TimeZoneSelect = HTML::select(array('name' => "pref[timeOffset]"), $select);
23
24 ?>
25 <!-- $Id: userprefs.tmpl,v 1.5 2002-02-02 02:00:42 carstenklapp Exp $ -->
26 <form action="<?=WikiURL($page)?>" method="post">
27   <input type="hidden" name="pagename" value="<?=$request->getArg('pagename')?>" />
28   <blockquote>
29   <table>
30     <tr>
31       <td colspan="2"><h2><?=_("Edit Area Size")?></h2></td>
32     </tr><tr>
33       <td align="right"><?=_("Height")?></td>
34       <td>
35         <input type="text" name="pref[editHeight]" size="4"
36                value="<?=$request->getPref('editHeight')?>" />
37       </td>
38     </tr>
39     <tr>
40       <td align="right"><?=_("Width")?></td>
41       <td>
42         <input type="text" name="pref[editWidth]" size="4"
43                value="<?=$request->getPref('editWidth')?>" />
44       </td>
45     </tr>
46
47     <tr>
48       <td colspan="2"><h2><?=_("Time Zone")?></h2></td>
49     </tr><tr>
50       <td align="right"><?=_("Server time:")?></td>
51       <td><?= Rfc2822DateTime() ?></td>
52     </tr><tr>
53       <td align="right"><?=_("Your time:")?></td>
54       <td>
55         <?= $TimeZoneSelect ?> (unimplemented)
56       </td>
57     </tr>
58   </table>
59   </blockquote>
60   <hr />
61   <?=Button("submit:", _("Update Preferences"))?>
62 </form>