Marius Cramer
2013-11-14 7fe908c50c8dbc5cc05f571dbe11d66141caacd4
interface/web/admin/form/server_ip.tform.php
@@ -55,7 +55,7 @@
   Hinweis:
   Das ID-Feld ist nicht bei den Table Values einzufügen.
   Search:
   - searchable = 1 or searchable = 2 include the field in the search
   - searchable = 1: this field will be the title of the search result
@@ -64,16 +64,16 @@
*/
$form["title"]          = "IP Addresses";
$form["description"]    = "Form to edit system IP Addresses";
$form["name"]          = "server_ip";
$form["action"]         = "server_ip_edit.php";
$form["db_table"]      = "server_ip";
$form["db_table_idx"]   = "server_ip_id";
$form["db_history"]      = "yes";
$form["tab_default"]   = "server_ip";
$form["list_default"]   = "server_ip_list.php";
$form["auth"]         = 'yes';
$form["title"]    = "IP Addresses";
$form["description"]  = "Form to edit system IP Addresses";
$form["name"]    = "server_ip";
$form["action"]   = "server_ip_edit.php";
$form["db_table"]  = "server_ip";
$form["db_table_idx"] = "server_ip_id";
$form["db_history"]  = "yes";
$form["tab_default"] = "server_ip";
$form["list_default"] = "server_ip_list.php";
$form["auth"]   = 'yes';
$form["auth_preset"]["userid"]  = 0; // 0 = id of the user, > 0 id must match with id of current user
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
@@ -82,83 +82,83 @@
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["tabs"]['server_ip'] = array (
   'title'    => "IP Address",
   'width'    => 80,
   'template'    => "templates/server_ip_edit.htm",
   'fields'    => array (
   ##################################
   # Beginn Datenbankfelder
   ##################################
   'title'  => "IP Address",
   'width'  => 80,
   'template'  => "templates/server_ip_edit.htm",
   'fields'  => array (
      //#################################
      // Beginn Datenbankfelder
      //#################################
      'server_id' => array (
         'datatype'   => 'INTEGER',
         'formtype'   => 'SELECT',
         'default'   => '',
         'datasource'   => array (    'type'   => 'SQL',
                              'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name',
                              'keyfield'=> 'server_id',
                              'valuefield'=> 'server_name'
                            ),
         'value'      => ''
         'datatype' => 'INTEGER',
         'formtype' => 'SELECT',
         'default' => '',
         'datasource' => array (  'type' => 'SQL',
            'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name',
            'keyfield'=> 'server_id',
            'valuefield'=> 'server_name'
         ),
         'value'  => ''
      ),
      'client_id' => array (
         'datatype'   => 'INTEGER',
         'formtype'   => 'SELECT',
         'default'   => '',
         'datasource'   => array (    'type'   => 'SQL',
                              'querystring' => "SELECT client_id,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM client WHERE {AUTHSQL} ORDER BY contact_name",
                              'keyfield'=> 'client_id',
                              'valuefield'=> 'name'
                            ),
         'value'      => array(0 => ' ')
         'datatype' => 'INTEGER',
         'formtype' => 'SELECT',
         'default' => '',
         'datasource' => array (  'type' => 'SQL',
            'querystring' => "SELECT client_id,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM client WHERE {AUTHSQL} ORDER BY contact_name",
            'keyfield'=> 'client_id',
            'valuefield'=> 'name'
         ),
         'value'  => array(0 => ' ')
      ),
      'ip_type' => array (
         'datatype'   => 'VARCHAR',
         'formtype'   => 'SELECT',
         'default'   => '',
         'value'      => array('IPv4' => 'IPv4', 'IPv6' => 'IPv6'),
         'datatype' => 'VARCHAR',
         'formtype' => 'SELECT',
         'default' => '',
         'value'  => array('IPv4' => 'IPv4', 'IPv6' => 'IPv6'),
         'searchable' => 2
      ),
      'ip_address' => array (
         'datatype'   => 'VARCHAR',
         'formtype'   => 'TEXT',
         'validators'   => array (    0 => array (   'type'   => 'ISIP',
                                          'errmsg'=> 'ip_error_wrong'),
                              1 => array (   'type'   => 'UNIQUE',
                                          'errmsg'=> 'ip_error_unique'),
                           ),
         'default'   => '',
         'value'      => '',
         'separator'   => '',
         'width'      => '15',
         'maxlength'   => '15',
         'rows'      => '',
         'cols'      => '',
         'datatype' => 'VARCHAR',
         'formtype' => 'TEXT',
         'validators' => array (  0 => array ( 'type' => 'ISIP',
               'errmsg'=> 'ip_error_wrong'),
            1 => array ( 'type' => 'UNIQUE',
               'errmsg'=> 'ip_error_unique'),
         ),
         'default' => '',
         'value'  => '',
         'separator' => '',
         'width'  => '15',
         'maxlength' => '15',
         'rows'  => '',
         'cols'  => '',
         'searchable' => 1
      ),
      'virtualhost' => array (
         'datatype'   => 'VARCHAR',
         'formtype'   => 'CHECKBOX',
         'default'   => 'y',
         'value'      => array(0 => 'n',1 => 'y')
         'datatype' => 'VARCHAR',
         'formtype' => 'CHECKBOX',
         'default' => 'y',
         'value'  => array(0 => 'n', 1 => 'y')
      ),
      'virtualhost_port' => array (
         'datatype'   => 'VARCHAR',
         'formtype'   => 'TEXT',
         'validators'   => array (    0 => array (   'type'   => 'REGEX',
                                          'regex' => '/^([0-9]{1,5}\,{0,1}){1,}$/i',
                                          'errmsg'=> 'error_port_syntax'),
                           ),
         'default'   => '80,443',
         'value'      => '',
         'separator'   => '',
         'width'      => '15',
         'maxlength'   => '15',
         'rows'      => '',
         'cols'      => ''
         'datatype' => 'VARCHAR',
         'formtype' => 'TEXT',
         'validators' => array (  0 => array ( 'type' => 'REGEX',
               'regex' => '/^([0-9]{1,5}\,{0,1}){1,}$/i',
               'errmsg'=> 'error_port_syntax'),
         ),
         'default' => '80,443',
         'value'  => '',
         'separator' => '',
         'width'  => '15',
         'maxlength' => '15',
         'rows'  => '',
         'cols'  => ''
      ),
   ##################################
   # ENDE Datenbankfelder
   ##################################
      //#################################
      // ENDE Datenbankfelder
      //#################################
   )
);
?>
?>