Changeset 492 for trunk/calendar_new/inc
- Timestamp:
- 10/01/08 16:27:03 (16 years ago)
- Location:
- trunk/calendar_new/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar_new/inc/class.bocalendar.inc.php
r464 r492 85 85 } 86 86 87 function insertEvent ($datetime, $edatetime, $title, $description )87 function insertEvent ($datetime, $edatetime, $title, $description, $location) 88 88 { 89 89 //Discover the event id … … 95 95 $id = $this->db->row(); 96 96 97 98 97 // Performing SQL insert query 99 $query = "INSERT INTO phpgw_cal VALUES (".($id['max']+1).", '".$_SESSION['calendar']['user']['email']."', ".$this->user_id.", null, null, ".$datetime.", ".time().",".$edatetime.", 2, 'E', 0, '".$title."', '".$description."', null, 0, null, null, null )";98 $query = "INSERT INTO phpgw_cal VALUES (".($id['max']+1).", '".$_SESSION['calendar']['user']['email']."', ".$this->user_id.", null, null, ".$datetime.", ".time().",".$edatetime.", 2, 'E', 0, '".$title."', '".$description."', '".$location."', 0, null, null, null )"; 100 99 101 100 if ($this->db->query($query)){ -
trunk/calendar_new/inc/class.uicalendar.inc.php
r464 r492 37 37 return $this->db_obj->insertEvent($start, $end, $title, $description); 38 38 } 39 40 function saveEvent () { 41 $start = isset ($_REQUEST["start"]) ? $_REQUEST["start"] : NULL; 42 $end = isset ($_REQUEST["end"]) ? $_REQUEST["end"] : NULL; 43 $title = isset ($_REQUEST["title"]) ? $_REQUEST["title"] : NULL; 44 $description = isset ($_REQUEST["desc"]) ? $_REQUEST["desc"] : NULL; 45 $location = isset ($_REQUEST["location"]) ? $_REQUEST["location"] : NULL; 46 47 if ($start == NULL || $end == NULL || $title == NULL) 48 return "false;Empty field"; 49 if (!eregi("^[a-zA-Z_.0-9-]*",$title)) 50 return "false;Invalid char in description"; 51 if (!eregi("^[0-9]*",$start)) 52 return "false;Wrong formed text"; 53 if (!eregi("^[0-9]*",$end)) 54 return "false;Wrong formed text"; 55 56 return $this->db_obj->insertEvent($start, $end, $title, $description, $location); 57 } 58 59 39 60 40 61 function changeEvent()
Note: See TracChangeset
for help on using the changeset viewer.