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