1 |
dpavlin |
1.1 |
<?php |
2 |
|
|
require("Smarty.class.php"); |
3 |
|
|
require("conn.inc"); |
4 |
|
|
|
5 |
|
|
$smarty = new Smarty; |
6 |
|
|
|
7 |
|
|
$smarty->assign( array ( Title=>"Pliva d.d." ) ); |
8 |
|
|
|
9 |
|
|
$section=str_replace(".php","",basename($PHP_SELF)); |
10 |
|
|
$smarty->assign("section",$section); |
11 |
|
|
|
12 |
|
|
$title="CAREERS"; |
13 |
dpavlin |
1.4 |
if ($menu_item) $title.=" : $menu_item"; |
14 |
dpavlin |
1.1 |
$lpic="careers"; $lext=".jpg"; |
15 |
|
|
$mpic="careers.gif"; |
16 |
|
|
$main_file="./html/Careers-"; |
17 |
|
|
if (file_exists($main_file.$part.".htm")) { |
18 |
|
|
$main_file.=$part.".htm"; |
19 |
|
|
$main=join('',file($main_file)); |
20 |
dpavlin |
1.2 |
} elseif (file_exists("./templates/Careers-".$part.".tpl")) { |
21 |
|
|
|
22 |
dpavlin |
1.5 |
if ($part == "ApplicationForm") { |
23 |
|
|
$sth = $dbh->prepare("select iso,name from countries order by name"); |
24 |
|
|
$sth->execute(); |
25 |
|
|
while ($row=$sth->fetchrow_hash()) { |
26 |
|
|
$countries[]=$row; |
27 |
|
|
} |
28 |
|
|
$smarty->assign("countries",$countries); |
29 |
dpavlin |
1.8 |
|
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 |
dpavlin |
1.5 |
} 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 order by num asc"); |
39 |
|
|
$sth->execute(); |
40 |
|
|
while ($row=$sth->fetchrow_hash()) { |
41 |
|
|
$positions[]=$row; |
42 |
|
|
} |
43 |
|
|
$smarty->assign("positions",$positions); |
44 |
dpavlin |
1.7 |
} 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 |
dpavlin |
1.8 |
Purpose: $purpose $open_position |
58 |
dpavlin |
1.7 |
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 |
dpavlin |
1.2 |
} |
73 |
|
|
|
74 |
|
|
$main=$smarty->fetch("Careers-".$part.".tpl"); |
75 |
dpavlin |
1.1 |
} else { |
76 |
|
|
$main_file.="Main.htm"; |
77 |
|
|
$main=join('',file($main_file)); |
78 |
|
|
} |
79 |
|
|
|
80 |
|
|
|
81 |
|
|
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
82 |
|
|
|
83 |
|
|
include("common.inc"); |
84 |
|
|
$smarty->assign("MAIN",$main); |
85 |
|
|
|
86 |
|
|
$smarty->assign("contact_url","careers.php?part=ContactUs"); |
87 |
|
|
|
88 |
|
|
$smarty->display("index.tpl"); |
89 |
|
|
?> |
90 |
dpavlin |
1.7 |
|