網(wǎng)頁設(shè)計課程設(shè)計報告—電子商務(wù)網(wǎng)站開發(fā)與建設(shè)_第1頁
網(wǎng)頁設(shè)計課程設(shè)計報告—電子商務(wù)網(wǎng)站開發(fā)與建設(shè)_第2頁
網(wǎng)頁設(shè)計課程設(shè)計報告—電子商務(wù)網(wǎng)站開發(fā)與建設(shè)_第3頁
網(wǎng)頁設(shè)計課程設(shè)計報告—電子商務(wù)網(wǎng)站開發(fā)與建設(shè)_第4頁
網(wǎng)頁設(shè)計課程設(shè)計報告—電子商務(wù)網(wǎng)站開發(fā)與建設(shè)_第5頁
已閱讀5頁,還剩20頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、課程設(shè)計電子商務(wù)網(wǎng)站開發(fā)與建設(shè) 姓 名: 學(xué) 號: 專 業(yè): 指導(dǎo)教師: 聯(lián)系方式: 2013年06 月 14 日一、書店首頁實現(xiàn)代碼:圓圓書店歡迎來到圓圓書店!首頁用戶登錄用戶注冊購物車 自然類 歷史類 文學(xué)類 藝術(shù)類 數(shù)學(xué)類 政治類 地理類 天文類 漫畫類 top 1 top2 top3 實現(xiàn)效果:2、 數(shù)據(jù)庫購物車數(shù)據(jù)庫會員信息數(shù)據(jù)庫圖書信息數(shù)據(jù)庫訂單信息數(shù)據(jù)庫數(shù)據(jù)庫連接語句三、登錄頁面代碼:用戶登錄圓圓書店!親,先登錄吧!用戶名:登錄密碼:實現(xiàn)效果:四、注冊界面代碼: sub check dim theform set theform=document.myform if thefor

2、m.username.value= then msgbox 用戶名不能為空! exit sub end ifif len(theform.username.value)20 then msgbox 用戶名必須在6-20個字符和數(shù)字之間! exit sub end ifif len(theform.password.value)20 then msgbox 密碼必須為6-20個字符和數(shù)字之間! exit subend ifif theform.password.valuetheform.repassword.value then msgbox 再次輸入密碼必須與以上相同! exit sub en

3、d if if theform.question.value= then msgbox 問題不能為空! exit sub end if if theform.answer.value= then msgbox 答案不能為空! exit sub end if if theform.firstname.value= then msgbox 姓名不能為空! exit sub end if if theform.phonenumber.value= then msgbox 聯(lián)系方式不能為空! exit sub end if dim pos,txt,atxt=theform.email.valuepos

4、=a=instr(txt,pos)if a=0 then msgbox電子郵箱地址不正確! exit sub end iftheform.submit end sub用戶注冊歡迎光臨圓圓書店!先注冊吧,成為我們的會員! 標(biāo)注*項為必填選項 請輸入您的用戶名。 用戶名指南 必須為620個字符 用戶名:* 請輸入您的用戶登錄密碼。 密碼指南 請輸入620個字符或數(shù)字。 密碼:* 請再次輸入密碼:* 請輸入密保問題和密碼。 密保問題指南 這些問題將在你忘記用戶名或密碼的時候?qū)δ阌兴鶐椭?問題:* ? 答案:* 請輸入您的聯(lián)系信息。 姓名:* 聯(lián)系方式:* 電子郵箱:* 實現(xiàn)效果:輸出注冊結(jié)果代碼:

5、 % dim username dim password dim question dim answer dim name dim phonenumber dim mail username=request.form(username) password=request.form(password) question=request.form(question) answer=request.form(answer) name=request.form(name) phonenumber=request.form(phonenumber) mail=request.form(mail) res

6、ponse.write response.write username: response.write&username& response.write password: response.write&password& response.write question: response.write&question& response.write answer: response.write&answer& response.write name: response.write&name& response.write phonenumber: response.write&phonenu

7、mber& response.write e-mail: response.write&mail& response.write % 虛擬目錄建立步驟(1)在計算機管理建立虛擬目錄(2)創(chuàng)建虛擬目錄名稱、并瀏覽html存放的文件(3)通過虛擬目錄瀏覽文件(4) 注冊信息填寫并提交用戶登錄(檢查用戶登錄信息是否正確di.asp)% set conn=server.createobject(adodb.connection) strprovider=driver=microsoft access driver (*.mdb);dbq= &server.mappath(liyuanyuan.mdb)

8、 set rs=server.createobject(adodb.recordset) username=request(username) password=request(password) if len(username)6 then checkpass=false if len(password)五、購物車界面 往購物車里添加商品:當(dāng)單擊商品信息頁面中的“加入購物車”按鈕后,就會調(diào)用“cart.asp”頁面,同時傳遞當(dāng)前商品的編號?!癱art.asp”頁面接受商品編號以后,把該商品信息添加到購物車信息數(shù)據(jù)庫表中,然后顯示當(dāng)前的購物車商品。添加時使用insert into語句,用法如下

9、:sql=insert into cartitem(cartid,productid,&_productquantity) value(&cartid&,&productid&_,&productquantity&) cart.asp完整代碼如下:%dim userid,productid,productquantity.productprice,cartiduserid=session(userid)if userid=thenresponse.write對不起,你還沒有登錄,所以不能訂購商品。&_如果你已經(jīng)注冊,請按這里登錄。&_如果沒有,請按這里注冊。set conn=nothingre

10、sponse.endproductid=request.form(productid)productprice=request.form(productprice)productquantity=1set rscart=server.createobject(adodb.recordset)sql=select*form carts where userid=&useridrscart.open sql,conn,3,2if recart.eof and recart.bof thenrscart.addnewrscart(userid)=useridrscart.updateend ifrs

11、cart.movelastcartid=rscart(cartid)rscart.closeset rscart=nothingset rsitem=server.createobject(adodb.recordset)if productidthensql=delete from cartitem where cartid=&cartid&_and productid=&productidconn.execute sqlsql=insert into cartitem(cartid,productid,&_productquantity,productprice)value(&cartid

12、&,&productid&_,&productquantity &,&productprice&)conn.execute sqlend ifsql=select cartitem.cartid,cartitem.productid,cartitem.productquantity,&_products.productprice,products.productname&_from cartitem,products&_where cartitem.productid=products.productid and&_cartitem.cartid=&cartid&_order by carti

13、tem.productidrsitem.open sql,conn,0,1%歡迎光臨購物車input type=hidden name=cartid value=購物車序號商品數(shù)量單價金額%end ifinput type=text size=3 name=pqvalue=input type=checkbox name=pd value=1合計input type=hidden name=cartid value=.實現(xiàn)效果:點擊圖書致青春詳情表下面的“加入購物車”按鈕,出現(xiàn)如下頁面(其代碼在下面圖書詳情代碼中再詳細給出):數(shù)據(jù)庫如下:六、分類檢索-以文學(xué)類為例代碼:圓圓書店圓圓書店 文學(xué)類

14、 致我們終將逝去的青春平版 誰殺了我的牛? 妙語人生   實現(xiàn)結(jié)果:點擊致青春的書名或圖片。其代碼及實現(xiàn)頁面如下代碼:圓圓書店圓圓書店 致我們終將逝去的青春(附珍藏卡冊) 平裝 待添加的隱藏文字內(nèi)容2 作者:辛夷塢 價格:¥ 15 免運費 庫存數(shù)量:2件 圖書描述 鄭微,心懷對林靜的愛意考上林靜所在城市大學(xué),發(fā)現(xiàn)林靜已出國,后愛上同校陳孝正,一個板正又敏感的男孩。兩個人走到一起,陳孝正卻選擇出國,放棄鄭微。幾年后,林靜陳孝正出現(xiàn),鄭微會傾向于哪邊呢? 出版社: 百花洲文藝出版社; 第1版 (2013年5月1日) 平裝: 298頁 語種: 簡體中文商品尺寸: 23.6 x 16.8 x

15、 2.4 c      其中“best.asp”源碼如下: 實現(xiàn)頁面:點擊首頁top1圖書,出現(xiàn)以下界面:7、 搜索查詢代碼: 搜索圖書 圖書名稱 作者 出版社 價格 操作界面:搜索查詢結(jié)果:8、 訂單詳情代碼:歡迎光臨本書店 訂單詳情 % if session(userid) then % 訂單編號 購書人 購書時間接收人金額 % set rs = server.createobject(adodb.recordset)sql = select * from orderlist where userid = &session(userid)&rs.open sql,conn,3,3if isnumeric(request(page)=fal

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論