notice 오류 해결중

This commit is contained in:
gnuboard
2012-12-28 09:55:45 +09:00
parent 2b5c471bdb
commit 830cefce6a
10 changed files with 398 additions and 422 deletions

View File

@ -33,9 +33,9 @@ $sql = " select count(*) as cnt
{$sql_search}
{$sql_order} ";
$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); // 전체 페이지 계산
if ($page == '') $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
@ -47,9 +47,11 @@ $sql = " select *
limit {$from_record}, {$rows} ";
$result = sql_query($sql);
$listall = '';
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
$mb = array();
if ($sfl == 'mb_id' && $stx)
$mb = get_member($stx);
@ -82,9 +84,9 @@ function point_clear()
<?=$listall?>
전체 <?=number_format($total_count)?> 건
<?
if ($mb['mb_id'])
echo '&nbsp;(' . $mb['mb_id'] .' 님 포인트 합계 : ' . number_format($mb[mb_point]) . '점)';
else {
if (isset($mb['mb_id']) && $mb['mb_id']) {
echo '&nbsp;(' . $mb['mb_id'] .' 님 포인트 합계 : ' . number_format($mb['mb_point']) . '점)';
} else {
$row2 = sql_fetch(" select sum(po_point) as sum_point from {$g4['point_table']} ");
echo '&nbsp;(전체 합계 '.number_format($row2['sum_point']).'점)';
}
@ -127,10 +129,8 @@ function point_clear()
</thead>
<tbody>
<?
for ($i=0; $row=sql_fetch_array($result); $i++)
{
if ($row2['mb_id'] != $row['mb_id'])
{
for ($i=0; $row=sql_fetch_array($result); $i++) {
if ($i==0 || ($row2['mb_id'] != $row['mb_id'])) {
$sql2 = " select mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point from {$g4['member_table']} where mb_id = '{$row['mb_id']}' ";
$row2 = sql_fetch($sql2);
}
@ -138,8 +138,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
$mb_nick = get_sideview($row['mb_id'], $row2['mb_nick'], $row2['mb_email'], $row2['mb_homepage']);
$link1 = $link2 = '';
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table'])
{
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) {
$link1 = '<a href="'.$g4['bbs_path'].'/board.php?bo_table='.$row['po_rel_table'].'&amp;wr_id='.$row['po_rel_id'].'" target="_blank">';
$link2 = '</a>';
}
@ -148,7 +147,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
<tr>
<td class="td_chk">
<input type="hidden" id="mb_id_<?=$i?>" name="mb_id[<?=$i?>]" value="<?=$row['mb_id']?>">
<input type="hidden" id="po_id_<?=$i?>" name="po_id[<?=$i?>]" value="<?=$row[po_id]?>">
<input type="hidden" id="po_id_<?=$i?>" name="po_id[<?=$i?>]" value="<?=$row['po_id']?>">
<input type="checkbox" id="chk_<?=$i?>" name="chk[]" value="<?=$i?>" title="내역선택">
</td>
<td class="td_mbid"><a href="?sfl=mb_id&amp;stx=<?=$row['mb_id']?>"><?=$row['mb_id']?></a></td>
@ -156,8 +155,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
<td class="td_mbnick"><div><?=$mb_nick?></div></td>
<td><?=$row['po_datetime']?></td>
<td class="td_pt_log"><?=$link1?><?=$row['po_content']?><?=$link2?></td>
<td class="td_bignum"><?=number_format($row[po_point])?></td>
<td class="td_bignum"><?=number_format($row2[mb_point])?></td>
<td class="td_bignum"><?=number_format($row['po_point'])?></td>
<td class="td_bignum"><?=number_format($row2['mb_point'])?></td>
</tr>
<?
@ -174,7 +173,7 @@ if ($i == 0)
</div>
<?
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&amp;page=");
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&amp;page=");
?>
<div class="pg">
<?=$pagelist?>