/[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.7 by dpavlin, Tue Mar 6 09:02:05 2001 UTC revision 1.17 by dpavlin, Thu Apr 11 12:56:40 2002 UTC
# Line 1  Line 1 
1  <?php  <?php
2  require("Smarty.class.php");  
3    if ($part == "erec") {
4            // fix include path for included code
5            $old_inc=ini_get("include_path");
6            $new_inc=ereg_replace( ":[^:]*inc","", $old_inc).":/data/erec/inc";
7            ini_set("include_path",$new_inc);
8    
9            require("/data/erec/inc/Smarty.class.php");
10            include("DB.php");      // PEAR
11            require("/data/erec/erec.class.php");
12            $erec = new ERec;
13            $erec->upload_dir = "/data/erec";
14            
15            //ini_restore("include_path");  // no work?
16            ini_set("include_path",$old_inc);
17    } else {
18            require("Smarty.class.php");
19    }
20    
21  require("conn.inc");  require("conn.inc");
22    
23  $smarty = new Smarty;  $smarty = new Smarty;
24    
25  $smarty->assign( array ( Title=>"Pliva d.d." ) );  $smarty->assign( array ( Title=>"Pliva d.d." ) );
26    
27  $section=str_replace(".php","",basename($PHP_SELF));  include("section.inc");
28  $smarty->assign("section",$section);  
29    include("common.inc");
30    
 $title="CAREERS";  
 if ($menu_item) $title.=" : $menu_item";  
 $lpic="careers"; $lext=".jpg";  
 $mpic="careers.gif";  
31  $main_file="./html/Careers-";  $main_file="./html/Careers-";
32  if (file_exists($main_file.$part.".htm")) {  if (file_exists($main_file.$part.".htm")) {
33          $main_file.=$part.".htm";          $main_file.=$part.".htm";
34          $main=join('',file($main_file));          $main=join('',file($main_file));
35  } elseif (file_exists("./templates/Careers-".$part.".tpl")) {  } elseif (file_exists("./templates/Careers-".$part.".tpl")) {
36    
37            if ($part == "Mail" && !check_required()) $part="ApplicationForm";
38    
39            $sql="select num,title,job_code,department,open_position_locations.location as location,description,edu_req,qual_req,open_position_locations.email as sendto
40                    from open_positions,open_position_locations
41                    where open_positions.location_id=open_position_locations.id and $visible_is_true";
42          if ($part == "ApplicationForm") {          if ($part == "ApplicationForm") {
43                  $sth = $dbh->prepare("select iso,name from countries order by name");                  $sth = $dbh->prepare("select iso,name from countries order by name");
44                  $sth->execute();                  $sth->execute();
# Line 26  if (file_exists($main_file.$part.".htm") Line 46  if (file_exists($main_file.$part.".htm")
46                          $countries[]=$row;                          $countries[]=$row;
47                  }                  }
48                  $smarty->assign("countries",$countries);                  $smarty->assign("countries",$countries);
49    
50                    if ($position) {
51                            $sql.=" and num=$position";
52                            $sth = $dbh->prepare($sql);
53                            $sth->execute();
54                            if ($row=$sth->fetchrow_hash()) {
55                                    include("rot13.inc");
56                                    $row[sendto]=rot13($row[sendto]);
57                                    $smarty->assign("position",$row);
58                            }
59                    }
60          } elseif ($part == "OpenPositions") {          } elseif ($part == "OpenPositions") {
61                  $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";
62                    $sth = $dbh->prepare($sql);
63                  $sth->execute();                  $sth->execute();
64                  while ($row=$sth->fetchrow_hash()) {                  while ($row=$sth->fetchrow_hash()) {
65                          $positions[]=$row;                          $positions[]=$row;
# Line 46  ZIP: $zip Line 78  ZIP: $zip
78  Country: $country  Country: $country
79  e-mail: $email  e-mail: $email
80  tel: $tel  tel: $tel
81  Purpose: $purpose  Purpose: $purpose $open_position
82  Interest: $intereset  Interest: $intereset
83          $other_what          $other_what
84  Comments:  Comments:
# Line 56  Resume: $resume_name ($resume_size bytes Line 88  Resume: $resume_name ($resume_size bytes
88  ";  ";
89                  $smarty->assign("mail","You sent following e-mail:<br><pre>$mail</pre>");                  $smarty->assign("mail","You sent following e-mail:<br><pre>$mail</pre>");
90                  include("class.CMailFile");                  include("class.CMailFile");
91                  $sendto="careercenter@pliva.hr";                  if (!isset($sendto) || !strstr($sendto,"@")) {
92                            $sendto="careercenter@pliva.hr";
93                    } else {
94                            include("rot13.inc");
95                            $sendto=rot13($sendto);
96                    }
97                  $replyto="$first_name $last_name <$email>";                  $replyto="$first_name $last_name <$email>";
98                  $mailfile = new CMailFile("application for submission",$sendto,$replyto,$mail,$resume);                  $mailfile = new CMailFile("Application for $open_position",$sendto,$replyto,$mail,$resume);
99                  $mailfile->sendfile();                  $mailfile->sendfile();
100                  @unlink($resume);                  @unlink($resume);
101          }          }
102    
103          $main=$smarty->fetch("Careers-".$part.".tpl");          $main=$smarty->fetch("Careers-".$part.".tpl");
104    } elseif ($part == "erec") {
105            $main=$erec->page();
106  } else {  } else {
107          $main_file.="Main.htm";          $main_file.="Main.htm";
108          $main=join('',file($main_file));          $main=join('',file($main_file));
109  }  }
110    
   
111  $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) );  $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) );
112    
 include("common.inc");  
113  $smarty->assign("MAIN",$main);  $smarty->assign("MAIN",$main);
114    
115  $smarty->assign("contact_url","careers.php?part=ContactUs");  $smarty->assign("contact_url","careers.php?part=ContactUs");

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.26