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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (vendor branch)
Mon Feb 19 16:22:20 2001 UTC (21 years, 6 months ago) by dpavlin
Branch: dbp
CVS Tags: alpha
Changes since 1.1: +0 -0 lines
alpha

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     if (isset($from)) {
10     $section=$from;
11     } else {
12     $section="new";
13     }
14    
15     if ($section == "about") {
16     $title="ABOUT US";
17     $lpic="about"; $lext=".gif";
18     $mpic="about.gif";
19     } else {
20     $title="Community";
21     $lpic="new"; $lext=".jpg";
22     $mpic="new.gif";
23     }
24     $back_url="index.php";
25    
26     $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) );
27    
28     $sql_where="";
29    
30     if (isset($id)) {
31     $sql_where="where id=$id";
32     }
33    
34     $sth = $dbh->prepare("select id,title,date,body,pic from community $sql_where order by id desc");
35     $sth->execute();
36     while ($row=$sth->fetchrow_hash()) {
37     $data[]=$row;
38     }
39    
40     $smarty->assign("data",$data);
41    
42     $main=$smarty->fetch("community.tpl");
43    
44     $smarty->assign( array(back_url=>$back_url, MAIN=>$main));
45    
46     include("common.inc");
47    
48     $smarty->display("index.tpl");
49     ?>

  ViewVC Help
Powered by ViewVC 1.1.26