您好,欢迎访问三七文档
1超市销售管理网站任课教师:温延龙wenyl@nankai.edu.cn2内容提要•系统功能分析•系统功能模块设计•网站建设•网站结构设计•动态数据库设计•登录界面及首页•数据库连接•后台管理模块•用户管理模块•营业情况统计模块•开发难点与解决技巧3系统功能分析用户登录商品管理用户管理订单管理系统管理4系统功能模块设计•用户登录–用户名及密码验证模式•商品信息管理–添加、修改、删除和查询•用户信息管理–添加、修改、删除、查询和更改密码•订单管理–订单详细资料、订货商品明细5网站建设•配置IIS•配置数据库6网站结构设计•录入商品信息,并对商品进行分类管理•对用户信息进行维护•实现对商品销售信息的统计•为管理员提供商品信息和用户信息的检索功能7动态数据库设计•逻辑结构设计–管理员信息•管理员用户名、密码等–货物信息•名称、编号、分类等–用户信息•编号、用户名、联系方式、密码等–销售信息•编号、订单号、产品号、价格、数量等–订单信息•编号、成员号、公司、用户名、联系方式等8动态数据库设计•逻辑结构设计–第一商品类别信息•类别号、类别名–第二商品类别信息•类别号、类别名–第三商品类别信息•类别号、类别名9动态数据库设计•物理结构设计–管理员信息表–货物信息表10动态数据库设计•物理结构设计–用户信息表–销售信息表11动态数据库设计•物理结构设计–订单信息表–第一商品类别表12动态数据库设计•物理结构设计–第二商品类别表–第三商品类别表13登录界面14首页15%@LANGUAGE=VBSCRIPT%%ifsession(admin_name)=thenresponse.redirectlogin.aspendif%!--#includefile=conn.asp--htmlheadtitle后台管理/titlemetahttp-equiv=Content-Typecontent=text/html;charset=gb2312/headframesetcols=180,*frameborder=NOborder=0framespacing=0rows=*framename=leftFramescrolling=AUTOnoresizesrc=left.aspmarginwidth=0marginheight=0framesetrows=20,*framespacing=0border=0frameborder=0frameborder=noborder=0framesrc=top.aspname=headscrolling=NONORESIZEframeborder=0marginwidth=10marginheight=0border=noframename=mainsrc=scrolling=AUTONORESIZEframeborder=0marginwidth=10marginheight=10border=no/frameset/framesetnoframes/body/noframes/html首页框架结构16trtdheight=20class=forumrow ■ahref=addhw.asptarget=main添加商品/a/td/trtrtdheight=20class=forumrow ■ahref=delhw.asptarget=main管理商品/a/td/trtrtdheight=20class=forumrow ■ahref=addsort.asptarget=main添加第一商品类别/a/td/trtrtdheight=20class=forumrow ■ahref=addsort2.asptarget=main添加第二商品类别/a/td/tr……trtdheight=20class=forumrow ■ahref=delsort.asptarget=main修改删除商品类别/a/td/tr菜单导航页面17数据库连接%Dimconn,rs,sql,strstr=Provider=SQLOLEDB;Server=.;UID=sa;PWD=;Database=shopsetconn=Server.CreateObject(ADODB.Connection)setrs=Server.CreateObject(“ADODB.RecordSet”)conn.openstr%18后台管理模块19商品信息添加20%……sql=select*fromhwrs.opensql,conn,3,3rs.addnewrs(hw_name)=hw_namers(xing)=xingrs(ping)=pingrs(lei)=leirs(leibie)=leibiers(tejia)=truers(hw_content)=hw_contentrs(hw_cash)=hw_cashrs(sort_id)=sort_idrs(sort2_id)=sort2_id……rs(hw_sn)=hwsnrs(ISBN)=ISBNrs(hw_pic)=hw_picrs.update……%保存记录信息21%……sql=select*fromhwwherehw_id=&request(hw_id)rs.opensql,conn,3,3rs(hw_name)=hw_namers(xing)=xingrs(ping)=pingrs(lei)=leirs(leibie)=leibiers(tejia)=truers(hw_content)=hw_contentrs(hw_cash)=hw_cashrs(sort_id)=sort_idrs(sort2_id)=sort2_id……rs(hw_sn)=hwsnrs(ISBN)=ISBNrs(hw_pic)=hw_picrs.update……%修改记录信息22%ifsession(admin_name)=thenresponse.redirectlogin.aspsetrs=server.createobject(adodb.recordset)%!--#includefile=conn.asp--%ifrequest(action)=delthensql=select*fromhwwherehw_id=&request(hw_id)rs.opensql,conn,3,3ifrs.eofthenresponse.redirectdelhw.aspelsers.deleters.updateendifrs.closeendif%……删除记录信息23商品信息列表24用户管理模块25%ifsession(admin_name)=thenresponse.end%!--#includefile=conn.asp--%SetcmdTemp=Server.CreateObject(ADODB.Command)SetInsertCursor=Server.CreateObject(ADODB.Recordset)cmdTemp.CommandText=SELECT*FROMmemberWHEREuser_id=&Request(id)cmdTemp.CommandType=1SetcmdTemp.ActiveConnection=connInsertCursor.OpencmdTemp,,1,3InsertCursor(user_name)=Request(memberID)InsertCursor(user_namec)=Request(name)InsertCursor(user_pass)=Request(user_pass)InsertCursor(user_mail)=Request(email)InsertCursor(user_tel)=Request(phone)InsertCursor(user_adds)=Request(address)InsertCursor(user_postcode)=Request(code)InsertCursor.UpdateInsertCursor.closeconn.closesetInsertCursor=nothingsetconn=nothing%修改用户信息26%ifsession(admin_name)=thenresponse.end%!--#includefile=conn.asp--%dimintIdintId=Request(id)sql=deletefrommemberwhereuser_id=&intId'response.writesql'response.Endconn.execute(sql)%scriptlanguage=Javascript!--alert(删除成功!);window.location=%=session(adminOldUrl)%//--/script删除用户信息27营业情况统计28%dimpage,maxPerPagemaxPerPage=10'每页显示的记录数page=Request(page)if(page=orisempty(page))thenpage=1thisUrl=subpass.asp?true=1session(adminOldUrl)=thisUrl&&page=&pagesetrs=server.createobject(adodb.recordset)sql=select*fromorderssql=sql&orderbyiddescrs.opensql,conn,1,1rs.pagesize=MaxPerPage%…….scriptlanguage=Javascript!--functionjumpTo(i){if(i==1){this.document.location=%=thisUrl%;}if(i==2){this.document.location=%=thisUrl%&page=%=page-1%;}if(i==3){this.document.location=%=thisUrl%&page=%=page+1%;}if(i==4){this.document.location=%=thisUrl%&page=%=rs.pageCount%;}}//--/script……分页技术实现29……%dimrsIDi=1ifnot(rs.eoforerr)thenrs.move(page-1)*maxPerPagedowhilenot(rs.eoforerr)……%……%i=i+1ifimaxPerPagethenexitdors.moveNextloop%……分页技术实现内容显示30divalign=rightfontcolor=#FFFFFF%=rs.recordCount%项第%=page%/%=rs.pageCount%页/font%ifpage1then%inputtype=buttonname=Submit3value=首页onClick=Javascript:jumpTo(1)inputtype=submitname=Submit4value=上页onClick=Javascript:jumpTo(2)%else%inputtype=buttonname=Submit3value=首页disabledinputtype=submitname=Submit4value=上页disabled%e
本文标题:超市销售管理网站
链接地址:https://www.777doc.com/doc-1630207 .html