-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
25 lines (24 loc) · 1.02 KB
/
index.php
File metadata and controls
25 lines (24 loc) · 1.02 KB
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
<?php
require 'functions.php';
echo "Session file contains: <pre>".print_r($_SESSION,true)."</pre>";
if (isset($_POST['msisdn']) || isset($_POST['code'])) {
if (isset($_POST['msisdn'])) {
$_SESSION['msisdn'] = $_POST['msisdn'];
$coderes = getCode($_POST['msisdn']);
if ($coderes===true) {
require_once 'template/code.html';
exit();
}
}
if (isset($_POST['code'])) {
if (checkCode($_SESSION['msisdn'],$_POST['code'])===true) {
$password = getPasswordAfterThat($_SESSION['msisdn']);
echo "Ваш пароль: {$password}. Ваша сессия хранится в течении 2 минут, после чего она уничтожается. Пожалуйста, проверьте все настройки.";
echo "<br>Для уничтожения сессии сейчас, нажмите <a href=\"/purge.php\">сюда</a>";
}
}
}
else {
require_once 'template/index.html';
exit();
}