18 |
$lpic="investor"; $lext=".jpg"; |
$lpic="investor"; $lext=".jpg"; |
19 |
$mpic="investors.gif"; |
$mpic="investors.gif"; |
20 |
$back_url="investor.php"; |
$back_url="investor.php"; |
21 |
|
} elseif ($section == "about") { |
22 |
|
$title="ABOUT US"; |
23 |
|
$lpic="about"; $lext=".gif"; |
24 |
|
$mpic="about.gif"; |
25 |
} else { |
} else { |
26 |
$title="What's New"; |
$title="What's New"; |
27 |
$lpic="new"; $lext=".jpg"; |
$lpic="new"; $lext=".jpg"; |
29 |
$back_url="index.php"; |
$back_url="index.php"; |
30 |
} |
} |
31 |
|
|
32 |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, ) ); |
33 |
|
|
34 |
$sql_where="where visible is true"; |
$sql_where="where visible is true"; |
35 |
|
|
54 |
if (isset($type)) { |
if (isset($type)) { |
55 |
if ($type == "n") { |
if ($type == "n") { |
56 |
$sql_where .= " and type='n'"; |
$sql_where .= " and type='n'"; |
57 |
|
$title.=" : News"; |
58 |
} elseif ($type == "e") { |
} elseif ($type == "e") { |
59 |
$sql_where .= " and type='e'"; |
$sql_where .= " and type='e'"; |
60 |
|
$title.=" : Events"; |
61 |
|
} elseif ($type == "c") { |
62 |
|
$sql_where .= " and type='c'"; |
63 |
|
$title.=" : Community"; |
64 |
} |
} |
65 |
} |
} |
66 |
|
|
74 |
$num_selected=0; |
$num_selected=0; |
75 |
$sql="select |
$sql="select |
76 |
id,upper(title) as title,town_date,body,more,pdf, |
id,upper(title) as title,town_date,body,more,pdf, |
77 |
(date-now()::date) as comming |
(date-now()::date) as comming,type,title as title_lc |
78 |
from news $sql_where order by priority desc,date desc $sql_limit"; |
from news $sql_where order by priority desc,date desc $sql_limit"; |
79 |
print "$sql"; |
# print "$sql"; |
80 |
$sth = $dbh->prepare("$sql"); |
$sth = $dbh->prepare("$sql"); |
81 |
$sth->execute(); |
$sth->execute(); |
82 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
97 |
)); |
)); |
98 |
} |
} |
99 |
|
|
100 |
|
if (isset($id) && $num_selected == 1) { |
101 |
|
if ($data[0][type] == "n") { |
102 |
|
$title.=" : News : ".$data[0][title_lc]; |
103 |
|
} elseif ($data[0][type] == "e") { |
104 |
|
$title.=" : Event : ".$data[0][title_lc]; |
105 |
|
} elseif ($data[0][type] == "c") { |
106 |
|
$title.=" : Community : ".$data[0][title_lc]; |
107 |
|
} elseif ($data[0][type] == "r") { |
108 |
|
$title.=" : Result : ".$data[0][title_lc]; |
109 |
|
} |
110 |
|
} |
111 |
|
|
112 |
$smarty->assign("data",$data); |
$smarty->assign("data",$data); |
113 |
|
|
114 |
$main=$smarty->fetch("new.tpl"); |
$main=$smarty->fetch("new.tpl"); |
124 |
} |
} |
125 |
|
|
126 |
include("common.inc"); |
include("common.inc"); |
127 |
$smarty->assign( array(back_url=>$back_url, MAIN=>$main)); |
$smarty->assign( array(back_url=>$back_url, MAIN=>$main, |
128 |
|
Section_title=>$title ) ); |
129 |
|
|
130 |
$smarty->display("index.tpl"); |
$smarty->display("index.tpl"); |
131 |
?> |
?> |