Changeset 492 for trunk/calendar_new/inc


Ignore:
Timestamp:
10/01/08 16:27:03 (16 years ago)
Author:
niltonneto
Message:

Alterações no módulo calendar_new (em desenvolvimento).

Location:
trunk/calendar_new/inc
Files:
2 edited

Legend:

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

    r464 r492  
    8585        } 
    8686 
    87         function insertEvent ($datetime, $edatetime, $title, $description) 
     87        function insertEvent ($datetime, $edatetime, $title, $description, $location) 
    8888        { 
    8989                //Discover the event id 
     
    9595                        $id = $this->db->row(); 
    9696 
    97  
    9897                // 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 )"; 
    10099 
    101100                if ($this->db->query($query)){ 
  • trunk/calendar_new/inc/class.uicalendar.inc.php

    r464 r492  
    3737                return $this->db_obj->insertEvent($start, $end, $title, $description); 
    3838        } 
     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 
    3960 
    4061        function changeEvent() 
Note: See TracChangeset for help on using the changeset viewer.