스크립트관련 질문좀 드릴꼐요

스크립트관련 질문좀 드릴꼐요

QA

스크립트관련 질문좀 드릴꼐요

본문

이 부분이 10000원(가격)이 정해진 상태에서  업 다운을 누르면 가격변동이 되는곳 같은데 다른 가격으로 적용을 할려니 잘 모르겠습니다.



pay = eval(document.getElementById('pay_'+which).value);
	p_cnt = eval(document.getElementById('p_cnt_'+which).value);
	
	basongbi = eval(document.getElementById('basongbi').value);
	tot_pay = eval(document.getElementById('tot_pay').value);


	switch(key)
	{

		case("up"):
			p_cnt = p_cnt+1;
			document.getElementById('p_cnt_'+which).value = p_cnt;
		break;

		case("down"):
			if(p_cnt<1)
			{
				alert("더 이상 내릴 수 없습니다");
			}
			else
			{
				p_cnt = p_cnt-1;
				document.getElementById('p_cnt_'+which).value = p_cnt;
			}

		break;
		default:
		break;
	}
	
	total_cnt = eval(document.getElementById('p_cnt_0').value)+eval(document.getElementById('p_cnt_1').value)+eval(document.getElementById('p_cnt_2').value)+eval(document.getElementById('p_cnt_3').value)+eval(document.getElementById('p_cnt_4').value)+eval(document.getElementById('p_cnt_5').value)+eval(document.getElementById('p_cnt_6').value)+eval(document.getElementById('p_cnt_7').value);

	total_price = 10000;
	total_sum_price = total_cnt*total_price;

	if(total_sum_price>0)
	{
		if(total_cnt>1)
		{
			document.getElementById('basongbi').value = 0;
		}
		else
		{
			document.getElementById('basongbi').value = 3000;
		}
	}
	else
	{
			document.getElementById('basongbi').value = 0;
	}

	document.getElementById('tot_pay').value = total_sum_price + eval(document.getElementById('basongbi').value);

}



가격이 다른 제품을 수량을 늘릴경우 정해진 금액 10000원만 증가가 됩니다. 10000원 기준이 되어서 모든게 증가하고 감소하게 프로그래밍 되어 있는데 이걸 p_cnt_0~p_cnt_7 까지 다른 가격으로 증가되게 할려먼 어떤 소스를 넣어야 할지 막막하네요.. 제가 만든게 아니라 뭐가 뭔지도 모르겠고.. 어설프게만 알고 있어서 좀 당황 스럽네요... 좀 알려주세요..

아래는 전체 소스를 올려드립니다.



<? include "../_include.php"; ?>
<?
if($mode=="ok"){

include"db.php";

$result = mysql_query("SELECT max(no) FROM $table");
	if (!$result) {
		echo "
			<script>
				window.alert(\"DB 접속 에러입니다!\")
				history.go(-1)
			</script>";
		exit;
	}
	$row = mysql_fetch_row($result);

	if($row[0]) {
	   $new_no = $row[0] + 1;
	} else {
	   $new_no = 1;
	}   
############################################
/*
	product_0
	product_1

	pay_0 
	pay_1

	p_cnt_0
	p_cnt_1

	basongbi
	tot_pay	
*/

$product = "";
$p_cnt = $p_cnt_0+$p_cnt_1+$p_cnt_2+$p_cnt_3+$p_cnt_4+$p_cnt_5+$p_cnt_6+$p_cnt_7;


if($p_cnt_0>0)
{
	$product .= $product_0."(".$p_cnt_0."권)";
}
if($p_cnt_1>0)
{
	if($pay_0>0)
	{
		$product .= " / ";
	}

	$product .= $product_1."(".$p_cnt_1."권)";
}
if($p_cnt_2>0)
{
	if($pay_0>0)
	{
		$product .= " / ";
	}

	$product .= $product_2."(".$p_cnt_2."권)";
}
if($p_cnt_3>0)
{
	if($pay_0>0)
	{
		$product .= " / ";
	}

	$product .= $product_3."(".$p_cnt_3."권)";
}
if($p_cnt_4>0)
{
	if($pay_0>0)
	{
		$product .= " / ";
	}

	$product .= $product_4."(".$p_cnt_4."권)";
}
if($p_cnt_5>0)
{
	if($pay_0>0)
	{
		$product .= " / ";
	}

	$product .= $product_5."(".$p_cnt_5."권)";
}
if($p_cnt_6>0)
{
	if($pay_0>0)
	{
		$product .= " / ";
	}

	$product .= $product_6."(".$p_cnt_6."권)";
}
if($p_cnt_7>0)
{
	if($pay_0>0)
	{
		$product .= " / ";
	}

	$product .= $product_7."(".$p_cnt_7."권)";
}


$tot_pay = number_format($tot_pay)." 원";


$date=date("Y-m-d H:i;s");
$dbinsert ="insert into $table values('$new_no',
'$name',
'$tel1',
'$tel2',
'$tel3',
'$hp1',
'$hp2',
'$hp3',
'$addr1',
'$memo',
'$product',
'$pay',
'$p_cnt',
'$basongbi',
'$tot_pay',
'$basong',
'$date',
'no'
)";
$result_insert= mysql_query($dbinsert,$db);

//완료 메세지를 보인후 페이지를 이동 시킨다
echo ("
     <script>
      alert ('주문이 성공적으로 접수되었습니다');
      window.close();
      </script>
		");
		exit;

}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

$Bgcolor_1="#FFFFFF";
$Bgcolor_2="#65B1B1";
$Bgcolor_3="#FFFFFF";
$align_td1="left";
$InputStyle="style='font-size:10pt; background-color:#DAF8F4; color:#000000; border-style:solid; border:1 solid $Bgcolor_2'";
?>

<head>

<script language=javascript>

var NUM = "0123456789"; 
var SALPHA = "abcdefghijklmnopqrstuvwxyz";
var ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"+SALPHA;

////////////////////////////////////////////////////////////////////////////////
function TypeCheck (s, spc) {
var i;

for(i=0; i< s.length; i++) {
if (spc.indexOf(s.substring(i, i+1)) < 0) {
return false;
}
}        
return true;
}

/////////////////////////////////////////////////////////////////////////////////

function OrderCheckField()
{
	var f=document.OrderInfo;

	if (f.name.value == "") {
		alert("성명을 입력하여주세요");
		f.name.focus();
		return false;
	}
	if (f.hp1.value == "") {
		alert("핸드폰번호를 입력하여주세요");
		f.hp1.focus();
		return false;
	}
	if (f.hp2.value == "") {
		alert("핸드폰번호를 입력하여주세요");
		f.hp2.focus();
		return false;
	}
	


	if (f.hp3.value == "") {
		alert("핸드폰번호를 입력하여주세요");
		f.hp3.focus();
		return false;
	}
	if (f.addr1.value == "") {
		alert("주소를 입력하여주세요");
		f.addr1.focus();
		return false;
	}

	if(f.tot_pay.value == "0")
	{
		alert("최소 1권 이상 주문하셔야 합니다");
		return false;
	}

}

function num_check(key, which)
{
	/*
	product_0
	product_1

	pay_0 
	pay_1

	p_cnt_0
	p_cnt_1

	basongbi
	tot_pay	
	*/
	
	pay = eval(document.getElementById('pay_'+which).value);
	p_cnt = eval(document.getElementById('p_cnt_'+which).value);
	
	basongbi = eval(document.getElementById('basongbi').value);
	tot_pay = eval(document.getElementById('tot_pay').value);


	switch(key)
	{

		case("up"):
			p_cnt = p_cnt+1;
			document.getElementById('p_cnt_'+which).value = p_cnt;
		break;

		case("down"):
			if(p_cnt<1)
			{
				alert("더 이상 내릴 수 없습니다");
			}
			else
			{
				p_cnt = p_cnt-1;
				document.getElementById('p_cnt_'+which).value = p_cnt;
			}

		break;
		default:
		break;
	}
	
	total_cnt = eval(document.getElementById('p_cnt_0').value)+eval(document.getElementById('p_cnt_1').value)+eval(document.getElementById('p_cnt_2').value)+eval(document.getElementById('p_cnt_3').value)+eval(document.getElementById('p_cnt_4').value)+eval(document.getElementById('p_cnt_5').value)+eval(document.getElementById('p_cnt_6').value)+eval(document.getElementById('p_cnt_7').value);

				total_price = 10000;
	total_sum_price = total_cnt*total_price;

	if(total_sum_price>0)
	{
		if(total_cnt>1)
		{
			document.getElementById('basongbi').value = 0;
		}
		else
		{
			document.getElementById('basongbi').value = 3000;
		}
	}
	else
	{
			document.getElementById('basongbi').value = 0;
	}

	document.getElementById('tot_pay').value = total_sum_price + eval(document.getElementById('basongbi').value);

}

</script>

<style>
.td1 {font-family:굴림; font-size: 9pt;; color:#FFFFFF; font-weight:bold; line-height: normal;}
.td2 {font-family:굴림; font-size: 9pt;; color:#008080; font-weight:none; line-height:130%;}
</style>

</head>
<body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">
<table width="600" border="0" cellspacing="0" cellpadding="0">
 

<form name='OrderInfo' method='post' OnSubmit='return OrderCheckField()' action='<?=$PHP_SELF?>'>
<INPUT TYPE="hidden" name='mode' value='ok'>
<input type=hidden name=basong value="대기">
  <tr> 
    <td height="316"> 
      <table width="588" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#D9CF9B" bordercolordark="#FFFFFF" align="center">
        <tr bgcolor="#CCCC99"> 
          <td align="center" bgcolor="snow" height="40" colspan="2">
            
                            <p align="left"><span style="font-size:9pt;">  ◆ 
                            </span><b><span style="font-size:10pt;">주문하시는 
                            분의 정보 </span></b><span style="font-size:9pt;"><font color="#666666">('</font></span><font face="돋움" color="red"><span style="font-size:9pt;">*</span></font><font face="돋움" color="#666666"><span style="font-size:9pt;">' 
                            표시는 필수 입력항목입니다.  )</span></font></td>
        </tr>

        <tr bgcolor="#CCCC99"> 
          <td align="center" bgcolor="#EBEBD6" height="40">
<p align="center"><font size="2" face="돋움" color="red">*</font><font size="2" face="돋움">성명(단체명)</font></td>
          <td align="left" bgcolor="#FAFAF3" height="40"> 
            <font size="2" face="돋움"> <input type="text" size="15" maxlength="20" style="height:20;border-color:#000000; border:solid 1;" name="name">
            (입금자와 동일하게 입력하세요)</font>
          </td>
        </tr>

        <tr bgcolor="#CCCC99"> 
          <td align="center" bgcolor="#EBEBD6" height="40">
                                                                        <p align="center"><font size="2" face="돋움">전화번호</font></td>
          <td align="left" bgcolor="#FAFAF3" height="40"> 
            <font size="2" face="돋움"> <input type="text" size="4" maxlength="20" style="height:20;border-color:#000000; border:solid 1;" name="tel1"> 
                            - <input type="text" size="4" maxlength="20" style="height:20;border-color:#000000; border:solid 1;" name="tel2"> 
                            - <input type="text" size="4" maxlength="20" style="height:20;border-color:#000000; border:solid 1;" name="tel3"></font>
          </td>
        </tr>

        <tr bgcolor="#CCCC99"> 
          <td align="center" bgcolor="#EBEBD6" height="40">
<p align="center"><font size="2" face="돋움" color="red">*</font><font size="2" face="돋움">휴대폰</font></td>
          <td align="left" bgcolor="#FAFAF3" height="40"> 
            <font size="2" face="돋움"> <input type="text" size="4" maxlength="20" style="height:20;border-color:#000000; border:solid 1;" name="hp1"> 
                            - <input type="text" size="4" maxlength="20" style="height:20;border-color:#000000; border:solid 1;" name="hp2"> 
                            - <input type="text" size="4" maxlength="20" style="height:20;border-color:#000000; border:solid 1;" name="hp3"></font>
          </td>
        </tr>

        <tr>
          <td bgcolor="#EBEBD6" align="center" height="40">
<p align="center"><font size="2" face="돋움" color="red">*</font><font size="2" face="돋움">수령지 
                            주소</font></td>
          <td bgcolor="#FAFAF3" align="left" height="40">
          <font size="2" face="돋움"> <input type="text" size="59" maxlength="60" style="height:20;border-color:#000000; border:solid 1;" name="addr1"></font>

          </td>
        </tr>

        <tr>
          <td bgcolor="#EBEBD6" align="center" height="40">
                                                                        <p align="center"><font size="2" face="돋움">전달메세지</font></td>
          <td bgcolor="#FAFAF3" align="left" height="40">
          
<font size="2" face="돋움"> <textarea name="memo" rows="5" cols="57"></textarea></font>
          </td>
        </tr>

        <tr bgcolor="#CCCC99"> 
          <td align="center" bgcolor="snow" height="40" colspan="2">
            
                            <p align="left"><span style="font-size:9pt;">  ◆ 
                            </span><b><span style="font-size:10pt;">주문합계 
                            및 결재정보</span></b></td>
        </tr>

        <tr bgcolor="#CCCC99"> 
          <td align="center" bgcolor="white" height="40" colspan="2">

							

<table width="98%" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#D9CF9B" bordercolordark="#FFFFFF" align="center">

<tr>
<td width="131" height="30" bgcolor="#EBEBD6"><p align="center"><b><span style="font-size:9pt;">상 품 명</span></b></p></td>
<td width="103" height="30" bgcolor="#EBEBD6"><p align="center"><b><span style="font-size:9pt;">판 매 가</span></b></p></td>
<td width="77" height="30" bgcolor="#EBEBD6"><p align="center"><b><span style="font-size:9pt;">수   량</span></b></p></td>
<td width="106" height="30" bgcolor="#EBEBD6"><p align="center"><b><span style="font-size:9pt;">배 송 비</span></b></p></td>
<td width="107" height="30" bgcolor="#EBEBD6"><p align="center"><b><span style="font-size:9pt;">총  합  계</span></b></p></td>
</tr>



<tr>
<td width="131" style="font-weight:bold;font-size:12px;text-align:center;">
	<input type="hidden" name="product_0" id="product_0" value="바보천사 석이">
	바보천사 석이
</td>
<td width="103" style="font-weight:bold;font-size:12px;text-align:center;color:#ff0000;">
	
	<input type="hidden" name="pay_0" id="pay_0" value="12000">
	<b>12,000 원</b>
	</font>


</td>
<td width="77">

	<table border=0 width="73">
	<tr>
	<td width="51" style="font-weight:none;font-size:12px;text-align:center;">
	
	<input type="text" size="2" maxlength="2" style="height:20;border-color:#000000; text-align:center;border:solid 1;" name="p_cnt_0" id="p_cnt_0" value="0" onblur="num_check('', '0')"> 권
	
	</td>
	<td width="12">
		<table border=0 height=25>
		<tr>
		<td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" v onclick="num_check('up', '0')">▲</a></td>
		</tr>
		
		<tr><td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('down', '0')">▼</a></td>
		</tr>

		</table>
	</td>
	</tr>
	</table>

</td>

<td width="106" rowspan="8">
	<div style="float:left;">
	<input type="text" size="10" maxlength="20" style="height:20;font-weight:bold;color:red; text-align:right;border-color:#000000; border:0;" name="basongbi" id="basongbi" value="0" readonly>
	</div>
	<div style="float:left;font-weight:bold;color:red; font-size:12px;padding:2px 0 0 2px;">
	원
	</div>
	</td>
<td width="107" rowspan="8">
	<div style="float:left;">
	<input type="text" size="10" maxlength="20" style="height:20;font-weight:bold;color:red; text-align:right;border-color:#000000; border:0;" name="tot_pay" id="tot_pay" value=0 readonly>
	</div>
	<div style="float:left;font-weight:bold;color:red; font-size:12px;padding:2px 0 0 2px;">
	원
	</div>
	</td>
</tr>

<tr>
<td width="131" style="font-weight:bold;font-size:12px;text-align:center;">
	<input type="hidden" name="product_1" id="product_1" value="두 효자의 이야기">
	두 효자의 이야기
</td>
<td width="103" style="font-weight:bold;font-size:12px;text-align:center;color:#ff0000;">
	
	<input type="hidden" name="pay_1" id="pay_1" value="12000">
	<b>12,000 원</b>
	</font>

</td>
<td width="77">

	<table border=0 width="73">
	<tr>
	<td width="51" style="font-weight:none;font-size:12px;text-align:center;">
	
	<input type="text" size="2" maxlength="2" style="height:20;border-color:#000000; text-align:center;border:solid 1;" name="p_cnt_1" id="p_cnt_1" value="0" onblur="num_check('', '1')"> 권
	
	</td>
	<td width="12">
		<table border=0 height=25>
		<tr>
		<td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('up', '1')">▲</a></td>
		</tr>
		
		<tr><td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('down', '1')">▼</a></td>
		</tr>

		</table>
	</td>
	</tr>
	</table>

</td>
</tr>

<tr>
<td width="131" style="font-weight:bold;font-size:12px;text-align:center;">
	<input type="hidden" name="product_2" id="product_2" value="함마니와 진돗개 백구">
	함마니와 진돗개 백구
</td>
<td width="103" style="font-weight:bold;font-size:12px;text-align:center;color:#ff0000;">
	
	<input type="hidden" name="pay_2" id="pay_2" value="10000">
	<b>10,000 원</b>
	</font>

</td>
<td width="77">

	<table border=0 width="73">
	<tr>
	<td width="51" style="font-weight:none;font-size:12px;text-align:center;">
	
	<input type="text" size="2" maxlength="2" style="height:20;border-color:#000000; text-align:center;border:solid 1;" name="p_cnt_2" id="p_cnt_2" value="0" onblur="num_check('', '2')"> 권
	
	</td>
	<td width="12">
		<table border=0 height=25>
		<tr>
		<td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('up', '2')">▲</a></td>
		</tr>
		
		<tr><td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('down', '2')">▼</a></td>
		</tr>

		</table>
	</td>
	</tr>
	</table>

</td>
</tr>

<tr>
<td width="131" style="font-weight:bold;font-size:12px;text-align:center;">
	<input type="hidden" name="product_3" id="product_3" value="하나님이 있다고? 네가 봤어?">
	하나님이 있다고? 네가 봤어?
</td>
<td width="103" style="font-weight:bold;font-size:12px;text-align:center;color:#ff0000;">
	
	<input type="hidden" name="pay_3" id="pay_3" value="7000">
	<b>7,000 원</b>
	</font>

</td>
<td width="77">

	<table border=0 width="73">
	<tr>
	<td width="51" style="font-weight:none;font-size:12px;text-align:center;">
	
	<input type="text" size="2" maxlength="2" style="height:20;border-color:#000000; text-align:center;border:solid 1;" name="p_cnt_3" id="p_cnt_3" value="0" onblur="num_check('', '3')"> 권
	
	</td>
	<td width="12">
		<table border=0 height=25>
		<tr>
		<td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('up', '3')">▲</a></td>
		</tr>
		
		<tr><td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('down', '3')">▼</a></td>
		</tr>

		</table>
	</td>
	</tr>
	</table>

</td>
</tr>

<tr>
<td width="131" style="font-weight:bold;font-size:12px;text-align:center;">
	<input type="hidden" name="product_4" id="product_4" value="아이들의 두목 선두">
	아이들의 두목 선두
</td>
<td width="103" style="font-weight:bold;font-size:12px;text-align:center;color:#ff0000;">
	
	<input type="hidden" name="pay_4" id="pay_4" value="10000">
	<b>10,000 원</b>
	</font>

</td>
<td width="77">

	<table border=0 width="73">
	<tr>
	<td width="51" style="font-weight:none;font-size:12px;text-align:center;">
	
	<input type="text" size="2" maxlength="2" style="height:20;border-color:#000000; text-align:center;border:solid 1;" name="p_cnt_4" id="p_cnt_4" value="0" onblur="num_check('', '4')"> 권
	
	</td>
	<td width="12">
		<table border=0 height=25>
		<tr>
		<td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('up', '4')">▲</a></td>
		</tr>
		
		<tr><td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('down', '4')">▼</a></td>
		</tr>

		</table>
	</td>
	</tr>
	</table>

</td>
</tr>

<tr>
<td width="131" style="font-weight:bold;font-size:12px;text-align:center;">
	<input type="hidden" name="product_5" id="product_5" value="용서가 준 평화 마을">
	용서가 준 평화 마을
</td>
<td width="103" style="font-weight:bold;font-size:12px;text-align:center;color:#ff0000;">
	
	<input type="hidden" name="pay_5" id="pay_5" value="10000">
	<b>10,000 원</b>
	</font>

</td>
<td width="77">

	<table border=0 width="73">
	<tr>
	<td width="51" style="font-weight:none;font-size:12px;text-align:center;">
	
	<input type="text" size="2" maxlength="2" style="height:20;border-color:#000000; text-align:center;border:solid 1;" name="p_cnt_5" id="p_cnt_5" value="0" onblur="num_check('', '5')"> 권
	
	</td>
	<td width="12">
		<table border=0 height=25>
		<tr>
		<td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('up', '5')">▲</a></td>
		</tr>
		
		<tr><td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('down', '5')">▼</a></td>
		</tr>

		</table>
	</td>
	</tr>
	</table>

</td>
</tr>
<tr>
<td width="131" style="font-weight:bold;font-size:12px;text-align:center;">
	<input type="hidden" name="product_6" id="product_6" value="뿡뿡이네 가족 이야기">
	뿡뿡이네 가족 이야기
</td>
<td width="103" style="font-weight:bold;font-size:12px;text-align:center;color:#ff0000;">
	
	<input type="hidden" name="pay_6" id="pay_6" value="10000">
	<b>10,000 원</b>
	</font>

</td>
<td width="77">

	<table border=0 width="73">
	<tr>
	<td width="51" style="font-weight:none;font-size:12px;text-align:center;">
	
	<input type="text" size="2" maxlength="2" style="height:20;border-color:#000000; text-align:center;border:solid 1;" name="p_cnt_6" id="p_cnt_6" value="0" onblur="num_check('', '6')"> 권
	
	</td>
	<td width="12">
		<table border=0 height=25>
		<tr>
		<td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('up', '6')">▲</a></td>
		</tr>
		
		<tr><td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('down', '6')">▼</a></td>
		</tr>

		</table>
	</td>
	</tr>
	</table>

</td>
</tr>
<tr>
<td width="131" style="font-weight:bold;font-size:12px;text-align:center;">
	<input type="hidden" name="product_7" id="product_7" value="우리 엄마는 바보">
	우리 엄마는 바보
</td>
<td width="103" style="font-weight:bold;font-size:12px;text-align:center;color:#ff0000;">
	
	<input type="hidden" name="pay_7" id="pay_7" value="10000">
	<b>10,000 원</b>
	</font>

</td>
<td width="77">

	<table border=0 width="73">
	<tr>
	<td width="51" style="font-weight:none;font-size:12px;text-align:center;">
	
	<input type="text" size="2" maxlength="2" style="height:20;border-color:#000000; text-align:center;border:solid 1;" name="p_cnt_7" id="p_cnt_7" value="0" onblur="num_check('', '7')"> 권
	
	</td>
	<td width="12">
		<table border=0 height=25>
		<tr>
		<td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('up', '7')">▲</a></td>
		</tr>
		
		<tr><td><a style="cursor:hand" style="color:#cc0000;font-size:9pt;" onclick="num_check('down', '7')">▼</a></td>
		</tr>

		</table>
	</td>
	</tr>
	</table>

</td>
</tr>

</table>



</td>
        </tr>

      </table>
    </td>
  </tr>
  <tr> 
    <td height="48" align="center" bgcolor="snow"> 
                <p style="line-height:150%; margin-top:0; margin-bottom:0;"><span style="font-size:9pt;"> </span></p>
                <p style="line-height:150%; margin-top:0; margin-bottom:0; margin-left:100;" align="left"><span style="font-size:9pt;">* 
                
				배송비는 2권 이상 구입시 무료입니다.
                *</span></p>
                <p style="line-height:150%; margin-top:0; margin-bottom:0; margin-left:100;" align="left"><span style="font-size:9pt;"><b>>>결재방법</b> 
                : 무통장입금</span></p>
                <p style="line-height:150%; margin-top:0; margin-bottom:0; margin-left:100;" align="left"><span style="font-size:9pt;"><b>>>입금은행</b> 
                : <b><font color="#CC0000">농협 351-0323-2795-23</font></b>     <b>예금주</b> 
                : <font color="#CC0000">조주신(바보천사)</font></span></p>
                <p style="line-height:150%; margin-top:0; margin-bottom:0; margin-left:100;" align="left"><span style="font-size:9pt;"><b>* 
                위 계좌로 입금해 주시면 확인후 바로 배송해 드립니다. *</b></span></p>
    </td>
  </tr>
  <tr> 
    <td height="48" align="center" bgcolor="snow"> 
    <input type="image" src="success.jpg">
    </td>
  </tr>
  </form>
</table>
<?
exit;
?>

이 질문에 댓글 쓰기 :

답변 1

32라인이 p_cnt_0부터 p_cnt_7까지 입력값을 추출하여 수량을 뽑아내는 코드이고

34라인이 금액으로 10000원으로 고정되어 있습니다.

이 두개를 곱해서 합계가 되는데 질문의 요지를 파악하기 어려워서

어떻게 수정해야할지 조언드리기는 어렵네요.

답변을 작성하시기 전에 로그인 해주세요.
전체 62
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT