+ add zin and zui3 files.
This commit is contained in:
@@ -13,6 +13,20 @@ $lang->navIcons['bi'] = "<i class='icon icon-statistic'></i>";
|
||||
$lang->navIcons['system'] = "<i class='icon icon-group'></i>";
|
||||
$lang->navIcons['admin'] = "<i class='icon icon-cog-outline'></i>";
|
||||
|
||||
$lang->navIconNames = array();
|
||||
$lang->navIconNames['my'] = 'menu-my';
|
||||
$lang->navIconNames['program'] = 'program';
|
||||
$lang->navIconNames['product'] = 'product';
|
||||
$lang->navIconNames['project'] = 'project';
|
||||
$lang->navIconNames['execution'] = 'run';
|
||||
$lang->navIconNames['qa'] = 'test';
|
||||
$lang->navIconNames['devops'] = 'devops';
|
||||
$lang->navIconNames['kanban'] = 'kanban';
|
||||
$lang->navIconNames['doc'] = 'doc';
|
||||
$lang->navIconNames['bi'] = 'statistic';
|
||||
$lang->navIconNames['system'] = 'group';
|
||||
$lang->navIconNames['admin'] = 'cog-outline';
|
||||
|
||||
global $config;
|
||||
list($programModule, $programMethod) = explode('-', $config->programLink);
|
||||
list($productModule, $productMethod) = explode('-', $config->productLink);
|
||||
|
||||
+15
-8
@@ -2498,17 +2498,17 @@ EOF;
|
||||
*/
|
||||
public function checkIframe()
|
||||
{
|
||||
/**
|
||||
/*
|
||||
* 忽略如下情况:非 HTML 请求、Ajax 请求、特殊 GET 参数 _single。
|
||||
* Ignore the following situations: non-HTML request, Ajax request, special GET parameter _single.
|
||||
*/
|
||||
if($this->app->getViewType() != 'html' || helper::isAjaxRequest() || isset($_GET['_single'])) return;
|
||||
if($this->app->getViewType() != 'html' || helper::isAjaxRequest() || isset($_GET['_single'])) return true;
|
||||
|
||||
/**
|
||||
* 忽略无请求头 HTTP_SEC_FETCH_DEST 或者 HTTP_SEC_FETCH_DEST 为 iframe 的请求,较新的浏览器在启用 https 的情况下才会正确发送该请求头。
|
||||
* Ignore the request without HTTP_SEC_FETCH_DEST or HTTP_SEC_FETCH_DEST is iframe, the latest browser will send this request header correctly when enable https.
|
||||
*/
|
||||
if(!isset($_SERVER['HTTP_SEC_FETCH_DEST']) || $_SERVER['HTTP_SEC_FETCH_DEST'] == 'iframe') return;
|
||||
if(!isset($_SERVER['HTTP_SEC_FETCH_DEST']) || $_SERVER['HTTP_SEC_FETCH_DEST'] == 'iframe') return true;
|
||||
|
||||
/**
|
||||
* 当有 HTTP_REFERER 请求头时,忽略 safari 浏览器,因为 safari 浏览器不会正确发送 HTTP_SEC_FETCH_DEST 请求头。
|
||||
@@ -2517,17 +2517,23 @@ EOF;
|
||||
if(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']))
|
||||
{
|
||||
$userAgent = strtolower($_SERVER['HTTP_USER_AGENT']);
|
||||
if(strpos($userAgent, 'chrome') === false && strpos($userAgent, 'safari') !== false) return;
|
||||
if(strpos($userAgent, 'chrome') === false && strpos($userAgent, 'safari') !== false) return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 忽略所有方法名以 ajax 开头的请求。
|
||||
* Ignore all requests which it's method name starts with 'ajax'.
|
||||
*/
|
||||
$method = $this->app->getMethodName();
|
||||
if(strpos($method, 'ajax') === 0) return true;
|
||||
|
||||
/**
|
||||
* 以下页面可以允许在非 iframe 中打开,所以要忽略这些页面。
|
||||
* The following pages can be allowed to open in non-iframe, so ignore these pages.
|
||||
*/
|
||||
$module = $this->app->getModuleName();
|
||||
$method = $this->app->getMethodName();
|
||||
$whitelist = '|index|tutorial|install|upgrade|sso|cron|misc|user-login|user-deny|user-logout|user-reset|user-forgetpassword|user-resetpassword|my-changepassword|my-preference|file-read|file-download|file-uploadimages|file-ajaxwopifiles|report-annualdata|misc-captcha|execution-printkanban|traincourse-ajaxuploadlargefile|traincourse-playvideo|screen-view|zanode-create|screen-ajaxgetchart|';
|
||||
if(strpos($whitelist, "|{$module}|") !== false || strpos($whitelist, "|{$module}-{$method}|") !== false) return;
|
||||
$whitelist = '|index|tutorial|install|upgrade|sso|cron|misc|user-login|user-deny|user-logout|user-reset|user-forgetpassword|user-resetpassword|my-changepassword|my-preference|file-read|file-download|file-uploadimages|report-annualdata|misc-captcha|execution-printkanban||traincourse-playvideo|';
|
||||
if(strpos($whitelist, "|{$module}|") !== false || strpos($whitelist, "|{$module}-{$method}|") !== false) return true;
|
||||
|
||||
/**
|
||||
* 如果以上条件都不满足,则视为当前页面必须在 iframe 中打开,使用 302 跳转实现。
|
||||
@@ -2536,7 +2542,8 @@ EOF;
|
||||
$url = helper::safe64Encode($_SERVER['REQUEST_URI']);
|
||||
$redirectUrl = helper::createLink('index', 'index');
|
||||
$redirectUrl .= strpos($redirectUrl, '?') === false ? "?open=$url" : "&open=$url";
|
||||
die(header("location: $redirectUrl"));
|
||||
helper::header('location', $redirectUrl);
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user