Exemple #1
0
        $Info['domain'] = $MySQL->FetchOne();
        $Info['email'] = $_REQUEST['new_email'] . "@" . $Info['domain']['domain'];
        $Info['id'] = $_REQUEST['userid'];
        $Info['user_name'] = $_REQUEST['user_name'];
        $Info['user_surname'] = $_REQUEST['user_surname'];
        if ($_REQUEST['password']) {
            $Info['password'] = $_REQUEST['password'];
        }
        $Converter = new MirConvert();
        $Info['user_quota'] = $Converter->MBtoBytes($_REQUEST['user_quota']);
        $Info['department'] = $_REQUEST['department'];
        if ($_REQUEST['admin']) {
            $Info['admin_password'] = $_REQUEST['admin_password'];
        }
        $Admin->updateEMail($Info);
        $fixedaliases = $Admin->fixAliases($_REQUEST['new_email'], $_REQUEST['prevemail']);
        $smarty->assign('fixedaliases', $fixedaliases);
        $smarty->assign('email', $Info['email']);
        $smarty->assign('status', 'editsuccess');
        $MySQL = new iacMySQL();
        $Stats = new HomePageStats($MySQL);
        $smarty->assign('HomePageStats', $Stats->GiveAllStats());
        $smarty->display('home.tpl');
    }
} elseif ($_REQUEST['action'] == 'retr_info') {
    $MySQL = new iacMySQL();
    $Converter = new MirConvert();
    $MySQL->Execute("SELECT * FROM users WHERE id = '{$_REQUEST['user']}'");
    $email_info = $MySQL->FetchOne();
    $MySQL->Execute("SELECT * FROM departments ORDER BY deptid ASC");
    $departments = $MySQL->FetchAll();