phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: infolog/calendar/inc class.uicalendar.inc.php,1.


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: infolog/calendar/inc class.uicalendar.inc.php,1.1,1.2
Date: Sun, 12 May 2002 03:51:01 -0400

Update of /cvsroot/phpgroupware/infolog/calendar/inc
In directory subversions:/tmp/cvs-serv1101

Modified Files:
        class.uicalendar.inc.php 
Log Message:
get planner working

Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.uicalendar.inc.php    12 May 2002 07:49:01 -0000      1.1
--- class.uicalendar.inc.php    12 May 2002 07:50:58 -0000      1.2
***************
*** 822,826 ****
                                $cal_id = $GLOBALS['HTTP_GET_VARS']['cal_id'];
                                $event = 
$this->bo->read_entry(intval($GLOBALS['HTTP_GET_VARS']['cal_id']));
!                               
                                if(!$this->bo->can_user_edit($event))
                                {
--- 822,826 ----
                                $cal_id = $GLOBALS['HTTP_GET_VARS']['cal_id'];
                                $event = 
$this->bo->read_entry(intval($GLOBALS['HTTP_GET_VARS']['cal_id']));
! 
                                if(!$this->bo->can_user_edit($event))
                                {
***************
*** 1244,1248 ****
  
                if(floor(phpversion()) == 4)
!               { 
                        eval('
  
--- 1244,1248 ----
  
                if(floor(phpversion()) == 4)
!               {
                        eval('
  
***************
*** 1250,1254 ****
                        
unset($GLOBALS[\'phpgw_info\'][\'flags\'][\'nonavbar\']);
                        $GLOBALS[\'phpgw\']->common->phpgw_header();
!                       
                        $html = CreateObject(\'calendar.html\');
  //                    $html = CreateObject(\'infolog.html\');
--- 1250,1254 ----
                        
unset($GLOBALS[\'phpgw_info\'][\'flags\'][\'nonavbar\']);
                        $GLOBALS[\'phpgw\']->common->phpgw_header();
! 
                        $html = CreateObject(\'calendar.html\');
  //                    $html = CreateObject(\'infolog.html\');
***************
*** 1260,1264 ****
                                15 => 1,
                                16 => 1,
!                               17 => 1, 
                                18 => 2,
                                19 => 2,
--- 1260,1264 ----
                                15 => 1,
                                16 => 1,
!                               17 => 1,
                                18 => 2,
                                19 => 2,
***************
*** 1300,1304 ****
                        $firstday = 
intval(date(\'Ymd\',mktime(0,0,0,$this->bo->month,1,$this->bo->year)));
                        $lastday = 
intval(date(\'Ymd\',mktime(0,0,0,$this->bo->month,$days,$this->bo->year)));
!                       
                        $this->bo->remove_doubles_in_cache($firstday,$lastday);
  
--- 1300,1304 ----
                        $firstday = 
intval(date(\'Ymd\',mktime(0,0,0,$this->bo->month,1,$this->bo->year)));
                        $lastday = 
intval(date(\'Ymd\',mktime(0,0,0,$this->bo->month,$days,$this->bo->year)));
! 
                        $this->bo->remove_doubles_in_cache($firstday,$lastday);
  
***************
*** 1312,1319 ****
                                        echo \'<!-- For Date : \'.$v.\' : Count 
of items : \'.count($daily).\' -->\'."\n";
                                }
!                               for($g=0;$g<count($daily);$g++)
                                {
-                                       $event = $daily[$g];
- 
                                        $view = $html->link(\'/index.php\',
                                                array(
--- 1312,1317 ----
                                        echo \'<!-- For Date : \'.$v.\' : Count 
of items : \'.count($daily).\' -->\'."\n";
                                }
!                               while (list($nul,$event) = @each($daily))
                                {
                                        $view = $html->link(\'/index.php\',
                                                array(
***************
*** 1323,1351 ****
                                        );
  
!                                       $start_cell = $intervals_per_day * 
($event[\'start\'][\'mday\'] - 1);
!                                       $start_cell += 
$interval[$event[\'start\'][\'hour\']];
! 
!                                       $end_cell = $intervals_per_day * 
($event[\'end\'][\'mday\'] - 1);
!                                       $end_cell += 
$interval[$event[\'end\'][\'hour\']];
! 
!                                       $i = 0;                                 
// search for row of parent category
!                                       do {
!                                               ++$i;
!                                               if ($c = $event[\'category\'])
                                                {
!                                                       $cat   = 
$this->planner_category($event[\'category\']);
!                                                       if ($cat[\'parent\'])
!                                                       {
!                                                               $pcat = 
$this->planner_category($c = $cat[\'parent\']);
!                                                       }
!                                                       else
!                                                       {
!                                                               $pcat = $cat;
!                                                       }
                                                }
                                                else
                                                {
!                                                       $cat = $pcat = array( 
\'name\' => lang(\'none\'));
                                                }
                                                $k = $c.\'_\'.$i;
                                                $ka = \'.nr_\'.$k;
--- 1321,1364 ----
                                        );
  
!                                       if ($event[\'start\'][\'month\'] == 
$this->bo->month &&
!                                                $event[\'start\'][\'year\']  
== $this->bo->year)       // event starts in actual month ?
!                                       {
!                                               $start_cell = 
$intervals_per_day * ($event[\'start\'][\'mday\'] - 1);
!                                               $start_cell += 
$interval[$event[\'start\'][\'hour\']];
!                                       }
!                                       else
!                                       {
!                                               $start_cell = 0;
!                                       }
!                                       if ($event[\'end\'][\'month\'] == 
$this->bo->month &&
!                                                $event[\'end\'][\'year\']  == 
$this->bo->year) // event ends in actual month ?
!                                       {
!                                               $end_cell = $intervals_per_day 
* ($event[\'end\'][\'mday\'] - 1);
!                                               $end_cell += 
$interval[$event[\'end\'][\'hour\']];
!                                       }
!                                       else
!                                       {
!                                               $end_cell = $last_cell;
!                                       }
!                                       if ($c = $event[\'category\'])
!                                       {
!                                               list($cat)   = 
$this->planner_category($event[\'category\']);
!                                               if ($cat[\'parent\'])
                                                {
!                                                       list($pcat) = 
$this->planner_category($c = $cat[\'parent\']);
                                                }
                                                else
                                                {
!                                                       $pcat = $cat;
                                                }
+                                       }
+                                       else
+                                       {
+                                               $cat = $pcat = array( \'name\' 
=> lang(\'none\'));
+                                       }
+ 
+                                       $i = 0;                                 
// search for row of parent category
+                                       do {
+                                               ++$i;
                                                $k = $c.\'_\'.$i;
                                                $ka = \'.nr_\'.$k;
***************
*** 1379,1383 ****
                                                $opt .= "colspan=".(1 + 
$end_cell - $start_cell);
                                        }
- 
                                        if ($bgcolor=$cat[\'color\'])
                                        {
--- 1392,1395 ----
***************
*** 1440,1444 ****
  
                        $sb = CreateObject('phpgwapi.sbox');
!       
                        unset($GLOBALS['phpgw_info']['flags']['noheader']);
                        unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
--- 1452,1456 ----
  
                        $sb = CreateObject('phpgwapi.sbox');
! 
                        unset($GLOBALS['phpgw_info']['flags']['noheader']);
                        unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
***************
*** 1471,1475 ****
                                )
                        );
!       
  // View type
                        $var[] = Array(
--- 1483,1487 ----
                                )
                        );
! 
  // View type
                        $var[] = Array(




reply via email to

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