Subversion Repositories ALCASAR

Rev

Rev 3139 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3139 Rev 3183
Line 10... Line 10...
10
*	elle envoi les infos à traiter à la page de traitement			*
10
*	elle envoi les infos à traiter à la page de traitement			*
11
*	via AJAX (email_registration_back)								*
11
*	via AJAX (email_registration_back)								*
12
*																	*
12
*																	*
13
/********************************************************************/
13
/********************************************************************/
14
 
14
 
-
 
15
/****************************************************************
-
 
16
*			GLOBAL FILE PATHS			*
-
 
17
*****************************************************************/
-
 
18
define('CONF_FILE', '/usr/local/etc/alcasar.conf');
-
 
19
 
15
$page = "email_registration";
20
$page = "email_registration";
16
$Language = 'en';
21
$Language = 'en';
17
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
22
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
18
	$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
23
	$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
19
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
24
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
Line 73... Line 78...
73
	$l_mandatory = "* Required fields";
78
	$l_mandatory = "* Required fields";
74
	$l_inscription = "Inscription";
79
	$l_inscription = "Inscription";
75
	$l_mail_success = "A password has been sent to your e-mail address.\\nCheck your spam or junk mail, if you don't see this e-mail in your inbox.";
80
	$l_mail_success = "A password has been sent to your e-mail address.\\nCheck your spam or junk mail, if you don't see this e-mail in your inbox.";
76
	$l_mail_error = "An error has occurred. Please renew your registration or contact your administrator.";
81
	$l_mail_error = "An error has occurred. Please renew your registration or contact your administrator.";
77
}
82
}
-
 
83
 
-
 
84
/****************************************************************
-
 
85
*			Read CONF_FILE				*
-
 
86
*****************************************************************/
-
 
87
$file_conf = fopen(CONF_FILE, 'r');
-
 
88
if (!$file_conf) {
-
 
89
	exit('Error opening the file '.CONF_FILE);
-
 
90
}
-
 
91
while (!feof($file_conf)) {
-
 
92
	$buffer = fgets($file_conf, 4096);
-
 
93
	if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
-
 
94
		$tmp = explode('=', $buffer, 2);
-
 
95
		$conf[trim($tmp[0])] = trim($tmp[1]);
-
 
96
	}
-
 
97
}
-
 
98
fclose($file_conf);
-
 
99
$whiteDomain	= $conf['MAIL_WHITEDOMAIN'];
78
?>
100
?>
79
<!DOCTYPE html>
101
<!DOCTYPE html>
80
<html>
102
<html>
81
<head>
103
<head>
82
	<meta charset="UTF-8">
104
	<meta charset="UTF-8">
83
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
105
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
84
	<title>ALCASAR - <?=$l_title ?></title>
106
	<title>ALCASAR - <?=$l_title?></title>
85
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
107
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
86
	<link rel="stylesheet" type="text/css" href="css/pass.css">
108
	<link rel="stylesheet" type="text/css" href="css/pass.css">
87
	<link rel="icon" href="images/favicon-48.ico" type="image/ico">
109
	<link rel="icon" href="images/favicon-48.ico" type="image/ico">
88
	<script type="text/javascript" src="js/jquery.min.js"></script>
110
	<script type="text/javascript" src="js/jquery.min.js"></script>
89
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
111
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
Line 94... Line 116...
94
		<section id="inscription" class="row">
116
		<section id="inscription" class="row">
95
			<form name="master" id="contenu_acces" onsubmit="return false;" class="col-12 offset-lg-1 col-lg-10">
117
			<form name="master" id="contenu_acces" onsubmit="return false;" class="col-12 offset-lg-1 col-lg-10">
96
				<div class="row input_row">
118
				<div class="row input_row">
97
					<div class="label_name col-3 col-lg-4"><?=$l_Email?></div>
119
					<div class="label_name col-3 col-lg-4"><?=$l_Email?></div>
98
					<div class="col-6 col-lg-4">
120
					<div class="col-6 col-lg-4">
99
					<input type="email" placeholder="User@exemple.com" id="email" name="email" required class="form-control"/>
121
					<input type="email" placeholder="@<?=$whiteDomain?>" id="email" name="email" required class="form-control"/>
100
					</div>
122
					</div>
101
					<small id="output_email" class="row"></small>
123
					<small id="output_email" class="row"></small>
102
				</div>
124
				</div>
103
				<div id="status">
125
				<div id="status">
104
					<?=$l_mandatory?>
126
					<?=$l_mandatory?>