added blue theme
[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
1573e796 27 /** Load the user's sent folder preferences **/
28 $move_to_sent = getPref($data_dir, $username, "move_to_sent");
29 if ($move_to_sent == "")
30 $move_to_sent = $default_move_to_sent;
31
32 /** Load the user's trash folder preferences **/
33 $move_to_trash = getPref($data_dir, $username, "move_to_trash");
34 if ($move_to_trash == "")
35 $move_to_trash = $default_move_to_trash;
36
37
1e0628fb 38 $folder_prefix = getPref($data_dir, $username, "folder_prefix");
39 if ($folder_prefix == "")
40 $folder_prefix = $default_folder_prefix;
41
42 /** Load special folders **/
43 $new_trash_folder = getPref($data_dir, $username, "trash_folder");
44 if (($new_trash_folder == "") && ($move_to_trash == true))
45 $trash_folder = $folder_prefix . $trash_folder;
46 else
47 $trash_folder = $new_trash_folder;
48
49 /** Load special folders **/
50 $new_sent_folder = getPref($data_dir, $username, "sent_folder");
51 if (($new_sent_folder == "") && ($move_to_sent == true))
52 $sent_folder = $folder_prefix . $sent_folder;
53 else
54 $sent_folder = $new_sent_folder;
11307a4c 55
9c83f905 56 $show_num = getPref($data_dir, $username, "show_num");
57 if ($show_num == "")
58 $show_num = 25;
59
11307a4c 60 $wrap_at = getPref($data_dir, $username, "wrap_at");
61 if ($wrap_at == "")
62 $wrap_at = 86;
63
2848c630 64 $left_size = getPref($data_dir, $username, "left_size");
65 if ($left_size == "") {
66 if (isset($default_left_size))
67 $left_size = $default_left_size;
68 else
69 $left_size = 200;
70 }
71
11307a4c 72 $editor_size = getPref($data_dir, $username, "editor_size");
73 if ($editor_size == "")
74 $editor_size = 76;
f804972b 75
76 $use_signature = getPref($data_dir, $username, "use_signature");
77 if ($use_signature == "")
78 $use_signature = false;
79
469eb37b 80 $left_refresh = getPref($data_dir, $username, "left_refresh");
81 if ($left_refresh == "")
82 $left_refresh = false;
83
f804972b 84 /** Load up the Signature file **/
85 if ($use_signature == true) {
86 $signature = getSig($data_dir, $username);
87 } else {
f804972b 88 }
11307a4c 89?>