tbrehm
2009-11-19 fbdcc4579d09d6069d3b72fc1c0ae5f1b6891e79
- Updated Bind export script.
- Added missing remoting functions
1 files deleted
5 files modified
4 files added
1372 ■■■■■ changed files
helper_scripts/dns_export_to_bind.php patch | view | raw | blame | history
interface/lib/classes/remoting.inc.php 982 ●●●●● patch | view | raw | blame | history
interface/lib/classes/remoting_lib.inc.php 29 ●●●● patch | view | raw | blame | history
interface/web/admin/form/remote_user.tform.php 65 ●●●●● patch | view | raw | blame | history
interface/web/mail/form/spamfilter_policy.tform.php 2 ●●● patch | view | raw | blame | history
remoting_client/examples/soap-client-add.php 80 ●●●●● patch | view | raw | blame | history
remoting_client/examples/soap-client-delete.php 29 ●●●●● patch | view | raw | blame | history
remoting_client/examples/soap-client-update.php 83 ●●●●● patch | view | raw | blame | history
remoting_client/examples/soap-klient-add.php 88 ●●●●● patch | view | raw | blame | history
remoting_client/examples/soap_config.php 14 ●●●●● patch | view | raw | blame | history
helper_scripts/dns_export_to_bind.php
interface/lib/classes/remoting.inc.php
@@ -1,7 +1,7 @@
<?php
/*
Copyright (c) 2007, Till Brehm, projektfarm Gmbh
Copyright (c) 2007 - 2009, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
@@ -866,22 +866,990 @@
 * 
 * 
 * 
 *      * klient add :)
 *      * Client functions
 * 
 * 
 */
    //* Get client details
    public function client_get($session_id, $client_id)
    {
        global $app;
    public function client_add($session_id,$domain_id, $client_id, $params)
        if(!$this->checkPerm($session_id, 'client_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../client/form/client.tform.php');
        return $app->remoting_lib->getDataRecord($client_id);
    }
    public function client_add($session_id, $reseller_id, $params)
    {
        if (!$this->checkPerm($session_id, 'client_add'))
            {
                    $this->server->fault('permission_denied','You do not have the permissions to access this function.');
                    return false;
            }
        $affected_rows = $this->klientadd('../client/form/client.tform.php',$domain_id, $client_id, $params);
        $affected_rows = $this->klientadd('../client/form/client.tform.php',$reseller_id, $params);
        return $affected_rows;  
                  
    }
    public function client_update($session_id, $reseller_id, $client_id, $params)
    {
            global $app;
            if (!$this->checkPerm($session_id, 'client_update'))
            {
                    $this->server->fault('permission_denied','You do not have the permissions to access this function.');
                    return false;
            }
            $affected_rows = $this->updateQuery('../client/form/client.tform.php', $reseller_id, $client_id, $params);
            $app->remoting_lib->ispconfig_sysuser_update($params,$client_id);
            return $affected_rows;
    }
    public function client_delete($session_id,$client_id)
    {
            global $app;
            if (!$this->checkPerm($session_id, 'client_delete'))
            {
                    $this->server->fault('permission_denied','You do not have the permissions to access this function.');
                    return false;
            }
            $affected_rows = $this->deleteQuery('../client/form/client.tform.php',$client_id);
            $app->remoting_lib->ispconfig_sysuser_delete($client_id);
            return $affected_rows;
    }
    // Website functions ---------------------------------------------------------------------------------------
    //* Get cron details
    public function sites_cron_get($session_id, $cron_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'sites_cron_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../sites/form/cron.tform.php');
        return $app->remoting_lib->getDataRecord($cron_id);
    }
    //* Add a cron record
    public function sites_cron_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'sites_cron_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../sites/form/cron.tform.php',$client_id,$params);
    }
    //* Update cron record
    public function sites_cron_update($session_id, $client_id, $cron_id, $params)
    {
        if(!$this->checkPerm($session_id, 'sites_cron_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../sites/form/cron.tform.php',$client_id,$cron_id,$params);
        return $affected_rows;
    }
    //* Delete cron record
    public function sites_cron_delete($session_id, $cron_id)
    {
        if(!$this->checkPerm($session_id, 'sites_cron_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../sites/form/cron.tform.php',$cron_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------
    //* Get record details
    public function sites_database_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'sites_database_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../sites/form/database.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function sites_database_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'sites_database_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../sites/form/database.tform.php',$client_id,$params);
    }
    //* Update a record
    public function sites_database_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'sites_database_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../sites/form/database.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function sites_database_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'sites_database_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../sites/form/database.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------
    //* Get record details
    public function sites_ftp_user_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'sites_ftp_user_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../sites/form/ftp_user.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function sites_ftp_user_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'sites_ftp_user_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../sites/form/ftp_user.tform.php',$client_id,$params);
    }
    //* Update a record
    public function sites_ftp_user_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'sites_ftp_user_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../sites/form/ftp_user.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function sites_ftp_user_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'sites_ftp_user_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../sites/form/ftp_user.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------
    //* Get record details
    public function sites_shell_user_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'sites_shell_user_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../sites/form/shell_user.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function sites_shell_user_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'sites_shell_user_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../sites/form/shell_user.tform.php',$client_id,$params);
    }
    //* Update a record
    public function sites_shell_user_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'sites_shell_user_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../sites/form/shell_user.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function sites_shell_user_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'sites_shell_user_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../sites/form/shell_user.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------
    //* Get record details
    public function sites_web_domain_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'sites_web_domain_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../sites/form/web_domain.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function sites_web_domain_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'sites_web_domain_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../sites/form/web_domain.tform.php',$client_id,$params);
    }
    //* Update a record
    public function sites_web_domain_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'sites_web_domain_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../sites/form/web_domain.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function sites_web_domain_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'sites_web_domain_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../sites/form/web_domain.tform.php',$primary_id);
        return $affected_rows;
    }
    // -----------------------------------------------------------------------------------------------
    //* Get record details
    public function sites_web_aliasdomain_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'sites_web_aliasdomain_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../sites/form/web_aliasdomain.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function sites_web_aliasdomain_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'sites_web_aliasdomain_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../sites/form/web_aliasdomain.tform.php',$client_id,$params);
    }
    //* Update a record
    public function sites_web_aliasdomain_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'sites_web_aliasdomain_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../sites/form/web_aliasdomain.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function sites_web_aliasdomain_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'sites_web_aliasdomain_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../sites/form/web_aliasdomain.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------
    //* Get record details
    public function sites_web_subdomain_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'sites_web_subdomain_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../sites/form/web_subdomain.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function sites_web_subdomain_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'sites_web_subdomain_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../sites/form/web_subdomain.tform.php',$client_id,$params);
    }
    //* Update a record
    public function sites_web_subdomain_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'sites_web_subdomain_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../sites/form/web_subdomain.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function sites_web_subdomain_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'sites_web_subdomain_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../sites/form/web_subdomain.tform.php',$primary_id);
        return $affected_rows;
    }
    // DNS Function --------------------------------------------------------------------------------------------------
    //* Get record details
    public function dns_zone_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'dns_zone_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../dns/form/dns_soa.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function dns_zone_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_zone_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../dns/form/dns_soa.tform.php',$client_id,$params);
    }
    //* Update a record
    public function dns_zone_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_zone_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../dns/form/dns_soa.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function dns_zone_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'dns_zone_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../dns/form/dns_soa.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------------
    //* Get record details
    public function dns_aaaa_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'dns_aaaa_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../dns/form/dns_aaaa.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function dns_aaaa_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_aaaa_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../dns/form/dns_aaaa.tform.php',$client_id,$params);
    }
    //* Update a record
    public function dns_aaaa_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_aaaa_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../dns/form/dns_aaaa.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function dns_aaaa_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'dns_aaaa_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../dns/form/dns_aaaa.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------------
    //* Get record details
    public function dns_a_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'dns_a_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../dns/form/dns_a.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function dns_a_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_a_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../dns/form/dns_a.tform.php',$client_id,$params);
    }
    //* Update a record
    public function dns_a_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_a_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../dns/form/dns_a.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function dns_a_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'dns_a_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../dns/form/dns_a.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------------
    //* Get record details
    public function dns_alias_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'dns_alias_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../dns/form/dns_alias.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function dns_alias_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_alias_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../dns/form/dns_alias.tform.php',$client_id,$params);
    }
    //* Update a record
    public function dns_alias_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_alias_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../dns/form/dns_alias.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function dns_alias_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'dns_alias_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../dns/form/dns_alias.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------------
    //* Get record details
    public function dns_cname_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'dns_cname_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../dns/form/dns_cname.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function dns_cname_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_cname_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../dns/form/dns_cname.tform.php',$client_id,$params);
    }
    //* Update a record
    public function dns_cname_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_cname_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../dns/form/dns_cname.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function dns_cname_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'dns_cname_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../dns/form/dns_cname.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------------
    //* Get record details
    public function dns_hinfo_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'dns_hinfo_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../dns/form/dns_hinfo.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function dns_hinfo_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_hinfo_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../dns/form/dns_hinfo.tform.php',$client_id,$params);
    }
    //* Update a record
    public function dns_hinfo_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_hinfo_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../dns/form/dns_hinfo.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function dns_hinfo_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'dns_hinfo_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../dns/form/dns_hinfo.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------------
    //* Get record details
    public function dns_mx_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'dns_mx_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../dns/form/dns_mx.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function dns_mx_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_mx_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../dns/form/dns_mx.tform.php',$client_id,$params);
    }
    //* Update a record
    public function dns_mx_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_mx_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../dns/form/dns_mx.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function dns_mx_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'dns_mx_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../dns/form/dns_mx.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------------
    //* Get record details
    public function dns_ns_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'dns_ns_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../dns/form/dns_ns.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function dns_ns_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_ns_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../dns/form/dns_ns.tform.php',$client_id,$params);
    }
    //* Update a record
    public function dns_ns_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_ns_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../dns/form/dns_ns.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function dns_ns_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'dns_ns_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../dns/form/dns_ns.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------------
    //* Get record details
    public function dns_ptr_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'dns_ptr_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../dns/form/dns_ptr.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function dns_ptr_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_ptr_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../dns/form/dns_ptr.tform.php',$client_id,$params);
    }
    //* Update a record
    public function dns_ptr_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_ptr_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../dns/form/dns_ptr.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function dns_ptr_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'dns_ptr_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../dns/form/dns_ptr.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------------
    //* Get record details
    public function dns_rp_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'dns_rp_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../dns/form/dns_rp.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function dns_rp_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_rp_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../dns/form/dns_rp.tform.php',$client_id,$params);
    }
    //* Update a record
    public function dns_rp_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_rp_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../dns/form/dns_rp.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function dns_rp_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'dns_rp_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../dns/form/dns_rp.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------------
    //* Get record details
    public function dns_srv_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'dns_srv_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../dns/form/dns_srv.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function dns_srv_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_srv_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../dns/form/dns_srv.tform.php',$client_id,$params);
    }
    //* Update a record
    public function dns_srv_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_srv_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../dns/form/dns_srv.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function dns_srv_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'dns_srv_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../dns/form/dns_srv.tform.php',$primary_id);
        return $affected_rows;
    }
    // ----------------------------------------------------------------------------------------------------------------
    //* Get record details
    public function dns_txt_get($session_id, $primary_id)
    {
        global $app;
        if(!$this->checkPerm($session_id, 'dns_txt_get')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $app->uses('remoting_lib');
        $app->remoting_lib->loadFormDef('../dns/form/dns_txt.tform.php');
        return $app->remoting_lib->getDataRecord($primary_id);
    }
    //* Add a record
    public function dns_txt_add($session_id, $client_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_txt_add')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        return $this->insertQuery('../dns/form/dns_txt.tform.php',$client_id,$params);
    }
    //* Update a record
    public function dns_txt_update($session_id, $client_id, $primary_id, $params)
    {
        if(!$this->checkPerm($session_id, 'dns_txt_update')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->updateQuery('../dns/form/dns_txt.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }
    //* Delete a record
    public function dns_txt_delete($session_id, $primary_id)
    {
        if(!$this->checkPerm($session_id, 'dns_txt_delete')) {
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        $affected_rows = $this->deleteQuery('../dns/form/dns_txt.tform.php',$primary_id);
        return $affected_rows;
    }
        
@@ -892,7 +1860,7 @@
    
    private function klientadd($formdef_file, $client_id, $params)
    private function klientadd($formdef_file, $reseller_id, $params)
    {
        global $app, $tform, $remoting_lib;
        $app->uses('remoting_lib');
@@ -901,7 +1869,7 @@
        $app->remoting_lib->loadFormDef($formdef_file);
        
        //* load the user profile of the client
        $app->remoting_lib->loadUserProfile($client_id);
        $app->remoting_lib->loadUserProfile($reseller_id);
        
        //* Get the SQL query
        $sql = $app->remoting_lib->getSQL($params,'INSERT',0);
@@ -926,7 +1894,7 @@
            $new_rec = $app->remoting_lib->getDataRecord($insert_id);
            $app->remoting_lib->datalogSave('INSERT',$primary_id,array(),$new_rec);
            
        $app->remoting_lib->dodaj_usera($params,$insert_id);
        $app->remoting_lib->ispconfig_sysuser_add($params,$insert_id);
        }
        
interface/lib/classes/remoting_lib.inc.php
@@ -373,7 +373,7 @@
                                        }
                                break;
                                case 'UNIQUE':
                                        if($this->action == 'NEW') {
                                        if($this->action == 'INSERT') {
                                                $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM ".$escape.$this->formDef['db_table'].$escape. " WHERE $field_name = '".$app->db->quote($field_value)."'");
                                                if($num_rec["number"] > 0) {
                                                        $errmsg = $validator['errmsg'];
@@ -624,16 +624,17 @@
            
        }
        function dodaj_usera($params,$insert_id){
        function ispconfig_sysuser_add($params,$insert_id){
            global $app,$sql1;
            $username = $params["username"];
            $password = $params["password"];
            $username = $app->db->quote($params["username"]);
            $password = $app->db->quote($params["password"]);
            $modules = 'mail,sites,dns,tools';
            $startmodule = 'mail';
            $usertheme = $params["usertheme"];
            $usertheme = $app->db->quote($params["usertheme"]);
            $type = 'user';
            $active = 1;
            $language = $params["language"];
            $insert_id = intval($insert_id);
            $language = $app->db->quote($params["language"]);
            $groupid = $app->db->datalogInsert('sys_group', "(name,description,client_id) VALUES ('$username','','$insert_id')", 'groupid');
            $groups = $groupid;
            $sql1 = "INSERT INTO sys_user (username,passwort,modules,startmodule,app_theme,typ,active,language,groups,default_group,client_id)
@@ -641,6 +642,22 @@
            $app->db->query($sql1);
        }
        function ispconfig_sysuser_update($params,$client_id){
            global $app;
            $username = $app->db->quote($params["username"]);
            $password = $app->db->quote($params["password"]);
            $client_id = intval($client_id);
            $sql = "UPDATE sys_user set username = '$username', passwort = md5('$password') WHERE client_id = $client_id";
            $app->db->query($sql);
        }
        function ispconfig_sysuser_delete($client_id){
            global $app;
            $client_id = intval($client_id);
            $sql = "DELETE FROM sys_user WHERE client_id = $client_id";
            $app->db->query($sql);
        }
        function datalogSave($action,$primary_id, $record_old, $record_new) {
                global $app,$conf;
interface/web/admin/form/remote_user.tform.php
@@ -33,35 +33,42 @@
*/
$lista_funkcji = array();
$lista_funkcji['mail_domain_get,mail_domain_add,mail_domain_update,mail_domain_delete'] = 'Mail domain functions<br>';
$function_list = array();
$function_list['mail_domain_get,mail_domain_add,mail_domain_update,mail_domain_delete'] = 'Mail domain functions<br>';
$function_list['mail_user_add,mail_user_update,mail_user_delete'] = 'Mail user functions<br>';
$function_list['mail_alias_add,mail_alias_update,mail_alias_delete'] = 'Mail alias functions<br>';
$function_list['mail_forward_add,mail_forward_update,mail_forward_delete'] = 'Mail forward functions<br>';
$function_list['mail_catchall_add,mail_catchall_update,mail_catchall_delete'] = 'Mail catchall functions<br>';
$function_list['mail_transport_add,mail_transport_update,mail_transport_delete'] = 'Mail transport functions<br>';
$function_list['mail_whitelist_add,mail_whitelist_update,mail_whitelist_delete'] = 'Mail whitelist functions<br>';
$function_list['mail_blacklist_add,mail_blacklist_update,mail_blacklist_delete'] = 'Mail blacklist functions<br>';
$function_list['mail_spamfilter_user_add,mail_spamfilter_user_update,mail_spamfilter_user_delete'] = 'Mail spamfilter user functions<br>';
$function_list['mail_policy_add,mail_policy_update,mail_policy_delete'] = 'Mail spamfilter policy functions<br>';
$function_list['mail_fetchmail_add,mail_fetchmail_update,mail_fetchmail_delete'] = 'Mail fetchmail functions<br>';
$function_list['mail_whitelist_add,mail_whitelist_update,mail_whitelist_delete'] = 'Mail whitelist functions<br>';
$function_list['mail_blacklist_add,mail_blacklist_update,mail_blacklist_delete'] = 'Mail blacklist functions<br>';
$function_list['mail_filter_add,mail_filter_update,mail_filter_delete'] = 'Mail filter functions<br>';
$lista_funkcji['mail_user_add,mail_user_update,mail_user_delete'] = 'Mail user functions<br>';
$lista_funkcji['mail_alias_add,mail_alias_update,mail_alias_delete'] = 'Mail alias functions<br>';
$lista_funkcji['mail_forward_add,mail_forward_update,mail_forward_delete'] = 'Mail forward functions<br>';
$lista_funkcji['mail_catchall_add,mail_catchall_update,mail_catchall_delete'] = 'Mail catchall functions<br>';
$lista_funkcji['mail_transport_add,mail_transport_update,mail_transport_delete'] = 'Mail transport functions<br>';
$lista_funkcji['mail_whitelist_add,mail_whitelist_update,mail_whitelist_delete'] = 'Mail whitelist functions<br>';
$lista_funkcji['mail_blacklist_add,mail_blacklist_update,mail_blacklist_delete'] = 'Mail blacklist functions<br>';
$lista_funkcji['mail_spamfilter_user_add,mail_spamfilter_user_update,mail_spamfilter_user_delete'] = 'Mail spamfilter user functions<br>';
$lista_funkcji['mail_policy_add,mail_policy_update,mail_policy_delete'] = 'Mail spamfilter policy functions<br>';
$lista_funkcji['mail_fetchmail_add,mail_fetchmail_update,mail_fetchmail_delete'] = 'Mail fetchmail functions<br>';
$lista_funkcji['mail_whitelist_add,mail_whitelist_update,mail_whitelist_delete'] = 'Mail whitelist functions<br>';
$lista_funkcji['mail_blacklist_add,mail_blacklist_update,mail_blacklist_delete'] = 'Mail blacklist functions<br>';
$lista_funkcji['mail_filter_add,mail_filter_update,mail_filter_delete'] = 'Mail filter functions<br>';
$function_list['client_get,client_add,client_update,client_delete'] = 'Client functions<br>';
$function_list['sites_cron_get,sites_cron_add,sites_cron_update,sites_cron_delete'] = 'Sites cron functions<br>';
$function_list['sites_database_get,sites_database_add,sites_database_update,sites_database_delete'] = 'Sites database functions<br>';
$function_list['sites_ftp_user_get,sites_ftp_user_add,sites_ftp_user_update,sites_ftp_user_delete'] = 'Sites FTP-User functions<br>';
$function_list['sites_shell_user_get,sites_shell_user_add,sites_shell_user_update,sites_shell_user_delete'] = 'Sites Shell-User functions<br>';
$function_list['sites_web_domain_get,sites_web_domain_add,sites_web_domain_update,sites_web_domain_delete'] = 'Sites Domain functions<br>';
$function_list['sites_web_aliasdomain_get,sites_web_aliasdomain_add,sites_web_aliasdomain_update,sites_web_aliasdomain_delete'] = 'Sites Aliasdomain functions<br>';
$function_list['sites_web_subdomain_get,sites_web_subdomain_add,sites_web_subdomain_update,sites_web_subdomain_delete'] = 'Sites Subdomain functions<br>';
$function_list['dns_zone_get,dns_zone_add,dns_zone_update,dns_zone_delete'] = 'DNS zone functions<br>';
$function_list['dns_a_get,dns_a_add,dns_a_update,dns_a_delete'] = 'DNS a functions<br>';
$function_list['dns_aaaa_get,dns_aaaa_add,dns_aaaa_update,dns_aaaa_delete'] = 'DNS aaaa functions<br>';
$function_list['dns_alias_get,dns_alias_add,dns_alias_update,dns_alias_delete'] = 'DNS alias functions<br>';
$function_list['dns_cname_get,dns_cname_add,dns_cname_update,dns_cname_delete'] = 'DNS cname functions<br>';
$function_list['dns_hinfo_get,dns_hinfo_add,dns_hinfo_update,dns_hinfo_delete'] = 'DNS hinfo functions<br>';
$function_list['dns_mx_get,dns_mx_add,dns_mx_update,dns_mx_delete'] = 'DNS mx functions<br>';
$function_list['dns_ns_get,dns_ns_add,dns_ns_update,dns_ns_delete'] = 'DNS ns functions<br>';
$function_list['dns_ptr_get,dns_ptr_add,dns_ptr_update,dns_ptr_delete'] = 'DNS ptr functions<br>';
$function_list['dns_rp_get,dns_rp_add,dns_rp_update,dns_rp_delete'] = 'DNS rp functions<br>';
$function_list['dns_srv_get,dns_srv_add,dns_srv_update,dns_srv_delete'] = 'DNS srv functions<br>';
$function_list['dns_txt_get,dns_txt_add,dns_txt_update,dns_txt_delete'] = 'DNS txt functions<br>';
$form["title"]             = "Remote user";
@@ -135,7 +142,7 @@
            'regex'        => '',
            'errmsg'    => '',
            'default'    => '',
            'value'        => $lista_funkcji,
            'value'        => $function_list,
            'separator'    => ';',
            'width'        => '',
            'maxlength'    => '',
interface/web/mail/form/spamfilter_policy.tform.php
@@ -48,7 +48,7 @@
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = 'r'; //r = read, i = insert, u = update, d = delete
$form["tabs"]['policy'] = array (
    'title'     => "Policy",
remoting_client/examples/soap-client-add.php
New file
@@ -0,0 +1,80 @@
<?php
require('soap_config.php');
$client = new SoapClient(null, array('location' => $soap_location,
                                     'uri'      => $soap_uri));
try {
    if($session_id = $client->login($username,$password)) {
        echo 'Login successfull. SessionID:'.$session_id.'<br />';
    }
    $params = array(        'server_id' => 1,
                            'company_name' => 'Company',
                            'contact_name' => 'John Doe',
                            'username' =>'john',
                            'password' =>'test',
                            'language' =>'en',
                            'usertheme' =>'default',
                            'street' =>'mainstreet 10',
                            'zip' =>'12345',
                            'city' =>'Homecity',
                            'state' =>'non-US',
                            'country' =>'EN',
                            'telephone' =>'',
                            'mobile' =>'',
                               'fax' =>'',
                               'email' =>'',
                            'internet' =>'',
                            'icq' =>'',
                               'notes' =>'',
                            'template_master' => '1',
                            'template_additional' =>'',
                            'default_mailserver' =>'1',
                            'limit_maildomain' =>'1',
                            'limit_mailbox' =>'-1',
                            'limit_mailalias' =>'-1',
                            'limit_mailforward' =>'-1',
                            'limit_mailcatchall' =>'-1',
                            'limit_mailrouting' => '-1',
                            'limit_mailfilter' =>'-1',
                               'limit_fetchmail' =>'-1',
                            'limit_mailquota' =>'-1',
                            'limit_spamfilter_wblist' =>'-1',
                            'limit_spamfilter_user' =>'-1',
                            'limit_spamfilter_policy' =>'-1',
                            'default_webserver' =>'1',
                            'limit_web_domain' =>'-1',
                               'web_php_options' =>"SuPHP",
                            'limit_web_aliasdomain' =>'-1',
                            'limit_web_subdomain' =>'-1',
                            'limit_ftp_user' =>'-1',
                            'limit_shell_user' =>'-1',
                            'ssh_chroot' =>'None',
                            'default_dnsserver' =>'1',
                            'limit_dns_zone' =>'-1',
                            'limit_dns_record' =>'-1',
                            'limit_client' =>'0',
                            'default_dbserver' =>'1',
                            'limit_database' =>'-1',
                            'limit_cron' =>'0',
                            'limit_cron_type' =>'',
                               'limit_cron_frequency' =>'-1');
    $reseller_id = 0;
    $domain_id = $client->client_add($session_id, $reseller_id, $params);
    if($client->logout($session_id)) {
        echo 'Logout.<br />';
    }
} catch (SoapFault $e) {
    die('SOAP Error: '.$e->getMessage());
}
?>
remoting_client/examples/soap-client-delete.php
New file
@@ -0,0 +1,29 @@
<?php
require('soap_config.php');
$client = new SoapClient(null, array('location' => $soap_location,
                                     'uri'      => $soap_uri));
try {
    if($session_id = $client->login($username,$password)) {
        echo 'Login successfull. SessionID:'.$session_id.'<br />';
    }
    $client_id = 3;
    $affected_rows = $client->client_delete($session_id, $client_id);
    if($client->logout($session_id)) {
        echo 'Logout.<br />';
    }
} catch (SoapFault $e) {
    die('SOAP Error: '.$e->getMessage());
}
?>
remoting_client/examples/soap-client-update.php
New file
@@ -0,0 +1,83 @@
<?php
require('soap_config.php');
$client = new SoapClient(null, array('location' => $soap_location,
                                     'uri'      => $soap_uri));
try {
    if($session_id = $client->login($username,$password)) {
        echo 'Login successfull. SessionID:'.$session_id.'<br />';
    }
    $params = array(        'server_id' => 1,
                            'company_name' => 'Company',
                            'contact_name' => 'John Doe 3',
                            'username' =>'john2',
                            'password' =>'test',
                            'language' =>'en',
                            'usertheme' =>'default',
                            'street' =>'mainstreet 10',
                            'zip' =>'12345',
                            'city' =>'Homecity',
                            'state' =>'non-US',
                            'country' =>'EN',
                            'telephone' =>'',
                            'mobile' =>'',
                               'fax' =>'',
                               'email' =>'',
                            'internet' =>'',
                            'icq' =>'',
                               'notes' =>'',
                            'template_master' => '1',
                            'template_additional' =>'',
                            'default_mailserver' =>'1',
                            'limit_maildomain' =>'1',
                            'limit_mailbox' =>'-1',
                            'limit_mailalias' =>'-1',
                            'limit_mailforward' =>'-1',
                            'limit_mailcatchall' =>'-1',
                            'limit_mailrouting' => '-1',
                            'limit_mailfilter' =>'-1',
                               'limit_fetchmail' =>'-1',
                            'limit_mailquota' =>'-1',
                            'limit_spamfilter_wblist' =>'-1',
                            'limit_spamfilter_user' =>'-1',
                            'limit_spamfilter_policy' =>'-1',
                            'default_webserver' =>'1',
                            'limit_web_domain' =>'-1',
                               'web_php_options' =>"SuPHP",
                            'limit_web_aliasdomain' =>'-1',
                            'limit_web_subdomain' =>'-1',
                            'limit_ftp_user' =>'-1',
                            'limit_shell_user' =>'-1',
                            'ssh_chroot' =>'None',
                            'default_dnsserver' =>'1',
                            'limit_dns_zone' =>'-1',
                            'limit_dns_record' =>'-1',
                            'limit_client' =>'0',
                            'default_dbserver' =>'1',
                            'limit_database' =>'-1',
                            'limit_cron' =>'0',
                            'limit_cron_type' =>'',
                               'limit_cron_frequency' =>'-1');
    $reseller_id = 0;
    $client_id = 3;
    $return_client_id = $client->client_update($session_id, $reseller_id, $client_id, $params);
    if($client->logout($session_id)) {
        echo 'Logout.<br />';
    }
} catch (SoapFault $e) {
    die('SOAP Error: '.$e->getMessage());
}
?>
remoting_client/examples/soap-klient-add.php
File was deleted
remoting_client/examples/soap_config.php
New file
@@ -0,0 +1,14 @@
<?php
$username = 'admin';
$password = 'admin';
/*
$soap_location = 'http://localhost:8080/ispconfig3/interface/web/remote/index.php';
$soap_uri = 'http://localhost:8080/ispconfig3/interface/web/remote/';
*/
$soap_location = 'http://localhost:8080/remote/index.php';
$soap_uri = 'http://localhost:8080/remote/';
?>