경로 변수 $g4['url'] 등을 G4_URL 과 같은 상수로 변경

This commit is contained in:
gnuboard
2013-02-01 14:23:10 +09:00
parent cf43f77951
commit b4d8615d63
26 changed files with 47 additions and 72 deletions

View File

@ -1321,7 +1321,7 @@ function referer_check($url='')
global $g4;
if (!$url)
$url = $g4['url'];
$url = G4_URL;
if (!preg_match("/^http['s']?:\/\/".$_SERVER['HTTP_HOST']."/", $_SERVER['HTTP_REFERER']))
alert("제대로 된 접근이 아닌것 같습니다.", $url);

View File

@ -21,9 +21,7 @@ function mailer($fname, $fmail, $to, $subject, $content, $type=0, $file='', $cc=
if ($cc) $header .= "Cc: $cc\n";
if ($bcc) $header .= "Bcc: $bcc\n";
$header .= "MIME-Version: 1.0\n";
//$header .= "X-Mailer: SIR Mailer 0.91 (sir.co.kr) : $_SERVER[SERVER_ADDR] : $_SERVER[REMOTE_ADDR] : $g4[url] : $_SERVER[PHP_SELF] : $_SERVER[HTTP_REFERER] \n";
// UTF-8 관련 수정
$header .= "X-Mailer: SIR Mailer 0.92 (sir.co.kr) : {$_SERVER['SERVER_ADDR']} : {$_SERVER['REMOTE_ADDR']} : {$g4['url']} : {$_SERVER['PHP_SELF']} : {$_SERVER['HTTP_REFERER']} \n";
$header .= "X-Mailer: {$_SERVER['SERVER_ADDR']} : {$_SERVER['REMOTE_ADDR']} : ".G4_URL." : {$_SERVER['PHP_SELF']} : {$_SERVER['HTTP_REFERER']} \n";
if ($file != '') {
$boundary = uniqid('http://sir.co.kr/');

View File

@ -32,15 +32,15 @@ function outlogin($skin_dir='basic')
$outlogin_url = $_GET['url'];
if ($outlogin_url) {
if (preg_match("/^\.\.\//", $outlogin_url)) {
$outlogin_url = urlencode($g4[url]."/".preg_replace("/^\.\.\//", "", $outlogin_url));
$outlogin_url = urlencode(G4_URL."/".preg_replace("/^\.\.\//", "", $outlogin_url));
}
else {
$purl = parse_url($g4[url]);
$purl = parse_url(G4_URL);
if ($purl['path']) {
$path = urlencode($purl['path']);
$urlencode = preg_replace("/".$path."/", "", $urlencode);
}
$outlogin_url = G4_URL.$urlencode;
$outlogin_url = $urlencode;
}
}
else {