-
Notifications
You must be signed in to change notification settings - Fork 0
/
View_Login.php
53 lines (50 loc) · 2.04 KB
/
View_Login.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
51
52
53
<?php
require_once("header.php");
require_once("Status_Codes.php");
require_once("Error_Codes.php");
require_once("Validation_Utility.php");
if($sessionActive){
header("location: index.php");
exit;
} else {
}
$errorCode = ValidationUtility::getErrorCode();
?>
<header id="header" class="header-register">
<h1><i class="fa fa-sign-in" aria-hidden="true"></i> Iniciar sesión</h1>
</header>
<div id="content">
<?php
if($errorCode == "U_missingInformation" or $errorCode == "DB_Failure" or $errorCode == "U_loginFailure"){
echo constant($errorCode);
}
?>
<form class="pure-form pure-form-aligned" action="Core_ValidateLogin.php" method="POST">
<fieldset>
<div class="pure-control-group">
<label for="twitter_name">Nombre de usuario en Twitter: @</label>
<input type="text" name="twitter_name" maxlength="15" required/>
<?php
if( $errorCode == "U_twitterName" or $errorCode == "U_twitterNameLength" ){
echo constant($errorCode);
}
?>
</div>
<div class="pure-control-group">
<label for="password">Contraseña:</label>
<input type="password" name="password" maxlength="20" required pattern=".{6,}" title="Mínimo 6 caracteres" /> <br/>
<?php
if( $errorCode == "U_passwordLength" ){
echo constant($errorCode);
}
?>
</div>
<div class="pure-controls">
<button type="submit" class="pure-button pure-button-primary">Iniciar sesión</button>
</div>
</fieldset>
</form>
</div>
<?php
include "footer.php";
?>