|
|
|
|
俵ÀÌ / 2001-10-18 / ¿ÀÈÄ 9:12:03 / 203.255.3.190
Á¶È¸¼ö : 123
|
[Áú¹®] ¿¡°í ÁË¼Û ÇÕ´Ï´Ù.
|
> Á˼ÛÇÕ´Ï´Ù. ^^;;
>
> ±ÞÇÏ°Ô ¿Ã·Á¼...
>
> À½..
>
> ¿¡·¯´Â ¾Æ´Ï°í..
>
> <%
> 'ÄíÅ°¿¡ ÀÖ´Â ³»¿ëÀÌ ¾ø´Ù¸é Ãâ·ÂÇÏ´Â ºÎºÐ
> cart_bool = true
> if Request.Cookies("goods")("count")=0 or isempty(Request.Cookies("goods")("count")) then
> cart_bool = false
> %>
>
> <tr>
> <td align="center" height="100">Àå¹Ù±¸´Ï¿¡ »óÇ°ÀÌ ¾ø½À´Ï´Ù.</td>
> </tr>
> <%
> 'ÄíÅ°ÀÇ ³»¿ëÀÌ ÀÖ´Ù¸é Ãâ·ÂÇÏ´Â ºÎºÐ
> else
>
> s_total = 0
> for i=1 to Request.Cookies("goods")("count")
> if request.Cookies("goods")("id" & i) <> "" then
>
> total = Request.Cookies("goods")(Cstr("num" & i)) * Request.Cookies("goods")(Cstr("g_sellprice" & i))
>
> if (i mod 2) <> 0 then
> bgcolor="white"
> else
> bgcolor="#FFFFF7"
> end if
>
> %>
> <tr height="20" bgcolor="<%=bgcolor%>">
> <td align="center" width="80">NO.<%=i%></td>
> <td align="left"> <font style="font-size:9pt"><% =Request.Cookies("goods")(Cstr("g_name" & i)) %></font></td>
> <td align="right" width="100"><font style="font-size:9pt"><%=mid(formatcurrency(Request.Cookies("goods")(Cstr("g_sellprice" & i))),2)%>¿ø </font></td>
> <td align="center" width="60"><font style="font-size:9pt"><input maxLength="2" size="3" name="ea<%=i%>" value="<% =Request.Cookies("goods")(Cstr("num" & i)) %>" onkeypress="a()" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; back-color: white; text-align:right"> °³</font></td>
> <td align="right" width="100"><font style="font-size:9pt" color="#CE0000"><b><%=mid(formatcurrency(total),2)%>¿ø </b></font></td>
> <td align="center" width="40"><font style="font-size:9pt"><input type="checkbox" name="del" value="<%=Request.Cookies("goods")("id" & i)%>"></font></td>
> </tr>
> <tr>
> <td bgcolor="#DEDFDE" height="1" colspan="6"></td>
> </tr>
> <%
> s_total = s_total + total
> total = 0
> cart_bool = true
> else
>
> cart_bool = false
> end if
>
> next
>
> end if
> %>
>
>
>
> <%
> if cart_bool then
> %>
> <tr>
> <td height="25"> * <font color="red">¼ö·®º¯°æ</font> ¶Ç´Â <font color="red">»èÁ¦</font>½Ã ´Ù½Ã °è»êÇϱâ À» ´·¯ÁÖ¼¼¿ä.
> <input type="button" style="border:black 1 solid;" value="´Ù½Ã °è»êÇϱâ" onClick="javascript:rok();">
> </td>
> </tr>
> <tr>
> <td height="10"></td>
> </tr>
> <tr>
> <td height="1" bgcolor="#959595"></td>
> </tr>
> <tr>
> <td height="30" bgcolor="#EFEFEF" align="center"><font style="font-size:9pt"><b>ÁÖ¹®»óÇ° °¡°ÝÇÕ°è : <%=mid(formatcurrency(s_total),2)%>¿ø</b></font></td>
> </tr>
> <tr>
> <td height="1" bgcolor="#959595"></td>
> </tr>
> <%
> else
> %>
> <tr>
> <td height="10"></td>
> </tr>
> <tr>
> <td height="1" bgcolor="#959595"></td>
> </tr>
> <tr>
> <td height="30" bgcolor="#EFEFEF" align="center"><font style="font-size:9pt"><b>¼îÇÎÇØ Áñ°Å¿ò...¸¾²¯ Áñ°Ü º¸¼¼¿ä.</b></font></td>
> </tr>
> <tr>
> <td height="1" bgcolor="#959595"></td>
> </tr>
> <%
> end if
> %>
> <tr>
> <td height="40" align="center"><input type="button" style="border:black 1 solid;" value=" ¼îÇÎÇϱâ " onClick="javascript:location.href='goods_list.asp?p=<%=request("p")%>'">
> <%
> if cart_bool then
> %>
> <input type="button" style="border:black 1 solid;" value=" ±¸¸ÅÇϱâ " onClick="<%if userid<>"" then%>javascript:location.href='goods_buy.asp?p=<%=request("p")%>'<%else%>javascript:location.href='<%=urllink%>login/login.asp?mall=ok&mallurl=present_part/goods_buy.asp?p=<%=request("p")%>'<%end if%>">
> <input type="button" style="border:black 1 solid;" value="Àå¹Ù±¸´Ï Àüü»èÁ¦" onClick="javascript:location.href='cart_update.asp?del=true'"></td>
> <%
> end if
> %>
>
> ¿ä±â¼ º¸½Ã¸é.
>
> cart_bool = true ÀÌ°ÍÀÌ ÀÖÁ®. ..
>
> À̰Ŷ§¹®¿¡ Àë.
>
> ¸¸¾à 1,2,3
>
> ÀÌ·¸°Ô ÄíÅ°°ªÀ» ÀÖÀ¸¸é...
>
> óÀ½¿¡ cart_bool=true ¿¡¼
>
> 2¸¦ Áö¿ì¸é 3ÀÌ Àֱ⶧¹®¿¡ cart_bool´Â true°¡ µÇÀݾƿä.
>
> ±Ùµ¥ 3À» Áö¿ö¼ cart_bool³ false µÇ¹ö·Á¼..
>
> ¹Ø¿¡ º¸½Ã¸é.
>
> Àå¹Ù±¸´Ï Àüü »èÁ¦ÇÏ°í,ÁÖ¹®Çϱâ ÀÖÀݾƿä.
>
> ÀÌ°ÍÀÌ cart_bool¸¦ false µÇ¾î ¹ö·Á¼.. ¾È³ª¿É´Ï´Ù.
>
> cart_bool¸¦ ¹Ù²ã¾ß Çϴµ¥.. ¾î¶»°Ô ¹Ù²ã¾ß~~ À½..
>
> ^^:;
>
> À̺κÐÀº ¾÷µ¥ÀÌÆ® µÇ´Â ºÎºÐ
>
>
>
>
> bool = true
> for a=1 to request.Cookies("goods")("count")
> if request.Cookies("goods")("num" & a) <> Request.QueryString("ea" & a) then
> Response.Cookies("goods")("num" & a) = Request.QueryString("ea" & a)
> end if
>
> for j = 1 to request.querystring("del").count
> if Request.QueryString("del")(j) = request.Cookies("goods")("id" & a) then
> 'Response.Cookies("goods")("count") = Request.Cookies("goods")("count") - 1
>
> Response.Cookies("goods")("id" & a) = ""
> Response.Cookies("goods")("idx" & a) = ""
> Response.Cookies("goods")("num" & a) = ""
> Response.Cookies("goods")("g_name" & a) = ""
> Response.Cookies("goods")("g_image" & a) = ""
> Response.Cookies("goods")("g_sellprice" & a) = ""
>
> end if
> next
>
> next
>
>
>
>
>
>
-----------------------------------------------------------
´ÔÀÌ ¾î¶² Àǵµ·Î ÇÁ·Î±×·¥À» ÀÛ¼ºÇß´ÂÁö Àß ¸ð¸£°Ú½À´Ï´Ù...
¹Ùºü¼ ÀÚ¼¼È÷ º¼ ½Ã°£ÀÌ º°·Î ¾ø³×¿ä...
¹®Á¦´Â Response.Cookies("goods")("count")¿¡¼ ¹ß»ýÇϴ°Š¾Æ´Ñ°¡¿ä?
¿©±â¼ count¿¡¼ ´ÔÀÇ ÀǵµÇѵ¥·Î µ¿ÀÛÇÏÁö ¾ÊÀ»°Í °°Àºµ¥ ¾Æ´Ñ°¡¿ä?
±×¸®°í for ¹® ·çÇÁ¸¦ µ¹¸é¼ true, false °ªÀÌ ¹Ù²î´Â °Å¶ó¸é
óÀ½¿¡ cart_boolÀ» false·Î µÎ°í....
whileÀ̳ª for·Î ·çÇÁ¸¦ µ¹¸é¼ true°¡ µÇ¸é ¹Ù·Î exitÇÏ´Â ¹æ¹ýÀ» °í·ÁÇØ º¸½Ã´Â°Íµµ
ÁÁÀº ¹æ¹ýÀÏ°Í °°³×¿ä...(¿øÇÏ½Ã´Â°Ô Á¤È®È÷ ¹ºÁö ºÐ¼®ÀÌ µÇÁö ¾ÊÀº »óÅ¿¡¼ÀÇ ÃßÃøÀÔ´Ï´Ù.)
±×·³....
|
|
|
|