-
Notifications
You must be signed in to change notification settings - Fork 0
/
View_Register.php
81 lines (76 loc) · 3.58 KB
/
View_Register.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
require_once("header.php");
require_once("Error_Codes.php");
require_once("Status_Codes.php");
require_once('API_Constants.php');
if($sessionActive){
header("location: index.php");
} else {
}
$errorCode = ValidationUtility::getErrorCode();
?>
<header id="header" class="header-register">
<h1><i class="fa fa-user-plus" aria-hidden="true"></i> Registro</h1>
</header>
<div id="content">
<?php
if($errorCode == "U_missingInformation" or $errorCode == "DB_Failure" or $errorCode == "Recaptcha_Failure"){
echo constant($errorCode);
}
?>
<form class="pure-form pure-form-aligned" action="Core_RegisterUser.php" method="POST" accept-charset="utf-8">
<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" or
$errorCode == "U_twitterNameNotExists"){
echo constant($errorCode);
}
?>
</div>
<div class="pure-control-group">
<label for="name">Nombre:</label>
<input type="text" name="name" maxlength="50" required/>
<?php
if( $errorCode == "U_name" or $errorCode == "U_nameLength" ){
echo constant($errorCode);
}
?>
</div>
<div class="pure-control-group">
<label for="school">Escuela:</label>
<input type="text" name="school" maxlength="50" required/>
<?php
if( $errorCode == "U_school" or $errorCode == "U_schoolLength" ){
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" or $errorCode == "U_passwordNotMatch" ){
echo constant($errorCode);
}
?>
</div>
<div class="pure-control-group">
<label for="password_check">Reingresa tu contraseña:</label>
<input type="password" name="password_check" maxlength="20" required pattern=".{6,}" title="Mínimo 6 caracteres" /> <br/>
</div>
<div class="pure-control-group">
<div class="g-recaptcha" data-sitekey="<?php echo constant('recaptcha_site_key');?>"></div>
</div>
<div class="pure-controls">
<button type="submit" class="pure-button pure-button-primary">Registrarse</button>
</div>
</fieldset>
</form>
</div>
<?php
include "footer.php";
?>