From: Myrna Degano Date: Wed, 1 Oct 2003 17:30:11 +0000 (+0000) Subject: Servicios - Brigada de Evacuación. X-Git-Tag: svn_import~139 X-Git-Url: https://git.llucax.com/mecon/intranet.git/commitdiff_plain/e9fe07ddc9387291868bf5b41a9783a44432eacd?ds=inline Servicios - Brigada de Evacuación. Planos de los pisos. --- diff --git a/sistema/www/css/servicios_brigada.css b/sistema/www/css/servicios_brigada.css new file mode 100644 index 0000000..d713ccc --- /dev/null +++ b/sistema/www/css/servicios_brigada.css @@ -0,0 +1,4 @@ + +.txt_chicoiz { FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 8pt; font-style: normal; line-height: normal; vertical-align: middle; font-weight: normal } +.txt_chicoder { FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 8pt; font-style: normal; line-height: normal; vertical-align: middle; font-weight: normal } +.txt_naranja { COLOR: #FF6600; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 9pt; font-style: normal; line-height: normal; font-weight: bold} diff --git a/sistema/www/servicios/brigada/brigada.php b/sistema/www/servicios/brigada/brigada.php new file mode 100644 index 0000000..60a44d5 --- /dev/null +++ b/sistema/www/servicios/brigada/brigada.php @@ -0,0 +1,142 @@ + +------------------------------------------------------------------------------*/ + +require_once 'BRIGADA/Brigadista.php'; +require_once 'BRIGADA/Edificio.php'; +require_once 'BRIGADA/Piso.php'; +require_once 'HTML/Table.php'; +require_once 'MECON/HTML/Link.php'; +require_once 'MECON/HTML/Tabla.php'; +require_once '../../../local_lib/HTML_DietMarco.php'; +require_once 'MECON/HTML/Image.php'; +require_once 'DB.php'; + + +//Conexión a la BD +$dbh = DB::connect("mysql://intranet:intranet@intranet-db/BRIGADA", true); +if (DB::isError($dbh)) { + die ($dbh->getMessage()); +} + +//Marco de servicios en intranet +$MARCO = new HTML_DietMarco('servicios', 'Servicios'); +$MARCO->addTitle('Brigada de Evacuación ante Emergencias'); +$MARCO->addStyleSheet('../../css/servicios_brigada.css'); + + +//Listado de edificios +$edificios = BRIGADA_Edificio::obtenerEdificios($dbh); +$filas_edificios = array_chunk($edificios, 3, TRUE); + +$TABLA_Edificios =& new MECON_HTML_Tabla('width="600"', 'oscuro'); +$TABLA_Edificios->addRow(array('Edificios'), 'cabecera colspan="3"'); +$attrs = 'comun width="200"'; + +foreach ($filas_edificios AS $fila){ + $fila_tabla = NULL; + $i=0; + foreach ($fila AS $key=>$value){ + if (isset($_GET['Edif']) and $_GET['Edif'] == $key){ + //Resaltar el edificio + $fila_tabla[] = $value; + $resaltar['fila'] = $TABLA_Edificios->getRowCount(); + $resaltar['columna'] = $i; + } + else{ + //Link al edificio + $LINK_Edificio =& new MECON_HTML_Link('./brigada.php', $value, array('Edif'=>$key)); + $fila_tabla[] = $LINK_Edificio->toHtml(); + } + $i++; + } + $TABLA_Edificios->addRow($fila_tabla, $attrs); +} + +if(isset($resaltar)){ + $TABLA_Edificios->updateCellAttributes($resaltar['fila'], $resaltar['columna'], 'class="txt_naranja"'); +} + +$MARCO->addBodyContent('
'); +$MARCO->addBodyContent($TABLA_Edificios); + + +if (isset($_GET['Edif'])){ + //Mostrar los pisos del edificio pedido + $pisos = BRIGADA_Piso::obtenerPisos($dbh, $_GET['Edif']); + $filas_pisos = array_chunk($pisos, 8, TRUE); + $attrs = 'comun align="center"'; + + $TABLA_Pisos =& new MECON_HTML_Tabla('width="600"', 'oscuro'); + $TABLA_Pisos->addRow(array('Pisos'), 'cabecera'); + + foreach ($filas_pisos AS $fila){ + $fila_tabla = NULL; + $i=0; + foreach ($fila AS $key=>$value){ + if (isset($_GET['Piso']) and $_GET['Piso'] == $key){ + //Resaltar el piso + $fila_tabla[] = $value; + $resaltar2['fila'] = $TABLA_Pisos->getRowCount(); + $resaltar2['columna'] = $i; + } + else{ + //Link al piso + $LINK_Piso =& new MECON_HTML_Link('./brigada.php', $value, array('Edif'=>$_GET['Edif'], 'Piso'=>$key)); + $fila_tabla[] = $LINK_Piso->toHtml(); + } + $i++; + } + $TABLA_Pisos->addRow($fila_tabla, $attrs); + } + + $attrs = 'colspan ="'.$TABLA_Pisos->getColCount().'"'; + $TABLA_Pisos->updateCellAttributes(0, 0, $attrs); + + if(isset($resaltar2)){ + $TABLA_Pisos->updateCellAttributes($resaltar2['fila'], $resaltar2['columna'], 'class="txt_naranja"'); + } + + $MARCO->addBodyContent('
'); + $MARCO->addBodyContent($TABLA_Pisos); +} + +if (isset($_GET['Piso'])){ + //Mostrar el listado de brigadistas + $brigadistas = BRIGADA_Brigadista::obtenerBrigadistas($dbh, $_GET['Edif'], $_GET['Piso']); + + $TABLA_Brigadistas =& new MECON_HTML_Tabla('width="600"', 'oscuro'); + $TABLA_Brigadistas->addRow(array('Datos de los brigadistas'), 'cabecera colspan="4"'); + $TABLA_Brigadistas->addRow(array('Nombre', 'Rol de Evacuación', 'Oficina', 'Interno'), 'titulo'); + + foreach ($brigadistas AS $item){ + $TABLA_Brigadistas->addRow(array($item[0], $item[1], $item[2], $item[3]), 'comun'); + } + + + $TABLA_Pie =& new HTML_Table('width="600" align="center"'); + + $IMG_Normas =&new MECON_HTML_Image('/MECON/images/general_nuevo.gif', '=>'); + $IMG_Plano =&new MECON_HTML_Image('/MECON/images/general_posterior.gif', '->'); + + $LINK_Normas =&new MECON_HTML_Link('#', 'Normas y Procedimientos - Evacuación'); + $popup = "window.open('./plano.php?Edif=".$_GET['Edif']."&Piso=".$_GET['Piso']."','plano','scrollbars=yes,width=670,height=505,screenX=10,screenY=10');return(false);"; + $LINK_Plano =&new MECON_HTML_Link('', 'Plano del piso', array(), array('onClick'=>$popup)); + + $TABLA_Pie->addRow(array($IMG_Normas->toHtml(), $LINK_Normas->toHtml(), + $LINK_Plano->toHtml(), $IMG_Plano->toHtml()), 'width="24"'); + $TABLA_Pie->updateColAttributes(1, 'align="left" width="276" class="txt_chicoiz"'); + $TABLA_Pie->updateColAttributes(2, 'align="right" width="276" class="txt_chicoder"'); + + $MARCO->addBodyContent('
'); + $MARCO->addBodyContent($TABLA_Brigadistas); + $MARCO->addBodyContent('

'); + $MARCO->addBodyContent($TABLA_Pie); +} + +$MARCO->display(); +?> diff --git a/sistema/www/servicios/brigada/plano.php b/sistema/www/servicios/brigada/plano.php new file mode 100644 index 0000000..6b6aa09 --- /dev/null +++ b/sistema/www/servicios/brigada/plano.php @@ -0,0 +1,33 @@ + +------------------------------------------------------------------------------*/ + +require_once 'MECON/HTML/Image.php'; +require_once 'HTML/Table.php'; + + +$plano = $_GET['Edif'].'_'.$_GET['Piso']; +$ls = `ls ./planos/`; +$planos = split(".jpg", $ls); + +$error=1; +foreach ($planos as $item){ + if (trim($item) == $plano){ + $error=0; + } +} +if ($error){ + $plano='no_disponible'; +} + +$src = './planos/'.$plano.'.jpg'; +$IMG_Plano =& new MECON_HTML_Image($src, 'Plano del Piso'); +$TABLA =& new HTML_Table(array('width'=>'100%', 'height'=>'100%', 'align'=>'left', 'border'=>'0')); +$TABLA->addRow(array($IMG_Plano->toHtml()), array('align'=>'center')); + +$TABLA->display(); +?> diff --git a/sistema/www/servicios/brigada/planos/1_-1.0.jpg b/sistema/www/servicios/brigada/planos/1_-1.0.jpg new file mode 100644 index 0000000..a06b684 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_-1.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_-2.0.jpg b/sistema/www/servicios/brigada/planos/1_-2.0.jpg new file mode 100644 index 0000000..f64f771 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_-2.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_1.0.jpg b/sistema/www/servicios/brigada/planos/1_1.0.jpg new file mode 100644 index 0000000..528de4d Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_1.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_10.0.jpg b/sistema/www/servicios/brigada/planos/1_10.0.jpg new file mode 100644 index 0000000..9a8bf62 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_10.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_11.0.jpg b/sistema/www/servicios/brigada/planos/1_11.0.jpg new file mode 100644 index 0000000..76cd8f0 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_11.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_12.0.jpg b/sistema/www/servicios/brigada/planos/1_12.0.jpg new file mode 100644 index 0000000..ec70f43 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_12.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_13.0.jpg b/sistema/www/servicios/brigada/planos/1_13.0.jpg new file mode 100644 index 0000000..1ff7501 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_13.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_14.0.jpg b/sistema/www/servicios/brigada/planos/1_14.0.jpg new file mode 100644 index 0000000..dcdfc28 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_14.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_2.0.jpg b/sistema/www/servicios/brigada/planos/1_2.0.jpg new file mode 100644 index 0000000..ba00e44 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_2.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_3.0.jpg b/sistema/www/servicios/brigada/planos/1_3.0.jpg new file mode 100644 index 0000000..609938c Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_3.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_4.0.jpg b/sistema/www/servicios/brigada/planos/1_4.0.jpg new file mode 100644 index 0000000..5ea44dc Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_4.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_5.0.jpg b/sistema/www/servicios/brigada/planos/1_5.0.jpg new file mode 100644 index 0000000..89ae19f Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_5.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_6.0.jpg b/sistema/www/servicios/brigada/planos/1_6.0.jpg new file mode 100644 index 0000000..dcb79f3 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_6.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_7.0.jpg b/sistema/www/servicios/brigada/planos/1_7.0.jpg new file mode 100644 index 0000000..6844c03 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_7.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_8.0.jpg b/sistema/www/servicios/brigada/planos/1_8.0.jpg new file mode 100644 index 0000000..991d7f0 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_8.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/1_9.0.jpg b/sistema/www/servicios/brigada/planos/1_9.0.jpg new file mode 100644 index 0000000..0ea70c5 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/1_9.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/2_0.0.jpg b/sistema/www/servicios/brigada/planos/2_0.0.jpg new file mode 100644 index 0000000..528de4d Binary files /dev/null and b/sistema/www/servicios/brigada/planos/2_0.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/2_9.0.jpg b/sistema/www/servicios/brigada/planos/2_9.0.jpg new file mode 100644 index 0000000..9a8bf62 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/2_9.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/3_-1.0.jpg b/sistema/www/servicios/brigada/planos/3_-1.0.jpg new file mode 100644 index 0000000..ba00e44 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/3_-1.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/3_1.0.jpg b/sistema/www/servicios/brigada/planos/3_1.0.jpg new file mode 100644 index 0000000..609938c Binary files /dev/null and b/sistema/www/servicios/brigada/planos/3_1.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/3_2.0.jpg b/sistema/www/servicios/brigada/planos/3_2.0.jpg new file mode 100644 index 0000000..5ea44dc Binary files /dev/null and b/sistema/www/servicios/brigada/planos/3_2.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/3_3.0.jpg b/sistema/www/servicios/brigada/planos/3_3.0.jpg new file mode 100644 index 0000000..89ae19f Binary files /dev/null and b/sistema/www/servicios/brigada/planos/3_3.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/3_4.0.jpg b/sistema/www/servicios/brigada/planos/3_4.0.jpg new file mode 100644 index 0000000..dcb79f3 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/3_4.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/3_7.0.jpg b/sistema/www/servicios/brigada/planos/3_7.0.jpg new file mode 100644 index 0000000..0ea70c5 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/3_7.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/4_-1.0.jpg b/sistema/www/servicios/brigada/planos/4_-1.0.jpg new file mode 100644 index 0000000..ba00e44 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/4_-1.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/4_1.0.jpg b/sistema/www/servicios/brigada/planos/4_1.0.jpg new file mode 100644 index 0000000..609938c Binary files /dev/null and b/sistema/www/servicios/brigada/planos/4_1.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/4_2.0.jpg b/sistema/www/servicios/brigada/planos/4_2.0.jpg new file mode 100644 index 0000000..5ea44dc Binary files /dev/null and b/sistema/www/servicios/brigada/planos/4_2.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/4_3.0.jpg b/sistema/www/servicios/brigada/planos/4_3.0.jpg new file mode 100644 index 0000000..89ae19f Binary files /dev/null and b/sistema/www/servicios/brigada/planos/4_3.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/4_4.0.jpg b/sistema/www/servicios/brigada/planos/4_4.0.jpg new file mode 100644 index 0000000..dcb79f3 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/4_4.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/4_5.0.jpg b/sistema/www/servicios/brigada/planos/4_5.0.jpg new file mode 100644 index 0000000..6844c03 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/4_5.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/4_6.0.jpg b/sistema/www/servicios/brigada/planos/4_6.0.jpg new file mode 100644 index 0000000..991d7f0 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/4_6.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/4_7.0.jpg b/sistema/www/servicios/brigada/planos/4_7.0.jpg new file mode 100644 index 0000000..0ea70c5 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/4_7.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/4_8.0.jpg b/sistema/www/servicios/brigada/planos/4_8.0.jpg new file mode 100644 index 0000000..9a8bf62 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/4_8.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/4_9.0.jpg b/sistema/www/servicios/brigada/planos/4_9.0.jpg new file mode 100644 index 0000000..76cd8f0 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/4_9.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/5_-1.0.jpg b/sistema/www/servicios/brigada/planos/5_-1.0.jpg new file mode 100644 index 0000000..8e616fc Binary files /dev/null and b/sistema/www/servicios/brigada/planos/5_-1.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/5_0.0.jpg b/sistema/www/servicios/brigada/planos/5_0.0.jpg new file mode 100644 index 0000000..a8451ce Binary files /dev/null and b/sistema/www/servicios/brigada/planos/5_0.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/5_1.0.jpg b/sistema/www/servicios/brigada/planos/5_1.0.jpg new file mode 100644 index 0000000..743b12c Binary files /dev/null and b/sistema/www/servicios/brigada/planos/5_1.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/5_2.0.jpg b/sistema/www/servicios/brigada/planos/5_2.0.jpg new file mode 100644 index 0000000..cc775ea Binary files /dev/null and b/sistema/www/servicios/brigada/planos/5_2.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/5_3.0.jpg b/sistema/www/servicios/brigada/planos/5_3.0.jpg new file mode 100644 index 0000000..0d9b615 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/5_3.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/5_4.0.jpg b/sistema/www/servicios/brigada/planos/5_4.0.jpg new file mode 100644 index 0000000..f02c21b Binary files /dev/null and b/sistema/www/servicios/brigada/planos/5_4.0.jpg differ diff --git a/sistema/www/servicios/brigada/planos/no_disponible.jpg b/sistema/www/servicios/brigada/planos/no_disponible.jpg new file mode 100644 index 0000000..a768de2 Binary files /dev/null and b/sistema/www/servicios/brigada/planos/no_disponible.jpg differ