示例#1
0
		
		$fechaInicio=$_POST["fechaInicio"];
		$fechaFin=$_POST["fechaFin"];
		
		$parametros =" ";
		
		//====================== Validacion de busqueda (parametros)======================
		//Empresa
		if($empresaId !=null){
			 if($empresaId == "Seleccione una Empresa"){
				$parametros.="";
				$empresaId="";
			}else{
				if($_SESSION['reporte']== "Reporte de Gastos"){
					$empresa= new Empresa();
					$empresa->Load_Empresa($empresaId);
					$empresaNom=$empresa->Get_Dato("e_nombre");
					$parametros.="WHERE empresa LIKE '%{$empresaNom}%'";
				}else{
					$parametros.="";
				}
				
			}
		}else{
			$parametros.="";
		}
		
		
		//Centro de costos
		if($ceco != null){
			if($ceco == '-1'||$ceco == "Sin Datos"){
示例#2
0
$hidTramite = $_POST["hidTramite"];
$notification_by_email = $_POST['mail'];
$Empresa = new Empresa();
$U = new Usuario();
$T = new Tramite();
$tramite_aux = new Tramite();
if ($U->Valida($usuario, $passwd) == false) {
    if ($hidTramite != 0) {
        header("Location: ./index.php?error&id=" . $hidTramite);
    } else {
        header("Location: ./index.php?error");
    }
    return false;
} else {
    $id_empresa = $U->Get_dato("u_empresa");
    $Empresa->Load_Empresa($id_empresa);
    $_SESSION["idusuario"] = $U->Get_dato("u_id");
    $_SESSION["usuario"] = $U->Get_dato("u_paterno") . " " . $U->Get_dato("u_materno") . " " . $U->Get_dato("u_nombre");
    $_SESSION["empresa"] = $id_empresa;
    $_SESSION["nombreempresa"] = $Empresa->Get_dato("e_codigo") . " - " . $Empresa->Get_dato("e_nombre");
    if ($U->find_tipos($U->Get_dato("u_id")) && $notification_by_email == 0) {
        header("Location: accesotipo.php");
    } else {
        if ($U->find_delegaciones($U->Get_dato("u_id")) && $notification_by_email == 0) {
            header("Location: ./flujos/delegacion/delegaciones.php");
        } else {
            if ($hidTramite != null && $notification_by_email != 0) {
                $tramite_aux->Load_Tramite($hidTramite);
                $t_flujo = $tramite_aux->Get_dato("t_flujo");
                $etapa_tramite = $tramite_aux->Get_dato("t_etapa_actual");
                error_log("Flujo del tramite: " . $t_flujo);
                                        </tr>
                                    </thead> 
                                    <tbody> 
                                     <tr><?php 
    // Obtener el puesto del empleado
    $idempleado = $_SESSION["idusuario"];
    $usuarioEmpleado = new Empleado();
    $usuarioEmpleado->cargaDatosEmpleadoUsuario($idempleado);
    $nombreUsuario = $usuarioEmpleado->Get_dato('nombre');
    $empresaId = $usuarioEmpleado->Get_dato('u_empresa');
    $puesto = $usuarioEmpleado->Get_dato('npuesto');
    $interno = $usuarioEmpleado->Get_dato('u_interno');
    $interno = $interno ? "Interno" : "";
    // Obtener el nombre de la empresa
    $datosEmpresa = new Empresa();
    $datosEmpresa->Load_Empresa($empresaId);
    $nombreEmpresa = $datosEmpresa->Get_Dato('e_nombre');
    ?>
                                            <td><div id='renglon1'>1</div><input type="hidden" name="row1" id="row1" value="1" readonly='readonly'/></td>
                                            <td><?php 
    echo $nombreUsuario;
    ?>
<input type="hidden" name="nombre1" id="nombre1" value="<?php 
    echo $nombreUsuario;
    ?>
" /></td> 
                                            <td><?php 
    echo $puesto;
    ?>
<input type="hidden" name="puesto1" id="puesto1" value="<?php 
    echo $puesto;