Design and implementation of an online trading market plan

zhaozj2021-02-11  242

Design and implementation of an online trading market plan

Xu Pengmin Ga Lingyun Li Changxown

This article is designed with an online commodity trading system. As part of the virtual community, the system simulates people's market behavior in real life, providing community users to purchase and sell services. With this system, users can publish and query the supply and demand information, but also exchange in real time, express the purchase and selling intentions, engage in purchase and purchase activities, thereby implementing online transactions. The system uses the Windows NT 4.0 as a platform, using IIS 4.0 to do a web server, MS SQL Server 7.0 is made, and the database is provided with user tables, supply and demand information tables, and transaction record tables, three data sheet records related transaction data, development tools. HTML, ASP, and JavaScript, some procedures are as follows. The user identity authentication subsystem system adopts member system, and all users must register first to enter the market. HK-level management of users, determine the length of the supply and demand information released by the user according to different user levels. Control the user's registration behavior and trading behavior via username and password. The subsystem is mainly completed by the program login.htm, check.asp. Provide user login interface login.htm ...

User: < BR> Password:
& nbsp; & nbsp; ... Legally verify the user login information and automatically register new users Check.asp ... 'Handling the operation of the registered user if NOT RS.EOF TEN' password incorrect IF Userpd # TRIM (RS 1) .Value) THEN RESE.WRITE " Login Error prompt </ title> <br>" response.write "<center>" User Name "and" Password "do not match! </ Center> <br>" Response.write "reason and processing method: <br> 1. If you are logged in for the first time, the username has been registered by others! You can only change other name registration; <br>" response.write "2 If you have used this name to register successfully, then the password is wrong; <br> "response.write" 3. If the password is no problem, you may be that your username has been stolen by others, and the pirator has changed password " Response.write "Please contact <a href = mailto: nicstaff@lyac.edu.cn> administrator </ a>.</p> <p>"response.write" <a href = 'javascript: history.go (-1);'> Click here to modify </ a> </ body> "response.end else 'login correct, enter the market response.redirect" Market .htm "end if 'handles unregistered new users else SQL1 =" INSERT Park_Users VALUES (' "& UserName &", '"& Userpd &", getdate (), getdate (), 1) "SQL2 =" Insert Park_online VALUES '"& Username &",' "& ip &" ', getdate ()) "conn.execute (sql1) conn.execute (sql2) response.write" <center>! ! ! welcome! ! ! </ center> <br> "Response.write" <center> Your username is: "& Request.form (" UserName "&" & "Password is:" & Request.form ("Userpd") & "< Br> "response.write" again comes again to continue using the above data! <br> </ center> "END IF ... Supply and demand information query subsystem users can get detailed supply and demand information through this sub-system, including supplies, quantity, contact methods, related descriptions, even pictures, audio and video The user can use the classification browsing and keyword query, for keyword queries, as long as the item name or phrase or phrase that represents the product use, shape, etc., the user can make a full-text style through a special query algorithm. Fuzzy query. This subsystem is mainly done by program search1.asp, search2.asp, and link.asp.</p> <p>Accept and complete the user query request search1.asp ... 'from the data of the query interface C_TYPE = Request.QueryString ("c_type") goods_class = request.form ("d1") s = request.form ("t1") SET CONN = Server.createObject ("AdoDb.Connection") 'Opens Database Conn.connectionstring = "Driver = {SQL Server}; Server =; UID =; PWD =; Database =" Conn.open Set Session ("RS") = Server. createobject ( "adodb.recordset") 'configured search algorithm if goods_class = "all" then sql = "select goods_name, goods_class, description, publisher, contact, pub_date from market_goods where client_type ='" & c_type & " 'and goods_name like'%" & s & "% '" else sql = "select goods_name, goods_class, description, publisher, contact, pub_date from market_goods where client_type ='" & c_type & " 'and goods_class ='" & goods_class & " 'and goods_name like'%" & s & "% '" End if ... if c_type = "s" the response.write "<center> Seller Market </ center>" else response.write "<center> Buyer Market </ center>" End if ... <! - # include File = "link.asp" -> When the search result exceeds a screen, complete the display search search2.asp ... for j = 1 to session ("RS"). Pagesize response.write "<TR>" response .write "<TD> "& Session (" rs "). AbsolutePosition &" </ TD> "for i = 0 to session (" rs "). Fields.count-1 response.write" <TD> "& session (" RS ") (i). Value & "</ TD>" Next Response.write "</ TR>" Session ("RS"). MoveNext IF SESSION ("RS"). EOF THEN EXIT for end if Next ... <! - #</p> <p>Include file = "link.asp" -> Auxiliary completed multi-screen display search results link.asp <% IF session ("rs"). AbsolutePage> 0 Then NowPage = Session ("RS"). AbsolutePage-1 else noPage = Session ("RS"). PageCount end if response.write "<font size = 2> | Current page number:" & NOWPAGE & "" Response.write "| Total number of pages:" rS "). PageCount &" Response .write "| Total number:" & session ("rs"). Recordcount & "Response.write | per page record:" & session ("rs"). Pagesize & "</ font> <br>" for i = 1 TO Session ("RS"). PageCount if i <> nopage thrill.write "<a href =" "Search2.asp? Page =" & I & "& I & I & I &" </ a> "&" ELSE Response.write I & "End if Next%> Supply and demand information registration subsystem users can post their own goods or requirements information to the web. User supply and demand information is automatically managed according to the user level by the background database, and is automatically managed according to the user level. This subsystem is mainly done by the program goods_add.asp.</p> <p>Accept registration information from users and complete registration Goods_add.asp <% 'accept data from commodity registration interface UserName = Request.Cookies ("UserName") ... set conn = server.createObject ("adodb.connection" conn.connectionString = "Driver = {SQL Server}; server =; uid =; pwd =; database =" conn.open 'for 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 Talk Subsystem The system imitates the market in real life. The online supply and demand can directly communicate related information, determine the transaction price of the goods, to determine the deal or not. Mainly complete by the program addsay.asp, Say.asp.</p> <p>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 = conn.execute (" SELECT NAME FROM PARK_OONLINE WHERE NAME = '"& username &"') IF = '") IF ='") IF = '") IF ='" User, prohibit it to continue to stay 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 </ title> <meta http-equiv = refresh content = '10; url = syt.asp '> </ head > <% Set rs = server.createObject ("adoDb.recordset") SQL = "SELECT NAME, TOWHO, TowHoway, Contents, Time Fro M park_saysrs.open SQL, CONN, 3, 1 "if not rs.eof kilns = 1 rs.movelast do while not rs.movelast do while not rs.Bof if line> 15 Then EXIT DO END IF TRIM (RS (1)) <>" All "and TRIM (RS (2)) =" 1 "Then if UserName = TRIM (RS (0)) or use of trim (RS (1)) Then response.write" <font size = 2 color =</p> <p># Ff0000> "& TRIM (RS (0)) &" Only "& Trim (RS (1)) &" said>> <font> <font color = # 0000ff> "& = 1> ("& TimeValue (RS (4)) &") </ font> </ font> <br> "line = line 1 end if else response.write" <font size = 2 color = # ff0000> & trim (RS (0) & "To" & TRIM (RS (1)) & "said>> <font> <font color = # 0000ff>" & = 1> ("& TimeValue) 4) & ") </ font> </ font> <br>" line = line 1 end if rs.moveprevious loop if xi = rs.movefirst end if end if rs.close conn.close%> Submit record The system base is mainly for online users. When the online user determines the transaction, the system is made detailed transaction records, including the names of the transaction, the name, quantity, price, requirements, requirements and provided by the transaction. Service and other projects. As a dispute, it can provide evidence to resolve the violations in the transaction process to ensure the credibility of online transactions. This subsystem is verified by sending cookies to ensure user real identity, Avoid pretending to be a deceptive behavior that others engaged in trading. The system is mainly completed by the program agree.asp.</p> <p>Record the user trading process, in order to query agree.asp <% 'to accept data from the user agreed 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 =; pwd =; database =" conn. Open sql1 = "select * from park_online where name = '" & username "' Order by name" set = conn.execute (sql1) if ql = "refusal": response.end sql = "Insert Into Park_SAYS VALUES ('"& writer &",' "& object &", '1', '"& says", getDate (),' 1 ') "authenticates the transaction user to prevent others if Writer = Username THEN CONN.EXECUTE (SQL) SET CONN = Nothing response.write "<html> <body> <center> <font face = black body size = 6> <br> ok! </ font>" response.write "<br> <br> <a href = "" JavaScript: window.close () "> Close window </ a> </ center> </ b ODY> </ html> "else response.write" <html> <body bgcolor = # ff0000 text = # fff> <center> <font face = black body size = 10> <br> You can't pretend that others' name is engaged in transactions! </ Font> "response.write" <br> <br> <a href = "" javascript: window.close () ""></p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-4556.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="4556" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.038</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = 'usMQb6vd4k33PeoYCEgQbtFZFl3BoULboQXp2j5qWJOejuUyC6l8vuwoHAWYNjB_2Bt5ynxAWbpTzpSLiFf4zigQ_3D_3D'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>