Changeset 457 for trunk/calendar_new/inc
- Timestamp:
- 09/22/08 16:44:30 (16 years ago)
- Location:
- trunk/calendar_new/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar_new/inc/class.bocalendar.inc.php
r420 r457 53 53 // Performing SQL query 54 54 $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.")"; 55 67 if (!$this->db->query($query)) 56 68 return false; -
trunk/calendar_new/inc/class.uicalendar.inc.php
r437 r457 23 23 $start = isset ($_REQUEST["start"]) ? $_REQUEST["start"] : NULL; 24 24 $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) 27 27 return "false;Empty field"; 28 if (!eregi("^[a-zA-Z_.0-9-]*",$ description))28 if (!eregi("^[a-zA-Z_.0-9-]*",$title)) 29 29 return "false;Invalid char in description"; 30 30 if (!eregi("^[0-9]*",$start)) … … 33 33 return "false;Wrong formed text"; 34 34 35 return $this->db_obj->insertEvent($start, $end, $ description, $description);35 return $this->db_obj->insertEvent($start, $end, $title); 36 36 } 37 37 … … 66 66 67 67 $retorno = "<today>".date('Ydm',$dayViewTime)."</today>"; 68 include_once("class.bocalendar.inc.php");69 $obj = new bocalendar();70 68 71 $fromBo = $ obj->requestDayCal($dayViewTime);69 $fromBo = $this->db_obj->requestDayCal($dayViewTime); 72 70 73 71 … … 128 126 return $retorno; 129 127 } 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 130 139 function getViewMonth () { 131 140 $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.