19 |
|
|
20 |
// fetch news |
// fetch news |
21 |
|
|
22 |
$sth = $dbh->prepare("select id,title from news where type<>'e' and type<>'p' and $visible_is_true order by date desc limit 5"); |
$sth = $dbh->prepare("select id,title from news where (type='n' or type='c' or type='a' or type='i' or type='r' or type='p') and $visible_is_true order by date desc limit 5"); |
23 |
$sth->execute(); |
$sth->execute(); |
24 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
25 |
$news[]=$row; |
$news[]=$row; |
26 |
} |
} |
27 |
$smarty->assign("news",$news); |
$smarty->assign("news",$news); |
28 |
|
|
29 |
$sth = $dbh->prepare("select id,title from news where type='e' and $visible_is_true order by priority desc,date desc limit 5"); |
$sth = $dbh->prepare("select id,title from news where (type='e' or type='f') and $visible_is_true order by priority desc,date desc limit 5"); |
30 |
$sth->execute(); |
$sth->execute(); |
31 |
while ($row=$sth->fetchrow_hash()) { |
while ($row=$sth->fetchrow_hash()) { |
32 |
$events[]=$row; |
$events[]=$row; |
74 |
|
|
75 |
include("banner.inc"); |
include("banner.inc"); |
76 |
|
|
77 |
function check_required() { |
// newsletter |
|
global $inputs_required; |
|
|
global $inputs_required_type; |
|
|
$ok=1; |
|
|
if (isset($inputs_required)) { |
|
|
foreach ($inputs_required as $i) { |
|
|
if (! isset($GLOBALS[$i]) || $GLOBALS[$i] == "") $ok=0; |
|
|
switch (strtolower($inputs_required_type[$i])) { |
|
|
case 'email': |
|
|
if (!strstr($GLOBALS[$i],'@')) $ok=0; |
|
|
} |
|
|
// print "$i: $GLOBALS[$i] type: $inputs_required_type[$i] $ok -- "; |
|
78 |
|
|
79 |
} |
if ($from == "investor" || $form == "new" || $section == "investor" || $section=="new" ) { |
80 |
} else { |
//include("inc/newsletter.php"); |
|
print "<!-- no inputs required -->"; |
|
|
} |
|
|
return $ok; |
|
81 |
} |
} |
82 |
|
|
83 |
?> |
?> |