Marius Burkard
2016-07-01 49441bdd0f3ff75d5092d5b832b97ea722a66363
commit | author | age
18341e 1 <?php
T 2
3 /*
4     Datatypes:
5     - INTEGER
6     - DOUBLE
7     - CURRENCY
8     - VARCHAR
9     - TEXT
10     - DATE
11 */
12
73813a 13 $vhostdomain_type = 'domain';
MC 14
15 if(isset($_SESSION['s']['var']['vhostdomain_type'])) {
16     if($_SESSION['s']['var']['vhostdomain_type'] == 'subdomain') {
17         $vhostdomain_type = 'subdomain';
18     } elseif($_SESSION['s']['var']['vhostdomain_type'] == 'aliasdomain') {
19         $vhostdomain_type = 'aliasdomain';
20     }
21 }
18341e 22
T 23
24 // Name of the list
7d6ec3 25 if($_SESSION['s']['user']['typ'] == 'admin') {
73813a 26     $liste["name"]     = "web_vhost_domain_admin";
7d6ec3 27 } else {
73813a 28     $liste["name"]     = "web_vhost_domain";
7d6ec3 29 }
18341e 30
T 31 // Database table
b1a6a5 32 $liste["table"]    = "web_domain";
18341e 33
T 34 // Index index field of the database table
b1a6a5 35 $liste["table_idx"]   = "domain_id";
18341e 36
T 37 // Search Field Prefix
b1a6a5 38 $liste["search_prefix"]  = "search_";
18341e 39
T 40 // Records per page
b1a6a5 41 $liste["records_per_page"]  = "15";
18341e 42
T 43 // Script File of the list
73813a 44 $liste["file"]    = "web_vhost_domain_list.php";
18341e 45
T 46 // Script file of the edit form
73813a 47 $liste["edit_file"]   = "web_vhost_domain_edit.php";
18341e 48
T 49 // Script File of the delete script
73813a 50 $liste["delete_file"]  = "web_vhost_domain_del.php";
18341e 51
T 52 // Paging Template
b1a6a5 53 $liste["paging_tpl"]  = "templates/paging.tpl.htm";
18341e 54
T 55 // Enable auth
b1a6a5 56 $liste["auth"]    = "yes";
18341e 57
T 58
59 /*****************************************************
60 * Suchfelder
61 *****************************************************/
62
73813a 63 if($vhostdomain_type == 'domain') {
MC 64     $liste["item"][] = array( 'field'  => "domain_id",
65         'datatype' => "INTEGER",
66         'formtype' => "TEXT",
67         'op'  => "=",
68         'prefix' => "",
69         'suffix' => "",
70         'width'  => "",
71         'value'  => "");
72 }
18341e 73
b1a6a5 74 $liste["item"][] = array( 'field'  => "active",
MC 75     'datatype' => "VARCHAR",
76     'formtype' => "SELECT",
77     'op'  => "=",
78     'prefix' => "",
79     'suffix' => "",
80     'width'  => "",
0ea7b9 81     'value'  => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>"));
18341e 82
73813a 83 if($_SESSION['s']['user']['typ'] == 'admin' && $vhostdomain_type == 'domain') {
b1a6a5 84     $liste["item"][] = array( 'field'  => "sys_groupid",
MC 85         'datatype' => "INTEGER",
86         'formtype' => "SELECT",
87         'op'  => "=",
88         'prefix' => "",
89         'suffix' => "",
90         'datasource' => array (  'type' => 'SQL',
7ee336 91             //'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name',
MC 92             'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name",
b1a6a5 93             'keyfield'=> 'groupid',
MC 94             'valuefield'=> 'name'
95         ),
96         'width'  => "",
97         'value'  => "");
7d6ec3 98 }
18341e 99
b1a6a5 100 $liste["item"][] = array( 'field'  => "server_id",
MC 101     'datatype' => "INTEGER",
102     'formtype' => "SELECT",
103     'op'  => "=",
104     'prefix' => "",
105     'suffix' => "",
106     'datasource' => array (  'type' => 'SQL',
107         'querystring' => 'SELECT a.server_id, a.server_name FROM server a, web_domain b WHERE (a.server_id = b.server_id) AND ({AUTHSQL-B}) ORDER BY a.server_name',
108         'keyfield'=> 'server_id',
109         'valuefield'=> 'server_name'
110     ),
111     'width'  => "",
112     'value'  => "");
113
73813a 114 if($vhostdomain_type != 'domain') {
MC 115     $liste["item"][] = array( 'field'  => "parent_domain_id",
116         'datatype' => "VARCHAR",
117         'filters'   => array( 0 => array( 'event' => 'SHOW',
118                 'type' => 'IDNTOUTF8')
119         ),
120         'formtype' => "SELECT",
121         'op'  => "=",
122         'prefix' => "",
123         'suffix' => "",
124         'datasource' => array (  'type' => 'SQL',
125             'querystring' => "SELECT domain_id,domain FROM web_domain WHERE type = 'vhost' AND {AUTHSQL} ORDER BY domain",
126             'keyfield'=> 'domain_id',
127             'valuefield'=> 'domain'
128         ),
129         'width'  => "",
130         'value'  => "");
131
132 }
133
b1a6a5 134 $liste["item"][] = array( 'field'  => "domain",
MC 135     'datatype' => "VARCHAR",
136     'filters'   => array( 0 => array( 'event' => 'SHOW',
137             'type' => 'IDNTOUTF8')
138     ),
139     'formtype' => "TEXT",
140     'op'  => "like",
141     'prefix' => "%",
142     'suffix' => "%",
143     'width'  => "",
144     'value'  => "");
18341e 145
T 146
b1a6a5 147 ?>