Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
addToBuyBag.asp
Package: eat.rar [view]
Upload User: jisenq
Upload Date: 2014-06-29
Package Size: 7216k
Code Size: 1k
Category:
ADO-ODBC
Development Platform:
ASP/ASPX
- <% Option Explicit %>
- <!--#include file="../FS_Inc/Const.asp" -->
- <!--#include file="../FS_Inc/Function.asp" -->
- <!--#include file="../FS_InterFace/MF_Function.asp" -->
- <!--#include file="lib/strlib.asp" -->
- <!--#include file="lib/UserCheck.asp" -->
- <%
- '获得产品的实际价格
- Function getPrice(pid)
- Dim productRs,price
- price=0
- Set productRs=Conn.execute("Select NewPrice from FS_MS_Products where ID="&pid)
- if not productRs.eof then
- if productRs("NewPrice")="" then
- price=0
- Else
- price=productRs("NewPrice")
- End if
- End if
- getPrice=price
- End function
- Dim Rs,productID
- on error resume next
- productID=NoSqlHack(request.QueryString("pid"))
- if not isnumeric(productID) or productID="" then
- Response.Write("<script>history.back();</script>")
- End if
- if G_IS_SQL_User_DB=0 then
- User_Conn.execute("Insert into FS_ME_BuyBag (mid,BuyType,AddTime,UserNumber,BuyMoney,BuyNumber) values("&productid&",1,#"&now()&"#,'"&session("FS_Usernumber")&"',"&getPrice(productid)&",1)")
- else
- User_Conn.execute("Insert into FS_ME_BuyBag (mid,BuyType,AddTime,UserNumber,BuyMoney,BuyNumber) values("&productid&",1,'"&now()&"','"&session("FS_Usernumber")&"',"&getPrice(productid)&",1)")
- end if
- if err.number=0 then
- Response.Redirect("BuyBag.asp")
- Else
- Response.Redirect("lib/error.asp?ErrCodes=<li>"&err.description&"</li>")
- End if
- %>
- <%
- Set Conn = Nothing
- Set Fs_User = Nothing
- %>