first commit
This commit is contained in:
55
application/helpers/crossmap/exception_helper.php
Executable file
55
application/helpers/crossmap/exception_helper.php
Executable file
@@ -0,0 +1,55 @@
|
||||
<?
|
||||
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* -----------------------------------------------------------------------------
|
||||
* PURPOSE : alert 후 이동
|
||||
* CREATE : 2018-02-19 alert
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
if ( ! function_exists('gf_alert') ) {
|
||||
function gf_alert($msg, $url='') {
|
||||
|
||||
|
||||
echo '<script>';
|
||||
echo ' alert("'.$msg.'");';
|
||||
if($url!='') {
|
||||
if($url=='back') {
|
||||
echo 'history.back();';
|
||||
} else if($url=='self_close') {
|
||||
echo 'self.close();';
|
||||
} else {
|
||||
|
||||
|
||||
$a = @$_SERVER['HTTP_REFERER'];
|
||||
$a = @explode("//crossmap.co.kr/",$a);
|
||||
$flag = @(substr($a[1],0,2));
|
||||
|
||||
|
||||
if($flag == 'm' || $flag == 'm/'){
|
||||
$split_url = substr($url,0,4);
|
||||
switch($split_url){
|
||||
case "/":
|
||||
$url = "/m";
|
||||
break;
|
||||
default:
|
||||
$url = str_replace("/web/","/m/",$url);
|
||||
$url = str_replace("web/","m/",$url);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// echo $url;
|
||||
|
||||
echo 'location.href="'.$url.'";';
|
||||
}
|
||||
}
|
||||
echo '</script>';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user