--- careers.php 2002/04/11 12:56:40 1.17 +++ careers.php 2002/04/25 12:16:41 1.18 @@ -2,25 +2,19 @@ if ($part == "erec") { // fix include path for included code - $old_inc=ini_get("include_path"); - $new_inc=ereg_replace( ":[^:]*inc","", $old_inc).":/data/erec/inc"; - ini_set("include_path",$new_inc); - + $old_inc = ini_get("include_path"); + $new_inc = ereg_replace( ":[^:]*inc","", $old_inc).":/data/erec/inc"; + ini_set("include_path", $new_inc); require("/data/erec/inc/Smarty.class.php"); include("DB.php"); // PEAR require("/data/erec/erec.class.php"); - $erec = new ERec; - $erec->upload_dir = "/data/erec"; - - //ini_restore("include_path"); // no work? - ini_set("include_path",$old_inc); -} else { - require("Smarty.class.php"); -} + // ini_restore("include_path"); // no work? + ini_set("include_path", $old_inc); +} else require("Smarty.class.php"); require("conn.inc"); -$smarty = new Smarty; +$smarty = new Smarty(); $smarty->assign( array ( Title=>"Pliva d.d." ) ); @@ -101,19 +95,22 @@ } $main=$smarty->fetch("Careers-".$part.".tpl"); -} elseif ($part == "erec") { - $main=$erec->page(); -} else { +} elseif ($part != "erec") { $main_file.="Main.htm"; $main=join('',file($main_file)); } $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); -$smarty->assign("MAIN",$main); - $smarty->assign("contact_url","careers.php?part=ContactUs"); +if ($part == "erec") { + $erec = new ERec(); + $erec->upload_dir = "/data/erec"; + $main = $erec->page(); +} + +$smarty->assign("MAIN", $main); + $smarty->display("index.tpl"); ?> -