summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/propiedades
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
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')
-rw-r--r--admin/WebConsole/propiedades/propiedades_aulas.php81
-rw-r--r--admin/WebConsole/propiedades/propiedades_ordenadores.php51
2 files changed, 132 insertions, 0 deletions
diff --git a/admin/WebConsole/propiedades/propiedades_aulas.php b/admin/WebConsole/propiedades/propiedades_aulas.php
index fbac1acc..dea0c63c 100644
--- a/admin/WebConsole/propiedades/propiedades_aulas.php
+++ b/admin/WebConsole/propiedades/propiedades_aulas.php
@@ -397,6 +397,87 @@ function abrir_ventana(URL){
echo '<TD colspan=3>'.HTMLSELECT($cmd,$idcentro,'repositorios',$idrepositorio,'idrepositorio','nombrerepositorio',330).'</TD>';
?>
</TR>
+<!---- AGP ------------------------------------------------------------------------------- OGLIVE --------------------------------------------------------------------------------------------------------->
+ <TR>
+ <th align=center>&nbsp;<?echo $TbMsg[33]?>&nbsp;</th>
+<?php
+// Comprobamos si todos los ordenadores tienen el mismo ogLives
+$cmd->texto="SELECT oglivedir,nombreordenador FROM ordenadores WHERE idaula=".$idaula." GROUP BY oglivedir";
+$rs=new Recordset;
+$rs->Comando=&$cmd;
+if (!$rs->Abrir()) return(true); // Error al abrir recordset
+$rs->Primero();
+$cont=0;
+ while (!$rs->EOF){
+ $bdordnombreordenador[]=$rs->campos["nombreordenador"];
+ $bdordoglivedir[]=$rs->campos["oglivedir"];
+ $cont++;
+ $rs->Siguiente();
+ }
+$rs->Cerrar();
+
+
+// Consultamos la tabla aulas
+$cmd->texto="SELECT * FROM aulas WHERE idaula=".$idaula;
+$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/ogcliaula.txt");
+$listogcli=shell_exec($ogcli);
+$listogcli=shell_exec("cat /opt/opengnsys/www/tmp/ogcliaula.txt");
+//$listogcli=split(" ",$listogcli);
+
+echo '<TD colspan=3><select class="formulariodatos" name="seleoglive" style="width:330">'."\n";
+echo '<option value="ogLive">ogLive (por defecto)</option>';
+$num=0;
+
+// Apertura y lectura de fichero
+$file = fopen("/opt/opengnsys/www/tmp/ogcliaula.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);
+/////////////////////////////////
+if ($cont >1){
+ echo ' </select><br><font color=red><strong>'.$TbMsg[34]."&nbsp;&nbsp;&nbsp;==></strong></font>\n &nbsp;&nbsp;";
+ $i=0;
+ echo '<select>';
+ foreach ($bdordnombreordenador as $datos) {
+ if ($bdogLive != $bdordoglivedir[$i]){
+ echo '<option>'.$bdordnombreordenador[$i].'</option>';
+ }
+ $i++;
+ }
+ echo '</select>';
+}else{
+ echo ' </select>'."\n";
+ }
+ }
+?>
+ </TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
<TH align=center>&nbsp;<?echo $TbMsg[20]?>&nbsp;</TH>
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>