home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
bombers.k12.ar.us
/
bombers.k12.ar.us.tar
/
bombers.k12.ar.us
/
subs
/
request.asp
< prev
next >
Wrap
Text File
|
2004-02-04
|
5KB
|
126 lines
<%@ Language=VBScript %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Substitute request processor</title>
</head>
<body>
<p>
The following information has been entered into the system:
<p>
<%
Response.Write("<b>" & "Name: " & "</b>" & Request.Form("txtName") & "<br>")
Response.Write("<b>" & "School: " & "</b>" & Request.Form("txtSchool") & "<br>")
Response.Write("<b>" & "Reason for absence: " & "</b>" & Request.Form("txtReason") & "<br>")
Response.Write("<b>" & "Length of absence: " & "</b>" & Request.Form("txtLength") & "<br>")
Response.Write("<b>" & "Date of absence: " & "</b>" & Request.Form("txtMonth") & " " & Request.Form("txtDay") & ", " & Request.Form("txtYear")& " ")
Response.Write(" through " & Request.Form("txtMonth2") & " " & Request.Form("txtDay2") & ", " & Request.Form("txtYear2") & "<br>")
Response.Write("<b>" & "Requested substitute 1: " & "</b>" & Request.Form("txtSub1") & "<br>")
Response.Write("<b>" & "Requested substitute 2: " & "</b>" & Request.Form("txtSub2") & "<br>")
Response.Write("<b>" & "Requested substitute 3: " & "</b>" & Request.Form("txtSub3") & "<br>")
Response.Write("<b>" & "Notes/arrival time/extra duties: " & "</b>" & Request.Form("txtNotes") & "<br>")
%>
<br>
An email has been seen to Sub Central containing your request. <br>
Thank you.
</body>
</html>
<%
Dim myCDONTSMail
Dim strFrom
Dim strTo
Dim strName
Dim strSchool
'Dim strDate
Dim strMonth
Dim strDay
Dim strYear
Dim strMonth2
Dim strDay2
Dim Year2
Dim strReason
Dim strSub1
Dim strSub2
Dim strSub3
Dim strSubject
Dim strBody
Dim strLength
Dim strNotes
'52
strFrom="autoreply@mtnhome.k12.ar.us"
strTo="mblum@mtnhome.k12.ar.us"
strName=Request.Form("txtName")
strSchool=Request.Form("txtSchool")
strReason=Request.Form("txtReason")
strLength=Request.Form("txtLength")
strMonth=Request.Form("txtMonth")
strDay=Request.Form("txtDay")
strYear=Request.Form("txtYear")
strMonth2=Request.Form("txtMonth2")
strDay2=Request.Form("txtDay2")
strYear2=Request.Form("txtYear2")
strSub1=Request.Form("txtSub1")
strSub2=Request.Form("txtSub2")
strSub3=Request.Form("txtSub3")
strNotes=Request.Form("txtNotes")
strSubject = "Request for substitute"
strBody="The following substitute request has been submitted:" & chr(13)
strBody=strbody & "Name: " & strName & Chr(13)
strBody = strBody & "School/Department: " & strSchool & chr(13)
strBody = strBody & "Reason for absence: " & strReason & chr(13)
strBody = strBody & "Length of absence: " & strLength & chr(13)
strBody = strBody& "Date: " & strMonth & " " & strDay & ", " & strYear & chr(13)
strBody = strBody & " Through: " & strMonth2 & " " & strDay2 & ", " & strYear2 & chr(13)
strBody = strBody & "First Requested Substitute: " & strSub1 & chr(13)
strBody = strBody & "Second Requested Substitute: " & strSub2 & chr(13)
strBody = strBody & "Third Requested Substitute: " & strSub3 & chr(13)
strBody = strBody & "Other Notes: " & strNotes & chr(13)
'81
'Create a new mail message object
Set myCDONTSMail = CreateObject("CDONTS.NewMail")
'Send the new mail message object by passing the parameter
'defined above
myCDONTSMail.Send strFrom,strTo,StrSubject,strBody
'Set the new mail message object to Nothing to free resources
Set myCDONTSMail = Nothing
'91
'Now for the database part of our show
'Variable declaration
' myConnString = Connection string to database
' myConnection = The database connection object
' mySQL = the query string to be used
Dim myConnString
Dim myConnection
Dim mySQL
'100
myConnString = Application("Request_ConnectionString")
Set myConnection = Server.CreateObject("ADODB.Connection")
myConnection.Open myConnString
'Write information to database
mySQL= "INSERT INTO results "
mySQL= mySQL & "(NAME,SCHOOL,REASON,LENGTH,MONTH,DAY,YEAR,MONTH2,DAY2,YEAR2,SUB1,SUB2,SUB3,NOTES) "
mySQL= mySQL & "VALUES ('" & Request.Form("txtName") & "','"
mySQL= mySQL & Request.Form("txtSchool") & "','"
mySQL= mySQL & Request.Form("txtReason") & "','"
mySQL= mySQL & Request.Form("txtLength") & "','"
mySQL= mySQL & Request.Form("txtMonth") & "','"
mySQL= mySQL & Request.Form("txtDay") & "','"
mySQL= mySQL & Request.Form("txtYear") & "','"
mySQL= mySQL & Request.Form("txtMonth2") & "','"
mySQL= mySQL & Request.Form("txtDay2") & "','"
mySQL= mySQL & Request.Form("txtYear2") & "','"
mySQL= mySQL & Request.Form("txtSub1") & "','"
mySQL= mySQL & Request.Form("txtSub2") & "','"
mySQL= mySQL & Request.Form("txtSub3") & "','"
mySQL= mySQL & Request.Form("txtNotes") & "')"
'101
myConnection.Execute mySQL
myConnection.Close
Set myConnection = Nothing
%>