fixed uninitialized urlMailbox bug on bug list
[squirrelmail.git] / src / options_display.php
index ea49ee617f8b431b0b87ee1600ea836b53b0e26b..91ec6136d65eb347d42b98db5aa5e47a9ea321bf 100644 (file)
       include("../functions/array.php");
    if (!isset($i18n_php))
       include("../functions/i18n.php");
+   if (!isset($plugin_php))
+      include("../functins/plugin.php");
 
    include("../src/load_prefs.php");
    displayPageHeader($color, "None");
    $chosen_language = getPref($data_dir, $username, "language");  
 ?>
-   <table width=100% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<? echo $color[0] ?>">
-      <center><b><? echo _("Options") . " - " . _("Display Preferences"); ?></b></center>
+   <br>
+   <table width=95% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<?php echo $color[0] ?>">
+      <center><b><?php echo _("Options") . " - " . _("Display Preferences"); ?></b></center>
    </td></tr></table>
 
-   <form action="options.php" method=post>
+   <form name=f action="options.php" method=post>
       <table width=100% cellpadding=0 cellspacing=2 border=0>
          <tr>
-            <td align=right nowrap><? echo _("Theme"); ?>:
+            <td align=right nowrap><?php echo _("Theme"); ?>:
             </td><td>
-<?
+<?php
    echo "         <tt><select name=chosentheme>\n";
    for ($i = 0; $i < count($theme); $i++) {
       if ($theme[$i]["PATH"] == $chosen_theme)
             </td>
          </tr>
          <tr>
-            <td align=right nowrap><? echo _("Language"); ?>:
+            <td valign=top align=right nowrap><?php echo _("Language"); ?>:
             </td><td>
-<?
+<?php
    echo "         <tt><select name=language>\n";
-   reset ($languages);
-   while (list($code, $name)=each($languages)) {
+   foreach ($languages as $code => $name) {
       if ($code==$chosen_language)
          echo "         <OPTION SELECTED VALUE=\"".$code."\">".$languages[$code]["NAME"]."\n";
       else
          echo "         <OPTION VALUE=\"".$code."\">".$languages[$code]["NAME"]."\n";
-   } 
+   }
    echo "         </select></tt>";  
+   if (! $use_gettext)
+      echo "<br><small>This system doesn't support multiple languages</small>";
+      
 ?>
             </td>
          <tr>
             <td align=right nowrap>&nbsp;
-            </td><td>
-               <? echo _("Use Javascript or HTML addressbook?") . "<br>"; 
+               <?php echo _("Use Javascript or HTML addressbook?") . "</td><td>"; 
                if ($use_javascript_addr_book == true) {
                   echo "         <input type=radio name=javascript_abook value=1 checked> " . _("JavaScript") . "&nbsp;&nbsp;&nbsp;&nbsp;";
                   echo "         <input type=radio name=javascript_abook value=0> " . _("HTML"); 
@@ -82,9 +85,9 @@
             </td>
          </tr>
          <tr>
-            <td align=right nowrap><? echo _("Number of Messages to Index"); ?>:
+            <td align=right nowrap><?php echo _("Number of Messages to Index"); ?>:
             </td><td>
-<?
+<?php
    if (isset($show_num))
       echo "         <tt><input type=text size=5 name=shownum value=\"$show_num\"></tt><br>";
    else
@@ -93,9 +96,9 @@
             </td>
          </tr>
          <tr>
-            <td align=right nowrap><? echo _("Wrap incoming text at"); ?>:
+            <td align=right nowrap><?php echo _("Wrap incoming text at"); ?>:
             </td><td>
-<?
+<?php
    if (isset($wrap_at))
       echo "         <tt><input type=text size=5 name=wrapat value=\"$wrap_at\"></tt><br>";
    else
             </td>
          </tr>
          <tr>
-            <td align=right nowrap><? echo _("Size of editor window"); ?>:
+            <td align=right nowrap><?php echo _("Size of editor window"); ?>:
             </td><td>
-<?
+<?php
    if ($editor_size >= 10 && $editor_size <= 255)
       echo "         <tt><input type=text size=5 name=editorsize value=\"$editor_size\"></tt><br>";
    else
             </td>
          </tr>
          <tr>
-            <td align=right nowrap><? echo _("Width of left folder list"); ?>:
+            <td align=right nowrap><?PHP echo _('Location of folder list') ?>:</td>
+            <td><select name="folder_new_location">
+                <option value="left"<?PHP
+                    if ($location_of_bar != 'right') echo ' SELECTED';
+                    ?>><?PHP echo _('Left'); ?></option>
+                <option value="right"<?PHP
+                    if ($location_of_bar == 'right') echo ' SELECTED';
+                    ?>><?PHP echo _('Right'); ?></option>
+                </select>
+            </td>
+         </tr>
+         <tr>
+            <td align=right nowrap><?PHP echo _('Location of buttons when composing') ?>:</td>
+            <td><select name="button_new_location">
+                <option value="top"<?PHP
+                    if ($location_of_buttons == 'top') echo ' SELECTED';
+                    ?>><?PHP echo _('Before headers'); ?></option>
+                <option value="between"<?PHP
+                    if ($location_of_buttons == 'between') echo ' SELECTED';
+                    ?>><?PHP echo _('Between headers and message body'); ?></option>
+                <option value="bottom"<?PHP
+                    if ($location_of_buttons == 'bottom') echo ' SELECTED';
+                    ?>><?PHP echo _('After message body'); ?></option>
+                </select>
+            </td>
+         </tr>
+         <tr>
+            <td align=right nowrap><?php echo _("Width of folder list"); ?>:
             </td><td>
-<?
+<?php
    echo "         <select name=leftsize>\n";
    if ($left_size == 100)
       echo "<option value=100 selected>100 pixels\n";
             </td>
          </tr>
          <tr>
-            <td align=right nowrap><? echo _("Auto refresh folder list"); ?>:
+            <td align=right nowrap><?php echo _("Auto refresh folder list"); ?>:
             </td><td>
-<?
+<?php
    echo "               <SELECT name=leftrefresh>";
    if (($left_refresh == "None") || ($left_refresh == ""))
       echo "                  <OPTION VALUE=None SELECTED>None";
 ?>
             </td>
          </tr>
+         <?php do_hook("options_display_inside"); ?>
          <tr>
             <td>&nbsp;
             </td><td>
-               <input type="submit" value="Submit" name="submit_display">
+               <input type="submit" value="<?php echo _("Submit"); ?>"name="submit_display">
             </td>
          </tr>
       </table>   
    </form>
+   <?php do_hook("options_display_bottom"); ?>
 </body></html>