ich habe die remoting.inc.php um eine funktion erweitert, die mir zu einer customer_no die domains ausgibt.
PHP:
public function get_domain_by_customer_no($session_id,$customer_no)
{
global $app;
if(!$this->checkPerm($session_id, 'get_domain_by_customer_no')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$sql = "select d.* from sys_group g left join domain d on g.groupid = d.sys_groupid
left join client c on c.client_id = g.client_id where c.customer_no = $customer_no;";
$result = $app->db->queryAllRecords($sql);
if(isset($result)) {
return $result;
} else {
$this->server->fault('no_client_found', 'There is no site for this user');
return false;
}
}