/[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.4 - (hide annotations)
Wed Feb 28 09:48:30 2001 UTC (23 years, 1 month ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +0 -0 lines
FILE REMOVED
kozmetičke promjene

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 dpavlin 1.2 $sql_where="where type='c'";
29 dpavlin 1.1
30     if (isset($id)) {
31 dpavlin 1.2 $sql_where.="and id=$id";
32 dpavlin 1.1 }
33    
34 dpavlin 1.3 $sth = $dbh->prepare("select id,title,date,body,pic from news $sql_where order by date desc");
35 dpavlin 1.1 $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