/[corp_html]/investor.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 /investor.php

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

revision 1.3 by dpavlin, Mon Mar 12 16:01:22 2001 UTC revision 1.4 by dpavlin, Mon Mar 12 23:41:49 2001 UTC
# Line 32  if ($part == "analyst") { Line 32  if ($part == "analyst") {
32  } else {  } else {
33          $dbh->dbh_do("set datestyle='german'");          $dbh->dbh_do("set datestyle='german'");
34    
35          $sql="select date,type,current,change,high,low,open from stocks order by date desc limit 2";          $sql="select date(date),time(date),type,current,change,high,low,open from stocks order by stocks.date desc limit 2";
36          $sth = $dbh->prepare("$sql");          $sth = $dbh->prepare("$sql");
37          $sth->execute();          $sth->execute();
38          while ($row=$sth->fetchrow_hash()) {          while ($row=$sth->fetchrow_hash()) {
39                  $stock[]=$row;                  $stock[]=$row;
40                    $time=$row[time];
41                    $date=$row[date];
42          }          }
43    
44          $smarty->assign("stock",$stock);          if ($time == "23:23:23") $time="CLOSE";
45    
46            $smarty->assign(array(stock=>$stock, date=>$date, time=>$time));
47          $main=$smarty->fetch("investor.tpl");          $main=$smarty->fetch("investor.tpl");
48  }  }
49  $smarty->assign("MAIN",$main);  $smarty->assign("MAIN",$main);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.26