/[corp_html]/careers.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /careers.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.17 - (show annotations)
Thu Apr 11 12:56:40 2002 UTC (21 years, 11 months ago) by dpavlin
Branch: MAIN
Changes since 1.16: +21 -2 lines
erec integration

1 <?php
2
3 if ($part == "erec") {
4 // fix include path for included code
5 $old_inc=ini_get("include_path");
6 $new_inc=ereg_replace( ":[^:]*inc","", $old_inc).":/data/erec/inc";
7 ini_set("include_path",$new_inc);
8
9 require("/data/erec/inc/Smarty.class.php");
10 include("DB.php"); // PEAR
11 require("/data/erec/erec.class.php");
12 $erec = new ERec;
13 $erec->upload_dir = "/data/erec";
14
15 //ini_restore("include_path"); // no work?
16 ini_set("include_path",$old_inc);
17 } else {
18 require("Smarty.class.php");
19 }
20
21 require("conn.inc");
22
23 $smarty = new Smarty;
24
25 $smarty->assign( array ( Title=>"Pliva d.d." ) );
26
27 include("section.inc");
28
29 include("common.inc");
30
31 $main_file="./html/Careers-";
32 if (file_exists($main_file.$part.".htm")) {
33 $main_file.=$part.".htm";
34 $main=join('',file($main_file));
35 } elseif (file_exists("./templates/Careers-".$part.".tpl")) {
36
37 if ($part == "Mail" && !check_required()) $part="ApplicationForm";
38
39 $sql="select num,title,job_code,department,open_position_locations.location as location,description,edu_req,qual_req,open_position_locations.email as sendto
40 from open_positions,open_position_locations
41 where open_positions.location_id=open_position_locations.id and $visible_is_true";
42 if ($part == "ApplicationForm") {
43 $sth = $dbh->prepare("select iso,name from countries order by name");
44 $sth->execute();
45 while ($row=$sth->fetchrow_hash()) {
46 $countries[]=$row;
47 }
48 $smarty->assign("countries",$countries);
49
50 if ($position) {
51 $sql.=" and num=$position";
52 $sth = $dbh->prepare($sql);
53 $sth->execute();
54 if ($row=$sth->fetchrow_hash()) {
55 include("rot13.inc");
56 $row[sendto]=rot13($row[sendto]);
57 $smarty->assign("position",$row);
58 }
59 }
60 } elseif ($part == "OpenPositions") {
61 $sql.=" and expiration >= date('now') order by num asc";
62 $sth = $dbh->prepare($sql);
63 $sth->execute();
64 while ($row=$sth->fetchrow_hash()) {
65 $positions[]=$row;
66 }
67 $smarty->assign("positions",$positions);
68 } elseif ($part == "Mail") {
69
70 $mail="
71 First name: $first_name
72 Last name: $last_name
73 Address: $address1
74 $address2
75 City: $city
76 State: $state
77 ZIP: $zip
78 Country: $country
79 e-mail: $email
80 tel: $tel
81 Purpose: $purpose $open_position
82 Interest: $intereset
83 $other_what
84 Comments:
85 $comments
86
87 Resume: $resume_name ($resume_size bytes)
88 ";
89 $smarty->assign("mail","You sent following e-mail:<br><pre>$mail</pre>");
90 include("class.CMailFile");
91 if (!isset($sendto) || !strstr($sendto,"@")) {
92 $sendto="careercenter@pliva.hr";
93 } else {
94 include("rot13.inc");
95 $sendto=rot13($sendto);
96 }
97 $replyto="$first_name $last_name <$email>";
98 $mailfile = new CMailFile("Application for $open_position",$sendto,$replyto,$mail,$resume);
99 $mailfile->sendfile();
100 @unlink($resume);
101 }
102
103 $main=$smarty->fetch("Careers-".$part.".tpl");
104 } elseif ($part == "erec") {
105 $main=$erec->page();
106 } else {
107 $main_file.="Main.htm";
108 $main=join('',file($main_file));
109 }
110
111 $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) );
112
113 $smarty->assign("MAIN",$main);
114
115 $smarty->assign("contact_url","careers.php?part=ContactUs");
116
117 $smarty->display("index.tpl");
118 ?>
119

  ViewVC Help
Powered by ViewVC 1.1.26