suser_class!="Alumnus"){ print<<Sorry

You don't have access to this page. You must be an Alumnus to view the job postings area.

If you believe you've reached this page in error, please contact the management.

eof; include("inc/foot.php"); exit; } switch($action){ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //search //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// case"search": print<<

Search Job Postings

Use the form below to search through the job postings. You may search by region and/or keywords. Select the regions you would like to search and enter some keywords and click "Search" to continue. eof; $newaction="dosearch"; include("forms/searchForm.php"); break; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //dosearch //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// case"dosearch": if (($post->searchwords=="") &&($post->region_array=="")){ print<<

Search Job Postings

You must enter at least a keyword or a region to do a search. Please try again.

Use the form below to search through the job postings. You may search by region and/or keywords. Select the regions you would like to search and enter some keywords and click "Search" to continue. eof; $newaction="dosearch"; include("forms/searchForm.php"); include("inc/foot.php"); exit; } $region_array = array(); $region_array = $post->region_array; $searchArray = array(); $searchArray = explode(" ",$post->searchwords); if ($post->region_array != ""){ foreach ($region_array AS $key=>$region_id){ $sqlPart .= " OR region_id='$region_id'"; } } if ($post->search_words !=""){ foreach($searchArray AS $key=>$word){ $sqlPart .= " OR job_description LIKE ('$word') OR job_title LIKE ('$word')"; } } $sql = "SELECT * FROM jobs WHERE job_id is null "; $sql .=$sqlPart." ORDER BY post_date DESC"; $result = $db->query($sql); $numResults = $result->numRows(); if ($numResults == 0){ print<<

Search Job Postings

Your search resulted in 0 matches.. Please try again.

Use the form below to search through the job postings. You may search by region and/or keywords. Select the regions you would like to search and enter some keywords and click "Search" to continue. eof; $newaction="dosearch"; include("forms/searchForm.php"); include("inc/foot.php"); exit; } print<<

Search Results

Your search resulted in $numResults matched jobs.

Click here to search again.

Below is a list of all matched jobs. Click on the job title to view the job posting. eof; $printed=1; while ($result->fetchInto($row)){ if ($printed%2!=0){$class="list1";}else{$class="list2";} $time=new timeConversion; $time->dbdate = $row->post_date; $post_date=$time->datetime2short(); $time->dbdate=$row->modified; $modified=$time->timestamp2short(); if ($row->active ==1){ $status = "Open"; }else{ $status="Filled"; } $region = $db->getOne("SELECT CONCAT(state, ' - ', region_name) FROM regions WHERE region_id='$row->region_id'"); print<< eof; $printed++; } $result->free(); print<<
Job Title Status Post Date Modified Region
$row->job_title $status $post_date $modified $region
eof; break; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //homeregions //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// case"homeregion": $home_region = $db->getOne("SELECT home_region_id FROM users WHERE user_id='$s->suser_id'"); $homeRegion = $db->getOne("SELECT CONCAT(state, ' - ', region_name) FROM regions WHERE region_id='$home_region'"); print<<

Jobs in your Home Region

Your home region is set to $homeRegion.

Here are all the jobs posted in your home region.

Click here to view all jobs in your selected work regions.
Click here to edit your work/home regions.
Click here to search jobs.

eof; $printed=1; $result=$db->query("SELECT * FROM jobs WHERE region_id='$home_region' ORDER BY post_date DESC"); $numJobs=$result->numRows(); if ($numJobs==0){ print""; } while ($result->fetchInto($row)){ if ($printed%2!=0){$class="list1";}else{$class="list2";} $time=new timeConversion; $time->dbdate = $row->post_date; $post_date=$time->datetime2short(); $time->dbdate=$row->modified; $modified=$time->timestamp2short(); if ($row->active ==1){ $status = "Open"; }else{ $status="Filled"; } $region = $db->getOne("SELECT CONCAT(state, ' - ', region_name) FROM regions WHERE region_id='$row->region_id'"); print<< eof; $printed++; } $result->free(); print<<
Job Title Region Status Post Date Modified

There have been no new jobs posted in your home region.

Click here to view all the current jobs.

$row->job_title $region $status $post_date $modified
eof; break; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //search //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// case"workregions": $work_regions = $db->getOne("SELECT region_array FROM users WHERE user_id='$s->suser_id'"); $region_array=array(); $region_array = explode(",",$work_regions); $sqlpart.="region_id=null"; $printPart = ""; foreach($region_array as $key=>$region_id){ $regionName = $db->getOne("SELECT CONCAT(state, ' - ', region_name) FROM regions WHERE region_id='$region_id'"); $sqlpart .= " OR region_id='$region_id'"; $printPart .="$regionName
"; } $sql = "SELECT * FROM jobs WHERE ".$sqlpart." ORDER BY post_date DESC"; $workRegions = "
".$printPart; print<<

Jobs in your Selected Work Regions

Here are all the jobs posted in your selected regions.

Click here to view all jobs in your home region.
Click here to edit your regions.
Click here to search jobs.

Your selected work regions are $workRegions eof; $printed=1; $result=$db->query($sql); $numJobs=$result->numRows(); if ($numJobs==0){ print""; } while ($result->fetchInto($row)){ if ($printed%2!=0){$class="list1";}else{$class="list2";} $time=new timeConversion; $time->dbdate = $row->post_date; $post_date=$time->datetime2short(); $time->dbdate=$row->modified; $modified=$time->timestamp2short(); if ($row->active ==1){ $status = "Open"; }else{ $status="Filled"; } $region = $db->getOne("SELECT CONCAT(state, ' - ', region_name) FROM regions WHERE region_id='$row->region_id'"); print<< eof; $printed++; } $result->free(); print<<
Job Title Region Status Post Date Modified

There have been no new jobs posted in your selected regions.

Click here to view all the current jobs.

$row->job_title $region $status $post_date $modified
eof; break; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //viewjob //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// case"viewjob": $result=$db->query("SELECT * FROM jobs WHERE job_id='$get->job_id'"); $result->fetchInto($row); $region = $db->getOne("SELECT CONCAT(state, ' - ', region_name) FROM regions WHERE region_id='$row->region_id'"); $time=new timeConversion; $time->dbdate=$row->start_date; $start_date=$time->datetime2short(); $job_description = nl2br($row->job_description); $comments = nl2br($row->comments); if ($row->address_two == "") { $addressLine = $row->address_one; }else{ $addressLine=$row->address_one . "
".$row->address_two; } if ($row->active ==1){ $status = "open and available"; }else{ $status="filled and unavailable"; } print<<

$row->job_title

[ Go Back ]

Click here to return to the job index page.

Information

Region: $region

Start Date: $start_date

Specialty: $row->specialty

Status: $row->job_status

Currently, this position is $status.

Contact Information

Company Name: $row->company

Contact Email: $row->contact_email

Contact Name: $row->contact_name

Contact Phone: $row->contact_phone

Address:
$addressLine
$row->city $row->state $row->zipcode

Contact Fax: $row->contact_fax

Job Description

Description:
$job_description

Special Instructions:
$comments

eof; break; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //viewnew //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// case"viewnew": print<<

New Job Postings

Here are all the jobs posted since your last visit.

Click here to view all jobs in your home region.
Click here to view all jobs in your selected regions.
Click here to edit your regions.
Click here to search jobs.
eof; $printed=1; $result=$db->query("SELECT * FROM jobs WHERE post_date>'$s->slastlogin' ORDER BY post_date DESC"); $numJobs=$result->numRows(); if ($numJobs==0){ print""; } while ($result->fetchInto($row)){ if ($printed%2!=0){$class="list1";}else{$class="list2";} $time=new timeConversion; $time->dbdate = $row->post_date; $post_date=$time->datetime2short(); $time->dbdate=$row->modified; $modified=$time->timestamp2short(); if ($row->active ==1){ $status = "Open"; }else{ $status="Filled"; } $region = $db->getOne("SELECT CONCAT(state, ' - ', region_name) FROM regions WHERE region_id='$row->region_id'"); print<< eof; $printed++; } $result->free(); print<<
Job Title Region Status Post Date Modified

There have been no new jobs posted since your last visit.

Click here to view all the current jobs.

$row->job_title $region $status $post_date $modified
eof; break; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //default //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// default: print<<

Job Posting Index

Click here to view all jobs in your home region.
Click here to view all jobs in your selected regions.
Click here to edit your regions.
Click here to search jobs.

Below is a list of all current job postings. Click on the job title to view the job posting. eof; $printed=1; $result=$db->query("SELECT * FROM jobs ORDER BY post_date DESC"); while ($result->fetchInto($row)){ if ($printed%2!=0){$class="list1";}else{$class="list2";} $time=new timeConversion; $time->dbdate = $row->post_date; $post_date=$time->datetime2short(); $time->dbdate=$row->modified; $modified=$time->timestamp2short(); if ($row->active ==1){ $status = "Open"; }else{ $status="Filled"; } $region = $db->getOne("SELECT CONCAT(state, ' - ', region_name) FROM regions WHERE region_id='$row->region_id'"); print<< eof; $printed++; } $result->free(); print<<
Job Title Region Status Post Date Modified
$row->job_title $region $status $post_date $modified
eof; break; ////////////////////////////////////////////////////////////////////////////////////////////////////////////// //end switch($action) ////////////////////////////////////////////////////////////////////////////////////////////////////////////// } include("inc/foot.php"); ?>