phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/inc class.matrixview.inc.php


From: Dave Hall
Subject: [Phpgroupware-cvs] phpgwapi/inc class.matrixview.inc.php
Date: Thu, 28 Dec 2006 05:59:00 +0000

CVSROOT:        /sources/phpgwapi
Module name:    phpgwapi
Changes by:     Dave Hall <skwashd>     06/12/28 05:59:00

Modified files:
        inc            : class.matrixview.inc.php 

Log message:
        notices and cleanup

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.matrixview.inc.php?cvsroot=phpgwapi&r1=1.14&r2=1.15

Patches:
Index: class.matrixview.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/inc/class.matrixview.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- class.matrixview.inc.php    18 Sep 2006 03:08:43 -0000      1.14
+++ class.matrixview.inc.php    28 Dec 2006 05:59:00 -0000      1.15
@@ -7,7 +7,7 @@
        * @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package phpgwapi
        * @subpackage gui
-       * @version $Id: class.matrixview.inc.php,v 1.14 2006/09/18 03:08:43 
skwashd Exp $
+       * @version $Id: class.matrixview.inc.php,v 1.15 2006/12/28 05:59:00 
skwashd Exp $
        */
 
        /**
@@ -52,6 +52,12 @@
                */
                function matrixview ($month_int = 0, $year_int = 0)
                {
+                       if ( !$month_int )
+                       {
+                               $month_int = date('n');
+                               $year_int = date('Y');
+                       }
+                       $days = 0;
                        for ( $i = 0; $i < 32; ++$i)
                        {
                                if ( checkdate($month_int, $i, $year_int) )
@@ -194,15 +200,15 @@
                        // get days of desired month (month submitted in 
constructor)
 
                        $in = getdate(mktime(0,0,0, 
$this->month+1,0,$this->year));
-                       $this->sumdays = $in[mday];
-                       $this->monthname = $in[month];
+                       $this->sumdays = $in['mday'];
+                       $this->monthname = $in['month'];
 
                        $this->out_monthyear($form_link);
 
-                       echo '<div align="center">' . "\n";
-                       echo '<table border="0">' . "\n";
+                       echo "<table border=\"0\" align=\"center\">\n";
 
                        $this->out_header();
+                       $this->out_ruler();
 
                        // loop through number of items
                        for($z=0;$z<$this->items_count;$z++)
@@ -230,11 +236,9 @@
                                }
 
                                echo '</tr>' . "\n";
-                               $this->out_ruler();
                        }
 
                        echo '</table>';
-                       echo '</div>' . "\n";
                }
 
                /**
@@ -246,21 +250,17 @@
                */
                function out_header ()
                {
-                       echo '<tr>' . "\n";
-                       echo '<td height="1" colspan="'; echo $this->sumdays+1; 
echo '" bgcolor="black"><img src="' . $this->image1pix . '"></td>' . "\n";
-                       echo '</tr>' . "\n";
+                       echo "<thead>\n";
                        echo '<tr>' . "\n";
                        echo '<td>' . lang('Title') . '</td>' . "\n";
 
                        for($i=1;$i<$this->sumdays+1;$i++)
                        {
-                               echo '<td bgcolor="'; echo 
$this->color_headerfield; echo '">' . sprintf("%02d",$i) . '</td>' . "\n";
+                               echo "<td>{$i}</td>\n";
                        }
 
                        echo '</tr>' . "\n";
-                       echo '<tr>' . "\n";
-                       echo '<td height="1" colspan="'; echo $this->sumdays+1; 
echo '" bgcolor="black"><img src="' . $this->image1pix . '"></td>' . "\n";
-                       echo '</tr>' . "\n";
+                       echo '</thead>' . "\n";
                }
 
                /**
@@ -272,9 +272,8 @@
                */
                function out_ruler ()
                {
-                       echo '<tr>' . "\n";
-                       echo '<td colspan="'; echo $this->sumdays+1; echo '" 
bgcolor="#999999"><img src="' . $this->image1pix .'"></td>' . "\n";
-                       echo '</tr>' . "\n";
+                       $span = $this->sumdays + 1;
+                       echo "<tfoot>\n<tr>\n<td 
colspan=\"{$span}\">&nbsp;</td>\n</tr>\n</thead>\n";
                }
 
                /**
@@ -287,14 +286,14 @@
                function out_monthyear($form_link)
                {
                        echo '<form action="' . $form_link . '" method="post">' 
. "\n";
+                       echo '<h2>' . lang($this->monthname) ." 
$this->year</h2>\n";
                        echo '<table border="0" width="100%" cellpadding="0" 
cellspacing="0">' . "\n";
                        echo '<tr>' . "\n";
-                       echo '<td align="center"><h2>'; echo 
lang($this->monthname); echo ' '; echo $this->year; echo '</h2></td>' . "\n";
 
                        if($this->selection == 1)
                        {
-                               echo '<td align="right">' . "\n";
-                               echo '<select name="month"'; 
+                               echo '<td colspan="2" align="right">' . "\n";
+                               echo '<select name="month">'; 
 
                                for($i=0;$i<13;$i++)
                                {
@@ -306,11 +305,11 @@
                                        {
                                                unset($sel);
                                        }
-                                       echo '<option value="' . $i . '"' . 
$sel . '>' . $i . '</option>';
+                                       echo "<option value=\"{$i}\" 
$sel>{$i}</option>";
                                }
 
                                echo '</select>' . "\n";
-                               echo '<select name="year"';
+                               echo '<select name="year">';
 
                                for($i = date('Y') -2;$i<date('Y')+5;$i++)
                                {
@@ -322,7 +321,7 @@
                                        {
                                                unset($sel);
                                        }
-                                       echo '<option value="' . $i . '"' . 
$sel . '>' . $i .'</option>'; 
+                                       echo "<option value=\"{$i}\" 
$sel>{$i}</option>";
                                }
 
                                echo '</select>' . "\n";




reply via email to

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