?? shopping.asp
字號:
<td style='PADDING-LEFT: 20px' width="199"><b>郵編:</b></td>
<td height="28" style='PADDING-LEFT: 20px' width="771">
<b>
<input name="youbian" type="text" id="youbian" size="10" value=<%=rs("youbian")%>>
</b></td>
</tr>
<tr bgcolor="#EFefef">
<td style='PADDING-LEFT: 20px' width="199"><b>電話:</b></td>
<td height="28" style='PADDING-LEFT: 20px' width="771">
<b>
<input name="usertel" type="text" id="usertel" size="12" value=<%=trim(rs("usertel"))%>>
</b></td>
</tr>
<tr bgcolor="#EFefef">
<td style='PADDING-LEFT: 20px' width="199"><b>電子郵件:</b></td>
<td height="28" style='PADDING-LEFT: 20px' width="771">
<b>
<input name="useremail" type="text" id="useremail" value=<%=trim(rs("useremail"))%>>
</b></td>
</tr>
<b><%=trim(request("useremail"))%> </b>
<tr bgcolor="#EFefef">
<td height="32" style='PADDING-LEFT: 20px' width="199"><b>送貨方式:</b></td>
<td height="28" style='PADDING-LEFT: 20px' width="771">
<b>
<%dim rs3
'//////////判斷送貨方式
set rs3=server.CreateObject("adodb.recordset")
rs3.Open "select * from shop_songhuo where fangshi=0 order by songidorder",conn,1,1
response.Write "<select name=songhuofangshi size="&rs3.recordcount&" id=songhuofangshi>"
do while not rs3.EOF
response.Write "<option value="&rs3("songid")
if int(rs("songhuofangshi"))=int(rs3("songid")) then
response.Write " selected>"
else
response.Write ">"
end if
response.Write trim(rs3("subject"))&"</option>"
rs3.MoveNext
loop
response.Write "</select>"
rs3.Close
set rs3=nothing
%>
<font color=red> </font></b><b><font color="red">關于送貨方式請參看本商城的說明</font></b></td>
</tr>
<tr bgcolor="#EFefef">
<td height="32" style='PADDING-LEFT: 20px' width="199"><b>支付方式:</b></td>
<td height="28" style='PADDING-LEFT: 20px' width="771">
<b>
<%
'//////////判斷支付方式
set rs3=server.CreateObject("adodb.recordset")
rs3.open "select * from shop_songhuo where fangshi=1 order by songidorder",conn,1,1
response.Write "<select name=zhifufangshi size="&rs3.recordcount&" id=zhifufangshi>"
do while not rs3.eof
response.Write "<option value="&rs3("songid")
if int(rs("zhifufangshi"))=int(rs3("songid")) then
response.Write " selected>"
else
response.Write ">"
end if
response.Write trim(rs3("subject"))&"</option>"
rs3.movenext
loop
response.Write "</select>"
rs3.close
set rs3=nothing
'select case rs("zhifufangshi")
'case "1"
'response.write "<option value=1 selected>郵局匯款</option><option value=2>建設銀行匯款</option><option value=3>交通銀行匯款</option>"
'case "2"
'response.write "<option value=1 >郵局匯款</option><option value=2 selected>建設銀行匯款</option><option value=3>交通銀行匯款</option>"
'case "3"
'response.write "<option value=1 >郵局匯款</option><option value=2>建設銀行匯款</option><option value=3 selected>交通銀行匯款</option>"
'case "0"
'response.write "<option value=1 >郵局匯款</option><option value=2>建設銀行匯款</option><option value=3>交通銀行匯款</option>"
'end select
rs.close
set rs=nothing%>
</b></td>
</tr>
<tr bgcolor="#EFefef">
<td height="32" style='PADDING-LEFT: 20px' width="199"><b>簡單留言:</b></td>
<td height="28" style='PADDING-LEFT: 20px' width="771">
<b>
<textarea name="liuyan" cols="40" rows="5" id="liuyan"></textarea>
</b></td>
</tr>
<tr bgcolor="#EFefef">
<td height="32" colspan="2" style='PADDING-LEFT: 20px'>
<b>
<input type="image" border="0" name="submit3" src="images/tjdd.gif" width="54" height="18" onClick="return ssxx();">
</b></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
function ssxx()
{
if(checkspace(document.shouhuoxx.shouhuoname.value)) {
document.shouhuoxx.shouhuoname.focus();
alert("對不起,請填寫收貨人姓名!");
return false;
}
if(checkspace(document.shouhuoxx.shengshi.value)) {
document.shouhuoxx.shengshi.focus();
alert("對不起,請填寫收貨人所在省市!");
return false;
}
if(checkspace(document.shouhuoxx.shouhuodizhi.value)) {
document.shouhuoxx.shouhuodizhi.focus();
alert("對不起,請填寫收貨人詳細收貨地址!");
return false;
}
if(checkspace(document.shouhuoxx.youbian.value)) {
document.shouhuoxx.youbian.focus();
alert("對不起,請填寫郵編!");
return false;
}
if(checkspace(document.shouhuoxx.usertel.value)) {
document.shouhuoxx.usertel.focus();
alert("對不起,請留下您的電話!");
return false;
}
if(checkspace(document.shouhuoxx.songhuofangshi.value)) {
document.shouhuoxx.songhuofangshi.focus();
alert("對不起,您還沒有選擇送貨方式!");
return false;
}
if(checkspace(document.shouhuoxx.zhifufangshi.value)) {
document.shouhuoxx.zhifufangshi.focus();
alert("對不起,您還沒有選擇支付方式!");
return false;
}
if(document.shouhuoxx.useremail.value.length!=0)
{
if (document.shouhuoxx.useremail.value.charAt(0)=="." ||
document.shouhuoxx.useremail.value.charAt(0)=="@"||
document.shouhuoxx.useremail.value.indexOf('@', 0) == -1 ||
document.shouhuoxx.useremail.value.indexOf('.', 0) == -1 ||
document.shouhuoxx.useremail.value.lastIndexOf("@")==document.shouhuoxx.useremail.value.length-1 ||
document.shouhuoxx.useremail.value.lastIndexOf(".")==document.shouhuoxx.useremail.value.length-1)
{
alert("Email地址格式不正確!");
document.shouhuoxx.useremail.focus();
return false;
}
}
else
{
alert("Email不能為空!");
document.shouhuoxx.useremail.focus();
return false;
}
}
//-->
</script>
<%
case "ok"
'/////////////////////////////////////////////////
function HTMLEncode2(fString)
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
fString = Replace(fString, CHR(10), "<BR>")
HTMLEncode2 = fString
end function
if session("xiadan")<>minute(now) then
dim shijian,dingdan
shijian=now()
dingdan=year(shijian)&month(shijian)&day(shijian)&hour(shijian)&minute(shijian)&second(shijian)
'response.write bookid
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select bookid,bookname,shichangjia,huiyuanjia,dazhe from shop_books where bookid in ("&bookid&") order by bookid ",conn,1,1
dingdan=year(shijian)&month(shijian)&day(shijian)&hour(shijian)&minute(shijian)&second(shijian)
do while not rs2.eof
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_action",conn,1,3
rs.addnew
rs("username")=trim(request.cookies("bookshop")("username"))
rs("bookid")=rs2("bookid")
rs("actiondate")=shijian
rs("bookcount")=CInt(Request("ckxp"&rs2("bookid")))
rs("zhuangtai")=1
rs("dingdan")=dingdan
rs("youbian")=int(request("youbian"))
rs("shouhuoname")=trim(request("shouhuoname"))
rs("shouhuodizhi")=trim(request("shouhuodizhi"))
rs("zhifufangshi")=int(request("zhifufangshi"))
rs("songhuofangshi")=int(request("songhuofangshi"))
rs("shousex")=int(request("shousex"))
rs("liuyan")=HTMLEncode2(trim(request("liuyan")))
rs("zonger")=rs2("huiyuanjia")*CInt(Request("ckxp"&rs2("bookid")))
rs("userzhenshiname")=trim(request("userzhenshiname"))
rs("useremail")=trim(request("useremail"))
rs("usertel")=trim(request("usertel"))
rs("userid")=request.QueryString("userid")
rs.update
rs.close
set rs=nothing
conn.execute "delete from shop_action where username='"&request.cookies("bookshop")("username")&"' and bookid in ("&bookid&") and zhuangtai=6"
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -