12 |
} |
} |
13 |
|
|
14 |
require("conn.inc"); |
require("conn.inc"); |
15 |
|
include("section.inc"); |
|
if ($section == "new") { |
|
|
$title="What's New"; |
|
|
$lpic="new"; $lext=".jpg"; |
|
|
$mpic="new.gif"; |
|
|
} else { |
|
|
$title="INVESTOR'S PAGE"; |
|
|
$lpic="investor"; $lext=".jpg"; |
|
|
$mpic="investors.gif"; |
|
|
} |
|
|
if ($menu_item) $title.=" : $menu_item"; |
|
|
|
|
|
$main_file="results"; |
|
|
|
|
|
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
|
16 |
|
|
17 |
if (! $type) $type="r"; |
if (! $type) $type="r"; |
18 |
|
|
19 |
$sql="select id,town_date,title,pdf from news where type='$type' and visible order by priority desc,date desc"; |
$sql="select id,town_date,title,body,pdf from news where type='$type' and $visible_is_true order by priority desc,date desc"; |
20 |
# print "$sql"; |
# print "$sql"; |
21 |
$sth = $dbh->prepare("$sql"); |
$sth = $dbh->prepare("$sql"); |
22 |
$sth->execute(); |
$sth->execute(); |
23 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
24 |
$results[]=$row; |
$results[]=$row; |
25 |
} |
} |
26 |
|
|
27 |
|
if ($type == "p") { |
28 |
|
$main_file="presentations"; |
29 |
|
} elseif ($type == "o") { |
30 |
|
$main_file="comp_profile"; |
31 |
|
} else { |
32 |
|
$main_file="results"; |
33 |
|
} |
34 |
|
|
35 |
$smarty->assign(array( |
$smarty->assign(array( |
36 |
results=>$results, |
results=>$results, |
37 |
type=>$type |
type=>$type |
40 |
$main=$smarty->fetch("$main_file.tpl"); |
$main=$smarty->fetch("$main_file.tpl"); |
41 |
|
|
42 |
include("common.inc"); |
include("common.inc"); |
43 |
|
|
44 |
|
$smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, Section_title=>$title ) ); |
45 |
|
|
46 |
$smarty->assign( array(back_url=>"$section.php", MAIN=>$main)); |
$smarty->assign( array(back_url=>"$section.php", MAIN=>$main)); |
47 |
|
|
48 |
$smarty->display("index.tpl"); |
$smarty->display("index.tpl"); |