/[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.15 - (hide annotations)
Mon Oct 1 14:05:16 2001 UTC (17 years, 10 months ago) by dpavlin
Branch: MAIN
Changes since 1.14: +3 -6 lines
banner support, new multi-page support (with back-end)

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

  ViewVC Help
Powered by ViewVC 1.1.26