16 |
$smarty = new Smarty; |
$smarty = new Smarty; |
17 |
|
|
18 |
if ($part && file_exists("templates/wap-$part.tpl")) { |
if ($part && file_exists("templates/wap-$part.tpl")) { |
19 |
$dbh->dbh_do("set datestyle='german'"); |
include("stocks.inc"); |
|
|
|
|
$sql="select date(date),time(date),type,current,change,high,low,open from stocks order by stocks.date desc,stocks.insert_date asc limit 2"; |
|
|
$sth = $dbh->prepare("$sql"); |
|
|
$sth->execute(); |
|
|
while ($row=$sth->fetchrow_hash()) { |
|
|
$stock[]=$row; |
|
|
$time=$row[time]; |
|
|
$date=$row[date]; |
|
|
} |
|
|
|
|
|
if ($time == "23:23:23") $time="CLOSE"; |
|
|
|
|
20 |
$smarty->assign(array(stock=>$stock, date=>$date, time=>$time)); |
$smarty->assign(array(stock=>$stock, date=>$date, time=>$time)); |
21 |
$wml=$smarty->fetch("wap-$part.tpl"); |
$wml=$smarty->fetch("wap-$part.tpl"); |
22 |
|
|
24 |
|
|
25 |
$on_page=5; |
$on_page=5; |
26 |
|
|
27 |
$sql_where="where visible is true"; |
$sql_where="where visible is true and type<>'p'"; |
28 |
|
|
29 |
if (!isset($s)) { |
if (!isset($s)) { |
30 |
$sql_limit="limit $on_page"; |
$sql_limit="limit $on_page"; |
52 |
} else { |
} else { |
53 |
$tmp=$html; |
$tmp=$html; |
54 |
} |
} |
55 |
return utf8_encode(htmlspecialchars($tmp)); |
$tmp=str_replace('$','$$',$tmp); |
56 |
|
return utf8_encode(htmlentities($tmp)); |
57 |
} |
} |
58 |
|
|
59 |
|
|