/[corp_html]/wap.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /wap.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by dpavlin, Sat Mar 17 16:17:07 2001 UTC revision 1.9 by dpavlin, Tue Jun 19 06:52:17 2001 UTC
# Line 16  require("Smarty.class.php"); Line 16  require("Smarty.class.php");
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    
# Line 36  if ($part && file_exists("templates/wap- Line 24  if ($part && file_exists("templates/wap-
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";

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.26