--- careers.php 2001/04/10 11:02:47 1.11 +++ careers.php 2001/04/10 12:43:58 1.12 @@ -23,7 +23,7 @@ if ($part == "Mail" && !check_required()) $part="ApplicationForm"; - $sql="select num,title,job_code,department,open_position_locations.location as location,description,edu_req,qual_req + $sql="select num,title,job_code,department,open_position_locations.location as location,description,edu_req,qual_req,open_position_locations.email as sendto from open_positions,open_position_locations where open_positions.location_id=open_position_locations.id and visible is true"; if ($part == "ApplicationForm") { @@ -39,6 +39,8 @@ $sth = $dbh->prepare($sql); $sth->execute(); if ($row=$sth->fetchrow_hash()) { + include("rot13.inc"); + $row[sendto]=rot13($row[sendto]); $smarty->assign("position",$row); } } @@ -73,8 +75,12 @@ "; $smarty->assign("mail","You sent following e-mail:
$mail
"); include("class.CMailFile"); -# $sendto="careercenter@pliva.hr"; - $sendto="dpavlin@pliva.hr"; + if (!isset($sendto) || !strstr($sendto,"@")) { + $sendto="careercenter@pliva.hr"; + } else { + include("rot13.inc"); + $sendto=rot13($sendto); + } $replyto="$first_name $last_name <$email>"; $mailfile = new CMailFile("application for submission",$sendto,$replyto,$mail,$resume); $mailfile->sendfile();