/[pliva-si]/sections/annual.inc
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 /sections/annual.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Thu Sep 20 09:50:24 2001 UTC (22 years, 7 months ago) by dpavlin
Branch: MAIN
Changes since 1.1: +1 -1 lines
support for preview, correct absolute and relative paths

1 dpavlin 1.1 <?php
2    
3     if (! $type) $type="a";
4    
5     $corp_dbh = new DBI("dbi:pg:corp","dpavlin host=localhost","");
6    
7 dpavlin 1.2 $sql="select id,town_date,title,body,pdf from news where type='$type' and $visible_is_true order by priority desc,date desc";
8 dpavlin 1.1 # print "$sql";
9     $sth = $corp_dbh->prepare("$sql");
10     $sth->execute();
11     while ($row=$sth->fetchrow_hash()) {
12     $results[]=$row;
13     }
14    
15     $smarty->assign(array(
16     results=>$results,
17     type=>$type
18     ));
19    
20     $main=$smarty->fetch("annual.tpl");
21     ?>

  ViewVC Help
Powered by ViewVC 1.1.26