From b283598a07dfdd4e54f01f514b1bf8ae891b3a1d Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Thu, 21 Nov 2013 05:03:47 -0500
Subject: [PATCH] interface/web/dns/dns_wizard.php

---
 interface/web/admin/form/server_config.tform.php |  354 +++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 284 insertions(+), 70 deletions(-)

diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php
index facc193..90c7589 100644
--- a/interface/web/admin/form/server_config.tform.php
+++ b/interface/web/admin/form/server_config.tform.php
@@ -55,9 +55,9 @@
 	'width' => 70,
 	'template' => "templates/server_config_server_edit.htm",
 	'fields' => array(
-		##################################
-		# Begin Datatable fields
-		##################################
+		//#################################
+		// Begin Datatable fields
+		//#################################
 		'auto_network_configuration' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
@@ -86,6 +86,14 @@
 			'width' => '15',
 			'maxlength' => '255'
 		),
+		'v6_prefix' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'validators' => array(0 => array('type' => 'ISV6PREFIX',
+					'errmsg' => 'v6_prefix_wrong'),
+			),
+			'default' => ''
+		),
 		'gateway' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
@@ -97,10 +105,25 @@
 			'width' => '15',
 			'maxlength' => '255'
 		),
+		'firewall' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'SELECT',
+			'default' => 'bastille',
+			'value' => array('bastille' => 'bastille', 'ufw' => 'ufw'),
+			'width' => '40',
+			'maxlength' => '255'
+		),
 		'hostname' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
 			'default' => 'server1.domain.tld',
+			'filters'   => array( 0 => array( 'event' => 'SAVE',
+					'type' => 'IDNTOASCII'),
+				1 => array( 'event' => 'SHOW',
+					'type' => 'IDNTOUTF8'),
+				2 => array( 'event' => 'SAVE',
+					'type' => 'TOLOWER')
+			),
 			'validators' => array(0 => array('type' => 'NOTEMPTY',
 					'errmsg' => 'hostname_error_empty'),
 			),
@@ -127,6 +150,14 @@
 			'width' => '40',
 			'maxlength' => '255'
 		),
+		'admin_notify_events' => array(
+			'datatype' => 'INTEGER',
+			'formtype' => 'SELECT',
+			'default' => '1',
+			'value' => array('3' => 'no_notifications_txt', '0' => 'Debug', '1' => 'Warnings', '2' => 'Errors'),
+			'width' => '40',
+			'maxlength' => '255'
+		),
 		'backup_dir' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
@@ -146,9 +177,65 @@
 			'width' => '40',
 			'maxlength' => '255'
 		),
-	##################################
-	# ENDE Datatable fields
-	##################################
+		'monit_url' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'default' => '',
+			'validators' => array ( 0 => array ( 'type' => 'REGEX',
+					'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
+					'errmsg'=> 'monit_url_error_regex'),
+			),
+			'value' => '',
+			'width' => '40',
+			'maxlength' => '255'
+		),
+		'monit_user' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'default' => '',
+			'value' => '',
+			'width' => '40',
+			'maxlength' => '255'
+		),
+		'monit_password' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'default' => '',
+			'value' => '',
+			'width' => '40',
+			'maxlength' => '255'
+		),
+		'munin_url' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'default' => '',
+			'validators' => array ( 0 => array ( 'type' => 'REGEX',
+					'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
+					'errmsg'=> 'munin_url_error_regex'),
+			),
+			'value' => '',
+			'width' => '40',
+			'maxlength' => '255'
+		),
+		'munin_user' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'default' => '',
+			'value' => '',
+			'width' => '40',
+			'maxlength' => '255'
+		),
+		'munin_password' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'default' => '',
+			'value' => '',
+			'width' => '40',
+			'maxlength' => '255'
+		),
+		//#################################
+		// ENDE Datatable fields
+		//#################################
 	)
 );
 
@@ -157,9 +244,9 @@
 	'width' => 60,
 	'template' => "templates/server_config_mail_edit.htm",
 	'fields' => array(
-		##################################
-		# Begin Datatable fields
-		##################################
+		//#################################
+		// Begin Datatable fields
+		//#################################
 		'module' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'SELECT',
@@ -183,6 +270,19 @@
 			'default' => '/home/vmail/',
 			'validators' => array(0 => array('type' => 'NOTEMPTY',
 					'errmsg' => 'homedir_path_error_empty'),
+			),
+			'value' => '',
+			'width' => '40',
+			'maxlength' => '255'
+		),
+		'dkim_path' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'default' => '/var/lib/amavis/dkim',
+			'validators'    => array (  0 => array ('type'  => 'CUSTOM',
+					'class' => 'validate_dkim',
+					'function' => 'check_dkim_path',
+					'errmsg'=> 'dkim_path_error'),
 			),
 			'value' => '',
 			'width' => '40',
@@ -284,17 +384,53 @@
 			'width' => '10',
 			'maxlength' => '15'
 		),
+		'mailbox_quota_stats' => array (
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'y',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
 		'realtime_blackhole_list' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
 			'default' => '',
+			'validators' => array (  0 => array ( 'type' => 'REGEX',
+					'regex' => '/^((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])(,\s*(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]))*)?$/',
+					'errmsg'=> 'rbl_error_regex'),
+			),
 			'value' => '',
 			'width' => '40',
 			'maxlength' => '255'
 		),
-	##################################
-	# ENDE Datatable fields
-	##################################
+		'overquota_notify_admin' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'y',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
+		'overquota_notify_client' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'y',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
+		'overquota_notify_freq' => array(
+			'datatype' => 'INTEGER',
+			'formtype' => 'TEXT',
+			'default' => '7',
+			'value' => '',
+			'width' => '20',
+			'maxlength' => '255'
+		),
+		'overquota_notify_onok' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'n',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
+		//#################################
+		// ENDE Datatable fields
+		//#################################
 	)
 );
 
@@ -303,9 +439,9 @@
 	'width' => 80,
 	'template' => "templates/server_config_getmail_edit.htm",
 	'fields' => array(
-		##################################
-		# Begin Datatable fields
-		##################################
+		//#################################
+		// Begin Datatable fields
+		//#################################
 		'getmail_config_dir' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
@@ -317,9 +453,9 @@
 			'width' => '40',
 			'maxlength' => '255'
 		),
-	##################################
-	# ENDE Datatable fields
-	##################################
+		//#################################
+		// ENDE Datatable fields
+		//#################################
 	)
 );
 
@@ -328,9 +464,9 @@
 	'width' => 60,
 	'template' => "templates/server_config_web_edit.htm",
 	'fields' => array(
-		##################################
-		# Begin Datatable fields
-		##################################
+		//#################################
+		// Begin Datatable fields
+		//#################################
 		'server_type' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'SELECT',
@@ -374,8 +510,24 @@
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
 			'default' => 'n',
-			'value' => array(0 => 'n',1 => 'y')
+			'value' => array(0 => 'n', 1 => 'y')
 		),
+		'website_autoalias' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'TEXT',
+			'default' => '',
+			'value' => '',
+			'width' => '40',
+			'maxlength' => '255'
+		),
+		/*
+'vhost_rewrite_v6' => array (
+'datatype' => 'VARCHAR',
+'formtype' => 'CHECKBOX',
+'default' => 'n',
+'value' => array(0 => 'n',1 => 'y')
+),
+*/
 		'vhost_conf_dir' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
@@ -445,6 +597,12 @@
 		'set_folder_permissions_on_update' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
+			'default' => 'n',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
+		'web_folder_protection' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
 			'default' => 'y',
 			'value' => array(0 => 'n', 1 => 'y')
 		),
@@ -464,6 +622,50 @@
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
 			'default' => 'y',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
+		'enable_ip_wildcard' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'y',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
+		'overtraffic_notify_admin' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'y',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
+		'overtraffic_notify_client' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'y',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
+		'overquota_notify_admin' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'y',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
+		'overquota_notify_client' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'y',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
+		'overquota_notify_freq' => array(
+			'datatype' => 'INTEGER',
+			'formtype' => 'TEXT',
+			'default' => '7',
+			'value' => '',
+			'width' => '20',
+			'maxlength' => '255'
+		),
+		'overquota_notify_onok' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'n',
 			'value' => array(0 => 'n', 1 => 'y')
 		),
 		'user' => array(
@@ -615,6 +817,17 @@
 			'width' => '40',
 			'maxlength' => '4000'
 		),
+		'php_ini_check_minutes' => array(
+			'datatype' => 'INTEGER',
+			'formtype' => 'TEXT',
+			'default' => '1',
+			'validators' => array(0 => array('type' => 'NOTEMPTY',
+					'errmsg' => 'php_ini_check_minutes_error_empty'),
+			),
+			'value' => '',
+			'width' => '10',
+			'maxlength' => '255'
+		),
 		'nginx_cgi_socket' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
@@ -699,9 +912,9 @@
 			'width' => '40',
 			'maxlength' => '255'
 		),
-	##################################
-	# ENDE Datatable fields
-	##################################
+		//#################################
+		// ENDE Datatable fields
+		//#################################
 	)
 );
 
@@ -710,9 +923,9 @@
 	'width' => 60,
 	'template' => "templates/server_config_dns_edit.htm",
 	'fields' => array(
-		##################################
-		# Begin Datatable fields
-		##################################
+		//#################################
+		// Begin Datatable fields
+		//#################################
 		'bind_user' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
@@ -768,9 +981,9 @@
 			'width' => '40',
 			'maxlength' => '255'
 		),
-	##################################
-	# ENDE Datatable fields
-	##################################
+		//#################################
+		// ENDE Datatable fields
+		//#################################
 	)
 );
 
@@ -779,9 +992,9 @@
 	'width' => 80,
 	'template' => "templates/server_config_fastcgi_edit.htm",
 	'fields' => array(
-		##################################
-		# Begin Datatable fields
-		##################################
+		//#################################
+		// Begin Datatable fields
+		//#################################
 		'fastcgi_starter_path' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
@@ -841,7 +1054,10 @@
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
 			'default' => '',
-			'validators' => array(0 => array('type' => 'NOTEMPTY',
+			'validators' => array( 0 => array( 'type' => 'ISINT',
+					'errmsg' => 'fastcgi_max_requests_error_empty'),
+				1 => array( 'type' => 'RANGE',
+					'range' => '0:',
 					'errmsg' => 'fastcgi_max_requests_error_empty'),
 			),
 			'value' => '',
@@ -867,17 +1083,9 @@
 			'width' => '40',
 			'maxlength' => '255'
 		),
-		'fastcgi_additional_php_versions' => array (
-			'datatype'	=> 'VARCHAR',
-			'formtype'	=> 'TEXT',
-			'default'	=> '',
-			'value'		=> '',
-			'width'		=> '30',
-			'maxlength'	=> '255'
-		),
-	##################################
-	# ENDE Datatable fields
-	##################################
+		//#################################
+		// ENDE Datatable fields
+		//#################################
 	)
 );
 
@@ -887,9 +1095,9 @@
 	'width' => 80,
 	'template' => "templates/server_config_jailkit_edit.htm",
 	'fields' => array(
-		##################################
-		# Begin Datatable fields
-		##################################
+		//#################################
+		// Begin Datatable fields
+		//#################################
 		'jailkit_chroot_home' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
@@ -934,9 +1142,9 @@
 			'width' => '40',
 			'maxlength' => '1000'
 		),
-	##################################
-	# ENDE Datatable fields
-	##################################
+		//#################################
+		// ENDE Datatable fields
+		//#################################
 	)
 );
 
@@ -1009,9 +1217,9 @@
 	'width' => 80,
 	'template' => "templates/server_config_vlogger_edit.htm",
 	'fields' => array(
-		##################################
-		# Begin Datatable fields
-		##################################
+		//#################################
+		// Begin Datatable fields
+		//#################################
 		'config_dir' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
@@ -1023,9 +1231,9 @@
 			'width' => '40',
 			'maxlength' => '255'
 		),
-	##################################
-	# ENDE Datatable fields
-	##################################
+		//#################################
+		// ENDE Datatable fields
+		//#################################
 	)
 );
 
@@ -1036,9 +1244,9 @@
 	'width' => 80,
 	'template' => "templates/server_config_cron_edit.htm",
 	'fields' => array(
-		##################################
-		# Begin Datatable fields
-		##################################
+		//#################################
+		// Begin Datatable fields
+		//#################################
 		'init_script' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'TEXT',
@@ -1072,9 +1280,9 @@
 			'width' => '40',
 			'maxlength' => '255'
 		),
-	##################################
-	# ENDE Datatable fields
-	##################################
+		//#################################
+		// ENDE Datatable fields
+		//#################################
 	)
 );
 
@@ -1083,9 +1291,9 @@
 	'width' => 80,
 	'template' => "templates/server_config_rescue_edit.htm",
 	'fields' => array(
-		##################################
-		# Begin Datatable fields
-		##################################
+		//#################################
+		// Begin Datatable fields
+		//#################################
 		'try_rescue' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
@@ -1093,6 +1301,12 @@
 			'value' => array(0 => 'n', 1 => 'y')
 		),
 		'do_not_try_rescue_httpd' => array(
+			'datatype' => 'VARCHAR',
+			'formtype' => 'CHECKBOX',
+			'default' => 'n',
+			'value' => array(0 => 'n', 1 => 'y')
+		),
+		'do_not_try_rescue_mongodb' => array(
 			'datatype' => 'VARCHAR',
 			'formtype' => 'CHECKBOX',
 			'default' => 'n',
@@ -1110,9 +1324,9 @@
 			'default' => 'n',
 			'value' => array(0 => 'n', 1 => 'y')
 		),
-	##################################
-	# ENDE Datatable fields
-	##################################
+		//#################################
+		// ENDE Datatable fields
+		//#################################
 	)
 );
 ?>

--
Gitblit v1.9.1