|
|
@@ -370,7 +370,7 @@ class page_action extends tform_actions { |
|
|
//añado database user con su prefix |
|
|
//añado database user con su prefix |
|
|
$db_user_params = array( |
|
|
$db_user_params = array( |
|
|
'server_id' => $this->bbdd_serv, |
|
|
'server_id' => $this->bbdd_serv, |
|
|
'sysgroup_id' => $this->sys_grupo_id, |
|
|
|
|
|
|
|
|
'sysgroup_id' => $this->cli_grupo_id,//$this->sys_grupo_id, |
|
|
'sys_userid' => $this->sys_usuario_id, |
|
|
'sys_userid' => $this->sys_usuario_id, |
|
|
'sys_perm_other' => '-', |
|
|
'sys_perm_other' => '-', |
|
|
'database_user' => $generated_usernameBBDD, |
|
|
'database_user' => $generated_usernameBBDD, |
|
|
@@ -402,7 +402,7 @@ class page_action extends tform_actions { |
|
|
// add database |
|
|
// add database |
|
|
$paramsBD = array( |
|
|
$paramsBD = array( |
|
|
'server_id' => $this->bbdd_serv, //$camDnsRR['server_id'], |
|
|
'server_id' => $this->bbdd_serv, //$camDnsRR['server_id'], |
|
|
'sysgroup_id' => $this->sys_grupo_id, //$fields['client_group_id'], |
|
|
|
|
|
|
|
|
'sysgroup_id' => $this->cli_grupo_id,//$this->sys_grupo_id, //$fields['client_group_id'], |
|
|
'parent_domain_id' => $sitio_id['domain_id'], |
|
|
'parent_domain_id' => $sitio_id['domain_id'], |
|
|
'type' => 'mysql', |
|
|
'type' => 'mysql', |
|
|
'database_quota' => '-1', |
|
|
'database_quota' => '-1', |
|
|
@@ -418,7 +418,7 @@ class page_action extends tform_actions { |
|
|
|
|
|
|
|
|
$this->nombre_db_txt = $paramsBD['database_name']; |
|
|
$this->nombre_db_txt = $paramsBD['database_name']; |
|
|
|
|
|
|
|
|
$db_id = $remoto->sites_database_add($this->cli_id,/*$fields['client_group_id'],*/ $paramsBD); |
|
|
|
|
|
|
|
|
$db_id = $remoto->sites_database_add($this->cli_grupo_id, /*$this->cli_id,*//*$fields['client_group_id'],*/ $paramsBD); |
|
|
|
|
|
|
|
|
$this->urlBBDD($db_id, $this->bbdd_serv); |
|
|
$this->urlBBDD($db_id, $this->bbdd_serv); |
|
|
//echo('Id de la BBDD ' . $db_id); |
|
|
//echo('Id de la BBDD ' . $db_id); |
|
|
@@ -580,7 +580,8 @@ class page_action extends tform_actions { |
|
|
$this->cli_id = $_SESSION["s"]["user"]["client_id"]; |
|
|
$this->cli_id = $_SESSION["s"]["user"]["client_id"]; |
|
|
$this->cli_grupo_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
|
|
$this->cli_grupo_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
|
|
$this->sys_usuario_id = $_SESSION["s"]["user"]["sys_userid"]; |
|
|
$this->sys_usuario_id = $_SESSION["s"]["user"]["sys_userid"]; |
|
|
$this->sys_grupo_id = $_SESSION["s"]["user"]["sys_groupid"]; |
|
|
|
|
|
|
|
|
$this->sys_grupo_id = $this->cli_grupo_id;//$_SESSION["s"]["user"]["sys_groupid"]; |
|
|
|
|
|
echo(' cli_id ' . $this->cli_id . ' cli_grupo_id ' . $this->cli_grupo_id . ' sys_usuario ' . $this->sys_usuario_id . ' sys_grupo ' . $this->sys_grupo_id); |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
//Captura de los distintos ids del cliente y usuario de sistema. |
|
|
//Captura de los distintos ids del cliente y usuario de sistema. |
|
|
@@ -589,10 +590,9 @@ class page_action extends tform_actions { |
|
|
if($fields['client_group_id']==0) { |
|
|
if($fields['client_group_id']==0) { |
|
|
//En la tabla sys_user el client_id 0 es admin. En sys_group este valor es 0 |
|
|
//En la tabla sys_user el client_id 0 es admin. En sys_group este valor es 0 |
|
|
$this->cli_id = 0; |
|
|
$this->cli_id = 0; |
|
|
//En la tabla dns_soa y dns_rr se guarda el valor 0 en sys_groupid cuando es admin.NO ESTO NO ES ASÍ |
|
|
|
|
|
$this->cli_grupo_id = 1; |
|
|
$this->cli_grupo_id = 1; |
|
|
$this->sys_usuario_id = 1;//$this->cli_id; |
|
|
$this->sys_usuario_id = 1;//$this->cli_id; |
|
|
$this->sys_grupo_id = 0;//$this->cli_grupo_id; |
|
|
|
|
|
|
|
|
$this->sys_grupo_id = 0; //$this->cli_grupo_id;//0 |
|
|
}else{ |
|
|
}else{ |
|
|
$client = $app->db->queryOneRecord( |
|
|
$client = $app->db->queryOneRecord( |
|
|
'SELECT sys_user.sys_userid, sys_user.sys_groupid, sys_user.default_group, sys_user.client_id |
|
|
'SELECT sys_user.sys_userid, sys_user.sys_groupid, sys_user.default_group, sys_user.client_id |
|
|
@@ -602,11 +602,11 @@ class page_action extends tform_actions { |
|
|
$this->cli_id = $client['client_id']; |
|
|
$this->cli_id = $client['client_id']; |
|
|
$this->cli_grupo_id = $client['default_group']; |
|
|
$this->cli_grupo_id = $client['default_group']; |
|
|
$this->sys_usuario_id = $client['sys_userid']; |
|
|
$this->sys_usuario_id = $client['sys_userid']; |
|
|
$this->sys_grupo_id = $client['sys_groupid']; |
|
|
|
|
|
|
|
|
$this->sys_grupo_id = $client['client_id'];//$client['default_group'];//$client['sys_groupid']; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
//print "<pre>Valores : "; print_r($this->cli_id); print "</pre>\n"; |
|
|
//print "<pre>Valores : "; print_r($this->cli_id); print "</pre>\n"; |
|
|
//print "Valores " . $this->cli_id . ' ' . $this->cli_grupo_id . ' ' . $this->sys_usuario_id . ' ' . $this->sys_grupo_id; |
|
|
|
|
|
|
|
|
print " cli_id " . $this->cli_id . ' cli_grupo ' . $this->cli_grupo_id . ' sys_usuario ' . $this->sys_usuario_id . ' sys grupo ' . $this->sys_grupo_id; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -678,7 +678,7 @@ class page_action extends tform_actions { |
|
|
return $this->subdom_error; |
|
|
return $this->subdom_error; |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
//Parametros para la creación de subdominios |
|
|
|
|
|
|
|
|
//Parametros para la creación de subdominios |
|
|
$paramSubDominios = array( |
|
|
$paramSubDominios = array( |
|
|
'server_id' => $camDnsRR['server_id'], |
|
|
'server_id' => $camDnsRR['server_id'], |
|
|
'zone' => $camDnsRR['zone'], |
|
|
'zone' => $camDnsRR['zone'], |
|
|
@@ -1770,7 +1770,7 @@ $page = new page_action; |
|
|
$page->onLoad(); |
|
|
$page->onLoad(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//IMPORTENTE, es necesario estas lÃneas para que el botón del pdf funcione. Activa el javascript |
|
|
|
|
|
|
|
|
//IMPORTENTE, es necesario estas líneas para que el botón del pdf funcione. Activa el javascript |
|
|
//echo '<script type="text/javascript">'; |
|
|
//echo '<script type="text/javascript">'; |
|
|
//echo 'alert (password(7, false, 1));'; |
|
|
//echo 'alert (password(7, false, 1));'; |
|
|
//echo '</script>'; |
|
|
//echo '</script>'; |
|
|
@@ -1778,7 +1778,7 @@ $page->onLoad(); |
|
|
|
|
|
|
|
|
?> |
|
|
?> |
|
|
|
|
|
|
|
|
<!--IMPORTENTE, es necesario estas lÃneas para que el botón del pdf funcione. Activa el javascript --> |
|
|
|
|
|
|
|
|
<!--IMPORTENTE, es necesario estas líneas para que el botón del pdf funcione. Activa el javascript --> |
|
|
<script type="text/javascript"> |
|
|
<script type="text/javascript"> |
|
|
|
|
|
|
|
|
/*var test = "PARALACLAVE"; |
|
|
/*var test = "PARALACLAVE"; |
|
|
|