phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: stocks/inc class.ui.inc.php,1.11,1.12 hook_home.


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: stocks/inc class.ui.inc.php,1.11,1.12 hook_home.inc.php,1.13,1.14
Date: Sat, 05 Oct 2002 18:00:27 -0400

Update of /cvsroot/phpgroupware/stocks/inc
In directory subversions:/tmp/cvs-serv32226/inc

Modified Files:
        class.ui.inc.php hook_home.inc.php 
Log Message:
update portalbox functions

Index: class.ui.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/stocks/inc/class.ui.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.ui.inc.php    25 May 2002 00:04:01 -0000      1.11
--- class.ui.inc.php    5 Oct 2002 22:00:24 -0000       1.12
***************
*** 93,132 ****
                function return_html($quotes)
                {
-                       $return_html = '<table cellspacing="1" cellpadding="0" 
border="0" bgcolor="black"><tr><td>'
-                       . '<table cellspacing="1" cellpadding="2" border="0" 
bgcolor="white">'
-                       . '<tr><td><b>' . lang('Name') . '</b></td><td><b>' . 
lang('Symbol') . '</b></td><td align="right"><b>' . lang('Price') . 
'</b></td><td align="right">'
-                       . '<b>&nbsp;' . lang('Change') . '</b></td><td 
align="right"><b>&nbsp;%' . lang('Change') . '</b></td><td align="center"><b>' 
. lang('Date') . '</b></td><td align="center">'
-                                       . '<b>' . lang('Time') . 
'</b></td></tr>';
- 
                        for ($i=0;$i<count($quotes);$i++)
                        {
!                               $q = $quotes[$i];
!                               $symbol = $q['symbol'];
!                               $name = $q['name'];
!                               $price0 = $q['price0']; // todays price
!                               $price1 = $q['price1'];
!                               $price2 = $q['price2'];
!                               $dollarchange = $q['dchange'];
!                               $percentchange = $q['pchange'];
!                               $date = $q['date'];
!                               $time = $q['time'];
!                               $volume = $q['volume'];
! 
!                               if ($dollarchange < 0)
!                               {
!                                       $color = 'red';
!                               }
!                               else
!                               {
!                                       $color = 'green';
!                               }
! 
!                               $return_html .= '<tr><td>' . $name . 
'</td><td>' . $symbol . '</td><td align="right">' . $price0 . '</td><td 
align="right"><font color="'
!                                       . $color . '">' . $dollarchange . 
'</font></td><td align="right"><font color="' . $color . '">' . $percentchange
!                                       . '</font></td><td align="center">' . 
$date . '</td><td align="center">' . $time . '</td></tr>';
                        }
  
!                       $return_html .= '</table></td></tr></table>';
!                       return $return_html;
                }
  
--- 93,127 ----
                function return_html($quotes)
                {
                        for ($i=0;$i<count($quotes);$i++)
                        {
!                               $data[] = array
!                               (
!                                       'symbol'        => 
$quotes[$i]['symbol'],
!                                       'name'          => $quotes[$i]['name'],
!                                       'price0'        => 
$quotes[$i]['price0'],
!                                       'price1'        => 
$quotes[$i]['price1'],
!                                       'price2'        => 
$quotes[$i]['price2'],
!                                       'dollarchange'  => 
$quotes[$i]['dchange'],
!                                       'percentchange' => 
$quotes[$i]['pchange'],
!                                       'date'                  => 
$quotes[$i]['date'],
!                                       'time'                  => 
$quotes[$i]['time'],
!                                       'volume'                => 
$quotes[$i]['volume'],
!                                       'color'                 => 
($quotes[$i]['dchange'] < 0?'red':'green')
!                               );
                        }
  
!                       //_debug_array($data);
! 
!                       $values['extrabox'] = array
!                       (
!                               'lang_name'             => lang('Name'),
!                               'lang_symbol'   => lang('Symbol'),
!                               'lang_price'    => lang('Price'),
!                               'lang_change'   => lang('Change'),
!                               'lang_date'             => lang('Date'),
!                               'lang_time'             => lang('Time'),
!                               'values'                => $data
!                       );
!                       return $values;
                }
  

Index: hook_home.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/stocks/inc/hook_home.inc.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** hook_home.inc.php   3 Oct 2002 23:15:29 -0000       1.13
--- hook_home.inc.php   5 Oct 2002 22:00:24 -0000       1.14
***************
*** 26,29 ****
--- 26,30 ----
                        Array
                        (
+                               'app_name'                                      
=> 'stocks',
                                'title'                                         
=> $title,
                                'width'                                         
=> '100%',





reply via email to

[Prev in Thread] Current Thread [Next in Thread]