/[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

Contents of /community.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Wed Feb 21 15:52:31 2001 UTC (23 years, 1 month ago) by dpavlin
Branch: MAIN
Changes since 1.1: +3 -3 lines
news+community+events u jednoj tablici, back-end za editiranje

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