|
55 | 55 | $result[] = _search('client', 'reseller', "AND limit_client != 0"); |
56 | 56 |
|
57 | 57 | // web sites |
58 | | - $result[] = _search('sites', 'web_domain', "AND type = 'vhost'"); |
| 58 | + $result[] = _search('sites', 'web_vhost_domain', "AND type = 'vhost'"); |
59 | 59 |
|
60 | 60 | // subdomains |
61 | | - $result[] = _search('sites', 'web_subdomain', "AND type = 'subdomain'"); |
| 61 | + $result[] = _search('sites', 'web_childdomain', "AND type = 'subdomain'", 'type=subdomain'); |
62 | 62 |
|
63 | 63 | // web site aliases |
64 | | - $result[] = _search('sites', 'web_aliasdomain', "AND type = 'alias'"); |
| 64 | + $result[] = _search('sites', 'web_childdomain', "AND type = 'alias'", 'type=aliasdomain'); |
65 | 65 |
|
66 | 66 | // vhostsubdomains |
67 | | - $result[] = _search('sites', 'web_vhost_subdomain', "AND type = 'vhostsubdomain'"); |
| 67 | + $result[] = _search('sites', 'web_vhost_domain', "AND type = 'vhostsubdomain'", 'type=subdomain'); |
68 | 68 |
|
69 | 69 | // vhostaliasdomains |
70 | | - $result[] = _search('sites', 'web_vhost_aliasdomain', "AND type = 'vhostalias'"); |
| 70 | + $result[] = _search('sites', 'web_vhost_domain', "AND type = 'vhostalias'", 'type=aliasdomain'); |
71 | 71 |
|
72 | 72 | // FTP users |
73 | 73 | $result[] = _search('sites', 'ftp_user'); |
|
134 | 134 |
|
135 | 135 | //} |
136 | 136 |
|
137 | | -function _search($module, $section, $additional_sql = ''){ |
| 137 | +function _search($module, $section, $additional_sql = '', $params = ''){ |
138 | 138 | global $app, $q, $authsql, $modules; |
139 | 139 |
|
140 | 140 | $result_array = array('cheader' => array(), 'cdata' => array()); |
141 | 141 | if(in_array($module, $modules)){ |
142 | 142 | $search_fields = array(); |
143 | 143 | $desc_fields = array(); |
144 | 144 | if(is_file('../'.$module.'/form/'.$section.'.tform.php')){ |
145 | | - include_once '../'.$module.'/form/'.$section.'.tform.php'; |
| 145 | + include '../'.$module.'/form/'.$section.'.tform.php'; |
146 | 146 |
|
147 | 147 | $category_title = $form["title"]; |
| 148 | + if($params == 'type=subdomain' && $section == 'web_childdomain') $category_title = 'Subdomain'; |
| 149 | + if($params == 'type=aliasdomain' && $section == 'web_childdomain') $category_title = 'Aliasdomain'; |
| 150 | + if($params == 'type=subdomain' && $section == 'web_vhost_domain') $category_title = 'Subdomain (Vhost)'; |
| 151 | + if($params == 'type=aliasdomain' && $section == 'web_vhost_domain') $category_title = 'Aliasdomain (Vhost)'; |
148 | 152 | $form_file = $form["action"]; |
149 | 153 | $db_table = $form["db_table"]; |
150 | 154 | $db_table_idx = $form["db_table_idx"]; |
@@ -205,7 +209,7 @@ function _search($module, $section, $additional_sql = ''){ |
205 | 209 |
|
206 | 210 | $result_array['cdata'][] = array('title' => $wb[$title_key.'_txt'].': '.$result[$title_key], |
207 | 211 | 'description' => $description, |
208 | | - 'onclick' => "ISPConfig.capp('".$module."','".$module."/".$form_file."?id=".$result[$db_table_idx]."');", |
| 212 | + 'onclick' => "ISPConfig.capp('".$module."','".$module."/".$form_file.urlencode("?id=".$result[$db_table_idx]).($params != ''? urlencode('&'.$params) : '')."');", |
209 | 213 | 'fill_text' => strtolower($result[$title_key]) |
210 | 214 | ); |
211 | 215 | } |
|
0 commit comments