Example #1
0
	function Muestra(){
		include "../../lib/php/messageResources.php";
		$INDEXIDIOMA=$_SESSION["idiomausuario"];
		$idioma= new Idioma();
		if(isset($_GET['idioma_id'])){
			$idioma_id=$_GET['idioma_id'];
			$idioma->Load_Idioma($idioma_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" src="../../lib/js/valida_form.js" type="text/javascript"></script>

<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 colspan="2" align="center"><strong><?php echo $LABELINDEX[$INDEXIDIOMA][435]?></strong></td>
                </tr>
                <tr>
                    <td>
                        <input type="hidden" name="i_id" id="i_id" value="<?php echo $_GET['idioma_id']; ?>" readonly="readonly" style="border-color:#FFFFFF" />
                    </td>
                </tr>                 
				<tr>
                    <td align="right" width="50%"><?php echo $LABELINDEX[$INDEXIDIOMA][327]?><span class="Estilo1">*</span>:</td><td> <input type="text" name="nombre" id="nombre" size="20" value="<?php echo $idioma->Get_dato("i_idioma");?>"/></td>
                </tr>
				<tr>
				 	<td align="right" width="50%"><?php echo $LABELINDEX[$INDEXIDIOMA][28]?>:</td>
                    <td>
					<?php if($idioma->Get_dato("i_estatus") == 1){ ?>
						<input type=checkbox name="estatus" id="estatus" checked="checked" />
					<? }else{ ?>
						<input type=checkbox name="estatus" id="estatus" />
					<? } ?>
                    </td>
				</tr>
				<tr><td colspan="2">&nbsp;</td></tr>
				<tr>
				 	<td colspan="2" align="center">
				 		<input type="submit" value="<?php echo $LABELINDEX[$INDEXIDIOMA][345]?>" name="actualizar" onclick="return validar_formulario_editar_idioma(); ">
				 		<input type="submit" value="<?php echo $LABELINDEX[$INDEXIDIOMA][219]?>" name="cancelar">
					</td>
				</tr>
			</table>
        </form>
		
		<?php
		
		$I->Footer();
	}
Example #2
0
function printProgramacion($asignatura, $printConfiguracion)
{
    if ($printConfiguracion) {
        printConfiguracion();
    }
    $programator = new Programator();
    $evaluaciones = getEvaluaciones($asignatura);
    // chapuza
    echo "asignatura" . $asignatura . "<br>";
    echo "evaluaciones" . $evaluaciones . "<br>";
    $programator->programarDias($asignatura, $evaluaciones);
    //$programator->printDias();
    //$programator->printUnidades();
    $interfaz = new Interfaz($asignatura, $programator->DIAS, $programator->UNIDADES);
    $interfaz->printDiasByRango($f1, $f2);
    // $f1, $f2 no se estan utilizando
}
Example #3
0
function Muestra()
{
    $I = new Interfaz("Concepto:: Nuevo Concepto", 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">&nbsp;</td>
				   <td><strong>Nuevo Concepto</strong></td>
                 </tr>
				 <tr>
                    <td align="right" width="30%" > <input type="hidden" name="catalogo" id="catalogo" size="70" value="1"/></td>
                </tr>
				 <tr>
                    <td align="right" width="30%">Concepto<span class="Estilo1">*</span>:</td><td> <input type="text" name="concepto" id="concepto" size="70" /></td>
                </tr>
				 <tr>
                    <td align="right" width="30%">Cuenta<span class="Estilo1">*</span>:</td><td> <input type="text" name="cuenta" id="cuenta" size="70" onkeypress="return validaNum(event);"/></td>
                </tr>                
				 <tr>
				 	<td align="right" width="30%">Clasificaci&oacute;n :</td>
                        <td>
                            <select name='clasificacion'>
                                <option value='1'>DEDUCIBLE</option>
                                <option value='0'>NO DEDUCIBLE</option>
                            </select>
                        </td>
				</tr>
				 <tr>
				 	<td align="right" width="30%">Estatus :</td>
                        <td>
                            <select name='estatus'>
                            	<option value='1'>ACTIVO</option>
                                <option value='0'>INACTIVO</option>                                
                            </select>
                        </td>
				</tr>
				 <tr><td colspan="2">&nbsp;</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();
}
 public function getInterPerfiles()
 {
     $interfacesPerfiles = Interfaz::join('InterfazPerfiles', 'InterfazPerfiles.IdInterfaz', '=', 'Interfaz.ID')->join('Perfiles', 'Perfiles.ID', '=', 'InterfazPerfiles.IdPerfil')->select('Interfaz.DisplayName', 'Perfiles.Perfil', 'IdInterfaz', 'IdPerfil')->orderBy('Interfaz.ID', 'asc')->get();
     $datos = array();
     foreach ($interfacesPerfiles->toArray() as $intperf) {
         $intperf['Eliminar'] = "<div class='text-center'><a href='desasignarint/{$intperf['IdInterfaz']}/{$intperf['IdPerfil']}' title='Desasignar'>" . "<span style='color:#FA5858; padding-left:15px' class='glyphicon glyphicon-remove'></span>" . "</a></div>";
         $datos[] = $intperf;
     }
     $datos = json_encode($datos);
     return $datos;
 }
Example #5
0
function Muestra()
{
    include "../../lib/php/messageResources.php";
    $INDEXIDIOMA = $_SESSION["idiomausuario"];
    $I = new Interfaz("Idioma:: Nuevo Idioma", 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 colspan="2" align="center"><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][70];
    ?>
</strong></td>
                </tr>
				<tr>
                    <td align="right" width="50%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][327];
    ?>
<span class="Estilo1">*</span>:</td><td> <input type="text" name="nombre" id="nombre" size="20" value=""/></td>
                </tr>
				<tr>
				 	<td align="right" width="50%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][28];
    ?>
:</td>
                    <td>
						<input type=checkbox name="estatus" id="estatus" />
                    </td>
				</tr>
				<tr><td colspan="2">&nbsp;</td></tr>
				<tr>
				 	<td colspan="2" align="center">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][116];
    ?>
" name="registrar" onclick="return validar_formulario_editar_idioma(); "/>
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][219];
    ?>
" name="cancelar"/>
					</td>
				</tr>
			</table>
        </form>
		
		<?php 
    $I->Footer();
}
function Muestra()
{
    $I = new Interfaz("CentroCosto:: Nueva CentroCosto", 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">&nbsp;</td>
				   <td><strong>Nuevo Modelo de Auto</strong></td>
                 </tr>
				 <tr>
                    <td align="right" width="30%">Nombre<span class="Estilo1">*</span>:</td><td> <input type="text" name="nombre" id="nombre" size="70" /></td></tr>
				 <tr>
				 	<td align="right" width="30%">Factor<span class="Estilo1">*</span>:</td><td> <input type="text" onkeypress="return validaNum(event);" name="factor" id="factor" size="40"/></td>
				</tr>
				 <tr>
				 	<td align="right" width="30%">Estatus :</td>
                    <td> <select name='estatus'>
                        <option value="1">Activo</option>
						<option value="0">Inactivo</option>
                    </select>
                    </td>
				</tr>
				<tr><td colspan="2">&nbsp;</td></tr>
				<tr>
				 	<td colspan="2" align="center">
				 		<input type="submit" value="Registrar" name="registrar" onclick="return validate(); ">
				 		<input type="button" value="Cancelar" name="cancelar" onclick="confirma();">				 	</td>
				</tr>
				 
			</table>
        </form>
		
		<?php 
    $I->Footer();
}
Example #7
0
function Muestra()
{
    $I = new Interfaz("Empresa:: Nueva Empresa", 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">&nbsp;</td>
				   <td><strong>Nueva Empresa</strong></td>
                 </tr>
				 <tr>
                    <td align="right" width="30%">Nombre<span class="Estilo1">*</span>:</td><td> <input type="text" name="nombre" id="nombre" size="70" /></td>
                 </tr>
				 <tr>
				 	<td align="right" width="30%">C&oacute;digo<span class="Estilo1">*</span>:</td><td> <input type="text" name="codigo" id="codigo" size="40"/></td>
				</tr>
				<tr>
				 	<td align="right" width="30%">Estatus :</td><td> <select name="estatus" id="estatus">
				 		<option value="1">Activo</option>
				 		<option value="0">Inactivo</option>
				 	</select></td>
				</tr>
				 <tr><td colspan="2">&nbsp;</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();
}
Example #8
0
function Muestra()
{
    $empresa = new Empresa();
    if (isset($_GET['empresa_id'])) {
        $empresa_id = $_GET['empresa_id'];
        $empresa->Load_EmpresaporID($empresa_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 validate(){	
		if($("#nombre").val() == ""){
			alert("El nombre es un campo requerido.");
			$("#nombre").focus();		
			return false;
		}         
		if($("#codigo").val() == ""){
			alert("El código es un campo requerido.");
			$("#codigo").focus();
			return false;
		}           
		var url = "services/Ajax_empresa.php";
		var codigo = $("#codigo").val();
		var regresa = true;		
		var id = <?php 
    echo $_GET['empresa_id'];
    ?>
;
		$.ajaxSetup({async:false});
		$.post(url,{codigo:codigo,id:id},function(data){						
			if(data!=''){
				alert("El código ya ha sido asignado a otra empresa.");
				$("#codigo").focus();		
				regresa = false;		
			}
		});        
		return regresa;
	}
</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">&nbsp;</td>
				<td><strong>Editar Empresa</strong></td>
		    </tr>
			<tr>
				<td align="right">&nbsp;</td>
				<td>
					<input type="hidden" name="empresa_id" id="empresa_id" value="<?php 
    echo $empresa_id;
    ?>
" readonly="readonly" style="border-color:#FFFFFF" />
				</td>
		    </tr>
			<tr>
				<td align="right" width="30%">Nombre<span class="Estilo1">*</span>: 	</td>
                <td> <input type="text" name="nombre" id="nombre" size="70" value="<?php 
    echo $empresa->Get_dato("e_nombre");
    ?>
"/>
				</td>
			</tr>
			<tr>
				<td align="right" width="30%">C&oacute;digo<span class="Estilo1">*</span>: 			
				</td>
				<td> 
					<input type="text" name="codigo" id="codigo" size="40" value="<?php 
    echo $empresa->Get_dato("e_codigo");
    ?>
"/>
				</td>
			</tr>
			<tr>
				<td align="right" width="30%">Estatus :</td><td> 
					<select name="estatus" id="estatus">
						<?php 
    if ($empresa->Get_dato("e_estatus") == 1) {
        ?>
									<option selected value="1">Activo</option>
									<option value="0">Inactivo</option>
							  <?php 
    } else {
        ?>
							  		<option value="1">Activo</option>
									<option selected value="0">Inactivo</option>
							  <?php 
    }
    ?>
					</select>
				</td>
			</tr>
			<tr>
				<td colspan="2">&nbsp;</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();
}
Example #9
0
function Muestra()
{
    include "../../lib/php/messageResources.php";
    $INDEXIDIOMA = $_SESSION["idiomausuario"];
    $I = new Interfaz("Impuesto:: Nueva Impuesto", 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 colspan="2" style="text-align:center;"><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][81];
    ?>
</strong></td>
                 </tr>
				 <tr>
                    <td align="right" width="40%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][340];
    ?>
<span class="Estilo1">*</span>:</td><td> <input type="text" name="nombre" id="nombre" size="30" maxlength="10"/></td>
                 </tr>
                 <tr>
				 	<td align="right" width="40%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][415];
    ?>
<span class="Estilo1">*</span>:</td>
                    <td> <select name='pais_id' id='pais_id' onchange="change_pais(this.value);">
                        <?php 
    $query = sprintf("SELECT p_id,p_nombre FROM pais WHERE p_estatus = 1");
    $var = mysql_query($query);
    while ($arr = mysql_fetch_assoc($var)) {
        echo sprintf("<option name='%s' id='%s' value='%s'>%s</option>", $arr['p_id'], $arr['p_id'], $arr['p_id'], $arr['p_nombre']);
    }
    ?>
                    
                    </select>
                    </td>
				</tr>
				<tr>
                    <td align="right" width="40%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][630];
    ?>
<span class="Estilo1">*</span>:</td><td> <input type="text" name="porcentaje" id="porcentaje" size="25" onkeypress="return validaNum(event)"/></td>
                 </tr>
				<tr>
				 	<td align="right" width="40%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][412];
    ?>
:</td><td> <input type="checkbox" name="estatus" id="estatus"/></td>
				</tr>
				  <tr><td colspan="2">
					<input type="hidden" name="pais" id="pais" value="" readonly="readonly" />				
				</td></tr>
				 <tr>
				 	<td colspan="2" align="center">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][116];
    ?>
" name="registrar" onclick="return validate(); ">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][219];
    ?>
" name="cancelar">				 	</td>
				 </tr>
			</table>
        </form>
		
		<?php 
    $I->Footer();
}
Example #10
0
function Muestra()
{
    include "../../lib/php/messageResources.php";
    $INDEXIDIOMA = $_SESSION["idiomausuario"];
    $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" src="../../lib/js/valida_form.js" type="text/javascript"></script>

<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 colspan="2" align="center"><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][73];
    ?>
</strong></td>
                </tr>
				<tr>
                    <td align="right" width="50%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][327];
    ?>
<span class="Estilo1">*</span>:</td><td> <input type="text" name="nombre" id="nombre" size="20" value=""/></td>
                </tr>
                <tr>
				 	<td align="right" width="30%">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][55];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td>
						<?php 
    $pais = new Pais();
    ?>
						<select name="pais_id" id="pais_id" onChange="">
								<option name="pais_id" id="pais_id" value="-1">
									Selecciona un item
								</option>
							<?php 
    foreach ($pais->Load_all() as $arrE) {
        ?>
										<option name="pais_id" id="pais_id" value="<?php 
        echo $arrE['p_id'];
        ?>
">
											<?php 
        echo $arrE['p_nombre'];
        ?>
										</option>
							<?php 
    }
    ?>
						</select>					
					</td>
                </tr>
				<tr>
                    <td align="right" width="50%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][438];
    ?>
<span class="Estilo1">*</span>:</td><td> <input type="text" name="abrev_div" id="abrev_div" size="20" value=""/></td>
                </tr>
				<tr>
                    <td align="right" width="50%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][437];
    ?>
<span class="Estilo1">*</span>:</td><td> <input type="text" name="tasa" id="tasa" size="20" value="" onkeypress="return validaNum(event)" /></td>
                </tr>
				<tr><td colspan="2">&nbsp;</td></tr>
				<tr>
				 	<td colspan="2" align="center">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][116];
    ?>
" name="registrar" onclick="return validar_formulario_editar_divisa(); ">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][219];
    ?>
" name="cancelar">
					</td>
				</tr>
			</table>
        </form>
		
		<?php 
    $I->Footer();
}
Example #11
0
function Muestra()
{
    include "../../lib/php/messageResources.php";
    $INDEXIDIOMA = $_SESSION["idiomausuario"];
    $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>&nbsp;</td>
					<td colspan="4" align="center">
						<strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][441];
    ?>
</strong>
					</td>
					<td>&nbsp;</td>
				 </tr>
				 <tr>
					<td width="2%">&nbsp;</td>
					<td colspan="2" align="right" width="33%"> <?php 
    echo $LABELINDEX[$INDEXIDIOMA][327];
    ?>
<span class="Estilo1">*</span>:</td>
					<td colspan="2"> <input type="text" name="nombre" id="nombre" size="63" />
					</td>
					<td width="2%">&nbsp;</td>
				 </tr>
				 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%">	<?php 
    echo $LABELINDEX[$INDEXIDIOMA][0];
    ?>
<span class="Estilo1">*</span>: 			</td>
					<td colspan="2"> <input type="text" name="user" id="user" size="40" onKeypress="return bloqueaEspacio(event);"/> 											
					</td>
					<td>&nbsp;</td>
				</tr>
				 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%"> <?php 
    echo $LABELINDEX[$INDEXIDIOMA][1];
    ?>
<span class="Estilo1">*</span>:					</td>
					<td colspan="2"> <input type="password" name="passwd"  id="passwd" size="40" onKeypress="return bloqueaEspacio(event);"/>					</td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%"> <?php 
    echo $LABELINDEX[$INDEXIDIOMA][112];
    ?>
<span class="Estilo1">*</span>:					</td>
					<td colspan="2"> <input type="password" name="passwd2" id="passwd2" size="40" onKeypress="return bloqueaEspacio(event);"/>					</td>
					<td>&nbsp;</td>
				</tr>
				 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%"> 
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][96];
    ?>
<span class="Estilo1">*</span>:					
					</td>
					<td colspan="2">
						<input type="text" name="email" id="email" size="40" onKeypress="return bloqueaEspacio(event);"/>					
					</td>
					<td>&nbsp;</td>
				</tr>
				 <tr>
				   <td>&nbsp;</td>
				   <td colspan="4" align="right">&nbsp;</td>
				   <td>&nbsp;</td>
				 </tr>
				 <tr>
				   <td>&nbsp;</td>
				   <td colspan="4" align="center"><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][442];
    ?>
</strong></td>
				   <td>&nbsp;</td>
		         </tr>
		         <tr>
				   <td>&nbsp;</td>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][443];
    ?>
:</td>
                    <td>
						<input type=checkbox name="normal" id="normal" />
                    </td>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][445];
    ?>
 1:</td>
                    <td>
						<input type=checkbox name="av1" id="av1" />
                    </td>
				   <td>&nbsp;</td>
				 </tr>
		         <tr>
				   <td>&nbsp;</td>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][444];
    ?>
:</td>
                    <td>
						<input type=checkbox name="administrador" id="administrador" />
                    </td>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][445];
    ?>
 2:</td>
                    <td>
						<input type=checkbox name="av2" id="av2" />
                    </td>
				   <td>&nbsp;</td>
				 </tr>
		         <tr>
				   <td>&nbsp;</td>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][446];
    ?>
:</td>
                    <td>
						<input type=checkbox name="uafi" id="uafi" />
                    </td>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][445];
    ?>
 3:</td>
                    <td>
						<input type=checkbox name="av3" id="av3" />
                    </td>
				   <td>&nbsp;</td>
				 </tr>
		         <tr>
				   <td>&nbsp;</td>
				   <td>&nbsp;</td>
				   <td>&nbsp;</td>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][447];
    ?>
:</td>
                    <td>
						<input type=checkbox name="aprobador" id="aprobador" />
                    </td>
				   <td>&nbsp;</td>
				 </tr>
				 <tr>
				   <td>&nbsp;</td>
				   <td colspan="4" align="right">&nbsp;</td>
				   <td>&nbsp;</td>
				 </tr>
				 <tr>
				   <td>&nbsp;</td>
				   <td colspan="4" align="center"><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][182];
    ?>
</strong></td>
				   <td>&nbsp;</td>
		         </tr>
                 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][78];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td colspan="2">
						<?php 
    $cluster = new Cluster();
    ?>
						<select name="cluster_id" id="cluster_id" onChange="cargarPaises(this.value)">
								<option name="cluster_id" id="cluster_id" value="-1">
									<?php 
    echo $LABELINDEX[$INDEXIDIOMA][448];
    ?>
								</option>
							<?php 
    foreach ($cluster->Load_all(1) as $arrE) {
        ?>
								<option name="cluster_id" id="cluster_id" value="<?php 
        echo $arrE['c_id'];
        ?>
">
									<?php 
        echo $arrE['c_nombre'];
        ?>
								</option>
							<?php 
    }
    ?>
						</select>					
					</td>
					<td>&nbsp;</td>
				 </tr>       
                 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][55];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td colspan="2">
						<select name="pais_id" id="pais_id" onChange="cargarSociedades(this.value)" >
								<option name="pais_id" id="pais_id" value="-1">
									<?php 
    echo $LABELINDEX[$INDEXIDIOMA][449];
    ?>
								</option>
						</select>					
					</td>
					<td>&nbsp;</td>
				 </tr>       
                 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][58];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td colspan="2">
						<select name="sociedad_id" id="sociedad_id" onChange="cargarCecos(this.value)" >
								<option name="sociedad_id" id="sociedad_id" value="-1">
									<?php 
    echo $LABELINDEX[$INDEXIDIOMA][449];
    ?>
								</option>
						</select>					
					</td>
					<td>&nbsp;</td>
				 </tr>       
                 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][450];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td colspan="2">
						<select name="ceco_id" id="ceco_id" onChange="cargarJefes(this.value)" >
								<option name="ceco_id" id="ceco_id" value="-1">
									<?php 
    echo $LABELINDEX[$INDEXIDIOMA][449];
    ?>
								</option>
						</select>					
					</td>
					<td>&nbsp;</td>
				 </tr>       
				 <tr>
					<td>&nbsp;</td>
				   <td colspan="2" align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][451];
    ?>
 :</td>
				   <td colspan="2"><input type="text" name="telefono" id="telefono" size="20" onKeyPress="return validaNum(event)" /></td>
					<td>&nbsp;</td>
				 </tr>
				 <tr>
					<td>&nbsp;</td>
				   <td colspan="2" align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][452];
    ?>
 :</td>
				   <td colspan="2"><input type="text" name="extension" id="extension" size="20" onKeyPress="return validaNum(event)" /></td>
					<td>&nbsp;</td>
				 </tr>
				 <!--
				 <tr>
					<td>&nbsp;</td>
                   <td colspan="2" align="right">No. Tarjeta Cr&eacute;dito<span class="Estilo1">*</span>:</td>
				   <td colspan="2"><input type="text" name="no_tarjeta" id="no_tarjeta" size="20" /></td>
					<td>&nbsp;</td>
		         </tr>
				 -->
				 <tr>
					<td>&nbsp;</td>
                   <td colspan="2" align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][453];
    ?>
:</td>
				   <td colspan="2"><input type="text" name="no_tarjeta_corp" id="no_tarjeta_corp" size="20" /></td>
					<td>&nbsp;</td>
		         </tr>
				 <tr>
					<td>&nbsp;</td>
                   <td colspan="2" align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][454];
    ?>
:</td>
				   <td colspan="2"><input type="text" name="no_tarjeta_viajero" id="no_tarjeta_viajero" size="20" /></td>
					<td>&nbsp;</td>
		         </tr>
				 <tr>
					<td>&nbsp;</td>
                   <td colspan="2" align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][455];
    ?>
 :</td>
				   <td colspan="2"><input type="text" name="no_acreedor" id="no_acreedor" size="20" /></td>
					<td>&nbsp;</td>
		         </tr>
			  	 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][456];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td colspan="2">
						<?php 
    //$cluster=new Cluster();
    ?>
						<select name="nivel_id" id="nivel_id" >
								<option name="nivel_id" id="nivel_id" value="-1">
									<?php 
    echo $LABELINDEX[$INDEXIDIOMA][448];
    ?>
								</option>
							<?php 
    $Usu = new Usuario();
    foreach ($Usu->Load_niveles(1) as $arrE) {
        ?>
								<option name="nivel_id" id="nivel_id" value="<?php 
        echo $arrE['j_id'];
        ?>
">
									<?php 
        echo $arrE['j_nombre'];
        ?>
								</option>
							<?php 
    }
    ?>
						</select>					
					</td>
					<td>&nbsp;</td>
				 </tr> 
			  	 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][440];
    ?>
 :
					</td>
					<td colspan="2">
						<select name="jefe_id" id="jefe_id" >
								<option name="jefe_id" id="jefe_id" value="-1">
									<?php 
    echo $LABELINDEX[$INDEXIDIOMA][449];
    ?>
								</option>
						</select>					
					</td>
					<td>&nbsp;</td>
				 </tr> 
		         <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][28];
    ?>
:</td>
                    <td colspan="2">
						<input type=checkbox name="estatus" id="estatus" />
                    </td>
					<td>&nbsp;</td>
				 </tr>
				 <tr>
					<td>&nbsp;</td>
				 	<td colspan="4" align="center">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][116];
    ?>
" name="registrar" onclick="return validaUsuarioDuplicado();">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][219];
    ?>
" name="cancelar">				 	</td>
					<td>&nbsp;</td>
				 </tr>
			</table>
</form>		
		<?php 
    $I->Footer();
}
Example #12
0
function Muestra()
{
    $I = new Interfaz("CentroCosto:: Nueva CentroCosto", true);
    include "../../lib/php/messageResources.php";
    $INDEXIDIOMA = $_SESSION["idiomausuario"];
    ?>
<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">&nbsp;</td>
				   <td><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][68];
    ?>
</strong></td>
                 </tr>
				 <tr>
                    <td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][327];
    ?>
<span class="Estilo1">*</span>:</td><td> <input type="text" name="nombre" id="nombre" size="70" /></td></tr>
				 <tr>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][329];
    ?>
<span class="Estilo1">*</span>:</td><td> <input type="text" name="codigo" id="codigo" size="40" onkeypress="return validaNum(event)"/></td>
				</tr>
				 <tr>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][55];
    ?>
<span class="Estilo1">*</span>:</td>
                    <td> <select name='pais_id' id='pais_id' onchange="obtener_sociedades(this.value);change_pais(this.value);">
                    <option id='0' name='0' value="0">Seleccione...</option>
                        <?php 
    $query = sprintf("SELECT p_id,p_nombre FROM pais WHERE p_estatus = 1");
    $var = mysql_query($query);
    while ($arr = mysql_fetch_assoc($var)) {
        echo sprintf("<option name='%s' id='%s' value='%s'>%s</option>", $arr['p_id'], $arr['p_id'], $arr['p_id'], $arr['p_nombre']);
    }
    ?>
                    
                    </select>
                    </td>
				</tr>
				 <tr>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][58];
    ?>
<span class="Estilo1">*</span>:</td>
                    <td> <select name='sociedad_id' id='sociedad_id' onchange="change_sociedad(this.value);">
						<option>Seleccione...</option>                 
                    </select>
                    </td>
				</tr>
   <tr>
                <td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][330];
    ?>
<span class="Estilo1">*</span>:</td>
                <td> <select name='aprobador_id' id='aprobador_id' onchange="change_aprobador(this.value);">
                		<option id='0' value="-1">Seleccione...</option>
                        <?php 
    $query = sprintf("SELECT u_id, u_nombre FROM usuario WHERE u_aprobador='1'");
    $var = mysql_query($query);
    while ($arr = mysql_fetch_assoc($var)) {
        echo sprintf("<option id='%s' value='%s'>%s</option>", $arr['u_id'], $arr['u_id'], $arr['u_nombre']);
    }
    ?>
             
                </select>
                </td>
               
            </tr> 
               <tr>
                <td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][326];
    ?>
<span class="Estilo1">*</span>:</td>
                <td> <select name='vicepresidencia_id' id='vicepresidencia_id' onchange="change_vicepresidencia(this.value);">
                		<option id='0' name='0' value="0">Seleccione...</option>
                        <?php 
    $query = sprintf("SELECT v_id, v_nombre FROM vicepresidencia WHERE v_estatus='1'");
    $var = mysql_query($query);
    while ($arr = mysql_fetch_assoc($var)) {
        echo sprintf("<option name='%s' id='%s' value='%s'>%s</option>", $arr['v_id'], $arr['v_id'], $arr['v_id'], $arr['v_nombre']);
    }
    ?>
             
                </select>
                </td>
               
            </tr>         
            <tr>
                <td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][28];
    ?>
:</td>
                <td>
                <input type="checkbox" name="estatus" id="estatus"/>
                </td>
            </tr>
            <tr>
                <td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][765];
    ?>
:</td>
                <td>
                <input type="checkbox" name="requerido" id="requerido"/>
                </td>
            </tr>         
				 <tr><td colspan="2">
					<input type="hidden" name="pais" id="pais" value="" readonly="readonly" />
					<input type="hidden" name="sociedad" id="sociedad" value="" readonly="readonly" />
					<input type="hidden" name="aprobador" id="aprobador" value="" readonly="readonly" />					
				</td></tr>
				 <tr>
				 	<td colspan="2" align="center">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][116];
    ?>
" name="registrar" onclick="return validate(); ">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][219];
    ?>
" name="cancelar">				 	</td>
				 </tr>
				 
			</table>
        </form>
		
		<?php 
    $I->Footer();
}
Example #13
0
function Muestra()
{
    $concepto = new Concepto();
    if (isset($_GET['concepto_id'])) {
        $concepto_id = $_GET['concepto_id'];
        $concepto->Load_Concepto($concepto_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 validate(){	
		if($("#concepto").val() == ""){
			alert("El concepto es un campo requerido.");
			$("#concepto").focus();		
			return false;
		}         
		if($("#cuenta").val() == ""){
			alert("El cuenta es un campo requerido.");
			$("#cuenta").focus();
			return false;
		}           
		var url = "services/Ajax_conceptos.php";
		var codigo = $("#cuenta").val();
		var regresa = true;		
		var id = <?php 
    echo $_GET['concepto_id'];
    ?>
;
		$.ajaxSetup({async:false});
		$.post(url,{codigo:codigo,id:id},function(data){						
			if(data!=''){
				alert("La cuenta ya ha sido asignado a otro Concepto.");
				$("#cuenta").focus();		
				regresa = false;		
			}
		});        
		return regresa;
	}
//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);
}
</script>

<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">&nbsp;</td>
				   <td><strong>Editar Concepto</strong></td>
                 </tr>
                <tr>
                    <td align="right">&nbsp;</td>
                    <td>
                        <input type="hidden" name="dc_id" id="dc_id" value="<?php 
    echo $_GET['concepto_id'];
    ?>
" readonly="readonly" style="border-color:#FFFFFF" />
                    </td>
                </tr>                 
				 <tr>
                    <td align="right" width="30%"><input type="hidden" name="catalogo" id="catalogo" size="70" value="0"/></td>
                </tr>
				 <tr>
                    <td align="right" width="30%">Concepto<span class="Estilo1">*</span>:</td><td> <input type="text" name="concepto" id="concepto" size="70" value="<?php 
    echo $concepto->Get_dato("cp_concepto");
    ?>
"/></td>
                </tr>
				 <tr>
                    <td align="right" width="30%">Cuenta<span class="Estilo1">*</span>:</td><td> <input type="text" name="cuenta" id="cuenta" size="70" onkeypress="return validaNum(event);" value="<?php 
    echo $concepto->Get_dato("cp_cuenta");
    ?>
"/></td>
                </tr>                
				 <tr>
				 	<td align="right" width="30%">Clasificaci&oacute;n :</td>
                        <td>
                            <select name='clasificacion'>
                                <?php 
    if ($concepto->Get_dato("cp_deducible") == 1) {
        ?>
                                    <option selected='selected' value='1'>DEDUCIBLE</option>
                                    <option value='0'>NO DEDUCIBLE</option>                                
                                <?php 
    } else {
        ?>
                                    <option value='1'>DEDUCIBLE</option>
                                    <option selected='selected' value='0'>NO DEDUCIBLE</option>                                   
                                <?php 
    }
    ?>
                            </select>
                        </td>
				</tr>
				<tr>
				 	<td align="right" width="30%">Estatus :</td>
                        <td>
                            <select name='estatus'>
                            	<?php 
    if ($concepto->Get_dato("cp_activo") == 1) {
        ?>
                            		<option selected value=1>ACTIVO</option>
                            		<option value=0>INACTIVO</option>
                        <?php 
    } else {
        ?>
                        			<option value=1>ACTIVO</option>
                            		<option selected value=0>INACTIVO</option>
                           		
						<?php 
    }
    ?>
            
                                
                            </select>
                        </td>
				</tr>
                                 
                
				 <tr><td colspan="2">&nbsp;</td></tr>
				 <tr>
				 	<td colspan="2" align="center">
				 		<input type="submit" value="Volver" name="volver">
				 		<input type="hidden" value="name_concepto" id="name_concepto" value=""/>
					</td>
				 </tr>
			</table>
        </form>
		
		<?php 
    $I->Footer();
}
function Muestra()
{
    $I = new Interfaz("Vicepresidencia:: Nueva Vicepresidencia", true);
    include "../../lib/php/messageResources.php";
    $INDEXIDIOMA = $_SESSION["idiomausuario"];
    ?>
<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">&nbsp;</td>
				   <td><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][325];
    ?>
</strong></td>
                 </tr>
				 <tr>
                    <td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][327];
    ?>
:<span class="Estilo1">*</span>:</td><td> <input type="text" name="nombre" id="nombre" size="70" /></td></tr>
				 <tr>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][331];
    ?>
:</td><td> <input type="text" name="descripcion" id="descripcion" size="40"/></td>
				</tr>
            <tr>
                <td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][28];
    ?>
:</td>
                <td>
                <input type="checkbox" name="estatus" id="estatus"/>
                </td>
            </tr>        
				 <tr><td colspan="2">
					<input type="hidden" name="pais" id="pais" value="" readonly="readonly" />
					<input type="hidden" name="sociedad" id="sociedad" value="" readonly="readonly" />
					<input type="hidden" name="aprobador" id="aprobador" value="" readonly="readonly" />					
				</td></tr>
				 <tr>
				 	<td colspan="2" align="center">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][116];
    ?>
" name="registrar" onclick="return validate(); ">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][219];
    ?>
" name="cancelar">				 	</td>
				 </tr>
				 
			</table>
        </form>
		
		<?php 
    $I->Footer();
}
Example #15
0
function Muestra()
{
    include "../../lib/php/messageResources.php";
    $INDEXIDIOMA = $_SESSION["idiomausuario"];
    $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" src="../../lib/js/valida_form.js" type="text/javascript"></script>

<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 colspan="6" align="center"><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][467];
    ?>
</strong></td>
                </tr>
				<tr>
                    <td align="right" width="45%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][327];
    ?>
<span class="Estilo1">*</span>:</td>
					<td> <input type="text" name="nombre" id="nombre" size="20" value=""/></td>
                </tr>
                <tr>
				 	<td align="right" width="">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][34];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td colspan="5">
						<?php 
    $concepto = new Concepto();
    ?>
						<select name="concepto_id" id="concepto_id" onChange="">
								<option name="concepto_id" id="concepto_id" value="-1">
									Selecciona un item
								</option>
							<?php 
    foreach ($concepto->Load_all_conceptos_gastos(1) as $arrE) {
        ?>
										<option name="concepto_id" id="concepto_id" value="<?php 
        echo $arrE['cg_id'];
        ?>
">
											<?php 
        echo $arrE['cg_nombre'];
        ?>
										</option>
							<?php 
    }
    ?>
						</select>					
					</td>
                </tr>
                <tr>
				 	<td align="right" width="">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][469];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td colspan="5">
						<?php 
    //$cluster=new Cluster();
    ?>
						<select name="nivel_id" id="nivel_id" >
								<option name="nivel_id" id="nivel_id" value="-1">
									Selecciona un item
								</option>
							<?php 
    $Usu = new Usuario();
    foreach ($Usu->Load_niveles(1) as $arrE) {
        ?>
								<option name="nivel_id" id="nivel_id" value="<?php 
        echo $arrE['j_id'];
        ?>
">
									<?php 
        echo $arrE['j_nombre'];
        ?>
								</option>
							<?php 
    }
    ?>
						</select>					
					</td>
                </tr>
                <tr>
				 	<td align="right" width="">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][55];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td colspan="5">
						<?php 
    $pais = new Pais();
    ?>
						<select name="pais_id" id="pais_id" onChange="">
								<option name="pais_id" id="pais_id" value="-1">
									Selecciona un item
								</option>
							<?php 
    foreach ($pais->Load_all_pais_destino(1) as $arrE) {
        ?>
										<option name="pais_id" id="pais_id" value="<?php 
        echo $arrE['pd_id'];
        ?>
">
											<?php 
        echo $arrE['pd_nombre'];
        ?>
										</option>
							<?php 
    }
    ?>
						</select>					
					</td>
                </tr>
				<tr>
                    <td align="right" width=""><?php 
    echo $LABELINDEX[$INDEXIDIOMA][470];
    ?>
<span class="Estilo1">*</span>:</td><td colspan="5"> <input type="text" name="cantidad" id="cantidad" size="20" value="" onkeypress="return validaNum(event)" /></td>
                </tr>
				<tr>
				 	<td align="right" width=""><?php 
    echo $LABELINDEX[$INDEXIDIOMA][471];
    ?>
:</td>
                    <td colspan="5">
						<input type=checkbox name="asistentes" id="asistentes" />
                    </td>
				</tr>
				<tr>
				 	<td align="right" width=""><?php 
    echo $LABELINDEX[$INDEXIDIOMA][472];
    ?>
:</td>
                    <td>
						<input type=checkbox name="recurrente" id="recurrente" />
                    </td>
				 	<td align="right" width=""><?php 
    echo $LABELINDEX[$INDEXIDIOMA][473];
    ?>
:</td>
                    <td>
						<input type=radio name="dia" id="dia" value="1" />
                    </td>
				 	<td align="right" width=""><?php 
    echo $LABELINDEX[$INDEXIDIOMA][474];
    ?>
:</td>
                    <td>
						<input type=radio name="dia" id="dia" value="0" />
                    </td>
				</tr>
                <tr>
				 	<td align="right" width="">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][475];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td colspan="5">
						<select name="tipo_id" id="tipo_id" onChange="">
								<option name="tipo_id" id="tipo_id" value="-1">
									Selecciona un item
								</option>
								<option name="tipo_id" id="tipo_id" value="1">
									<?php 
    echo $LABELINDEX[$INDEXIDIOMA][476];
    ?>
								</option>
								<option name="tipo_id" id="tipo_id" value="2">
									<?php 
    echo $LABELINDEX[$INDEXIDIOMA][477];
    ?>
								</option>
						</select>					
					</td>
                </tr>
				<tr>
                    <td align="right" width=""><?php 
    echo $LABELINDEX[$INDEXIDIOMA][466];
    ?>
<span class="Estilo1">*</span>:</td><td colspan="5"> <input type="text" name="unidad" id="unidad" size="20" value=""/></td>
                </tr>
				<tr><td colspan="6">&nbsp;</td></tr>
				<tr>
				 	<td colspan="6" align="center">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][116];
    ?>
" name="registrar" onclick="return validate(); ">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][219];
    ?>
" name="cancelar">
					</td>
				</tr>
			</table>
        </form>
		
		<?php 
    $I->Footer();
}
Example #16
0
function Muestra()
{
    $I = new Interfaz("CentroCosto:: Nueva CentroCosto", 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">&nbsp;</td>
				   <td><strong>Nuevo Centro de Costos</strong></td>
                 </tr>
				 <tr>
                    <td align="right" width="30%">Nombre<span class="Estilo1">*</span>:</td><td> <input type="text" name="nombre" id="nombre" size="70" /></td></tr>
				 <tr>
				 	<td align="right" width="30%">C&oacute;digo<span class="Estilo1">*</span>:</td><td> <input type="text" name="codigo" id="codigo" size="40"/></td>
				</tr>
				 <tr>
				 	<td align="right" width="30%">Empresa :</td>
                    <td> <select name='empresa_id'>
                        <?php 
    $query = sprintf("SELECT e_id, e_codigo FROM empresas WHERE e_estatus = 0");
    $var = mysql_query($query);
    while ($arr = mysql_fetch_assoc($var)) {
        echo sprintf("<option value='%s'>%s</option>", $arr['e_id'], $arr['e_codigo']);
    }
    ?>
                    
                    </select>
                    </td>
				</tr>
				<tr>
                	<td align="right" width="30%">Estatus :</td>
                	<td> <select name='estatus'>                
                            <option value=0>Activo</option>
                            <option value=1>Inactivo</option>                                                                        
                	</select>
                	</td>
            	</tr>
            	<tr>
                	<td align="right" width="30%">Responsable CC :</td>
                	<td> <select name='responsable'>
                    <?php 
    $query = sprintf("SELECT idfwk_usuario, nombre FROM empleado");
    $var = mysql_query($query);
    while ($arr = mysql_fetch_assoc($var)) {
        echo sprintf("<option value='%s'>%s</option>", $arr['idfwk_usuario'], $arr['nombre']);
    }
    ?>
                    
                	</select>
                	</td>
            	</tr>
            	<tr>
                	<td align="right" width="30%">Director de Área :</td>
                	<td> <select name='directorarea'>
                    <?php 
    $query = sprintf("SELECT idfwk_usuario, nombre FROM empleado INNER JOIN usuario_tipo ON empleado.idfwk_usuario=usuario_tipo.ut_usuario WHERE usuario_tipo.ut_tipo=1");
    $var = mysql_query($query);
    while ($arr = mysql_fetch_assoc($var)) {
        echo sprintf("<option value='%s'>%s</option>", $arr['idfwk_usuario'], $arr['nombre']);
    }
    ?>
                    
                	</select>
                	</td>
            	</tr>
				
   				<!--  tr>
                <!-- td align="right" width="30%">Autorizadores<span class="Estilo1">*</span>:</td>
                <td> <select name='grupo_id'>
                    <?php 
    /*   $query=sprintf("SELECT g_id, g_nombre FROM grupos");
         $var=mysql_query($query);
         while($arr=mysql_fetch_assoc($var)){                            
             echo sprintf("<option value='%s'>%s</option>", $arr['g_id'], $arr['g_nombre']);                            
         }*/
    ?>
                    
                </select>
                </td>
            	</tr-->
            	              
				 <tr><td colspan="2">&nbsp;</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();
}
Example #17
0
function Muestra()
{
    $ceco = new CentroCosto();
    if (isset($_GET['ceco_id'])) {
        $ceco_id = $_GET['ceco_id'];
        $ceco->Load_CeCo($ceco_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 validate(){	
		if($("#nombre").val() == ""){
			alert("El nombre es un campo requerido.");
			$("#nombre").focus();		
			return false;
		}         
		if($("#codigo").val() == ""){
			alert("El código es un campo requerido.");
			$("#codigo").focus();
			return false;
		}           
		var url = "/eexpensesv2/admin/centros/services/Ajax_cecos.php";
		var codigo = $("#codigo").val();
		var regresa = true;		
		var id = <?php 
    echo $_GET['ceco_id'];
    ?>
;
		$.ajaxSetup({async:false});
		$.post(url,{codigo:codigo,id:id},function(data){						
			if(data!=''){
				alert("El código ya ha sido asignado a otro Centro de Costos.");
				$("#codigo").focus();		
				regresa = false;		
			}
		});        
		return regresa;
	}
</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">&nbsp;</td>
				<td><strong>Editar Centro de Costos</strong></td>
		    </tr>
			<tr>
				<td align="right">&nbsp;</td>
				<td>
					<input type="hidden" name="ceco_id" id="ceco_id" value="<?php 
    echo $ceco_id;
    ?>
" readonly="readonly" style="border-color:#FFFFFF" />
				</td>
		    </tr>
			<tr>
				<td align="right" width="30%">Nombre<span class="Estilo1">*</span>: 	</td>
                <td> <input type="text" name="nombre" id="nombre" size="70" value="<?php 
    echo $ceco->Get_dato("cc_nombre");
    ?>
"/>
				</td>
			</tr>
			<tr>
				<td align="right" width="30%">C&oacute;digo<span class="Estilo1">*</span>: 			
				</td>
				<td> 
					<input type="text" name="codigo" id="codigo" size="40" value="<?php 
    echo $ceco->Get_dato("cc_centrocostos");
    ?>
"/>
				</td>
			</tr>
            <tr>
                <td align="right" width="30%">Empresa :</td>
                <td> <select name='empresa_id'>
                    <?php 
    $cc_empresa_id = $ceco->Get_dato("cc_empresa_id");
    $query = sprintf("SELECT e_id, e_codigo FROM empresas WHERE e_estatus = 0");
    $var = mysql_query($query);
    $arr = mysql_fetch_assoc($var);
    if (count($arr) > 1) {
        do {
            if ($cc_empresa_id == $arr['e_id']) {
                echo sprintf("<option value='%s' selected='selected'>%s</option>", $arr['e_id'], $arr['e_codigo']);
            } else {
                echo sprintf("<option value='%s'>%s</option>", $arr['e_id'], $arr['e_codigo']);
            }
        } while ($arr = mysql_fetch_assoc($var));
    } else {
        $query = sprintf("SELECT e_id, e_codigo FROM empresas WHERE e_id =" . $cc_empresa_id);
        $var = mysql_query($query);
        $arr = mysql_fetch_assoc($var);
        echo sprintf("<option value='%s'>%s</option>", $cc_empresa_id, $arr['e_codigo']);
    }
    ?>
                    
                </select>
                </td>
            </tr>        
            
            <tr>
                	<td align="right" width="30%">Estatus :</td>
                	<td> <select name='estatus'>                
                		<?php 
    if ($ceco->Get_dato("cc_estatus") == 0) {
        ?>
                            		<option selected value=0>Activo</option>
                            		<option value=1>Inactivo</option>
                        <?php 
    } else {
        ?>
                        			<option value=0>Activo</option>
                            		<option selected value=1>Inactivo</option>
                           		
						<?php 
    }
    ?>
                            		                                                                        
                	</select>
                	</td>
            	</tr>
            <tr>
                	<td align="right" width="30%">Responsable CC :</td>
                	<td> <select name='responsable'>
                    <?php 
    $query = sprintf("SELECT idfwk_usuario, nombre FROM empleado");
    $var = mysql_query($query);
    while ($arr = mysql_fetch_assoc($var)) {
        if ($ceco->Get_dato("cc_responsable") == $arr['idfwk_usuario']) {
            echo sprintf("<option value='%s' selected>%s</option>", $arr['idfwk_usuario'], $arr['nombre']);
        } else {
            echo sprintf("<option value='%s'>%s</option>", $arr['idfwk_usuario'], $arr['nombre']);
        }
    }
    ?>
                    
                	</select>
                	</td>
            </tr>
            <tr>
                	<td align="right" width="30%">Director de Área :</td>
                	<td> <select name='directorarea'>
                    <?php 
    $query = sprintf("SELECT idfwk_usuario, nombre FROM empleado INNER JOIN usuario_tipo ON empleado.idfwk_usuario=usuario_tipo.ut_usuario WHERE usuario_tipo.ut_tipo=1");
    $var = mysql_query($query);
    while ($arr = mysql_fetch_assoc($var)) {
        if ($ceco->Get_dato("cc_director_de_area") == $arr['idfwk_usuario']) {
            echo sprintf("<option value='%s' selected>%s</option>", $arr['idfwk_usuario'], $arr['nombre']);
        } else {
            echo sprintf("<option value='%s'>%s</option>", $arr['idfwk_usuario'], $arr['nombre']);
        }
    }
    ?>
                    
                	</select>
                	</td>
            </tr>
                      
                
			<tr>
				<td colspan="2">&nbsp;</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();
}
Example #18
0
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">&nbsp;</td>
				<td><strong>Informaci&oacute;n de acceso al sistema</strong></td>
		    </tr>
			<tr>
				<td align="right">&nbsp;</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&ntilde;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&ntilde;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">&nbsp;</td>
									<td align="right">&nbsp;</td>
									<td align="right">&nbsp;</td>
									<td align="right">&nbsp;</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">&nbsp;</td>
				<td><strong>Informaci&oacute;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&eacute;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">&nbsp;</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();
}
Example #19
0
function Muestra()
{
    $I = new Interfaz("DestinoCiudad :: Nuevo Destino", true);
    include "../../lib/php/messageResources.php";
    $INDEXIDIOMA = $_SESSION["idiomausuario"];
    ?>
<style type="text/css">
<!--
.Estilo1 {color: #FF0000}
-->
</style>
		<br><br>
	<form name="formCDestino" method="post" action="">
		<table width="80%" align="center" cellpadding="4" cellspacing="4" border="0" bgcolor="#f4f4f4" style="padding-top: 20px;">
			<tr>
				<td align="right">&nbsp;</td>
				<td><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][341];
    ?>
</strong></td>
		    </tr>
			<tr>
				<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][229];
    ?>
<span class="Estilo1">*</span>: 	</td>
                <td><input type="text" name="nombre_destino" id="nombre_destino" size="40" /></td>
			</tr>
			<tr>
				<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][55];
    ?>
<span class="Estilo1">*</span>: </td>
				<td>
				<?
				$cnn = new conexion();
				$query = sprintf("SELECT pd_id, pd_nombre FROM pais_destino ORDER BY pd_id");
				$rst = $cnn->consultar($query);
				$fila = mysql_num_rows($rst);
				?>
				<select name="pais_destino" id="pais_destino">
					<option value="-1"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][346];
    ?>
</option>
					<?php 
    if ($fila > 0) {
        while ($fila = mysql_fetch_assoc($rst)) {
            echo "<option value=" . $fila["pd_id"] . ">" . $fila["pd_nombre"] . "</option>";
        }
    } else {
        echo "<option id='-1' value='-1'>" . $LABELINDEX[$INDEXIDIOMA][347] . "</option>";
    }
    ?>
				</select>
				</td>
			</tr>
			<tr>
				<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][28];
    ?>
: </td>
				<td><input type="checkbox" name="estatus_destino" id="estatus_destino" checked="checked" onclick="verEstatus_ciudad();" />
					<input type="hidden" name="estatus_destino_val" id="estatus_destino_val" value="1" /></td>
			</tr>
			<!--<tr>
				<td align="right" width="30%"><?php 
    //echo $LABELINDEX[$INDEXIDIOMA][343];
    ?>
:</td>
				<td><input type="checkbox" name="ciudad_Belcorp" id="ciudad_Belcorp" checked="checked" /></td>
			</tr>-->
			<tr>
			 	<td colspan="2" align="center">
			 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][116];
    ?>
" name="registrar" onclick="return validate_ciudad(); ">
				 	<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][219];
    ?>
" name="cancelar">
				</td>
			</tr>
			</table>
        </form>
		
		<?php 
    $I->Footer();
}
Example #20
0
function Muestra()
{
    include "../../lib/php/messageResources.php";
    $INDEXIDIOMA = $_SESSION["idiomausuario"];
    $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>

		<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>&nbsp;</td>
					<td colspan="4" align="center">
						<strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][441];
    ?>
</strong>
					</td>
					<td>&nbsp;</td>
				 </tr>
				 <tr>
					<td width="2%">&nbsp;</td>
					<td colspan="2" align="right" width="33%"> <?php 
    echo $LABELINDEX[$INDEXIDIOMA][327];
    ?>
<span class="Estilo1">*</span>:</td>
					<td colspan="2"> <input type="text" name="nombre" id="nombre" size="63" value="<?php 
    echo $Usu->Get_dato("u_nombre");
    ?>
" />
					</td>
					<td width="2%">&nbsp;</td>
				 </tr>
				 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%">	<?php 
    echo $LABELINDEX[$INDEXIDIOMA][0];
    ?>
<span class="Estilo1">*</span>: 			</td>
					<td colspan="2"> <input type="text" name="user" id="user" size="40" onKeypress="return bloqueaEspacio(event);" value="<?php 
    echo $Usu->Get_dato("u_usuario");
    ?>
"  /> 											
					</td>
					<td>&nbsp;</td>
				</tr>
				 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%"> <?php 
    echo $LABELINDEX[$INDEXIDIOMA][1];
    ?>
<span class="Estilo1">*</span>:					</td>
					<td colspan="2"> <input type="password" name="passwd"  id="passwd" size="40" onKeypress="return bloqueaEspacio(event);" value="<?php 
    echo $Usu->Get_dato("u_passwd");
    ?>
" />					</td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%"> <?php 
    echo $LABELINDEX[$INDEXIDIOMA][112];
    ?>
<span class="Estilo1">*</span>:					</td>
					<td colspan="2"> <input type="password" name="passwd2" id="passwd2" size="40" onKeypress="return bloqueaEspacio(event);" value="<?php 
    echo $Usu->Get_dato("u_passwd");
    ?>
" />					</td>
					<td>&nbsp;</td>
				</tr>
				 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%"> 
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][96];
    ?>
<span class="Estilo1">*</span>:					
					</td>
					<td colspan="2">
						<input type="text" name="email" id="email" size="40" onKeypress="return bloqueaEspacio(event);" value="<?php 
    echo $Usu->Get_dato("u_email");
    ?>
" />					
					</td>
					<td>&nbsp;</td>
				</tr>
				 <tr>
				   <td>&nbsp;</td>
				   <td colspan="4" align="right">&nbsp;</td>
				   <td>&nbsp;</td>
				 </tr>
				 <tr>
				   <td>&nbsp;</td>
				   <td colspan="4" align="center"><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][442];
    ?>
</strong></td>
				   <td>&nbsp;</td>
		         </tr>
				 <?
					$Usu2 = new Usuario();
					$normal = "";
					$administrador = "";
					$av1 = "";
					$av2 = "";
					$av3 = "";
					$uafi = "";
					foreach($Usu2->Load_tipo_usuario_by_id($usuario_id) as $datos){
						if($datos['tu_nombre'] == "Normal"){
							$normal = "checked";
						}
						if($datos['tu_nombre'] == "Administrador"){
							$administrador = "checked";
						}
						if($datos['tu_nombre'] == "Area FI"){
							$uafi = "checked";
						}
						if($datos['tu_nombre'] == "Agencia1"){
							$av1 = "checked";
						}
						if($datos['tu_nombre'] == "Agencia2"){
							$av2 = "checked";
						}
						if($datos['tu_nombre'] == "Agencia3"){
							$av3 = "checked";
						}

					}
				 ?>
		         <tr>
				   <td>&nbsp;</td>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][443];
    ?>
:</td>
                    <td>
						<input type=checkbox name="normal" id="normal" <? echo $normal ?>/>
                    </td>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][445];
    ?>
 1:</td>
                    <td>
						<input type=checkbox name="av1" id="av1" <? echo $av1 ?> />
                    </td>
				   <td>&nbsp;</td>
				 </tr>
		         <tr>
				   <td>&nbsp;</td>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][444];
    ?>
:</td>
                    <td>
						<input type=checkbox name="administrador" id="administrador" <? echo $administrador ?> />
                    </td>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][445];
    ?>
 2:</td>
                    <td>
						<input type=checkbox name="av2" id="av2" <? echo $av2 ?> />
                    </td>
				   <td>&nbsp;</td>
				 </tr>
		         <tr>
				   <td>&nbsp;</td>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][446];
    ?>
:</td>
                    <td>
						<input type=checkbox name="uafi" id="uafi" <? echo $uafi ?> />
                    </td>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][445];
    ?>
 3:</td>
                    <td>
						<input type=checkbox name="av3" id="av3" <? echo $av3 ?> />
                    </td>
				   <td>&nbsp;</td>
				 </tr>
		         <tr>
				   <td>&nbsp;</td>
				   <td>&nbsp;</td>
				   <td>&nbsp;</td>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][447];
    ?>
:</td>
                    <td>
						<input type=checkbox name="aprobador" id="aprobador" <? if($Usu->Get_dato("u_aprobador")==1){echo "checked";} ?> />
                    </td>
				   <td>&nbsp;</td>
				 </tr>
				 <tr>
				   <td>&nbsp;</td>
				   <td colspan="4" align="right">&nbsp;</td>
				   <td>&nbsp;</td>
				 </tr>
				 <tr>
				   <td>&nbsp;</td>
				   <td colspan="4" align="center"><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][182];
    ?>
</strong></td>
				   <td>&nbsp;</td>
		         </tr>
                 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][78];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td colspan="2">
						<?php 
    $cluster = new Cluster();
    ?>
						<select name="cluster_id" id="cluster_id" onChange="cargarPaises(this.value)">
								<option name="cluster_id" id="cluster_id" value="-1">
									<?php 
    echo $LABELINDEX[$INDEXIDIOMA][448];
    ?>
								</option>
							<?php 
    foreach ($cluster->Load_all(1) as $arrE) {
        ?>
								<option name="cluster_id" id="cluster_id" value="<?php 
        echo $arrE['c_id'];
        ?>
">
									<?php 
        echo $arrE['c_nombre'];
        ?>
								</option>
							<?php 
    }
    ?>
						</select>					
					</td>
					<td>&nbsp;</td>
				 </tr>       
                 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][55];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td colspan="2">
						<select name="pais_id" id="pais_id" onChange="cargarSociedades(this.value)" >
								<option name="pais_id" id="pais_id" value="-1">
									<?php 
    echo $LABELINDEX[$INDEXIDIOMA][449];
    ?>
								</option>
						</select>					
					</td>
					<td>&nbsp;</td>
				 </tr>       
                 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][58];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td colspan="2">
						<select name="sociedad_id" id="sociedad_id" onChange="cargarCecos(this.value)" >
								<option name="sociedad_id" id="sociedad_id" value="-1">
									<?php 
    echo $LABELINDEX[$INDEXIDIOMA][449];
    ?>
								</option>
						</select>					
					</td>
					<td>&nbsp;</td>
				 </tr>       
                 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][450];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td colspan="2">
						<select name="ceco_id" id="ceco_id" onChange="cargarJefes(this.value)" >
								<option name="ceco_id" id="ceco_id" value="-1">
									<?php 
    echo $LABELINDEX[$INDEXIDIOMA][449];
    ?>
								</option>
						</select>					
					</td>
					<td>&nbsp;</td>
				 </tr>       
				 <tr>
					<td>&nbsp;</td>
				   <td colspan="2" align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][451];
    ?>
 :</td>
				   <td colspan="2"><input type="text" name="telefono" id="telefono" size="20" onKeyPress="return validaNum(event)" value="<?php 
    echo $Usu->Get_dato("telefono");
    ?>
" /></td>
					<td>&nbsp;</td>
				 </tr>
				 <tr>
					<td>&nbsp;</td>
				   <td colspan="2" align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][452];
    ?>
 :</td>
				   <td colspan="2"><input type="text" name="extension" id="extension" size="20" onKeyPress="return validaNum(event)" value="<?php 
    echo $Usu->Get_dato("extension");
    ?>
" /></td>
					<td>&nbsp;</td>
				 </tr>
				 <!--
				 <tr>
					<td>&nbsp;</td>
                   <td colspan="2" align="right">No. Tarjeta Cr&eacute;dito<span class="Estilo1">*</span>:</td>
				   <td colspan="2"><input type="text" name="no_tarjeta" id="no_tarjeta" size="20" value="<?php 
    echo $Usu->Get_dato("notarjetacredito");
    ?>
" /></td>
					<td>&nbsp;</td>
		         </tr>
				 -->
				 <tr>
					<td>&nbsp;</td>
                   <td colspan="2" align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][453];
    ?>
:</td>
				   <td colspan="2"><input type="text" name="no_tarjeta_corp" id="no_tarjeta_corp" size="20" value="<?php 
    echo $Usu->Get_dato("notarjetacorp");
    ?>
"/></td>
					<td>&nbsp;</td>
		         </tr>
				 <tr>
					<td>&nbsp;</td>
                   <td colspan="2" align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][454];
    ?>
:</td>
				   <td colspan="2"><input type="text" name="no_tarjeta_viajero" id="no_tarjeta_viajero" size="20" value="<?php 
    echo $Usu->Get_dato("notarjetaviajero");
    ?>
"/></td>
					<td>&nbsp;</td>
		         </tr>
				 <tr>
					<td>&nbsp;</td>
                   <td colspan="2" align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][455];
    ?>
 :</td>
				   <td colspan="2"><input type="text" name="no_acreedor" id="no_acreedor" size="20" value="<?php 
    echo $Usu->Get_dato("noacreedorsap");
    ?>
"  /></td>
					<td>&nbsp;</td>
		         </tr>
			  	 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][456];
    ?>
<span class="Estilo1">*</span>:
					</td>
					<td colspan="2">
						<?php 
    //$cluster=new Cluster();
    ?>
						<select name="nivel_id" id="nivel_id" >
								<option name="nivel_id" id="nivel_id" value="-1">
									<?php 
    echo $LABELINDEX[$INDEXIDIOMA][448];
    ?>
								</option>
							<?php 
    foreach ($Usu->Load_niveles(1) as $arrE) {
        ?>
								<option name="nivel_id" id="nivel_id" value="<?php 
        echo $arrE['j_id'];
        ?>
">
									<?php 
        echo $arrE['j_nombre'];
        ?>
								</option>
							<?php 
    }
    ?>
						</select>					
					</td>
					<td>&nbsp;</td>
				 </tr> 
			  	 <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%">
						<?php 
    echo $LABELINDEX[$INDEXIDIOMA][440];
    ?>
 :
					</td>
					<td colspan="2">
						<select name="jefe_id" id="jefe_id" >
								<option name="jefe_id" id="jefe_id" value="-1">
									<?php 
    echo $LABELINDEX[$INDEXIDIOMA][449];
    ?>
								</option>
						</select>					
					</td>
					<td>&nbsp;</td>
				 </tr> 
		         <tr>
					<td>&nbsp;</td>
				 	<td colspan="2" align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][28];
    ?>
:</td>
                    <td colspan="2">
						<input type=checkbox name="estatus" id="estatus" <? if($Usu->Get_dato("u_estatus")==1){echo "checked";} ?> />
                    </td>
					<td>&nbsp;</td>
				 </tr>
				 <tr>
					<td>&nbsp;</td>
				 	<td colspan="4" align="center">
						<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][345];
    ?>
" name="actualizar" onclick="return validaUsuarioDuplicado();">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][219];
    ?>
" name="cancelar">				 	</td>
					<td>&nbsp;</td>
				 </tr>
			</table>
</form>
		
		<?php 
    $I->Footer();
}
Example #21
0
function Muestra()
{
    $clasedoc = new Clasedoc();
    if (isset($_GET['cd_id'])) {
        $clasedoc_id = $_GET['cd_id'];
        $clasedoc->Load_Clasedoc($clasedoc_id);
    } else {
        header("Location: index.php?cd_id=" . $clasedoc_id);
    }
    $I = new Interfaz("Clasedoc:: Editar Clasedoc", true);
    global $LABELINDEX, $INDEXIDIOMA;
    ?>
<style type="text/css">
<!--
.Estilo1 {color: #FF0000}
-->
</style>
<script src="../../lib/js/jquery/jquery-1.3.2.js" type="text/javascript"></script>
<script src="../../lib/js/validateForm.js" type="text/javascript"></script>
<script  src="js/validaformcd.js" type="text/javascript"></script>

<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">&nbsp;</td>
				   <td><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][418];
    ?>
</strong></td>
                 </tr>
				 <tr>
                    <td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][411];
    ?>
<span class="Estilo1">*</span>:</td><td> <input type="text" name="nombre" id="nombre" size="40" value="<?php 
    echo $clasedoc->Get_Dato("cd_nombre");
    ?>
"/></td>
                 </tr>
                 <tr>
                    <td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][413];
    ?>
<span class="Estilo1"></span>:</td><td> <input type="text" name="descripcion" id="descripcion" size="40" value="<?php 
    echo $clasedoc->Get_Dato("cd_descripcion");
    ?>
"/></td>
                 </tr>
                 <tr>
                    <td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][414];
    ?>
<span class="Estilo1">*</span>:</td><td> <select name="tipo" id="tipo" >                    
                     <option value="-1">Seleccione</option>
		             <?php 
    if (strcmp($clasedoc->Get_Dato("cd_tipo"), "0") == 0) {
        echo "<option value='0' selected>Extranjero</option>";
        echo "<option value='1'>Nacional</option>";
    } else {
        echo "<option value='0'>Extranjero</option>";
        echo "<option value='1' selected>Nacional</option>";
    }
    ?>
                    </td>
                 </tr>
                 <tr>
                    <td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][415];
    ?>
<span class="Estilo1">*</span>:</td>
                    <td>
                    <?
						$cnn = new conexion();
						$query = sprintf("SELECT p_id, p_nombre FROM pais ORDER BY p_id");
						$rst = $cnn->consultar($query);
						$fila = mysql_num_rows($rst);
						?>
				<select name="pais" id="pais">
					<option value="-1"> Seleccione </option>
					<?php 
    if ($fila > 0) {
        while ($fila = mysql_fetch_assoc($rst)) {
            if (strcmp($clasedoc->Get_Dato("cd_pais"), $fila["p_id"]) == 0) {
                echo "<option value=" . $fila["p_id"] . "  selected >" . $fila["p_nombre"] . "</option>";
            } else {
                echo "<option value=" . $fila["p_id"] . ">" . $fila["p_nombre"] . "</option>";
            }
        }
    } else {
        echo "<option id='-1' value='-1'>No hay paises</option>";
    }
    ?>
				</select>
                    </td>
                 </tr>
                 <tr>
                    <td align="right" width="30%">
                    <?php 
    echo $LABELINDEX[$INDEXIDIOMA][416];
    ?>
                    <span class="Estilo1">*</span>:</td><td>
                    <?php 
    if ($clasedoc->Get_Dato("cd_definicion") == 1) {
        echo "Concepto:<input type='radio'  name='radioDef' value='1' checked onclick='validacion();'/>";
        echo "Documento:<input type='radio' name='radioDef'  value='2' onclick='validacion();'/>";
    } else {
        echo "Concepto:<input type='radio'  name='radioDef' value='1'  onclick='validacion();'/>";
        echo "Documento:<input type='radio' name='radioDef'  value='2' checked onclick='validacion();'/>";
    }
    ?>
                     </td>
                 </tr>
          		<tr>
       		     <td align="right" width="30%">                
       		     <?php 
    if ($clasedoc->Get_Dato("cd_definicion") == 1) {
        echo "<div id='clasificacionDIV'>";
    } else {
        echo "<div id='clasificacionDIV' style='display:none;'>";
    }
    ?>
	
                	<?php 
    echo $LABELINDEX[$INDEXIDIOMA][417];
    ?>
:</div>
                </td>
                
                   <td>
                    <?
						$cnn = new conexion();
						$query = sprintf("SELECT c_id,c_nombre,c_estatus from clasificacion ORDER BY c_id");
						$rst = $cnn->consultar($query);
						$fila = mysql_num_rows($rst);
						?>
					<?php 
    if ($clasedoc->Get_Dato("cd_definicion") == 1) {
        echo "<div id='clasificacionDIV2'>";
    } else {
        echo "<div id='clasificacionDIV2' style='display:none;'>";
    }
    ?>
	
               														
					<select name="clasificacion" id="clasificacion">
					<option value="-1"> Seleccione </option>
					<?php 
    if ($fila > 0) {
        while ($fila = mysql_fetch_assoc($rst)) {
            if (strcmp($clasedoc->Get_Dato("cd_clasificacion"), $fila["c_id"]) == 0) {
                echo "<option value=" . $fila["c_id"] . " selected >" . $fila["c_nombre"] . "</option>";
            } else {
                echo "<option value=" . $fila["c_id"] . "  >" . $fila["c_nombre"] . "</option>";
            }
        }
    } else {
        echo "<option id='-1' value='-1'>No hay clasificaciones</option>";
    }
    ?>
				</select>
				</div>
                </td>
                    
                 </tr>
				<tr>
				 	<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][412];
    ?>
:</td>
				 	<td> 
				 	<?php 
    if ($clasedoc->Get_Dato("cd_estatus") == 1) {
        echo "<input type='checkbox' name='estatus' id='estatus' checked/>";
    } else {
        echo "<input type='checkbox' name='estatus' id='estatus'/>";
    }
    ?>
				 	</td>				 	
				</tr>
				 <tr><td colspan="2">&nbsp;</td></tr>
				 <tr>
				 	<td colspan="2" align="center">
				 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][345];
    ?>
" name="Actualizar" onclick="return validateClasedoc();">
 						<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][219];
    ?>
" name="Cancelar">			 	
				 		</td>
				 </tr>
			</table>
			<input type="hidden" name="definicionvalue" id="definicionvalue" value='<?php 
    echo $clasedoc->Get_Dato("cd_definicion");
    ?>
' />
			<input type="hidden" name="cd_id" id="cd_id" value='<?php 
    $_GET["cd_id"];
    ?>
'/>
        </form>

<?php 
    $I->Footer();
}
function Muestra()
{
    $modeloAuto = new ModeloAuto();
    if (isset($_GET['ma_id'])) {
        $modeloAuto_id = $_GET['ma_id'];
        $modeloAuto->Load_modeloAuto($ma_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 validate(){
	
    if(!validateForm("nombre","","El nombre es un campo requerido",1)){
        return false;
    }          
    if(!validateForm("factor","","El factor es un campo requerido",1)){
        return false;
    }
	if(!validateForm("estatus","","El estatus es un campo requerido",1)){
        return false;
    }                   
    return true;
}

function confirma(){
	if(!confirm("¿Seguro que desea cancelar la actualización de los datos?")){
		return false;
	}else{
		location.href="index.php?";
	}
	
}
//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);
}

</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">&nbsp;</td>
				<td><strong>Editar Centro de Costos</strong></td>
		    </tr>
			<tr>
				<td align="right">&nbsp;</td>
				<td>
					<input type="hidden" name="ma_id" id="ma_id" value="<?php 
    echo $modeloAuto_id;
    ?>
" readonly="readonly" style="border-color:#FFFFFF" />
				</td>
		    </tr>
			<tr>
				<td align="right" width="30%">Nombre<span class="Estilo1">*</span>: 	</td>
                <td> <input type="text" name="nombre" id="nombre" size="70" value="<?php 
    echo $modeloAuto->Get_Nombre($modeloAuto_id);
    ?>
"/>
				</td>
			</tr>
			<tr>
				<td align="right" width="30%">Factor<span class="Estilo1">*</span>: 			
				</td>
				<td> 
					<input type="text" name="factor" id="factor" size="40" onkeypress="return validaNum(event);" value="<?php 
    echo $modeloAuto->Get_Factor($modeloAuto_id);
    ?>
"/>
				</td>
			</tr>
             <tr>
                <td align="right" width="30%">Estatus :</td>
                <td> <select name='estatus'>
				 <?php 
    $query = sprintf("SELECT ma_estatus, IF(ma_estatus=1,'Activo','Inactivo') as est FROM modelo_auto WHERE ma_id = " . $modeloAuto_id);
    $var = mysql_query($query);
    while ($arr = mysql_fetch_assoc($var)) {
        $selected = "selected";
        if ($arr['ma_estatus'] == 1) {
            echo '<option value="1" ' . $selected . '>Activo</option>';
            echo '<option value="0">Inactivo</option>';
        } else {
            echo '<option value="1">Activo</option>';
            echo '<option value="0" ' . $selected . '>Inactivo</option>';
        }
    }
    ?>
                          
                </select>
                </td>
            </tr>        
			<tr>
				<td colspan="2">&nbsp;</td></tr>
			<tr>
				<td colspan="2" align="center">
				 	<input type="button" value="Volver" name="volver" onclick="confirma();">				 	
				</td>
			</tr>
			</table>
</form>
<?php 
    $I->Footer();
}
Example #23
0
function Muestra()
{
    include "../../lib/php/messageResources.php";
    $INDEXIDIOMA = $_SESSION["idiomausuario"];
    $I = new Interfaz("DestinoPais :: Nuevo Destino", true);
    ?>
<style type="text/css">
<!--
.Estilo1 {color: #FF0000}
-->
</style>
		<br><br>
	<form name="formPDestino" method="post" action="">
		<table width="80%" align="center" cellpadding="4" cellspacing="4" border="0" bgcolor="#f4f4f4" style="padding-top: 20px;">
			<tr>
				<td align="right">&nbsp;</td>
				<td><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][376];
    ?>
</strong></td>
		    </tr>
			<tr>
				<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][340];
    ?>
<span class="Estilo1">*</span>: 	</td>
                <td><input type="text" name="nombre_destino" id="nombre_destino" size="40" /></td>
			</tr>
			<tr>
				<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][375];
    ?>
<span class="Estilo1">*</span>: </td>
				<td><input type="text" name="codigo_destino" id="codigo_destino" size="40" /></td>
			</tr>
			<tr>
				<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][28];
    ?>
: </td>
				<td><input type="checkbox" name="estatus_destino" id="estatus_destino" checked="checked" onclick="verEstatus_paisd();" />
					<input type="hidden" name="estatus_destino_val" id="estatus_destino_val" value="1" /></td>
			</tr>
			<!--<tr>
				<td>&nbsp;</td>
				<td><div id="estado"><strong><?php 
    //echo $LABELINDEX[$INDEXIDIOMA][377];
    ?>
</strong></div></td>
			</tr>-->
			<tr>
			 	<td colspan="2" align="center">
			 		<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][116];
    ?>
" name="registrar" onclick="return validate_paisd(); ">
				 	<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][219];
    ?>
" name="cancelar">
				</td>
			</tr>
			</table>
        </form>
		
		<?php 
    $I->Footer();
}
Example #24
0
function Muestra()
{
    include "../../lib/php/messageResources.php";
    $INDEXIDIOMA = $_SESSION["idiomausuario"];
    $empleado = $_SESSION["empleado"];
    $usuario = $_SESSION["usuario"];
    $Usu = new Usuario();
    $Usu->Load_Usuario($empleado);
    $rowsEmpleado = $Usu->Load_Usuario($empleado);
    $cnn = new conexion();
    $MsjDelegar = "";
    ?>
<html>
<head>

<script language="JavaScript" src="../../lib/js/jquery/jquery-1.3.2.js" type="text/javascript"></script>
<script src="../../lib/js/jquery/jquery.fadeSliderToggle.js" type="text/javascript"></script>
<script src="../../lib/js/withoutReloadingUsuario.js" type="text/javascript"></script>
<script language="JavaScript" src="../../lib/js/jquery/jquery.autocomplete.js" type="text/javascript"></script>
<script type="text/javascript">

	var doc;
	var valPs=false;

	doc = $(document);
	doc.ready(inicializarEventos);
	
	function inicializarEventos(){

	}
	
	function seleccionaItem(li) {
		buscaIdUser(li);
	}//fin seleccionaItem
	
			
	function arreglaItem(row) {
	//da el formato a la lista
		return row[0];
	}//fin arreglaItem
	
	
	function seleccionaItem2(li) {
		buscaUser(li);
	}//fin seleccionaItem
	

	function validaNum(valor){
		cTecla=(document.all)?valor.keyCode:valor.which;
		
		if(cTecla==8) return true;
		if(cTecla==0) return true;
		if(cTecla==122) return true;
		if(cTecla==120) return true;
		if(cTecla==118) return true;
		if(cTecla==99) return true;
			patron=/^([0-9]{1,2})?$/;
			cTecla= String.fromCharCode(cTecla);			
		return patron.test(cTecla);
	}
	
	function validaTelefono(valor){
		cTecla=(document.all)?valor.keyCode:valor.which;
		
		if(cTecla==8) return true;
		if(cTecla==0) return true;
		if(cTecla==122) return true;
		if(cTecla==120) return true;
		if(cTecla==118) return true;
		if(cTecla==99) return true;
			patron=/^([0-9]{1,2})?-?$/;
			cTecla= String.fromCharCode(cTecla);			
		return patron.test(cTecla);
	}
	
	function bloqueaEspacio(valor){
		cTecla=(document.all)?valor.keyCode:valor.which;
		if(cTecla==32)
			return false;
		else
			return true;
	}	
	

function changeIdioma(){	
	var idioma=$("#idioma_preferido").val();

			$.ajax({
				type: "POST",
				url: "ingreso_sin_recargar_proceso_usuario.php",
				data: "idiomapreferido="+idioma,
				success: function(json){
					if(json=="realizado")
					location.reload();
				}
			});
	

}
	var bandEmail=false;
	
	function validatorForm(){

		if($("#email").val()!= "" && $("#telefono").val()!=""){
			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 (!(/^[0-9]+(-? ?[0-9]+)*$/.test($("#telefono").val()))){
				alert("Numero de telefono invalido");
				return false;
			}else if($("#passwd").val() != $("#passwd2").val()){
				alert("La contraseña no coincide, por favor intente nuevamente");
				return false;				
			}
		}		
	}

</script>
<meta http-equiv="Pragma" content="no-cache">
<style>
	.fader{opacity:0;display:none;}
	.style1 {color: #FF0000; vertical-align:top}
	.divProceso { color:#FF0000; font-size:14px}
</style>
<link rel="stylesheet" type="text/css" href="../../css/jquery.autocomplete.css"/>
</head>

<body>
<?php 
    $I = new Interfaz("Usuarios:: Actualización de mi Perfil", true);
    ?>
<br><br>

<form name="dataUser" id="dataUser" method="post">
			<table width="80%" align="center" cellpadding="4" cellspacing="4" border="0" bgcolor="#f4f4f4" style="padding-top: 20px;">
<tr><td valign="top" width="100%">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="#f5f5f5">
    <tr>
    	<td class="formlabel">&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
        <tr>
    	<td class="formlabel"><div align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][1];
    ?>
: </div></td>
        <td>
			<input name="password" type="password" class="SrcInput" id="password" value="<?php 
    echo $Usu->Get_dato('u_passwd');
    ?>
" onKeypress="return bloqueaEspacio(event);"/>
		</td>
    </tr>
    <tr>
    	<td class="formlabel"><div align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][111];
    ?>
: </div></td>
        <td>
			<input name="new_password" type="password" class="SrcInput" id="new_password" value="" onKeypress="return bloqueaEspacio(event);"/>
		</td>
    </tr>
   
    
    
    
    <tr>
    	<td class="formlabel"><div align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][556];
    ?>
: </div></td>
        <td>
			<input name="email" type="text" class="SrcInput" id="email" value="<?php 
    echo $Usu->Get_dato('u_email');
    ?>
" onKeypress="return bloqueaEspacio(event);"/>
		</td>
    </tr>
    <tr>
    	<td class="formlabel"><div align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][451];
    ?>
:</div></td>
        <td>
			<input name="telefono" type="text" class="SrcInput" id="telefono" value="<?php 
    echo $Usu->Get_dato('telefono');
    ?>
" onKeyPress="return validaTelefono(event);">
		</td>
    </tr>
        <tr>
    	<td class="formlabel"><div align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][452];
    ?>
:</div></td>
        <td>
			<input name="extension" type="text" class="SrcInput" id="extension" value="<?php 
    echo $Usu->Get_dato('extension');
    ?>
" onKeyPress="return validaNum(event);">
		</td>
    </tr>
     <tr>
			<td class="formlabel"><div align="right"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][114];
    ?>
:</div></td>
			<td>
				<select id=idioma_preferido name='idioma_preferido' onchange="changeIdioma();" onblur="changeIdioma();">
					<?
					$u_idioma=$Usu->Get_dato('u_idioma');
					$selected1 = "";
					$selected2 = "";
					$selected3 = "";
					if($u_idioma == "0"){
						$selected1 = "selected";
					}else if($u_idioma == "1"){
						$selected2 = "selected";
					}else if($u_idioma == "2"){
						$selected3 = "selected";
					}
					?>
					<option value='0' <? echo $selected1; ?> ><?php 
    echo $LABELINDEX[$INDEXIDIOMA][793];
    ?>
</option>
					<option value='1' <? echo $selected2; ?> ><?php 
    echo $LABELINDEX[$INDEXIDIOMA][794];
    ?>
</option>
					<option value='2' <? echo $selected3; ?> ><?php 
    echo $LABELINDEX[$INDEXIDIOMA][795];
    ?>
</option>
				</select>
			</td>
		</tr>
    <tr>
		<td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>


   
    <tr>
    	<td colspan="2" class="txtBluAr9"><?php 
    imprime_mensajes();
    ?>
</td>
    </tr>    
	<tr>
        <td  align="right">
			<input name="actualiza" type="submit" id="actualiza" onClick="return validatorForm();" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][345];
    ?>
">&nbsp;&nbsp;
			</td>
		<td>
			<input name="cancelar" type="submit" id="cancelar"  value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][219];
    ?>
">&nbsp;&nbsp;
			</td>
	</tr>
	
	<tr>
		<td colspan="2">&nbsp;
			
		</td>
	</tr>
    <tr>
    	<td colspan="2"><div class="txtBluAr9" align="center"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][558];
    ?>
</div></td>       
       </tr>
</table>
</td>
<td valign="top" width="60%">

</td>
</tr>
</table>
</center>
</form>
<center><div id="Proceso" class="divProceso"></div></center>
<?php 
    $I->Footer();
    ?>
</body>
</html>
<?php 
}
Example #25
0
<?php

session_start();
require_once "../lib/php/constantes.php";
require_once "{$RUTA_A}/Connections/fwk_db.php";
require_once "{$RUTA_A}/functions/utils.php";
require_once "../functions/report.php";
$I = new Interfaz("Reportes", true);
?>
<html>
<!-- Inicia forma para comprobación -->
<script language="JavaScript" src="../lib/js/jquery/jquery-1.3.2.js" type="text/javascript"></script>
<script language="JavaScript" src="../lib/js/jquery/jquery.date_input.js" type="text/javascript"></script>
<script language="JavaScript" src="../lib/js/jquery/jquery.tablesorter.js" type="text/javascript"></script>
<script language="JavaScript" src="../lib/js/jquery/jquery.autocomplete.js" type="text/javascript"></script>
<script language="JavaScript" src="../lib/js/jquery/jquery.bgiframe.js" type="text/javascript"></script>
<script language="JavaScript" src="../lib/js/formatNumber.js" type="text/javascript"></script>
<script language="JavaScript" src="../lib/js/withoutReloading.js" type="text/javascript"></script>



<script language="JavaScript" type="text/javascript">
//Fecha
$(function() {
	//campo
	$("#fechaInicio").date_input();
	$("#fechaFin").date_input();
	});


	//obtiene formato de fecha YYYY/mm/dd
Example #26
0
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">&nbsp;</td>
				   <td><strong>Informaci&oacute;n de acceso al sistema</strong></td>
		      </tr>
				 <tr>
			     <td align="right" width="30%"> Nombre<span class="Estilo1">*</span>: 	</td><td> <input type="text" name="nombre" id="nombre" size="40" /> 										</td></tr>
				 <tr>
			     <td align="right" width="30%"> Apellido Paterno<span class="Estilo1">*</span>: 	</td><td> <input type="text" name="apaterno" id="apaterno" size="40" /> 										</td></tr>
				 <tr>
			     <td align="right" width="30%"> Apellido Materno : 	</td><td> <input type="text" name="amaterno" id="ampaterno" 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" onKeypress="return bloqueaEspacio(event);"/> 											
					</td>
				</tr>
				 <tr>
				 	<td align="right" width="30%"> Contrase&ntilde;a<span class="Estilo1">*</span>:					</td>
					<td> <input type="password" name="passwd"  id="passwd" size="40" onKeypress="return bloqueaEspacio(event);"/>					</td>
				</tr>
				<tr>
				 	<td align="right" width="30%">Confirma contrase&ntilde;a<span class="Estilo1">*</span>:					</td>
					<td> <input type="password" name="passwd2" id="passwd2" size="40" 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" onKeypress="return bloqueaEspacio(event);"/>					
					</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 
    $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><div style="position:relative">
									<td align="right">&nbsp;</td>
									<td align="right">&nbsp;</td>
									<td align="right">&nbsp;</td>
									<td align="right">&nbsp;</td>
									<td align="left"><input type="checkbox" <?php 
        echo "id='sel" . $indicTiposUsuario2 . "'";
        ?>
  name="seleccion[]" value="<?php 
        echo $arrTiposUsuario[$indicTiposUsuario2][0];
        ?>
"><?php 
        echo $arrTiposUsuario[$indicTiposUsuario2][1];
        ?>
</input></td>
									<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>
									</div>
								</tr>
							<?php 
    }
    ?>
						
				
				</table>
				<table width="80%"  align="center" cellpadding="4" cellspacing="4" border="0" bgcolor="#f4f4f4" style="padding-top: 20px;">
				 <tr>
				   <td align="right">&nbsp;</td>
				   <td>&nbsp;</td>
				 </tr>
				 <tr>
				   <td align="right">&nbsp;</td>
				   <td><strong>Informaci&oacute;n del Empleado</strong></td>
		         </tr>
		         <?php 
    $idDirGral = $Usu->Load_dir_general();
    if ($idDirGral == 0) {
        ?>
			         <tr>
			         	<td align="right" width="30%">
			         		Director General:
			         	</td>
			         	<td>
			         		<input type="checkbox" id="dirgeneral" name="dirgeneral"/>
			         	</td>
			         </tr>
			     <?php 
    }
    ?>
                 <tr>
				 	<td align="right" width="30%"> 
						Empresa:					</td>
					<td> 
					<?php 
    $empresa = new Empresa();
    ?>
					<select name="empresa_id" id="empresa_id">
						<?php 
    foreach ($empresa->Load_all_activas() 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">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)) {
        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<span class="Estilo1">*</span>:</td>
				   <td><input type="text" name="proveedor" id="proveedor" size="40" /></td>
				 </tr>
				 <tr>				   
				   <input type="hidden" name="producto" id="producto" size="40" />
				 </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">Tarjeta de Cr&eacute;dito:</td>
				   <td><input type="text" name="amex2" id="amex2" size="16" onkeypress="return validaNum(event);"/></td>
		         </tr>
				 <tr>
                   <td align="right">Tarjeta de Cr&eacute;dito Gasolina:</td>
				   <td><input type="text" name="amex2gas" id="amex2gas" size="16" onkeypress="return validaNum(event);"/></td>
		         </tr>
		         <tr>
				 	<td align="right" width="30%">Estatus:</td>
                        <td>
                            <select name='estatus'>
                            	<option value='1'>ACTIVO</option>
                                <option value='0'>INACTIVO</option>
                                
                            </select>
                        </td>
				</tr>
				<tr>
				   <td align="right">Cuenta por cobrar:</td>
				   <td><input type="text" name="cuentaporcobrar" id="cuentaporcobrar" size="40"  onkeypress="return validaNum(event);"/></td>
				 </tr>
				
				 <tr>                
                
                 <!--
				 <tr>
				   <td align="right">&nbsp;</td>
				   <td><strong>Informaci&oacute;n Adicional</strong></td>
                 </tr>
                   <td align="right">Tel&eacute;fono:</td>
				   <td><input type="text" name="tel2" id="tel2" size="40" onkeypress="return validaNum (event)" /></td>
		         </tr>
                 -->
			
				 <tr><td colspan="2">&nbsp;</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();
}
Example #27
0
function Muestra()
{
    include "../../lib/php/messageResources.php";
    $INDEXIDIOMA = $_SESSION["idiomausuario"];
    $pais = new Pais();
    if (isset($_GET['pais_id'])) {
        $pais_id = $_GET['pais_id'];
        $pais->Load_Pais($pais_id);
    } else {
        header("Location: index.php");
    }
    $I = new Interfaz("Pais :: Editar Pais", 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" src="../../lib/js/valida_form.js" type="text/javascript"></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">&nbsp;</td>
				<td><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][389];
    ?>
</strong></td>
		    </tr>
			<tr>
				<td align="right">&nbsp;</td>
				<td><input type="hidden" name="id_pais" id="id_pais" value="<?php 
    echo $pais_id;
    ?>
" readonly="readonly" style="border-color:#FFFFFF" /></td>
		    </tr>
			<tr>
				<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][340];
    ?>
<span class="Estilo1">*</span>: 	</td>
                <td><input type="text" name="nombre_pais" id="nombre_pais" size="40" value="<?php 
    echo $pais->Get_dato("p_nombre");
    ?>
"/></td>
			</tr>
			<tr>
				<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][375];
    ?>
<span class="Estilo1">*</span>: </td>
				<td><input type="text" name="clave_pais" id="clave_pais" size="40" value="<?php 
    echo $pais->Get_dato("p_codigo");
    ?>
"/></td>
			</tr>
			<tr>
				<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][78];
    ?>
<span class="Estilo1">*</span>: </td>
				<td>
				<?
				$cnn = new conexion();
				$query = sprintf("SELECT c_id, c_nombre FROM cluster WHERE c_estatus = '1' ORDER BY c_id");
				$rst = $cnn->consultar($query);
				$fila = mysql_num_rows($rst);
				?>
				<select name="cluster_pais" id="cluster_pais">
					<option value="-1"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][346];
    ?>
</option>
					<?php 
    if ($fila > 0) {
        while ($fila = mysql_fetch_assoc($rst)) {
            ?>
								<option value="<?php 
            echo $fila['c_id'];
            ?>
" <?php 
            if ($fila['c_id'] == $pais->Get_dato('p_cluster')) {
                echo "selected = 'selected'";
            }
            ?>
><?php 
            echo $fila['c_nombre'];
            ?>
</option>
					<?php 
        }
    } else {
        echo "<option id='-1' value='-1'>" . $LABELINDEX[$INDEXIDIOMA][386] . "</option>";
    }
    ?>
				</select>
				</td>
			</tr>
			<tr>
				<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][55];
    ?>
<span class="Estilo1">*</span>: </td>
				<td>
				<?
				$cnn = new conexion();
				$query = sprintf("SELECT pd_id, pd_nombre FROM pais_destino WHERE pd_estatus = '1' ORDER BY pd_id");
				$rst = $cnn->consultar($query);
				$fila = mysql_num_rows($rst);
				?>
				<select name="destino_pais" id="destino_pais">
					<option value="-1"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][346];
    ?>
</option>
					<?php 
    if ($fila > 0) {
        while ($fila = mysql_fetch_assoc($rst)) {
            ?>
								<option value="<?php 
            echo $fila['pd_id'];
            ?>
" <?php 
            if ($fila['pd_id'] == $pais->Get_dato('p_pais_viaje')) {
                echo "selected = 'selected'";
            }
            ?>
 ><?php 
            echo $fila['pd_nombre'];
            ?>
</option>
					<?php 
        }
    } else {
        ?>
								<option id='-1' value='-1'><?php 
        echo $LABELINDEX[$INDEXIDIOMA][387];
        ?>
</option>
						<?php 
    }
    ?>
				</select>
				</td>
			</tr>
			<tr>
				<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][28];
    ?>
: </td>
				<td><input type="checkbox" name="estatus_pais" id="estatus_pais" <?php 
    if ($pais->Get_dato("p_estatus") == "1") {
        echo "checked='checked'";
    }
    ?>
 onclick="verEstatus();" />
					<input type="hidden" name="estatus_pais_val" id="estatus_pais_val" value="<?php 
    echo $pais->Get_dato("p_estatus");
    ?>
" /></td>
			</tr>
			<!--<tr>
				<td>&nbsp;</td>
				<td><div id="estado"><strong><?php 
    //echo $LABELINDEX[$INDEXIDIOMA][388];
    ?>
</strong></div></td>
			</tr>-->
			<tr>
				<td colspan="2" align="center">
					<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][345];
    ?>
" name="Actualizar" onclick="return validate_pais();">
				 	<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][219];
    ?>
" name="Cancelar">				 	
				</td>
			</tr>
		</table>
</form>
<?php 
    $I->Footer();
}
Example #28
0
function Muestra()
{
    include "../../lib/php/messageResources.php";
    $INDEXIDIOMA = $_SESSION["idiomausuario"];
    $destinoc = new DestinoCiudad();
    if (isset($_GET['cd_id'])) {
        $id_destino = $_GET['cd_id'];
        $destinoc->Load_Destino($id_destino);
    } else {
        header("Location: index.php");
    }
    $I = new Interfaz("DestinoCiudad:: Editar Destino", 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" src="../../lib/js/valida_form.js" type="text/javascript"></script>
<br><br>
	<form name="formCDestino" method="post" action="">
		<table width="80%" align="center" cellpadding="4" cellspacing="4" border="0" bgcolor="#f4f4f4" style="padding-top: 20px;">
			<tr>
				<td align="right">&nbsp;</td>
				<td><strong><?php 
    echo $LABELINDEX[$INDEXIDIOMA][344];
    ?>
</strong></td>
		    </tr>
			<tr>
				<td align="right">&nbsp;</td>
				<td><input type="hidden" name="id_destino" id="id_destino" value="<?php 
    echo $id_destino;
    ?>
" readonly="readonly" style="border-color:#FFFFFF" /></td>
		    </tr>
			<tr>
				<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][229];
    ?>
<span class="Estilo1">*</span>: 	</td>
                <td><input type="text" name="nombre_destino" id="nombre_destino" size="40" value="<?php 
    echo $destinoc->Get_dato("cd_nombre");
    ?>
" /></td>
			</tr>
			<tr>
				<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][55];
    ?>
<span class="Estilo1">*</span>: </td>
				<td>
				<?
				$cnn = new conexion();
				$query = sprintf("SELECT pd_id, pd_nombre FROM pais_destino ORDER BY pd_id");
				$rst = $cnn->consultar($query);
				$fila = mysql_num_rows($rst);
				?>
				<select name="pais_destino" id="pais_destino">
					<option value="-1"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][346];
    ?>
</option>
					<?php 
    if ($fila > 0) {
        while ($fila = mysql_fetch_assoc($rst)) {
            ?>
								<option value="<?php 
            echo $fila['pd_id'];
            ?>
" <?php 
            if ($fila['pd_id'] == $destinoc->Get_dato('cd_pais')) {
                echo "selected = 'selected'";
            }
            ?>
><?php 
            echo $fila['pd_nombre'];
            ?>
</option>
					<?php 
        }
    } else {
        echo "<option id='-1' value='-1'>" . $LABELINDEX[$INDEXIDIOMA][347] . "</option>";
    }
    ?>
				</select>
				</td>
			</tr>
			<tr>
				<td align="right" width="30%"><?php 
    echo $LABELINDEX[$INDEXIDIOMA][28];
    ?>
: </td>
				<td><input type="checkbox" name="estatus_destino" id="estatus_destino" <?php 
    if ($destinoc->Get_dato("cd_estatus") == "1") {
        echo "checked='checked'";
    }
    ?>
 onclick="verEstatus_ciudad();" />
					<input type="hidden" name="estatus_destino_val" id="estatus_destino_val" value="<?php 
    echo $destinoc->Get_dato("cd_estatus");
    ?>
" /></td>
			</tr>
			<!--<tr>
				<td align="right" width="30%"><?php 
    //echo $LABELINDEX[$INDEXIDIOMA][343];
    ?>
:</td>
				<td><input type="checkbox" name="ciudad_Belcorp" id="ciudad_Belcorp" <?php 
    //if($destinoc->Get_dato("cd_belcorp") == 1){ echo "checked='checked'"; }
    ?>
/></td>
			</tr>-->
			<tr>
				<td colspan="2" align="center">
					<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][345];
    ?>
" name="Actualizar" onclick="return validate_ciudad(); ">
				 	<input type="submit" value="<?php 
    echo $LABELINDEX[$INDEXIDIOMA][219];
    ?>
" name="Cancelar">				 	
				</td>
			</tr>
		</table>
</form>
<?php 
    $I->Footer();
}
Example #29
0
        $L->Cabeceras("Estatus");
        $L->Herramientas("E", "./index.php?mode=EDITAR&ma_id=");
        include "../../lib/php/mnu_toolbar.php";
        modelos_autos_toolbar();
        $query = "SELECT ma_nombre,CONCAT(CONVERT(ma_factor,CHAR(5)),' MXN'),IF(ma_estatus=1,'Activo','Inactivo'),ma_id FROM modelo_auto ORDER BY ma_estatus DESC";
        $L->muestra_lista($query, 3, false, 3);
        $I->Footer();
        break;
    case "NUEVO":
        require_once "modelo_auto_new.php";
        break;
    case "EDITAR":
        require_once "modelo_auto_edit.php";
        break;
    case "BUSCAR":
        // Muestra el resultado de una busqueda
        $criterio = $_POST["criterio"];
        $I = new Interfaz("modeloAuto", true);
        $L = new Lista();
        $L->Cabeceras("Nombre");
        $L->Cabeceras("Factor");
        $L->Cabeceras("Estatus");
        $L->Herramientas("E", "./index.php?mode=EDITAR&ma_id=");
        include "../../lib/php/mnu_toolbar.php";
        modelos_autos_toolbar();
        $query = "SELECT ma_nombre, CONCAT(CONVERT(ma_factor,CHAR(5)), ' MXN'), IF(ma_estatus=1,'Activo','Inactivo'),ma_id FROM modelo_auto \n\t\t\t\tWHERE ma_nombre LIKE '%" . $criterio . "%' \n\t\t\t\tORDER BY ma_estatus DESC";
        error_log($query);
        $L->muestra_lista($query, 3, false, 3);
        $I->Footer();
        break;
}
Example #30
0
    $BD->escribir_consulta($sql);
    echo "<h1>Vacaciones</h1>";
    $sql = "SELECT * FROM vacaciones";
    $BD->escribir_consulta($sql);
    echo "<h1>Festivos</h1>";
    $sql = "SELECT * FROM festivos";
    $BD->escribir_consulta($sql);
    echo "<h1>Unidades</h1>";
    $sql = "SELECT * FROM unidades";
    $BD->escribir_consulta($sql);
}
//mostrarConfiguracion();
//-------------------------
//$asignatura = 'DAE4G'; // DAE4G  SIF SIF-p
//$evaluaciones = "'1', '2'";
$asignatura = 'SIF';
// SIF
$evaluaciones = "'1', '2'";
//$asignatura = 'SIF-p'; // DAE4G  SIF SIF-p
//$evaluaciones = "'P'"; // contenido IN() de sql seleccion de tabla evaluaciones
$programator = new Programator();
$programator->programarDias($asignatura, $evaluaciones);
//$programator->printDias();
//$programator->printUnidades();
$interfaz = new Interfaz($asignatura, $programator->DIAS, $programator->UNIDADES);
$interfaz->printDiasByRango($f1, $f2);
?>

</body>
</html>