/[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

Annotation of /careers.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.17 - (hide 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 dpavlin 1.1 <?php
2 dpavlin 1.17
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 dpavlin 1.1 require("conn.inc");
22    
23     $smarty = new Smarty;
24    
25     $smarty->assign( array ( Title=>"Pliva d.d." ) );
26    
27 dpavlin 1.16 include("section.inc");
28    
29 dpavlin 1.15 include("common.inc");
30 dpavlin 1.1
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 dpavlin 1.2 } elseif (file_exists("./templates/Careers-".$part.".tpl")) {
36    
37 dpavlin 1.10 if ($part == "Mail" && !check_required()) $part="ApplicationForm";
38    
39 dpavlin 1.12 $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 dpavlin 1.11 from open_positions,open_position_locations
41 dpavlin 1.14 where open_positions.location_id=open_position_locations.id and $visible_is_true";
42 dpavlin 1.5 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 dpavlin 1.8
50     if ($position) {
51 dpavlin 1.11 $sql.=" and num=$position";
52     $sth = $dbh->prepare($sql);
53 dpavlin 1.8 $sth->execute();
54     if ($row=$sth->fetchrow_hash()) {
55 dpavlin 1.12 include("rot13.inc");
56     $row[sendto]=rot13($row[sendto]);
57 dpavlin 1.8 $smarty->assign("position",$row);
58     }
59     }
60 dpavlin 1.5 } elseif ($part == "OpenPositions") {
61 dpavlin 1.11 $sql.=" and expiration >= date('now') order by num asc";
62     $sth = $dbh->prepare($sql);
63 dpavlin 1.5 $sth->execute();
64     while ($row=$sth->fetchrow_hash()) {
65     $positions[]=$row;
66     }
67     $smarty->assign("positions",$positions);
68 dpavlin 1.7 } 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 dpavlin 1.8 Purpose: $purpose $open_position
82 dpavlin 1.7 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 dpavlin 1.12 if (!isset($sendto) || !strstr($sendto,"@")) {
92     $sendto="careercenter@pliva.hr";
93     } else {
94     include("rot13.inc");
95     $sendto=rot13($sendto);
96     }
97 dpavlin 1.7 $replyto="$first_name $last_name <$email>";
98 dpavlin 1.13 $mailfile = new CMailFile("Application for $open_position",$sendto,$replyto,$mail,$resume);
99 dpavlin 1.7 $mailfile->sendfile();
100     @unlink($resume);
101 dpavlin 1.2 }
102    
103     $main=$smarty->fetch("Careers-".$part.".tpl");
104 dpavlin 1.17 } elseif ($part == "erec") {
105     $main=$erec->page();
106 dpavlin 1.1 } 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 dpavlin 1.7

  ViewVC Help
Powered by ViewVC 1.1.26