source: admin/WebConsole/asistentes/AsistenteParticionado.php @ fa0bb7d

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since fa0bb7d was 865c207, checked in by ramon <ramongomez@…>, 7 years ago

#767 #730: Solucionar problema al tomar tamaño de disco en aulas (corrección cláusulas GROUP BY en MySQL 5.7).

git-svn-id: https://opengnsys.es/svn/branches/version1.1@5551 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100644
File size: 7.2 KB
Line 
1<?php
2// *************************************************************************************************************************************************
3// Aplicacion WEB: ogAdmWebCon
4// Autor: Antonio J. Doblas Viso
5// Baso en Codigo  Comando.php de : Jose Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
6//      Xajax
7// version 1.1: Se incluye aviso para particiones GTP.
8// autor: Irina Gomez, ETSII Universidad de Sevilla
9// fecha: 2016-06-21
10// *************************************************************************************************************************************************
11
12
13require_once('xajax.common.php');
14//Haciendo referencia a las funciones registradas y que seran interpretadas como funciones javascript
15
16
17
18/********HACIENDO CONSULTA A LA TABLA ordenadores***********/
19include_once("../includes/ctrlacc.php");
20include_once("../clases/AdoPhp.php");
21include_once("../includes/constantes.php");
22include_once("../includes/comunes.php");
23include_once("../includes/CreaComando.php");
24include_once("../includes/HTMLSELECT.php");
25include_once("../idiomas/php/".$idioma."/comandos/ejecutarscripts_".$idioma.".php");
26include_once("../idiomas/php/".$idioma."/configuraciones_".$idioma.".php");
27include_once("../idiomas/php/".$idioma."/comandos/opcionesacciones_".$idioma.".php");
28include_once("../idiomas/php/".$idioma."/avisos_".$idioma.".php");
29include_once("../includes/HTMLCTESELECT.php");
30include_once("../includes/TomaDato.php");
31include_once("../includes/ConfiguracionesParticiones.php");
32include_once("../includes/RecopilaIpesMacs.php");
33
34 include_once("./includes/asistentes/AyudanteFormularios.php");
35
36
37//________________________________________________________________________________________________________
38include_once("./includes/capturaacciones.php");
39//________________________________________________________________________________________________________
40//________________________________________________________________________________________________________
41$cmd=CreaComando($cadenaconexion);
42if (!$cmd)
43        Header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D.
44//________________________________________________________________________________________________________
45
46?>
47<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
48<html>
49<head>
50<title> Administración web de aulas </title>
51<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
52        <LINK rel="stylesheet" type="text/css" href="../estilos.css">
53        <SCRIPT language="javascript" src="./jscripts/EjecutarScripts.js"></SCRIPT>
54        <SCRIPT language="javascript" src="../comandos/jscripts/comunescomandos.js"></SCRIPT>
55        <SCRIPT language="javascript" src="./jscripts/asistentes.js"></SCRIPT>
56        <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/ejecutarscripts_'.$idioma.'.js"></SCRIPT>'?>
57        <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
58        <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/asistentes_'.$idioma.'.js"></SCRIPT>'?>
59
60
61<?php
62//indicamos al objeto xajax se encargue de generar el javascript de las funciones registradas por ejm: ListarParticionesXip
63$xajax->printJavascript('../xajax/');
64?>
65<script>
66function doOnload(){
67        calculateFreeDisk(document.fdatos);
68        getMaxCacheSize();
69}
70
71</script>
72</head>
73
74
75<body onload="doOnload()">
76<?php
77        switch($ambito){
78                case $AMBITO_CENTROS :
79                        $urlimg='../images/iconos/centros.gif';
80                        $textambito=$TbMsg[0];
81                        break;
82                case $AMBITO_GRUPOSAULAS :
83                        $urlimg='../images/iconos/carpeta.gif';
84                        $textambito=$TbMsg[1];
85                        break;
86                case $AMBITO_AULAS :
87                        $urlimg='../images/iconos/aula.gif';
88                        $textambito=$TbMsg[2];
89                        if (isset($_GET["idambito"])) $idambito=$_GET["idambito"];
90                        break;
91                case $AMBITO_GRUPOSORDENADORES :
92                        $urlimg='../images/iconos/carpeta.gif';
93                        $textambito=$TbMsg[3];
94                        break;
95                case $AMBITO_ORDENADORES :
96                        $urlimg='../images/iconos/ordenador.gif';
97                        $textambito=$TbMsg[4];
98                        break;
99        }
100       
101        echo '<p align=center><span class=cabeceras>'.$descricomando.'&nbsp;</span><br>';
102        echo '<IMG src="'.$urlimg.'">&nbsp;&nbsp;<span align=center class=subcabeceras><U>'.$TbMsg[1].'
103                        : '.$textambito.'</U></span>&nbsp;&nbsp;</span></p>';
104
105        $sws=bindec('0x11111'); // Mostrar todas las configuraciones diferentes.
106        $configuraciones = pintaConfiguraciones($cmd,$idambito,$ambito,7,$sws,false);
107        global $tbKeys; // Tabla contenedora de claves de configuración
108        global $conKeys; // Contador de claves de configuración
109        // numero de discos minimo: partimos de un valor alto y comparamos con la configuracion de cada pc.
110        $mindisks = 10;
111        foreach($configuraciones as $configuracion){
112                // Separamos las configuraciones segun el disco al que pertenezcan
113                $diskConfigs = splitConfigurationsByDisk($configuracion);
114                // En diskconfigs tendremos un array con tantas configuraciones como discos,
115                // no quedamos con su length que será el numero de discos
116                $aux = count($diskConfigs);
117                if ( $mindisks > $aux )
118                         $mindisks = $aux;
119        }       
120?>
121
122        <form  align=center name="fdatos" >
123
124                <table class="tabla_datos">
125                <tr>
126                <td>
127                        <?php echo $TbMsg[35].":\n";    // Disco ?>
128                        <select id="n_disk" onchange="calculateFreeDisk(document.fdatos)">
129                        <?php   for($d = 1; $d <= $mindisks; $d++){
130                                        echo "<option value=\"$d\">$d</option>\n";
131                                } ?>
132                        </select>
133                </td>
134                </tr>
135                <tr>
136                <td>
137                        <?php echo $TbMsg["CONFIG_PARTTABLE"].":\n"; ?>
138                        <select name="tipo_part_table" id="tipo_part_table" onchange="showPartitionForm(this.value)">
139                                <option value="MSDOS">MSDOS</option>
140                                <option value="GPT">GPT</option>
141                        </select>
142                </td>
143                </tr>
144                </table>
145                <div id="formMSDOS">
146                        <table class="tabla_datos" border="0" cellpadding="0" cellspacing="1">
147                                <?php include_once("includes/asistentes/formParticionado_msdos.php");?>
148                        </table>
149                </div>
150                <div id="formGPT" style="display:none">
151                        <table class="tabla_datos" border="0" cellpadding="0" cellspacing="1">
152                                <?php include_once("includes/asistentes/formParticionado_gpt.php");?>
153                        </table>
154                </div>
155                <table class="tabla_datos">             
156                        <tr>
157                                <th><input type="button" name="GenerarInstruccion" Value="<?php echo $TbMsg[41];?>" onclick="codeParticionado(this.form)" /> </th>
158                                <td colspan="2"><textarea class="cajatexto" name="codigo" id="codigo" cols="70" rows="7"></textarea></td>
159                        </tr>
160                        <tr> <th colspan="3"><?php echo $TbMsg["WARN_DISKSIZE"]; ?></th> </tr>
161                        <tr> <th colspan="3"><?php echo $TbMsg["WARN_REBOOTAFTER"]; ?></th> </tr>
162                        <tr id="warngpt" style="display:none">
163                                <th colspan="3" ><?php echo $TbMsg["WARN_GPT"]; ?></th>
164                        </tr>
165                </table>
166        </form>
167
168<?php
169        //________________________________________________________________________________________________________
170        include_once("./includes/formularioacciones.php");
171        //________________________________________________________________________________________________________
172        //________________________________________________________________________________________________________
173        include_once("./includes/opcionesacciones.php");
174        //________________________________________________________________________________________________________
175
176?>
177
178
179</body>
180</html>
181
Note: See TracBrowser for help on using the repository browser.