/[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.16 - (hide annotations)
Tue Oct 2 07:45:45 2001 UTC (22 years, 6 months ago) by dpavlin
Branch: MAIN
Changes since 1.15: +2 -3 lines
prvo section.inc onda common.inc!

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

  ViewVC Help
Powered by ViewVC 1.1.26