Changeset 457 for trunk/calendar_new/inc


Ignore:
Timestamp:
09/22/08 16:44:30 (16 years ago)
Author:
niltonneto
Message:

Alterações feitas por Alexandre Muller.
Melhorias e correção na versão AJAX da Agenda.
Email: amuller@…

Location:
trunk/calendar_new/inc
Files:
2 edited

Legend:

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

    r420 r457  
    5353                // Performing SQL query 
    5454                $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)."))"; 
     55                if (!$this->db->query($query)) 
     56                        return false; 
     57 
     58                while($this->db->next_record()) 
     59                        $result[] = $this->db->row(); 
     60 
     61                return $result; 
     62        } 
     63 
     64        function requestDetailsEvent($id) { 
     65                // Performing SQL query 
     66                $query = "SELECT title, description, datetime, edatetime, groups, location FROM phpgw_cal where (owner = '".$this->user_id."') and (cal_id = ".$id.")"; 
    5567                if (!$this->db->query($query)) 
    5668                        return false; 
  • trunk/calendar_new/inc/class.uicalendar.inc.php

    r437 r457  
    2323                $start = isset ($_REQUEST["start"]) ? $_REQUEST["start"] : NULL; 
    2424                $end = isset ($_REQUEST["end"]) ? $_REQUEST["end"] : NULL; 
    25                 $description = isset ($_REQUEST["desc"]) ? $_REQUEST["desc"] : NULL; 
    26                 if ($start == NULL || $end == NULL || $description == NULL) 
     25                $title = isset ($_REQUEST["title"]) ? $_REQUEST["title"] : NULL; 
     26                if ($start == NULL || $end == NULL || $title == NULL) 
    2727                        return "false;Empty field"; 
    28                 if (!eregi("^[a-zA-Z_.0-9-]*",$description)) 
     28                if (!eregi("^[a-zA-Z_.0-9-]*",$title)) 
    2929                        return "false;Invalid char in description"; 
    3030                if (!eregi("^[0-9]*",$start)) 
     
    3333                        return "false;Wrong formed text"; 
    3434 
    35                 return $this->db_obj->insertEvent($start, $end, $description, $description); 
     35                return $this->db_obj->insertEvent($start, $end, $title); 
    3636        } 
    3737 
     
    6666 
    6767                $retorno = "<today>".date('Ydm',$dayViewTime)."</today>"; 
    68                 include_once("class.bocalendar.inc.php"); 
    69                 $obj = new bocalendar(); 
    7068 
    71                 $fromBo = $obj->requestDayCal($dayViewTime); 
     69                $fromBo = $this->db_obj->requestDayCal($dayViewTime); 
    7270 
    7371 
     
    128126                return $retorno; 
    129127        } 
     128 
     129        function getDetails (){ 
     130                $eventId = isset ($_REQUEST["id"]) ? $_REQUEST["id"] : NULL; 
     131                $fromBo = $this->db_obj->requestDetailsEvent($eventId); 
     132                $_SESSION['debug'] = $fromBo; 
     133                foreach ($fromBo[0] as $field => $line) { 
     134                        $buff .= "<".$field.">".$line."</".$field.">"; 
     135                } 
     136                return $buff; 
     137        } 
     138 
    130139        function getViewMonth () { 
    131140                $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())); 
Note: See TracChangeset for help on using the changeset viewer.