--- careers.php 2001/03/03 12:56:33 1.4 +++ careers.php 2001/03/05 15:36:16 1.6 @@ -19,12 +19,21 @@ $main=join('',file($main_file)); } elseif (file_exists("./templates/Careers-".$part.".tpl")) { - $sth = $dbh->prepare("select iso,name from countries order by name"); - $sth->execute(); - while ($row=$sth->fetchrow_hash()) { - $countries[]=$row; + 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); + } 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 order by num asc"); + $sth->execute(); + while ($row=$sth->fetchrow_hash()) { + $positions[]=$row; + } + $smarty->assign("positions",$positions); } - $smarty->assign("countries",$countries); $main=$smarty->fetch("Careers-".$part.".tpl"); } else { @@ -38,8 +47,6 @@ include("common.inc"); $smarty->assign("MAIN",$main); -$smarty->assign("debug",$PHP_SELF." -- ".basename($PHP_SELF)); - $smarty->assign("contact_url","careers.php?part=ContactUs"); $smarty->display("index.tpl");