8a53880cca6736f1750217c43ab5ff5fab09d892
[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(!sqgetGlobalVar('mailto', $mailto)) {
40 $mailto = '';
41 }
42
43 do_hook('webmail_top');
44
45 $oTemplate->assign('org_title',$org_title);
46 $oTemplate->assign('mailto',$mailto);
47 $oTemplate->assign('startMessage',$startMessage);
48 $oTemplate->assign('mailbox',$mailbox);
49 $oTemplate->assign('sort',$sort);
50 $oTemplate->assign('username',$username);
51 $oTemplate->assign('delimiter',$delimiter);
52 $oTemplate->assign('onetimepad',$onetimepad);
53 $oTemplate->assign('languages',$languages);
54 $oTemplate->assign('default_left_size',$default_left_size);
55 $oTemplate->assign('right_frame',$right_frame);
56
57 $oTemplate->display('webmail.tpl');
58
59 $oTemplate->display('footer.tpl');