Guest User

Untitled

a guest
Nov 22nd, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.56 KB | None | 0 0
  1. <HTML>
  2. <HEAD>
  3. <TITLE>Trouble</TITLE>
  4. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
  5. </HEAD>
  6. <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 link="#000000" alink="#000000" vlink="#666666">
  7. <% If Request.QueryString("Action") = "" Then %>
  8. <%
  9. If Session.Contents("Browse") <> "Yes" Then
  10. Response.Redirect("index.asp")
  11. Else
  12. %>
  13. <table width="100%" height="100%" cellpadding="0" cellspacing="0" align="center">
  14. <tr>
  15. <td align="center">
  16. <form name="troubleticket" method="post" action="?Action=Send">
  17. <table width="300" height="400" cellpadding="0" cellspacing="0" bgcolor="#F4F4F4">
  18. <tr>
  19. <td colspan="3" height="21" width="300"><img src="images/newticket_03.gif" width="300" height="21"></td>
  20. </tr>
  21. <tr>
  22. <td width="1" height="400"><img src="images/newticket_05.gif" width="1" height="400"></td>
  23. <td width="298" height="398">
  24. <table width="298" height="400" border="0" cellpadding="0" cellspacing="0">
  25. <tr>
  26. <td height="5"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Contact
  27. Name:</b></font></td>
  28. </tr>
  29. <tr>
  30. <td height="5">&nbsp;
  31. <input style="background:#F4F4F4;font-weight: bold;font-size: 10px;color:#000000;font-family: verdana" type="text" name="name" size="40">
  32. </td>
  33. </tr>
  34. <tr>
  35. <td height="5"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Contact
  36. Phone Number:</b></font></td>
  37. </tr>
  38. <tr>
  39. <td height="5">&nbsp;
  40. <input style="background:#F4F4F4;font-weight: bold;font-size: 10px;color:#000000;font-family: verdana" type="text" name="phonenumber" size="24">
  41. &nbsp;&nbsp;
  42. <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Ext.</b></font>&nbsp;&nbsp;&nbsp;
  43. <input style="background:#F4F4F4;font-weight: bold;font-size: 10px;color:#000000;font-family: verdana" type="text" name="extension" size="6">
  44. </td>
  45. </tr>
  46. <tr>
  47. <td height="5"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Contact
  48. E-mail:</b></font></td>
  49. </tr>
  50. <tr>
  51. <td height="5">&nbsp;
  52. <input style="background:#F4F4F4;font-weight: bold;font-size: 10px;color:#000000;font-family: verdana" type="text" name="email" size="40">
  53. </td>
  54. </tr>
  55. <tr>
  56. <td height="14"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Machine
  57. Name:</b></font></td>
  58. </tr>
  59. <tr>
  60. <td height="5">&nbsp;
  61. <input style="background:#F4F4F4;font-weight: bold;font-size: 10px;color:#000000;font-family: verdana" type="text" name="machine" size="40">
  62. </td>
  63. </tr>
  64. <tr>
  65. <td height="5"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Trouble
  66. Level:</b></font></td>
  67. </tr>
  68. <tr>
  69. <td height="5"><input style="background:#F4F4F4;font-weight: bold;font-size: 10px;color:#000000;font-family: verdana" type="radio" name="level" value="Critical"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Critical</b> - Server down or Network down</font> </td>
  70. </tr>
  71. <tr>
  72. <td height="5"><input style="background:#F4F4F4;font-weight: bold;font-size: 10px;color:#000000;font-family: verdana" type="radio" name="level" value="High"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>High</b> - Unable to log in, machine wont turn on</font> </td>
  73. </tr>
  74. <tr>
  75. <td height="5"><input style="background:#F4F4F4;font-weight: bold;font-size: 10px;color:#000000;font-family: verdana" type="radio" name="level" value="Normal"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Normal</b> - Cannot print, creating/deleting accounts</font> </td>
  76. </tr>
  77. <tr>
  78. <td height="5"><input type="radio" name="level" value="Low"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Low</b> - Name change, software install</font> </td>
  79. </tr>
  80. <tr>
  81. <td height="5"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Problem(s):</b></font></td>
  82. </tr>
  83. <tr>
  84. <td height="5">&nbsp;
  85. <textarea cols="40" name="trouble" rows="10" style="background:#F4F4F4;font-weight: bold;font-size: 10px;color:#000000;font-family: verdana">Describe your problem here Give as many details as possible</textarea>
  86. </td>
  87. </tr>
  88. <tr>
  89. <td height="15"></td>
  90. </tr>
  91. <tr>
  92. <td height="5" align="center"><input type="image" src="images/SendButton.jpg" value="submit" name="submit" height="19" width="99">
  93. </td>
  94. </tr>
  95. <tr>
  96. <td height="100%"></td>
  97. </tr>
  98. </table>
  99. </td>
  100. <td align="left" width="1" height="400"><img src="images/newticket_07.gif" width="1" height="400"></td>
  101. </tr>
  102. <tr>
  103. <td colspan="3" width="300" height="1"><img src="images/newticket_08.gif" width="300" height="1"></td>
  104. </tr>
  105. </table>
  106. </form>
  107. </td>
  108. </tr>
  109. </table>
  110. <% End If 'Session Check %>
  111. <% End If 'QueryString %>
  112. </BODY>
  113. </HTML>
  114.  
  115.  
  116.  
  117. <% If Request.QueryString("Action") = "Send" Then %>
  118. <%
  119. Dim con, Connect, SQL
  120. Dim CCN, CPN, CCE, CT, CEXT, PhoneNumber
  121. CCN = Request.Form("name")
  122. CPN = Request.Form("phonenumber")
  123. CCE = Request.Form("email")
  124. CT = Request.Form("trouble")
  125. CEXT = Request.Form("extension")
  126.  
  127. '================START CHECKS===========================
  128. If CCN = "" Then
  129. Server.Transfer("newticket.asp")
  130. Response.Write("<font color='#FF0000'>**You Must Enter Your Name**</font>")
  131. Else
  132. End If
  133.  
  134. If CPN = "" Then
  135. Server.Transfer("newticket.asp")
  136. Response.Write("<font color='#FF0000'>**You Must Enter A Phone Number**</font>")
  137. Else
  138. End If
  139.  
  140. If CCE = "" Then
  141. Server.Transfer("newticket.asp")
  142. Response.Write("<font color='#FF0000'>**You Must Enter An E-mail Address**</font>")
  143. Else
  144. End If
  145.  
  146. If CT = "" Then
  147. Server.Transfer("newticket.asp")
  148. Response.Write("<font color='#FF0000'>**You Must Enter What Troubles You Are Having**</font>")
  149. Else
  150. End If
  151.  
  152. If CEXT = "" Then
  153. PhoneNumber = CPN
  154. Else
  155. PhoneNumber = CPN + " EXT. " + CEXT
  156. End If
  157. '===============END CHECKS===============================
  158.  
  159. Dim DT
  160. DT = cSTR(Date) + " " + cSTR(Time)
  161. CT = Replace(CT, "'", "&#39")
  162. CT = Replace(CT, """", "&#34")
  163.  
  164. Set con = Server.CreateObject("ADODB.Connection")
  165. Connect = Application("Ticket")
  166. con.Open Connect
  167. SQL = "INSERT INTO Tickets (CompanyName, ClientName, ClientPhoneNumber, ClientEmail, Trouble, Status, TroubleLevel, TroubleMachine, DateSub)"
  168. SQL = SQL + " VALUES ('" & Session.Contents("Company") & "', '" & CCN & "', '" & PhoneNumber & "', '" & CCE & "', '" & CT & "', 'Open', "
  169. SQL = SQL + "'" & Request.Form("level") & "', '" & Request.Form("machine") & "', '" & DT & "')"
  170. con.Execute(SQL)
  171. con.Close
  172.  
  173. Dim RS, TNumber
  174. Set RS = Server.CreateObject("ADODB.Recordset")
  175. con.Open Connect
  176. SQL = "SELECT TicketID FROM Tickets ORDER BY TicketID DESC"
  177. RS.Open SQL, Connect
  178. TNumber = Session.Contents("CompanyShort") + cSTR(RS.Fields("TicketID"))
  179. SQL = "UPDATE Tickets SET TicketNumber = ('" & TNumber & "') WHERE TicketID LIKE '" & RS.Fields("TicketID") & "'"
  180. con.Execute(SQL)
  181. %>
  182. <%
  183. '===================MAIL SENT TO TECH======================================
  184. '-----------Create Instance of Object--------------------------------------
  185. Set Mail = Server.CreateObject("Persits.MailSender")
  186. '--------------------------------------------------------------------------
  187.  
  188. '-----------Set Mail Properties--------------------------------------------
  189. Mail.Host = "63.149.205.175" ' Specify a valid SMTP server
  190. Mail.From = "mailer@e4lv.com" ' Specify sender's address
  191. '--------------------------------------------------------------------------
  192.  
  193. '-----------Gather Info From Form------------------------------------------
  194. Dim UN, UE, UM
  195. UN = Request.Form("name")
  196. UE = Request.Form("email")
  197. UM = "<html><body>"
  198. UM = UM + "Client Name: <b>" & Request.Form("name") & "</b><br>"
  199. UM = UM + "Company: <b>" & Session.Contents("Company") & "</b><br>"
  200. UM = UM + "Client E-mail: <b>" & Request.Form("email") & "</b><br>"
  201. UM = UM + "Client Phone Number: <b>" & PhoneNumber & "</b><br>"
  202. UM = UM + "Machine Name: <b>" & Request.Form("machine") & "</b><br>"
  203. UM = UM + "Trouble Level: <b>" & Request.Form("level") & "</b><br>"
  204. UM = UM + "Date and Time Submitted: <b>" & Date & " - " & Time & "</b><br>"
  205. UM = UM + "Ticket Number: <b>" & TNumber & "</b><br>"
  206. UM = UM + "Problem(s):<br><b>" & Request.Form("trouble") & "</b>"
  207. UM = UM + "</body></html>"
  208. '--------------------------------------------------------------------------
  209. '------------Put together message with name, e-mail and body---------------
  210. Mail.FromName = UN 'Specify sender's name
  211. Mail.AddAddress "tony@e4lv.com"
  212. Mail.AddAddress "elainev@e4lv.com"
  213. Mail.AddAddress "chris@e4lv.com"
  214. Mail.AddAddress "billm@e4lv.com"
  215. Mail.Subject = "TROUBLE TICKET - Company [" & Session.Contents("Company") & "] Trouble Level [" & Request.Form("level") & "]"
  216. Mail.Body = UM 'The body of the message
  217. Mail.IsHTML = True
  218. '--------------------------------------------------------------------------
  219.  
  220. '------------Check for errors----------------------------------------------
  221. On Error Resume Next
  222. Mail.Send 'Sends the e-mail
  223. Set Mail = Nothing
  224. '================================END MAIL SENT TO TECH===================================
  225.  
  226. '================================MAIL SENT TO Client=====================================
  227. '-----------Create Instance of Object--------------------------------------
  228. Set Mail = Server.CreateObject("Persits.MailSender")
  229. '--------------------------------------------------------------------------
  230.  
  231. '-----------Set Mail Properties--------------------------------------------
  232. Mail.Host = "63.149.205.175" ' Specify a valid SMTP server
  233. Mail.From = "mailer@e4lv.com" ' Specify sender's address
  234. '--------------------------------------------------------------------------
  235.  
  236. '-----------Gather Info From Form------------------------------------------
  237. Dim UMM
  238. UMM = "<html><body>"
  239. UMM = UMM + Request.Form("name") + ",<br><br>"
  240. UMM = UMM + "This E-mail is to notify you that we have recieved your request for services."
  241. UMM = UMM + "We will be contacting you shortly to discuss and/or fix the issue. Please keep your Ticket Number handy, thank you for your patience."
  242. UMM = UMM + "<br><br><br>Radical Networks<br>Office #: 366-1817"
  243. '--------------------------------------------------------------------------
  244. '------------Put together message with name, e-mail and body---------------
  245. Mail.FromName = "Radical Networks" 'Specify sender's name
  246. Mail.AddAddress Request.Form("email")
  247. Mail.Subject = "RE: Radical Networks Trouble Ticket - Ticket Number [" & TNumber & "]"
  248. Mail.Body = UMM 'The body of the message
  249. Mail.IsHTML = True
  250. '--------------------------------------------------------------------------
  251.  
  252. '------------Check for errors----------------------------------------------
  253. On Error Resume Next
  254. Mail.Send 'Sends the e-mail
  255. Set Mail = Nothing
  256. '================================END MAIL SENT TO CLIENT===================================
  257. %>
  258. <table width="100%" height="100%" cellpadding="0" cellspacing="0" align="center">
  259. <tr>
  260. <td align="center">
  261. <table width="300" height="400" cellpadding="0" cellspacing="0" bgcolor="#F4F4F4">
  262. <tr>
  263. <td colspan="3" height="21" width="300"><img src="images/newticket_03.gif" width="300" height="21"></td>
  264. </tr>
  265. <tr>
  266. <td width="1" height="400"><img src="images/newticket_05.gif" width="1" height="400"></td>
  267. <td width="298" height="398">
  268. <table width="298" height="400" border="0" cellpadding="0" cellspacing="0">
  269. <tr>
  270. <td height="15"></td>
  271. </tr>
  272. <tr>
  273. <td height="5" align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">Thank you for submitting your Trouble Ticket.
  274. Your ticket Number is <b><%=TNumber%></b>. Please keep this Ticket Number Handy, we will be contacting you shortly
  275. about the issue.</font></td>
  276. </tr>
  277. <tr>
  278. <td height="5" align="center"><font face="Verdana, Arial" size="-1"><b><a href="logoff.asp">Log Off</a></b></font></td>
  279. </tr>
  280. <tr>
  281. <td height="100%"></td>
  282. </tr>
  283. </table>
  284. </td>
  285. <td align="left" width="1" height="400"><img src="images/newticket_07.gif" width="1" height="400"></td>
  286. </tr>
  287. <tr>
  288. <td colspan="3" width="300" height="1"><img src="images/newticket_08.gif" width="300" height="1"></td>
  289. </tr>
  290. </table>
  291. </td>
  292. </tr>
  293. </table>
  294. <% End If %>
Add Comment
Please, Sign In to add comment