diff options
author | ramon <ramongomez@us.es> | 2017-12-18 10:42:39 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2017-12-18 10:42:39 +0000 |
commit | ac6ed4b5c105855797477cc77203ba3b4700d60f (patch) | |
tree | e90a4e6bfba25a14e216c2e5b0e019a24466bf71 /admin/WebConsole | |
parent | 3bf09ba36ef87167703b79d56c330c979fd1302c (diff) |
#768: Corregir errata al listar clientes ogLive disponibles en propiedades de ordenador.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5537 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole')
-rw-r--r-- | admin/WebConsole/propiedades/propiedades_ordenadores.php | 55 |
1 files changed, 19 insertions, 36 deletions
diff --git a/admin/WebConsole/propiedades/propiedades_ordenadores.php b/admin/WebConsole/propiedades/propiedades_ordenadores.php index 9dc3de51..57444a16 100644 --- a/admin/WebConsole/propiedades/propiedades_ordenadores.php +++ b/admin/WebConsole/propiedades/propiedades_ordenadores.php @@ -202,46 +202,29 @@ $rs=new Recordset; $rs->Comando=&$cmd; if (!$rs->Abrir()) return(true); // Error al abrir recordset $rs->Primero(); - if (!$rs->EOF){ - $bdogLive=$rs->campos["oglivedir"]; - } +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">'.$TbMsg['COMM_DEFOGLIVE'].'</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; +if ($opcion==$op_eliminacion){ + echo '<td colspan="3">'.$bdogLive.'</td>'; +}else{ + exec("bash /opt/opengnsys/bin/oglivecli list", $listogcli); + echo '<TD colspan=3><select class="formulariodatos" name="seleoglive" style=width:250>'."\n"; + echo '<option value="ogLive">'.$TbMsg['COMM_DEFOGLIVE'].'</option>'; + foreach ($listogcli as $oglive) { + if (preg_match("/ogLive/",$oglive)){ + $oglive=substr($oglive,1); + $oglive=trim($oglive); + $Selectcli = '<option value="'.$oglive.'"'; + If ($bdogLive==$oglive) $Selectcli.= ' selected ' ; + $Selectcli.= '>'.$oglive.'</OPTION>'; + echo $Selectcli; + } } -$num++; + echo ' </select>'."\n"; } -fclose($file); -///////////////////////////////// -echo ' </select>'."\n"; - } ?> </TR> <!-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> |