From: Gonzalo Merayo Date: Thu, 7 Aug 2003 20:13:11 +0000 (+0000) Subject: Agrego login y corrijo legajos X-Git-Tag: svn_import~216 X-Git-Url: https://git.llucax.com/mecon/intranet.git/commitdiff_plain/89bf19b89812163353d94256d7adb0f3a9cda453?ds=inline Agrego login y corrijo legajos --- diff --git a/doc/intranet.xmi b/doc/intranet.xmi index 535a01b..0ffbba5 100644 --- a/doc/intranet.xmi +++ b/doc/intranet.xmi @@ -9,7 +9,7 @@ - + + + + + + + + + + + - - - - - + + + + + + - - + + + + + + + + - + - - + + - + - - + + @@ -74,14 +91,22 @@ x2c:include:HTML/Table.php + + + + + + + + diff --git a/doc/noticias.xmi b/doc/noticias.xmi index 00ce042..f305681 100644 --- a/doc/noticias.xmi +++ b/doc/noticias.xmi @@ -10,7 +10,7 @@ +" uniqueid="196" /> @@ -44,6 +44,7 @@ + @@ -66,6 +67,7 @@ x2c:include:HTML/Table.php + @@ -73,30 +75,30 @@ x2c:include:HTML/Table.php - - + + - + - + - - + + - - + + - + - + @@ -108,6 +110,7 @@ x2c:include:HTML/Table.php + @@ -121,6 +124,7 @@ x2c:include:HTML/Table.php + diff --git a/sistema/local_lib/HTML_Copete.php b/sistema/local_lib/HTML_Copete.php index 78b3c8c..7b149d1 100644 --- a/sistema/local_lib/HTML_Copete.php +++ b/sistema/local_lib/HTML_Copete.php @@ -49,8 +49,7 @@ class HTML_Copete extends HTML_Table { */ function HTML_Copete($seccion) // ~X2C { - echo ''; - echo ' + $mapa = ' Intranet Mapa de Intranet Cambio de Clave @@ -69,13 +68,13 @@ parent::HTML_Table(array('width' => '760', $anchos = array('12', '25', '712', '11'); $fila = array(); foreach($anchos as $a) - $fila[] = ''; + $fila[] = ''; $this->addRow($fila); $img_seccion = 'images/copete_'.$seccion.'.jpg'; - $this->addRow(array(''), array('colspan' => '4')); + $this->addRow(array(''.$mapa), array('colspan' => '4')); $fila = array(); - $fila[] = ''; - $fila[] = ''; + $fila[] = ''; + $fila[] = ''; switch($seccion) { case 'noticias': $fila[] = 'Enlaces útiles: @@ -100,10 +99,21 @@ parent::HTML_Table(array('width' => '760', case 'sistemas': $fila[] = 'Sistemas'; break; } - $fila[] = ''; + $fila[] = ''; $this->addRow($fila, array('class' => 'copete_titulo_vinculos')); } // -X2C + // +X2C Operation 169 + /** + * @return void + * @access public + */ + function getCSS() // ~X2C + { + return "css/copete.css"; + } + // -X2C + } // -X2C Class :HTML_Copete ?> diff --git a/sistema/local_lib/HTML_DietMarco.php b/sistema/local_lib/HTML_DietMarco.php index fd11a0a..5294057 100644 --- a/sistema/local_lib/HTML_DietMarco.php +++ b/sistema/local_lib/HTML_DietMarco.php @@ -27,6 +27,10 @@ // $Id: xmi2code.tpl.php 1 2003-06-23 18:29:20Z gmeray $ // +session_start();//FIXME esto va en algun otro lado... + +define('PATH_RAIZ','/sistemas/intranet/'); + require_once 'HTML_Copete.php'; // +X2C includes @@ -75,5 +79,20 @@ class HTML_DietMarco extends HTML_Page { } // -X2C + // +X2C Operation 168 + /** + * @param int $content + * + * @return void + * @access public + */ + function addBodyContent($content) // ~X2C + { + if(method_exists($content, 'getcss')) + $this->addStyleSheet($content->getCSS()); + parent::addBodyContent($content); + } + // -X2C + } // -X2C Class :HTML_DietMarco -?> \ No newline at end of file +?> diff --git a/sistema/local_lib/HTML_Login.php b/sistema/local_lib/HTML_Login.php new file mode 100644 index 0000000..d92a5e5 --- /dev/null +++ b/sistema/local_lib/HTML_Login.php @@ -0,0 +1,100 @@ + | +// +--------------------------------------------------------------------+ +// +// $Id: xmi2code.tpl.php 1 2003-06-23 18:29:20Z gmeray $ +// + + +require_once 'HTML/Image.php'; + +// +X2C includes +require_once 'HTML/Table.php'; +// ~X2C + +// +X2C Class 171 :HTML_Login +/** + * @access public + */ +class HTML_Login extends HTML_Table { + // ~X2C + + // +X2C Operation 172 + /** + * @return void + * @access public + */ + function HTML_Login() // ~X2C + { + parent::HTML_Table(array('bgColor' => '#FFFFFF', + 'border' => 1, + 'borderColor' => '#003060', + 'cellPadding' => 0, + 'cellSpacing' => 0, + 'width' => 600)); + } + // -X2C + + // +X2C Operation 173 + /** + * @return void + * @access public + */ + function getCSS() // ~X2C + { + return "css/login.css"; + } + // -X2C + + // +X2C Operation 174 + /** + * @return void + * @access public + */ + function toHTML() // ~X2C + { + $int = new HTML_Table(array('border' => 0, + 'cellPadding' => 0, + 'cellSpacing' => 2, + 'width' => '100%')); + $img = new HTML_Image('images/login_candados.gif'); + $int->addRow(array($img->toHTML().'Usuarios', + $img->toHTML().'Usuario:', + '', + $img->toHTML().'Contraseña:', + ''. + '', + '')); + $int->updateColAttributes(0, array('class' => 'titulo_tabla', + 'bgColor' => '#003366')); + $int->updateColAttributes(1, array('class' => 'titulo')); + $int->updateColAttributes(3, array('class' => 'titulo')); + $this->addRow(array($int)); + return '
'.parent::toHTML().'
'; + } + // -X2C + +} // -X2C Class :HTML_Login +?> diff --git a/sistema/local_lib/HTML_Noticia.php b/sistema/local_lib/HTML_Noticia.php index 87ce96f..59ddc84 100644 --- a/sistema/local_lib/HTML_Noticia.php +++ b/sistema/local_lib/HTML_Noticia.php @@ -121,7 +121,6 @@ class HTML_Noticia extends HTML_Table { $params = array('width' => '280', 'border' =>'0', 'cellPadding'=>'0'); - echo ''; parent::HTML_Table($params); } // -X2C @@ -192,5 +191,16 @@ class HTML_Noticia extends HTML_Table { } // -X2C + // +X2C Operation 195 + /** + * @return void + * @access public + */ + function getCSS() // ~X2C + { + return "css/noticias.css"; + } + // -X2C + } // -X2C Class :HTML_Noticia ?> diff --git a/sistema/local_lib/HTML_Servicio.php b/sistema/local_lib/HTML_Servicio.php index 51a2cce..28b8fbd 100644 --- a/sistema/local_lib/HTML_Servicio.php +++ b/sistema/local_lib/HTML_Servicio.php @@ -74,9 +74,10 @@ class HTML_Servicio extends HTML_Table { */ function toHTML() // ~X2C { - echo ''; if($this->servicio->link == '') $this->servicio->link = 'servicios.php?servicios='.$this->servicio->servicio; + elseif($this->servicio->necesita_logueo) + $this->servicio->link = 'login.php?redirect='.$this->servicio->servicio; $l = new HTML_Link($this->servicio->link, $this->servicio->nombre, array(), array('class' => 'servicio_titulo_tabla')); $this->addRow(array('   '.$l->toHTML()), @@ -108,6 +109,8 @@ class HTML_Servicio extends HTML_Table { { if($s->link == '') $s->link = 'servicios.php?servicios='.$s->servicio; + elseif($s->necesita_logueo) + $s->link = 'login.php?redirect='.$s->servicio; if($par) { $int->setCellContents(0, 3, new HTML_Link($s->link, $s->nombre, @@ -139,5 +142,16 @@ class HTML_Servicio extends HTML_Table { } // -X2C + // +X2C Operation 170 + /** + * @return void + * @access public + */ + function getCSS() // ~X2C + { + return "css/servicio.css"; + } + // -X2C + } // -X2C Class :HTML_Servicio ?> diff --git a/sistema/local_lib/HTML_Titulares.php b/sistema/local_lib/HTML_Titulares.php index 12542b1..9e4597b 100644 --- a/sistema/local_lib/HTML_Titulares.php +++ b/sistema/local_lib/HTML_Titulares.php @@ -122,5 +122,16 @@ class HTML_Titulares extends HTML_Table { } // -X2C + // +X2C Operation 196 + /** + * @return void + * @access public + */ + function getCSS() // ~X2C + { + return "css/noticias.css"; + } + // -X2C + } // -X2C Class :HTML_Titulares ?> diff --git a/sistema/www/css/login.css b/sistema/www/css/login.css new file mode 100644 index 0000000..62396a6 --- /dev/null +++ b/sistema/www/css/login.css @@ -0,0 +1,6 @@ +.titulo_tabla { + BACKGROUND-POSITION-X: left; COLOR: #ffffff; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11pt; FONT-STYLE: normal; FONT-WEIGHT: bold; LINE-HEIGHT: normal; TEXT-ALIGN: left; VERTICAL-ALIGN: middle +} +.titulo { + BACKGROUND-POSITION-X: left; COLOR: #003366; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-WEIGHT: bold; LINE-HEIGHT: normal; TEXT-ALIGN: left; VERTICAL-ALIGN: top +} diff --git a/sistema/www/images/login_candados.gif b/sistema/www/images/login_candados.gif new file mode 100644 index 0000000..c5770cd Binary files /dev/null and b/sistema/www/images/login_candados.gif differ diff --git a/sistema/www/login.php b/sistema/www/login.php new file mode 100644 index 0000000..fb025ff --- /dev/null +++ b/sistema/www/login.php @@ -0,0 +1,70 @@ +addTitle('Servicios'); + + $login = new HTML_Login(); + $t = new HTML_Table(array('width' => 760, + 'align' => 'center', + 'cellspacing' => 0, + 'cellpadding' => 0, + 'border' => 0, + 'valign' => 'middle', + 'height' => 200)); + $t->addRow(array($login)); + + $m->addStyleSheet($login->getCSS()); + $m->addBodyContent($t); + $m->display(); + } + } + + if(isset($_SESSION['usuario']) && (isset($_POST['redirect']) || isset($_GET['redirect']))) + { + $db = DB::Connect('mysql://intranet:intranet@bal747f/intranet'); + $query = "SELECT link + FROM servicio + WHERE servicio = "; + if(isset($_POST['redirect'])) + $query .= $_POST['redirect']; + else + $query .= $_GET['redirect']; + $link = $db->getOne($query); + header('location: '.$link); + } + +?> diff --git a/sistema/www/logout.php b/sistema/www/logout.php new file mode 100644 index 0000000..0aaf7b5 --- /dev/null +++ b/sistema/www/logout.php @@ -0,0 +1,5 @@ + diff --git a/sistema/www/noticias.php b/sistema/www/noticias.php index 7a58a1c..e4a24f3 100644 --- a/sistema/www/noticias.php +++ b/sistema/www/noticias.php @@ -32,6 +32,8 @@ $titulares = new HTML_Titulares($grupo, $dias); $noticias->addRow(array($arbol,$titulares)); + $m->addStyleSheet($arbol->getCSS()); + $m->addStyleSheet($titulares->getCSS()); $noticias->updateCellAttributes(0, 0, array('valign'=>'top', 'width'=>'160')); $noticias->updateCellAttributes(0, 1, array('valign'=>'top', 'width'=>'600')); diff --git a/sistema/www/servicios.php b/sistema/www/servicios.php index 33ec252..3268be9 100644 --- a/sistema/www/servicios.php +++ b/sistema/www/servicios.php @@ -32,6 +32,7 @@ $impar = true; } } + $m->addStyleSheet($sh->getCSS()); $tabla =& new HTML_Table(array('width' => 760, 'cellspacing' => 10)); $tabla->addRow(array($col_impar, $col_par), array('valign'=>'top')); diff --git a/sistema/www/servicios/legajos/legajo.php b/sistema/www/servicios/legajos/legajo.php index de5fda0..2600d76 100755 --- a/sistema/www/servicios/legajos/legajo.php +++ b/sistema/www/servicios/legajos/legajo.php @@ -10,10 +10,11 @@ require_once 'MECON/HTML/Arbol.php'; require_once '../../../local_lib/HTML_DietMarco.php'; -if(isset($_GET['nrodoc'])) +/*if(isset($_GET['nrodoc'])) $nrodoc = $_GET['nrodoc']; else - $nrodoc = 0; + $nrodoc = 0;*/ +$nrodoc = $_SESSION['documento']; $m = new HTML_DietMarco('servicios'); @@ -25,7 +26,7 @@ foreach (array('Personales','Domicilio','Cobertura','Estudios','Antiguedad','Lab { $aa = array( 'titulo'=>$a, - 'link'=>'./legajo.php?nrodoc='.$nrodoc.'&mostrar='.strtolower($a) + 'link'=>'./legajo.php?mostrar='.strtolower($a) ); array_push($arbol_valores,$aa); }