一个订单管理页面

最近做项目,中间设计到用户在线提交订单;本来客户的要求很简单,可能被我做复杂了,结果确实我只用一个页面就完成了所有的功能,贴出来献丑了;为了赶时间,还没有集成分页功能,所以无论在公用页面读取现有的项目的时候,或者还是在个人页面读取现有的数据,都没有分页,而是采用了select top 10 * title From table的方法……等有时间了,再集成分页吧

主要代码如下:

None.gif < ! -- #include file = " Inc/Const.asp " -->
None.gif
None.gif      
< table width = " 485 "  height = " 400 "  border = " 0 "  cellpadding = " 0 "  cellspacing = " 0 " >
None.gif        
< tr >
None.gif          
< td width = " 12 " >& nbsp; </ td >
None.gif          
< td width = " 459 "  valign = " top " >< br >
None.gif    
None.gif
< %
None.gif
Dim  Action,Action1
None.gifAction
= Request( " Action " )
None.gif
None.gif
Select   Case  Action
None.gif 
Case   " Reg "  
None.gif  
Call  Reg()
None.gif 
Case   " SaveReg"
None.gif
   Call  SaveReg()
None.gif 
Case   " Login"
None.gif
   Call  Login()
None.gif 
Case   " ChkLogin"
None.gif
   Call  ChkLogin()  
None.gif 
Case   " AddOrder"
None.gif
   Call  AddOrder()
None.gif 
Case   " SaveOrder"
None.gif
   Call  SaveOrder()
None.gif 
Case   " Success"
None.gif
   Call  Success() 
None.gif 
Case   " ModyOrder"
None.gif
   Call  ModyOrder()
None.gif 
Case   " SaveMody"
None.gif
   Call  SaveMody() 
None.gif 
Case   " DelOrder"
None.gif
   Call  DelOrder()
None.gif 
Case   " LoginOut"
None.gif
   Call  LoginOut()
None.gif 
Case   " ShowOrder"
None.gif
   Call  ShowOrder()  
None.gif 
Case   Else
None.gif  
Call  Main()
None.gif
End   Select
None.gif
None.gif
' ++++++++++++++++++++++++++++主函数开始
None.gif

None.gif
Sub  Main()
None.gif%
>
None.gif      
None.gif  
< %   ' ++++++++++++++++++++++主函数开始%>
None.gif
  < table width = " 400 "  border = " 1 "  align = " center "  cellpadding = " 5 "  cellspacing = " 0 "  bordercolor = " f5f5f5 "  style = " border-collapse:collapse " >
None.gif              
< tr class = " table_row_1 " >
None.gif            
< td height = " 30 " >< font color = " FF6633 " > 所有订单如下: </ font ></ td >
None.gif   
</ tr >
None.gif    
< %sql = " select top 8 OrderComName,OrderClass,OrderId From [Order] order by Orderid desc"
None.gif
Set  rs =  Server. CreateObject ( " ADODB.Recordset " )
None.gifrs.open sql,conn,
1 , 1
None.gif
if  rs.eof  and  rs.bof  then
None.gif   response.write 
" <p align='center'><font color=red> 对不起,没有找到任何订单</font></p>"
None.gif
else
None.gif  
do   while   not  rs.eof% >
None.gif     
< tr class = " table_row_1 " >
None.gif                
< td height = " 30 " >< a href = " Order.asp?OrderId=<%=Rs( " OrderId " )%>&Action=ShowOrder " >< % = rs( " OrderComName " ) & " ----- " & rs( " OrderClass " )% ></ a ></ td >
None.gif      
</ tr >
None.gif   
< %Rs.movenext
None.gif   
loop
None.gif   rs.close
None.gif   
set  rs = nothing
None.gif   
end   If
None.gif   %
>
None.gif     
</ table >
None.gif  
< p >& nbsp; </ p >
None.gif  
< table width = " 400 "  border = " 0 "  align = " center "  cellpadding = " 0 "  cellspacing = " 0 " >
None.gif              
< tr >
None.gif                
< td width = " 20% " >  
None.gif                  
< form name = " Main1 "  method = " post "  action = " ? " >
None.gif                    
< div align = " center " >
None.gif                      
< input type = " submit "  name = " Main1 "  value = " 管理我的订单 "  class = " button " >
None.gif                      
< input type = " hidden "  name = " Action "  value = " Login " >
None.gif                    
</ div >
None.gif                  
</ form ></ td >
None.gif                
< td >< form name = " Main2 "  method = " post "  action = " ? " >
None.gif                    
< div align = " center " >
None.gif                      
< input type = " submit "  name = " Main2 "  value = " 新用户注册 "  class = " button " >
None.gif                      
< input type = " hidden "  name = " Action "  value = " Reg " >
None.gif                    
</ div >
None.gif                  
</ form ></ td >
None.gif  
</ tr >
None.gif
</ table >
None.gif 
None.gif
< br >< %
None.gif
End Sub
None.gif
None.gif
' ++++++++++++++++++++++++++++主函数结束
None.gif

None.gif
None.gif
None.gif
None.gif
' ++++++++++++++++++++++++++++用户注册函数开始
None.gif
Sub  Reg()
None.gif %
>
None.gif 
< form name = " reg "  method = " post "  action = " ? " >
None.gif              
< table width = " 400 "  border = " 0 "  align = " center "  cellpadding = " 5 "  cellspacing = " 0 " >
None.gif                
< tr class = " table_row_1 " >  
None.gif                
< td colspan = " 2 " >< div align = " center " >< strong >< font color = " #FF6633 " > 用 
None.gif                      户 注 册
</ font ></ strong ></ div ></ td >
None.gif              
</ tr >
None.gif              
< tr class = " table_row_1 " >  
None.gif                  
< td width = " 200 " >< div align = " right " > 用户名: & nbsp; & nbsp; </ div ></ td >
None.gif                
< td >< input name = " UserName "  type = " text "  class = " editbox "  id = " UserName "  size = " 16 " ></ td >
None.gif              
</ tr >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td >< div align = " right " > & nbsp; & nbsp;码: & nbsp; & nbsp; </ div ></ td >
None.gif                
< td >< input name = " Password "  type = " password "  class = " editbox "  id = " Password "  size = " 16 " ></ td >
None.gif              
</ tr >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td colspan = " 2 " >< div align = " center " >
None.gif                      
< input type = " hidden "  name = " Action "  value = " SaveReg " >
None.gif       
< input type = " submit "  name = " SubmitReg "  value = " 提交 "  class = " button " >& nbsp; & nbsp; & nbsp; & nbsp;
None.gif                      
< input type = " Reset "  name = " ResetReg "  value = " 取消 "  class = " button " >
None.gif                    
</ div ></ td >
None.gif              
</ tr >
None.gif            
</ table >
None.gif
</ form >
None.gif 
< %
None.gif
End Sub
None.gif
' ++++++++++++++++++++++++++++用户注册函数结束
None.gif

None.gif
None.gif
None.gif
None.gif
' ++++++++++++++++++++++++++保存注册信息开始
None.gif
Sub  SaveReg()
None.gif UserName
= Trim (Request.Form( " UserName " ))
None.gif Password
= Trim (Request.Form( " Password " ))
None.gif 
None.gif 
If  UserName = ""   Or   Len (UserName) = 0   or   Len (UserName) > 16   or  UserName = " Admin "   or  UserName = " admin "   Then
None.gif  ErrorMsg1
= true
None.gif 
Else
None.gif  ErrorMsg1
= False  
None.gif 
End   If  
None.gif 
If  Password = ""   Or   Len (Password) = 0   or   Len (Password) < 6   Or   Len (Password) > 16   then
None.gif  ErrorMsg2
= true
None.gif 
Else
None.gif  ErrorMsg2
= False  
None.gif 
End   If  
None.gif 
If  ErrorMsg1 = True   or  ErrorMsg2 = True   then
None.gif  Response.Write(
" <li>用户名长度必须大于0,小于20</li> " )
None.gif  Response.Write(
" <li>密码不能为空,长度必须大于6,小于16</li> " )
None.gif  Response.Write(
" <p align='center'><a href='#' OnClick='vbscript:history.back()'>【返回】</a></p> " )
None.gif 
End   If  
None.gif 
None.gif 
If  (ErrorMag1 = false   and  ErrorMsg2 = false Then
None.gif  
Set  RsReg = Server. CreateObject ( " Adodb.Recordset " )
None.gif  SqlReg
= " Select * From [User] Where Username=' " & UserName & " ' "
None.gif
  RsReg.Open sqlReg,Conn, 1 , 3
None.gif   
If   Not  (RsReg.Eof  or  RsReg.Bof)  Then
None.gif     Response.Write(
" 对不起,你的用户名已经被他人使用! " )
None.gif  Response.Write(
" <p align='center'><a href='#' OnClick='vbscript:history.back()'>【返回】</a></p> " )
None.gif  Response.
End ()
None.gif   
Else   
None.gif    RsReg.AddNew
None.gif    RsReg(
" UserName " ) = UserName
None.gif    RsReg(
" Password " ) = Password
None.gif    RsReg.Update
None.gif   
End   If
None.gif  RsReg.Close
None.gif  
Set  RsReg = Nothing  
None.gif Session(
" UserName " ) = UserName
None.gif 
Call  Success()
None.gif 
End   If  
None.gif 
None.gif
End Sub
None.gif
' ++++++++++++++++++++++++++保存注册信息完毕
None.gif

None.gif
None.gif 
None.gif
None.gif
' ++++++++++++++++++++++++++登陆开始
None.gif
Sub  Login()
None.gif%
>
None.gif  
< form name = " Login "  method = " post "  action = " ? " >  
None.gif           
< table width = " 400 "  border = " 0 "  align = " center "  cellpadding = " 5 "  cellspacing = " 0 " >
None.gif                
< tr class = " table_row_1 " >  
None.gif                
< td colspan = " 2 " >< div align = " center " >< strong >< font color = " #FF6633 " > 用 
None.gif                      户 等 陆
</ font ></ strong ></ div ></ td >
None.gif              
</ tr >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td width = " 200 " >< div align = " right " > 用户名: & nbsp; & nbsp; </ div ></ td >
None.gif                
< td >< input name = " UserName "  type = " text "  class = " editbox "  id = " UserName "  size = " 16 " ></ td >
None.gif              
</ tr >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td >< div align = " right " > 密码: & nbsp; & nbsp; </ div ></ td >
None.gif                
< td >< input name = " Password "  type = " password "  class = " editbox "  id = " Password "  size = " 16 " ></ td >
None.gif              
</ tr >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td colspan = " 2 " >   < div align = " center " >
None.gif                    
< input name = " Action "  type = " hidden "  id = " Action "  value = " ChkLogin " >
None.gif                    
< input name = " SubmitLogin "  type = " submit "  class = " button "  id = " SubmitLogin "  value = " 提交 " >
None.gif                    
& nbsp; & nbsp; & nbsp; & nbsp; 
None.gif                    
< input name = " Resetlogin "  type = " Reset "  class = " button "  id = " Resetlogin "  value = " 取消 " >
None.gif                  
</ div ></ td >
None.gif              
</ tr >
None.gif            
</ table >
None.gif  
</ form >
None.gif
< %
None.gif
End Sub
None.gif
' ++++++++++++++++++++++++++登陆结束
None.gif

None.gif
None.gif
None.gif
None.gif 
None.gif
None.gif
' ++++++++++++++++++++++++++检查登陆开始
None.gif

None.gif
Sub  ChkLogin()
None.gif
None.gifUserName
= Request.Form( " UserName " )
None.gifPassWord
= Request.Form( " PassWord " )
None.gif
None.gif
Set  RsChk = Server. CreateObject ( " Adodb.RecordSet " )
None.gifSqlChk
= " Select UserName,PassWord From [User] Where UserName=' " & UserName & " ' And Password=' " & PassWord & " '"
None.gif
RsChk.Open SqlChk,Conn, 1 , 1
None.gif
If  RsChk.Eof  Or  Bof  Then
None.gif Response.Write(
" <li>用户名不存在</li> " )
None.gif Response.Write(
" <li>用户名与密码不一致,拥护密码错误</li> " )
None.gif Response.Write(
" <p align='center'><a href='#' OnClick='vbscript:history.back()'>【返回】</a></p> " )
None.gif Response.
End ()
None.gif
Else
None.gif Session(
" UserName " ) = UserName
None.gif  
Call  Success()
None.gif
End   If   
None.gif
End Sub
None.gif
' ++++++++++++++++++++++++++检查登陆结束
None.gif

None.gif
None.gif
None.gif
None.gif
' ++++++++++++++++++++++++++++用户注册成功或登陆成功函数开始
None.gif

None.gif
Sub  Success()
None.gif
If  Session( " UserName " ) = ""   Then
None.gif  
Call  Login
None.gif
Else  
None.gif%
>
None.gif            
< table width = " 480 "  border = " 0 "  cellspacing = " 0 "  cellpadding = " 0 " >
None.gif              
< tr >  
None.gif                
< td valign = " top " >   < table width = " 400 "  border = " 2 "  align = " center "  cellpadding = " 5 "  cellspacing = " 0 "  bordercolor = " #F5F5F5 "  style = " border-collapse:collapse " >
None.gif                    
< tr class = " table_row_1 " >  
None.gif                      
< td height = " 30 " >   < div align = " center " >< strong >< font color = " #FF6633 " > 用户面板:欢迎您 < % = Session( " UserName " )% ></ font ></ strong ></ div ></ td >
None.gif                      
< td >< div align = " center " >< a href = " Order.asp?Action=AddOrder " > 增加订单 </ a ></ div ></ td >
None.gif                      
< td >< div align = " center " >< a href = " Order.asp?Action=LoginOut " > 注销登陆 </ a ></ div ></ td >
None.gif                    
</ tr >
None.gif                  
</ table ></ td >
None.gif              
</ tr >
None.gif              
< tr >  
None.gif                
< td valign = " top " >   < % Call  UserMain()% >   </ td >
None.gif              
</ tr >
None.gif            
</ table >  
None.gif            
< %
None.gif
End   If    
None.gif
End Sub
None.gif
' ++++++++++++++++++++++++++++用户注册或登陆成功函数结束
None.gif

None.gif
None.gif 
None.gif
None.gif
None.gif
None.gif 
' ++++++++++++++++++++++用户主函数开始
None.gif
Sub  UserMain()
None.gif
If  Session( " UserName " ) = ""   Then
None.gif  
Call  Login
None.gif
Else  
None.gif %
>
None.gif 
< br >
None.gif            
< table width = " 400 "  border = " 1 "  align = " center "  cellpadding = " 5 "  cellspacing = " 0 "  bordercolor = " #F5F5F5 "  style = " Border-Collapse:Collapse " >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td height = " 30 "  colspan = " 3 " >< font color = " FF6633 " > 您的订单如下 </ font ></ td >
None.gif              
</ tr >
None.gif              
< %sql = " select top 8 OrderId,OrderComName,OrderClass,IsCheck From [Order] Where OrderUserName=' " & Session( " UserName " ) & " ' order by Orderid desc"
None.gif
Set  rs =  Server. CreateObject ( " ADODB.Recordset " )
None.gifrs.open sql,conn,
1 , 1
None.gif
if  rs.eof  and  rs.bof  then
None.gif   response.write 
" <div align='center'><font color=red> 对不起 <strong> " & Session( " UserName " ) & " </strong>,没有找到您的任何订单</font></div>"
None.gif
else
None.gif  
do   while   not  rs.eof% >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td height = " 30 " >& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; < a Href = " Order.asp?OrderId=<%=rs( " OrderId " )%>&Action=ShowOrder " >< % = rs( " OrderComName " ) & " ----- " & rs( " OrderClass " )% ></ a ></ td >
None.gif                
< td width = " 40 " >< %tmpIsChk = Cint (rs( " IsCheck " ))
None.gif   
If  tmpIsChk = 1   then
None.gif      Response.Write(
" <font color='#FF6633'><strong>已审核</strong></font> " )
None.gif   
ElseIf  tmpIsChk = 0   Then
None.gif     Response.Write(
" <font color='#FF6633'><strong>未审核</strong></font> "
None.gif   
End   If % ></ td >
None.gif                
< td width = " 60 " >< a href = " Order.asp?Action=ModyOrder&OrderId=<%=rs( " OrderId " )%> " > 修改 </ a >  
None.gif                  
< a href = " Order.asp?Action=DelOrder&OrderId=<%=rs( " OrderId " )%> " > 删除 </ a ></ td >
None.gif              
</ tr >
None.gif              
< %Rs.movenext
None.gif   
loop
None.gif   rs.close
None.gif   
set  rs = nothing
None.gif   
end   If
None.gif   %
>
None.gif            
</ table >
None.gif
None.gif
None.gif
< %
None.gif
End   If
None.gif
End Sub
None.gif 
' ++++++++++++++++++++++用户主函数结束
None.gif
 
None.gif 
None.gif 
None.gif
None.gif
' ++++++++++++++++++++++++++++增加订单函数开始
None.gif
Sub  AddOrder()
None.gif
If  Session( " UserName " ) = ""   Then
None.gif  
Call  Login
None.gif
Else  
None.gif%
>
None.gif    
None.gif            
< table width = " 400 "  border = " 0 "  align = " center "  cellpadding = " 5 "  cellspacing = " 1 "  bgcolor = " #f7f7f7 " >
None.gif              
< form name = " AddOrder "  action = " ? "  method = " post " >
None.gif                
< tr bgcolor = " #FFFFFF " >  
None.gif                  
< td colspan = " 2 " > 网站类型:
None.gif                    
< select  name = " OrderClass " >
None.gif                      
< option  value = " 自己定制 "  selected > 自己定制 </ option >
None.gif       
< option  value = " 企业入门型 "  onMouseOver = "" > 企业入门型 </ option >
None.gif       
< option  value = " 企业宣传型 " > 企业宣传型 </ option >
None.gif                      
< option  value = " 企业产品展示型 " > 企业产品展示型 </ option >
None.gif                      
< option  value = " 企业电子商务型 " > 企业电子商务型 </ option >
None.gif                      
< option  value = " 企业门户 " > 企业门户 </ option >
None.gif                    
</ select >   < br >   < br >
None.gif                    公司名称: 
None.gif                    
< input name = " OrderComName "  type = " text "  class = " editbox "  size = " 30 " >  
None.gif                    
< br >   < br >
None.gif                    网站建设目的:
< br >   < textarea name = " OrderAim "  cols = " 60 "  rows = " 4 "   ></ textarea >  
None.gif                    
< br >   < br >
None.gif                    设计要求:
< br >   < textarea name = " OrderRequest "  cols = " 60 "  rows = " 4 "   ></ textarea >  
None.gif                    
< br >   < br >
None.gif                    网站内容简要介绍:
< br >   < textarea name = " OrderIntro "  cols = " 60 "  rows = " 6 "   ></ textarea >  
None.gif                    
< br >   < br >
None.gif                    网站需要的功能模块:
< br >
None.gif                    (需要特殊功能的也请在这里写下功能的描述) 
None.gif                    
< textarea name = " OrderModule "  cols = " 60 "  rows = " 5 "   ></ textarea ></ td >
None.gif                
</ tr >
None.gif                
< tr bgcolor = " #FFFFFF " >  
None.gif                  
< td width = " 40 " >& nbsp;  </ td >
None.gif                  
< td >< input type = " hidden "  name = " Action "  value = " SaveOrder " >
None.gif      
< input type = " submit "  name = " Submit "  value = " 提交 "  class = " button " >  
None.gif                    
& nbsp; & nbsp; & nbsp; & nbsp;  < input type = " Reset "  name = " Submit2 "  value = " 取消 "  class = " button " >  
None.gif                  
</ td >
None.gif                
</ tr >
None.gif              
</ form >
None.gif            
</ table >
None.gif   
None.gif
< %
None.gif
End   IF
None.gif
End Sub
None.gif
' ++++++++++++++++++++++++++++增加订单函数结束
None.gif

None.gif
None.gif
None.gif 
None.gif
None.gif
' ++++++++++++++++++++++++++++保存订单函数开始
None.gif
Sub  SaveOrder()
None.gif
None.gif
If  Session( " UserName " ) = ""   Then
None.gif  
Call  Login
None.gif
Else  
None.gif
Dim  OrderClass,OrderBillNo,OrderUserName,OrderComName,OrderAim,OrderRequest,OrderIntro,OrderModule
None.gifOrderBillNo
= " DW- " & Year ( Date ) & Right ( " 00 " & Month ( Date ), 2 ) & Right ( " 00 " & Day ( Date ), 2 ) & Right ( " 00 " & Hour ( Time ), 2 ) & Right ( " 00 " & Minute ( Time ), 2 ) & Right ( " 00 " & Second ( Time ), 2 )
None.gif
None.gifOrderClass
= Trim (Request.form( " OrderClass " ))
None.gifOrderComName
= Trim (Request.form( " OrderComName " ))
None.gifOrderAim
= Trim (Request.form( " OrderAim " ))
None.gifOrderRequest
= Trim (Request.form( " OrderRequest " ))
None.gifOrderIntro
= Trim (Request.form( " OrderIntro " ))
None.gifOrderModule
= Trim (Request.form( " OrderModule " ))
None.gif
None.gif
Set  RsSvOrder = Server. CreateObject ( " Adodb.RecordSet " )
None.gifSqlSvOrder
= " Select * From [Order]"
None.gif
RsSvOrder.Open SqlSvOrder,Conn, 1 , 3
None.gifRsSvOrder.AddNew
None.gifRsSvOrder(
" OrderClass " ) = OrderClass
None.gifRsSvOrder(
" OrderComName " ) = OrderComName
None.gifRsSvOrder(
" OrderBillNo " ) = OrderBillNo
None.gifRsSvOrder(
" OrderUserName " ) = Session( " UserName " )
None.gifRsSvOrder(
" OrderAim " ) = OrderAim
None.gifRsSvOrder(
" OrderRequest " ) = OrderRequest
None.gifRsSvOrder(
" OrderIntro " ) = OrderIntro
None.gifRsSvOrder(
" OrderModule " ) = OrderModule
None.gifRsSvOrder.Update
None.gifRsSvOrder.Close
None.gif
Set  RsSvOrder = Nothing
None.gif
Call  Success()
None.gif
End   If
None.gif
End Sub
None.gif
' ++++++++++++++++++++++++++++保存订单函数结束
None.gif

None.gif
None.gif
None.gif 
None.gif
None.gif
' ++++++++++++++++++++++++++++修改订单函数开始
None.gif
Sub  ModyOrder()
None.gif
None.gif
If  Session( " UserName " ) = ""   Then
None.gif  
Call  Login
None.gif
Else  
None.gif
Set  RsM = Server. CreateObject ( " Adodb.Recordset " )
None.gifSqlM
= " Select * From [Order] Where OrderId= " & Request( " OrderId " )
None.gifRsM.Open SqlM,Conn,
1 , 1
None.gif%
>
None.gif            
< table width = " 400 "  border = " 0 "  align = " center "  cellpadding = " 5 "  cellspacing = " 1 "  bgcolor = " #f7f7f7 " >
None.gif              
< form name = " AddOrder "  action = " ? "  method = " post " >
None.gif                
< tr bgcolor = " #FFFFFF " >  
None.gif                  
< td colspan = " 2 " > 网站类型:
None.gif                    
< select  name = " OrderClass " >
None.gif                      
< option  value = " 自己定制 "  selected > 自己定制 </ option >
None.gif       
< option  value = " 企业入门型 "  onMouseOver = "" > 企业入门型 </ option >
None.gif       
< option  value = " 企业宣传型 " > 企业宣传型 </ option >
None.gif                      
< option  value = " 企业产品展示型 " > 企业产品展示型 </ option >
None.gif                      
< option  value = " 企业电子商务型 " > 企业电子商务型 </ option >
None.gif                      
< option  value = " 企业门户 " > 企业门户 </ option >
None.gif                    
</ select >   < br >   < br >
None.gif                    公司名称: 
None.gif                    
< input name = " OrderComName "  type = " text "  class = " editbox "  size = " 30 "  value = " <%=RsM( " OrderComName " )%> " >  
None.gif                    
< br >   < br >
None.gif                    网站建设目的:
< br >  
None.gif                    
< textarea name = " OrderAim "  cols = " 60 "  rows = " 4 " >< % = RsM( " OrderAim " )% ></ textarea >  
None.gif                    
< br >   < br >
None.gif                    设计要求:
< br >   < textarea name = " OrderRequest "  cols = " 60 "  rows = " 4 " >< % = RsM( " OrderRequest " )% ></ textarea >  
None.gif                    
< br >   < br >
None.gif                    网站内容简要介绍:
< br >   < textarea name = " OrderIntro "  cols = " 60 "  rows = " 6 " >< % = RsM( " OrderIntro " )% ></ textarea >  
None.gif                    
< br >   < br >
None.gif                    网站需要的功能模块:
< br >
None.gif                    (需要特殊功能的也请在这里写下功能的描述) 
None.gif                    
< textarea name = " OrderModule "  cols = " 60 "  rows = " 5 " >< % = RsM( " OrderModule " )% ></ textarea ></ td >
None.gif                
</ tr >
None.gif                
< tr bgcolor = " #FFFFFF " >  
None.gif                  
< td width = " 40 " >& nbsp;  </ td >
None.gif                  
< td >< input type = " hidden "  name = " Action "  value = " SaveMody " >
None.gif      
< input type = " hidden "  name = " OrderId "  value = " <%=RsM( " OrderId " )%> " >
None.gif      
< input type = " submit "  name = " Submit "  value = " 提交 "  class = " button " >  
None.gif                    
& nbsp; & nbsp; & nbsp; & nbsp;  < input type = " Reset "  name = " Submit2 "  value = " 取消 "  class = " button " >  
None.gif                  
</ td >
None.gif                
</ tr >
None.gif              
</ form >
None.gif            
</ table >
None.gif
None.gif
< %
None.gifRsM.Close
None.gif
Set  RsM = Nothing
None.gif
End   If
None.gif
End Sub
None.gif
' ++++++++++++++++++++++++++++修改订单函数结束
None.gif

None.gif
None.gif
None.gif 
None.gif
None.gif
' ++++++++++++++++++++++++++++保存订单修改函数开始
None.gif
Sub  SaveMody()
None.gif
None.gif
If  Session( " UserName " ) = ""   Then
None.gif  
Call  Login
None.gif
Else  
None.gif
Dim  OrderClass,OrderBillNo,OrderUserName,OrderComName,OrderAim,OrderRequest,OrderIntro,OrderModule
None.gifOrderClass
= Trim (Request.form( " OrderClass " ))
None.gifOrderComName
= Trim (Request.form( " OrderComName " ))
None.gifOrderAim
= Trim (Request.form( " OrderAim " ))
None.gifOrderRequest
= Trim (Request.form( " OrderRequest " ))
None.gifOrderIntro
= Trim (Request.form( " OrderIntro " ))
None.gifOrderModule
= Trim (Request.form( " OrderModule " ))
None.gif
None.gif
Set  RsSvOrder = Server. CreateObject ( " Adodb.RecordSet " )
None.gifSqlSvOrder
= " Select * From [Order] Where OrderId= " & Request.Form( " OrderId "
None.gifRsSvOrder.Open SqlSvOrder,Conn,
1 , 3
None.gifRsSvOrder(
" OrderClass " ) = OrderClass
None.gifRsSvOrder(
" OrderComName " ) = OrderComName
None.gifRsSvOrder(
" OrderAim " ) = OrderAim
None.gifRsSvOrder(
" OrderRequest " ) = OrderRequest
None.gifRsSvOrder(
" OrderIntro " ) = OrderIntro
None.gifRsSvOrder(
" OrderModule " ) = OrderModule
None.gifRsSvOrder.Update
None.gifRsSvOrder.Close
None.gif
Set  RsSvOrder = Nothing
None.gif
Call  Success()
None.gif
None.gif
End   If
None.gif
None.gif
End Sub
None.gif
' ++++++++++++++++++++++++++++保存订单修改函数结束
None.gif

None.gif
None.gif
None.gif 
None.gif
None.gif
' ++++++++++++++++++++++++++++删除订单函数开始
None.gif
Sub  DelOrder
None.gif 
If  Session( " UserName " ) = ""   Then
None.gif  
Call  Login
None.gif 
Else  
None.gif  
Set  RsDel = Conn. Execute ( " Delete * From [Order] Where OrderId= " & Request( " OrderId " ))
None.gif  
Call  Success
None.gif 
End   If
None.gif
End Sub
None.gif
' ++++++++++++++++++++++++++++删除订单函数结束
None.gif

None.gif
None.gif
None.gif 
None.gif
None.gif
' ++++++++++++++++++++++++++++显示订单函数开始
None.gif
Sub  ShowOrder()
None.gif
None.gif
Set  Rs = Server. CreateObject ( " Adodb.Recordset " )
None.gifSql
= " Select * From [Order] Where OrderId= " & Request( " OrderId " )
None.gifRs.Open Sql,Conn,
1 , 1
None.gif%
>
None.gif
< table width = " 90% "  border = " 1 "  align = " center "  cellpadding = " 5 "  cellspacing = " 0 "  bordercolor = " F5F5F5 "  style = " Border-Collapse:Collapse " >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td height = " 30 "  colspan = " 2 "  bgcolor = " #cccccc " >   < div align = " center " >< strong >< font color = " #ff6633 " > 显 
None.gif                    示 项 目
</ font ></ strong ></ div ></ td >
None.gif              
</ tr >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td width = " 20% "  height = " 24 "  align = " center " > 公司名称 </ td >
None.gif                
< td >< % = rs( " OrderComname " )% ></ td >
None.gif              
</ tr >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td height = " 24 "  align = " center " > 添加人 </ td >
None.gif                
< td >< % = rs( " OrderUserName " )% ></ td >
None.gif              
</ tr >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td height = " 24 "  align = " center " > 项目类型 </ td >
None.gif                
< td >< % = rs( " OrderClass " )% ></ td >
None.gif              
</ tr >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td height = " 24 "  align = " center " > 建站目的 </ td >
None.gif                
< td  >< % = rs( " OrderAim " )% ></ td >
None.gif              
</ tr >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td height = " 24 "  align = " center " > 建站要求 </ td >
None.gif                
< td  >< % = rs( " OrderRequest " )% ></ td >
None.gif              
</ tr >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td height = " 24 "  align = " center " > 项目简介 </ td >
None.gif                
< td >< % = rs( " OrderIntro " )% ></ td >
None.gif              
</ tr >
None.gif              
< tr class = " table_row_1 " >  
None.gif                
< td height = " 24 "  align = " center " > 项目模块 </ td >
None.gif                
< td >< % = rs( " OrderModule " )% ></ td >
None.gif              
</ tr >
None.gif              
< % If  Session( " UserName " ) <> ""   Then % >
None.gif     
< tr class = " table_row_1 " >
None.gif                
< td height = " 24 "  align = " center " > 备注 </ td >
None.gif                
< td > 如果你想确认订单,请记住你订单的唯一 < br >
None.gif                  账单号码为:
< font color = " #ff0000 " >< % = Rs( " OrderBillNo " )% ></ font >< br >
None.gif                  
< br >
None.gif                  帐单号码的作用:
1  确认客户的利益不受到侵犯; < br >
None.gif                  
2  确认订单的重要依据:我们将根据你提供的订单 < br >
None.gif                  项目内容与帐单号码进行确认,只有在两者一致
< br >
None.gif                  的情况下我们才能最后确认。
</ td >
None.gif              
</ tr >
None.gif              
< % End   IF % >
None.gif     
< %
None.gif 
Set  Rs = Server. Createobject ( " Adodb.Recordset " )
None.gif    sql
= " select OrderID,OrderComName from [Order] where isCheck=0 order by OrderId desc"
None.gif
    Rs.CursorLocation = 3
None.gif    Rs.Open Sql,Conn,
1
None.gif   ArticleCount
= Rs.RecordCount
None.gif PageSize
= 20
None.gif    
Dim  Css
None.gif    Page
= Request.QueryString( " Page " )
None.gif    
If  Page = ""   Or  Page < 1   Then  
None.gif        Page
= 1
None.gif    
Else
None.gif        Page
= Cint (Page)
None.gif    
End   If  
None.gif I
= 1
None.gif 
If  ArticleCount  Mod   Cint (PageSize) = 0   Then
None.gif     PageCount
=  ArticleCount    Cint (PageSize)
None.gif 
Else
None.gif     PageCount
=  ArticleCount    Cint (PageSize) + 1
None.gif   
End   If
None.gif
None.gif   
If   Not  (Rs.Bof  And  Rs.Eof)  Then
None.gif    Rs.Movefirst
None.gif    
If  Page  >  PageCount  Then  Page  =  PageCount
None.gif    
If  Page < 1   Then  Page = 1
None.gif    Rs.Move (Page
- 1 *   Cint (PageSize)
None.gif
None.gif  
do   while   not  rs.eof  And  I <= PageSize
None.gif  I
= I + 1
None.gif        
If  I  Mod   2 = 0   Then  
None.gif           Css
= " Table_row_1"
None.gif
         Else
None.gif           Css
= " Table_row_2"
None.gif
         End   If
None.gif  %
>
None.gif              
< %
None.gif  rs.movenext
None.gif  
loop
None.gif  
End   If
None.gif  rs.close
None.gif  
set  rs = nothing
None.gif  %
>
None.gif            
</ table >
None.gif
< p align = " center " >
None.gif  
< input name = " goback "  type = " button "  id = " goback "  onClick = " Vbscript:history.back() "  value = " 后 退 "  class = " button " >
None.gif
</ p >
None.gif
None.gif
< %
None.gif
End Sub
None.gif
' ++++++++++++++++++++++++++++显示订单函数结束
None.gif

None.gif
None.gif
None.gif
None.gif
None.gif
' ++++++++++++++++++++++++++++注销函数开始
None.gif
Sub  LoginOut()
None.gif Session(
" UserName " ) = " "
None.gif
  Call  Main()
None.gif
End Sub
None.gif
' ++++++++++++++++++++++++++++注销函数结束
None.gif
% >    
None.gif   
</ td >
None.gif          
< td width = " 14 " >& nbsp; </ td >
None.gif        
</ tr >
None.gif      
</ table >
None.gif
None.gif



所有的函数结束,等有了时间,把他们全部转换成纯asp的文件,另外就是觉得多次操作数据库也不方便,准备把读取数据库编译成com+,不过还不知道怎么做,得努力找找资料

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值