/[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.13 - (hide annotations)
Wed Apr 11 13:17:41 2001 UTC (22 years, 11 months ago) by dpavlin
Branch: MAIN
Changes since 1.12: +1 -1 lines
send mail with verbose subject

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

  ViewVC Help
Powered by ViewVC 1.1.26