경고메세지를 alert.php 에서 처리

This commit is contained in:
gnuboard
2012-12-28 14:29:24 +09:00
parent 7da12747e5
commit f425ce9832
2 changed files with 27 additions and 4 deletions

View File

@ -112,10 +112,15 @@ function get_cookie($cookie_name)
// 경고메세지를 경고창으로
function alert($msg='', $url='')
{
global $g4;
global $g4, $config, $member;
global $is_admin;
if (!$msg) $msg = '올바른 방법으로 이용해 주십시오.';
$msg = str_replace("\\n", "<br>", $msg);
if (!$url) $url = "javascript:history.go(-1);";
/*
//header("Content-Type: text/html; charset=$g4['charset']");
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset={$g4['charset']}\">";
echo "<script>alert('$msg');";
@ -127,6 +132,13 @@ function alert($msg='', $url='')
//echo "<meta http-equiv='refresh' content='0;url=$url'>";
goto_url($url);
exit;
*/
$header = '';
if (isset($g4['title'])) {
$header = $g4['title'];
}
include_once("{$g4['bbs_path']}/alert.php");
exit;
}
@ -1479,6 +1491,13 @@ function bad_tag_convert($code)
}
// 토큰 생성
function _token()
{
return md5(uniqid(rand(), true));
}
// 불법접근을 막도록 토큰을 생성하면서 토큰값을 리턴
function get_token()
{