From 9e5a1137350361387168dd6bb1598f0a3df84c19 Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Wed, 15 Apr 2015 09:27:58 -0400 Subject: [PATCH] - ported some patches --- interface/web/sites/web_vhost_domain_edit.php | 8 ++++++++ interface/lib/classes/remote.d/client.inc.php | 21 +++++++++++++++++++++ interface/web/client/lib/remote.conf.php | 2 +- 3 files changed, 30 insertions(+), 1 deletions(-) diff --git a/interface/lib/classes/remote.d/client.inc.php b/interface/lib/classes/remote.d/client.inc.php index 2fb4363..d1c7532 100644 --- a/interface/lib/classes/remote.d/client.inc.php +++ b/interface/lib/classes/remote.d/client.inc.php @@ -476,6 +476,27 @@ return false; } } + + public function client_get_by_customer_no($session_id, $customer_no) { + global $app; + if(!$this->checkPerm($session_id, 'client_get_by_customer_no')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + $customer_no = trim($customer_no); + if($customer_no == '') { + throw new SoapFault('permission_denied', 'There was no customer number specified.'); + return false; + } + $customer_no = $app->db->quote($customer_no); + $rec = $app->db->queryOneRecord("SELECT * FROM client WHERE customer_no = '".$customer_no."'"); + if (isset($rec)) { + return $rec; + } else { + throw new SoapFault('no_client_found', 'There is no user account for this customer number.'); + return false; + } + } /** * Get All client_id's from database diff --git a/interface/web/client/lib/remote.conf.php b/interface/web/client/lib/remote.conf.php index 6ac8ae1..d58029e 100644 --- a/interface/web/client/lib/remote.conf.php +++ b/interface/web/client/lib/remote.conf.php @@ -1,6 +1,6 @@ <?php -$function_list['client_get_all,client_get,client_add,client_update,client_delete,client_get_sites_by_user,client_get_by_username,client_change_password,client_get_id,client_delete_everything,client_get_emailcontact'] = 'Client functions'; +$function_list['client_get_all,client_get,client_add,client_update,client_delete,client_get_sites_by_user,client_get_by_username,client_get_by_customer_no,client_change_password,client_get_id,client_delete_everything,client_get_emailcontact'] = 'Client functions'; $function_list['domains_domain_get,domains_domain_add,domains_domain_delete,domains_get_all_by_user'] = 'Domaintool functions'; $function_list['quota_get_by_user,trafficquota_get_by_user,mailquota_get_by_user,databasequota_get_by_user'] = 'Quota functions'; diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index eb0db5a..5508440 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -409,6 +409,7 @@ $php_directive_snippets_txt = ''; if(is_array($php_directive_snippets) && !empty($php_directive_snippets)){ foreach($php_directive_snippets as $php_directive_snippet){ + $php_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $php_directive_snippet['snippet'] . PHP_EOL; $php_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$php_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.htmlentities($php_directive_snippet['snippet']).'</pre></a> '; } } @@ -420,6 +421,7 @@ $apache_directive_snippets_txt = ''; if(is_array($apache_directive_snippets) && !empty($apache_directive_snippets)){ foreach($apache_directive_snippets as $apache_directive_snippet){ + $apache_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $apache_directive_snippet['snippet'] . PHP_EOL; $apache_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$apache_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.htmlentities($apache_directive_snippet['snippet']).'</pre></a> '; } } @@ -432,6 +434,7 @@ $nginx_directive_snippets_txt = ''; if(is_array($nginx_directive_snippets) && !empty($nginx_directive_snippets)){ foreach($nginx_directive_snippets as $nginx_directive_snippet){ + $nginx_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $nginx_directive_snippet['snippet'] . PHP_EOL; $nginx_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$nginx_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.htmlentities($nginx_directive_snippet['snippet']).'</pre></a> '; } } @@ -443,6 +446,7 @@ $proxy_directive_snippets_txt = ''; if(is_array($proxy_directive_snippets) && !empty($proxy_directive_snippets)){ foreach($proxy_directive_snippets as $proxy_directive_snippet){ + $proxy_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $proxy_directive_snippet['snippet'] . PHP_EOL; $proxy_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$proxy_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.htmlentities($proxy_directive_snippet['snippet']).'</pre></a> '; } } @@ -573,6 +577,7 @@ $php_directive_snippets_txt = ''; if(is_array($php_directive_snippets) && !empty($php_directive_snippets)){ foreach($php_directive_snippets as $php_directive_snippet){ + $php_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $php_directive_snippet['snippet'] . PHP_EOL; $php_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$php_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.htmlentities($php_directive_snippet['snippet']).'</pre></a> '; } } @@ -584,6 +589,7 @@ $apache_directive_snippets_txt = ''; if(is_array($apache_directive_snippets) && !empty($apache_directive_snippets)){ foreach($apache_directive_snippets as $apache_directive_snippet){ + $apache_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $apache_directive_snippet['snippet'] . PHP_EOL; $apache_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$apache_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.htmlentities($apache_directive_snippet['snippet']).'</pre></a> '; } } @@ -596,6 +602,7 @@ $nginx_directive_snippets_txt = ''; if(is_array($nginx_directive_snippets) && !empty($nginx_directive_snippets)){ foreach($nginx_directive_snippets as $nginx_directive_snippet){ + $nginx_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $nginx_directive_snippet['snippet'] . PHP_EOL; $nginx_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$nginx_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.htmlentities($nginx_directive_snippet['snippet']).'</pre></a> '; } } @@ -607,6 +614,7 @@ $proxy_directive_snippets_txt = ''; if(is_array($proxy_directive_snippets) && !empty($proxy_directive_snippets)){ foreach($proxy_directive_snippets as $proxy_directive_snippet){ + $proxy_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $proxy_directive_snippet['snippet'] . PHP_EOL; $proxy_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$proxy_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.htmlentities($proxy_directive_snippet['snippet']).'</pre></a> '; } } -- Gitblit v1.9.1