Your IP : 172.71.120.3


Current Path : /var/www/element/data/www/greenpr.ru/bitrix3/modules/main/interface/
Upload File :
Current File : /var/www/element/data/www/greenpr.ru/bitrix3/modules/main/interface/init_jspopup.php

<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();

function JSPopupRedirectHandler()
{
	global $DB, $USER, $APPLICATION;
	ob_end_clean();

	if ($_REQUEST['subdialog'] && !preg_match('/[^a-zA-Z0-9_]/is', $_REQUEST['suffix']))
	{
		$suffix = '_'.$_REQUEST['suffix'];
		echo '<script type="text/javascript">top.jsUtils.EvalGlobal(\'jsPopup'.$suffix.'.AllowClose(); jsPopup'.$suffix.'.CloseDialog(); CloseWaitWindow();\')</script>';
	}
	else
	{
		echo '<script type="text/javascript">
top.jsPopup.CloseDialog();
var new_href = top.location.href;
var hashpos = new_href.indexOf(\'#\');
if (hashpos != -1)
	new_href = new_href.substr(0, hashpos);
	
new_href += (new_href.indexOf(\'?\') == -1 ? \'?\' : \'&\') + \'clear_cache=Y\';
top.location.href = new_href;
		
/*
if (top.location.hash == \'\' || top.location.hash == \'#\')
	top.location = top.location.href;
else
	top.location.reload();
*/
</script>';
	}

	require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_admin.php");
	die();
}

AddEventHandler('main', 'OnBeforeLocalRedirect', 'JSPopupRedirectHandler');
?>