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> </div>
<?php <?php
$seq = 0; if(G5_USE_MOBILE && G5_IS_MOBILE) {
$href = $_SERVER['PHP_SELF']; $seq = 0;
if($_SERVER['QUERY_STRING']) { $href = $_SERVER['PHP_SELF'];
$sep = '?'; if($_SERVER['QUERY_STRING']) {
foreach($_GET as $key=>$val) { $sep = '?';
if($key == 'device') foreach($_GET as $key=>$val) {
continue; if($key == 'device')
continue;
$href .= $sep.$key.'='.$val; $href .= $sep.$key.'='.$val;
$sep = '&amp;'; $sep = '&amp;';
$seq++; $seq++;
}
} }
} if($seq)
if($seq) $href .= '&amp;device=pc';
$href .= '&amp;device=pc'; else
else $href .= '?device=pc';
$href .= '?device=pc';
?> ?>
<a href="<?php echo $href; ?>" id="device_change">PC 버전으로 보기</a> <a href="<?php echo $href; ?>" id="device_change">PC 버전으로 보기</a>
<?php <?php
}
if ($config['cf_analytics']) {
echo $config['cf_analytics'];
}
include_once(G5_PATH."/tail.sub.php"); include_once(G5_PATH."/tail.sub.php");
?> ?>

View File

@ -35,7 +35,7 @@ if ($config['cf_include_tail']) {
</div> </div>
<?php <?php
if(!G5_IS_MOBILE) { if(G5_USE_MOBILE && !G5_IS_MOBILE) {
$seq = 0; $seq = 0;
$href = $_SERVER['PHP_SELF']; $href = $_SERVER['PHP_SELF'];
if($_SERVER['QUERY_STRING']) { if($_SERVER['QUERY_STRING']) {