-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathregistrati.php
35 lines (29 loc) · 916 Bytes
/
registrati.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
<?php
$title = "Registrati - Onoranze Stecca";
$page = "registrati";
$description = "Registrati per poter accedere al tuo account e scrivere messaggi di cordoglio.";
$keywords = "registrati, Onoranze Stecca, account, registrazione";
$script = "validate";
require_once "php/backend/auth.php";
session_start();
try {
if (is_logged()) {
if (is_admin()) {
header("Location: dashboard.php");
} else {
header("Location: account.php");
}
}
$template = (file_get_contents('html/registrati.html'));
$result = isset($_SESSION['error-reg']) ? $_SESSION['error-reg'] : null;
session_abort();
include "php/template/header.php";
if (isset($_SESSION['error-reg'])) {
$template = str_replace("<!-- errors -->", $result, $template);
}
echo $template;
} catch (Exception $e) {
server_error();
}
include "php/template/footer.php";
?>