Ignore:
Timestamp:
03/12/09 10:43:22 (15 years ago)
Author:
niltonneto
Message:

Implementação do desenvolvedor (amuller).

File:
1 edited

Legend:

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

    r656 r696  
    1818                        $_SESSION['calendar']['server']['db_type'] 
    1919                ); 
    20                 $this -> user_id = $_SESSION['calendar']['user']['account_id'];  
     20                $this -> user_id = $_SESSION['calendar']['user']['account_id']; 
     21                $this -> cat_id  = 0;    
    2122        } 
    2223 
     
    3031        function requestDayCal ($dayTime) { 
    3132                $day = getdate($dayTime); 
    32                 $query = ("SELECT * FROM phpgw_cal where (owner = '".$this->user_id."') and ((datetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and datetime < ".(mktime(0,0,0,$day['mon'],($day['mday']+1),$day['year'])).") or (edatetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and edatetime < ".(mktime(0,0,0,$day['mon'],$day['mday']+1,$day['year']))."))"); 
     33                $query = ("SELECT * FROM phpgw_cal where ".($this->cat_id>0?"(category=".$this->cat_id.") and":"")."(owner = '".$this->user_id."') and ((datetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and datetime < ".(mktime(0,0,0,$day['mon'],($day['mday']+1),$day['year'])).") or (edatetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and edatetime < ".(mktime(0,0,0,$day['mon'],$day['mday']+1,$day['year']))."))"); 
    3334                if (!$this->db->query($query)) 
    3435                        return false; 
     
    5152        function requestWeekCal ($dayTime) { 
    5253                // Performing SQL query 
    53                 $query = "SELECT cal_id, title, description, datetime, edatetime FROM phpgw_cal where (owner = '".$this->user_id."') and ((datetime > ".$dayTime." and datetime < ".($dayTime+604800).") or (edatetime > ".$dayTime." and edatetime < ".($dayTime+604800)."))"; 
     54                $query = "SELECT cal_id, title, description, datetime, edatetime FROM phpgw_cal where ".($this->cat_id>0?"(category=".$this->cat_id.") and":"")." (owner = '".$this->user_id."') and ((datetime > ".$dayTime." and datetime < ".($dayTime+604800).") or (edatetime > ".$dayTime." and edatetime < ".($dayTime+604800)."))"; 
    5455                if (!$this->db->query($query)) 
    5556                        return false; 
     
    7778                // Performing SQL query 
    7879                $day = getdate($dayTime); 
    79                 $query = "SELECT cal_id, title, description, datetime, edatetime FROM phpgw_cal where (owner = '".$this->user_id."') and ((datetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and datetime < ".mktime(0,0,0,$day['mon']+1,$day['mday'],$day['year']).") or (edatetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and edatetime < ".mktime(0,0,0,$day['month']+1,$day['day'],$day['year'])."))"; 
     80                $query = "SELECT cal_id, title, description, datetime, edatetime FROM phpgw_cal where ".($this->cat_id>0?"(category=".$this->cat_id.") and":"")." (owner = '".$this->user_id."') and ((datetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and datetime < ".mktime(0,0,0,$day['mon']+1,$day['mday'],$day['year']).") or (edatetime > ".mktime(0,0,0,$day['mon'],$day['mday'],$day['year'])." and edatetime < ".mktime(0,0,0,$day['month']+1,$day['day'],$day['year'])."))"; 
    8081                if (!$this->db->query($query)) 
    8182                        return false; 
     
    9091        function requestYearCal ($dayTime) { 
    9192                // Performing SQL query 
    92                 $query = "SELECT cal_id, title, description, datetime, edatetime FROM phpgw_cal where (owner = '".$this->user_id."') and ((datetime > ".$dayTime." and datetime < ".($dayTime+31104000).") or (edatetime > ".$dayTime." and edatetime < ".($dayTime+2592000)."))"; 
     93                $query = "SELECT cal_id, title, description, datetime, edatetime FROM phpgw_cal where ".($this->cat_id>0?"(category=".$this->cat_id.") and":"")." (owner = '".$this->user_id."') and ((datetime > ".$dayTime." and datetime < ".($dayTime+31104000).") or (edatetime > ".$dayTime." and edatetime < ".($dayTime+2592000)."))"; 
    9394                if (!$this->db->query($query)) 
    9495                        return false; 
Note: See TracChangeset for help on using the changeset viewer.