public function execute(IDS_Report $data) 
    {
        if (!isset($_SERVER['REQUEST_URI'])) {
            $_SERVER['REQUEST_URI'] = substr($_SERVER['PHP_SELF'], 1);
            if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING']) { 
                $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; 
            } 
        }     	

        foreach ($data as $event) {
            $page = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
            $ip   = $this->ip;
            $ip2  = $this->ip2;
            
            $name   = $event->getName();
            $value  = $event->getValue();
            $impact = $event->getImpact();
            $tags   = implode(', ', $event->getTags());

            $this->statement->bindParam('name', $name);
            $this->statement->bindParam('value', $value);
            $this->statement->bindParam('page', $page);
            $this->statement->bindParam('tags', $tags);
            $this->statement->bindParam('ip', $ip);
            $this->statement->bindParam('ip2', $ip2);
            $this->statement->bindParam('impact', $impact);
            $this->statement->bindParam('origin', $_SERVER['SERVER_ADDR']);

            if (!$this->statement->execute()) {

                $info = $this->statement->errorInfo();
                throw new Exception(
                    $this->statement->errorCode() . ', ' . $info[1] . ', ' . $info[2]
                );
            }
        }

        return true;
    }