Marius Cramer
2015-04-15 9e5a1137350361387168dd6bb1598f0a3df84c19
- ported some patches
3 files modified
31 ■■■■■ changed files
interface/lib/classes/remote.d/client.inc.php 21 ●●●●● patch | view | raw | blame | history
interface/web/client/lib/remote.conf.php 2 ●●● patch | view | raw | blame | history
interface/web/sites/web_vhost_domain_edit.php 8 ●●●●● patch | view | raw | blame | history
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
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';
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> ';
                }
            }