- moved all output from webmail.php to webmail.tpl template
[squirrelmail.git] / src / webmail.php
1 <?php
2
3 /**
4 * webmail.php -- Displays the main frameset
5 *
6 * This file generates the main frameset. The files that are
7 * shown can be given as parameters. If the user is not logged in
8 * this file will verify username and password.
9 *
10 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
11 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
12 * @version $Id$
13 * @package squirrelmail
14 */
15
16 /**
17 * Include the SquirrelMail initialization file.
18 */
19 require('../include/init.php');
20
21 sqgetGlobalVar('username', $username, SQ_SESSION);
22 sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
23 sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);
24
25 if (sqgetGlobalVar('sort', $sort)) {
26 $sort = (int) $sort;
27 }
28
29 if (sqgetGlobalVar('startMessage', $startMessage)) {
30 $startMessage = (int) $startMessage;
31 }
32
33 if (!sqgetGlobalVar('mailbox', $mailbox)) {
34 $mailbox = 'INBOX';
35 }
36
37 sqgetGlobalVar('right_frame', $right_frame, SQ_GET);
38
39 if ( isset($_SESSION['session_expired_post']) ) {
40 sqsession_unregister('session_expired_post');
41 }
42 if(!sqgetGlobalVar('mailto', $mailto)) {
43 $mailto = '';
44 }
45
46 do_hook('webmail_top');
47
48 $oTemplate->assign('org_title',$org_title);
49 $oTemplate->assign('mailto',$mailto);
50 $oTemplate->assign('startMessage',$startMessage);
51 $oTemplate->assign('mailbox',$mailbox);
52 $oTemplate->assign('sort',$sort);
53 $oTemplate->assign('username',$username);
54 $oTemplate->assign('delimiter',$delimiter);
55 $oTemplate->assign('onetimepad',$onetimepad);
56 $oTemplate->assign('languages',$languages);
57 $oTemplate->assign('default_left_size',$default_left_size);
58 $oTemplate->assign('right_frame',$right_frame);
59
60 $oTemplate->display('webmail.tpl');
61
62 $oTemplate->display('footer.tpl');