From fe670c66d9304be12ff56665636f2ec92a560f73 Mon Sep 17 00:00:00 2001 From: tbrehm Date: Wed, 2 Sep 2009 18:14:27 +0000 Subject: [PATCH] Added SOAP support for mail module. Many thanks to Arkadiusz Roch & Artur Edelman from Tri-Plex technology --- interface/lib/classes/remoting.inc.php | 583 +++++++++++++++++- interface/lib/classes/remoting_lib.inc.php | 28 +- .../web/admin/form/remote_user.tform.php | 156 +++++ .../web/admin/lib/lang/en_remote_user.lng | 9 + .../admin/lib/lang/en_remote_user_list.lng | 8 + interface/web/admin/lib/module.conf.php | 16 + interface/web/admin/list/remote_user.list.php | 65 ++ interface/web/admin/remote_user_del.php | 62 ++ interface/web/admin/remote_user_edit.php | 33 + interface/web/admin/remote_user_list.php | 24 + .../web/admin/templates/remote_user_edit.htm | 41 ++ .../web/admin/templates/remote_user_list.htm | 54 ++ remoting_client/examples/soap-alias-add.php | 40 ++ .../examples/soap-alias-delete.php | 35 ++ .../examples/soap-alias-update.php | 41 ++ .../examples/soap-blacklist-add.php | 41 ++ .../examples/soap-blacklist-delete.php | 35 ++ .../examples/soap-blacklist-update.php | 43 ++ .../examples/soap-catchall-add.php | 40 ++ .../examples/soap-catchall-delete.php | 35 ++ .../examples/soap-catchall-update.php | 41 ++ .../examples/soap-fetchmail-add.php | 43 ++ .../examples/soap-fetchmail-delete.php | 35 ++ .../examples/soap-fetchmail-update.php | 45 ++ remoting_client/examples/soap-filtr-add.php | 41 ++ .../examples/soap-filtr-delete.php | 35 ++ .../examples/soap-filtr-update.php | 42 ++ remoting_client/examples/soap-forward-add.php | 40 ++ .../examples/soap-forward-delete.php | 35 ++ .../examples/soap-forward-update.php | 41 ++ remoting_client/examples/soap-klient-add.php | 88 +++ .../examples/soap-mailuser-add.php | 45 ++ .../examples/soap-mailuser-delete.php | 35 ++ .../examples/soap-mailuser-update.php | 46 ++ remoting_client/examples/soap-policy-add.php | 43 ++ .../examples/soap-policy-delete.php | 35 ++ .../examples/soap-policy-update.php | 45 ++ .../examples/soap-transport-add.php | 40 ++ .../examples/soap-transport-delete.php | 35 ++ .../examples/soap-transport-update.php | 44 ++ .../examples/soap-users_spamfilter-add.php | 41 ++ .../examples/soap-users_spamfilter-delete.php | 35 ++ .../examples/soap-users_spamfilter-update.php | 43 ++ .../examples/soap-whitelist-add.php | 41 ++ .../examples/soap-whitelist-delete.php | 35 ++ .../examples/soap-whitelist-update.php | 43 ++ .../examples/soap-wpisy_blacklist-add.php | 40 ++ .../examples/soap-wpisy_blacklist-delete.php | 35 ++ .../examples/soap-wpisy_blacklist-update.php | 42 ++ .../examples/soap-wpisy_whitelist-add.php | 40 ++ .../examples/soap-wpisy_whitelist-delete.php | 35 ++ .../examples/soap-wpisy_whitelist-update.php | 42 ++ 52 files changed, 2704 insertions(+), 11 deletions(-) create mode 100644 interface/web/admin/form/remote_user.tform.php create mode 100644 interface/web/admin/lib/lang/en_remote_user.lng create mode 100644 interface/web/admin/lib/lang/en_remote_user_list.lng create mode 100644 interface/web/admin/list/remote_user.list.php create mode 100644 interface/web/admin/remote_user_del.php create mode 100644 interface/web/admin/remote_user_edit.php create mode 100644 interface/web/admin/remote_user_list.php create mode 100644 interface/web/admin/templates/remote_user_edit.htm create mode 100644 interface/web/admin/templates/remote_user_list.htm create mode 100644 remoting_client/examples/soap-alias-add.php create mode 100644 remoting_client/examples/soap-alias-delete.php create mode 100644 remoting_client/examples/soap-alias-update.php create mode 100644 remoting_client/examples/soap-blacklist-add.php create mode 100644 remoting_client/examples/soap-blacklist-delete.php create mode 100644 remoting_client/examples/soap-blacklist-update.php create mode 100644 remoting_client/examples/soap-catchall-add.php create mode 100644 remoting_client/examples/soap-catchall-delete.php create mode 100644 remoting_client/examples/soap-catchall-update.php create mode 100644 remoting_client/examples/soap-fetchmail-add.php create mode 100644 remoting_client/examples/soap-fetchmail-delete.php create mode 100644 remoting_client/examples/soap-fetchmail-update.php create mode 100644 remoting_client/examples/soap-filtr-add.php create mode 100644 remoting_client/examples/soap-filtr-delete.php create mode 100644 remoting_client/examples/soap-filtr-update.php create mode 100644 remoting_client/examples/soap-forward-add.php create mode 100644 remoting_client/examples/soap-forward-delete.php create mode 100644 remoting_client/examples/soap-forward-update.php create mode 100644 remoting_client/examples/soap-klient-add.php create mode 100644 remoting_client/examples/soap-mailuser-add.php create mode 100644 remoting_client/examples/soap-mailuser-delete.php create mode 100644 remoting_client/examples/soap-mailuser-update.php create mode 100644 remoting_client/examples/soap-policy-add.php create mode 100644 remoting_client/examples/soap-policy-delete.php create mode 100644 remoting_client/examples/soap-policy-update.php create mode 100644 remoting_client/examples/soap-transport-add.php create mode 100644 remoting_client/examples/soap-transport-delete.php create mode 100644 remoting_client/examples/soap-transport-update.php create mode 100644 remoting_client/examples/soap-users_spamfilter-add.php create mode 100644 remoting_client/examples/soap-users_spamfilter-delete.php create mode 100644 remoting_client/examples/soap-users_spamfilter-update.php create mode 100644 remoting_client/examples/soap-whitelist-add.php create mode 100644 remoting_client/examples/soap-whitelist-delete.php create mode 100644 remoting_client/examples/soap-whitelist-update.php create mode 100644 remoting_client/examples/soap-wpisy_blacklist-add.php create mode 100644 remoting_client/examples/soap-wpisy_blacklist-delete.php create mode 100644 remoting_client/examples/soap-wpisy_blacklist-update.php create mode 100644 remoting_client/examples/soap-wpisy_whitelist-add.php create mode 100644 remoting_client/examples/soap-wpisy_whitelist-delete.php create mode 100644 remoting_client/examples/soap-wpisy_whitelist-update.php diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php index f3263dd82..14c64e21b 100644 --- a/interface/lib/classes/remoting.inc.php +++ b/interface/lib/classes/remoting.inc.php @@ -26,6 +26,12 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--UPDATED 08.2009-- +Full SOAP support for ISPConfig 3.1.4 b +Updated by Arkadiusz Roch & Artur Edelman +Copyright (c) Tri-Plex technology + */ class remoting { @@ -150,18 +156,572 @@ class remoting { $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); return false; } - $affected_rows = $this->updateQuery('../mail/form/mail_domain.tform.php',$domain_id); + $affected_rows = $this->deleteQuery('../mail/form/mail_domain.tform.php',$domain_id); + return $affected_rows; + } + //* dodanie uzytkownika email + public function mail_user_add($session_id,$domain_id, $client_id, $params){ + if (!$this->checkPerm($session_id, 'mail_user_add')){ + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->insertQuery('../mail/form/mail_user.tform.php',$domain_id, $client_id, $params); return $affected_rows; } + + //* edycja uzytkownika email + public function mail_user_update($session_id, $client_id, $domain_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_user_update')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../mail/form/mail_user.tform.php', $client_id, $domain_id, $params); + return $affected_rows; + } + + //*usuniecie uzytkownika emial + public function mail_user_delete($session_id,$domain_id) + { + if (!$this->checkPerm($session_id, 'mail_user_delete')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/mail_user.tform.php',$domain_id); + return $affected_rows; + } + + //* aliasy email + public function mail_alias_add($session_id,$domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_alias_add')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->insertQuery('../mail/form/mail_alias.tform.php', $domain_id, $client_id, $params); + return $affected_rows; + } + + + public function mail_alias_update($session_id, $domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_alias_update')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../mail/form/mail_alias.tform.php', $client_id, $domain_id, $params); + return $affected_rows; + } + + public function mail_alias_delete($session_id,$domain_id) + { + if (!$this->checkPerm($session_id, 'mail_alias_delete')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/mail_alias.tform.php',$domain_id); + return $affected_rows; + } + + + //* przekierowania email + public function mail_forward_add($session_id,$domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_forward_add')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->insertQuery('../mail/form/mail_forward.tform.php', $domain_id, $client_id, $params); + return $affected_rows; + } + + + public function mail_forward_update($session_id, $domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_forward_update')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../mail/form/mail_forward.tform.php', $client_id, $domain_id, $params); + return $affected_rows; + } + + + public function mail_forward_delete($session_id,$domain_id) + { + if (!$this->checkPerm($session_id, 'mail_forward_delete')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/mail_forward.tform.php',$domain_id); + return $affected_rows; + } + + + //* catchall e-mail + public function mail_catchall_add($session_id,$domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_catchall_add')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->insertQuery('../mail/form/mail_domain_catchall.tform.php', $domain_id, $client_id, $params); + return $affected_rows; + } + + + public function mail_catchall_update($session_id, $domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_catchall_update')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../mail/form/mail_domain_catchall.tform.php', $client_id, $domain_id, $params); + return $affected_rows; + } + + + public function mail_catchall_delete($session_id,$domain_id) + { + if (!$this->checkPerm($session_id, 'mail_catchall_delete')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/mail_domain_catchall.tform.php',$domain_id); + return $affected_rows; + } + + //* przeniesienia e-mail + public function mail_transport_add($session_id,$domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_transport_add')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->insertQuery('../mail/form/mail_transport.tform.php', $domain_id, $client_id, $params); + return $affected_rows; + } + + + public function mail_transport_update($session_id, $domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_transport_update')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../mail/form/mail_transport.tform.php', $client_id, $domain_id, $params); + return $affected_rows; + } + + + public function mail_transport_delete($session_id,$domain_id) + { + if (!$this->checkPerm($session_id, 'mail_transport_delete')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/mail_transport.tform.php',$domain_id); + return $affected_rows; + } + + + //* biała lista e-mail + public function mail_spamfilter_whitelist_add($session_id,$domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_spamfilter_whitelist_add')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->insertQuery('../mail/form/spamfilter_whitelist.tform.php', $domain_id, $client_id, $params); + return $affected_rows; + } + + + public function mail_spamfilter_whitelist_update($session_id, $domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_spamfilter_whitelist_update')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../mail/form/spamfilter_whitelist.tform.php', $client_id, $domain_id, $params); + return $affected_rows; + } + + + public function mail_spamfilter_whitelist_delete($session_id,$domain_id) + { + if (!$this->checkPerm($session_id, 'mail_spamfilter_whitelist_delete')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/spamfilter_whitelist.tform.php',$domain_id); + return $affected_rows; + } + + + + //* czarna lista e-mail + public function mail_spamfilter_blacklist_add($session_id,$domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_spamfilter_blacklist_add')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->insertQuery('../mail/form/spamfilter_blacklist.tform.php', $domain_id, $client_id, $params); + return $affected_rows; + } + + + public function mail_spamfilter_blacklist_update($session_id, $domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_spamfilter_blacklist_update')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../mail/form/spamfilter_blacklist.tform.php', $client_id, $domain_id, $params); + return $affected_rows; + } + + + public function mail_spamfilter_blacklist_delete($session_id,$domain_id) + { + if (!$this->checkPerm($session_id, 'mail_spamfilter_blacklist_delete')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/spamfilter_blacklist.tform.php',$domain_id); + return $affected_rows; + } + + + //* filtr spamu użytkowników e-mail + public function mail_spamfilter_user_add($session_id,$domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_spamfilter_user_add')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->insertQuery('../mail/form/spamfilter_users.tform.php', $domain_id, $client_id, $params); + return $affected_rows; + } + + + public function mail_spamfilter_user_update($session_id, $domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_spamfilter_user_update')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../mail/form/spamfilter_users.tform.php', $client_id, $domain_id, $params); + return $affected_rows; + } + + + public function mail_spamfilter_user_delete($session_id,$domain_id) + { + if (!$this->checkPerm($session_id, 'mail_spamfilter_user_delete')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/spamfilter_users.tform.php',$domain_id); + return $affected_rows; + } + + + + //* polityki filtrów spamu e-mail + public function mail_policy_add($session_id,$domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_policy_add')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->insertQuery('../mail/form/spamfilter_policy.tform.php', $domain_id, $client_id, $params); + return $affected_rows; + } + + + public function mail_policy_update($session_id, $domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_policy_update')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../mail/form/spamfilter_policy.tform.php', $client_id, $domain_id, $params); + return $affected_rows; + } + + + public function mail_policy_delete($session_id,$domain_id) + { + if (!$this->checkPerm($session_id, 'mail_policy_delete')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/spamfilter_policy.tform.php',$domain_id); + return $affected_rows; + } + + + //* fetchmail + public function mail_fetchmail_add($session_id,$domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_fetchmail_add')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->insertQuery('../mail/form/mail_get.tform.php', $domain_id, $client_id, $params); + return $affected_rows; + } + + + public function mail_fetchmail_update($session_id, $domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_fetchmail_update')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../mail/form/mail_get.tform.php', $client_id, $domain_id, $params); + return $affected_rows; + } + + + public function mail_fetchmail_delete($session_id,$domain_id) + { + if (!$this->checkPerm($session_id, 'mail_fetchmail_delete')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/mail_get.tform.php',$domain_id); + return $affected_rows; + } + + + //* wpisy białej listy + public function mail_whitelist_add($session_id,$domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_whitelist_add')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->insertQuery('../mail/form/mail_whitelist.tform.php', $domain_id, $client_id, $params); + return $affected_rows; + } + + + public function mail_whitelist_update($session_id, $domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_whitelist_update')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../mail/form/mail_whitelist.tform.php', $client_id, $domain_id, $params); + return $affected_rows; + } + + + public function mail_whitelist_delete($session_id,$domain_id) + { + if (!$this->checkPerm($session_id, 'mail_whitelist_delete')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/mail_whitelist.tform.php',$domain_id); + return $affected_rows; + } + + + //* wpisy białej listy + public function mail_blacklist_add($session_id,$domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_blacklist_add')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->insertQuery('../mail/form/mail_blacklist.tform.php', $domain_id, $client_id, $params); + return $affected_rows; + } + + + public function mail_blacklist_update($session_id, $domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_blacklist_update')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../mail/form/mail_blacklist.tform.php', $client_id, $domain_id, $params); + return $affected_rows; + } + + + public function mail_blacklist_delete($session_id,$domain_id) + { + if (!$this->checkPerm($session_id, 'mail_blacklist_delete')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/mail_blacklist.tform.php',$domain_id); + return $affected_rows; + } + + + //* wpisy filtrow e-mail + public function mail_filter_add($session_id,$domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_filter_add')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->insertQuery('../mail/form/mail_content_filter.tform.php', $domain_id, $client_id, $params); + return $affected_rows; + } + + + public function mail_filter_update($session_id, $domain_id, $client_id, $params) + { + if (!$this->checkPerm($session_id, 'mail_filter_update')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->updateQuery('../mail/form/mail_content_filter.tform.php', $client_id, $domain_id, $params); + return $affected_rows; + } + + + public function mail_filter_delete($session_id,$domain_id) + { + if (!$this->checkPerm($session_id, 'mail_filter_delete')) + { + $this->server->fault('permission_denied','You do not have the permissions to access this function.'); + return false; + } + $affected_rows = $this->deleteQuery('../mail/form/mail_content_filter.tform.php',$domain_id); + return $affected_rows; + } + + + + + /* + * + * + * + * * klient add :) + * + * + */ + + public function client_add($session_id,$domain_id, $client_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); + return $affected_rows; + + } + + + + + //** private functions ----------------------------------------------------------------------------------- + + +private function klientadd($formdef_file, $client_id, $params) + { + global $app, $tform, $remoting_lib; + $app->uses('remoting_lib'); + + //* Load the form definition + $app->remoting_lib->loadFormDef($formdef_file); + + //* load the user profile of the client + $app->remoting_lib->loadUserProfile($client_id); + + //* Get the SQL query + $sql = $app->remoting_lib->getSQL($params,'INSERT',0); + if($app->remoting_lib->errorMessage != '') { + $this->server->fault('data_processing_error', $app->remoting_lib->errorMessage); + return false; + } + + $app->db->query($sql); + + if($app->db->errorMessage != '') { + $this->server->fault('database_error', $app->db->errorMessage . ' '.$sql); + return false; + } + + + + $insert_id = $app->db->insertID(); + //$app->uses('tform'); + //* Save changes to Datalog + if($app->remoting_lib->formDef["db_history"] == 'yes') { + $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); + + } + + + + + return $insert_id; + } + + + + private function insertQuery($formdef_file, $client_id, $params) { - global $app; + global $app, $tform, $remoting_lib; $app->uses('remoting_lib'); @@ -187,10 +747,14 @@ class remoting { $insert_id = $app->db->insertID(); + + + //$app->uses('tform'); //* Save changes to Datalog if($app->remoting_lib->formDef["db_history"] == 'yes') { $new_rec = $app->remoting_lib->getDataRecord($insert_id); - $app->tform->datalogSave('INSERT',$primary_id,array(),$new_rec); + $app->remoting_lib->datalogSave('INSERT',$primary_id,array(),$new_rec); + } @@ -233,7 +797,7 @@ class remoting { //* Save changes to Datalog if($app->remoting_lib->formDef["db_history"] == 'yes') { $new_rec = $app->remoting_lib->getDataRecord($primary_id); - $app->tform->datalogSave('UPDATE',$primary_id,$old_rec,$new_rec); + $app->remoting_lib->datalogSave('UPDATE',$primary_id,$old_rec,$new_rec); } @@ -265,7 +829,7 @@ class remoting { //* Save changes to Datalog if($app->remoting_lib->formDef["db_history"] == 'yes') { $rec = $app->remoting_lib->getDataRecord($primary_id); - $app->tform->datalogSave('DELETE',$primary_id,$rec,array()); + $app->remoting_lib->datalogSave('DELETE',$primary_id,$rec,array()); } @@ -275,11 +839,14 @@ class remoting { private function checkPerm($session_id, $function_name) { - $session = $this->getSession($session_id); + $dobre=Array(); + $session = $this->getSession($session_id); if(!$session){ return false; } - return in_array($function_name, explode(',', $session['remote_functions']) ); + + $dobre= str_replace(';',',',$session['remote_functions']); + return in_array($function_name, explode(',', $dobre) ); } @@ -306,4 +873,4 @@ class remoting { } } -?> \ No newline at end of file +?> diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php index 7d0d7f73f..6d0aec358 100644 --- a/interface/lib/classes/remoting_lib.inc.php +++ b/interface/lib/classes/remoting_lib.inc.php @@ -26,6 +26,12 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--UPDATED 08.2009-- +Full SOAP support for ISPConfig 3.1.4 b +Updated by Arkadiusz Roch & Artur Edelman +Copyright (c) Tri-Plex technology + */ /** @@ -61,7 +67,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ class remoting_lib { - + /** * Definition of the database atble (array) * @var tableDef @@ -600,7 +606,23 @@ class remoting_lib { $sql = "SELECT * FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$this->formDef['db_table_idx']." = ".$primary_id; return $app->db->queryOneRecord($sql); } - + + function dodaj_usera($params,$insert_id){ + global $app,$sql1; + $username = $params["username"]; + $password = $params["password"]; + $modules = 'mail,sites,dns,tools'; + $startmodule = 'mail'; + $usertheme = $params["usertheme"]; + $type = 'user'; + $active = 1; + $language = $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) + VALUES ('$username',md5('$password'),'$modules','$startmodule','$usertheme','$type','$active','$language',$groups,$groupid,$insert_id)"; + $app->db->query($sql1); + } function datalogSave($action,$primary_id, $record_old, $record_new) { global $app,$conf; @@ -689,4 +711,4 @@ class remoting_lib { } -?> \ No newline at end of file +?> diff --git a/interface/web/admin/form/remote_user.tform.php b/interface/web/admin/form/remote_user.tform.php new file mode 100644 index 000000000..ad5b561f0 --- /dev/null +++ b/interface/web/admin/form/remote_user.tform.php @@ -0,0 +1,156 @@ +'; + +$lista_funkcji['mail_user_add,mail_user_update,mail_user_delete'] = 'Mail user functions
'; + +$lista_funkcji['mail_alias_add,mail_alias_update,mail_alias_delete'] = 'Mail alias functions
'; + +$lista_funkcji['mail_forward_add,mail_forward_update,mail_forward_delete'] = 'Mail forward functions
'; + +$lista_funkcji['mail_catchall_add,mail_catchall_update,mail_catchall_delete'] = 'Mail catchall functions
'; + +$lista_funkcji['mail_transport_add,mail_transport_update,mail_transport_delete'] = 'Mail transport functions
'; + +$lista_funkcji['mail_whitelist_add,mail_whitelist_update,mail_whitelist_delete'] = 'Mail whitelist functions
'; + +$lista_funkcji['mail_blacklist_add,mail_blacklist_update,mail_blacklist_delete'] = 'Mail blacklist functions
'; + +$lista_funkcji['mail_spamfilter_user_add,mail_spamfilter_user_update,mail_spamfilter_user_delete'] = 'Mail spamfilter user functions
'; + +$lista_funkcji['mail_policy_add,mail_policy_update,mail_policy_delete'] = 'Mail spamfilter policy functions
'; + +$lista_funkcji['mail_fetchmail_add,mail_fetchmail_update,mail_fetchmail_delete'] = 'Mail fetchmail functions
'; + +$lista_funkcji['mail_whitelist_add,mail_whitelist_update,mail_whitelist_delete'] = 'Mail whitelist functions
'; + +$lista_funkcji['mail_blacklist_add,mail_blacklist_update,mail_blacklist_delete'] = 'Mail blacklist functions
'; + +$lista_funkcji['mail_filter_add,mail_filter_update,mail_filter_delete'] = 'Mail filter functions
'; + + + +$form["title"] = "Remote user"; +$form["description"] = ""; +$form["name"] = "remote_user"; +$form["action"] = "remote_user_edit.php"; +$form["db_table"] = "remote_user"; +$form["db_table_idx"] = "remote_userid"; +$form["db_history"] = "yes"; +$form["tab_default"] = "remote_user"; +$form["list_default"] = "remote_user_list.php"; +$form["auth"] = 'yes'; // yes / no + +$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user +$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["tabs"]['remote_user'] = array ( + 'title' => "Remote User", + 'width' => 100, + 'template' => "templates/remote_user_edit.htm", + 'fields' => array ( + ################################## + # Begin Datatable fields + ################################## + 'remote_userid' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '', + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => 'SELECT remote_userid,remote_username FROM remote_user WHERE {AUTHSQL} ORDER BY remote_username', + 'keyfield'=> 'remote_userid', + 'valuefield'=> 'remote_username' + ), + 'value' => '' + ), + + 'remote_username' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'UNIQUE', + 'errmsg'=> 'username_error_unique'), + 1 => array ( 'type' => 'REGEX', + 'regex' => '/^[\w\.\-]{0,64}$/', + 'errmsg'=> 'username_error_regex'), +2 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'username_error_empty'), + ), + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + 'remote_password' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'PASSWORD', + 'encryption' => 'MD5', + 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', + 'errmsg'=> 'password_error_empty'), + ), + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + 'remote_functions' => array ( + 'datatype' => 'TEXT', + 'formtype' => 'CHECKBOXARRAY', + 'regex' => '', + 'errmsg' => '', + 'default' => '', + 'value' => $lista_funkcji, + 'separator' => ';', + 'width' => '', + 'maxlength' => '', + 'rows' => '5', + 'cols' => '30' + ) + + ################################## + # ENDE Datatable fields + ################################## + ) +); + + + + + +?> diff --git a/interface/web/admin/lib/lang/en_remote_user.lng b/interface/web/admin/lib/lang/en_remote_user.lng new file mode 100644 index 000000000..068c129f3 --- /dev/null +++ b/interface/web/admin/lib/lang/en_remote_user.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/admin/lib/lang/en_remote_user_list.lng b/interface/web/admin/lib/lang/en_remote_user_list.lng new file mode 100644 index 000000000..56c6fac4b --- /dev/null +++ b/interface/web/admin/lib/lang/en_remote_user_list.lng @@ -0,0 +1,8 @@ + + diff --git a/interface/web/admin/lib/module.conf.php b/interface/web/admin/lib/module.conf.php index 98f828f07..636ea7279 100644 --- a/interface/web/admin/lib/module.conf.php +++ b/interface/web/admin/lib/module.conf.php @@ -138,6 +138,22 @@ $module['nav'][] = array( 'title' => 'Language Editor', // cleanup unset($items); +$items[] = array( 'title' => 'Add user', + 'target' => 'content', + 'link' => 'admin/remote_user_edit.php'); + +$items[] = array( 'title' => 'Edit user', + 'target' => 'content', + 'link' => 'admin/remote_user_list.php'); + + +$module['nav'][] = array( 'title' => 'Remote Users', + 'open' => 1, + 'items' => $items); + +// cleanup +unset($items); + // Getting the admin options from other modules $modules = explode(',', $_SESSION['s']['user']['modules']); if(is_array($modules)) { diff --git a/interface/web/admin/list/remote_user.list.php b/interface/web/admin/list/remote_user.list.php new file mode 100644 index 000000000..3636bef3a --- /dev/null +++ b/interface/web/admin/list/remote_user.list.php @@ -0,0 +1,65 @@ + 'remote_userid', + 'datatype' => 'VARCHAR', + 'formtype' => 'SELECT', + 'op' => '=', + 'prefix' => '', + 'suffix' => '', + 'width' => '', + 'datasource' => array( + 'type' => 'SQL', + 'querystring' => 'SELECT remote_userid,remote_username FROM remote_user WHERE {AUTHSQL} ORDER BY remote_username', + 'keyfield' => 'remote_userid', + 'valuefield' => 'remote_userid' + ), + 'value' => '' + ); + +$liste['item'][] = array( + 'field' => 'remote_username', + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'op' => 'like', + 'prefix' => '%', + 'suffix' => '%', + 'width' => '', + 'value' => '' + ); + +?> + diff --git a/interface/web/admin/remote_user_del.php b/interface/web/admin/remote_user_del.php new file mode 100644 index 000000000..277910588 --- /dev/null +++ b/interface/web/admin/remote_user_del.php @@ -0,0 +1,62 @@ +auth->check_module_permissions('admin'); + +$app->uses('tpl,tform'); +$app->load('tform_actions'); + +// Create a class page_action that extends the tform_actions base class + +class page_action extends tform_actions { + + + // Customisations for the page actions will be defined here + +} +$page = new page_action; +$page->onDelete(); + +?> diff --git a/interface/web/admin/remote_user_edit.php b/interface/web/admin/remote_user_edit.php new file mode 100644 index 000000000..73b679fd4 --- /dev/null +++ b/interface/web/admin/remote_user_edit.php @@ -0,0 +1,33 @@ +uses('tpl,tform,tform_actions'); +$app->load('tform_actions'); + +// Create a class page_action that extends the tform_actions base class +class page_action extends tform_actions { + + //* Customisations for the page actions will be defined here + +} + +// Create the new page object +$page = new page_action(); + +// Start the page rendering and action handling +$page->onLoad(); + +?> diff --git a/interface/web/admin/remote_user_list.php b/interface/web/admin/remote_user_list.php new file mode 100644 index 000000000..90a92b517 --- /dev/null +++ b/interface/web/admin/remote_user_list.php @@ -0,0 +1,24 @@ +uses('listform_actions'); + +// Optional limit +// $app->listform_actions->SQLExtWhere = 'type = 'alias''; + +// Start the form rendering and action ahndling +$app->listform_actions->onLoad(); + +?> diff --git a/interface/web/admin/templates/remote_user_edit.htm b/interface/web/admin/templates/remote_user_edit.htm new file mode 100644 index 000000000..36f11e1d0 --- /dev/null +++ b/interface/web/admin/templates/remote_user_edit.htm @@ -0,0 +1,41 @@ +

+

+ +
+ +
+
+
+ +
{tmpl_var name='username_prefix'}
+ +
+ +
+ + +
+
+

{tmpl_var name='password_strength_txt'}

+
+

 

+
+
+

{tmpl_var name='function_txt'}

+
+   {tmpl_var name='remote_functions'} +
+
+ +
+ + + + +
+ + +
+
+ +
diff --git a/interface/web/admin/templates/remote_user_list.htm b/interface/web/admin/templates/remote_user_list.htm new file mode 100644 index 000000000..bf10eef31 --- /dev/null +++ b/interface/web/admin/templates/remote_user_list.htm @@ -0,0 +1,54 @@ +

+

+
+
+ +
+ +
+ +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
{tmpl_var name="remote_userid"}{tmpl_var name="remote_username"} + +
+
+
+ +
+ diff --git a/remoting_client/examples/soap-alias-add.php b/remoting_client/examples/soap-alias-add.php new file mode 100644 index 000000000..8d1b327ef --- /dev/null +++ b/remoting_client/examples/soap-alias-add.php @@ -0,0 +1,40 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'source' => 'stachu@replikant.eu', + 'destination' => 'arian@replikant.eu', + 'type' => 'alias', + 'active' => 'y'); + + + $client_id = 0; + $domain_id = $client->mail_alias_add($session_id,$client_id,$params,$domain_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-alias-delete.php b/remoting_client/examples/soap-alias-delete.php new file mode 100644 index 000000000..7f3488afb --- /dev/null +++ b/remoting_client/examples/soap-alias-delete.php @@ -0,0 +1,35 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + + $client_id = 0; + $mailuser_id = 31; + $domain__id = $client->mail_alias_delete($session_id, $mailuser_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-alias-update.php b/remoting_client/examples/soap-alias-update.php new file mode 100644 index 000000000..92e5411f5 --- /dev/null +++ b/remoting_client/examples/soap-alias-update.php @@ -0,0 +1,41 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'source' => 'stachu1234@replikant.eu', + 'destination' => 'arian@replikant.eu', + 'type' => 'alias', + 'active' => 'y'); + + + $client_id = 0; + $mailuser_id = 31; + $domain_id = $client->mail_alias_update($session_id, $mailuser_id, $client_id, $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-blacklist-add.php b/remoting_client/examples/soap-blacklist-add.php new file mode 100644 index 000000000..39100c017 --- /dev/null +++ b/remoting_client/examples/soap-blacklist-add.php @@ -0,0 +1,41 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'wb' => 'b', + 'rid' => '', + 'email' => 'ktos@replikant.eu', + 'priority' => '4', + 'active' => 'y'); + + + $client_id = 0; + $domain_id = $client->mail_blacklist_add($session_id,$client_id,$params,$domain_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-blacklist-delete.php b/remoting_client/examples/soap-blacklist-delete.php new file mode 100644 index 000000000..479c32e01 --- /dev/null +++ b/remoting_client/examples/soap-blacklist-delete.php @@ -0,0 +1,35 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + + $client_id = 0; + $mailuser_id = 3; + $domain__id = $client->mail_blacklist_delete($session_id, $mailuser_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-blacklist-update.php b/remoting_client/examples/soap-blacklist-update.php new file mode 100644 index 000000000..b07031298 --- /dev/null +++ b/remoting_client/examples/soap-blacklist-update.php @@ -0,0 +1,43 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'wb' => 'b', + 'rid' => '', + 'email' => 'ktos@replikant.eu', + 'priority' => '10', + 'active' => 'n'); + + + + $client_id = 0; + $mailuser_id = 3; + $domain_id = $client->mail_blacklist_update($session_id, $mailuser_id, $client_id, $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-catchall-add.php b/remoting_client/examples/soap-catchall-add.php new file mode 100644 index 000000000..e9b5ae6b2 --- /dev/null +++ b/remoting_client/examples/soap-catchall-add.php @@ -0,0 +1,40 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'source' => '@replikant.eu', + 'destination' => 'arian@replikant.eu', + 'type' => 'catchall', + 'active' => 'y'); + + + $client_id = 0; + $domain_id = $client->mail_catchall_add($session_id,$client_id,$params,$domain_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-catchall-delete.php b/remoting_client/examples/soap-catchall-delete.php new file mode 100644 index 000000000..cb088a827 --- /dev/null +++ b/remoting_client/examples/soap-catchall-delete.php @@ -0,0 +1,35 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + + $client_id = 0; + $mailuser_id = 33; + $domain__id = $client->mail_catchall_delete($session_id, $mailuser_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-catchall-update.php b/remoting_client/examples/soap-catchall-update.php new file mode 100644 index 000000000..92dc53afe --- /dev/null +++ b/remoting_client/examples/soap-catchall-update.php @@ -0,0 +1,41 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'source' => '@replikant.eu', + 'destination' => 'arian@replikant.eu', + 'type' => 'catchall', + 'active' => 'y'); + + + $client_id = 0; + $mailuser_id = 33; + $domain_id = $client->mail_catchall_update($session_id, $mailuser_id, $client_id, $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-fetchmail-add.php b/remoting_client/examples/soap-fetchmail-add.php new file mode 100644 index 000000000..2d460dc9a --- /dev/null +++ b/remoting_client/examples/soap-fetchmail-add.php @@ -0,0 +1,43 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'type' => 'pop3', + 'source_server' => 'replikant.eu', + 'source_username' => 'alias', + 'source_password' => 'qazxsw', + 'source_delete' => 'y', + 'destination' => 'ktos@replikant.eu', + 'active' => 'y'); + + + $client_id = 0; + $domain_id = $client->mail_fetchmail_add($session_id,$client_id,$params,$domain_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-fetchmail-delete.php b/remoting_client/examples/soap-fetchmail-delete.php new file mode 100644 index 000000000..10d9c3db8 --- /dev/null +++ b/remoting_client/examples/soap-fetchmail-delete.php @@ -0,0 +1,35 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + + $client_id = 0; + $mailuser_id = 1; + $domain__id = $client->mail_fetchmail_delete($session_id, $mailuser_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-fetchmail-update.php b/remoting_client/examples/soap-fetchmail-update.php new file mode 100644 index 000000000..567c0a062 --- /dev/null +++ b/remoting_client/examples/soap-fetchmail-update.php @@ -0,0 +1,45 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'type' => 'pop3', + 'source_server' => 'replikant.eu', + 'source_username' => 'alias', + 'source_password' => 'qazxsw', + 'source_delete' => 'y', + 'destination' => 'ktos2@replikant.eu', + 'active' => 'y'); + + + + $client_id = 0; + $mailuser_id = 1; + $domain_id = $client->mail_fetchmail_update($session_id, $mailuser_id, $client_id, $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-filtr-add.php b/remoting_client/examples/soap-filtr-add.php new file mode 100644 index 000000000..374e1a7cc --- /dev/null +++ b/remoting_client/examples/soap-filtr-add.php @@ -0,0 +1,41 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'type' => 'header', + 'pattern' => 'wzor@replikant.eu', + 'data' => 'jakas data', + 'action' => 'DISCARD', + 'active' => 'y'); + + + $client_id = 0; + $domain_id = $client->mail_filtr_add($session_id,$client_id,$params,$domain_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-filtr-delete.php b/remoting_client/examples/soap-filtr-delete.php new file mode 100644 index 000000000..c9c45cd43 --- /dev/null +++ b/remoting_client/examples/soap-filtr-delete.php @@ -0,0 +1,35 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + + $client_id = 0; + $mailuser_id = 1; + $domain__id = $client->mail_filtr_delete($session_id, $mailuser_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-filtr-update.php b/remoting_client/examples/soap-filtr-update.php new file mode 100644 index 000000000..b49073b0b --- /dev/null +++ b/remoting_client/examples/soap-filtr-update.php @@ -0,0 +1,42 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'type' => 'header', + 'pattern' => 'wzor1@replikant.eu', + 'data' => 'data', + 'action' => 'DUNNO', + 'active' => 'y'); + + + $client_id = 0; + $mailuser_id = 1; + $domain_id = $client->mail_filtr_update($session_id, $mailuser_id, $client_id, $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-forward-add.php b/remoting_client/examples/soap-forward-add.php new file mode 100644 index 000000000..65a69a76a --- /dev/null +++ b/remoting_client/examples/soap-forward-add.php @@ -0,0 +1,40 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'source' => 'stachu@replikant.eu', + 'destination' => 'arian@replikant.eu', + 'type' => 'forward', + 'active' => 'y'); + + + $client_id = 0; + $domain_id = $client->mail_forward_add($session_id,$client_id,$params,$domain_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-forward-delete.php b/remoting_client/examples/soap-forward-delete.php new file mode 100644 index 000000000..32d8e5277 --- /dev/null +++ b/remoting_client/examples/soap-forward-delete.php @@ -0,0 +1,35 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + + $client_id = 0; + $mailuser_id = 32; + $domain__id = $client->mail_forward_delete($session_id, $mailuser_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-forward-update.php b/remoting_client/examples/soap-forward-update.php new file mode 100644 index 000000000..34c0d5f6d --- /dev/null +++ b/remoting_client/examples/soap-forward-update.php @@ -0,0 +1,41 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'source' => 'stachu124@replikant.eu', + 'destination' => 'arian@replikant.eu', + 'type' => 'forward', + 'active' => 'y'); + + + $client_id = 0; + $mailuser_id = 32; + $domain_id = $client->mail_forward_update($session_id, $mailuser_id, $client_id, $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-klient-add.php b/remoting_client/examples/soap-klient-add.php new file mode 100644 index 000000000..9123965dd --- /dev/null +++ b/remoting_client/examples/soap-klient-add.php @@ -0,0 +1,88 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + + 'company_name' => 'abm', + 'contact_name' => 'artur', + 'username' =>'artek123', + 'password' =>'artek123', + 'language' =>'pl', + 'usertheme' =>'default', + 'street' =>'dobrzanskiego', + 'zip' =>'05-071', + 'city' =>'sulejowek', + 'state' =>'non-US', + 'country' =>'PL', + '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'); + + + $client_id = 0; + $domain_id = $client->klient_add($session_id,$domain_id, $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + } +catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); + } + +?> + diff --git a/remoting_client/examples/soap-mailuser-add.php b/remoting_client/examples/soap-mailuser-add.php new file mode 100644 index 000000000..d42b5486b --- /dev/null +++ b/remoting_client/examples/soap-mailuser-add.php @@ -0,0 +1,45 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'email' => 'franek@dsad.dsa', + 'password' => 'franek', + 'quota' => '10', + 'maildir' => '/var/vmail/dsad.dsa/franek', + 'homedir' => '/var/vmail', 'uid' => '5000', + 'gid' => '5000', + 'postfix' => 'y', + 'disableimap' => '0', + 'disablepop3' => '0'); + + + $client_id = 0; + $domain_id = $client->mail_user_add($session_id,$client_id, $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-mailuser-delete.php b/remoting_client/examples/soap-mailuser-delete.php new file mode 100644 index 000000000..b342ebb4b --- /dev/null +++ b/remoting_client/examples/soap-mailuser-delete.php @@ -0,0 +1,35 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + + $client_id = 0; + $mailuser_id = 4; + $domain__id = $client->mail_user_delete($session_id, $mailuser_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-mailuser-update.php b/remoting_client/examples/soap-mailuser-update.php new file mode 100644 index 000000000..a967b6081 --- /dev/null +++ b/remoting_client/examples/soap-mailuser-update.php @@ -0,0 +1,46 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'email' => 'franek'.date("Hmi").'@dsad.dsa', + 'password' => 'franek', + 'quota' => '10', + 'maildir' => '/var/vmail/dsad.dsa/franek', + 'homedir' => '/var/vmail', 'uid' => '5000', + 'gid' => '5000', + 'postfix' => 'y', + 'disableimap' => '0', + 'disablepop3' => '0'); + + + $client_id = 0; + $mailuser_id = 3; + $domain__id = $client->mail_user_update($session_id, $client_id, $mailuser_id , $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-policy-add.php b/remoting_client/examples/soap-policy-add.php new file mode 100644 index 000000000..013c0962c --- /dev/null +++ b/remoting_client/examples/soap-policy-add.php @@ -0,0 +1,43 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'policy_name' => 'nazwa_polityki', + 'virus_lover' => 'n', + 'spam_lover' => 'y', + 'banned_files_lover' => 'n', + 'bad_header_lover' => 'y', + 'bypass_virus_checks' => 'n', + 'bypass_banned_checks' => 'y', + 'bypass_header_checks' => 'n'); + + + $client_id = 0; + $domain_id = $client->mail_policy_add($session_id,$client_id,$params,$domain_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-policy-delete.php b/remoting_client/examples/soap-policy-delete.php new file mode 100644 index 000000000..173e81a3b --- /dev/null +++ b/remoting_client/examples/soap-policy-delete.php @@ -0,0 +1,35 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + + $client_id = 0; + $mailuser_id = 10; + $domain__id = $client->mail_policy_delete($session_id, $mailuser_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-policy-update.php b/remoting_client/examples/soap-policy-update.php new file mode 100644 index 000000000..3434f0bc7 --- /dev/null +++ b/remoting_client/examples/soap-policy-update.php @@ -0,0 +1,45 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'policy_name' => 'nazwa', + 'virus_lover' => 'n', + 'spam_lover' => 'y', + 'banned_files_lover' => 'n', + 'bad_header_lover' => 'y', + 'bypass_virus_checks' => 'n', + 'bypass_banned_checks' => 'y', + 'bypass_header_checks' => 'n'); + + + + $client_id = 0; + $mailuser_id = 10; + $domain_id = $client->mail_policy_update($session_id, $mailuser_id, $client_id, $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-transport-add.php b/remoting_client/examples/soap-transport-add.php new file mode 100644 index 000000000..b49d4ebd3 --- /dev/null +++ b/remoting_client/examples/soap-transport-add.php @@ -0,0 +1,40 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'domain' => 'replikant', + 'transport' => 'arian@replikant.eu', + 'sort_order' => '1', + 'active' => 'y'); + + + $client_id = 0; + $domain_id = $client->mail_transport_add($session_id,$client_id,$params,$domain_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-transport-delete.php b/remoting_client/examples/soap-transport-delete.php new file mode 100644 index 000000000..4870c2b9c --- /dev/null +++ b/remoting_client/examples/soap-transport-delete.php @@ -0,0 +1,35 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + + $client_id = 0; + $mailuser_id = 1; + $domain__id = $client->mail_transport_delete($session_id, $mailuser_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-transport-update.php b/remoting_client/examples/soap-transport-update.php new file mode 100644 index 000000000..260925829 --- /dev/null +++ b/remoting_client/examples/soap-transport-update.php @@ -0,0 +1,44 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + + //transport -> typ:[adres@email] - jeśli z klamrą to włączona opcja brak mx + + $params = array( 'server_id' => 1, + 'domain' => 'replikant.eu', + 'transport' => 'uucp:[arian@replikant.eu]', + 'sort_order' => '5', + 'active' => 'y'); + + + $client_id = 0; + $mailuser_id = 1; + $domain_id = $client->mail_transport_update($session_id, $mailuser_id, $client_id, $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-users_spamfilter-add.php b/remoting_client/examples/soap-users_spamfilter-add.php new file mode 100644 index 000000000..2e8338f7b --- /dev/null +++ b/remoting_client/examples/soap-users_spamfilter-add.php @@ -0,0 +1,41 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'priority' => '2', + 'policy_id' => '4', + 'email' => 'ktos@replikant.eu', + 'fullname' => 'stachu pardala', + 'local' => ''); + + + $client_id = 0; + $domain_id = $client->mail_users_spamfilter_add($session_id,$client_id,$params,$domain_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-users_spamfilter-delete.php b/remoting_client/examples/soap-users_spamfilter-delete.php new file mode 100644 index 000000000..a34de30b5 --- /dev/null +++ b/remoting_client/examples/soap-users_spamfilter-delete.php @@ -0,0 +1,35 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + + $client_id = 0; + $mailuser_id = 1; + $domain__id = $client->mail_users_spamfilter_delete($session_id, $mailuser_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-users_spamfilter-update.php b/remoting_client/examples/soap-users_spamfilter-update.php new file mode 100644 index 000000000..29f9d8bd0 --- /dev/null +++ b/remoting_client/examples/soap-users_spamfilter-update.php @@ -0,0 +1,43 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'priority' => '2', + 'policy_id' => '4', + 'email' => 'ktos@replikant.eu', + 'fullname' => 'stachu jarzyna', + 'local' => ''); + + + + $client_id = 0; + $mailuser_id = 1; + $domain_id = $client->mail_users_spamfilter_update($session_id, $mailuser_id, $client_id, $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-whitelist-add.php b/remoting_client/examples/soap-whitelist-add.php new file mode 100644 index 000000000..71fcf0348 --- /dev/null +++ b/remoting_client/examples/soap-whitelist-add.php @@ -0,0 +1,41 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'wb' => 'w', + 'rid' => '', + 'email' => 'ktos@replikant.eu', + 'priority' => '4', + 'active' => 'y'); + + + $client_id = 0; + $domain_id = $client->mail_whitelist_add($session_id,$client_id,$params,$domain_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-whitelist-delete.php b/remoting_client/examples/soap-whitelist-delete.php new file mode 100644 index 000000000..0fb0e8c12 --- /dev/null +++ b/remoting_client/examples/soap-whitelist-delete.php @@ -0,0 +1,35 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + + $client_id = 0; + $mailuser_id = 2; + $domain__id = $client->mail_whitelist_delete($session_id, $mailuser_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-whitelist-update.php b/remoting_client/examples/soap-whitelist-update.php new file mode 100644 index 000000000..075b00e38 --- /dev/null +++ b/remoting_client/examples/soap-whitelist-update.php @@ -0,0 +1,43 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'wb' => 'w', + 'rid' => '', + 'email' => 'ktos@replikant.eu', + 'priority' => '10', + 'active' => 'y'); + + + + $client_id = 0; + $mailuser_id = 2; + $domain_id = $client->mail_whitelist_update($session_id, $mailuser_id, $client_id, $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-wpisy_blacklist-add.php b/remoting_client/examples/soap-wpisy_blacklist-add.php new file mode 100644 index 000000000..583b6515c --- /dev/null +++ b/remoting_client/examples/soap-wpisy_blacklist-add.php @@ -0,0 +1,40 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'source' => 'źródło', + 'access' => 'REJECT', + 'type' => 'recipient', + 'active' => 'y'); + + + $client_id = 0; + $domain_id = $client->mail_wpisy_blacklist_add($session_id,$client_id,$params,$domain_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-wpisy_blacklist-delete.php b/remoting_client/examples/soap-wpisy_blacklist-delete.php new file mode 100644 index 000000000..0eb0db037 --- /dev/null +++ b/remoting_client/examples/soap-wpisy_blacklist-delete.php @@ -0,0 +1,35 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + + $client_id = 0; + $mailuser_id = 2; + $domain__id = $client->mail_wpisy_blacklist_delete($session_id, $mailuser_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-wpisy_blacklist-update.php b/remoting_client/examples/soap-wpisy_blacklist-update.php new file mode 100644 index 000000000..0174a6404 --- /dev/null +++ b/remoting_client/examples/soap-wpisy_blacklist-update.php @@ -0,0 +1,42 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'source' => 'źródło', + 'access' => 'REJECT', + 'type' => 'recipient', + 'active' => 'n'); + + + + $client_id = 0; + $mailuser_id = 2; + $domain_id = $client->mail_wpisy_blacklist_update($session_id, $mailuser_id, $client_id, $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-wpisy_whitelist-add.php b/remoting_client/examples/soap-wpisy_whitelist-add.php new file mode 100644 index 000000000..8df97cc3e --- /dev/null +++ b/remoting_client/examples/soap-wpisy_whitelist-add.php @@ -0,0 +1,40 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'source' => 'źródło', + 'access' => 'OK', + 'type' => 'recipient', + 'active' => 'y'); + + + $client_id = 0; + $domain_id = $client->mail_wpisy_whitelist_add($session_id,$client_id,$params,$domain_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-wpisy_whitelist-delete.php b/remoting_client/examples/soap-wpisy_whitelist-delete.php new file mode 100644 index 000000000..97549c30c --- /dev/null +++ b/remoting_client/examples/soap-wpisy_whitelist-delete.php @@ -0,0 +1,35 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + + $client_id = 0; + $mailuser_id = 1; + $domain__id = $client->mail_wpisy_whitelist_delete($session_id, $mailuser_id); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> diff --git a/remoting_client/examples/soap-wpisy_whitelist-update.php b/remoting_client/examples/soap-wpisy_whitelist-update.php new file mode 100644 index 000000000..9666d1354 --- /dev/null +++ b/remoting_client/examples/soap-wpisy_whitelist-update.php @@ -0,0 +1,42 @@ + $soap_location, + 'uri' => $soap_uri)); + + +try { + if($session_id = $client->login($username,$password)) { + echo 'Zalogowany. Sesja:'.$session_id.'
'; + } + + $params = array( 'server_id' => 1, + 'source' => 'źródło', + 'access' => 'OK', + 'type' => 'recipient', + 'active' => 'n'); + + + + $client_id = 0; + $mailuser_id = 1; + $domain_id = $client->mail_wpisy_whitelist_update($session_id, $mailuser_id, $client_id, $params); + + + + if($client->logout($session_id)) { + echo 'Wylogowany.
'; + } + + +} catch (SoapFault $e) { + die('SOAP Blad: '.$e->getMessage()); +} + +?> -- GitLab