[Alba-desarrollo] SVN Alba r4746 - in prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador: actions templates

commits en pressenter.com.ar commits en pressenter.com.ar
Mie Jun 13 21:49:47 CEST 2007


Author: josx
Date: 2007-06-13 16:48:59 -0300 (Wed, 13 Jun 2007)
New Revision: 4746

Added:
   prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/actions/components.class.php
   prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/_verPorDia.php
Removed:
   prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/verPorDiaSuccess.php
Modified:
   prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/actions/actions.class.php
   prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/indexSuccess.php
Log:
Se agrego un componente para acceder a la visualizacion diaria del calendario

Modified: prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/actions/actions.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/actions/actions.class.php	2007-06-13 18:45:53 UTC (rev 4745)
+++ prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/actions/actions.class.php	2007-06-13 19:48:59 UTC (rev 4746)
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * icalVisualizador actions.
  *
@@ -21,79 +20,14 @@
    */
   public function executeIndex()
   {
-    $this->forward('default', 'module');
-  }
+//     $this->date_component = "20070407";
 
-        // function to determine maximum necessary columns per day
-        // actually an algorithm to get the smallest multiple for two numbers
-        private function kgv($a, $b) {
-            $x = $a;
-            $y = $b;
-            while ($x != $y) {
-                if ($x < $y) $x += $a;
-                else $y += $b;
-            }
-            return $x;
-        }
 
+    $this->archivo = "/tmp/pepe.ics";
 
+    $this->date_component="20070404";
+  }
 
 
-    public function  executeVerPorDia() {
-//         $aWeek = array('Domingo','Lunes','Martes'.'Miercoles','Jueves','Viernes','Sabado');
-        $aAllDay = array();
-        $aTime  = array();
-        $aEvent = array();
-
-        $minutes = 60;
-        $time_start = "7:00";
-        $time_end = "23:00";
-
-        $date = $this->getRequestParameter('date');
-        if($date) {
-            $unix_time = strtotime($date);
-        } else {
-            $unix_time = strtotime ("now");
-        }
-
-        $day_of_week = date("w", $unix_time); // get number of the day of the week
-        $day_start_of_week = $unix_time - ($day_of_week * 86400); // get the starts day the of this week
-        $day_end_of_week = $day_start_of_week + (7 * 86400); // get the end day the of this week
-        for($day= $day_start_of_week; $day < $day_end_of_week; $day += 86400) {
-             $aWeek[] = array ( 'day' =>  $day );
-         }
-
-        // get all time between time_start and time_end
-        for($time = strtotime($time_start),  $max_time = strtotime($time_end) ; $time < $max_time; $time += (15*60)) {
-            $aTime[] = $time;
-        }
-
-
-        require(sfConfig::get('sf_app_module_dir')."/icalVisualizador/".sfConfig::get('sf_app_module_lib_dir_name')."/ical_parser.php");
-
-
-        $aEvent = @icalToArray("/tmp/pepe.ics");
-
-
-        $nbrGridCols = 1;
-        foreach($aEvent as $day) {
-            foreach($day as $time) {
-                foreach($time as $event) {
-                     $nbrGridCols = $this->kgv($nbrGridCols, ($event['event_overlap'] + 1));
-                }
-            }
-        }
-
-        $this->nbrGridCols = $nbrGridCols;
-        $this->aEvent = $aEvent;
-        $this->aWeek = $aWeek;
-        $this->aAllDay = $aAllDay;
-        $this->l_calendar = "";
-        $this->calendar_name = "XXXX";
-        $this->date = $unix_time;
-        $this->aTime = $aTime;
-    }
-
 }
-
 ?>
\ No newline at end of file

Added: prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/actions/components.class.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/actions/components.class.php	2007-06-13 18:45:53 UTC (rev 4745)
+++ prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/actions/components.class.php	2007-06-13 19:48:59 UTC (rev 4746)
@@ -0,0 +1,96 @@
+<?php
+
+/**
+ * icalVisualizador components.
+ *
+ * @package    alba
+ * @subpackage icalVisualizador
+ * @author     José Luis Di Biase <josx en interorganic.com.ar>
+ * @author     Héctor Sanchez <hsanchez en pressenter.com.ar>
+ * @author     Fernando Toledo <ftoledo en pressenter.com.ar>
+ * @version    SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
+ * @filesource
+ * @license GPL
+ */
+
+class icalVisualizadorComponents extends sfComponents
+{
+
+        // function to determine maximum necessary columns per day
+        // actually an algorithm to get the smallest multiple for two numbers
+        private function kgv($a, $b) {
+            $x = $a;
+            $y = $b;
+            while ($x != $y) {
+                if ($x < $y) $x += $a;
+                else $y += $b;
+            }
+            return $x;
+        }
+
+
+    public function  executeVerPorDia() {
+//         $aWeek = array('Domingo','Lunes','Martes'.'Miercoles','Jueves','Viernes','Sabado');
+        $aAllDay = array();
+        $aTime  = array();
+        $aEvent = array();
+
+        $minutes = 60;
+        $time_start = "7:00";
+        $time_end = "23:00";
+
+
+        if(!$this->getRequestParameter('date')) {
+            if($this->date_component) {
+                $date = $this->date_component;    
+            } else {
+                $date = date("Ymd");
+            }
+        } else {
+            $date = $this->getRequestParameter('date');
+        }
+
+        $unix_time = strtotime($date);
+
+
+        $day_of_week = date("w", $unix_time); // get number of the day of the week
+        $day_start_of_week = $unix_time - ($day_of_week * 86400); // get the starts day the of this week
+        $day_end_of_week = $day_start_of_week + (7 * 86400); // get the end day the of this week
+        for($day= $day_start_of_week; $day < $day_end_of_week; $day += 86400) {
+             $aWeek[] = array ( 'day' =>  $day );
+         }
+
+        // get all time between time_start and time_end
+        for($time = strtotime($time_start),  $max_time = strtotime($time_end) ; $time < $max_time; $time += (15*60)) {
+            $aTime[] = $time;
+        }
+
+
+        require(sfConfig::get('sf_app_module_dir')."/icalVisualizador/".sfConfig::get('sf_app_module_lib_dir_name')."/ical_parser.php");
+
+
+        $aEvent = @icalToArray($this->archivo);
+
+
+        $nbrGridCols = 1;
+        foreach($aEvent as $day) {
+            foreach($day as $time) {
+                foreach($time as $event) {
+                     $nbrGridCols = $this->kgv($nbrGridCols, ($event['event_overlap'] + 1));
+                }
+            }
+        }
+
+        $this->nbrGridCols = $nbrGridCols;
+        $this->aEvent = $aEvent;
+        $this->aWeek = $aWeek;
+        $this->aAllDay = $aAllDay;
+        $this->l_calendar = "";
+        $this->calendar_name = "XXXX";
+        $this->date = $unix_time;
+        $this->aTime = $aTime;
+    }
+
+}
+
+?>
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/actions/components.class.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/_verPorDia.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/_verPorDia.php	2007-06-13 18:45:53 UTC (rev 4745)
+++ prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/_verPorDia.php	2007-06-13 19:48:59 UTC (rev 4746)
@@ -0,0 +1,165 @@
+<center>
+<div id="icalVisualizador">
+<table border="0" width="700" cellspacing="0" cellpadding="0">
+    <tr>
+        <td width="520" valign="top">
+            <table width="520" border="0" cellspacing="0" cellpadding="0" class="calborder">
+                <tr>
+                    <td align="center" valign="middle">
+                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
+                            <tr valign="top">
+                                <td align="left" width="400" class="title">
+                                    <h1><?php echo date("F j, Y", $date);?></h1>
+                                    <span class="V9G"><?php echo $calendar_name?> <?php echo $l_calendar?></span></td>
+                                <td align="right" width="120" class="navback">	
+                                    <div style="padding-top: 3px;">
+                                        <table width="120" border="0" cellpadding="0" cellspacing="0">
+                                            <tr valign="top">
+                                                <td><a class="psf" href="?cal={CAL}&amp;getdate={GETDATE}"><img src="<?php echo sfContext::getInstance()->getRequest()->getRelativeUrlRoot()?>/icalVisualizador/images/day_on.gif" alt="{L_DAY}" border="0" /></a></td>
+                                                <td><a class="psf" href="week.php?cal={CAL}&amp;getdate={GETDATE}"><img src="<?php echo sfContext::getInstance()->getRequest()->getRelativeUrlRoot()?>/icalVisualizador/images/week_on.gif" alt="{L_WEEK}" border="0" /></a></td>
+                                                <td><a class="psf" href="month.php?cal={CAL}&amp;getdate={GETDATE}"><img src="<?php echo sfContext::getInstance()->getRequest()->getRelativeUrlRoot()?>/icalVisualizador/images/month_on.gif" alt="{L_MONTH}" border="0" /></a></td>
+                                                <td><a class="psf" href="year.php?cal={CAL}&amp;getdate={GETDATE}"><img src="<?php echo sfContext::getInstance()->getRequest()->getRelativeUrlRoot()?>/icalVisualizador/images/year_on.gif" alt="{L_YEAR}" border="0" /></a></td>
+                                            </tr>
+                                        </table>
+                                    </div>
+                                </td>
+                            </tr>
+                            <tr>	
+                                <td colspan="2">
+                                    <table width="100%" border="0" cellspacing="0" cellpadding="2">
+                                        <tr>
+                                            <td align="left" valign="top" width="20" class="rowOff2" onmouseover="this.className='rowOn2'" onmouseout="this.className='rowOff2'" onclick="window.location.href='?cal={CAL}&amp;date=<?php echo date('Ymd', strtotime("-1 day",  $date))?>'"><span class="V12"><a class="psf" href="?cal={CAL}&amp;date=<?php echo date('Ymd', strtotime("-1 day",  $date))?>">&laquo;</a></span>
+                                            </td>
+
+                                            <?php 
+                                                    $i=0; 
+                                                    $day_of_week = date('w', $date);
+                                                    foreach($aWeek as $week) {
+                                            ?>
+                                            <td width="14%" align="center" class="<?php echo ($i == $day_of_week)?'rowToday':'rowOff';?>" onmouseover="this.className='rowOn'" onmouseout="this.className='<?php echo ($i == $day_of_week)?'rowToday':'rowOff';?>'" onclick="window.location.href='?cal={CAL}&amp;date=<?php echo date('Ymd',$week['day'])?>'"><span class="V9BOLD"><a class="ps3" href="?cal={CAL}&amp;date=<?php echo date('Ymd',$week['day'])?>"><?php echo date('F j, Y',$week['day'])?></a></span>
+                                            </td>
+                                            <?php       $i++;
+                                                    } 
+                                            ?>
+
+                                            <td align="right" valign="top" width="20" class="rowOff" onmouseover="this.className='rowOn'" onmouseout="this.className='rowOff'" onclick="window.location.href='?cal={CAL}&amp;date=<?php echo date('Ymd', strtotime("+1 day",  $date))?>'"><span class="V12"><a class="psf" href="?cal={CAL}&amp;date=<?php echo date('Ymd', strtotime("+1 day",  $date))?>">&raquo;</a></span>
+                                            </td>
+                                        </tr>	
+                                    </table>
+                                </td>
+                            </tr>
+                        </table>
+                    </td>
+                </tr>   
+                <tr id="allday">
+                    <td>
+                        <?php foreach($aAllDay as $allDay) { ?>
+                        <div class="alldaybg_<?php echo $allDay['num']?>">
+                        <?php echo $allDay['Name']?>
+                        </div>
+                        <?php } ?>
+                    </td>
+                </tr>
+
+                <tr>
+		  <td align="center" valign="top">
+                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
+                        <?php 
+                            $date_ymd = date("Ymd", $date);
+                            for($i = 0, $max = count($aTime); $i < $max; $i += 4) { 
+                                $time_idx0 = date("Gi",$aTime[$i]);
+                                $time_idx1 = date("Gi",$aTime[($i+1)]);
+                                $time_idx2 = date("Gi",$aTime[($i+2)]);
+                                $time_idx3 = date("Gi",$aTime[($i+3)]);
+
+                                if(!(  array_key_exists($date_ymd, $aEvent) AND 
+                                    (array_key_exists($time_idx0, $aEvent[$date_ymd]) OR
+                                    array_key_exists($time_idx1, $aEvent[$date_ymd]) OR
+                                    array_key_exists($time_idx2, $aEvent[$date_ymd]) OR
+                                    array_key_exists($time_idx3, $aEvent[$date_ymd])) 
+                                    )) { 
+                        ?>
+                        <tr>
+                            <td rowspan="4" align="center" valign="top" width="60" class="timeborder"><?php echo date("H:i A",$aTime[$i])?></td>
+                            <td bgcolor="#a1a5a9" width="1" height="15"></td>
+                            <td colspan="<?php echo $nbrGridCols?>" class="dayborder">&nbsp;</td>
+                        </tr>
+                        <tr>
+                            <td bgcolor="#a1a5a9" width="1" height="15"></td>
+                            <td colspan="<?php echo $nbrGridCols?>" class="dayborder2">&nbsp;</td>
+                        </tr>
+                        <tr>
+                            <td bgcolor="#a1a5a9" width="1" height="15"></td>
+                            <td colspan="<?php echo $nbrGridCols?>" class="dayborder">&nbsp;</td>
+                        </tr>
+                        <tr>
+                            <td bgcolor="#a1a5a9" width="1" height="15"></td>
+                            <td colspan="<?php echo $nbrGridCols?>" class="dayborder2">&nbsp;</td>
+                        </tr>
+                        <?php 
+// Cuando tiene eventos superpuestos el max es el colspan de las horas que no tienen eventos ( default 1)
+// Pero cada uno de los que tiene evento tiene si es despues de en punto el que traia pero luego debe ser el 
+                                } else {
+                                    for($j=0;$j<4;$j++) {
+                                        if($j!=0) { 
+                        ?>
+                            <tr>
+                                <td bgcolor="#a1a5a9" width="1" height="15"></td>
+                        <?php           } else {  ?>
+                            <tr>
+                                <td rowspan="4" align="center" valign="top" width="60" class="timeborder"><?php echo date("H:i A",$aTime[$i])?></td>
+                                <td bgcolor="#a1a5a9" width="1" height="15"></td>
+                        <?php           }
+                                        $var_time_idx = "time_idx".$j;
+                                        if(array_key_exists($$var_time_idx, $aEvent[$date_ymd])) {
+                                            $k=0;
+                                            foreach($aEvent[$date_ymd][$$var_time_idx] as $event) {
+                                                $k++;
+                                                $rowspan = ceil(($event['event_length'] / 60 ) / 15); // en el array esta en seg lo divido 60 y obtengo min luego divido 15 min (que es una linea de rowspan y obtengo cantidad de lineas hacia abajo a rellenar
+                        ?>
+
+<td rowspan="<?php echo $rowspan?>" width="<?php echo floor(460/($event['event_overlap']+1))?>" colspan="<?php echo floor($nbrGridCols / ($event['event_overlap']+1)) ?>" align="left" valign="top" class="eventbg2_1">
+    <div class="eventfont">
+        <div class="eventbg_1"><b><?php echo date("H:i A", $event['start_unixtime'])?></b> - <?php echo date("H:i A", $event['end_unixtime'])?></div>
+        <div class="padd" style="width:<?php echo floor(460/($event['event_overlap']+1))?>px">
+        <a class="ps" title="<?php echo $event['event_text']?>" href="#" onclick="openEventWindow(0); return false;"><?php echo $event['event_text']?></a>
+        </div>
+    </div>
+</td>
+                        <?php               }
+                                        } 
+
+                                        if($j==0) {
+                        ?>
+                          <!--              <td colspan="<?php echo $nbrGridCols?>"  class="dayborder">&nbsp;</td>-->
+                                </tr>
+                        <?php
+                                        } else {
+                        ?>
+<!--                            <td colspan="<?php echo $nbrGridCols?>"  class="dayborder<?php echo ($j%2==0)?'':'2'?>">&nbsp;</td>-->  
+                                </tr>
+                        <? 
+                                        }
+                                    }
+                             } ?>
+                        <?php } ?>
+                    </table>
+                </td>
+            </tr>
+        </table>
+        <table width="100%" border="0" cellpadding="0" cellspacing="0">
+            <tr>
+                <td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td>
+                <td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td>
+                <td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td>
+            </tr>
+        </table>
+    </td>
+    <td width="10"><img src="images/spacer.gif" width="10" height="1" alt=" " /></td>
+    <td width="170" valign="top">
+
+</td>
+</tr>
+</table>
+</div>
+</center>
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/_verPorDia.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Modified: prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/indexSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/indexSuccess.php	2007-06-13 18:45:53 UTC (rev 4745)
+++ prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/indexSuccess.php	2007-06-13 19:48:59 UTC (rev 4746)
@@ -0,0 +1 @@
+<?php include_component('icalVisualizador', 'verPorDia', array('archivo' => $archivo, 'date_component' => $date_component)) ?>
\ No newline at end of file

Deleted: prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/verPorDiaSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/verPorDiaSuccess.php	2007-06-13 18:45:53 UTC (rev 4745)
+++ prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/verPorDiaSuccess.php	2007-06-13 19:48:59 UTC (rev 4746)
@@ -1,165 +0,0 @@
-<center>
-<div id="icalVisualizador">
-<table border="0" width="700" cellspacing="0" cellpadding="0">
-    <tr>
-        <td width="520" valign="top">
-            <table width="520" border="0" cellspacing="0" cellpadding="0" class="calborder">
-                <tr>
-                    <td align="center" valign="middle">
-                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
-                            <tr valign="top">
-                                <td align="left" width="400" class="title">
-                                    <h1><?php echo date("F j, Y", $date);?></h1>
-                                    <span class="V9G"><?php echo $calendar_name?> <?php echo $l_calendar?></span></td>
-                                <td align="right" width="120" class="navback">	
-                                    <div style="padding-top: 3px;">
-                                        <table width="120" border="0" cellpadding="0" cellspacing="0">
-                                            <tr valign="top">
-                                                <td><a class="psf" href="verPorDia?cal={CAL}&amp;getdate={GETDATE}"><img src="<?php echo sfContext::getInstance()->getRequest()->getRelativeUrlRoot()?>/icalVisualizador/images/day_on.gif" alt="{L_DAY}" border="0" /></a></td>
-                                                <td><a class="psf" href="week.php?cal={CAL}&amp;getdate={GETDATE}"><img src="<?php echo sfContext::getInstance()->getRequest()->getRelativeUrlRoot()?>/icalVisualizador/images/week_on.gif" alt="{L_WEEK}" border="0" /></a></td>
-                                                <td><a class="psf" href="month.php?cal={CAL}&amp;getdate={GETDATE}"><img src="<?php echo sfContext::getInstance()->getRequest()->getRelativeUrlRoot()?>/icalVisualizador/images/month_on.gif" alt="{L_MONTH}" border="0" /></a></td>
-                                                <td><a class="psf" href="year.php?cal={CAL}&amp;getdate={GETDATE}"><img src="<?php echo sfContext::getInstance()->getRequest()->getRelativeUrlRoot()?>/icalVisualizador/images/year_on.gif" alt="{L_YEAR}" border="0" /></a></td>
-                                            </tr>
-                                        </table>
-                                    </div>
-                                </td>
-                            </tr>
-                            <tr>	
-                                <td colspan="2">
-                                    <table width="100%" border="0" cellspacing="0" cellpadding="2">
-                                        <tr>
-                                            <td align="left" valign="top" width="20" class="rowOff2" onmouseover="this.className='rowOn2'" onmouseout="this.className='rowOff2'" onclick="window.location.href='verPorDia?cal={CAL}&amp;date=<?php echo date('Ymd', strtotime("-1 day",  $date))?>'"><span class="V12"><a class="psf" href="verPorDia?cal={CAL}&amp;date=<?php echo date('Ymd', strtotime("-1 day",  $date))?>">&laquo;</a></span>
-                                            </td>
-
-                                            <?php 
-                                                    $i=0; 
-                                                    $day_of_week = date('w', $date);
-                                                    foreach($aWeek as $week) {
-                                            ?>
-                                            <td width="14%" align="center" class="<?php echo ($i == $day_of_week)?'rowToday':'rowOff';?>" onmouseover="this.className='rowOn'" onmouseout="this.className='<?php echo ($i == $day_of_week)?'rowToday':'rowOff';?>'" onclick="window.location.href='verPorDia?cal={CAL}&amp;date=<?php echo date('Ymd',$week['day'])?>'"><span class="V9BOLD"><a class="ps3" href="verPorDia?cal={CAL}&amp;date=<?php echo date('Ymd',$week['day'])?>"><?php echo date('F j, Y',$week['day'])?></a></span>
-                                            </td>
-                                            <?php       $i++;
-                                                    } 
-                                            ?>
-
-                                            <td align="right" valign="top" width="20" class="rowOff" onmouseover="this.className='rowOn'" onmouseout="this.className='rowOff'" onclick="window.location.href='verPorDia?cal={CAL}&amp;date=<?php echo date('Ymd', strtotime("+1 day",  $date))?>'"><span class="V12"><a class="psf" href="verPorDia?cal={CAL}&amp;date=<?php echo date('Ymd', strtotime("+1 day",  $date))?>">&raquo;</a></span>
-                                            </td>
-                                        </tr>	
-                                    </table>
-                                </td>
-                            </tr>
-                        </table>
-                    </td>
-                </tr>   
-                <tr id="allday">
-                    <td>
-                        <?php foreach($aAllDay as $allDay) { ?>
-                        <div class="alldaybg_<?php echo $allDay['num']?>">
-                        <?php echo $allDay['Name']?>
-                        </div>
-                        <?php } ?>
-                    </td>
-                </tr>
-
-                <tr>
-		  <td align="center" valign="top">
-                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
-                        <?php 
-                            $date_ymd = date("Ymd", $date);
-                            for($i = 0, $max = count($aTime); $i < $max; $i += 4) { 
-                                $time_idx0 = date("Gi",$aTime[$i]);
-                                $time_idx1 = date("Gi",$aTime[($i+1)]);
-                                $time_idx2 = date("Gi",$aTime[($i+2)]);
-                                $time_idx3 = date("Gi",$aTime[($i+3)]);
-
-                                if(!(  array_key_exists($date_ymd, $aEvent) AND 
-                                    (array_key_exists($time_idx0, $aEvent[$date_ymd]) OR
-                                    array_key_exists($time_idx1, $aEvent[$date_ymd]) OR
-                                    array_key_exists($time_idx2, $aEvent[$date_ymd]) OR
-                                    array_key_exists($time_idx3, $aEvent[$date_ymd])) 
-                                    )) { 
-                        ?>
-                        <tr>
-                            <td rowspan="4" align="center" valign="top" width="60" class="timeborder"><?php echo date("H:i A",$aTime[$i])?></td>
-                            <td bgcolor="#a1a5a9" width="1" height="15"></td>
-                            <td colspan="<?php echo $nbrGridCols?>" class="dayborder">&nbsp;</td>
-                        </tr>
-                        <tr>
-                            <td bgcolor="#a1a5a9" width="1" height="15"></td>
-                            <td colspan="<?php echo $nbrGridCols?>" class="dayborder2">&nbsp;</td>
-                        </tr>
-                        <tr>
-                            <td bgcolor="#a1a5a9" width="1" height="15"></td>
-                            <td colspan="<?php echo $nbrGridCols?>" class="dayborder">&nbsp;</td>
-                        </tr>
-                        <tr>
-                            <td bgcolor="#a1a5a9" width="1" height="15"></td>
-                            <td colspan="<?php echo $nbrGridCols?>" class="dayborder2">&nbsp;</td>
-                        </tr>
-                        <?php 
-// Cuando tiene eventos superpuestos el max es el colspan de las horas que no tienen eventos ( default 1)
-// Pero cada uno de los que tiene evento tiene si es despues de en punto el que traia pero luego debe ser el 
-                                } else {
-                                    for($j=0;$j<4;$j++) {
-                                        if($j!=0) { 
-                        ?>
-                            <tr>
-                                <td bgcolor="#a1a5a9" width="1" height="15"></td>
-                        <?php           } else {  ?>
-                            <tr>
-                                <td rowspan="4" align="center" valign="top" width="60" class="timeborder"><?php echo date("H:i A",$aTime[$i])?></td>
-                                <td bgcolor="#a1a5a9" width="1" height="15"></td>
-                        <?php           }
-                                        $var_time_idx = "time_idx".$j;
-                                        if(array_key_exists($$var_time_idx, $aEvent[$date_ymd])) {
-                                            $k=0;
-                                            foreach($aEvent[$date_ymd][$$var_time_idx] as $event) {
-                                                $k++;
-                                                $rowspan = ceil(($event['event_length'] / 60 ) / 15); // en el array esta en seg lo divido 60 y obtengo min luego divido 15 min (que es una linea de rowspan y obtengo cantidad de lineas hacia abajo a rellenar
-                        ?>
-
-<td rowspan="<?php echo $rowspan?>" width="<?php echo floor(460/($event['event_overlap']+1))?>" colspan="<?php echo floor($nbrGridCols / ($event['event_overlap']+1)) ?>" align="left" valign="top" class="eventbg2_1">
-    <div class="eventfont">
-        <div class="eventbg_1"><b><?php echo date("H:i A", $event['start_unixtime'])?></b> - <?php echo date("H:i A", $event['end_unixtime'])?></div>
-        <div class="padd" style="width:<?php echo floor(460/($event['event_overlap']+1))?>px">
-        <a class="ps" title="<?php echo $event['event_text']?>" href="#" onclick="openEventWindow(0); return false;"><?php echo $event['event_text']?></a>
-        </div>
-    </div>
-</td>
-                        <?php               }
-                                        } 
-
-                                        if($j==0) {
-                        ?>
-                          <!--              <td colspan="<?php echo $nbrGridCols?>"  class="dayborder">&nbsp;</td>-->
-                                </tr>
-                        <?php
-                                        } else {
-                        ?>
-<!--                            <td colspan="<?php echo $nbrGridCols?>"  class="dayborder<?php echo ($j%2==0)?'':'2'?>">&nbsp;</td>-->  
-                                </tr>
-                        <? 
-                                        }
-                                    }
-                             } ?>
-                        <?php } ?>
-                    </table>
-                </td>
-            </tr>
-        </table>
-        <table width="100%" border="0" cellpadding="0" cellspacing="0">
-            <tr>
-                <td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td>
-                <td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td>
-                <td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td>
-            </tr>
-        </table>
-    </td>
-    <td width="10"><img src="images/spacer.gif" width="10" height="1" alt=" " /></td>
-    <td width="170" valign="top">
-
-</td>
-</tr>
-</table>
-</div>
-</center>
\ No newline at end of file




Más información sobre la lista de distribución Alba-desarrollo