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(); |
28 |
$countries[]=$row; |
$countries[]=$row; |
29 |
} |
} |
30 |
$smarty->assign("countries",$countries); |
$smarty->assign("countries",$countries); |
31 |
|
|
32 |
|
if ($position) { |
33 |
|
$sql.=" and num=$position"; |
34 |
|
$sth = $dbh->prepare($sql); |
35 |
|
$sth->execute(); |
36 |
|
if ($row=$sth->fetchrow_hash()) { |
37 |
|
include("rot13.inc"); |
38 |
|
$row[sendto]=rot13($row[sendto]); |
39 |
|
$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; |
48 |
} |
} |
49 |
$smarty->assign("positions",$positions); |
$smarty->assign("positions",$positions); |
50 |
|
} elseif ($part == "Mail") { |
51 |
|
|
52 |
|
$mail=" |
53 |
|
First name: $first_name |
54 |
|
Last name: $last_name |
55 |
|
Address: $address1 |
56 |
|
$address2 |
57 |
|
City: $city |
58 |
|
State: $state |
59 |
|
ZIP: $zip |
60 |
|
Country: $country |
61 |
|
e-mail: $email |
62 |
|
tel: $tel |
63 |
|
Purpose: $purpose $open_position |
64 |
|
Interest: $intereset |
65 |
|
$other_what |
66 |
|
Comments: |
67 |
|
$comments |
68 |
|
|
69 |
|
Resume: $resume_name ($resume_size bytes) |
70 |
|
"; |
71 |
|
$smarty->assign("mail","You sent following e-mail:<br><pre>$mail</pre>"); |
72 |
|
include("class.CMailFile"); |
73 |
|
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>"; |
80 |
|
$mailfile = new CMailFile("Application for $open_position",$sendto,$replyto,$mail,$resume); |
81 |
|
$mailfile->sendfile(); |
82 |
|
@unlink($resume); |
83 |
} |
} |
84 |
|
|
85 |
$main=$smarty->fetch("Careers-".$part.".tpl"); |
$main=$smarty->fetch("Careers-".$part.".tpl"); |
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 |
|
|
|
$smarty->assign("debug",$PHP_SELF." -- ".basename($PHP_SELF)); |
|
|
|
|
96 |
$smarty->assign("contact_url","careers.php?part=ContactUs"); |
$smarty->assign("contact_url","careers.php?part=ContactUs"); |
97 |
|
|
98 |
$smarty->display("index.tpl"); |
$smarty->display("index.tpl"); |
99 |
?> |
?> |
100 |
|
|