forked from Piwigo/PEM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathidentification.php
More file actions
50 lines (43 loc) · 1.27 KB
/
Copy pathidentification.php
File metadata and controls
50 lines (43 loc) · 1.27 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/*
* This file is part of PEM package
*
* Copyright(c) Nicolas Roudaire https://www.nikrou.net/
* Licensed under the GPL version 2.0 license.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
define('INTERNAL', true);
$root_path = './';
require_once($root_path.'include/common.inc.php');
$tpl->set_filenames(
array(
'page' => 'page.tpl',
'identification' => 'identification.tpl'
)
);
if (isset($_POST['submit']))
{
if ($user_id = check_user_password($_POST['username'], $_POST['password']))
{
log_user($user_id, $_POST['username'], $_POST['password']);
message_success('Identification successful', 'my.php');
}
else
{
message_die('Incorrect username/password');
}
}
if (isset($conf['external_register_url']))
{
$tpl->assign('external_register', true);
}
// +-----------------------------------------------------------------------+
// | html code display |
// +-----------------------------------------------------------------------+
$tpl->assign_var_from_handle('main_content', 'identification');
include($root_path.'include/header.inc.php');
include($root_path.'include/footer.inc.php');
$tpl->parse('page');
$tpl->p();