Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <HTML>
- <HEAD>
- <TITLE>Trouble</TITLE>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
- </HEAD>
- <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 link="#000000" alink="#000000" vlink="#666666">
- <% If Request.QueryString("Action") = "" Then %>
- <%
- If Session.Contents("Browse") <> "Yes" Then
- Response.Redirect("index.asp")
- Else
- %>
- <table width="100%" height="100%" cellpadding="0" cellspacing="0" align="center">
- <tr>
- <td align="center">
- <form name="troubleticket" method="post" action="?Action=Send">
- <table width="300" height="400" cellpadding="0" cellspacing="0" bgcolor="#F4F4F4">
- <tr>
- <td colspan="3" height="21" width="300"><img src="images/newticket_03.gif" width="300" height="21"></td>
- </tr>
- <tr>
- <td width="1" height="400"><img src="images/newticket_05.gif" width="1" height="400"></td>
- <td width="298" height="398">
- <table width="298" height="400" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td height="5"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Contact
- Name:</b></font></td>
- </tr>
- <tr>
- <td height="5">
- <input style="background:#F4F4F4;font-weight: bold;font-size: 10px;color:#000000;font-family: verdana" type="text" name="name" size="40">
- </td>
- </tr>
- <tr>
- <td height="5"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Contact
- Phone Number:</b></font></td>
- </tr>
- <tr>
- <td height="5">
- <input style="background:#F4F4F4;font-weight: bold;font-size: 10px;color:#000000;font-family: verdana" type="text" name="phonenumber" size="24">
-
- <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Ext.</b></font>
- <input style="background:#F4F4F4;font-weight: bold;font-size: 10px;color:#000000;font-family: verdana" type="text" name="extension" size="6">
- </td>
- </tr>
- <tr>
- <td height="5"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Contact
- E-mail:</b></font></td>
- </tr>
- <tr>
- <td height="5">
- <input style="background:#F4F4F4;font-weight: bold;font-size: 10px;color:#000000;font-family: verdana" type="text" name="email" size="40">
- </td>
- </tr>
- <tr>
- <td height="14"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Machine
- Name:</b></font></td>
- </tr>
- <tr>
- <td height="5">
- <input style="background:#F4F4F4;font-weight: bold;font-size: 10px;color:#000000;font-family: verdana" type="text" name="machine" size="40">
- </td>
- </tr>
- <tr>
- <td height="5"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Trouble
- Level:</b></font></td>
- </tr>
- <tr>
- <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>
- </tr>
- <tr>
- <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>
- </tr>
- <tr>
- <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>
- </tr>
- <tr>
- <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>
- </tr>
- <tr>
- <td height="5"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><b>Problem(s):</b></font></td>
- </tr>
- <tr>
- <td height="5">
- <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>
- </td>
- </tr>
- <tr>
- <td height="15"></td>
- </tr>
- <tr>
- <td height="5" align="center"><input type="image" src="images/SendButton.jpg" value="submit" name="submit" height="19" width="99">
- </td>
- </tr>
- <tr>
- <td height="100%"></td>
- </tr>
- </table>
- </td>
- <td align="left" width="1" height="400"><img src="images/newticket_07.gif" width="1" height="400"></td>
- </tr>
- <tr>
- <td colspan="3" width="300" height="1"><img src="images/newticket_08.gif" width="300" height="1"></td>
- </tr>
- </table>
- </form>
- </td>
- </tr>
- </table>
- <% End If 'Session Check %>
- <% End If 'QueryString %>
- </BODY>
- </HTML>
- <% If Request.QueryString("Action") = "Send" Then %>
- <%
- Dim con, Connect, SQL
- Dim CCN, CPN, CCE, CT, CEXT, PhoneNumber
- CCN = Request.Form("name")
- CPN = Request.Form("phonenumber")
- CCE = Request.Form("email")
- CT = Request.Form("trouble")
- CEXT = Request.Form("extension")
- '================START CHECKS===========================
- If CCN = "" Then
- Server.Transfer("newticket.asp")
- Response.Write("<font color='#FF0000'>**You Must Enter Your Name**</font>")
- Else
- End If
- If CPN = "" Then
- Server.Transfer("newticket.asp")
- Response.Write("<font color='#FF0000'>**You Must Enter A Phone Number**</font>")
- Else
- End If
- If CCE = "" Then
- Server.Transfer("newticket.asp")
- Response.Write("<font color='#FF0000'>**You Must Enter An E-mail Address**</font>")
- Else
- End If
- If CT = "" Then
- Server.Transfer("newticket.asp")
- Response.Write("<font color='#FF0000'>**You Must Enter What Troubles You Are Having**</font>")
- Else
- End If
- If CEXT = "" Then
- PhoneNumber = CPN
- Else
- PhoneNumber = CPN + " EXT. " + CEXT
- End If
- '===============END CHECKS===============================
- Dim DT
- DT = cSTR(Date) + " " + cSTR(Time)
- CT = Replace(CT, "'", "'")
- CT = Replace(CT, """", """)
- Set con = Server.CreateObject("ADODB.Connection")
- Connect = Application("Ticket")
- con.Open Connect
- SQL = "INSERT INTO Tickets (CompanyName, ClientName, ClientPhoneNumber, ClientEmail, Trouble, Status, TroubleLevel, TroubleMachine, DateSub)"
- SQL = SQL + " VALUES ('" & Session.Contents("Company") & "', '" & CCN & "', '" & PhoneNumber & "', '" & CCE & "', '" & CT & "', 'Open', "
- SQL = SQL + "'" & Request.Form("level") & "', '" & Request.Form("machine") & "', '" & DT & "')"
- con.Execute(SQL)
- con.Close
- Dim RS, TNumber
- Set RS = Server.CreateObject("ADODB.Recordset")
- con.Open Connect
- SQL = "SELECT TicketID FROM Tickets ORDER BY TicketID DESC"
- RS.Open SQL, Connect
- TNumber = Session.Contents("CompanyShort") + cSTR(RS.Fields("TicketID"))
- SQL = "UPDATE Tickets SET TicketNumber = ('" & TNumber & "') WHERE TicketID LIKE '" & RS.Fields("TicketID") & "'"
- con.Execute(SQL)
- %>
- <%
- '===================MAIL SENT TO TECH======================================
- '-----------Create Instance of Object--------------------------------------
- Set Mail = Server.CreateObject("Persits.MailSender")
- '--------------------------------------------------------------------------
- '-----------Set Mail Properties--------------------------------------------
- Mail.Host = "63.149.205.175" ' Specify a valid SMTP server
- Mail.From = "mailer@e4lv.com" ' Specify sender's address
- '--------------------------------------------------------------------------
- '-----------Gather Info From Form------------------------------------------
- Dim UN, UE, UM
- UN = Request.Form("name")
- UE = Request.Form("email")
- UM = "<html><body>"
- UM = UM + "Client Name: <b>" & Request.Form("name") & "</b><br>"
- UM = UM + "Company: <b>" & Session.Contents("Company") & "</b><br>"
- UM = UM + "Client E-mail: <b>" & Request.Form("email") & "</b><br>"
- UM = UM + "Client Phone Number: <b>" & PhoneNumber & "</b><br>"
- UM = UM + "Machine Name: <b>" & Request.Form("machine") & "</b><br>"
- UM = UM + "Trouble Level: <b>" & Request.Form("level") & "</b><br>"
- UM = UM + "Date and Time Submitted: <b>" & Date & " - " & Time & "</b><br>"
- UM = UM + "Ticket Number: <b>" & TNumber & "</b><br>"
- UM = UM + "Problem(s):<br><b>" & Request.Form("trouble") & "</b>"
- UM = UM + "</body></html>"
- '--------------------------------------------------------------------------
- '------------Put together message with name, e-mail and body---------------
- Mail.FromName = UN 'Specify sender's name
- Mail.AddAddress "tony@e4lv.com"
- Mail.AddAddress "elainev@e4lv.com"
- Mail.AddAddress "chris@e4lv.com"
- Mail.AddAddress "billm@e4lv.com"
- Mail.Subject = "TROUBLE TICKET - Company [" & Session.Contents("Company") & "] Trouble Level [" & Request.Form("level") & "]"
- Mail.Body = UM 'The body of the message
- Mail.IsHTML = True
- '--------------------------------------------------------------------------
- '------------Check for errors----------------------------------------------
- On Error Resume Next
- Mail.Send 'Sends the e-mail
- Set Mail = Nothing
- '================================END MAIL SENT TO TECH===================================
- '================================MAIL SENT TO Client=====================================
- '-----------Create Instance of Object--------------------------------------
- Set Mail = Server.CreateObject("Persits.MailSender")
- '--------------------------------------------------------------------------
- '-----------Set Mail Properties--------------------------------------------
- Mail.Host = "63.149.205.175" ' Specify a valid SMTP server
- Mail.From = "mailer@e4lv.com" ' Specify sender's address
- '--------------------------------------------------------------------------
- '-----------Gather Info From Form------------------------------------------
- Dim UMM
- UMM = "<html><body>"
- UMM = UMM + Request.Form("name") + ",<br><br>"
- UMM = UMM + "This E-mail is to notify you that we have recieved your request for services."
- 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."
- UMM = UMM + "<br><br><br>Radical Networks<br>Office #: 366-1817"
- '--------------------------------------------------------------------------
- '------------Put together message with name, e-mail and body---------------
- Mail.FromName = "Radical Networks" 'Specify sender's name
- Mail.AddAddress Request.Form("email")
- Mail.Subject = "RE: Radical Networks Trouble Ticket - Ticket Number [" & TNumber & "]"
- Mail.Body = UMM 'The body of the message
- Mail.IsHTML = True
- '--------------------------------------------------------------------------
- '------------Check for errors----------------------------------------------
- On Error Resume Next
- Mail.Send 'Sends the e-mail
- Set Mail = Nothing
- '================================END MAIL SENT TO CLIENT===================================
- %>
- <table width="100%" height="100%" cellpadding="0" cellspacing="0" align="center">
- <tr>
- <td align="center">
- <table width="300" height="400" cellpadding="0" cellspacing="0" bgcolor="#F4F4F4">
- <tr>
- <td colspan="3" height="21" width="300"><img src="images/newticket_03.gif" width="300" height="21"></td>
- </tr>
- <tr>
- <td width="1" height="400"><img src="images/newticket_05.gif" width="1" height="400"></td>
- <td width="298" height="398">
- <table width="298" height="400" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td height="15"></td>
- </tr>
- <tr>
- <td height="5" align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">Thank you for submitting your Trouble Ticket.
- Your ticket Number is <b><%=TNumber%></b>. Please keep this Ticket Number Handy, we will be contacting you shortly
- about the issue.</font></td>
- </tr>
- <tr>
- <td height="5" align="center"><font face="Verdana, Arial" size="-1"><b><a href="logoff.asp">Log Off</a></b></font></td>
- </tr>
- <tr>
- <td height="100%"></td>
- </tr>
- </table>
- </td>
- <td align="left" width="1" height="400"><img src="images/newticket_07.gif" width="1" height="400"></td>
- </tr>
- <tr>
- <td colspan="3" width="300" height="1"><img src="images/newticket_08.gif" width="300" height="1"></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <% End If %>
Add Comment
Please, Sign In to add comment