2012-05-15 15:51:43 +03:00
|
|
|
<?php
|
2015-11-06 22:54:06 +02:00
|
|
|
error_reporting(NULL);
|
|
|
|
|
|
2012-05-15 15:51:43 +03:00
|
|
|
$TAB = 'MAIL';
|
2013-01-29 00:18:09 +02:00
|
|
|
|
|
|
|
|
// Main include
|
2012-05-15 15:51:43 +03:00
|
|
|
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|
|
|
|
|
|
|
|
|
// Header
|
|
|
|
|
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
|
|
|
|
|
|
|
|
|
|
// Panel
|
|
|
|
|
top_panel($user,$TAB);
|
|
|
|
|
|
|
|
|
|
// Data
|
2013-01-22 18:43:07 +02:00
|
|
|
if (empty($_GET['domain'])){
|
2015-12-11 21:14:49 +02:00
|
|
|
exec (VESTA_CMD."v-list-mail-domains $user json", $output, $return_var);
|
|
|
|
|
$data = json_decode(implode('', $output), true);
|
2013-02-20 14:37:07 +02:00
|
|
|
$data = array_reverse($data, true);
|
2015-12-11 21:14:49 +02:00
|
|
|
unset($output);
|
2013-01-22 18:43:07 +02:00
|
|
|
if ($_SESSION['user'] == 'admin') {
|
2012-05-15 15:51:43 +03:00
|
|
|
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_mail.html');
|
|
|
|
|
} else {
|
2013-01-22 18:43:07 +02:00
|
|
|
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_mail.html');
|
2012-05-15 15:51:43 +03:00
|
|
|
}
|
2012-07-01 01:10:56 +03:00
|
|
|
} else {
|
2015-12-11 21:14:49 +02:00
|
|
|
exec (VESTA_CMD."v-list-mail-accounts '".$user."' '".escapeshellarg($_GET['domain'])."' json", $output, $return_var);
|
|
|
|
|
$data = json_decode(implode('', $output), true);
|
2013-02-20 14:37:07 +02:00
|
|
|
$data = array_reverse($data, true);
|
2015-12-11 21:14:49 +02:00
|
|
|
unset($output);
|
2013-01-22 18:43:07 +02:00
|
|
|
if ($_SESSION['user'] == 'admin') {
|
|
|
|
|
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_mail_acc.html');
|
2012-07-01 01:10:56 +03:00
|
|
|
} else {
|
|
|
|
|
include($_SERVER['DOCUMENT_ROOT'].'/templates/user/list_mail_acc.html');
|
|
|
|
|
}
|
2012-05-15 15:51:43 +03:00
|
|
|
}
|
|
|
|
|
|
2013-01-29 00:18:09 +02:00
|
|
|
// Back uri
|
|
|
|
|
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
|
|
|
|
|
2012-05-15 15:51:43 +03:00
|
|
|
// Footer
|
|
|
|
|
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
|