Commit 0bd7ce05 authored by RemyD's avatar RemyD

Fix Change customer

parent f63a7103
......@@ -374,9 +374,19 @@ class page_action extends tform_actions {
// close Session and get all message
$mess = $vmQuery->GetMessage();
$vmQuery->logout();
if ($_REQUEST['method']=="perms") { $act='OWNER';} else { $act =$_REQUEST['act'];}
// $sql = 'UPDATE hosted SET hosted.status_vmw=9, hosted.task_run=1 WHERE hosted.vmid="'.$vmid.'"';
//$app->db->query($sql);
if ($_REQUEST['method']=="perms") {
$act='OWNER';
$sql = 'UPDATE hosted SET hosted.sys_groupid=' . $_REQUEST['sys_groupid'] . ' WHERE hosted.vmid="'.$vmid.'"';
//$debugmessage = print_r($_REQUEST);
//$app->error($sql. "<br>");
$app->db->query($sql);
}
else
{
$act =$_REQUEST['act'];
}
// $sql = 'UPDATE hosted SET hosted.status_vmw=9, hosted.task_run=1 WHERE hosted.vmid="'.$vmid.'"';
$sql="Insert into hosted_log ( clientType,action,ip,domain,ua,target,ts,sys_groupid,sys_perm_group,script) values ('".$_SESSION["s"]["user"]["typ"]."',";
$sql.="'" .$act."','".$_SERVER['REMOTE_ADDR'] ."','".$domain."','".$_SERVER["HTTP_USER_AGENT"] ."','".$vm['vmname']."',now(),'". $_SESSION["s"]["user"] ."','r','".$mess."')";
$app->db->query($sql);
......
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