diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -25,9 +25,14 @@ $ref = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER']; | |||
25 | if (isset($_GET['login'])) { | 25 | if (isset($_GET['login'])) { |
26 | // Login | 26 | // Login |
27 | if (!empty($_POST['login']) && !empty($_POST['password'])) { | 27 | if (!empty($_POST['login']) && !empty($_POST['password'])) { |
28 | if (Session::login('poche', 'poche', $_POST['login'], $_POST['password'])) { | 28 | // echo $_SESSION['login']."<br>"; |
29 | // echo $_SESSION['pass']."<br>"; | ||
30 | // echo $_POST['login']."<br>"; | ||
31 | // echo encode_string($_POST['password'] . $_POST['login']); | ||
32 | // die; | ||
33 | if (Session::login($_SESSION['login'], $_SESSION['pass'], $_POST['login'], encode_string($_POST['password'] . $_POST['login']))) { | ||
29 | logm('login successful'); | 34 | logm('login successful'); |
30 | $msg->add('s', 'welcome in your pocket!'); | 35 | $msg->add('s', 'welcome in your poche!'); |
31 | if (!empty($_POST['longlastingsession'])) { | 36 | if (!empty($_POST['longlastingsession'])) { |
32 | $_SESSION['longlastingsession'] = 31536000; | 37 | $_SESSION['longlastingsession'] = 31536000; |
33 | $_SESSION['expires_on'] = time() + $_SESSION['longlastingsession']; | 38 | $_SESSION['expires_on'] = time() + $_SESSION['longlastingsession']; |