fix mobile deref.php
This commit is contained in:
parent
55461948c5
commit
086a30e39c
1 changed files with 2 additions and 39 deletions
|
@ -18,42 +18,5 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
include('../serverlib/init.inc.php');
|
||||
|
||||
/**
|
||||
* file handler for modules
|
||||
*/
|
||||
ModuleFunction('FileHandler',
|
||||
array(substr(__FILE__, strlen(__DIR__)+1),
|
||||
isset($_REQUEST['action']) ? $_REQUEST['action'] : ''));
|
||||
|
||||
/**
|
||||
* check referer
|
||||
*/
|
||||
if(!isset($_SERVER['HTTP_REFERER'])
|
||||
|| strpos(strtolower($_SERVER['HTTP_REFERER']), strtolower($_SERVER['HTTP_HOST'])) === false)
|
||||
{
|
||||
if($bm_prefs['cookie_lock'] == 'yes')
|
||||
{
|
||||
$ok = false;
|
||||
foreach($_COOKIE as $key=>$val)
|
||||
if(substr($key, 0, strlen('sessionSecret_')) == 'sessionSecret_')
|
||||
$ok = true;
|
||||
if(!$ok)
|
||||
die('Access denied');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* deref code
|
||||
*/
|
||||
$url = $_SERVER['REQUEST_URI'];
|
||||
$sepPos = strpos($url, '?');
|
||||
if($sepPos !== false)
|
||||
{
|
||||
$targetURL = substr($url, $sepPos+1);
|
||||
$tpl->assign('url', HTMLFormat($targetURL));
|
||||
$tpl->display('nli/deref.tpl');
|
||||
}
|
||||
?>
|
||||
chdir('..');
|
||||
require_once './deref.php';
|
Loading…
Reference in a new issue