summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/propiedades/propiedades_ordenadores.php
diff options
context:
space:
mode:
authoralbertogp <albertogp@uma.es>2017-06-07 11:59:56 +0000
committeralbertogp <albertogp@uma.es>2017-06-07 11:59:56 +0000
commit90c670e37f64fb7c3caea82148a675be8fa45bf4 (patch)
tree738cad869cbe05a4a3e23d3bf963b6c6e35f0f10 /admin/WebConsole/propiedades/propiedades_ordenadores.php
parentd13a559a2f7ff44357750b0e02faf24dd4842956 (diff)
#768
Introducir cambios en la consola web para gestionar multiples ogLives git-svn-id: https://opengnsys.es/svn/branches/version1.1@5350 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/propiedades/propiedades_ordenadores.php')
-rw-r--r--admin/WebConsole/propiedades/propiedades_ordenadores.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/admin/WebConsole/propiedades/propiedades_ordenadores.php b/admin/WebConsole/propiedades/propiedades_ordenadores.php
index 033c6218..7c746f89 100644
--- a/admin/WebConsole/propiedades/propiedades_ordenadores.php
+++ b/admin/WebConsole/propiedades/propiedades_ordenadores.php
@@ -193,6 +193,57 @@ function abrir_ventana(URL){
echo '<TD colspan=3>'.HTMLSELECT($cmd,$idcentro,'repositorios',$idrepositorio,'idrepositorio','nombrerepositorio',250).'</TD>';
?>
</TR>
+<!---- AGP -------------------------------------------------------------------- OGLIVE --------------------------------------------------------------------------------------------------------->
+ <TR>
+ <th align=center>&nbsp;<?echo $TbMsg[18]?>&nbsp;</th>
+<?php
+$cmd->texto="SELECT * FROM ordenadores WHERE idordenador=".$idordenador;
+$rs=new Recordset;
+$rs->Comando=&$cmd;
+if (!$rs->Abrir()) return(true); // Error al abrir recordset
+$rs->Primero();
+ if (!$rs->EOF){
+ $bdogLive=$rs->campos["oglivedir"];
+ }
+$rs->Cerrar();
+
+ if ($opcion==$op_eliminacion){
+ echo '<td colspan="3">'.$bdogLive.'</td>';
+ }else{
+
+$ogcli=("bash /opt/opengnsys/bin/oglivecli list > /opt/opengnsys/www/tmp/ogcliordenador.txt");
+$listogcli=shell_exec($ogcli);
+$listogcli=shell_exec("cat /opt/opengnsys/www/tmp/ogcliordenador.txt");
+//$listogcli=split(" ",$listogcli);
+
+echo '<TD colspan=3><select class="formulariodatos" name="seleoglive" style=width:250>'."\n";
+echo '<option value="ogLive">ogLive (por defecto)</option>';
+$num=0;
+
+// Apertura y lectura de fichero
+$file = fopen("/opt/opengnsys/www/tmp/ogcliordenador.txt", "r") or exit("Unable to open file!");
+//Output a line of the file until the end is reached
+while(!feof($file))
+{
+ $oglive=fgets($file);
+ if (ereg("ogLive",$oglive)){
+ $oglive=substr($oglive,1);
+ $oglive=trim($oglive);
+ //echo '<option value="'.$oglilve.'">'.$oglive.'</option>';
+ $Selectcli="";
+ $Selectcli.= '<option value="'.$oglive.'"';
+ If ($bdogLive==$oglive) $Selectcli.= ' selected ' ;
+ $Selectcli.= '>'.$oglive.'</OPTION>';
+ echo $Selectcli;
+ }
+$num++;
+}
+fclose($file);
+/////////////////////////////////
+echo ' </select>'."\n";
+ }
+?>
+ </TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
<th align=center>&nbsp;<?echo $TbMsg[11]?>&nbsp;</th>