Ignore:
Timestamp:
02/06/09 08:41:18 (15 years ago)
Author:
niltonneto
Message:

Alterações feitas pelo desenvolvedor, referente ao expressoCalendar (nova agenda).
Alexandre MUller => amuller@…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoCalendar/inc/class.uicalendar.inc.php

    r656 r665  
    9898 
    9999                $retorno = "<today>".date('Ydm',$dayViewTime)."</today>"; 
    100  
    101                 $fromBo = $this->db_obj->requestDayCal($dayViewTime); 
    102100                // Printing results in XML 
    103101                for($i = $this->workdaystarts; $i <= $this->workdayends; $i = $i + 0.5) 
     
    109107                 
    110108                $retorno .= "</workday>"; 
    111                 } 
    112                         if (is_array($fromBo)) 
    113                                 foreach ($fromBo as $line){ 
    114                                         $retorno .= "<calEvent>"; 
    115                                         $retorno .= "<id>".$line['cal_id']."</id>"; 
    116                                         $retorno .= "<title>".htmlspecialchars($line['title'])."</title>"; 
    117                                         $retorno .= "<description>".htmlspecialchars($line['description'])."</description>"; 
    118                                         $retorno .= "<edatetime>".($line['edatetime']*1000)."</edatetime>"; 
    119                                         $retorno .= "<datetime>".($line['datetime']*1000)."</datetime>";        
    120                                         $retorno .= "</calEvent>"; 
    121                         } 
    122                  
    123                 return $retorno; 
    124         } 
     109                }        
     110                return $retorno; 
     111        } 
     112        function getEventsDay () { 
     113                $dayTime = isset ($_REQUEST["time"]) ?  strtotime(substr($_REQUEST["time"],0,4)."-".substr($_REQUEST["time"],6,2)."-".substr($_REQUEST["time"],4,2)) : strtotime(date('Y-m-d', time())); 
     114                if (isset ($_REQUEST["uid"])) 
     115                        $this->db_obj->user_id = $_REQUEST["uid"]; 
     116                $fromBo = $this->db_obj->requestDayCal($dayTime); 
     117 
     118                if (is_array($fromBo)) 
     119                        foreach ($fromBo as $line){ 
     120                                $retorno .= "<calevent>"; 
     121                                $retorno .= "<id>".$line['cal_id']."</id>"; 
     122                                $retorno .= "<title>".htmlspecialchars($line['title'])."</title>"; 
     123                                $retorno .= "<description>".htmlspecialchars($line['description'])."</description>"; 
     124                                $retorno .= "<edatetime>".($line['edatetime']*1000)."</edatetime>"; 
     125                                $retorno .= "<datetime>".($line['datetime']*1000)."</datetime>"; 
     126                                $retorno .= "</calevent>"; 
     127                        } 
     128                return $retorno; 
     129        } 
     130 
    125131        function getViewWeek () { 
    126132                $dayViewTime = isset ($_REQUEST["time"]) ?  strtotime(substr($_REQUEST["time"],0,4)."-".substr($_REQUEST["time"],6,2)."-".substr($_REQUEST["time"],4,2)) : strtotime(date('Y-m-d', time())); 
     
    129135                if (isset ($_REQUEST["uid"])) 
    130136                        $this->db_obj->user_id = $_REQUEST["uid"]; 
    131  
    132  
    133                 $fromBo = $this->db_obj->requestWeekCal($dayViewTime); 
    134137 
    135138                for($i = $this->workdaystarts; $i <= $this->workdayends; $i = $i + 0.5){ 
     
    146149                } 
    147150 
     151                return $retorno; 
     152        } 
     153        function getEventsWeek () { 
     154                $dayViewTime = isset ($_REQUEST["time"]) ?  strtotime(substr($_REQUEST["time"],0,4)."-".substr($_REQUEST["time"],6,2)."-".substr($_REQUEST["time"],4,2)) : strtotime(date('Y-m-d', time())); 
     155                if (isset($_REQUEST["uid"])) 
     156                        $this->db_obj->user_id = $_REQUEST["uid"]; 
     157 
     158                $dayViewTime -= (date('N', $dayViewTime)%7)*86400; 
     159                $retorno = "<today>".date('Ydm', $dayViewTime)."</today>"; 
     160                if (isset ($_REQUEST["uid"])) 
     161                        $this->db_obj->user_id = $_REQUEST["uid"]; 
     162 
     163 
     164                $fromBo = $this->db_obj->requestWeekCal($dayViewTime); 
     165 
    148166 
    149167                // Printing results in XML 
     
    151169                        foreach ($fromBo as $line) { 
    152170                                if ($line['datetime'] > 0){ 
    153                                         $retorno .= "<calEvent>"; 
     171                                        $retorno .= "<calevent>"; 
    154172                                        $retorno .= "<id>".$line['cal_id']."</id>"; 
    155173                                        $retorno .= "<title>".htmlspecialchars($line['title'])."</title>"; 
     
    157175                                        $retorno .= "<edatetime>".($line['edatetime']*1000)."</edatetime>"; 
    158176                                        $retorno .= "<datetime>".($line['datetime']*1000)."</datetime>"; 
    159                                         $retorno .= "</calEvent>"; 
     177                                        $retorno .= "</calevent>"; 
    160178                                } 
    161179                        } 
    162180                return $retorno; 
    163181        } 
     182 
    164183 
    165184        function getDetails (){ 
     
    171190                return $buff; 
    172191        } 
    173  
     192        function getEventsMonth () { 
     193                $monthViewTime = isset ($_REQUEST["time"]) ?  strtotime(substr($_REQUEST["time"],0,4)."-".substr($_REQUEST["time"],6,2)."-".substr($_REQUEST["time"],4,2)) : strtotime(date('Y-m-d', time())); 
     194                $todayTime = strtotime(date('Y-m', $monthViewTime)."-01"); 
     195                if (isset($_REQUEST["uid"])) 
     196                        $this->db_obj->user_id = $_REQUEST["uid"]; 
     197 
     198                $fromBo = $this->db_obj->requestMonthCal($todayTime); 
     199 
     200                // Printing results in XML 
     201                if (is_array($fromBo)) 
     202                        foreach ($fromBo as $line) { 
     203                                if ($line['datetime'] > 0){ 
     204                                        $retorno .= "<calevent>"; 
     205                                        $retorno .= "<id>".$line['cal_id']."</id>"; 
     206                                        $retorno .= "<title>".htmlspecialchars($line['title'])."</title>"; 
     207                                        $retorno .= "<edatetime>".($line['edatetime']*1000)."</edatetime>"; 
     208                                        $retorno .= "<datetime>".($line['datetime']*1000)."</datetime>"; 
     209                                        $retorno .= "</calevent>"; 
     210                                } 
     211                        } 
     212                return $retorno; 
     213        } 
     214         
    174215        function getViewMonth () { 
    175216                $monthViewTime = isset ($_REQUEST["time"]) ?  strtotime(substr($_REQUEST["time"],0,4)."-".substr($_REQUEST["time"],6,2)."-".substr($_REQUEST["time"],4,2)) : strtotime(date('Y-m-d', time())); 
     
    179220                $todayTime = strtotime(date('Y-m', $monthViewTime)."-01"); 
    180221                $retorno = "<today>".date('Ydm', $monthViewTime)."</today>"; 
    181                 $fromBo = $this->db_obj->requestMonthCal($todayTime); 
    182222 
    183223                for ($i=1;$i<=date('t',$monthViewTime);$i++){ 
     
    199239                 } 
    200240 
    201  
     241                return $retorno; 
     242        } 
     243        function getViewYear () { 
     244                $monthViewTime = isset ($_REQUEST["time"]) ?  strtotime(substr($_REQUEST["time"],0,4)."-".substr($_REQUEST["time"],6,2)."-".substr($_REQUEST["time"],4,2)) : strtotime(date('Y-m-d', time())); 
     245 
     246                $todayTime = strtotime(date('Y-m', $monthViewTime)."-01"); 
     247                $retorno = "<today>".date('Ydm', $monthViewTime)."</today>"; 
     248 
     249                $fromBo = $this->db_obj->requestYearCal($todayTime); 
    202250                // Printing results in XML 
    203251                if (is_array($fromBo)) 
    204252                foreach ($fromBo as $line) { 
    205253                        if ($line['datetime'] > 0){ 
    206                                 $retorno .= "<calEvent>"; 
    207                                 $retorno .= "<id>".$line['cal_id']."</id>"; 
    208                                 $retorno .= "<title>".htmlspecialchars($line['title'])."</title>"; 
    209                                 $retorno .= "<edatetime>".($line['edatetime']*1000)."</edatetime>"; 
    210                                 $retorno .= "<datetime>".($line['datetime']*1000)."</datetime>"; 
    211                                 $retorno .= "</calEvent>"; 
    212                         } 
    213                 } 
    214                 return $retorno; 
    215         } 
    216         function getViewYear () { 
    217                 $monthViewTime = isset ($_REQUEST["time"]) ?  strtotime(substr($_REQUEST["time"],0,4)."-".substr($_REQUEST["time"],6,2)."-".substr($_REQUEST["time"],4,2)) : strtotime(date('Y-m-d', time())); 
    218  
    219                 $todayTime = strtotime(date('Y-m', $monthViewTime)."-01"); 
    220                 $retorno = "<today>".date('Ydm', $monthViewTime)."</today>"; 
    221  
    222                 $fromBo = $this->db_obj->requestYearCal($todayTime); 
    223                 // Printing results in XML 
    224                 if (is_array($fromBo)) 
    225                 foreach ($fromBo as $line) { 
    226                         if ($line['datetime'] > 0){ 
    227                                 $retorno .= "<calEvent>"; 
     254                                $retorno .= "<calevent>"; 
    228255                                $retorno .= "<id>".$line['cal_id']."</id>"; 
    229256                                $retorno .= "<datetime>".($line['datetime']*1000)."</datetime>"; 
    230                                 $retorno .= "</calEvent>"; 
     257                                $retorno .= "</calevent>"; 
    231258                        } 
    232259                } 
Note: See TracChangeset for help on using the changeset viewer.