<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/connection1.asp" -->
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%>
<%
If (CStr(Request("MM_insert")) = "form1") Then
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_connection1_STRING
MM_editCmd.CommandText = "INSERT INTO feedback (FirstName, Surname, Email, FeedbackNote, DisplayThread) VALUES (?, ?, ?, ?, ?)"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 50, Request.Form("FirstName")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 50, Request.Form("Surname")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 50, Request.Form("Email")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 203, 1, 1073741823, Request.Form("FeedbackNote")) ' adLongVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 10, MM_IIF(Request.Form("DisplayThread"), "Y", "N")) ' adVarWChar
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "index.html"
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
End If
%>
<%
If request.form("submit") = "submit" Then
EmailTo = request.form("Email")
SenderName = request.form("FirstName")
SenderSurname = request.form("Surname")
FeedBody = request.form("FeedbackNote")
Dim objEmail
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "[email protected]"
objEmail.ReplyTo = "[email protected]"
objEmail.To = EmailTo
'objEmail.To = "[email protected]"
objEmail.Subject = SenderName '& " " & SenderSurname & " - " & "XCSA - Intranet Feedback form"
objEmail.TextBody = FeedBody
With objEmail.Configuration.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.vodamail.co.za"
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "[email protected]"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxxx"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
objEmail.Send
Set objEmail = Nothing
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Feedback</title>
<link href="assets/css/SiteGlobal.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body,td,th {
font-family: Tahoma, Geneva, sans-serif;
}
-->
</style></head>
<body leftmargin="0" topmargin="0">
<div class="HomeHeader"></div>
<div class="DivWrapper">
<div class="MainTable">
<p class="Date">comments & feedback</p>
<div class="SideNav">
<p class="SideNavHeads"><a href="index.html" class="SideNavLinks">» home</a> <a href="#" class="SideNavLinks">» viewable threads</a><a href="witbank/index.html" class="SideNavLinks"></a></p>
<p class="SideNavHeads">Related Items</p>
<p class="SideNavHeads"><a href="links.html" class="SideNavLinks">» links</a> <a href="#" class="SideNavLinks">» latest updates</a><a href="http://chhzrhsrv650/EN/Pages/default.aspx" class="SideNavLinks">» xstrata plc</a> <a href="search.html" class="SideNavLinks">» search</a></p>
<p class="SideNavHeads">Administration</p>
<p class="SideNavHeads"><a href="pages/admin/adm_login.asp" class="SideNavLinks">» it administration</a></p>
<p class="SideNavHeads"><a href="#"></a></p>
</div>
<p class="Heading1">Feedback</p>
<div class="MainInfo">
<p>Please give us your feedback on this intranet site. You can add suggestions, comments, something you want us to add or anything related to this intranet site. </p>
</div>
<div class="NormalText1">
<form action="<%=MM_editAction%>" method="post" name="form1" id="form1">
<table align="center">
<tr valign="baseline">
<td nowrap="nowrap" align="right">First Name:</td>
<td><input type="text" name="FirstName" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Surname:</td>
<td><input type="text" name="Surname" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">E-mail:</td>
<td><input type="text" name="Email" value="" size="32" /></td>
</tr>
<tr>
<td nowrap="nowrap" align="right" valign="top">Feedback / Comments:</td>
<td valign="baseline"><textarea name="FeedbackNote" cols="50" rows="5"></textarea></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Add to Public Threads:</td>
<td><input type="checkbox" name="DisplayThread" value="1" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><input type="submit" name="submit" value="submit" /></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1" />
</form>
<p> </p>
</div>
<p> </p>
</div>
<p class="Footer">Copyright © 2009 Xstrata Coal South Africa. All rights reserved | <a href="#" class="FooterLinks">Internet Usage Policy</a> | <a href="#" class="FooterLinks">IT Department</a> | <a href="#" class="FooterLinks">Credits</a></p>
</div>
</body>
</html>