~marcelo-escobal/geined/Alianza

« back to all changes in this revision

Viewing changes to doc.php

  • Committer: Cualquier Desarrollador
  • Date: 2010-01-29 21:15:22 UTC
  • Revision ID: desarrollo@marte-20100129211522-u97qh9o90mhdap04
Importación inicial

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
include('funciones.php');
 
3
if (!$_GET['accion']) $accion='listado';
 
4
else {
 
5
    $accion=$_GET['accion'];
 
6
}
 
7
switch($accion){
 
8
    case 'listado':
 
9
        Encabezado('Listado de docentes');  
 
10
        $sql='select * from empleados WHERE 
 
11
        (categoria_id <=7) AND
 
12
        (categoria_id >=2) order by nombre';
 
13
        $resultado = mysql_query($sql);
 
14
        boton("Volver",'alianza.py?accion=recepcion');
 
15
        encabezado_tabla(array("Nombre","Categoria","CI","Direccion","Teléfonos","eMail","Ingreso","Acciones"));    
 
16
        for ($i = 0; $i < mysql_num_rows($resultado); $i++) {
 
17
            $fil1=mysql_fetch_array($resultado);
 
18
            $sql2 = 'SELECT * FROM cat_empleados WHERE id="' . $fil1['categoria_id'] . '"';
 
19
            $res2 = mysql_query($sql2);
 
20
            $fil2 = mysql_fetch_array($res2);
 
21
            echo '<tr>';
 
22
            celda($fil1["nombre"]);
 
23
            celda($fil2["categoria"]);
 
24
            celda($fil1["ci"]);
 
25
            celda($fil1["direccion"]);
 
26
            celda($fil1["telefono"]);
 
27
            celda($fil1["email"]);
 
28
            celda(mysql_a_fecha($fil1["ingreso"]));
 
29
            echo '<td>';
 
30
            boton("Ver grupo",'doc_ver.php?accion=grupos&id=' . $fil1[0]);
 
31
            echo '</td></tr>';
 
32
        }
 
33
        echo '</tbody></table>';
 
34
        boton('Volver','alianza.py?accion=recepcion');
 
35
        Break;
 
36
    }
 
37
?>