/[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.18 - (hide annotations)
Thu Apr 25 12:16:41 2002 UTC (21 years, 11 months ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.17: +16 -19 lines
careers banner && front-end

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

  ViewVC Help
Powered by ViewVC 1.1.26