Repository navigation
Expand file tree
/
Copy pathimport.php
More file actions
67 lines (62 loc) · 1.63 KB
/
Copy pathimport.php
File metadata and controls
67 lines (62 loc) · 1.63 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
<?php
# _____ _____
# /__ \__ _____ |___ |
# / /\/\ \ /\ / / _ \ / /
# / / \ V V / (_) | _ / /
# \/ \_/\_/ \___/ (_) /_/
/**
* This file finds and Imports the Submodules.
* @author Prashant Sinha <prashantsinha@outlook.com>
* @author Tarun Khajuria <tarunkhajuria42@gmail.com>
* @since 0.0
*/
/**
* Function _Import imports selective files.
* @param $Name -string- The Module filename.
* @return -int- Level where the file was found.
* @throws -recovers- Shows the Fatal Error page instead.
* @author Prashant Sinha <prashantsinha@outlook.com>
* @since v0.0 27062014
* @version 0.0
*/
function _Import($Name) {
if (file_exists("TwoDotSeven/$Name")) {
require_once "TwoDotSeven/$Name";
return 1;
}
elseif (file_exists("TwoDotSeven/inc/$Name")) {
require_once "TwoDotSeven/inc/$Name";
return 2;
}
elseif (file_exists("../$Name")) {
require_once "../$Name";
return 3;
}
elseif (file_exists("../inc/$Name")) {
require_once "../inc/$Name";
return 4;
}
elseif (file_exists("../../inc/$Name")) {
require_once "../../inc/$Name";
return 5;
}
elseif (file_exists("$Name")) {
require_once "$Name";
return 6;
}
else {
require_once $_SERVER['DOCUMENT_ROOT'].'/TwoDotSeven/admin/login.signup.errors.php';
\TwoDot7\Admin\Template\Login_SignUp_Error\_init(array(
'Call' => 'Error',
'ErrorMessageHead' => 'Sorry, there was a Server Error',
'ErrorMessageFoot' => 'Couldn\'t load some or all the required files.',
'ErrorCode' => 'ImportError: '.$Name,
'Code' => 500,
'Mood' => ''));
die();
return 0;
}
}
function _ImportAll() {
}
?>