translation/templating
diff --git a/templates/bottom.htm b/templates/bottom.htm
new file mode 100644
index 0000000..90e40b5
--- /dev/null
+++ b/templates/bottom.htm
@@ -0,0 +1,9 @@
+    <!-- Optional JavaScript -->
+    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
+    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
+    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
+
+</body>
+
+</html>
diff --git a/templates/confirm_your_email.htm b/templates/confirm_your_email.htm
new file mode 100644
index 0000000..0b7d855
--- /dev/null
+++ b/templates/confirm_your_email.htm
@@ -0,0 +1,5 @@
+<h2>Almost there! Confirm your email</h2>
+
+<?php 
+echo "<p>Didn't receive anything yet? <a href='".$BASE_URL."/?type=resend&token=".$_SESSION['resend']."'>Click here</a> to resend the confirmation email.</p>"; 
+?>
diff --git a/templates/error.htm b/templates/error.htm
new file mode 100644
index 0000000..21842c9
--- /dev/null
+++ b/templates/error.htm
@@ -0,0 +1,3 @@
+<div class="alert alert-danger" role="alert">
+    <?php echo $error; ?>
+</div>
diff --git a/templates/header.htm b/templates/header.htm
new file mode 100644
index 0000000..1d450df
--- /dev/null
+++ b/templates/header.htm
@@ -0,0 +1,19 @@
+<!doctype html>
+<html lang="en">
+
+<head>
+    <!-- Required meta tags -->
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+    <title>Sign Up</title>
+    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
+    <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">
+    <link rel="stylesheet" href="<?php echo $BASE_URL?>/static/main.css" >
+    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
+    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
+    <script src="<?php echo $BASE_URL?>/static/main.js"></script>
+
+</head>
+<body>
+<div class="container mb-8" id="main_container" >
diff --git a/templates/mail_confirmed.htm b/templates/mail_confirmed.htm
new file mode 100644
index 0000000..46e2435
--- /dev/null
+++ b/templates/mail_confirmed.htm
@@ -0,0 +1 @@
+<div class="alert alert-success" role="alert">Your email was confirmed! you are being redirected...</div>
diff --git a/templates/register.htm b/templates/register.htm
new file mode 100644
index 0000000..ae604f8
--- /dev/null
+++ b/templates/register.htm
@@ -0,0 +1,83 @@
+<h1>Sign up Now!</h1>
+
+<form action="" method="POST">
+    <!-- Username input -->
+    <div class="form-outline mb-3">
+        <label class="form-label font-weight-bold" for="form3Example3">Username*</label>
+        <input pattern="[^\s]{<?php echo $VAL_USER->min_username.','.$VAL_USER->max_username;?>}" required title="At least 5 not whitespace characteres" name="username" type="text"
+            id="form3Example0"
+            class="form-control <?php if(isset($error) && $error && !isset($_POST['username'])){echo 'border-danger';}?>"
+            placeholder="JhonDoe"
+            value="<?php echo isset($_POST['username']) ? htmlspecialchars($_POST['username']) : '' ?>" />
+    </div>
+    <!-- 2 column grid layout with text inputs for the first and last names -->
+    <div class="row mb-3">
+        <div class="col">
+            <div class="form-outline">
+                <label class="form-label font-weight-bold" for="form3Example1">First name*</label>
+                <input pattern="[^\s]{<?php echo $VAL_USER->min_first_name.','.$VAL_USER->max_first_name;?>}" required title="At least 3 not whitespace characteres" name="name"
+                    type="text" id="form3Example1"
+                    class="form-control <?php if(isset($error) && $error && !isset($_POST['name'])){echo 'border-danger';}?>"
+                    placeholder="Jhon"
+                    value="<?php echo isset($_POST['name']) ? htmlspecialchars($_POST['name']) : '' ?>" />
+            </div>
+        </div>
+        <div class="col">
+            <div class="form-outline">
+                <label class="form-label font-weight-bold" for="form3Example2">Last name*</label>
+                <input pattern="[^\s]{<?php echo $VAL_USER->min_last_name.','.$VAL_USER->max_last_name;?>}" required title="At least 3 not whitespace characteres" name="last_name"
+                    type="text" id="form3Example2"
+                    class="form-control <?php if(isset($error) && $error && !isset($_POST['last_name'])){echo 'border-danger';}?>"
+                    placeholder="Doe"
+                    value="<?php echo isset($_POST['last_name']) ? htmlspecialchars($_POST['last_name']) : '' ?>" />
+            </div>
+        </div>
+    </div>
+
+    <!-- Email input -->
+    <div class="form-outline mb-3">
+        <label class="form-label font-weight-bold" for="form3Example3">Email address*</label>
+        <input required name="email" type="email" id="form3Example3"
+            class="form-control <?php if(isset($error) && $error && !isset($_POST['email'])){echo 'border-danger';}?>"
+            placeholder="myemail@example.com"
+            value="<?php echo isset($_POST['email']) ? htmlspecialchars($_POST['email']) : '' ?>" />
+    </div>
+
+    <!-- Password input -->
+    <div class="form-outline mb-3">
+        <label class="form-label font-weight-bold" for="form3Example4">Password*</label>
+        <input pattern="[^\s]{<?php echo $VAL_USER->min_password.','.$VAL_USER->max_password;?>}" required title="At least 8 not whitespace characteres" name="password"
+            type="password" id="form3Example4"
+            class="form-control <?php if(isset($error) && $error && !isset($_POST['password'])){echo 'border-danger';}?>"
+            placeholder="********"
+            value="<?php echo isset($_POST['password']) ? htmlspecialchars($_POST['password']) : '' ?>" />
+    </div>
+    <!-- Password input -->
+    <div class="form-outline mb-3">
+        <label class="form-label font-weight-bold" for="form3Example4">Confirm your Password*</label>
+        <input pattern="[^\s]{<?php echo $VAL_USER->min_password.','.$VAL_USER->max_password;?>}" required title="At least 8 not whitespace characteres" name="password_confirm"
+            type="password" id="form3Example5"
+            class="form-control <?php if(isset($error) && $error && !isset($_POST['password_confirm'])){echo 'border-danger';}?>"
+            placeholder="********"
+            value="<?php echo isset($_POST['password_confirm']) ? htmlspecialchars($_POST['password_confirm']) : '' ?>" />
+    </div>
+    <!--captcha here-->
+    <div class="form-outline mb-3">
+
+        <label class="form-label font-weight-bold" for="form3Example4">Captcha:</label>
+        <div class="container mb-2 offset-md-2">
+            <img id="captcha" src="<?php echo $BASE_URL.'/captcha.php?token='.$_SESSION['captcha_token']; ?>" />
+            <div id="reload_captcha">
+                <button id="reload" class="btn btn-outline-info" type="button"> <span class="glyphicon glyphicon-refresh"
+                    aria-hidden="true"></span></button>
+            </div>
+        </div>
+        <input pattern="[^\s]{<?php echo $CAPTCHA_LENGTH; ?>,}" required title="Please fill the captcha. It has 5 characteres" name="captcha"
+            type="text" id="form3Example6" class="form-control" placeholder="Type what you see on the image above" />
+    </div>
+
+    <!-- Submit button -->
+    <button name="type" value="register" type="submit" class="btn btn-primary float-right btn-md">Sign up</button>
+
+</form>
+</div>
diff --git a/templates/registration_error.htm b/templates/registration_error.htm
new file mode 100644
index 0000000..88632c0
--- /dev/null
+++ b/templates/registration_error.htm
@@ -0,0 +1 @@
+<div class="alert alert-danger" role="alert">Sorry, something went wrong :(</div>
diff --git a/templates/registration_limit.htm b/templates/registration_limit.htm
new file mode 100644
index 0000000..e8a67dd
--- /dev/null
+++ b/templates/registration_limit.htm
@@ -0,0 +1 @@
+<h2>Sorry but you already registered!</h2>
diff --git a/templates/resend_mail.htm b/templates/resend_mail.htm
new file mode 100644
index 0000000..be5a7c6
--- /dev/null
+++ b/templates/resend_mail.htm
@@ -0,0 +1 @@
+<h2>Another email was sent!</h2>
diff --git a/templates/strings.php b/templates/strings.php
new file mode 100644
index 0000000..91e1d86
--- /dev/null
+++ b/templates/strings.php
@@ -0,0 +1,52 @@
+<?php
+$RUNTIME_ERROR = (object)[
+        "template_not_found" => "Either you did not create the folder {{template}} or strings.php is missing on it. Maybe you have set {{langcc}} wrong on config.php?",
+        "user_trying_invalid_get" => "INVALID REQUEST. THERE IS NOTHING HERE FOR YOU",
+];
+
+$USERNAME_VALIDATION_ERROR = (object)[
+        "registered" => "This username is already in use! Please choose another username<br>",
+        "no_whitespaces" => "Username cannot contain whitespaces<br>",
+        "smaller_than" => "Username must have less than {{num}} characters<br>",
+        "bigger_than" => "Username must be bigger than {{num}} characters<br>",
+        "no_special_chars" => "The username cannot contain special characters<br>",
+        "no_number_begining" => "The username cannot begin with a number<br>",
+        "blacklisted" => "That Username is not allowed!<br>",
+];
+
+$FIRST_NAME_VALIDATION_ERROR = (object)[
+        "no_whitespaces" => "First name cannot contain whitespaces<br>",
+        "smaller_than" => "First name must have less than {{num}} characters<br>",
+        "bigger_than" => "First name must be bigger than {{num}} characters<br>",
+        "no_special_chars" => "The first name cannot contain special characters or numbers<br>",
+];
+
+$LAST_NAME_VALIDATION_ERROR = (object)[
+        "no_whitespaces" => "Last name cannot contain whitespaces<br>",
+        "smaller_than" => "Last name must have less than {{num}} characters<br>",
+        "bigger_than" => "Last name must be bigger than {{num}} characters<br>",
+        "no_special_chars" => "The last name cannot contain special characters or numbers<br>",
+];
+
+$EMAIL_VALIDATION_ERROR = (object)[
+        "registered" => "This email is already belongs to an account. Did you <a href='{{link}}'>forget your password?</a><br>",
+        "invalid" => "Invalid email format<br>",
+        "blacklisted" => "This email service is not allowed<br>",
+        "pending" => "This email is already pending approval, check your mailbox or try to register with a different email<br>",
+
+];
+
+$PASSWORD_VALIDATION_ERROR = (object)[
+        "no_match" => "Passwords do not match!<br>",
+        "bigger_than" => "Password should have at least {{num}} characters<br>",
+        "smaller_than" => "Password is too big. Should have at max {{num}} characters<br>",
+        "blacklisted" => "That password is not allowed!<br>",
+        "shared_inclusion" => "Your password cannot contain any of your names or email neither the names can contain the password<br>"
+];
+
+$STRINGS = (object)[
+        "email_confirmation" => "<h1>Email Confirmation</h1>",
+        "reloading_captcha" => "Loading...",
+];
+
+?>
diff --git a/templates/token_expired.htm b/templates/token_expired.htm
new file mode 100644
index 0000000..5c6321c
--- /dev/null
+++ b/templates/token_expired.htm
@@ -0,0 +1 @@
+<h2>Your confirmation token expired!</h2>