|
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
%>
<%
Dim sTitle
sTitle = "Post a Job"
%>
<!--#include file="_ScriptLibrary/adovbs.inc"-->
<!--#include file="datastore.asp"-->
<%
Dim sUserID
Dim sSchoolID
sUserID = trim(Request("userid"))
sSchoolID = trim(Request("schoolid"))
'check if userid is empty. if empty redirect to login screen
if sUserID = "" AND sSchoolID = "" then Response.Redirect "login.asp?menu=school"
Dim objConn
Dim rsSchool
Set objConn = server.CreateObject("ADODB.Connection") 'Connection object
Set rsSchool = server.CreateObject("ADODB.Recordset") 'Recordset object
'open the connection object
objConn.Open sConnect
'open the SCHOOL table
rsSchool.Open "SCHOOL", objConn, 0, 3
'filter the recordset
rsSchool.Filter = "manager_id = '" & sUserID & "' AND schoolid = " & sSchoolID
if rsSchool.EOF = false then %>
<!--#include file=header.asp-->
<!--#include file=top.asp-->
<script language=JavaScript>
<!--
function VerifyData()
{
var msgError="";
// Check for empty field - Job Title
if (document.frmPostJob.txtJobTitle.value == "")
{
msgError = msgError + "\n*Job Title is a required field."
}
// Check for empty field - Area of Expertise
if (document.frmPostJob.cboExpertise.options[document.frmPostJob.cboExpertise.selectedIndex].value == "0")
{
msgError = msgError + "\n*Area of Expertise is a required field."
}
// Check for empty field - Start date
if (document.frmPostJob.txtStartDate.value == "")
{
msgError = msgError + "\n*Start Date is a required field."
}
// Check for empty field - Degree
if (document.frmPostJob.cboEducation.options[document.frmPostJob.cboEducation.selectedIndex].value == "0")
{
msgError = msgError + "\n*Degree is a required field."
}
// Check for empty field - Job Description
if (document.frmPostJob.txtJobDesc.value == "")
{
msgError = msgError + "\n*Job Description is a required field."
}
// Check for empty field - Salary
if (document.frmPostJob.txtLowSalary.value == "")
{
msgError = msgError + "\n*Salary is a required field."
}
var digits="0123456789"
var temp
for (var i=0;i<document.frmPostJob.txtLowSalary.value.length;i++){
temp=document.frmPostJob.txtLowSalary.value.substring(i,i+1)
if (digits.indexOf(temp)==-1){
alert("Salary must be numeric !")
return false
}
}
// Check for empty field - Duration
if (document.frmPostJob.cboDuration.options[document.frmPostJob.cboDuration.selectedIndex].value == "0")
{
msgError = msgError + "\n*Duration is a required field."
}
// Check for empty field - Contact Name
if (document.frmPostJob.txtContactName.value == "")
{
msgError = msgError + "\n*Contact Name is a required field."
}
// Check for empty field - Contact phone
if (document.frmPostJob.txtArea.value == "")
{
msgError = msgError + "\n*Area Code is a required field."
}
// Check for empty field - Contact phone
if (document.frmPostJob.txtPhone.value == "")
{
msgError = msgError + "\n*Phone Number is a required field."
}
//
if (msgError != "")
{
alert("Please fill in all required fields...\n" + msgError)
return false;
}
else
{
return true;
}
}
//-->
</script>
<center>
<%
Dim bNew
Select Case Request.QueryString("action")
Case "addnew"
bNew = True
%>
<h2 align=center><font color="#FF0000">Post a Job</font></h2>
<h3 align=center><font color="#A52A2A">Please note that a fee will be requested for each job listing.</font></h3><p>
<font color=red>* Indicates a required field.</font><p>
Please add the following information for the job you are advertising.
<form action="addjob.asp?userid=<%=sUserID%>&schoolid=<%=sSchoolID%>" method="post" name="frmPostJob" onSubmit="return VerifyData()">
<input type="hidden" name="JobID" value="">
<%
Case "edit"
Dim rsJobs, sSQL
Set rsJobs = Server.CreateObject("ADODB.Recordset")
sSQL = "SELECT * FROM JOB WHERE jobid = " & Request("job") & ";"
rsJobs.open sSQL, objConn, 0, 3, adCmdText
bNew = False
%>
<h2 align=center color=red>Edit Job Entry</h2>
<font color=red>* Indicates a required field.</font><p>
Please add the following information for the job you are advertising.
<form action="addjob.asp?userid=<%=sUserID%>&schoolid=<%=sSchoolID%>" method="post" name="frmPostJob" onSubmit="return VerifyData()">
<input type="hidden" name="JobID" value="<%= request("job")%>">
<%end select%>
<table width=600 border=0 cellspacing=5 cellpadding=0>
<tr><td><font size="5" color="red"><b>*</b></font></td><td><b>Job Title</b></td><td><input name="txtJobTitle" id="txtJobTitle" type="text" size="30" value="<% if not bNew then response.write rsJobs("title") end if%>"></td></tr>
<tr><td><font size="5" color="red"><b>*</b></font></td><td><b>Area of Expertise</b></td><td><select name=cboExpertise size=1>
<option value="0"> -- Select Area -- </option>
<option value="1"<% if not bNew then if rsJobs("expertise") = "1" then Response.Write " SELECTED" else Response.Write "" end if%>>Administration</option>
<option value="2"<% if not bNew then if rsJobs("expertise") = "2" then Response.Write " SELECTED" else Response.Write "" end if%>>Computers & Technology</option>
<option value="3"<% if not bNew then if rsJobs("expertise") = "3" then Response.Write " SELECTED" else Response.Write "" end if%>>Desktop Publishing & Multimedia</option>
<option value="4"<% if not bNew then if rsJobs("expertise") = "4" then Response.Write " SELECTED" else Response.Write "" end if%>>Early Learning</option>
<option value="5"<% if not bNew then if rsJobs("expertise") = "5" then Response.Write " SELECTED" else Response.Write "" end if%>>Financial & Business</option>
<option value="6"<% if not bNew then if rsJobs("expertise") = "6" then Response.Write " SELECTED" else Response.Write "" end if%>>Fine Arts</option>
<option value="7"<% if not bNew then if rsJobs("expertise") = "7" then Response.Write " SELECTED" else Response.Write "" end if%>>Foreign Language & ESOL</option>
<option value="8"<% if not bNew then if rsJobs("expertise") = "8" then Response.Write " SELECTED" else Response.Write "" end if%>>General Education</option>
<option value="9"<% if not bNew then if rsJobs("expertise") = "9" then Response.Write " SELECTED" else Response.Write "" end if%>>Health & Physical Education</option>
<option value="10"<% if not bNew then if rsJobs("expertise") = "10" then Response.Write " SELECTED" else Response.Write "" end if%>>History, Geography & Social Studies</option>
<option value="11"<% if not bNew then if rsJobs("expertise") = "11" then Response.Write " SELECTED" else Response.Write "" end if%>>Language Arts</option>
<option value="12"<% if not bNew then if rsJobs("expertise") = "12" then Response.Write " SELECTED" else Response.Write "" end if%>>Library, Media Science & Reference</option>
<option value="13"<% if not bNew then if rsJobs("expertise") = "13" then Response.Write " SELECTED" else Response.Write "" end if%>>Mathematics Education</option>
<option value="14"<% if not bNew then if rsJobs("expertise") = "14" then Response.Write " SELECTED" else Response.Write "" end if%>>Measurement & Testing</option>
<option value="15"<% if not bNew then if rsJobs("expertise") = "15" then Response.Write " SELECTED" else Response.Write "" end if%>>Music & Performing Arts</option>
<option value="16"<% if not bNew then if rsJobs("expertise") = "16" then Response.Write " SELECTED" else Response.Write "" end if%>>Professional Training</option>
<option value="17"<% if not bNew then if rsJobs("expertise") = "17" then Response.Write " SELECTED" else Response.Write "" end if%>>Psychology & Counseling</option>
<option value="18"<% if not bNew then if rsJobs("expertise") = "18" then Response.Write " SELECTED" else Response.Write "" end if%>>Religious Education</option>
<option value="19"<% if not bNew then if rsJobs("expertise") = "19" then Response.Write " SELECTED" else Response.Write "" end if%>>Research & Grants</option>
<option value="20"<% if not bNew then if rsJobs("expertise") = "20" then Response.Write " SELECTED" else Response.Write "" end if%>>Science Education</option>
<option value="21"<% if not bNew then if rsJobs("expertise") = "21" then Response.Write " SELECTED" else Response.Write "" end if%>>Social Sciences</option>
<option value="22"<% if not bNew then if rsJobs("expertise") = "22" then Response.Write " SELECTED" else Response.Write "" end if%>>Special Education</option>
<option value="23"<% if not bNew then if rsJobs("expertise") = "23" then Response.Write " SELECTED" else Response.Write "" end if%>>Web-Based Education</option>
</select>
</td></tr>
<tr><td><font size="5" color="red"><b>*</b></font></td><td><b>Start Date</b></td><td><input name="txtStartDate" id="txtStartDate" type="text" value="<% if not bNew then response.write rsJobs("start_date") end if%>" size="30"></td></tr>
<tr><td><font size="5" color="red"><b>*</b></font></td><td><b>Degree</b></td><td><select name="cboEducation" id="cboEducation" size="1">
<option value="0"> -- Select Degree --</option>
<option value="1"<% if not bNew then if rsJobs("degree_req") = "1" then Response.Write " SELECTED" else Response.Write "" end if%>>High School</option>
<option value="2"<% if not bNew then if rsJobs("degree_req") = "2" then Response.Write " SELECTED" else Response.Write "" end if%>>Bachelor Degree</option>
<option value="3"<% if not bNew then if rsJobs("degree_req") = "3" then Response.Write " SELECTED" else Response.Write "" end if%>>Master Degree</option>
<option value="4"<% if not bNew then if rsJobs("degree_req") = "4" then Response.Write " SELECTED" else Response.Write "" end if%>>Doctorate</option>
<option value="5"<% if not bNew then if rsJobs("degree_req") = "5" then Response.Write " SELECTED" else Response.Write "" end if%>>Other</option>
</select>
</td></tr>
<tr><td><font size="5" color="red"><b>*</b></font></td><td><b>Job Description</b></td><td><textarea name="txtJobDesc" id="txtJobDesc" type="text" cols="30" rows=3 wrap="virtual"><%if not bNew then response.write rsJobs("job_description") end if%></textarea></td></tr>
<tr><td></td><td><b>Special Qualifications</b></td><td><input name="txtSpecialQual" id="txtSpecialQual" type="text" value="<% if not bNew then response.write rsJobs("special_qual") end if%>" size="30" maxlength="50"></td></tr>
<tr>
<td>
<font size="5" color="red"><b>*</b></font>
</td>
<td>
<b>Salary</b>
</td>
<td>
<table cellspacing=1 cellpadding=2 border=0>
<tr>
<td><b>Min $</b> <input name="txtLowSalary" id="txtLowSalary" value="<% if not bNew then response.write rsJobs("minsalary") end if%>" size="8" type="text"> - <b>Max $</b> <input name="txtHighSalary" id="txtHighSalary" value="<% if not bNew then response.write rsJobs("maxsalary") end if%>" size="8" type="text"></td>
<td>
<input type="radio" name="radPerYrHr" value="1"<% if not bNew then if rsJobs("peryrhr") = "1" then Response.Write " CHECKED" else Response.Write "" end if%> tabindex="0" <%if bNew then Response.Write "CHECKED"%>> <b>Per Year</b><br>
<input type="radio" name="radPerYrHr" value="2"<% if not bNew then if rsJobs("peryrhr") = "2" then Response.Write " CHECKED" else Response.Write "" end if%> tabindex="1"> <b>Per Hour</b>
</td>
</tr>
</table>
</td></tr>
<tr><td><font size="5" color="red"><b>*</b></font></td><td><b>Listing Fee</b></td><td><select name="cboDuration" id="cboDuration" size="1">
<option value="0"> -- Select Duration --</option>
<option value="30"<% if not bNew then if rsJobs("graceperiod") = "30" then Response.Write " SELECTED" else Response.Write "" end if%>>30 Days - $25</option>
<option value="60"<% if not bNew then if rsJobs("graceperiod") = "60" then Response.Write " SELECTED" else Response.Write "" end if%>>60 Days - $45</option>
<option value="90"<% if not bNew then if rsJobs("graceperiod") = "90" then Response.Write " SELECTED" else Response.Write "" end if%>>90 Days - $60</option>
</select>
</td></tr>
<tr><td><font size="5" color="red"><b>*</b></font></td><td><b>Contact Name:</b></td><td><input name="txtContactName" id="txtContactName" size="30" type="text" value="<% if not bNew then response.write rsJobs("contact_name") else response.write rsSchool("contact_name") end if%>"></td></tr>
<tr><td><font size="5" color="red"><b>*</b></font></td><td><b>Contact Phone:</b></td><td><input name="txtArea" id="txtArea" size="3" type="text" maxlength="3" value="<% if Not bNew then response.write rsJobs("contact_areacode") else response.write rsSchool("contact_areacode") end if%>"><input name="txtPhone" id="txtPhone" size="10" type="text" value="<%if Not bNew then response.write rsJobs("contact_phone") else response.write rsSchool("contact_phone") end if%>"></td></tr>
<tr><td> </td><td><b>Contact Email:</b></td><td><input name="txtContactEmail" id="txtContactEmail" size="30" type="text" value="<% if Not bNew then response.write rsJobs("contact_email") else response.write rsSchool("contact_email") end if%>"></td></tr>
<tr><td> </td><td></td><td><input name=txtUserID id=txtUserID type=hidden size=30 value="<%=sUserID %>"></td></tr>
<tr><td> </td><td> </td><td><% if not bNew then %><input type="submit" value="Delete Job" id="DeleteJob" name="DeleteJob"><% else %><input type="submit" value="Add Another Job" id="AnotherJob" name="AnotherJob"><%end if%>
<% if not bNew then %><input type="submit" value="Update" id="Update" name="Update"><%else%><input type="Submit" value="Done" id="CheckOut" name="CheckOut"><%end if%> <input type="reset" value="Reset" id="ResetFields" name="ResetFields"></td></tr>
</table>
</form>
</center>
<!--#include file=bottom.asp-->
<!--#include file=footer.asp-->
<% else
response.redirect "login.asp?menu=school"
end if
if not bNew then
rsJobs.Close
Set rsJobs = Nothing
end if
rsSchool.close
Set rsSchool = Nothing
objConn.close
Set objConn = Nothing
%>