/
index.php
50 lines (48 loc) · 1.12 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<?php
if (!file_exists("config.php")){
header ("Location: ./admin/");
}?>
<?php
function CleanFiles($dir)
{
//Borrar los ficheros temporales
$t = time();
$h = opendir($dir);
while($file=readdir($h))
{
if(substr($file,0,3)=='tmp' && substr($file,-4)=='.pdf')
{
$path = $dir.'/'.$file;
if($t-filemtime($path)>3600)
@unlink($path);
}
}
closedir($h);
}
CleanFiles("evaluacion1");
CleanFiles("evaluacion2");
CleanFiles("evaluacion3");
CleanFiles("evaluacionextra");
?>
<html>
<head>
<title>Evaluación inicial</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<h1 align="center">Evaluación inicial</h1>
<form action="procesaClaves.php" method="post" name="claves">
<label for="textfield">Nombre:</label>
<input name="nombre" type="text" id="nombre"/>
<label for="label">Contraseña:</label>
<input name="contra" type="password" id="contra" />
<p> </p>
<p>
<label>
<input type="submit" name="Submit" value="ENVIAR" />
</label>
<p> </p>
</form>
</body>
</html>