mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-15 13:58:24 +08:00
36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?php
|
|
use yii\helpers\Json;
|
|
|
|
/* @var $this \yii\base\View */
|
|
/* @var $url string */
|
|
/* @var $enforceRedirect boolean */
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script>
|
|
function popupWindowRedirect(url, enforceRedirect)
|
|
{
|
|
if (window.opener && !window.opener.closed) {
|
|
if (enforceRedirect === undefined || enforceRedirect) {
|
|
window.opener.location = url;
|
|
}
|
|
window.opener.focus();
|
|
window.close();
|
|
} else {
|
|
window.location = url;
|
|
}
|
|
}
|
|
popupWindowRedirect(<?= Json::encode($url) ?>, <?= Json::encode($enforceRedirect) ?>);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h2 id="title" style="display:none;">Redirecting back to the "<?= Yii::$app->name ?>"...</h2>
|
|
<h3 id="link"><a href="<?= $url ?>">Click here to return to the "<?= Yii::$app->name ?>".</a></h3>
|
|
<script type="text/javascript">
|
|
document.getElementById('title').style.display = '';
|
|
document.getElementById('link').style.display = 'none';
|
|
</script>
|
|
</body>
|
|
</html>
|