Commit 9e5a1137 authored by Marius Cramer's avatar Marius Cramer
Browse files

- ported some patches

parent c41c8f73
......@@ -476,6 +476,27 @@ class remoting_client extends remoting {
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
......
<?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';
......
......@@ -409,6 +409,7 @@ class page_action extends tform_actions {
$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 @@ class page_action extends tform_actions {
$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 @@ class page_action extends tform_actions {
$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 @@ class page_action extends tform_actions {
$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 @@ class page_action extends tform_actions {
$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 @@ class page_action extends tform_actions {
$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 @@ class page_action extends tform_actions {
$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 @@ class page_action extends tform_actions {
$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> ';
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment