Commit 4cd62d78 authored by Falko Timme's avatar Falko Timme

- Remoting: added function to get all IP addresses of a server.

parent d677ffa6
......@@ -331,7 +331,7 @@ class remoting {
return $all;
}
//* Get server ips
//* Get server ip
public function server_ip_get($session_id, $primary_id)
{
global $app;
......@@ -345,6 +345,20 @@ class remoting {
return $app->remoting_lib->getDataRecord($primary_id);
}
//* Get all server ips
public function server_ip_get_by_server_id($session_id, $server_id)
{
global $app;
if(!$this->checkPerm($session_id, 'server_ip_get_by_server_id')) {
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$sql = "SELECT * FROM server_ip WHERE server_id = $server_id";
$all = $app->db->queryAllRecords($sql);
return $all;
}
//* Add a IP address record
public function server_ip_add($session_id, $client_id, $params)
{
......
<?php
$function_list['server_get,get_function_list,client_templates_get_all,server_get_serverid_by_ip,server_ip_get,server_ip_add,server_ip_update,server_ip_delete'] = 'Server functions';
$function_list['server_get,get_function_list,client_templates_get_all,server_get_serverid_by_ip,server_ip_get,server_ip_get_by_server_id,server_ip_add,server_ip_update,server_ip_delete'] = 'Server functions';
$function_list['admin_record_permissions'] = 'Record permission changes';
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment