6 * Template for rendering the main squirrelmail window
8 * @copyright © 1999-2006 The SquirrelMail Project Team
9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
11 * @package squirrelmail
12 * @subpackage templates
15 /** add required includes */
18 /** extract variables */
20 $output = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\"\n".
21 " \"http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd\">\n".
23 "<meta name=\"robots\" content=\"noindex,nofollow\">\n" .
24 "<title>$org_title</title>\n".
27 $left_size = getPref($data_dir, $username, 'left_size');
28 $location_of_bar = getPref($data_dir, $username, 'location_of_bar');
30 if (isset($languages[$squirrelmail_language]['DIR']) &&
31 strtolower($languages[$squirrelmail_language]['DIR']) == 'rtl') {
32 $temp_location_of_bar = 'right';
34 $temp_location_of_bar = 'left';
37 if ($location_of_bar == '') {
38 $location_of_bar = $temp_location_of_bar;
40 $temp_location_of_bar = '';
42 if ($left_size == "") {
43 if (isset($default_left_size)) {
44 $left_size = $default_left_size;
51 if ($location_of_bar == 'right') {
52 $output .= "<frameset cols=\"*, $left_size\" id=\"fs1\">\n";
55 $output .= "<frameset cols=\"$left_size, *\" id=\"fs1\">\n";
59 * There are three ways to call webmail.php
61 * - This just loads the default entry screen.
62 * 2. webmail.php?right_frame=right_main.php&sort=X&startMessage=X&mailbox=XXXX
63 * - This loads the frames starting at the given values.
64 * 3. webmail.php?right_frame=folders.php
65 * - Loads the frames with the Folder options in the right frame.
67 * This was done to create a pure HTML way of refreshing the folder list since
68 * we would like to use as little Javascript as possible.
70 * The test for // should catch any attempt to include off-site webpages into
74 if (empty($right_frame) || (strpos(urldecode($right_frame), '//') !== false)) {
78 if ( strpos($right_frame,'?') ) {
79 $right_frame_file = substr($right_frame,0,strpos($right_frame,'?'));
81 $right_frame_file = $right_frame;
84 switch($right_frame) {
85 case 'right_main.php':
86 $right_frame_url = "right_main.php?mailbox=".urlencode($mailbox)
87 . (!empty($sort)?"&sort=$sort":'')
88 . (!empty($startMessage)?"&startMessage=$startMessage":'');
91 $right_frame_url = 'options.php';
94 $right_frame_url = 'folders.php';
97 $right_frame_url = 'compose.php?' . $mailto;
100 $right_frame_url = 'right_main.php';
103 $right_frame_url = urlencode($right_frame);
107 $left_frame = '<frame src="left_main.php" name="left" frameborder="1" title="'.
108 _("Folder List") ."\" />\n";
109 $right_frame = '<frame src="'.$right_frame_url.'" name="right" frameborder="1" title="'.
110 _("Message List") ."\" />\n";
112 if ($location_of_bar == 'right') {
113 $output .= $right_frame . $left_frame;
116 $output .= $left_frame . $right_frame;
118 $ret = concat_hook_function('webmail_bottom', $output);
123 echo $output . '</frameset>';
126 * Revision 1.2 2006/07/15 12:01:19 tokul
127 * removing trailing ?> from function scripts
129 * Revision 1.1 2006/07/09 21:55:33 vanmer
130 * - Initial revision of a template to render the main squirrelmail HTML (current a frameset)