6 |
|
|
7 |
$smarty->assign( array ( Title=>"Pliva d.d." ) ); |
$smarty->assign( array ( Title=>"Pliva d.d." ) ); |
8 |
|
|
9 |
$section=str_replace(".php","",basename($PHP_SELF)); |
include("section.inc"); |
10 |
$smarty->assign("section",$section); |
|
11 |
|
include("common.inc"); |
12 |
|
|
|
$title="CAREERS"; |
|
|
if ($menu_item) $title.=" : $menu_item"; |
|
|
$lpic="careers"; $lext=".jpg"; |
|
|
$mpic="careers.gif"; |
|
13 |
$main_file="./html/Careers-"; |
$main_file="./html/Careers-"; |
14 |
if (file_exists($main_file.$part.".htm")) { |
if (file_exists($main_file.$part.".htm")) { |
15 |
$main_file.=$part.".htm"; |
$main_file.=$part.".htm"; |
16 |
$main=join('',file($main_file)); |
$main=join('',file($main_file)); |
17 |
} elseif (file_exists("./templates/Careers-".$part.".tpl")) { |
} elseif (file_exists("./templates/Careers-".$part.".tpl")) { |
18 |
|
|
19 |
|
if ($part == "Mail" && !check_required()) $part="ApplicationForm"; |
20 |
|
|
21 |
|
$sql="select num,title,job_code,department,open_position_locations.location as location,description,edu_req,qual_req,open_position_locations.email as sendto |
22 |
|
from open_positions,open_position_locations |
23 |
|
where open_positions.location_id=open_position_locations.id and $visible_is_true"; |
24 |
if ($part == "ApplicationForm") { |
if ($part == "ApplicationForm") { |
25 |
$sth = $dbh->prepare("select iso,name from countries order by name"); |
$sth = $dbh->prepare("select iso,name from countries order by name"); |
26 |
$sth->execute(); |
$sth->execute(); |
30 |
$smarty->assign("countries",$countries); |
$smarty->assign("countries",$countries); |
31 |
|
|
32 |
if ($position) { |
if ($position) { |
33 |
$sth = $dbh->prepare("select num,title,job_code,department,location from open_positions where visible is true and num=$position"); |
$sql.=" and num=$position"; |
34 |
|
$sth = $dbh->prepare($sql); |
35 |
$sth->execute(); |
$sth->execute(); |
36 |
if ($row=$sth->fetchrow_hash()) { |
if ($row=$sth->fetchrow_hash()) { |
37 |
|
include("rot13.inc"); |
38 |
|
$row[sendto]=rot13($row[sendto]); |
39 |
$smarty->assign("position",$row); |
$smarty->assign("position",$row); |
40 |
} |
} |
41 |
} |
} |
42 |
} elseif ($part == "OpenPositions") { |
} elseif ($part == "OpenPositions") { |
43 |
$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"); |
$sql.=" and expiration >= date('now') order by num asc"; |
44 |
|
$sth = $dbh->prepare($sql); |
45 |
$sth->execute(); |
$sth->execute(); |
46 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
47 |
$positions[]=$row; |
$positions[]=$row; |
70 |
"; |
"; |
71 |
$smarty->assign("mail","You sent following e-mail:<br><pre>$mail</pre>"); |
$smarty->assign("mail","You sent following e-mail:<br><pre>$mail</pre>"); |
72 |
include("class.CMailFile"); |
include("class.CMailFile"); |
73 |
$sendto="careercenter@pliva.hr"; |
if (!isset($sendto) || !strstr($sendto,"@")) { |
74 |
|
$sendto="careercenter@pliva.hr"; |
75 |
|
} else { |
76 |
|
include("rot13.inc"); |
77 |
|
$sendto=rot13($sendto); |
78 |
|
} |
79 |
$replyto="$first_name $last_name <$email>"; |
$replyto="$first_name $last_name <$email>"; |
80 |
$mailfile = new CMailFile("application for submission",$sendto,$replyto,$mail,$resume); |
$mailfile = new CMailFile("Application for $open_position",$sendto,$replyto,$mail,$resume); |
81 |
$mailfile->sendfile(); |
$mailfile->sendfile(); |
82 |
@unlink($resume); |
@unlink($resume); |
83 |
} |
} |
91 |
|
|
92 |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
93 |
|
|
|
include("common.inc"); |
|
94 |
$smarty->assign("MAIN",$main); |
$smarty->assign("MAIN",$main); |
95 |
|
|
96 |
$smarty->assign("contact_url","careers.php?part=ContactUs"); |
$smarty->assign("contact_url","careers.php?part=ContactUs"); |