home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 Special / chip-cd_2001_spec_05.zip / spec_05 / apps / crystal / disk24 / Xasp1 < prev    next >
Text File  |  1999-08-23  |  3KB  |  167 lines

  1. <%@ LANGUAGE="VBSCRIPT" %>
  2.  
  3. <% if Session("username") = "" then
  4.         Response.Redirect("/logon.asp")
  5.     end if
  6. %>
  7.  
  8.  
  9.  
  10. <%id=request.Form("custid")%>
  11. <%busname=request.Form("T1")
  12. if busname="" then 
  13. busname=" "
  14. end if
  15. %>
  16. <%firstname=request.Form("T2")
  17. if firstname="" then 
  18. firstname=" "
  19. end if
  20. %>
  21. <%lastname=request.Form("T3")
  22. if lastname="" then
  23.  lastname=" "
  24. end if
  25. %>
  26. <%title=request.Form("T4")
  27. if title="" then
  28.  title=" "
  29. end if
  30. %>
  31. <%position=request.Form("T5")
  32. if position="" then 
  33. position=" "
  34. end if
  35. %>
  36. <%accman=request.Form("T6")
  37. if accman="" then
  38.  accman=" "
  39. end if
  40. %>
  41.  
  42. <%add1=request.Form("T8")
  43. if add1="" then
  44.  add1=" "
  45. end if
  46. %>
  47. <%add2=request.Form("T9")
  48. if add2="" then
  49.  add2=" "
  50. end if
  51. %>
  52. <%city=request.Form("T10")
  53. if city="" then 
  54. city=" "
  55. end if
  56. %>
  57. <%region=request.Form("T11")
  58. if region="" then 
  59. region=" "
  60. end if
  61.  
  62. %>
  63. <%country=request.Form("T12")
  64. if country="" then
  65.  country=" "
  66. end if
  67. %>
  68. <%postal=request.Form("T13")
  69. if postal="" then
  70.  postal=" "
  71. end if
  72. %>
  73. <%phone=request.Form("T14")
  74. if phone="" then
  75.  phone=" "
  76. end if
  77. %>
  78. <%fax=request.Form("T15")
  79. if fax="" then
  80.  fax=" "
  81. end if
  82. %>
  83. <%sql="INSERT INTO Customer ([Customer ID],[Customer Name],[Contact First Name],[Contact Last Name],[Contact Title],[Contact Position],[Account Manager],Address1,Address2,City,Region,Country,[Postal Code],Phone,Fax) VALUES('"+id+"','"+busname+"','" +firstname+ "','" +lastname+ "','" +title+ "','" +position+ "','" +accman+ "','"  +add1+ "','" +add2+ "','" +city+ "','" +region+ "','" +country+ "','" +postal+ "','" +phone+ "','" +fax+ "')"%>
  84. <%Set Conn = Server.CreateObject("ADODB.Connection")%>
  85. <%
  86.  
  87.  
  88. Conn.Open "Xtreme sample data"%>
  89. <%Set RS = Conn.Execute(sql)
  90.  
  91.  
  92.  
  93.  
  94. %>
  95.  
  96. <html>
  97.  
  98. <head>
  99.  
  100. <title>Document Title</title>
  101. </head>
  102.  
  103. <body bgcolor="#003366" text="#FF8000" link="#FF8000"
  104. vlink="#00FFFF">
  105.  
  106.  
  107. <div align="center"><center>
  108.  
  109. <table border="0">
  110.     <tr>
  111.         <td>Customer id</td>
  112.         <td><%response.write(request.Form("custid"))%></td>
  113.     </tr>
  114.     <tr>
  115.         <td>Business Name</td>
  116.         <td><%response.write(request.Form("T1"))%></td>
  117.     </tr>
  118.     <tr>
  119.         <td>Contact First Name</td>
  120.         <td><%response.write(request.Form("T2"))%></td>
  121.     </tr>
  122.     <tr>
  123.         <td>Contact Last Name</td>
  124.         <td><%response.write(request.Form("T3"))%></td>
  125.     </tr>
  126.     
  127.     <tr>
  128.         <td>Account Manager</td>
  129.         <td><%response.write(request.Form("T6"))%></td>
  130.     </tr>
  131.    
  132.     <tr>
  133.         <td>Address Line 1</td>
  134.         <td><%response.write(request.Form("T8"))%></td>
  135.     </tr>
  136.     <tr>
  137.         <td>Address Line 2</td>
  138.         <td><%response.write(request.Form("T9"))%></td>
  139.     </tr>
  140.     <tr>
  141.         <td>City</td>
  142.         <td><%response.write(request.Form("T10"))%></td>
  143.     </tr>
  144.     <tr>
  145.         <td>Region</td>
  146.         <td><%response.write(request.Form("T11"))%></td>
  147.     </tr>
  148.     <tr>
  149.         <td>Country</td>
  150.         <td><%response.write(request.Form("T12"))%></td>
  151.     </tr>
  152.     
  153.     <tr>
  154.         <td>Phone</td>
  155.         <td><%response.write(request.Form("T14"))%></td>
  156.     </tr>
  157.     <tr>
  158.         <td>Fax</td>
  159.         <td><%response.write(request.Form("T15"))%></td>
  160.     </tr>
  161. </table>
  162. </center></div>
  163.  
  164. <p align="center"> </p>
  165. </body>
  166. </html>
  167.