From 04e09afcccbf4e7f3eafa540ea35ac22b38f5bc0 Mon Sep 17 00:00:00 2001
From: filip <filip@ispconfig3>
Date: Mon, 27 Sep 2010 07:31:33 -0400
Subject: [PATCH] Implemented new FAQ functionality in help module

---
 interface/web/sites/form/web_domain.tform.php |   93 ++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 89 insertions(+), 4 deletions(-)

diff --git a/interface/web/sites/form/web_domain.tform.php b/interface/web/sites/form/web_domain.tform.php
index 882a784..09d34d3 100644
--- a/interface/web/sites/form/web_domain.tform.php
+++ b/interface/web/sites/form/web_domain.tform.php
@@ -97,7 +97,7 @@
 										1 => array (	'type'	=> 'UNIQUE',
 														'errmsg'=> 'domain_error_unique'),
 										2 => array (	'type'	=> 'REGEX',
-														'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z]{2,10}$/',
+														'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z\-]{2,10}$/',
 														'errmsg'=> 'domain_error_regex'),
 									),
 			'default'	=> '',
@@ -139,7 +139,6 @@
 			'width'		=> '7',
 			'maxlength'	=> '7'
 		),
-		/*
 		'traffic_quota' => array (
 			'datatype'	=> 'INTEGER',
 			'formtype'	=> 'TEXT',
@@ -151,7 +150,6 @@
 			'width'		=> '7',
 			'maxlength'	=> '7'
 		),
-		*/
 		'cgi' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'CHECKBOX',
@@ -195,6 +193,12 @@
 			'valuelimit' => 'client:web_php_options',
 			'value'		=> array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP')
 		),
+		'ruby' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'CHECKBOX',
+			'default'	=> 'n',
+			'value'		=> array(0 => 'n',1 => 'y')
+		),
 		'active' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'CHECKBOX',
@@ -225,6 +229,10 @@
 		),
 		'redirect_path' => array (
 			'datatype'	=> 'VARCHAR',
+			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
+														'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-\+\?]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
+														'errmsg'=> 'redirect_error_regex'),
+									),
 			'formtype'	=> 'TEXT',
 			'default'	=> '',
 			'value'		=> '',
@@ -249,6 +257,10 @@
 		'ssl_state' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
+			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
+														'regex' => '/^(([.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
+														'errmsg'=> 'ssl_state_error_regex'),
+									),
 			'default'	=> '',
 			'value'		=> '',
 			'width'		=> '30',
@@ -257,6 +269,10 @@
 		'ssl_locality' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
+			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
+														'regex' => '/^(([.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
+														'errmsg'=> 'ssl_locality_error_regex'),
+									),
 			'default'	=> '',
 			'value'		=> '',
 			'width'		=> '30',
@@ -265,6 +281,10 @@
 		'ssl_organisation' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
+			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
+														'regex' => '/^(([.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
+														'errmsg'=> 'ssl_organisation_error_regex'),
+									),
 			'default'	=> '',
 			'value'		=> '',
 			'width'		=> '30',
@@ -273,6 +293,10 @@
 		'ssl_organisation_unit' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
+			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
+														'regex' => '/^(([.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
+														'errmsg'=> 'ssl_organistaion_unit_error_regex'),
+									),
 			'default'	=> '',
 			'value'		=> '',
 			'width'		=> '30',
@@ -281,6 +305,10 @@
 		'ssl_country' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
+			'validators'	=> array ( 	0 => array (	'type'	=> 'REGEX',
+														'regex' => '/^(([.]{0})|([A-Z]{2,2}))$/',
+														'errmsg'=> 'ssl_country_error_regex'),
+									),
 			'default'	=> '',
 			'value'		=> '',
 			'width'		=> '2',
@@ -349,11 +377,49 @@
 			'width'		=> '30',
 			'maxlength'	=> '255'
 		),
+		'stats_type' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'SELECT',
+			'default'	=> 'webalizer',
+			'value'		=> array('webalizer' => 'Webalizer', 'awstats' => 'AWStats')
+		),
 	##################################
 	# ENDE Datatable fields
 	##################################
 	)
 );
+
+if($_SESSION["s"]["user"]["typ"] == 'admin') {
+
+//* Backup
+$form["tabs"]['backup'] = array (
+	'title' 	=> "Backup",
+	'width' 	=> 100,
+	'template' 	=> "templates/web_domain_backup.htm",
+	'readonly'	=> false,
+	'fields' 	=> array (
+	##################################
+	# Begin Datatable fields
+	##################################
+		'backup_interval' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'SELECT',
+			'default'	=> '',
+			'value'		=> array('none' => 'No backup', 'daily' => 'Daily', 'weekly' => 'Weekly', 'monthly' => 'Monthly')
+		),
+		'backup_copies' => array (
+			'datatype'	=> 'INTEGER',
+			'formtype'	=> 'SELECT',
+			'default'	=> '',
+			'value'		=> array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10')
+		),
+	##################################
+	# ENDE Datatable fields
+	##################################
+	)
+);
+
+}
 
 if($_SESSION["s"]["user"]["typ"] == 'admin') {
 
@@ -403,13 +469,32 @@
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
 			'validators'	=> array ( 	0 => array (	'type'	=> 'NOTEMPTY',
-														'errmsg'=> 'documentroot_error_empty'),
+														'errmsg'=> 'allow_override_error_empty'),
 									),
 			'default'	=> 'All',
 			'value'		=> '',
 			'width'		=> '30',
 			'maxlength'	=> '255'
 		),
+		'php_open_basedir' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'TEXT',
+			'validators'	=> array ( 	0 => array (	'type'	=> 'NOTEMPTY',
+														'errmsg'=> 'php_open_basedir_error_empty'),
+									),
+			'default'	=> 'All',
+			'value'		=> '',
+			'width'		=> '30',
+			'maxlength'	=> '255'
+		),
+		'custom_php_ini' => array (
+			'datatype'	=> 'TEXT',
+			'formtype'	=> 'TEXT',
+			'default'	=> '',
+			'value'		=> '',
+			'width'		=> '30',
+			'maxlength'	=> '255'
+		),
 		'apache_directives' => array (
 			'datatype'	=> 'TEXT',
 			'formtype'	=> 'TEXT',

--
Gitblit v1.9.1