/[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.14 - (hide annotations)
Tue Sep 18 10:26:46 2001 UTC (22 years, 6 months ago) by dpavlin
Branch: MAIN
Changes since 1.13: +1 -2 lines
changes to support /preview/ URL

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

  ViewVC Help
Powered by ViewVC 1.1.26