23 |
|
|
24 |
if ($part == "Mail" && !check_required()) $part="ApplicationForm"; |
if ($part == "Mail" && !check_required()) $part="ApplicationForm"; |
25 |
|
|
26 |
|
$sql="select num,title,job_code,department,open_position_locations.location as location,description,edu_req,qual_req |
27 |
|
from open_positions,open_position_locations |
28 |
|
where open_positions.location_id=open_position_locations.id and visible is true"; |
29 |
if ($part == "ApplicationForm") { |
if ($part == "ApplicationForm") { |
30 |
$sth = $dbh->prepare("select iso,name from countries order by name"); |
$sth = $dbh->prepare("select iso,name from countries order by name"); |
31 |
$sth->execute(); |
$sth->execute(); |
35 |
$smarty->assign("countries",$countries); |
$smarty->assign("countries",$countries); |
36 |
|
|
37 |
if ($position) { |
if ($position) { |
38 |
$sth = $dbh->prepare("select num,title,job_code,department,location from open_positions where visible is true and num=$position"); |
$sql.=" and num=$position"; |
39 |
|
$sth = $dbh->prepare($sql); |
40 |
$sth->execute(); |
$sth->execute(); |
41 |
if ($row=$sth->fetchrow_hash()) { |
if ($row=$sth->fetchrow_hash()) { |
42 |
$smarty->assign("position",$row); |
$smarty->assign("position",$row); |
43 |
} |
} |
44 |
} |
} |
45 |
} elseif ($part == "OpenPositions") { |
} elseif ($part == "OpenPositions") { |
46 |
$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"); |
$sql.=" and expiration >= date('now') order by num asc"; |
47 |
|
$sth = $dbh->prepare($sql); |
48 |
$sth->execute(); |
$sth->execute(); |
49 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
50 |
$positions[]=$row; |
$positions[]=$row; |
73 |
"; |
"; |
74 |
$smarty->assign("mail","You sent following e-mail:<br><pre>$mail</pre>"); |
$smarty->assign("mail","You sent following e-mail:<br><pre>$mail</pre>"); |
75 |
include("class.CMailFile"); |
include("class.CMailFile"); |
76 |
$sendto="careercenter@pliva.hr"; |
# $sendto="careercenter@pliva.hr"; |
77 |
|
$sendto="dpavlin@pliva.hr"; |
78 |
$replyto="$first_name $last_name <$email>"; |
$replyto="$first_name $last_name <$email>"; |
79 |
$mailfile = new CMailFile("application for submission",$sendto,$replyto,$mail,$resume); |
$mailfile = new CMailFile("application for submission",$sendto,$replyto,$mail,$resume); |
80 |
$mailfile->sendfile(); |
$mailfile->sendfile(); |