-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinit.php
More file actions
92 lines (79 loc) · 2.72 KB
/
init.php
File metadata and controls
92 lines (79 loc) · 2.72 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
/*
@! AuthManager v3.0
@@ User authentication and management web application
-----------------------------------------------------------------------------
** author: StitchApps
** website: http://www.stitchapps.com
** email: support@stitchapps.com
** phone support: +91 9871084893
-----------------------------------------------------------------------------
@@package: am_authmanager3.0
*/
/*
modifying the max execution time of the script if the safe is mode is turned off. this is to ensure that all API requests get completed.
*/
if(!ini_get("safe_mode")) {
set_time_limit(180);
}
/*
error reporting for the application. Set it to error_reporting(E_ALL) for debugging.
*/
error_reporting(0);
ini_set('display_errors', '0');
/*
do not initialize the application if the install.php is present on the server.
*/
if(file_exists(dirname(__FILE__)."/install.php")) die("<br/><center><h1 style=\"font-size:20px;line-height:22px;font-family:arial;\">Application error occured.</h1><p style=\"font-size:13px;font-family:arial;\">Please delete the <strong>install.php</strong> file to acces the application.</p></center>");
/*
initiating the benchmark class for calculating the execution time of each page measured in seconds.
*/
include("modules/class.benchmark.php");
$timer = new benchmark(1);
/*
database inclusion and initialization for the application.
*/
include("user/database.php");
/*
configuration file which contains the application settings.
*/
include("user/config.php");
/*
start sessions for the application. user sessions are stored in database rather than session files for enhanced security.
*/
include(MODS_DIRECTORY."/class.dbsession.php");
$session = new dbSession($db, $_setting['session_timeout']);
/*
this is the logging class to log errors, warnings and notices generated by the application.
*/
include(MODS_DIRECTORY."/class.logger.php");
$log = KLogger::instance(dirname(__FILE__)."/".MODS_DIRECTORY."/logs/", KLogger::DEBUG);
/*
pagination class for rendering pages in the application.
*/
include(MODS_DIRECTORY."/class.pagination.php");
/*
gravatar class for fetching user profile photo associated with their email address on the gravatar.com website
*/
include(MODS_DIRECTORY."/class.gravatar.php");
/*
classes which form the base of the application. Do not remove any of these.
*/
include(USER_DIRECTORY."/functions.php");
include(USER_DIRECTORY."/session.inc.php");
/*
inclusion of this file helps in making the application translation ready.
*/
if(function_exists("gettext")) {
include("i18n.php");
$_gettext = true;
} else {
$_gettext = false;
}
/*
initialize the error engine for the application. if the $_SESSION variable is not set then make it null.
*/
if(!isset($_SESSION["error"])) {
$_SESSION["error"] = null;
}
?>