device 관련 내용을 계속해서 추가되는 문제 수정

This commit is contained in:
chicpro committed 2013-08-08 15:58:37 +09:00
1 parent a232452025
commit 56906ed6b1
2 files changed
+45 -4

No files matched your search

+21 -1
View File
@@ -40,7 +40,27 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
</div>
</footer>
<a href="<?php echo $_SERVER['PHP_SELF'].($_SERVER['QUERY_STRING']?'?'.str_replace("&", "&amp;", $_SERVER['QUERY_STRING']).'&amp;':'?').'device=pc'; ?>" id="device_change">PC 버전으로 보기</a>
<?php
$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++;
}
}
if($seq)
$href .= '&amp;device=pc';
else
$href .= '?device=pc';
?>
<a href="<?php echo $href; ?>" id="device_change">PC 버전으로 보기</a>
<?php
include_once(G4_PATH."/tail.sub.php");
+24 -3
View File
@@ -34,9 +34,30 @@ if ($config['cf_include_tail']) {
</div>
</div>
<?php if(!G4_IS_MOBILE) { ?>
<a href="<?php echo $_SERVER['PHP_SELF'].($_SERVER['QUERY_STRING']?'?'.str_replace("&", "&amp;", $_SERVER['QUERY_STRING']).'&amp;':'?').'device=mobile'; ?>" id="device_change">모바일 버전으로 보기</a>
<?php } ?>
<?php
if(!G4_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++;
}
}
if($seq)
$href .= '&amp;device=mobile';
else
$href .= '?device=mobile';
?>
<a href="<?php echo $href; ?>" id="device_change">모바일 버전으로 보기</a>
<?php
}
?>
<!-- } 하단 끝 -->