Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Dirk Dankhoff
ISPConfig 3
Commits
b0e671b0
Commit
b0e671b0
authored
Mar 13, 2012
by
tbrehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added server_ip* functions to remote API.
parent
b086cba3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
interface/lib/classes/remoting.inc.php
interface/lib/classes/remoting.inc.php
+32
-0
interface/web/admin/lib/remote.conf.php
interface/web/admin/lib/remote.conf.php
+1
-1
No files found.
interface/lib/classes/remoting.inc.php
View file @
b0e671b0
...
...
@@ -157,6 +157,38 @@ class remoting {
return
$all
;
}
//* Add a IP address record
public
function
server_ip_add
(
$session_id
,
$client_id
,
$params
)
{
if
(
!
$this
->
checkPerm
(
$session_id
,
'server_ip_add'
))
{
$this
->
server
->
fault
(
'permission_denied'
,
'You do not have the permissions to access this function.'
);
return
false
;
}
return
$this
->
insertQuery
(
'../admin/form/server_ip.tform.php'
,
$client_id
,
$params
);
}
//* Update IP address record
public
function
server_ip_update
(
$session_id
,
$client_id
,
$ip_id
,
$params
)
{
if
(
!
$this
->
checkPerm
(
$session_id
,
'server_ip_update'
))
{
$this
->
server
->
fault
(
'permission_denied'
,
'You do not have the permissions to access this function.'
);
return
false
;
}
$affected_rows
=
$this
->
updateQuery
(
'../admin/form/server_ip.tform.php'
,
$client_id
,
$ip_id
,
$params
);
return
$affected_rows
;
}
//* Delete IP address record
public
function
server_ip_delete
(
$session_id
,
$ip_id
)
{
if
(
!
$this
->
checkPerm
(
$session_id
,
'server_ip_delete'
))
{
$this
->
server
->
fault
(
'permission_denied'
,
'You do not have the permissions to access this function.'
);
return
false
;
}
$affected_rows
=
$this
->
deleteQuery
(
'../admin/form/server_ip.tform.php'
,
$ip_id
);
return
$affected_rows
;
}
//* Get mail domain details
public
function
mail_domain_get
(
$session_id
,
$primary_id
)
{
...
...
interface/web/admin/lib/remote.conf.php
View file @
b0e671b0
<?php
$function_list
[
'server_get,get_function_list,client_templates_get_all,server_get_serverid_by_ip'
]
=
'Server functions'
;
$function_list
[
'server_get,get_function_list,client_templates_get_all,server_get_serverid_by_ip
,server_ip_add,server_ip_update,server_ip_delete
'
]
=
'Server functions'
;
?>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment