Fixed undefined indices on admin pages, refs #645 1h0m

This commit is contained in:
Andreas Burchert (scarya)
2011-03-30 14:37:57 +02:00
parent 630e2966e2
commit a9ab3825f5
3 changed files with 120 additions and 31 deletions

View File

@@ -289,10 +289,21 @@ if($page == 'admins'
$can_manage_aps_packages = 0;
}
$customers_see_all = intval($_POST['customers_see_all']);
$domains_see_all = intval($_POST['domains_see_all']);
$caneditphpsettings = intval($_POST['caneditphpsettings']);
$change_serversettings = intval($_POST['change_serversettings']);
$customers_see_all = 0;
if(isset($_POST['customers_see_all']))
$customers_see_all = intval($_POST['customers_see_all']);
$domains_see_all = 0;
if(isset($_POST['domains_see_all']))
$domains_see_all = intval($_POST['domains_see_all']);
$caneditphpsettings = 0;
if(isset($_POST['caneditphpsettings']))
$caneditphpsettings = intval($_POST['caneditphpsettings']);
$change_serversettings = 0;
if(isset($_POST['change_serversettings']))
$change_serversettings = intval($_POST['change_serversettings']);
$diskspace = intval_ressource($_POST['diskspace']);
@@ -617,12 +628,24 @@ if($page == 'admins'
$number_of_aps_packages = - 1;
}
$customers_see_all = intval($_POST['customers_see_all']);
$domains_see_all = intval($_POST['domains_see_all']);
$caneditphpsettings = intval($_POST['caneditphpsettings']);
$change_serversettings = intval($_POST['change_serversettings']);
$can_manage_aps_packages = intval($_POST['can_manage_aps_packages']);
$customers_see_all = 0;
if(isset($_POST['customers_see_all']))
$customers_see_all = intval($_POST['customers_see_all']);
$domains_see_all = 0;
if(isset($_POST['domains_see_all']))
$domains_see_all = intval($_POST['domains_see_all']);
$caneditphpsettings = 0;
if(isset($_POST['caneditphpsettings']))
$caneditphpsettings = intval($_POST['caneditphpsettings']);
$change_serversettings = 0;
if(isset($_POST['change_serversettings']))
$change_serversettings = intval($_POST['change_serversettings']);
$diskspace = intval($_POST['diskspace']);
if(isset($_POST['diskspace_ul']))

View File

@@ -452,9 +452,17 @@ if($page == 'customers'
$email_autoresponder = 0;
}
$email_imap = intval_ressource($_POST['email_imap']);
$email_pop3 = intval_ressource($_POST['email_pop3']);
$ftps = intval_ressource($_POST['ftps']);
$email_imap = 0;
if(isset($_POST['email_imap']))
$email_imap = intval_ressource($_POST['email_imap']);
$email_pop3 = 0;
if(isset($_POST['email_pop3']))
$email_pop3 = intval_ressource($_POST['email_pop3']);
$ftps = 0;
if(isset($_POST['ftps']))
$ftps = intval_ressource($_POST['ftps']);
if(isset($_POST['ftps_ul']))
{
@@ -489,8 +497,10 @@ if($page == 'customers'
{
$number_of_aps_packages = 0;
}
$createstdsubdomain = intval($_POST['createstdsubdomain']);
$createstdsubdomain = 0;
if(isset($_POST['createstdsubdomain']))
$createstdsubdomain = intval($_POST['createstdsubdomain']);
$password = validate($_POST['new_customer_password'], 'password');
// only check if not empty,
// cause empty == generate password automatically
@@ -498,10 +508,23 @@ if($page == 'customers'
{
$password = validatePassword($password);
}
$sendpassword = intval($_POST['sendpassword']);
$phpenabled = intval($_POST['phpenabled']);
$perlenabled = intval($_POST['perlenabled']);
$store_defaultindex = intval($_POST['store_defaultindex']);
$sendpassword = 0;
if(isset($_POST['sendpassword']))
$sendpassword = intval($_POST['sendpassword']);
$phpenabled = 0;
if(isset($_POST['phpenabled']))
$phpenabled = intval($_POST['phpenabled']);
$perlenabled = 0;
if(isset($_POST['perlenabled']))
$perlenabled = intval($_POST['perlenabled']);
$store_defaultindex = 0;
if(isset($_POST['store_defaultindex']))
$store_defaultindex = intval($_POST['store_defaultindex']);
$diskspace = $diskspace * 1024;
$traffic = $traffic * 1024 * 1024;
@@ -965,9 +988,17 @@ if($page == 'customers'
$email_autoresponder = 0;
}
$email_imap = intval_ressource($_POST['email_imap']);
$email_pop3 = intval_ressource($_POST['email_pop3']);
$ftps = intval_ressource($_POST['ftps']);
$email_imap = 0;
if(isset($_POST['email_imap']))
$email_imap = intval_ressource($_POST['email_imap']);
$email_pop3 = 0;
if(isset($_POST['email_pop3']))
$email_pop3 = intval_ressource($_POST['email_pop3']);
$ftps = 0;
if(isset($_POST['ftps']))
$ftps = intval_ressource($_POST['ftps']);
if(isset($_POST['ftps_ul']))
{
@@ -982,7 +1013,9 @@ if($page == 'customers'
$tickets = - 1;
}
$mysqls = intval_ressource($_POST['mysqls']);
$mysqls = 0;
if(isset($_POST['mysqls']))
$mysqls = intval_ressource($_POST['mysqls']);
if(isset($_POST['mysqls_ul']))
{
@@ -1003,10 +1036,21 @@ if($page == 'customers'
$number_of_aps_packages = 0;
}
$createstdsubdomain = intval($_POST['createstdsubdomain']);
$deactivated = intval($_POST['deactivated']);
$phpenabled = intval($_POST['phpenabled']);
$perlenabled = intval($_POST['perlenabled']);
$createstdsubdomain = 0;
if(isset($_POST['createstdsubdomain']))
$createstdsubdomain = intval($_POST['createstdsubdomain']);
$deactivated = 0;
if(isset($_POST['deactivated']))
$deactivated = intval($_POST['deactivated']);
$phpenabled = 0;
if(isset($_POST['phpenabled']))
$phpenabled = intval($_POST['phpenabled']);
$perlenabled = 0;
if(isset($_POST['perlenabled']))
$perlenabled = intval($_POST['perlenabled']);
$diskspace = $diskspace * 1024;
$traffic = $traffic * 1024 * 1024;

View File

@@ -227,10 +227,23 @@ if($page == 'domains'
$domain = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['domain'], 'domain')));
$subcanemaildomain = intval($_POST['subcanemaildomain']);
$isemaildomain = 0;
if(isset($_POST['isemaildomain']))
$isemaildomain = intval($_POST['isemaildomain']);
$email_only = intval($_POST['email_only']);
$wwwserveralias = intval($_POST['wwwserveralias']);
$speciallogfile = intval($_POST['speciallogfile']);
$email_only = 0;
if(isset($_POST['email_only']))
$email_only = intval($_POST['email_only']);
$wwwserveralias = 0;
if(isset($_POST['wwwserveralias']))
$wwwserveralias = intval($_POST['wwwserveralias']);
$speciallogfile = 0;
if(isset($_POST['speciallogfile']))
$speciallogfile = intval($_POST['speciallogfile']);
$aliasdomain = intval($_POST['alias']);
$issubof = intval($_POST['issubof']);
$customerid = intval($_POST['customerid']);
@@ -764,13 +777,22 @@ if($page == 'domains'
$aliasdomain = intval($_POST['alias']);
$issubof = intval($_POST['issubof']);
$isemaildomain = intval($_POST['isemaildomain']);
$email_only = intval($_POST['email_only']);
$subcanemaildomain = intval($_POST['subcanemaildomain']);
$caneditdomain = intval($_POST['caneditdomain']);
$wwwserveralias = intval($_POST['wwwserveralias']);
$registration_date = validate($_POST['registration_date'], 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', ''));
$isemaildomain = 0;
if(isset($_POST['isemaildomain']))
$isemaildomain = intval($_POST['isemaildomain']);
$email_only = 0;
if(isset($_POST['email_only']))
$email_only = intval($_POST['email_only']);
$wwwserveralias = 0;
if(isset($_POST['wwwserveralias']))
$wwwserveralias = intval($_POST['wwwserveralias']);
if($userinfo['change_serversettings'] == '1')
{
$isbinddomain = intval($_POST['isbinddomain']);