--- careers.php 2001/02/28 14:13:51 1.2
+++ careers.php 2001/03/19 10:47:46 1.10
@@ -9,7 +9,10 @@
$section=str_replace(".php","",basename($PHP_SELF));
$smarty->assign("section",$section);
+include("common.inc");
+
$title="CAREERS";
+if ($menu_item) $title.=" : $menu_item";
$lpic="careers"; $lext=".jpg";
$mpic="careers.gif";
$main_file="./html/Careers-";
@@ -18,12 +21,59 @@
$main=join('',file($main_file));
} elseif (file_exists("./templates/Careers-".$part.".tpl")) {
- $sth = $dbh->prepare("select iso,name from countries order by iso");
- $sth->execute();
- while ($row=$sth->fetchrow_hash()) {
- $countries[]=$row;
+ if ($part == "Mail" && !check_required()) $part="ApplicationForm";
+
+ if ($part == "ApplicationForm") {
+ $sth = $dbh->prepare("select iso,name from countries order by name");
+ $sth->execute();
+ while ($row=$sth->fetchrow_hash()) {
+ $countries[]=$row;
+ }
+ $smarty->assign("countries",$countries);
+
+ if ($position) {
+ $sth = $dbh->prepare("select num,title,job_code,department,location from open_positions where visible is true and num=$position");
+ $sth->execute();
+ if ($row=$sth->fetchrow_hash()) {
+ $smarty->assign("position",$row);
+ }
+ }
+ } elseif ($part == "OpenPositions") {
+ $sth = $dbh->prepare("select num,title,job_code,department,location,description,edu_req,qual_req from open_positions where visible is true and expiration >= date('now') order by num asc");
+ $sth->execute();
+ while ($row=$sth->fetchrow_hash()) {
+ $positions[]=$row;
+ }
+ $smarty->assign("positions",$positions);
+ } elseif ($part == "Mail") {
+
+$mail="
+First name: $first_name
+Last name: $last_name
+Address: $address1
+ $address2
+City: $city
+State: $state
+ZIP: $zip
+Country: $country
+e-mail: $email
+tel: $tel
+Purpose: $purpose $open_position
+Interest: $intereset
+ $other_what
+Comments:
+$comments
+
+Resume: $resume_name ($resume_size bytes)
+";
+ $smarty->assign("mail","You sent following e-mail: