-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
28 lines (27 loc) · 851 Bytes
/
index.php
File metadata and controls
28 lines (27 loc) · 851 Bytes
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
<?php
/**
* BoxBilling
*
* @copyright BoxBilling, Inc (http://www.boxbilling.com)
* @license Apache-2.0
*
* Copyright BoxBilling, Inc
* This source file is subject to the Apache-2.0 License that is bundled
* with this source code in the file LICENSE
*/
require_once dirname(__FILE__) . '/bb-load.php';
$di = include dirname(__FILE__) . '/bb-di.php';
$url = $di['request']->getQuery('_url');
$admin_prefix = $di['config']['admin_area_prefix'];
if (strncasecmp($url,$admin_prefix, strlen($admin_prefix)) === 0) {
$url = str_replace($admin_prefix, '', preg_replace('/\?.+/', '', $url));
$app = new Box_AppAdmin();
$app->setUrl($url);
} else {
$app = new Box_AppClient();
$app->setUrl($url);
}
$di['translate']();
$app->setDi($di);
print $app->run();
exit(); // disable auto_append_file directive