KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/highlandlabs/cqi-bin/ALFA_DATA/alfasymlink/root/domains/howardbender2/jobs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/highlandlabs/cqi-bin/ALFA_DATA/alfasymlink/root/domains/howardbender2/jobs/checkout-1.asp
<%@ Language=VBScript %>

<% Response.Expires = 0 %>
<!--#include file=DataStore.asp-->
<!--#include file="_ScriptLibrary/adovbs.inc"-->
<%
' *** This version is for all jobs as FREE jobs ***
	Dim i 'Counter
	Dim iTotal
	
	Dim sTitle 'Page Title
	sTitle = "Job Cart"
	
	Dim sUserID 'User ID
	sUserID = request("userid")
	
	if sUserID = "" then Response.Redirect "default.asp"
	
	Dim sName, sEmail, sSchool  ' For email
	
	Dim sSQL 'SQL Statement
	sSQL = "SELECT itemid, title, minsalary, SCHOOL.name, price FROM CART INNER JOIN SCHOOL ON CART.school_id = SCHOOL.schoolid WHERE user_id = '" & sUserID & "';"
	
	Dim cnSchoolJobs ' Connection Object
	Set cnSchoolJobs = Server.CreateObject("ADODB.Connection")
	cnSchoolJobs.Open sConnect
	
	Dim rsJobsInCart 'Recordset Object
	Set rsJobsInCart = Server.CreateObject("ADODB.Recordset")
	Set rsJobsInCart = cnSchoolJobs.Execute(sSQL)
	
	Dim rsSchool
	Set rsSchool = Server.CreateObject("ADODB.Recordset")		'Recordset object

	'open the SCHOOL table
	rsSchool.Open "SCHOOL", cnSchoolJobs, 0, 3
	
	'filter the recordset
	rsSchool.Filter = "manager_id = '" & sUserID & "'"
	
	Dim objConn
	Set objConn = server.CreateObject("ADODB.Connection")	'Connection object
	'open the connection object
	if objConn.State = 0 then	'only open if the connection is closed
		objConn.Open sConnect
	end if
	
	Dim rsManager
	Set rsManager = Server.CreateObject("ADODB.Recordset")
	
	'and open the MANAGER table
	rsManager.Open "MANAGER", objConn, 0, 3

	'Filter the recordset and verify if information has already been saved with this user id
	rsManager.Filter = "managerid = '" & sUserID & "'"
	
	'copy records corresponding to userid in cart, to jobs table
	Dim rsJobs
	Dim rsCart

	Set rsCart = server.CreateObject("ADODB.Recordset") 	'Recordset object
	Set rsJobs = server.CreateObject("ADODB.Recordset")		'Recordset object

	'open the CART table
	rsCart.Open "CART", cnSchoolJobs, 3, 3

	'open the JOB table
	rsJobs.Open "SELECT * FROM JOB", cnSchoolJobs, 3, 3

	'Filter the recordset
	rsCart.Filter = "user_id = '" & sUserID & "'"

	If Not rsCart.EOF then 
	rsCart.MoveFirst
	
	'copy corresponding records in cart to jobs table
	Do While Not rsCart.EOF
		rsJobs.AddNew
		rsJobs("school_id") = rsCart("school_id")
		rsJobs("title") = rsCart("title")
		rsJobs("start_date") = rsCart("start_date")
		rsJobs("expertise")= rsCart("expertise")
		rsJobs("degree_req") = rsCart("degree_req")
		rsJobs("special_qual") = rsCart("special_qual")
		rsJobs("job_description") = rsCart("job_description")
		rsJobs("minsalary") = rsCart("minsalary")
		rsJobs("maxsalary") = rsCart("maxsalary")
		rsJobs("peryrhr") = rsCart("peryrhr")
		rsJobs("contact_name") = rsCart("contact_name")
		rsJobs("contact_areacode") = rsCart("contact_areacode")
		rsJobs("contact_phone") = rsCart("contact_phone")
		rsJobs("contact_email") = rsCart("contact_email")
		rsJobs("date_submitted")= Date()
		rsJobs("graceperiod")= rsCart("graceperiod")
		rsJobs("price") = rsCart("price")
		rsJobs("active")= -1
		rsJobs.Update
		
		rsCart.MoveNext
	Loop
	
	'delete related records in cart.
	cnSchoolJobs.Execute "DELETE * FROM CART WHERE user_id = '" & sUserID & "'"
	
	end if 'end test empty cart
	
	'Close and release recordset
	rsJobs.Close
	
	'close and release recordset
	rsCart.Close
	Set rsCart = Nothing


	cnSchoolJobs.Close
	Set cnSchoolJobs = Nothing
	
	' Email area
	'set the to address
sSchool = "SELECT SCHOOL.* FROM (MANAGER INNER JOIN SCHOOL ON MANAGER.managerid = SCHOOL.manager_id) WHERE MANAGER.managerid='" & sUserID & "';"

rsJobs.Open sSchool, objConn, adOpenStatic

  'Instantiate the SMTP Mailer address
Set sendmail = Server.CreateObject("SMTPsvg.Mailer")

'put the webmaster address here
sendmail.FromName = "Dr. Howard J. Bender"
sendmail.FromAddress = "[email protected]"

sName = rsJobs("contact_name")
sEmail = rsJobs("contact_email")
sendmail.AddRecipient sName, sEmail

'Set remote host (SMTP) Host
sendmail.RemoteHost = "smtp.rcn.com"

'Set the return receipt flag to false
sendmail.ReturnReceipt = false

'send the confirm read flag to false
sendmail.ConfirmRead = false

'Enter the subject of your mail here
sendmail.Subject = "Please Use School Jobs Realtors.  They paid for your ads!"

 'This is the content of thr message.
sendmail.BodyText = "Dear Colleague �" & vbCrlf & vbCrlf _
& "Help us keep School Jobs free for you." & vbCrlf & vbCrlf _
& "Local realtors who like schools and appreciate education advertise with us." & vbCrlf _
& "They hope your applicants will contact them for housing." & vbCrlf & vbCrlf _
& "Those realtors pay our bills, so you can advertise your vacancies for free." & vbCrlf & vbCrlf _
& "Please refer folks looking for housing to them.  Here's how:" & vbCrlf & vbCrlf _
& "Go to www.school-jobs.net and look at one of your jobs." & vbCrlf _
& "Then click ""For housing near (city), click here"" " & vbCrlf & vbCrlf _
& "Those realtors want to help themselves by helping you." & vbCrlf _
& "If we all help each other, we'll all win." & vbCrlf & vbCrlf _
& "Cheers," & vbCrlf & vbCrlf _
& "Dr. Howard J. Bender" & vbCrlf _
& "President" & vbCrlf _
& "Education Process Improvement Center, Inc." & vbCrlf _
& "[email protected]"

'this sets mail priority.... 5=low 3=normal 1=high
sendmail.Priority = 2

'send mail
sendmail.SendMail

Set sendmail = Nothing
  
  rsJobs.Close
  Set rsJobs = Nothing
	
	rsManager.close
	Set rsManager = Nothing
	
	response.redirect "listjobs.asp?userid=" & sUserID
%>



Anon7 - 2021