Assigned myself to add the option of how many messages to display on the index
[squirrelmail.git] / src / load_prefs.php
CommitLineData
59177427 1<?php
37df47f5 2 if (!isset($config_php))
3 include("../config/config.php");
d30d79f2 4 if (!isset($prefs_php))
5 include("../functions/prefs.php");
37df47f5 6
7 $load_prefs_php = true;
b4da6659 8 checkForPrefs($data_dir, $username);
9
d0747e26 10 $chosen_theme = getPref($data_dir, $username, "chosen_theme");
d3cdb279 11
f3d17401 12 if ((isset($chosen_theme)) && (file_exists($chosen_theme))) {
d3cdb279 13 require("$chosen_theme");
14 } else {
f3d17401 15 if (file_exists($theme[0]["PATH"])) {
16 require($theme[0]["PATH"]);
17 } else {
67c62ef9 18 echo _("Theme: ");
f94ff7ce 19 echo $theme[0]["PATH"];
20 echo _(" was not found.");
21 echo "<BR>";
67c62ef9 22 echo _("Exiting abnormally");
f3d17401 23 exit;
24 }
d3cdb279 25 }
11307a4c 26
27
28 /** Load the user's trash folder preferences **/
29 $move_to_trash = getPref($data_dir, $username, "move_to_trash");
30 if ($move_to_trash == "")
31 $move_to_trash = $default_move_to_trash;
32
33 $wrap_at = getPref($data_dir, $username, "wrap_at");
34 if ($wrap_at == "")
35 $wrap_at = 86;
36
2848c630 37 $left_size = getPref($data_dir, $username, "left_size");
38 if ($left_size == "") {
39 if (isset($default_left_size))
40 $left_size = $default_left_size;
41 else
42 $left_size = 200;
43 }
44
37df47f5 45 $folder_prefix = getPref($data_dir, $username, "folder_prefix");
46 if ($folder_prefix == "")
47 $folder_prefix = $default_folder_prefix;
48
11307a4c 49 $editor_size = getPref($data_dir, $username, "editor_size");
50 if ($editor_size == "")
51 $editor_size = 76;
f804972b 52
53 $use_signature = getPref($data_dir, $username, "use_signature");
54 if ($use_signature == "")
55 $use_signature = false;
56
469eb37b 57 $left_refresh = getPref($data_dir, $username, "left_refresh");
58 if ($left_refresh == "")
59 $left_refresh = false;
60
f804972b 61 /** Load up the Signature file **/
62 if ($use_signature == true) {
63 $signature = getSig($data_dir, $username);
64 } else {
f804972b 65 }
11307a4c 66?>