Marius Cramer
2015-08-06 37b29231e47a0c4458dc1c15d98588f16f07e1e2
commit | author | age
b0711a 1 <?php
7fe908 2 require_once '../../lib/config.inc.php';
MC 3 require_once '../../lib/app.inc.php';
b0711a 4
T 5 //* Check permissions for module
6 $app->auth->check_module_permissions('mailuser');
7
8 $app->uses('tpl');
9
10 $app->tpl->newTemplate('form.tpl.htm');
11 $app->tpl->setInclude('content_tpl', 'templates/index.htm');
12 $msg = '';
13 $error = '';
14
15 //* load language file
16 $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_index.lng';
7fe908 17 include $lng_file;
b0711a 18 $app->tpl->setVar($wb);
T 19
cc7a82 20 $sql = "SELECT * FROM mail_user WHERE mailuser_id = ?";
MC 21 $rec = $app->db->queryOneRecord($sql, $_SESSION['s']['user']['mailuser_id']);
b0711a 22
T 23 if($rec['quota'] == 0) {
24     $rec['quota'] = $wb['unlimited_txt'];
25 } else {
26     $rec['quota'] = ($rec['quota'] / 1024 / 1024).' '.$wb['mb_txt'];
27 }
28
29 if($rec['cc'] == '') $rec['cc'] = $wb['none_txt'];
30
31 $app->tpl->setVar($rec);
32
cc7a82 33 $sql2 = "SELECT * FROM server WHERE server_id = ?";
MC 34 $rec2 = $app->db->queryOneRecord($sql2, $rec['server_id']);
a4a9eb 35
C 36 $app->tpl->setVar($rec2);
37
7fe908 38 $app->tpl->setVar('msg', $msg);
MC 39 $app->tpl->setVar('error', $error);
b0711a 40
5715f5 41 if(isset($_SESSION['show_info_msg'])) {
7fe908 42     $app->tpl->setVar('show_info_msg', $_SESSION['show_info_msg']);
MC 43     unset($_SESSION['show_info_msg']);
5715f5 44 }
M 45 if(isset($_SESSION['show_error_msg'])) {
7fe908 46     $app->tpl->setVar('show_error_msg', $_SESSION['show_error_msg']);
MC 47     unset($_SESSION['show_error_msg']);
5715f5 48 }
b0711a 49
T 50
51
52 $app->tpl_defaults();
53 $app->tpl->pparse();
7fe908 54 ?>