/[corp_html]/results.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 /results.php

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

revision 1.4 by dpavlin, Sat Mar 3 12:56:33 2001 UTC revision 1.8 by dpavlin, Mon Mar 19 16:47:46 2001 UTC
# Line 1  Line 1 
1  <?php  <?php
2  require("Smarty.class.php");  require("Smarty.class.php");
 require("conn.inc");  
3    
4  $smarty = new Smarty;  $smarty = new Smarty;
5    
6  $smarty->assign( array ( Title=>"Pliva d.d." ) );  $smarty->assign( array ( Title=>"Pliva d.d." ) );
7    
8  $section="investor";  if (isset($from)) {
9            $section=$from;
10    } else {
11            $section="investor";
12    }
13    
14  $title="INVESTOR'S PAGE";  require("conn.inc");
 if ($menu_item) $title.=" : $menu_item";  
 $lpic="investor"; $lext=".jpg";  
 $mpic="investors.gif";  
15    
16  if ($part && file_exists("templates/$part.tpl")) {  if ($section == "new") {
17          $main_file=$part;          $title="What's New";
18            $lpic="new"; $lext=".jpg";
19            $mpic="new.gif";
20  } else {  } else {
21          $main_file="results";          $title="INVESTOR'S PAGE";
22            $lpic="investor"; $lext=".jpg";
23            $mpic="investors.gif";
24  }  }
25    if ($menu_item) $title.=" : $menu_item";
26    
27    $main_file="results";
28    
29  $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) );  $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) );
30    
31          $sql="select id,title,pdf from news where type='r' and visible order by priority desc,date desc";  if (! $type) $type="r";
32    
33    $sql="select id,town_date,title,body,pdf from news where type='$type' and visible order by priority desc,date desc";
34  #       print "$sql";  #       print "$sql";
35          $sth = $dbh->prepare("$sql");  $sth = $dbh->prepare("$sql");
36          $sth->execute();  $sth->execute();
37          while ($row=$sth->fetchrow_hash()) {  while ($row=$sth->fetchrow_hash()) {
38                  $results[]=$row;          $results[]=$row;
39          }  }
40          $smarty->assign("results",$results);  $smarty->assign(array(
41            results=>$results,
42            type=>$type
43            ));
44    
45  $main=$smarty->fetch("$main_file.tpl");  $main=$smarty->fetch("$main_file.tpl");
46    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.26