G5_USE_MOBILE 상수 추가에 따른 모바일 PC 버전 보기 버튼 코드 수정

This commit is contained in:
chicpro
2013-11-18 18:21:52 +09:00
parent c74c7cd726
commit c07c00659f
2 changed files with 23 additions and 18 deletions

View File

@ -40,27 +40,32 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
</div>
<?php
$seq = 0;
$href = $_SERVER['PHP_SELF'];
if($_SERVER['QUERY_STRING']) {
$sep = '?';
foreach($_GET as $key=>$val) {
if($key == 'device')
continue;
if(G5_USE_MOBILE && G5_IS_MOBILE) {
$seq = 0;
$href = $_SERVER['PHP_SELF'];
if($_SERVER['QUERY_STRING']) {
$sep = '?';
foreach($_GET as $key=>$val) {
if($key == 'device')
continue;
$href .= $sep.$key.'='.$val;
$sep = '&amp;';
$seq++;
$href .= $sep.$key.'='.$val;
$sep = '&amp;';
$seq++;
}
}
}
if($seq)
$href .= '&amp;device=pc';
else
$href .= '?device=pc';
if($seq)
$href .= '&amp;device=pc';
else
$href .= '?device=pc';
?>
<a href="<?php echo $href; ?>" id="device_change">PC 버전으로 보기</a>
<?php
}
if ($config['cf_analytics']) {
echo $config['cf_analytics'];
}
include_once(G5_PATH."/tail.sub.php");
?>