모바일용 페이징 변수 추가

This commit is contained in:
chicpro
2013-03-05 16:01:06 +09:00
parent ff35046dc9
commit ecaae4d8fa
3 changed files with 18 additions and 19 deletions

View File

@ -103,7 +103,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$list[$i]['wr_subject'] = $row2['wr_subject']; $list[$i]['wr_subject'] = $row2['wr_subject'];
} }
$write_pages = get_paging($config['cf_write_pages'], $page, $total_page, "?gr_id=$gr_id&view=$view&mb_id=$mb_id&page="); $write_pages = get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "?gr_id=$gr_id&view=$view&mb_id=$mb_id&page=");
include_once($new_skin_path.'/new.skin.php'); include_once($new_skin_path.'/new.skin.php');

View File

@ -1,22 +1,22 @@
<? <?
include_once('./_common.php'); include_once('./_common.php');
if (!$member[mb_id]) if ($is_guest)
alert_close('회원만 조회하실 수 있습니다.'); alert_close('회원만 조회하실 수 있습니다.');
$g4['title'] = $member[mb_nick].' 님의 포인트 내역'; $g4['title'] = $member['mb_nick'].' 님의 포인트 내역';
include_once(G4_PATH.'/head.sub.php'); include_once(G4_PATH.'/head.sub.php');
$list = array(); $list = array();
$sql_common = " from {$g4[point_table]} where mb_id = '".mysql_escape_string($member[mb_id])."' "; $sql_common = " from {$g4['point_table']} where mb_id = '".mysql_escape_string($member['mb_id'])."' ";
$sql_order = " order by po_id desc "; $sql_order = " order by po_id desc ";
$sql = " select count(*) as cnt {$sql_common} "; $sql = " select count(*) as cnt {$sql_common} ";
$row = sql_fetch($sql); $row = sql_fetch($sql);
$total_count = $row[cnt]; $total_count = $row['cnt'];
$rows = $config[cf_page_rows]; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if (!$page) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) if (!$page) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
@ -58,7 +58,7 @@ for($i=0; $row=sql_fetch_array($result); $i++) {
</tr> </tr>
<tr> <tr>
<th scope="row" colspan="2">보유포인트</th> <th scope="row" colspan="2">보유포인트</th>
<td colspan="2"><?=number_format($member[mb_point])?></td> <td colspan="2"><?=number_format($member['mb_point'])?></td>
</tr> </tr>
</tfoot> </tfoot>
<tbody> <tbody>
@ -72,18 +72,18 @@ for($i=0; $row=sql_fetch_array($result); $i++) {
$result = sql_query($sql); $result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) { for ($i=0; $row=sql_fetch_array($result); $i++) {
$point1 = $point2 = 0; $point1 = $point2 = 0;
if ($row[po_point] > 0) { if ($row['po_point'] > 0) {
$point1 = '+' .number_format($row[po_point]); $point1 = '+' .number_format($row['po_point']);
$sum_point1 += $row[po_point]; $sum_point1 += $row['po_point'];
} else { } else {
$point2 = number_format($row[po_point]); $point2 = number_format($row['po_point']);
$sum_point2 += $row[po_point]; $sum_point2 += $row['po_point'];
} }
?> ?>
<tr> <tr>
<td class="td_datetime"><?=$row[po_datetime]?></td> <td class="td_datetime"><?=$row['po_datetime']?></td>
<td><?=$row[po_content]?></td> <td><?=$row['po_content']?></td>
<td class="td_bignum"><?=$point1?></td> <td class="td_bignum"><?=$point1?></td>
<td class="td_bignum"><?=$point2?></td> <td class="td_bignum"><?=$point2?></td>
</tr> </tr>
@ -102,14 +102,13 @@ for($i=0; $row=sql_fetch_array($result); $i++) {
</table> </table>
<?=get_paging($config[cf_write_pages], $page, $total_page, $_SERVER[PHP_SELF].'?'.$qstr.'&amp;page=');?> <?=get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&amp;page=');?>
<div class="btn_win"><a>창닫기</a></div>
</div> </div>
<script> <script>
$(function() { $(function() {
$("#point").append("<div class=\"btn_win\"><a>창닫기</a></div>");
$(".btn_win a").click(function() { $(".btn_win a").click(function() {
window.close(); window.close();
}); });

View File

@ -27,7 +27,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
</tbody> </tbody>
</table> </table>
<?=get_paging($config['cf_write_pages'], $page, $total_page, "?$qstr&amp;page=");?> <?=get_paging($config['cf_mobile_pages'], $page, $total_page, "?$qstr&amp;page=");?>
<div class="btn_win"><a href="javascript:;" onclick="window.close();">창닫기</a></div> <div class="btn_win"><a href="javascript:;" onclick="window.close();">창닫기</a></div>
</div> </div>