hola
ps modifique mi codigo y loque deseo es que e l boton ingreso pueda volver a ser habilitado despusde 4 horas como lo hago?
Posteo mi codigo con las modificacionesque hice:
Código PHP:
<?
session_start();
include("include/bd.php");
include("include/functions.php");
bd_connect();
?>
<html>
<head>
<head>
<title>REGISTRO</title>
<h1 ALIGN="center"></H1>
</head>
<script language="JavaScript" type="text/javascript">
function validaBusq() {
if(document.frmPersonal.codigo.value == "" ) {
alert("Debe ingresar su codigo de acceso");
document.frmPersonal.codigo.focus();
return false;
}
return true;
}
</script>
</head>
<body>
<?include ("cabecera.php");?>
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj=new Object;obj.clockfile="5005-gray.swf";obj.TimeZone="Peru_Lima";obj.width=120;obj.height=40;obj.wmode="transparent";showClock(obj);</script>
<br>
<!--<form name="frmPersonal" method="get" action="contenido2.php" target="fraBusPersonal" onsubmit="return validaBusqw();">-->
<form name="frmPersonal" method="get" action="ingreso.php" onSubmit="return validaBusq();">
<table border="0" width="550" cellpadding="0" cellspacing="0" align="center">
<tr>
<td valign="top">
<table border="0" width="550" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="center"><p class="clsLblTituloPagina">Pagina de Inicio</p></td>
</tr>
<tr>
<td><hr></td>
</tr>
</table><br>
<table border="0" width="550" cellpadding="0" cellspacing="0" align="center">
</table>
Eliga su registro
<br>
<table border="0" width="550" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="center">
<?
$Fecha= date('d-m-Y',time());
$Hora= date('H:i:s',time()+3600 );
?>
<?php
if ($Hora < date ('09:10:00',time())){
echo '<input type="submit" value="Registro Ingreso" disabled>';
}
else{
echo '<input type="submit" value="Registro Ingreso">';
}
?>
<input type="button" name="exit" value="Registro Salida" onclick="document.location='salida.php'">
</td>
</tr>
</table>
<br>
<table width="550" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<!--<iframe name="fraBusPersonal" marginwidth=0 marginheight=0
src="pagina_blanco.php" frameborder=1
width=100% scrolling=no height="170"></iframe>-->
</tr>
<tr>
<td colspan="5" height="1" bgcolor="#000000"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<??>
</td>
</tr>
</table>
</td>
</tr>
</table>
<font style="font-size:15px;"><SCRIPT LANGUAGE="Javascript"><!--
// Get today's current date.
var now = new Date();
// Array list of days.
var days = new Array('Domingo','Lunes','Martes'Miércoles','Jueves','Viernes','Sábado');
// Array list of months.
var months = new Array('Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre');
// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
// Calculate four digit year.
function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;
}
// Join it all together
today = days[now.getDay()] + " " +
date + " " +
months[now.getMonth()] + " " +
(fourdigits(now.getYear())) ;
// Print out the data.
document.write("" +today+ " ");
//--></SCRIPT></font></td>
<input type="hidden" name="IDreg" value="<?echo $_GET['IDreg']?>">
</form>
<?include("pie.php");?>
</body>