X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Foptions.php;h=3fd806955fb5aa5957cbced7c5b1e6c7c736fbd0;hb=d7f8e6e69e33b218bf6d7775a53c811d839bce61;hp=9057279cdff7a11f3c278c8d43daa9e6ca95c070;hpb=e362fff6c12cc180c0f6da82da9f8790866057ef;p=squirrelmail.git
diff --git a/src/options.php b/src/options.php
index 9057279c..3fd80695 100644
--- a/src/options.php
+++ b/src/options.php
@@ -19,18 +19,6 @@ require_once('../functions/array.php');
require_once('../functions/options.php');
require_once('../functions/strings.php');
-/* Set the base uri. */
-ereg ("(^.*/)[^/]+/[^/]+$", $PHP_SELF, $regs);
-$base_uri = $regs[1];
-
-/* First and foremost, deal with language stuff. */
-if (isset($language)) {
- setcookie('squirrelmail_language', $language, time()+2592000, $base_uri);
- $squirrelmail_language = $language;
-} else {
- $language = getPref($data_dir, $username, 'language');
-}
-
/*********************************/
/*** Build the resultant page. ***/
/*********************************/
@@ -75,6 +63,51 @@ function process_optionmode_link($optpage) {
/* There will be something here, later. */
}
+
+/**
+ * This function prints out an option page row.
+ */
+function print_optionpages_row($leftopt, $rightopt = false) {
+ global $color;
+
+ echo "
" .
+ '' .
+ '' .
+ '' .
+ "" .
+ '' . $leftopt['name'] . ''.
+ ' | '.
+ " | ";
+ if ($rightopt) {
+ echo "" .
+ '' . $rightopt['name'] . '' .
+ ' | ';
+ } else {
+ echo " | ";
+ }
+
+ echo ' ' .
+ '' .
+ "" .
+ $leftopt['desc'] .
+ ' | ' .
+ " | ";
+ if ($rightopt) {
+ echo "" .
+ $rightopt['desc'] .
+ ' | ';
+ } else {
+ echo " | ";
+ }
+
+ echo ' ' .
+ ' ' .
+ ' |
' .
+ "
\n";
+}
+
+/* ---------------------------- main ---------------------------- */
+
/* Make sure we have an Option Page set. Default to main. */
if (!isset($optpage)) {
$optpage = 'main';
@@ -85,9 +118,9 @@ if (!isset($optmode)) {
$optmode = SMOPT_MODE_DISPLAY;
}
-/*************************************************************/
-/*** First, set the load information for each option page. ***/
-/*************************************************************/
+/*
+ * First, set the load information for each option page.
+ */
/* Initialize load information variables. */
$optpage_name = '';
@@ -167,23 +200,19 @@ if (isset($optpage_name) && ($optpage_name != '')) {
$optpage_title .= " - $optpage_name";
}
-?>
-
-
-
-
-
-
-
-
-' .
+ "\n".
+ ''.
+ "$optpage_title \n".
+ ''.
+ "\n";
/*******************************************************************/
/* DO OLD SAVING OF SUBMITTED OPTIONS. THIS WILL BE REMOVED LATER. */
/*******************************************************************/
/* If in submit mode, select a save hook name and run it. */
-if ($optmode == SMOPT_MODE_SUBMIT) {
+if ($optmode == SMOPT_MODE_SUBMIT) {
/* Select a save hook name. */
switch ($optpage) {
case SMOPT_PAGE_PERSONAL:
@@ -235,10 +264,11 @@ if ($optpage == SMOPT_PAGE_MAIN) {
echo '' . _("Successfully Saved Options") . ": $optpage_name \n";
/* If $max_refresh != SMOPT_REFRESH_NONE, provide a refresh link. */
- if ($max_refresh == SMOPT_REFRESH_FOLDERLIST) {
+ if ( !isset( $max_refresh ) ) {
+ } else if ($max_refresh == SMOPT_REFRESH_FOLDERLIST) {
echo '' . _("Refresh Folder List") . ' ';
} else if ($max_refresh) {
- echo '' . _("Refresh Page") . ' ';
+ echo '' . _("Refresh Page") . ' ';
}
}
/******************************************/
@@ -388,76 +418,10 @@ if ($optpage == SMOPT_PAGE_MAIN) {
}
}
-?>
- |
-
-
- |
-
-
- | |