<HTML>
	<HEAD>
	<TITLE>Consultas</TITLE><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<link rel="stylesheet" type="text/css" href="estiloi.css">
	
	<script language="javascript">
	function obtener(){
		alert("NO DISPONIBLE POR EL MOMENTO");
		}
	
	

		function Validacion(Form1)
		{
			if (Form1.clavecct.value=="" || Form1.turno.value=="" || Form1.depnormtva.value=="" )
			{
				alert("Favor de ingresar todos los datos");
				return false;
			}
		}
	</script>


	<style type="text/css">
		<!--
		
		body,td,th {
			color: #000000;
			font-family: Verdana, Arial, Helvetica, sans-serif;
		}
		body {
			background-color: #FEFEFE;
		}td img {display: block;}
		.Estilo1 {
			color: #CC3433;
			font-weight: bold;
			font-family: Arial, Helvetica, sans-serif;
		}
		.Estilo2 {font-family: Arial, Helvetica, sans-serif}
		-->
    </style>
	</HEAD>
	
	
<BODY>

	  <p>
		<?php
	
			$link = mysql_connect('127.0.0.1', 'sesponda', '051207se');
			//$link = mysql_connect('127.0.0.1', 'root', 'root');
			if (!$link) 
			{
				die('Could not connect: ' . mysql_error());
			}
			$db_selected = mysql_select_db('Bib', $link);
			if (!$db_selected) 
			{
				die ('Can\'t use Bib: ' . mysql_error());
			}
		?>
	  </p>

<center>	
	
	<FORM NAME="form1" METHOD="post" onSubmit="return Validacion(this)" 
			ACTION="obtenercontrasena.php">
			<table>
				<TR>
				<TD width="491" bgcolor="#CC3433">
					<table width="491" border="0" align="center">
						<tr>			  
						<td bordercolor="#F2D2D3" bgcolor="#CC3433"><p class="Estilo2">&nbsp;</p>
							<table width="400" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FEFEFE">
								<tr>
								<td class="Estilo2"><img src="dis/spacer.gif" width="201" height="1" border="0" alt="" /></td>
								<td class="Estilo2"><img src="dis/spacer.gif" width="199" height="1" border="0" alt="" /></td>
								<td class="Estilo2"><img src="dis/spacer.gif" width="1" height="1" border="0" alt="" /></td>
								</tr>
								
								<tr>
								<td colspan="2" class="Estilo2">
                                <img name="UBU_r1_c1" src="dis/UBU_r1_c1.jpg" width="400" height="66" border="0" id="UBU_r1_c1" alt="" /></td>
								<td class="Estilo2"><img src="dis/spacer.gif" width="1" height="66" border="0" alt="" /></td>
								</tr>
								
								<tr>
								<td colspan="2" bgcolor="#EAEAEA" class="Estilo2">
					
                    			<table width="340" border="0" align="center" bordercolor="#FEFEFE">		  
									<tr>
									<td width="168">CLAVE CT.:</td> <td title="Anote la clave de centro de trabajo"width="162">
									<input type="text" name="clavecct" maxlength="10" id="clavecct" size="10"></td>
									</tr>
										  
									<tr>
									<td>Clave Turno:</td>
									<td title="Anote la clave del turno"><input type="text" name="turno" maxlength="1" id="turno" 
									size="3"></td>
									</tr>
									  
									<tr>
									<td>Clave Dep. Norm.:</td>
									<td title="Anote la clave de dependencia normativa">
									<input type="text" name="depnormtva" maxlength="2" id="depnormtva" size="3"></td>
									</tr>
							    </table>                  
							    </td>
                                
								<td class="Estilo2"><img src="dis/spacer.gif" width="1" height="183" border="0" alt="" /></td>
								</tr>
				
								<tr>
								<td class="Estilo2">&nbsp;</td>
								<td align="right" title= "Si ingreso los datos correctos aparecera la CONTRASE&Ntilde;A"  class="Estilo2"><input type="button" onClick="obtener();" value="Obtener">
								</td>
								<td class="Estilo2"><img src="dis/spacer.gif" width="1" height="51" border="0" alt="" />
								</td>
								</tr>
						    </table>
                            
						<div align="center" class="Estilo2">
						</div>
					    </td>
			    	</tr>
			     </table>		
                </TD></TR></table>
                
	</FORM>			
</center>
  <? /*
   		$clavecct= $_REQUEST['clavecct'];
		$turno= $_REQUEST['turno'];
		$depnormtva= $_REQUEST['depnormtva'];
		//echo "<BR>";
		$query = sprintf("SELECT contrasena.contrasena, contrasena.clavecct from cie_cct, 
		contrasena WHERE contrasena.clavecct='%s' and cie_cct.clavecct='%s' and cie_cct.turno ='%s00' 
		and cie_cct.depnormtva='%s' ",
				mysql_real_escape_string($clavecct),
				mysql_real_escape_string($clavecct),
				mysql_real_escape_string($turno),
				mysql_real_escape_string($depnormtva));
		//echo "<BR>";
		//echo $query;
		$result = mysql_query($query);
		if (!$result) {
			echo 'No pudo correr la consulta: ' . mysql_error();
			exit;
		}
		$renglones = mysql_num_rows($result);
		if ($renglones > 0) {	
			while ($arreglo = mysql_fetch_array($result)) {
				echo utf8_encode("CONTRASEŅA: ");
				//echo "";
				echo $arreglo[0];
			}
		}
		else
		{
				echo utf8_encode("CONTRASEŅA: ");
		}
		*/
?> 




</BODY>
</HTML>
