/[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

Diff of /careers.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by dpavlin, Mon Mar 5 13:32:53 2001 UTC revision 1.14 by dpavlin, Tue Sep 18 10:26:46 2001 UTC
# Line 9  $smarty->assign( array ( Title=>"Pliva d Line 9  $smarty->assign( array ( Title=>"Pliva d
9  $section=str_replace(".php","",basename($PHP_SELF));  $section=str_replace(".php","",basename($PHP_SELF));
10  $smarty->assign("section",$section);  $smarty->assign("section",$section);
11    
12    include("common.inc");
13  $title="CAREERS";  $title="CAREERS";
14  if ($menu_item) $title.=" : $menu_item";  if ($menu_item) $title.=" : $menu_item";
15  $lpic="careers"; $lext=".jpg";  $lpic="careers"; $lext=".jpg";
# Line 19  if (file_exists($main_file.$part.".htm") Line 20  if (file_exists($main_file.$part.".htm")
20          $main=join('',file($main_file));          $main=join('',file($main_file));
21  } elseif (file_exists("./templates/Careers-".$part.".tpl")) {  } elseif (file_exists("./templates/Careers-".$part.".tpl")) {
22    
23            if ($part == "Mail" && !check_required()) $part="ApplicationForm";
24    
25            $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                    from open_positions,open_position_locations
27                    where open_positions.location_id=open_position_locations.id and $visible_is_true";
28          if ($part == "ApplicationForm") {          if ($part == "ApplicationForm") {
29                  $sth = $dbh->prepare("select iso,name from countries order by name");                  $sth = $dbh->prepare("select iso,name from countries order by name");
30                  $sth->execute();                  $sth->execute();
# Line 26  if (file_exists($main_file.$part.".htm") Line 32  if (file_exists($main_file.$part.".htm")
32                          $countries[]=$row;                          $countries[]=$row;
33                  }                  }
34                  $smarty->assign("countries",$countries);                  $smarty->assign("countries",$countries);
35    
36                    if ($position) {
37                            $sql.=" and num=$position";
38                            $sth = $dbh->prepare($sql);
39                            $sth->execute();
40                            if ($row=$sth->fetchrow_hash()) {
41                                    include("rot13.inc");
42                                    $row[sendto]=rot13($row[sendto]);
43                                    $smarty->assign("position",$row);
44                            }
45                    }
46          } elseif ($part == "OpenPositions") {          } elseif ($part == "OpenPositions") {
47                  $sth = $dbh->prepare("select num,title,job_code,department,location,description,edu_req,qual_req from open_positions where visible is true order by num asc");                  $sql.=" and expiration >= date('now') order by num asc";
48                    $sth = $dbh->prepare($sql);
49                  $sth->execute();                  $sth->execute();
50                  while ($row=$sth->fetchrow_hash()) {                  while ($row=$sth->fetchrow_hash()) {
51                          $positions[]=$row;                          $positions[]=$row;
52                  }                  }
53                  $smarty->assign("positions",$positions);                  $smarty->assign("positions",$positions);
54            } 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    Purpose: $purpose $open_position
68    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                    if (!isset($sendto) || !strstr($sendto,"@")) {
78                            $sendto="careercenter@pliva.hr";
79                    } else {
80                            include("rot13.inc");
81                            $sendto=rot13($sendto);
82                    }
83                    $replyto="$first_name $last_name <$email>";
84                    $mailfile = new CMailFile("Application for $open_position",$sendto,$replyto,$mail,$resume);
85                    $mailfile->sendfile();
86                    @unlink($resume);
87          }          }
88    
89          $main=$smarty->fetch("Careers-".$part.".tpl");          $main=$smarty->fetch("Careers-".$part.".tpl");
# Line 44  if (file_exists($main_file.$part.".htm") Line 95  if (file_exists($main_file.$part.".htm")
95    
96  $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) );  $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) );
97    
 include("common.inc");  
98  $smarty->assign("MAIN",$main);  $smarty->assign("MAIN",$main);
99    
 $smarty->assign("debug",$PHP_SELF." -- ".basename($PHP_SELF));  
   
100  $smarty->assign("contact_url","careers.php?part=ContactUs");  $smarty->assign("contact_url","careers.php?part=ContactUs");
101    
102  $smarty->display("index.tpl");  $smarty->display("index.tpl");
103  ?>  ?>
104    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.26