point창에 내용 검색창 달기 정보
point창에 내용 검색창 달기
본문
bbs/point.php를 덮어씌우면 됩니다...^^
<?
include_once("./_common.php");
if (!$member[mb_id])
alert_close("회원만 조회하실 수 있습니다.");
$g4[title] = $member[mb_nick] . "님의 포인트 내역";
include_once("$g4[path]/head.sub.php");
$list = array();
$sql_common = " from $g4[point_table] where mb_id = '$member[mb_id]' ";
if ($stx) {
$sfl = "po_content";
$sql_common .= " and ( ";
$sql_common .= " ($sfl like '%$stx%') ";
$sql_common .= " ) ";
}
$sql_order = " order by po_id desc ";
$sql = " select count(*) as cnt $sql_common ";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$rows = $config[cf_page_rows];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if (!$page) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$listall = "<a href='$_SERVER[PHP_SELF]'>처음</a>";
?>
<table width="600" height="40" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle" bgcolor="#EBEBEB"><table width="590" height="40" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25" align="center" bgcolor="#FFFFFF" ><img src="<?=$g4[bbs_img_path]?>/icon_01.gif" width="5" height="5"></td>
<td width="" align="left" bgcolor="#FFFFFF" ><font color="#666666"><b><?=$g4[title]?></b></font></td>
</tr>
</table></td>
</tr>
</table>
<table width="590" height="30" border="0" cellpadding="0" cellspacing="0" align='center'>
<form name=fsearch method=get>
<tr>
<td width=55% align=left style='padding-left:10px;'>
<?=$listall?> (건수 : <?=number_format($total_count)?>)
</td>
<td width=45% align=right>
<input type=text name=stx required itemname='검색어' value='<?=$stx?>'>
<input type=image src='<?=$g4[admin_path]?>/img/btn_search.gif' align=absmiddle></td>
</tr>
</form>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="200" align="center" valign="top"><table width="540" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="2" bgcolor="#808080"></td>
</tr>
<tr>
<td width="540" bgcolor="#FFFFFF">
<table width=100% cellpadding=1 cellspacing=1 border=0>
<tr bgcolor=#E1E1E1 align=center>
<td width="130" height="24"><b>일시</b></td>
<td width=""><b>내용</b></td>
<td width="70"><b>지급포인트</b></td>
<td width="70"><b>사용포인트</b></td>
</tr>
<?
$sum_point1 = $sum_point2 = 0;
$sql = " select *
$sql_common
$sql_order
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$point1 = $point2 = 0;
if ($row[po_point] > 0) {
$point1 = "+" . number_format($row[po_point]);
$sum_point1 += $row[po_point];
} else {
$point2 = number_format($row[po_point]);
$sum_point2 += $row[po_point];
}
echo <<<HEREDOC
<tr height=25 bgcolor="#F6F6F6" align="center">
<td height="24">$row[po_datetime]</td>
<td align="left" title='$row[po_content]'><nobr style='display:block; overflow:hidden; width:250px;'> $row[po_content]</a></td>
<td align=right>{$point1} </td>
<td align=right>{$point2} </td>
</tr>
HEREDOC;
}
if ($i == 0)
echo "<tr><td colspan=5 align=center height=100>자료가 없습니다.</td></tr>";
else {
if ($sum_point1 > 0)
$sum_point1 = "+" . number_format($sum_point1);
$sum_point2 = number_format($sum_point2);
echo <<<HEREDOC
<tr height=25 bgcolor="#E1E1E1" align="center">
<td height="24" colspan=2 align=center>소계</td>
<td align=right>{$sum_point1} </td>
<td align=right>{$sum_point2} </td>
</tr>
HEREDOC;
}
?>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="25" align="center"><?=get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&page=");?></td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#F6F6F6">
<img src='<?=$g4[bbs_img_path]?>/icon_02.gif'> 보유 포인트 : <B><?=number_format($member[mb_point])?> 점</B></td>
</tr>
<tr>
<td height="2" align="center" valign="top" bgcolor="#D5D5D5"></td>
</tr>
<tr>
<td height="2" align="center" valign="top" bgcolor="#E6E6E6"></td>
</tr>
<tr>
<td height="30" align="center" valign="bottom"><a href="javascript:window.close();"><img src="<?=$g4[bbs_img_path]?>/close.gif" width="66" height="20" border="0"></a></td>
</tr>
</table>
<br>
<?/*?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr><td bgcolor=#B8B7B7><img src='<?=$g4[bbs_img_path]?>/title_point.gif'></td></tr>
</table>
<br>
<table width='99%' align=center cellpadding=3 cellspacing=0 border=1 bordercolordark=#F0F0F0>
<colgroup width=130></colgroup>
<colgroup width=''></colgroup>
<colgroup width=70></colgroup>
<colgroup width=70></colgroup>
<tr height=25 bgcolor=#F9F9F9 align=center>
<td>일시</td>
<td>내용</td>
<td>지급포인트</td>
<td>사용포인트</td>
</tr>
<?
$sql = " select *
$sql_common
$sql_order
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$point1 = $point2 = "";
if ($row[po_point] >= 0) {
$point1 = "+" . number_format($row[po_point]);
} else {
$point2 = number_format($row[po_point]);
}
echo "
<tr height=25>
<td align=center>$row[po_datetime]</td>
<td title='$row[po_content]'><nobr style='display:block; overflow:hidden; width:200px;'> $row[po_content]</a></td>
<td align=right>$point1 </td>
<td align=right>$point2 </td>
</tr>
";
}
if ($i == 0)
echo "<tr><td colspan=4 align=center height=100>자료가 없습니다.</td></tr>";
?>
</table>
<table width='100%' cellpadding=3 cellspacing=0>
<tr><td height=45 align=center><?=get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&page=");?></td></tr>
</table>
<table width='99%' align=center cellpadding=1 cellspacing=0 bgcolor=#CCCCCC>
<tr>
<td>
<table width='100%' cellpadding=0 cellspacing=0 bgcolor=#F9F9F9>
<tr>
<td height=50> <B>내 포인트 </B></td>
<td><img src='<?=$g4[bbs_img_path]?>/icon_02.gif'> 보유 포인트 : <B><?=number_format($member[mb_point])?></B></td>
</tr>
</table>
</td>
</tr>
</table>
<table width='100%' cellpadding=3 cellspacing=0>
<tr><td colspan=2 height=45 align=center><a href='javascript:window.close();'><img src='<?=$g4[bbs_img_path]?>/btn_close.gif' border=0></a></td></tr>
</table>
<?*/?>
<?
include_once("$g4[path]/tail.sub.php");
?>
<?
include_once("./_common.php");
if (!$member[mb_id])
alert_close("회원만 조회하실 수 있습니다.");
$g4[title] = $member[mb_nick] . "님의 포인트 내역";
include_once("$g4[path]/head.sub.php");
$list = array();
$sql_common = " from $g4[point_table] where mb_id = '$member[mb_id]' ";
if ($stx) {
$sfl = "po_content";
$sql_common .= " and ( ";
$sql_common .= " ($sfl like '%$stx%') ";
$sql_common .= " ) ";
}
$sql_order = " order by po_id desc ";
$sql = " select count(*) as cnt $sql_common ";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$rows = $config[cf_page_rows];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if (!$page) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$listall = "<a href='$_SERVER[PHP_SELF]'>처음</a>";
?>
<table width="600" height="40" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle" bgcolor="#EBEBEB"><table width="590" height="40" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25" align="center" bgcolor="#FFFFFF" ><img src="<?=$g4[bbs_img_path]?>/icon_01.gif" width="5" height="5"></td>
<td width="" align="left" bgcolor="#FFFFFF" ><font color="#666666"><b><?=$g4[title]?></b></font></td>
</tr>
</table></td>
</tr>
</table>
<table width="590" height="30" border="0" cellpadding="0" cellspacing="0" align='center'>
<form name=fsearch method=get>
<tr>
<td width=55% align=left style='padding-left:10px;'>
<?=$listall?> (건수 : <?=number_format($total_count)?>)
</td>
<td width=45% align=right>
<input type=text name=stx required itemname='검색어' value='<?=$stx?>'>
<input type=image src='<?=$g4[admin_path]?>/img/btn_search.gif' align=absmiddle></td>
</tr>
</form>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="200" align="center" valign="top"><table width="540" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="2" bgcolor="#808080"></td>
</tr>
<tr>
<td width="540" bgcolor="#FFFFFF">
<table width=100% cellpadding=1 cellspacing=1 border=0>
<tr bgcolor=#E1E1E1 align=center>
<td width="130" height="24"><b>일시</b></td>
<td width=""><b>내용</b></td>
<td width="70"><b>지급포인트</b></td>
<td width="70"><b>사용포인트</b></td>
</tr>
<?
$sum_point1 = $sum_point2 = 0;
$sql = " select *
$sql_common
$sql_order
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$point1 = $point2 = 0;
if ($row[po_point] > 0) {
$point1 = "+" . number_format($row[po_point]);
$sum_point1 += $row[po_point];
} else {
$point2 = number_format($row[po_point]);
$sum_point2 += $row[po_point];
}
echo <<<HEREDOC
<tr height=25 bgcolor="#F6F6F6" align="center">
<td height="24">$row[po_datetime]</td>
<td align="left" title='$row[po_content]'><nobr style='display:block; overflow:hidden; width:250px;'> $row[po_content]</a></td>
<td align=right>{$point1} </td>
<td align=right>{$point2} </td>
</tr>
HEREDOC;
}
if ($i == 0)
echo "<tr><td colspan=5 align=center height=100>자료가 없습니다.</td></tr>";
else {
if ($sum_point1 > 0)
$sum_point1 = "+" . number_format($sum_point1);
$sum_point2 = number_format($sum_point2);
echo <<<HEREDOC
<tr height=25 bgcolor="#E1E1E1" align="center">
<td height="24" colspan=2 align=center>소계</td>
<td align=right>{$sum_point1} </td>
<td align=right>{$sum_point2} </td>
</tr>
HEREDOC;
}
?>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="25" align="center"><?=get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&page=");?></td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#F6F6F6">
<img src='<?=$g4[bbs_img_path]?>/icon_02.gif'> 보유 포인트 : <B><?=number_format($member[mb_point])?> 점</B></td>
</tr>
<tr>
<td height="2" align="center" valign="top" bgcolor="#D5D5D5"></td>
</tr>
<tr>
<td height="2" align="center" valign="top" bgcolor="#E6E6E6"></td>
</tr>
<tr>
<td height="30" align="center" valign="bottom"><a href="javascript:window.close();"><img src="<?=$g4[bbs_img_path]?>/close.gif" width="66" height="20" border="0"></a></td>
</tr>
</table>
<br>
<?/*?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr><td bgcolor=#B8B7B7><img src='<?=$g4[bbs_img_path]?>/title_point.gif'></td></tr>
</table>
<br>
<table width='99%' align=center cellpadding=3 cellspacing=0 border=1 bordercolordark=#F0F0F0>
<colgroup width=130></colgroup>
<colgroup width=''></colgroup>
<colgroup width=70></colgroup>
<colgroup width=70></colgroup>
<tr height=25 bgcolor=#F9F9F9 align=center>
<td>일시</td>
<td>내용</td>
<td>지급포인트</td>
<td>사용포인트</td>
</tr>
<?
$sql = " select *
$sql_common
$sql_order
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$point1 = $point2 = "";
if ($row[po_point] >= 0) {
$point1 = "+" . number_format($row[po_point]);
} else {
$point2 = number_format($row[po_point]);
}
echo "
<tr height=25>
<td align=center>$row[po_datetime]</td>
<td title='$row[po_content]'><nobr style='display:block; overflow:hidden; width:200px;'> $row[po_content]</a></td>
<td align=right>$point1 </td>
<td align=right>$point2 </td>
</tr>
";
}
if ($i == 0)
echo "<tr><td colspan=4 align=center height=100>자료가 없습니다.</td></tr>";
?>
</table>
<table width='100%' cellpadding=3 cellspacing=0>
<tr><td height=45 align=center><?=get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&page=");?></td></tr>
</table>
<table width='99%' align=center cellpadding=1 cellspacing=0 bgcolor=#CCCCCC>
<tr>
<td>
<table width='100%' cellpadding=0 cellspacing=0 bgcolor=#F9F9F9>
<tr>
<td height=50> <B>내 포인트 </B></td>
<td><img src='<?=$g4[bbs_img_path]?>/icon_02.gif'> 보유 포인트 : <B><?=number_format($member[mb_point])?></B></td>
</tr>
</table>
</td>
</tr>
</table>
<table width='100%' cellpadding=3 cellspacing=0>
<tr><td colspan=2 height=45 align=center><a href='javascript:window.close();'><img src='<?=$g4[bbs_img_path]?>/btn_close.gif' border=0></a></td></tr>
</table>
<?*/?>
<?
include_once("$g4[path]/tail.sub.php");
?>
추천
1
1
댓글 7개
수고하셨습니다
간단하고 멋지군요.
검색조건에 기간설정과 지급포인트, 사용포인트 추가는 안돼나요? ============3=3
간단하고 멋지군요.
검색조건에 기간설정과 지급포인트, 사용포인트 추가는 안돼나요? ============3=3

안되는것은 없습니다....다만.....초보에게 넘 많은 것을 바라는게 아닐까요?......버러러럭~~~~!
수고하셨습니다. ㅜㅜ;
허걱 천상에 계신 고수님 왜그러세요
천상재회님이 초보면 root는 초보라는 명함도 못내밀겠네... ==3==3
천상재회님이 초보면 root는 초보라는 명함도 못내밀겠네... ==3==3

꺄악~~~~~~~~~
천상 재회님 너무 감사합니다. 꼬옥 필요 햇던.. ㅠㅠ
복받으세요~^^
천상 재회님 너무 감사합니다. 꼬옥 필요 햇던.. ㅠㅠ
복받으세요~^^

검색 업버전도 올려져 있습니다....골라 쓰세요.....^^
수고많으셨고 감사합니다.