포인트 소스좀 봐주세요. 정보
포인트 소스좀 봐주세요.본문
소스좀 봐주세요. 그림처럼 아래소스 수정하여 결재금액을 임의로 쓰려합니다.
질문1.
셀렉트 박스를 input text 타입으로 바꾸라는데.. 어떻게 바꾸는지 좀 봐주세요.
이렇게 하라는데. 어떻게 바꿔야할지 몰라서요..
--------------------소스1---------------------------------------
<?
$g4_path = ".";
include_once("$g4_path/_common.php");
$g4[title] = "출금 전환하기";
include_once("$g4[path]/head.sub.php");
if (!$member[mb_id]) {
alert_close("로그인 후 이용하세요.");
}
$item_money = "21000"; //아이템
$buy_cash = "30000"; //결제 금액
?>
<link rel='stylesheet' type='text/css' href='./change_style.css'>
<table width="450" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<form name=fchange method=post action="javascript:fchange_submit(document.fchange)" enctype="multipart/form-data">
<input type=hidden name="type" value="cash">
<input type=hidden name="item_money" value="<?=$item_money?>">
<input type=hidden name="buy_cash" value="<?=$buy_cash?>">
<tr>
<td style="padding:0 0 0 20px;" background="./img/top_bg.gif" height="35"><img src="./img/icon_top.gif" width="5" height="14" align="absmiddle" style="margin-bottom:2px;"> <span class="buy_title">출금 전환하기</span></td>
</tr>
<tr><td bgcolor="#eeeeee" height="10"></td></tr>
<tr>
<td bgcolor="#eeeeee" width="450" align="center" valign="top">
<table bgcolor="#ffffff" width="430" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td background="./img/box_t01.gif" width="10" height="10"></td>
<td background="./img/box_t02.gif" width="410" height="10"></td>
<td background="./img/box_t03.gif" width="10" height="10"></td>
</tr>
<tr>
<td background="./img/box_t04.gif" width="10"></td>
<td width="410" align="center" valign="top">
<table width="400" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr><td width="400" height="10"></td></tr>
<tr>
<td width="400" align="center">
<table style='border:1px solid #E4E4E4;' width="360" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td bgcolor="#ffe7e7" width="120" height="100" align="center">
<table style='border:1px solid #E4E4E4;' width="80" height="80" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td align="center">
<img src="./img/item_001.gif" align="absmiddle"></td>
</tr>
</table></td>
<td style="padding:10 10 10 0px;" bgcolor="#ffe7e7" width="240" height="100">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20"><span class="item_title"><?=number_format($item_money);?> 원</span></td>
</tr>
<tr>
<td height="20"><span class="m_j_1">·</span> <span class="item_cash_title">출금전환 : </span><span class="item_cash"><?=number_format($buy_cash);?>포인트</span></td>
</tr>
<tr>
<td style="padding:0 0 0 80px;" height="20"><span class="item_rebuy">(출금전환: 70%)</span></td>
</tr>
<tr>
<td height="20"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td width="410" height="20"></td>
</tr>
<tr>
<td style="padding:0 0 0 20px;" width="410" height="20"><img src="./img/icon_arrow.gif" align="absmiddle" style="margin-bottom:2px;"> <span class="money_title">포인트 현금전환 출금계산기</span></td>
</tr>
<tr>
<td width="410" height="3"></td>
</tr>
<tr>
<td width="410" height="92" align="center">
<table style='border:1px solid #E4E4E4;' width="360" height="92" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td style="padding:0 0 0 20px;" width="180" height="30"><span class="m_j_1">·</span> <span class="m_t_1">1회 전환 포인트 </span></td>
<td style="padding:0 5 0 20px;" width="145" height="30" align="right">
<div style="padding:3 5 0 0px; width:120px; height:20px; border:1px solid #E4E4E4;" align="right">
<?
echo "<span class='cash'>" . number_format($buy_cash) . "</span>";
?>
</div></td>
<td width="20"><span class="won">P</span></td>
<td width="50"></td>
</tr>
<tr>
<td bgcolor="#EEEEEE" width="360" height="1" colspan="4"></td>
</tr>
<tr>
<td style="padding:0 0 0 20px;" width="145" height="30"><span class="m_j_1">·</span> <span class="m_t_2">전환가능 포인트</span></td>
<td style="padding:0 5 0 20px;" width="145" height="30" align="right">
<div style="padding:3 5 0 0px; width:120px; height:20px; border:1px solid #E4E4E4;" align="right">
<?
echo "<span class='cash'>" . number_format($member[mb_point]) . "</span>";
?>
</div></td>
<td width="20"><span class="won">P</span></td>
<td width="50"></td>
</tr>
<tr>
<td bgcolor="#EEEEEE" width="360" height="1" colspan="4"></td>
</tr>
<?
//캐시가 결제금액보다 클 때
if ($member[mb_point] >= $buy_cash) {
$cash_type = $member[mb_point] - $buy_cash;
$cash_msg = "전환 후 포인트";
}
//캐시가 결제금액보다 작을 때
else if ($member[mb_point] < $buy_cash) {
$cash_type = $buy_cash - $member[mb_point];
$cash_msg = "부족한 포인트";
}
?>
<tr>
<td style="padding:0 0 0 20px;" width="180" height="30"><span class="m_j_1">·</span> <span class="m_t_3"><?=$cash_msg?></span></td>
<td style="padding:0 5 0 20px;" width="145" height="30" align="right">
<div style="padding:3 5 0 0px; width:120px; height:20px; border:1px solid #E4E4E4;" align="right">
<?
echo "<span class='cash'>" . number_format($cash_type) . "</span>";
?>
</div></td>
<td width="20"><span class="won">P</span></td>
<td width="50"></td>
</tr>
</table></td트
</tr>
<tr>
<td width="400" align="center">
<table width="360" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td width="360" height="30" align="center"><img src="./img/icon_not.gif" width="7" height="11" align="absmiddle" style="margin-bottom:2px;"> <span class="not_msg">부족하신 포인트는 충전하여 다시 이용해주세요.</span></td>
</tr>
<tr>
<td width="360" height="10"></td>
</tr>
<tr>
<td bgcolor="#f8f8f8" width="360" height="30" align="center"><span class="buy_msg">출금전환 하시겠습니까?</span></td>
</tr>
</table></td>
</tr>
<tr>
<td width="410" height="15"></td>
</tr>
</table></td>
<td background="./img/box_t05.gif" width="10"></td>
</tr>
<tr>
<td background="./img/box_t06.gif" width="10" height="10"></td>
<td background="./img/box_t07.gif" width="410" height="10"></td>
<td background="./img/box_t08.gif" width="10" height="10"></td>
</tr>
</table></td>
</tr>
<tr><td bgcolor="#eeeeee" height="40" align="center"><INPUT type=image src="./img/btn_ok.gif" border="0" accesskey='s'> <img src="./img/btn_close.gif" onclick="self.close();" style="cursor:hand"></td></tr>
</form>
</table>
<script language="Javascript">
function fchange_submit(f)
{
f.action = "./change_update.php";
f.submit();
}
</script>
<?
include_once("$g4[path]/tail.sub.php");
?>
--------------------------------
----------------소스2-----------------
<?
include_once("./_common.php");
if (!$member[mb_id]) {
alert_close("로그인 후 이용하세요.");
}
if ($type == 'point' && $member[mb_cash] < $buy_cash) {
alert_close("금액이 부족합니다.");
}
else if ($type == 'cash' && $member[mb_point] < $buy_cash) {
alert_close("포인트가 부족합니다.");
}
// 리퍼러 체크
referer_check();
if ($type == 'point') {
$msg = "포인트";
// 캐시 결제
insert_cash($member[mb_id], -$buy_cash, "포인트로 전환", "@point", $member[mb_id], $g4[time_ymdhis]);
// 포인트 충전
insert_point($member[mb_id], $item_money, "포인트로 전환", "@point", $member[mb_id], $g4[time_ymdhis]);
}
else if ($type == 'cash') {
$msg = "출금";
// 포인트 결제
insert_point($member[mb_id], -$buy_cash, "출금 전환", "@cash", $member[mb_id], $g4[time_ymdhis]);
// 캐시 충전
insert_cash($member[mb_id], $item_money, "출금 전환", "@cash", $member[mb_id], $g4[time_ymdhis]);
} else {
alert_close("오류");
}
?>
<script language="JavaScript">
alert("<?=$msg?> 전환을 완료 하였습니다.");
opener.location.reload();
window.close();
</script>
질문1.
셀렉트 박스를 input text 타입으로 바꾸라는데.. 어떻게 바꾸는지 좀 봐주세요.
이렇게 하라는데. 어떻게 바꿔야할지 몰라서요..
--------------------소스1---------------------------------------
<?
$g4_path = ".";
include_once("$g4_path/_common.php");
$g4[title] = "출금 전환하기";
include_once("$g4[path]/head.sub.php");
if (!$member[mb_id]) {
alert_close("로그인 후 이용하세요.");
}
$item_money = "21000"; //아이템
$buy_cash = "30000"; //결제 금액
?>
<link rel='stylesheet' type='text/css' href='./change_style.css'>
<table width="450" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<form name=fchange method=post action="javascript:fchange_submit(document.fchange)" enctype="multipart/form-data">
<input type=hidden name="type" value="cash">
<input type=hidden name="item_money" value="<?=$item_money?>">
<input type=hidden name="buy_cash" value="<?=$buy_cash?>">
<tr>
<td style="padding:0 0 0 20px;" background="./img/top_bg.gif" height="35"><img src="./img/icon_top.gif" width="5" height="14" align="absmiddle" style="margin-bottom:2px;"> <span class="buy_title">출금 전환하기</span></td>
</tr>
<tr><td bgcolor="#eeeeee" height="10"></td></tr>
<tr>
<td bgcolor="#eeeeee" width="450" align="center" valign="top">
<table bgcolor="#ffffff" width="430" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td background="./img/box_t01.gif" width="10" height="10"></td>
<td background="./img/box_t02.gif" width="410" height="10"></td>
<td background="./img/box_t03.gif" width="10" height="10"></td>
</tr>
<tr>
<td background="./img/box_t04.gif" width="10"></td>
<td width="410" align="center" valign="top">
<table width="400" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr><td width="400" height="10"></td></tr>
<tr>
<td width="400" align="center">
<table style='border:1px solid #E4E4E4;' width="360" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td bgcolor="#ffe7e7" width="120" height="100" align="center">
<table style='border:1px solid #E4E4E4;' width="80" height="80" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td align="center">
<img src="./img/item_001.gif" align="absmiddle"></td>
</tr>
</table></td>
<td style="padding:10 10 10 0px;" bgcolor="#ffe7e7" width="240" height="100">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20"><span class="item_title"><?=number_format($item_money);?> 원</span></td>
</tr>
<tr>
<td height="20"><span class="m_j_1">·</span> <span class="item_cash_title">출금전환 : </span><span class="item_cash"><?=number_format($buy_cash);?>포인트</span></td>
</tr>
<tr>
<td style="padding:0 0 0 80px;" height="20"><span class="item_rebuy">(출금전환: 70%)</span></td>
</tr>
<tr>
<td height="20"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td width="410" height="20"></td>
</tr>
<tr>
<td style="padding:0 0 0 20px;" width="410" height="20"><img src="./img/icon_arrow.gif" align="absmiddle" style="margin-bottom:2px;"> <span class="money_title">포인트 현금전환 출금계산기</span></td>
</tr>
<tr>
<td width="410" height="3"></td>
</tr>
<tr>
<td width="410" height="92" align="center">
<table style='border:1px solid #E4E4E4;' width="360" height="92" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td style="padding:0 0 0 20px;" width="180" height="30"><span class="m_j_1">·</span> <span class="m_t_1">1회 전환 포인트 </span></td>
<td style="padding:0 5 0 20px;" width="145" height="30" align="right">
<div style="padding:3 5 0 0px; width:120px; height:20px; border:1px solid #E4E4E4;" align="right">
<?
echo "<span class='cash'>" . number_format($buy_cash) . "</span>";
?>
</div></td>
<td width="20"><span class="won">P</span></td>
<td width="50"></td>
</tr>
<tr>
<td bgcolor="#EEEEEE" width="360" height="1" colspan="4"></td>
</tr>
<tr>
<td style="padding:0 0 0 20px;" width="145" height="30"><span class="m_j_1">·</span> <span class="m_t_2">전환가능 포인트</span></td>
<td style="padding:0 5 0 20px;" width="145" height="30" align="right">
<div style="padding:3 5 0 0px; width:120px; height:20px; border:1px solid #E4E4E4;" align="right">
<?
echo "<span class='cash'>" . number_format($member[mb_point]) . "</span>";
?>
</div></td>
<td width="20"><span class="won">P</span></td>
<td width="50"></td>
</tr>
<tr>
<td bgcolor="#EEEEEE" width="360" height="1" colspan="4"></td>
</tr>
<?
//캐시가 결제금액보다 클 때
if ($member[mb_point] >= $buy_cash) {
$cash_type = $member[mb_point] - $buy_cash;
$cash_msg = "전환 후 포인트";
}
//캐시가 결제금액보다 작을 때
else if ($member[mb_point] < $buy_cash) {
$cash_type = $buy_cash - $member[mb_point];
$cash_msg = "부족한 포인트";
}
?>
<tr>
<td style="padding:0 0 0 20px;" width="180" height="30"><span class="m_j_1">·</span> <span class="m_t_3"><?=$cash_msg?></span></td>
<td style="padding:0 5 0 20px;" width="145" height="30" align="right">
<div style="padding:3 5 0 0px; width:120px; height:20px; border:1px solid #E4E4E4;" align="right">
<?
echo "<span class='cash'>" . number_format($cash_type) . "</span>";
?>
</div></td>
<td width="20"><span class="won">P</span></td>
<td width="50"></td>
</tr>
</table></td트
</tr>
<tr>
<td width="400" align="center">
<table width="360" cellpadding="0" cellspacing="0" border="0" align="center" valign="top">
<tr>
<td width="360" height="30" align="center"><img src="./img/icon_not.gif" width="7" height="11" align="absmiddle" style="margin-bottom:2px;"> <span class="not_msg">부족하신 포인트는 충전하여 다시 이용해주세요.</span></td>
</tr>
<tr>
<td width="360" height="10"></td>
</tr>
<tr>
<td bgcolor="#f8f8f8" width="360" height="30" align="center"><span class="buy_msg">출금전환 하시겠습니까?</span></td>
</tr>
</table></td>
</tr>
<tr>
<td width="410" height="15"></td>
</tr>
</table></td>
<td background="./img/box_t05.gif" width="10"></td>
</tr>
<tr>
<td background="./img/box_t06.gif" width="10" height="10"></td>
<td background="./img/box_t07.gif" width="410" height="10"></td>
<td background="./img/box_t08.gif" width="10" height="10"></td>
</tr>
</table></td>
</tr>
<tr><td bgcolor="#eeeeee" height="40" align="center"><INPUT type=image src="./img/btn_ok.gif" border="0" accesskey='s'> <img src="./img/btn_close.gif" onclick="self.close();" style="cursor:hand"></td></tr>
</form>
</table>
<script language="Javascript">
function fchange_submit(f)
{
f.action = "./change_update.php";
f.submit();
}
</script>
<?
include_once("$g4[path]/tail.sub.php");
?>
--------------------------------
----------------소스2-----------------
<?
include_once("./_common.php");
if (!$member[mb_id]) {
alert_close("로그인 후 이용하세요.");
}
if ($type == 'point' && $member[mb_cash] < $buy_cash) {
alert_close("금액이 부족합니다.");
}
else if ($type == 'cash' && $member[mb_point] < $buy_cash) {
alert_close("포인트가 부족합니다.");
}
// 리퍼러 체크
referer_check();
if ($type == 'point') {
$msg = "포인트";
// 캐시 결제
insert_cash($member[mb_id], -$buy_cash, "포인트로 전환", "@point", $member[mb_id], $g4[time_ymdhis]);
// 포인트 충전
insert_point($member[mb_id], $item_money, "포인트로 전환", "@point", $member[mb_id], $g4[time_ymdhis]);
}
else if ($type == 'cash') {
$msg = "출금";
// 포인트 결제
insert_point($member[mb_id], -$buy_cash, "출금 전환", "@cash", $member[mb_id], $g4[time_ymdhis]);
// 캐시 충전
insert_cash($member[mb_id], $item_money, "출금 전환", "@cash", $member[mb_id], $g4[time_ymdhis]);
} else {
alert_close("오류");
}
?>
<script language="JavaScript">
alert("<?=$msg?> 전환을 완료 하였습니다.");
opener.location.reload();
window.close();
</script>
댓글 전체
echo "<span class='cash'>" . number_format($buy_cash) . "</span>";
요기를
echo "<input type="text" vlalue="{$buy_cash}";
욜케요..
요기를
echo "<input type="text" vlalue="{$buy_cash}";
욜케요..
답변감사합니다.