" size="15" /> <img src="../images/b_calendar.png" alt="Calendario" name="fechaIMG" width="16" height="16" id="fechaIMG" /> Fecha Final</td> </tr> </table> <table align='center', width='30%'> <!-- Empresa --> <tr><td colspan='2' align='left'> </td><tr> <tr> <td colspan='1' align='right'>Empresa:</td> <td colspan='1' align='left'> <select name="empresalist" id="empresalist"> <option name="Todas" id="Todas" value="Todas">Todas</option> <?php $empresalist = new Empresa(); foreach ($empresalist->Load_all() as $arrE) { ?> <option name="<?php echo $arrE['e_codigo']; ?> " id="<?php echo $arrE['e_codigo']; ?> " value="<?php echo $arrE['e_id']; ?> "><?php echo $arrE['e_nombre'] . ' - ' . $arrE['e_codigo']; ?> </option> <?php
function Muestra() { $Usu = new Usuario(); if (isset($_GET['usuario_id'])) { $usuario_id = $_GET['usuario_id']; $Usu->Load_Usuario_By_ID_Edit($usuario_id); } else { header("Location: index.php"); } $I = new Interfaz("Usuarios:: Editar Usuario", true); ?> <style type="text/css"> <!-- .Estilo1 {color: #FF0000} --> </style> <script language="JavaScript" src="../../lib/js/jquery/jquery-1.3.2.js" type="text/javascript"></script> <script language="JavaScript" src="../../lib/js/validateForm.js" type="text/javascript"></script> <link rel="stylesheet" href="../../lib/js/jquery-ui-1.10.4/development-bundle/themes/base/jquery.ui.all.css"> <script src="../../lib/js/jquery-ui-1.10.4/js/jquery-1.10.2.js"></script> <script src="../../lib/js/jquery-ui-1.10.4/development-bundle/ui/jquery.ui.core.js"></script> <script src="../../lib/js/jquery-ui-1.10.4/development-bundle/ui/jquery.ui.widget.js"></script> <script src="../../lib/js/jquery-ui-1.10.4/development-bundle/ui/jquery.ui.tabs.js"></script> <script src="../../lib/js/jquery-ui-1.10.4/development-bundle/ui/jquery.ui.position.js"></script> <script src="../../lib/js/jquery-ui-1.10.4/development-bundle/ui/jquery.ui.menu.js"></script> <script src="../../lib/js/jquery-ui-1.10.4/development-bundle/ui/jquery.ui.autocomplete.js"></script> <script language="javascript"> var j = jQuery.noConflict(); function validaNum(valor){ cTecla=(document.all)?valor.keyCode:valor.which; if(cTecla==8) return true; patron=/^([0-9.]{1,2})?$/; cTecla= String.fromCharCode(cTecla); return patron.test(cTecla); } function validate(){ var validaTipos=1; if (!document.getElementById("sel0").checked && !document.getElementById("sel1").checked && !document.getElementById("sel2").checked && !document.getElementById("sel3").checked && !document.getElementById("sel4").checked && !document.getElementById("sel5").checked && !document.getElementById("sel6").checked && !document.getElementById("sel7").checked){ validaTipos=0; } if( validateForm("nombre_real","","El nombre es un campo requerido",1)){ if( validateForm("paterno_real","","El apellido paterno es un campo requerido",1)){ if(validateForm(document.getElementById("amex2").value,"","El número de tarjeta de crédito es inválido",4)){ if(validateForm("user","","El usuario es un campo requerido",1)){ if(validateForm("passwd","passwd2","La contraseña es un campo requerido",2)){ if(validateForm("email","","El mail es un campo requerido",3)){ if (validaTipos==1){ if(validateForm("ceco","","El ceco es un campo requerido",1)){ if(validateForm("puesto","","El puesto es un campo requerido",1)){ if(validatorForm()){ return true; }else return false; }else return false; }else return false }else {alert("Favor de seleccionar por lo menos un tipo de usuario"); return false;} }else return false; }else return false; }else return false; }else return false; }else return false; }else return false; } function validatorForm(){ if ($("#email").val().indexOf('@', 1) == -1 || $("#email").val().indexOf('.',$("#email").val().indexOf('@', 0)) == -1) { alert("Dirección de email inválida"); return false; } else if (!(/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test($("#email").val()))){ alert("Dirección de email inválida"); return false; } else if($("#passwd").val() != $("#passwd2").val()){ alert("La contraseña no coincide, por favor intente nuevamente"); return false; }else return true; } function bloqueaEspacio(valor){ cTecla=(document.all)?valor.keyCode:valor.which; if(cTecla==32) return false; else return true; } //validación campos numericos function validaNum(valor){ cTecla=(document.all)?valor.keyCode:valor.which; if(cTecla==8) return true; patron=/^([0-9.]{1,2})?$/; cTecla= String.fromCharCode(cTecla); return patron.test(cTecla); } function mostrarImagen(){ $("#imagen").slideDown(1000); $("#imagen2").slideUp(1000); } function ocultarImagen(){ $("#imagen").slideUp(1000); $("#imagen2").slideDown(1000); } j(function() { j( "#jefe" ).autocomplete({ source: "services/carga_jefe.php", select: function( event, ui ) { } }); }); j(document).ready(function() { j("#limpiajefe").click(function(){ j("#jefe").val(""); }); }); </script> <br><br> <form name="form1" method="post" action=""/> <table width="80%" align="center" cellpadding="4" cellspacing="4" border="0" bgcolor="#f4f4f4" style="padding-top: 20px;"> <tr> <td align="right"> </td> <td><strong>Información de acceso al sistema</strong></td> </tr> <tr> <td align="right"> </td> <td> <input type="hidden" name="usuario_id" id="usuario_id" value="<?php echo $Usu->Get_dato("u_id"); ?> " readonly="readonly" style="border-color:#FFFFFF" /> <input type="hidden" name="empleado_id" id="empleado_id" value="<?php echo $Usu->Get_dato("idempleado"); ?> " readonly="readonly" style="border-color:#FFFFFF"/> </td> </tr> <td align="right" width="30%"> Nombre<span class="Estilo1">*</span>: </td><td> <input value="<?php echo $Usu->Get_dato("u_nombre"); ?> " type="text" name="nombre_real" id="nombre_real" size="40" /> </td></tr> <tr> <td align="right" width="30%"> Apellido Paterno<span class="Estilo1">*</span>: </td><td> <input value="<?php echo $Usu->Get_dato("u_paterno"); ?> " type="text" name="paterno_real" id="paterno_real" size="40" /> </td></tr> <tr> <td align="right" width="30%"> Apellido Materno : </td><td> <input value="<?php echo $Usu->Get_dato("u_materno"); ?> " type="text" name="materno_real" id="materno_real" size="40" /> </td></tr> <tr> <td align="right" width="30%">Usuario<span class="Estilo1">*</span>: </td> <td> <input type="text" name="user" id="user" size="40" value="<?php echo $Usu->Get_dato("u_usuario"); ?> " onKeypress="return bloqueaEspacio(event);"/> </td> </tr> <tr> <td align="right" width="30%">Contraseña<span class="Estilo1">*</span>: </td> <td> <input type="password" name="passwd" id="passwd" size="40" value="<?php echo $Usu->Get_dato("u_passwd"); ?> " onKeypress="return bloqueaEspacio(event);"/> </td> </tr> <tr> <td align="right" width="30%">Confirma contraseña<span class="Estilo1">*</span>: </td> <td> <input type="password" name="passwd2" id="passwd2" size="40" value="<?php echo $Usu->Get_dato("u_passwd"); ?> " onKeypress="return bloqueaEspacio(event);"/> </td> </tr> <tr> <td align="right" width="30%"> E-mail<span class="Estilo1">*</span>: </td> <td> <input type="text" name="email" id="email" size="40" value="<?php echo $Usu->Get_dato("u_email"); ?> " onKeypress="return bloqueaEspacio(event);"/> </td> </tr> <tr> <td align="right" width="30%"> Agregar Jefe Directo<span class="Estilo1">*</span>: </td> <td> <?php $usuarioJefe = $Usu->Get_dato("jefe"); $userJ = $usuarioJefe > 0 ? jefeNombre($usuarioJefe) : ''; ?> <input type="text" name="jefe" id="jefe" size="40" value="<?php echo $userJ; ?> " onKeypress="return bloqueaEspacio(event);"/> <input type="button" name="limpiaJefe" id="limpiajefe" value="Limpiar"/> </td> </tr> </table> <table width="80%" align="center" cellpadding="4" cellspacing="4" border="0" bgcolor="#f4f4f4" style="padding-top: 20px;"> <tr align="center"> <td width=500> <strong>Tipos de usuario:</strong> </td> </tr> </table> <table width="80%" align="center" cellpadding="4" cellspacing="4" border="0" bgcolor="#f4f4f4" style="padding-top: 20px;"> <tr><td colspan="6" align="center"> <div id="imagen2"> <a onclick="mostrarImagen();" style='cursor:pointer'><h1>Mostrar tabla de permisos</h1></a> </div> <div id="imagen" style="display:none;"> <a onclick="ocultarImagen();" style='cursor:pointer'><h1>Ocultar tabla de permisos</h1></a> <img src="../../images/admin/Tabla de roles permitidos 3.jpg" width="800" align="center"> <div> </td></tr> <?php $Usu = new Usuario(); ?> <?php $Usu->Load_Usuario_By_ID_Edit($usuario_id); $arregloGuardados = $Usu->get_usuario_tipo_valores($Usu->Get_dato("idfwk_usuario")); $arrTiposUsuario = array(); $indicTiposUsuario = 0; foreach ($Usu->Load_tipo_usuario() as $datos) { $arrTiposUsuario[$indicTiposUsuario][0] = $datos['tu_id']; $arrTiposUsuario[$indicTiposUsuario][1] = $datos['tu_nombre']; $indicTiposUsuario++; } $divisiones = $indicTiposUsuario / 2; ?> <?php for ($indicTiposUsuario2 = 0; $indicTiposUsuario2 < $divisiones; $indicTiposUsuario2++) { ?> <tr> <td align="right"> </td> <td align="right"> </td> <td align="right"> </td> <td align="right"> </td> <?php $esta = 0; for ($tmp2 = 0; $tmp2 < count($arregloGuardados); $tmp2++) { if ($arregloGuardados[$tmp2]['ut_tipo'] == $arrTiposUsuario[$indicTiposUsuario2][0]) { ?> <td align="left"><input checked type="checkbox" <?php echo "id='sel" . $indicTiposUsuario2 . "'"; ?> name="seleccion[]" value="<?php echo $arrTiposUsuario[$indicTiposUsuario2][0]; ?> "><?php echo $arrTiposUsuario[$indicTiposUsuario2][1]; ?> </input></td> <?php $esta = 1; break; } ?> <?php } ?> <?php if ($esta == 0) { ?> <td align="left"><input type="checkbox" name="seleccion[]" <?php echo "id='sel" . $indicTiposUsuario2 . "'"; ?> value="<?php echo $arrTiposUsuario[$indicTiposUsuario2][0]; ?> "><?php echo $arrTiposUsuario[$indicTiposUsuario2][1]; ?> </input></td> <?php } ?> <?php $esta = 0; for ($tmp2 = 0; $tmp2 < count($arregloGuardados); $tmp2++) { if ($arregloGuardados[$tmp2]['ut_tipo'] == $arrTiposUsuario[$divisiones + $indicTiposUsuario2][0]) { ?> <td align="left"><input checked type="checkbox" <?php echo "id='sel" . ($indicTiposUsuario2 + $divisiones) . "'"; ?> name="seleccion[]" value="<?php echo $arrTiposUsuario[$divisiones + $indicTiposUsuario2][0]; ?> "><?php echo $arrTiposUsuario[$divisiones + $indicTiposUsuario2][1]; ?> </input></td> <?php $esta = 1; break; } ?> <?php } ?> <?php if ($esta == 0) { ?> <td align="left"><input type="checkbox" <?php echo "id='sel" . ($indicTiposUsuario2 + $divisiones) . "'"; ?> name="seleccion[]" value="<?php echo $arrTiposUsuario[$divisiones + $indicTiposUsuario2][0]; ?> "><?php echo $arrTiposUsuario[$divisiones + $indicTiposUsuario2][1]; ?> </input></td> <?php } ?> </tr> <?php } ?> </table> <table width="80%" align="center" cellpadding="4" cellspacing="4" border="0" bgcolor="#f4f4f4" style="padding-top: 20px;"> <tr> <td align="right"> </td> <td><strong>Información del Empleado</strong></td> </tr> <?php $idDirGral = $Usu->Load_dir_general(); $Usu->Load_Usuario_By_ID_Edit($usuario_id); if ($idDirGral == $Usu->Get_dato("idfwk_usuario")) { error_log("Es un director general?" . $Usu->Get_dato("director_general")); ?> <tr> <td align="right" width="30%"> Director General: </td> <?php if ($Usu->Get_dato("director_general") == 0) { ?> <td> <input type="checkbox" id="dirgeneral" name="dirgeneral" /> </td> <?php } else { ?> <td> <input type="checkbox" id="dirgeneral" name="dirgeneral" checked/> </td> <?php } ?> </tr> <?php } ?> <tr> <td align="right" width="30%"> Empresa: </td> <td> <?php $empresa = new Empresa(); $arr = $empresa->Load_all_activas(); ?> <select name="empresa_id" id="empresa_id"> <?php error_log(count($arr)); if (count($arr) <= 0) { $arr2 = $empresa->Load_all(); foreach ($arr2 as $arrE) { if ($Usu->Get_dato("u_empresa") == $arrE['e_id']) { ?> <option value=<?php echo $arrE['e_codigo']; ?> ><?php echo $arrE['e_codigo']; ?> </option> <?php } } ?> <?php } else { foreach ($arr as $arrE) { ?> <option name="<?php echo $arrE['e_codigo']; ?> " id="<?php echo $arrE['e_codigo']; ?> " value="<?php echo $arrE['e_codigo']; ?> " <?php if ($Usu->Get_dato("u_empresa") == $arrE['e_codigo']) { echo "selected"; } ?> > <?php echo $arrE['e_codigo']; ?> </option> <?php } } ?> </select> </td> </tr> <tr> <td align="right">Centro de Costos:</td> <td> <select name='ceco_id'> <?php $query = sprintf("SELECT cc_id, cc_centrocostos, cc_nombre FROM cat_cecos c WHERE cc_estatus = 1"); $var = mysql_query($query); while ($arr = mysql_fetch_assoc($var)) { if ($Usu->Get_dato("idcentrocosto") == $arr['cc_id']) { echo sprintf("<option value='%s' selected='selected'>%s - %s</option>", $arr['cc_id'], $arr['cc_centrocostos'], $arr['cc_nombre']); } else { echo sprintf("<option value='%s'>%s - %s</option>", $arr['cc_id'], $arr['cc_centrocostos'], $arr['cc_nombre']); } } ?> </select> </td> </tr> <tr> <input type="hidden" name="producto" id="producto" size="40" value="" /> </tr> <tr> <td align="right">Puesto<span class="Estilo1">*</span>:</td> <td><input type="text" name="puesto" id="puesto" size="40" value="<?php echo $Usu->Get_dato("npuesto"); ?> "/></td> </tr> <tr> <td align="right">Tarjeta de Crédito: </td> <td> <input type="text" name="amex2" id="amex2" size="40" onkeypress="return validaNum(event);" value="<?php echo $Usu->Get_dato("notarjetacredito"); ?> " /> </td> </tr> <tr> <td align="right" width="30%">Estatus:</td> <td> <select name='estatus'> <?php if ($Usu->Get_dato("u_activo") == 1) { ?> <option value='1' selected>ACTIVO</option> <option value='0'>INACTIVO</option> <?php } else { ?> <option value='1'>ACTIVO</option> <option value='0' selected>INACTIVO</option> <?php } ?> </select> </td> </tr> <tr> <td colspan="2"> </td></tr> <tr> <td colspan="2" align="center"> <input type="submit" value="Actualizar" name="Actualizar" onclick="return validate(); "> <input type="submit" value="Cancelar" name="Cancelar"> </td> </tr> </table> </form> <?php $I->Footer(); }
function Muestra() { $Usu = new Usuario(); if (isset($_GET['usuario_id'])) { $usuario_id = $_GET['usuario_id']; $Usu->Load_Usuario_By_ID($usuario_id); } else { header("Location: index.php"); } $I = new Interfaz("Usuarios:: Editar Usuario", true); ?> <style type="text/css"> <!-- .Estilo1 {color: #FF0000} --> </style> <script language="JavaScript" src="../../lib/js/jquery/jquery-1.3.2.js" type="text/javascript"></script> <script language="JavaScript" src="../../lib/js/validateForm.js" type="text/javascript"></script> <script language="javascript"> function validaNum(valor){ cTecla=(document.all)?valor.keyCode:valor.which; if(cTecla==8) return true; patron=/^([0-9.]{1,2})?$/; cTecla= String.fromCharCode(cTecla); return patron.test(cTecla); } function validate(){ if( validateForm("nombre","","El nombre es un campo requerido",1)){ if(validateForm("user","","El usuario es un campo requerido",1)){ if(validateForm("passwd","passwd2","El password es un campo requerido",2)){ if(validateForm("email","","El mail es un campo requerido",3)){ if(validateForm("ceco","","El ceco es un campo requerido",1)){ if(validateForm("proveedor","","El proveedor es un campo requerido",1)){ if(validateForm("puesto","","El puesto es un campo requerido",1)){ return true; }else return false; }else return false }else return false }else return false; }else return false; }else return false; }else return false; } </script> <br><br> <form name="form1" method="post" action=""/> <table width="80%" align="center" cellpadding="4" cellspacing="4" border="0" bgcolor="#f4f4f4" style="padding-top: 20px;"> <tr> <td align="right"> </td> <td><strong>Información de acceso al sistema</strong></td> </tr> <tr> <td align="right"> </td> <td> <input type="hidden" name="usuario_id" id="usuario_id" value="<?php echo $Usu->Get_dato("u_id"); ?> " readonly="readonly" style="border-color:#FFFFFF" /> <input type="hidden" name="empleado_id" id="empleado_id" value="<?php echo $Usu->Get_dato("idempleado"); ?> " readonly="readonly" style="border-color:#FFFFFF"/> </td> </tr> <tr> <td align="right" width="30%">Nombre Completo<span class="Estilo1">*</span>: </td><td> <input type="text" name="nombre" id="nombre" size="70" value="<?php echo $Usu->Get_dato("u_nombre"); ?> "/> </td> </tr> <tr> <td align="right" width="30%">Usuario<span class="Estilo1">*</span>: </td> <td> <input type="text" name="user" id="user" size="40" value="<?php echo $Usu->Get_dato("u_usuario"); ?> "/> </td> </tr> <tr> <td align="right" width="30%">Contraseña<span class="Estilo1">*</span>: </td> <td> <input type="password" name="passwd" id="passwd" size="40" value="<?php echo $Usu->Get_dato("u_passwd"); ?> "/> </td> </tr> <tr> <td align="right" width="30%">Contraseña<span class="Estilo1">*</span>: </td> <td> <input type="password" name="passwd2" id="passwd2" size="40" value="<?php echo $Usu->Get_dato("u_passwd"); ?> " /> </td> </tr> <tr> <td align="right" width="30%"> E-mail<span class="Estilo1">*</span>: </td> <td> <input type="text" name="email" id="email" size="40" value="<?php echo $Usu->Get_dato("u_email"); ?> " /> </td> </tr> <tr> <td align="right" width="30%"> Tipo de usuario: </td> <td> <?php //$Usu = new Usuario(); ?> <select id="tipoUser" name="tipoUser" > <?php foreach ($Usu->Load_tipo_usuario() as $datos) { if ($datos['tu_id'] == 1 || $datos['tu_id'] == 2 || $datos['tu_id'] == 5) { ?> <option value="<?php echo $datos['tu_id']; ?> " <?php if ($Usu->Get_dato("u_tipo") == $datos['tu_id']) { echo "selected"; } ?> > <?php echo $datos['tu_nombre']; ?> </option> <?php } } ?> </select> </td> </tr> <tr> <td align="right"> </td> <td><strong>Información del Empleado</strong></td> </tr> <tr> <td align="right" width="30%"> Empresa<span class="Estilo1">*</span>: </td> <td> <?php $empresa = new Empresa(); $arr = $empresa->Load_all(); ?> <select name="empresa_id" id="empresa_id"> <?php foreach ($arr as $arrE) { ?> <option name="<?php echo $arrE['e_codigo']; ?> " id="<?php echo $arrE['e_codigo']; ?> " value="<?php echo $arrE['e_id']; ?> " <?php if ($Usu->Get_dato("u_empresa") == $arrE['e_id']) { echo "selected"; } ?> > <?php echo $arrE['e_codigo']; ?> </option> <?php } ?> </select> </td> </tr> <!-- <tr> <td align="right">Departamento<span class="Estilo1">*</span>:</td> <td><input type="text" name="depto" id="depto" size="40" value="<?php echo $Usu->Get_dato("departamento"); ?> "/></td> </tr> --> <tr> <td align="right">Departamento<span class="Estilo1">*</span>:</td> <td> <select name='ceco_id'> <?php $query = sprintf("SELECT cc_id, cc_centrocostos, cc_nombre FROM cat_cecos c WHERE cc_estatus = 0"); $var = mysql_query($query); while ($arr = mysql_fetch_assoc($var)) { if ($Usu->Get_dato("idcentrocosto") == $arr['cc_id']) { echo sprintf("<option value='%s' selected='selected'>%s - %s</option>", $arr['cc_id'], $arr['cc_centrocostos'], $arr['cc_nombre']); } else { echo sprintf("<option value='%s'>%s - %s</option>", $arr['cc_id'], $arr['cc_centrocostos'], $arr['cc_nombre']); } } ?> </select> </td> </tr> <tr> <td align="right">Proveedor (VENDOR_ID)<span class="Estilo1">*</span>:</td> <td><input type="text" name="proveedor" id="proveedor" size="40" value="<?php echo $Usu->Get_dato("u_proveedor"); ?> " /></td> </tr> <tr> <td align="right">Producto (PRODUCT)<span class="Estilo1">*</span>:</td> <td><input type="text" name="producto" id="producto" size="40" value="<?php echo $Usu->Get_dato("u_producto"); ?> " /></td> </tr> <tr> <td align="right">Puesto<span class="Estilo1">*</span>:</td> <td><input type="text" name="puesto" id="puesto" size="40" value="<?php echo $Usu->Get_dato("npuesto"); ?> "/></td> </tr> <tr> <td align="right" width="30%"> Nivel de Usuario<span class="Estilo1">*</span>: </td> <td> <?php echo llena_combo_vector("tipo", array(0 => "Auxiliar.", 1 => "Jefe Dpto.", 2 => "Gerente", 4 => "Director"), $Usu->Get_dato("idnivel")); ?> </td> </tr> <!-- <tr> <td align="right"> </td> <td><strong>Información Adicional</strong></td> </tr> <tr> <td align="right">Tarjeta de Crédito<span class="Estilo1">*</span>: </td> <td> <input type="text" name="amex2" id="amex2" size="40" value="<?php echo $Usu->Get_dato("notarjetacredito"); ?> " /> </td> </tr> <tr> <td align="right">Teléfono:</td> <td><input type="text" name="tel2" id="tel2" size="40" onkeypress="return validaNum (event)" value="<?php echo $Usu->Get_dato("telefono"); ?> " /></td> </tr> --> <tr> <td colspan="2"> </td></tr> <tr> <td colspan="2" align="center"> <input type="submit" value="Actualizar" name="Actualizar" onclick="return validate(); "> <input type="submit" value="Cancelar" name="Cancelar"> </td> </tr> </table> </form> <?php $I->Footer(); }
<option value="1">BMW</option> <option value="0">EXTERNOS</option> </select> </td> </tr> <?php }?> <!-- Empresa --> <tr> <td colspan='1' align='right' style="left:20px;">Empresa:</td> <td colspan='2' align="left" style="top:100px;"> <?php $empresa = new Empresa(); ?> <select name="EmpresaOpciones" id="EmpresaOpciones" onChange="obtener_cecos(this.value)"> <option name="EmpresaOpciones" id="EmpresaOpciones" value="Seleccione una Empresa"> Seleccione una Empresa </option> <?php foreach($empresa->Load_all() as $arrE){ ?> <option name="EmpresaOpciones" id="EmpresaOpciones" value="<?php echo $arrE['e_id'];?>"> <?php echo $arrE['e_nombre'];?> </option> <?php } ?> </select> </td> </tr> <!-- CECOS --> <tr> <td colspan='1' align='right' >CECO:</td> <td colspan="2"> <?if($_SESSION['reporte']== "Reporte de Gastos"){?> <select name="CecoOpciones" id="CecoOpciones" onChange=""> <?php }else if($_SESSION['reporte']== "Reporte de Anticipos no comprobados"){?> <select name="CecoOpciones" id="CecoOpciones" onChange="obtener_empleado(this.value)" >
function Muestra() { $I = new Interfaz("Usuarios:: Nuevo Usuario", true); ?> <style type="text/css"> <!-- .Estilo1 {color: #FF0000} --> </style> <br><br> <form name="form1" method="post"/> <table width="80%" align="center" cellpadding="4" cellspacing="4" border="0" bgcolor="#f4f4f4" style="padding-top: 20px;"> <tr> <td align="right"> </td> <td><strong>Información de acceso al sistema</strong></td> </tr> <tr> <td align="right" width="30%"> Nombre Completo<span class="Estilo1">*</span>: </td><td> <input type="text" name="nombre" id="nombre" size="70" /> </td></tr> <tr> <td align="right" width="30%"> Usuario<span class="Estilo1">*</span>: </td><td> <input type="text" name="user" id="user" size="40"/> </td> </tr> <tr> <td align="right" width="30%"> Contraseña<span class="Estilo1">*</span>: </td> <td> <input type="password" name="passwd" id="passwd" size="40"/> </td> </tr> <tr> <td align="right" width="30%"> Contraseña<span class="Estilo1">*</span>: </td> <td> <input type="password" name="passwd2" id="passwd2" size="40" /> </td> </tr> <tr> <td align="right" width="30%"> E-mail<span class="Estilo1">*</span>: </td> <td> <input type="text" name="email" id="email" size="40" /> </td> </tr> <tr> <td align="right" width="30%"> Tipo de usuario: </td> <td> <?php $Usu = new Usuario(); ?> <select id="tipoUser" name="tipoUser" > <?php foreach ($Usu->Load_tipo_usuario() as $datos) { if ($datos['tu_id'] == 1 || $datos['tu_id'] == 2 || $datos['tu_id'] == 5) { ?> <option value="<?php echo $datos['tu_id']; ?> "><?php echo $datos['tu_nombre']; ?> </option> <?php } } ?> </select> </td> </tr> <tr> <td align="right"> </td> <td> </td> </tr> <tr> <td align="right"> </td> <td><strong>Información del Empleado</strong></td> </tr> <tr> <td align="right" width="30%"> Empresa<span class="Estilo1">*</span>: </td> <td> <?php $empresa = new Empresa(); ?> <select name="empresa_id" id="empresa_id"> <?php foreach ($empresa->Load_all() as $arrE) { ?> <option name="empresa_id" id="empresa_id" value="<?php echo $arrE['e_id']; ?> "> <?php echo $arrE['e_codigo']; ?> </option> <?php } ?> </select> </td> </tr> <!-- <tr> <td align="right">Departamento<span class="Estilo1">*</span>:</td> <td><input type="text" name="depto" id="depto" size="40" /></td> </tr> --> <tr> <td align="right">Departamento<span class="Estilo1">*</span>:</td> <td> <select name='ceco_id'> <?php $query = sprintf("SELECT cc_id, cc_centrocostos, cc_nombre FROM cat_cecos c WHERE cc_estatus = 0"); $var = mysql_query($query); while ($arr = mysql_fetch_assoc($var)) { echo sprintf("<option value='%s'>%s - %s</option>", $arr['cc_id'], $arr['cc_centrocostos'], $arr['cc_nombre']); } ?> </select> </td> </tr> <tr> <td align="right">Proveedor (VENDOR_ID)<span class="Estilo1">*</span>:</td> <td><input type="text" name="proveedor" id="proveedor" size="40" /></td> </tr> <tr> <td align="right">Producto (PRODUCT)<span class="Estilo1">*</span>:</td> <td><input type="text" name="producto" id="producto" size="40" /></td> </tr> <tr> <td align="right">Puesto<span class="Estilo1">*</span>:</td> <td><input type="text" name="puesto" id="puesto" size="40" /></td> </tr> <tr> <td align="right" width="30%"> Nivel de Usuario<span class="Estilo1">*</span>: </td> <td> <?php echo llena_combo_vector("tipo", array(0 => "Auxiliar.", 1 => "Jefe Dpto.", 2 => "Gerente", 4 => "Director")); ?> </td> </tr> <!-- <tr> <td align="right"> </td> <td><strong>Información Adicional</strong></td> </tr> <tr> <td align="right">Tarjeta de Crédito<span class="Estilo1">*</span>:</td> <td><input type="text" name="amex2" id="amex2" size="40" /></td> </tr> <tr> <td align="right">Teléfono:</td> <td><input type="text" name="tel2" id="tel2" size="40" onkeypress="return validaNum (event)" /></td> </tr> --> <tr><td colspan="2"> </td></tr> <tr> <td colspan="2" align="center"> <input type="submit" value="Registrar" name="registrar" onclick="return validate(); "> <input type="submit" value="Cancelar" name="cancelar"> </td> </tr> </table> </form> <?php $I->Footer(); }