"Fossies" - the Fresh Open Source Software Archive 
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "index.php" see the
Fossies "Dox" file reference documentation.
1 <?php
2 include('./inc/_prepend.php');
3
4 // account information
5 $oma->current_user->domain_set = $oma->get_domain_set($oma->current_user->mbox, $oma->current_user->domains);
6
7 $a_tmp = array();
8 if($oma->current_user->a_super > 0) $a_tmp[] = txt('68');
9 if($oma->current_user->a_admin_domains > 0) $a_tmp[] = txt('50');
10 if($oma->current_user->a_admin_user > 0) $a_tmp[] = txt('70');
11 if(count($a_tmp) > 0) $rightstring = implode(', ', $a_tmp);
12 else $rightstring = txt('85');
13 unset($a_tmp);
14
15 // DISPLAY
16 $quota = $imap->getquota($imap->format_user($oma->current_user->mbox));
17 $information = array();
18 $information[] = array(txt('5'), $oma->current_user->mbox.$cfg['Servers']['IMAP'][$_SESSION['server']]['VDOM']);
19 $information[] = array(txt('6'), $oma->current_user->person);
20 $information[] = array(txt('7'), $oma->current_user->canonical);
21 $information[] = array(txt('86'), $oma->current_user->domains);
22 $information[] = array(txt('8'), $quota->is_set
23 ? intval(round($quota->used/1024)).' / '.floor($quota->max/1024).' [MiB] '
24 : '∞');
25 $information[] = array(txt('77'), $rightstring);
26 unset($rightstring);
27 include('./templates/'.$cfg['theme'].'/information.tpl');
28
29 // handling password changes
30 if(isset($_POST['frm']) && $_POST['frm'] == 'pass' && $_POST['action'] == 'change') {
31 $ErrorHandler->status_reset();
32 if($oma->current_user->mbox == $oma->authenticated_user->mbox) {
33 if($oma->user_change_password($_POST['new_pass1'], $_POST['new_pass2'], $_POST['old_pass'])) {
34 // we have to reset the current user's cleartext password
35 // $_SESSION will later be read as $oma->authenticated_user
36 $_SESSION['pass_clear'] = obfuscator_encrypt($_POST['new_pass1']);
37 }
38 } else {
39 $oma->user_change_password($_POST['new_pass1'], $_POST['new_pass2']);
40 }
41
42 if($ErrorHandler->errors_occured()) {
43 error($ErrorHandler->errors_get());
44 }
45 if($ErrorHandler->info_occured()) {
46 info($ErrorHandler->info_get());
47 }
48 }
49
50 include('./templates/'.$cfg['theme'].'/password.tpl');
51
52 include('./inc/_append.php');
53 ?>