-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
70 lines (65 loc) · 3.49 KB
/
index.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
//
// File: index.php
//
// Description: This file is part of PHP RegPortal, which is derived
// from Deadlock PHP User Management System.
// The changes made to this include revisions to support using
// PDO for database operations and support for Apache httpd.conf
// based configuration and having authenticaiton via
// mod_dbd/mod_authn_dbd, rather than .htaccess and .htpasswd.
// This has resulted in significant rewrite of base code, hence
// new project, which is not backward compatible with Deadlock
//
// Note: All original Deadlock notices remain intact and this code is in
// turn provided under GNU General Public Licence V3 as per
// Deadlock code.
// The Tux Logo has been removed and replaceid with MySQL & PostgreSQL
// logo's as key aim was to make this version RDBMS agnostic via
// PHPs PDO functions.
// The new RegPortal logo includes original Deadlock logo (in miniture)
// in recognition of the fact that this is derived work.
// The Apache logo is included in the new logo, as this program
// generates Apache specific outputs... and assumes Apache is the
// underlying Web Server. However this code is not ensured
// or otherwise related to Apache Software Foundation.
//
/******************************************************************************
* This file is part of the Deadlock PHP User Management System. *
* *
* File Description: Show information for a specific user *
* *
* Deadlock is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* Deadlock is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with Deadlock; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
******************************************************************************/
if ((! empty($_GET)) && isset($_GET['db_config_path'])) {
$db_config_path = $_GET['db_config_path'];
}
else {
die("RegPortal has been invoked without db_config_path!");
}
// include needed files
require($db_config_path);
// Redirect function. This must be used before any data is sent to the browser.
function redirect ($location) {
header('Location: ' . $location);
exit;
}
// make sure deadlock is installed, if not, send the user to the install page
if(!defined("DEADLOCK_INSTALLED")) {
redirect('./install/index.php?db_config_path=' . $db_config_path);
}
// redirect to user login page
redirect('user/login.php?db_config_path=' . $db_config_path);
?>