Implemented: FS#1102 - Convert internationalized domains to punycode automatically
- need to have the pecl idn and intl modules installed
or
- have the idna_convert class in the classes/idn/ path
| | |
| | | //* This class is loaded automatically by the ispconfig framework. |
| | | |
| | | class functions { |
| | | |
| | | var $idn_converter = null; |
| | | var $idn_converter_name = ''; |
| | | |
| | | public function mail($to, $subject, $text, $from, $filepath = '', $filetype = 'application/pdf', $filename = '', $cc = '', $bcc = '', $from_name = '') { |
| | | global $app,$conf; |
| | |
| | | } |
| | | } |
| | | |
| | | /** IDN converter wrapper. |
| | | * all converter classes should be placed in ISPC_CLASS_PATH.'/idn/' |
| | | */ |
| | | public function idn_encode($domain) { |
| | | if($domain == '') return ''; |
| | | if(preg_match('/^[0-9\.]+$/', $domain)) return $domain; // may be an ip address - anyway does not need to bee encoded |
| | | |
| | | // get domain and user part if it is an email |
| | | $user_part = false; |
| | | if(strpos($domain, '@') !== false) { |
| | | $user_part = substr($domain, 0, strrpos($domain, '@')); |
| | | $domain = substr($domain, strrpos($domain, '@') + 1); |
| | | } |
| | | |
| | | if(function_exists('idn_to_ascii')) { |
| | | $domain = idn_to_ascii($domain); |
| | | } elseif(file_exists(ISPC_CLASS_PATH.'/idn/idna_convert.class.php')) { |
| | | /* use idna class: |
| | | * @author Matthias Sommerfeld <mso@phlylabs.de> |
| | | * @copyright 2004-2011 phlyLabs Berlin, http://phlylabs.de |
| | | * @version 0.8.0 2011-03-11 |
| | | */ |
| | | |
| | | if(!is_object($this->idn_converter) || $this->idn_converter_name != 'idna_convert.class') { |
| | | include_once(ISPC_CLASS_PATH.'/idn/idna_convert.class.php'); |
| | | $this->idn_converter = new idna_convert(array('idn_version' => 2008)); |
| | | $this->idn_converter_name = 'idna_convert.class'; |
| | | } |
| | | $domain = $this->idn_converter->encode($domain); |
| | | } |
| | | |
| | | if($user_part !== false) return $user_part . '@' . $domain; |
| | | else return $domain; |
| | | } |
| | | |
| | | public function idn_decode($domain) { |
| | | if($domain == '') return ''; |
| | | if(preg_match('/^[0-9\.]+$/', $domain)) return $domain; // may be an ip address - anyway does not need to bee decoded |
| | | |
| | | // get domain and user part if it is an email |
| | | $user_part = false; |
| | | if(strpos($domain, '@') !== false) { |
| | | $user_part = substr($domain, 0, strrpos($domain, '@')); |
| | | $domain = substr($domain, strrpos($domain, '@') + 1); |
| | | } |
| | | if(function_exists('idn_to_utf8')) { |
| | | $domain = idn_to_utf8($domain); |
| | | } elseif(file_exists(ISPC_CLASS_PATH.'/idn/idna_convert.class.php')) { |
| | | /* use idna class: |
| | | * @author Matthias Sommerfeld <mso@phlylabs.de> |
| | | * @copyright 2004-2011 phlyLabs Berlin, http://phlylabs.de |
| | | * @version 0.8.0 2011-03-11 |
| | | */ |
| | | |
| | | if(!is_object($this->idn_converter) || $this->idn_converter_name != 'idna_convert.class') { |
| | | include_once(ISPC_CLASS_PATH.'/idn/idna_convert.class.php'); |
| | | $this->idn_converter = new idna_convert(array('idn_version' => 2008)); |
| | | $this->idn_converter_name = 'idna_convert.class'; |
| | | } |
| | | $domain = $this->idn_converter->decode($domain); |
| | | } |
| | | |
| | | if($user_part !== false) return $user_part . '@' . $domain; |
| | | else return $domain; |
| | | } |
| | | |
| | | } |
| | | |
| | | ?> |
| | |
| | | if(is_array($record) && count($record) > 0 && is_array($this->listDef['item'])) { |
| | | foreach($this->listDef['item'] as $field){ |
| | | $key = $field['field']; |
| | | //* Apply filter to record value. |
| | | if(isset($field['filters']) && is_array($field['filters'])) { |
| | | $app->uses('tform'); |
| | | $record[$key] = $app->tform->filterField($key, (isset($record[$key]))?$record[$key]:'', $field['filters'], 'SHOW'); |
| | | } |
| | | if(isset($record[$key])) { |
| | | switch ($field['datatype']){ |
| | | case 'VARCHAR': |
| | |
| | | $returnval = strtoupper($field_value); |
| | | break; |
| | | case 'IDNTOASCII': |
| | | if(function_exists('idn_to_ascii')) { |
| | | $returnval = idn_to_ascii($field_value); |
| | | } else { |
| | | $returnval = $field_value; |
| | | } |
| | | $returnval = $app->functions->idn_encode($field_value); |
| | | break; |
| | | case 'IDNTOUTF8': |
| | | if(function_exists('idn_to_utf8')) { |
| | | $returnval = idn_to_utf8($field_value); |
| | | } else { |
| | | $returnval = $field_value; |
| | | } |
| | | $returnval = $app->functions->idn_decode($field_value); |
| | | break; |
| | | default: |
| | | $this->errorMessage .= "Unknown Filter: ".$filter['type']; |
| | |
| | | if(isset($field['filters']) && is_array($field['filters'])) { |
| | | $record[$key] = $this->filterField($key, (isset($record[$key]))?$record[$key]:'', $field['filters'], 'SAVE'); |
| | | } |
| | | |
| | | //* Validate record value |
| | | if(isset($field['validators']) && is_array($field['validators'])) { |
| | | $this->validateField($key, (isset($record[$key]))?$record[$key]:'', $field['validators']); |
| | |
| | | if($filter['event'] == $filter_event) { |
| | | switch ($filter['type']) { |
| | | case 'TOLOWER': |
| | | $returnval = strtolower($field_value); |
| | | $returnval = strtolower($returnval); |
| | | break; |
| | | case 'TOUPPER': |
| | | $returnval = strtoupper($field_value); |
| | | $returnval = strtoupper($returnval); |
| | | break; |
| | | case 'IDNTOASCII': |
| | | if(function_exists('idn_to_ascii')) { |
| | | $returnval = idn_to_ascii($field_value); |
| | | } else { |
| | | $returnval = $field_value; |
| | | } |
| | | $returnval = $app->functions->idn_encode($returnval); |
| | | break; |
| | | case 'IDNTOUTF8': |
| | | if(function_exists('idn_to_utf8')) { |
| | | $returnval = idn_to_utf8($field_value); |
| | | } else { |
| | | $returnval = $field_value; |
| | | } |
| | | $returnval = $app->functions->idn_decode($returnval); |
| | | break; |
| | | default: |
| | | $this->errorMessage .= "Unknown Filter: ".$filter['type']; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | return $returnval; |
| | | } |
| | | |
| | |
| | | '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'), |
| | | ), |
| | |
| | | ), |
| | | 'admin_mail' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'IDNTOASCII'), |
| | | 1 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8'), |
| | | 2 => array( 'event' => 'SAVE', |
| | | 'type' => 'TOLOWER') |
| | | ), |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | |
| | | ), |
| | | 'smtp_host' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'IDNTOASCII'), |
| | | 1 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8'), |
| | | 2 => array( 'event' => 'SAVE', |
| | | 'type' => 'TOLOWER') |
| | | ), |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | |
| | | |
| | | $liste['item'][] = array( 'field' => 'server_name', |
| | | 'datatype' => 'VARCHAR', |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => 'TEXT', |
| | | 'op' => 'like', |
| | | 'prefix' => '%', |
| | |
| | | 'email' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'IDNTOASCII'), |
| | | 1 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8'), |
| | | 2 => array( 'event' => 'SAVE', |
| | | 'type' => 'TOLOWER') |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | |
| | | 'domain' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'domain_error_empty'), |
| | | 1 => array ( 'type' => 'UNIQUE', |
| | |
| | | 'email' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'IDNTOASCII'), |
| | | 1 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8'), |
| | | 2 => array( 'event' => 'SAVE', |
| | | 'type' => 'TOLOWER') |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | |
| | | *****************************************************/ |
| | | $liste["item"][] = array( 'field' => "domain", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "LIKE", |
| | | 'prefix' => "%", |
| | |
| | | 'name' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-\*]{0,64}$/', |
| | | 'errmsg'=> 'name_error_regex'), |
| | |
| | | 'name' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'name_error_empty'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | |
| | | 'data' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'data_error_empty'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | |
| | | 'name' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-\*]{0,255}$/', |
| | | 'errmsg'=> 'name_error_regex'), |
| | |
| | | 'data' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'data_error_empty'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | |
| | | 'name' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'name_error_empty'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | |
| | | 'name' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-\*]{0,255}$/', |
| | | 'errmsg'=> 'name_error_regex'), |
| | |
| | | 'data' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'data_error_empty'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | |
| | | 'name' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-]{0,255}$/', |
| | | 'errmsg'=> 'name_error_regex'), |
| | |
| | | 'data' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'data_error_empty'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | |
| | | 'name' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-]{1,256}$/', |
| | | 'errmsg'=> 'name_error_regex'), |
| | |
| | | 'data' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'data_error_empty'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'IDNTOASCII'), |
| | | 1 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8'), |
| | | 2 => array( 'event' => 'SAVE', |
| | | 'type' => 'TOLOWER') |
| | | ), |
| | | 'name' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | |
| | | 'origin' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'origin_error_empty'), |
| | | 1 => array ( 'type' => 'UNIQUE', |
| | |
| | | 'ns' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-]{1,255}$/', |
| | | 'errmsg'=> 'ns_error_regex'), |
| | |
| | | 'origin' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'origin_error_empty'), |
| | | 1 => array ( 'type' => 'UNIQUE', |
| | |
| | | 'ns' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-]{1,255}$/', |
| | | 'errmsg'=> 'ns_error_regex'), |
| | |
| | | 'mbox' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'mbox_error_empty'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | |
| | | 'name' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-]{0,255}$/', |
| | | 'errmsg'=> 'name_error_regex'), |
| | |
| | | 'name' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-]{0,255}$/', |
| | | 'errmsg'=> 'name_error_regex'), |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "zone", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "SELECT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "origin", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "ns", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "origin", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "ns", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "mbox", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | 'source' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'ISEMAIL', |
| | | 'errmsg'=> 'email_error_isemail'), |
| | | ), |
| | |
| | | 'destination' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'SELECT', |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'IDNTOASCII'), |
| | | 1 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8'), |
| | | 2 => array( 'event' => 'SAVE', |
| | | 'type' => 'TOLOWER') |
| | | ), |
| | | 'default' => '', |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => 'SELECT email FROM mail_user WHERE {AUTHSQL} ORDER BY email', |
| | |
| | | 'source' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'source_error_empty'), |
| | | 1 => array ( 'type' => 'UNIQUE', |
| | |
| | | 'destination' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'IDNTOASCII'), |
| | | 1 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8'), |
| | | 2 => array( 'event' => 'SAVE', |
| | | 'type' => 'TOLOWER') |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | |
| | | 'domain' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'filters' => array ( 0 => array ( 'type' => 'TOLOWER', |
| | | 'event'=> 'SAVE'), |
| | | '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'=> 'domain_error_empty'), |
| | |
| | | 'source' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'domain_error_empty'), |
| | | 1 => array ( 'type' => 'UNIQUE', |
| | |
| | | 'destination' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'IDNTOASCII'), |
| | | 1 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8'), |
| | | 2 => array( 'event' => 'SAVE', |
| | | 'type' => 'TOLOWER') |
| | | ), |
| | | 'default' => '', |
| | | /* |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | |
| | | 'source' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'ISEMAIL', |
| | | 'errmsg'=> 'email_error_isemail'), |
| | | ), |
| | |
| | | 'destination' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'IDNTOASCII'), |
| | | 1 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8'), |
| | | 2 => array( 'event' => 'SAVE', |
| | | 'type' => 'TOLOWER') |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | |
| | | 'source_server' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'source_server_error_isempty'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | |
| | | 'destination' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'SELECT', |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'IDNTOASCII'), |
| | | 1 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8'), |
| | | 2 => array( 'event' => 'SAVE', |
| | | 'type' => 'TOLOWER') |
| | | ), |
| | | 'default' => '', |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => 'SELECT email FROM mail_user WHERE {AUTHSQL} ORDER BY email', |
| | |
| | | 'domain' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'=> 'domain_error_empty'), |
| | | 1 => array ( 'type' => 'REGEX', |
| | |
| | | 'email' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'ISEMAIL', |
| | | 'errmsg'=> 'email_error_isemail'), |
| | | ), |
| | |
| | | 'domain' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'IDNTOASCII'), |
| | | 1 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8'), |
| | | 2 => array( 'event' => 'SAVE', |
| | | 'type' => 'TOLOWER') |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | |
| | | 'email' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'ISEMAIL', |
| | | 'errmsg'=> 'email_error_isemail'), |
| | | 1 => array ( 'type' => 'UNIQUE', |
| | |
| | | 'cc' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'REGEX', |
| | | 'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i', |
| | | 'errmsg'=> 'cc_error_isemail'), |
| | |
| | | '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'), |
| | | ), |
| | |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | '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'=> 'email_error_notempty'), |
| | | ), |
| | |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | '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'=> 'email_error_notempty'), |
| | | ), |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "source", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "destination", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "source", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "destination", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "domain", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "source", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "destination", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "source", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "destination", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "destination", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "domain", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "domain", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "email", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "email", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "email", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | if ($domain['domain'] == $this->dataRecord["domain"]) { |
| | | $domain_select .= " selected"; |
| | | } |
| | | $domain_select .= ">" . $domain['domain'] . "</option>\r\n"; |
| | | $domain_select .= ">" . $app->functions->idn_decode($domain['domain']) . "</option>\r\n"; |
| | | } |
| | | } |
| | | else { |
| | |
| | | 'cc' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'REGEX', |
| | | 'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z\-]{2,10}){0,1}$/i', |
| | | 'errmsg'=> 'cc_error_isemail'), |
| | |
| | | 'domain' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'CUSTOM', |
| | | 'class' => 'validate_domain', |
| | | 'function' => 'alias_domain', |
| | |
| | | 'domain' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'CUSTOM', |
| | | 'class' => 'validate_domain', |
| | | 'function' => 'web_domain', |
| | | 'errmsg'=> 'domain_error_regex'), |
| | | ), |
| | | 'filters' => array ( 0 => array ( 'event' => 'SAVE', |
| | | 'type' => 'TOLOWER'), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | |
| | | 'domain' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'CUSTOM', |
| | | 'class' => 'validate_domain', |
| | | 'function' => 'sub_domain', |
| | |
| | | 'domain' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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' => 'CUSTOM', |
| | | 'class' => 'validate_domain', |
| | | 'function' => 'sub_domain', |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "parent_domain_id", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "SELECT", |
| | | 'op' => "=", |
| | | 'prefix' => "", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "parent_domain_id", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "SELECT", |
| | | 'op' => "=", |
| | | 'prefix' => "", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "domain", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "parent_domain_id", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "SELECT", |
| | | 'op' => "=", |
| | | 'prefix' => "", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "domain", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "domain", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "parent_domain_id", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "SELECT", |
| | | 'op' => "=", |
| | | 'prefix' => "", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "web_folder_id", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "SELECT", |
| | | 'op' => "=", |
| | | 'prefix' => "", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "domain", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "parent_domain_id", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "SELECT", |
| | | 'op' => "=", |
| | | 'prefix' => "", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "domain", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "parent_domain_id", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "SELECT", |
| | | 'op' => "=", |
| | | 'prefix' => "", |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "domain", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | |
| | | if ($domain['domain'] == $this->dataRecord["domain"]) { |
| | | $domain_select .= " selected"; |
| | | } |
| | | $domain_select .= ">" . $domain['domain'] . "</option>\r\n"; |
| | | $domain_select .= ">" . $app->functions->idn_decode($domain['domain']) . "</option>\r\n"; |
| | | } |
| | | } |
| | | else { |
| | |
| | | if ($domain['domain'] == $this->dataRecord["domain"]) { |
| | | $domain_select .= " selected"; |
| | | } |
| | | $domain_select .= ">" . $domain['domain'] . "</option>\r\n"; |
| | | $domain_select .= ">" . $app->functions->idn_decode($domain['domain']) . "</option>\r\n"; |
| | | } |
| | | } |
| | | else { |
| | |
| | | $domain_select .= " selected"; |
| | | $selected_domain = $domain['domain']; |
| | | } |
| | | $domain_select .= ">" . $domain['domain'] . "</option>\r\n"; |
| | | $domain_select .= ">" . $app->functions->idn_decode($domain['domain']) . "</option>\r\n"; |
| | | } |
| | | } |
| | | else { |
| | |
| | | $domain_select .= " selected"; |
| | | $selected_domain = $domain['domain']; |
| | | } |
| | | $domain_select .= ">" . $domain['domain'] . "</option>\r\n"; |
| | | $domain_select .= ">" . $app->functions->idn_decode($domain['domain']) . "</option>\r\n"; |
| | | } |
| | | } |
| | | else { |
| | |
| | | 'hostname' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | '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'), |
| | | ), |
| | |
| | | |
| | | $liste["item"][] = array( 'field' => "hostname", |
| | | 'datatype' => "VARCHAR", |
| | | 'filters' => array( 0 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8') |
| | | ), |
| | | 'formtype' => "TEXT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |