|
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 : |
<%@ Language=VBScript %>
<% Option Explicit %>
<!--#include file="_ScriptLibrary/adovbs.inc"-->
<!--#include file="datastore.asp"-->
<%
Dim sUserID
sUserID = Trim(Request("userid"))
Dim sSchoolID
sSchoolID = Trim(Request("schoolid"))
if sUserID = "" then Response.Redirect "login.asp?menu=school"
Dim objConn
Dim rsJobs
Dim bNew
Set objConn = server.CreateObject("ADODB.Connection") 'Connection object
Set rsJobs = server.CreateObject("ADODB.Recordset") 'Recordset object
'open the connection object
objConn.Open sConnect
if request.form("AnotherJob") <> "" then
'open the CART table
rsJobs.Open "CART", objConn, 0, 3, adCmdTable
else
if request.form("CheckOut") <> "" then
'open the CART table
rsJobs.Open "CART", objConn, 0, 3, adCmdTable
else
'open the JOB table
rsJobs.Open "JOB", objConn, 0, 3, adCmdTable
end if
end if
if request.form("DeleteJob") <> "" then
rsJobs.Filter = "jobid = " & request("JobID")
if not rsJobs.EOF then rsJobs.Delete
rsJobs.Close
Set rsJobs = Nothing
objConn.Close
Set objConn = Nothing
response.redirect "listjobs.asp?userid=" & sUserID
else
if Request.form("JobID") = "" then
bNew = True
rsJobs.AddNew
else
rsJobs.Filter = "jobid = " & request.form("JobID")
bNew = False
end if
if (Request.Form("txtUserID") <> "") and (Request.Form("txtJobTitle") <> "") and _
(Request.Form("cboExpertise") <> "0") and (Request.Form("txtStartDate") <> "") and _
(Request.Form("cboEducation") <> "0") and (Request.Form("txtJobDesc") <> "") and _
(Request.Form("txtLowSalary") <> "") and (Request.Form("cboDuration") <> "0") and (Request.Form("txtArea") <> "") and _
(Request.Form("txtPhone") <> "") and (Request.Form("txtContactName") <> "") then
if bNew then
'entry goes in the cart
rsJobs("user_id") = sUserID
rsJobs("school_id") = sSchoolID
'else
'entry in JOB table is updated
' rsJobs("school_id") = sSchoolID
end if
rsJobs("title") = Request.Form("txtJobTitle")
rsJobs("expertise") = Request.Form("cboExpertise")
rsJobs("start_date") = Request.Form("txtStartDate")
rsJobs("degree_req") = Request.Form("cboEducation")
rsJobs("special_qual") = Request.Form("txtSpecialQual")
rsJobs("job_description") = Request.Form("txtJobDesc")
rsJobs("minsalary") = Request.Form("txtLowSalary")
if Request.Form("txtHighSalary") <> "" then
rsJobs("maxsalary") = Request.Form("txtHighSalary")
else
rsJobs("maxsalary") = Request.Form("txtLowSalary")
end if
rsJobs("peryrhr") = Request.Form("radPerYrHr")
rsJobs("graceperiod") = Request.Form("cboDuration")
Select Case Request.Form("cboDuration")
Case 30
rsJobs("price") = 25
Case 60
rsJobs("price") = 45
Case 90
rsJobs("price") = 60
Case Else
rsJobs("price") = 25
End Select
rsJobs("contact_name") = Request.Form("txtContactName")
rsJobs("contact_areacode") = Request.Form("txtArea")
rsJobs("contact_phone") = Request.Form("txtPhone")
rsJobs("contact_email") = Request.Form("txtContactEmail")
rsJobs.Update
if bNew then rsJobs.Requery
rsJobs.Close
Set rsJobs = Nothing
objConn.Close
Set objConn = Nothing
else
response.redirect "postjob.asp?action=edit&job=" & rsJobs("jobid") & "&userid=" & sUserID
end if
end if
if Request("CheckOut") <> "" then response.redirect "checkout.asp?userid=" & sUserID
if Request("AnotherJob") <> "" then response.redirect "postjob.asp?action=addnew&userid=" & sUserID & "&schoolid=" & sSchoolID
if Request("Update") <> "" then response.redirect "listjobs.asp?userid=" & sUserID
%>