19 |
$main=join('',file($main_file)); |
$main=join('',file($main_file)); |
20 |
} elseif (file_exists("./templates/Careers-".$part.".tpl")) { |
} elseif (file_exists("./templates/Careers-".$part.".tpl")) { |
21 |
|
|
22 |
$sth = $dbh->prepare("select iso,name from countries order by name"); |
if ($part == "ApplicationForm") { |
23 |
$sth->execute(); |
$sth = $dbh->prepare("select iso,name from countries order by name"); |
24 |
while ($row=$sth->fetchrow_hash()) { |
$sth->execute(); |
25 |
$countries[]=$row; |
while ($row=$sth->fetchrow_hash()) { |
26 |
|
$countries[]=$row; |
27 |
|
} |
28 |
|
$smarty->assign("countries",$countries); |
29 |
|
|
30 |
|
if ($position) { |
31 |
|
$sth = $dbh->prepare("select num,title,job_code,department,location from open_positions where visible is true and num=$position"); |
32 |
|
$sth->execute(); |
33 |
|
if ($row=$sth->fetchrow_hash()) { |
34 |
|
$smarty->assign("position",$row); |
35 |
|
} |
36 |
|
} |
37 |
|
} elseif ($part == "OpenPositions") { |
38 |
|
$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"); |
39 |
|
$sth->execute(); |
40 |
|
while ($row=$sth->fetchrow_hash()) { |
41 |
|
$positions[]=$row; |
42 |
|
} |
43 |
|
$smarty->assign("positions",$positions); |
44 |
|
} elseif ($part == "Mail") { |
45 |
|
|
46 |
|
$mail=" |
47 |
|
First name: $first_name |
48 |
|
Last name: $last_name |
49 |
|
Address: $address1 |
50 |
|
$address2 |
51 |
|
City: $city |
52 |
|
State: $state |
53 |
|
ZIP: $zip |
54 |
|
Country: $country |
55 |
|
e-mail: $email |
56 |
|
tel: $tel |
57 |
|
Purpose: $purpose $open_position |
58 |
|
Interest: $intereset |
59 |
|
$other_what |
60 |
|
Comments: |
61 |
|
$comments |
62 |
|
|
63 |
|
Resume: $resume_name ($resume_size bytes) |
64 |
|
"; |
65 |
|
$smarty->assign("mail","You sent following e-mail:<br><pre>$mail</pre>"); |
66 |
|
include("class.CMailFile"); |
67 |
|
$sendto="careercenter@pliva.hr"; |
68 |
|
$replyto="$first_name $last_name <$email>"; |
69 |
|
$mailfile = new CMailFile("application for submission",$sendto,$replyto,$mail,$resume); |
70 |
|
$mailfile->sendfile(); |
71 |
|
@unlink($resume); |
72 |
} |
} |
|
$smarty->assign("countries",$countries); |
|
73 |
|
|
74 |
$main=$smarty->fetch("Careers-".$part.".tpl"); |
$main=$smarty->fetch("Careers-".$part.".tpl"); |
75 |
} else { |
} else { |
83 |
include("common.inc"); |
include("common.inc"); |
84 |
$smarty->assign("MAIN",$main); |
$smarty->assign("MAIN",$main); |
85 |
|
|
|
$smarty->assign("debug",$PHP_SELF." -- ".basename($PHP_SELF)); |
|
|
|
|
86 |
$smarty->assign("contact_url","careers.php?part=ContactUs"); |
$smarty->assign("contact_url","careers.php?part=ContactUs"); |
87 |
|
|
88 |
$smarty->display("index.tpl"); |
$smarty->display("index.tpl"); |
89 |
?> |
?> |
90 |
|
|