Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
6d8bccaf5b3d376e4fb8a041cac3bcdb0d70cc4f
1 parent
db2cda7d
添加遗漏的helpJsRedirect函数
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
library/Action/WebAction.php
library/Action/WebAction.php
View file @
6d8bcca
...
...
@@ -604,4 +604,29 @@ class WebAction extends Controller_Abstract
return
$apiDomain
;
}
/**
* JS 跳转并提示
*
* @param String $message 提示信息
* @param String $expression 附加的JS
* @return void
*/
protected
function
helpJsRedirect
(
$message
=
''
,
$expression
=
"history.back()"
)
{
header
(
"content-type: text/html; charset=utf-8"
);
if
(
$message
!=
''
)
{
$message
=
strtr
(
addslashes
(
$message
),
array
(
'\n'
=>
'\\n'
));
echo
"<script language=
\"
javascript
\"
>"
;
echo
"alert(
\"
{
$message
}
\"
);"
;
echo
"</script>"
;
}
if
(
$expression
!=
''
)
{
echo
"<script language=
\"
javascript
\"
>
\n
"
;
echo
$expression
.
"
\n
"
;
echo
"</script>"
;
}
exit
();
}
}
...
...
Please
register
or
login
to post a comment