Design and implementation of an online trading market scheme (II.)

Source: Internet
Author: User
Tags getdate insert interface trim
Design | Online supply and demand information registration subsystem
Users can publish their own goods or requirements information on the Internet in a timely manner. User supply and demand information from the background database through the trigger, according to the user level of automatic management, scheduled to delete. This subsystem is mainly goods_add by program. ASP completed.
Accept the registration information from the user and complete the registration

Goods_add. Asp
<%
' Accept data from the merchandise registration interface
Username=request.cookies ("username")
......
Set conn= Server.CreateObject
("Adodb.connection")
Conn.connectionstring= "driver=
{SQL server};server=;uid=;p wd=;d atabase= "
Conn.Open
' User authentication
Sql1= "SELECT * from Park_online where name=
' &username& ' ' ORDER by name '
Set Rs1=conn.execute (SQL1)
If Rs1.eof then Response.Write
"Access Denied": Response.End
Sql= "INSERT into market_goods values
(' &client_type& ', ' "&goods_name&",
' &goods_class& ', ' ' &description& ',
' &publisher& ', ' &contact& ', GETDATE ()
Conn.execute (SQL)
Set conn=nothing
Response.Redirect ". /log.htm "
% >

Online User Chat Subsystem
The system imitates the real life market, the online supply and demand both sides may exchange the commodity information directly, determines the commodity transaction price, decides the transaction or not. Mainly by the program addsay.asp, SAY. ASP completed.
Addsay. Asp
<%
......
Says=request.form ("says")
Says=server. HTMLEncode (says)
sql= INSERT into park_says values (' &username& ',
' &towho& ', ' ' &towhoway& ', ' ' &subject& ',
' &says& ', GETDATE (), ' "
Conn.execute SQL
Set conn=nothing
Response.Redirect "Say.asp"
......
SAY. Asp
<%
Username=request.cookies ("username")
Subject=request.cookies ("Subject")
Set Conn=server.createobject ("Adodb.connection")
Conn.connectionstring= "driver=
{SQL Server};server=ntd0;uid=xpm;pwd=xpm123;database=park "
Conn.Open
Set Rs=conn.execute ("SELECT name from Park_online
where Name= ' "&username&" "")
If Rs.eof Then
% >
< HTML >< head >
' For users who do not comply with market rules, it is prohibited to remain in the market
< script language= "JavaScript" >
window.open (' kick.asp ', ' Market ', ' resizable=no ')
</script >
<%
End If
% >
< meta http-equiv= ' Content-type ' content=
' Text/html; charset=gb2312 ' >
< title > Dialogue Area </title >
< meta Http-equiv=refresh content=
' 10;url=say.asp ' ><%
Set Rs=server.createobject ("Adodb.recordset")
Sql= "Select Name,towho,towhoway,contents,
Time from Park_saysrs.open sql,conn,3,1 "
If not rs.eof then
Line=1
Rs.movelast
Do as not Rs.bof
If line >15 Then
Exit Do
End If
If Trim (RS (1)) < > "All" and trim (RS (2)) = "1" Then
If Username=trim (RS (0)) or Username=trim (RS (1)) Then
Response.Write "< font size=2 color=
#ff0000 > "&trim (RS (0)) &" only on "&trim
(RS (1)) & "Say > ></font >< font >"
&rs (3) & "< font size=1 > (" &timevalue (RS (4)) & ")
</font ></font >< br > "
Line=line+1
End If
Else
Response.Write "< font size=2 >"
&trim (RS (0)) & "to" &trim (RS (1)) & > >
</font >< font > "&rs (3) &"
< font size=1 > ("&timevalue (RS (4)) &") </font >
</font >< br > "
Line=line+1
End If
Rs.moveprevious
Loop
If Rs.bof Then
Rs.movefirst
End If
End If
Rs.close
Conn.close
% >

Transaction recording Subsystem
This subsystem is mainly for online users, when online users through the conversation to determine the transaction, by the system to do a detailed transaction records, including the names of the parties to the transaction, the name of the sale of goods, quantity, price, requirements and services provided by the project. When the transaction produces the dispute may provide the evidence, thus to some extent solves the transaction process the violation behavior, guarantees the on-line transaction the Prestige. The notebook system authenticates the user by sending cookies to ensure the user's true identity and avoids cheating that pretends to be engaged in a transaction. The system is mainly AGREE by program. ASP completed.
Record the user transaction process for enquiries

AGREE. Asp
<%
' Accept the data from the user's consent interface
Username=request.cookies ("username")
Client_type=request.form ("Jy1")
Object=trim (Request.Form ("Jy2"))
Goods=request.form ("Jy3")
Amount=request.form ("Jy4")
Price=request.form ("Jy5")
Description=request.form ("Jy6")
Writer=trim (Request.Form ("Jy7"))
says=writer+client_type+object+
Goods+amount+price+description
Set conn= Server.CreateObject ("Adodb.connection")
Conn.connectionstring= "driver=
{SQL server};server=;uid=;p wd=;d atabase= "
Conn.Open
Sql1= "SELECT * from Park_online where name=
' "&username&" ' O



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.