--- careers.php 2001/03/18 23:36:26 1.9
+++ careers.php 2001/10/01 14:05:16 1.15
@@ -6,19 +6,22 @@
$smarty->assign( array ( Title=>"Pliva d.d." ) );
-$section=str_replace(".php","",basename($PHP_SELF));
+include("common.inc");
+
+include("section.inc");
$smarty->assign("section",$section);
-$title="CAREERS";
-if ($menu_item) $title.=" : $menu_item";
-$lpic="careers"; $lext=".jpg";
-$mpic="careers.gif";
$main_file="./html/Careers-";
if (file_exists($main_file.$part.".htm")) {
$main_file.=$part.".htm";
$main=join('',file($main_file));
} elseif (file_exists("./templates/Careers-".$part.".tpl")) {
+ if ($part == "Mail" && !check_required()) $part="ApplicationForm";
+
+ $sql="select num,title,job_code,department,open_position_locations.location as location,description,edu_req,qual_req,open_position_locations.email as sendto
+ from open_positions,open_position_locations
+ where open_positions.location_id=open_position_locations.id and $visible_is_true";
if ($part == "ApplicationForm") {
$sth = $dbh->prepare("select iso,name from countries order by name");
$sth->execute();
@@ -28,14 +31,18 @@
$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");
+ $sql.=" and num=$position";
+ $sth = $dbh->prepare($sql);
$sth->execute();
if ($row=$sth->fetchrow_hash()) {
+ include("rot13.inc");
+ $row[sendto]=rot13($row[sendto]);
$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");
+ $sql.=" and expiration >= date('now') order by num asc";
+ $sth = $dbh->prepare($sql);
$sth->execute();
while ($row=$sth->fetchrow_hash()) {
$positions[]=$row;
@@ -64,9 +71,14 @@
";
$smarty->assign("mail","You sent following e-mail: