/** * Create new comment * * @access private */ private function create() { if ($this->check_data()) { try { $this->_comment->_name = VPost::respond_name(); $this->_comment->_email = VPost::respond_email(); $this->_comment->_content = VPost::respond_content(); $this->_comment->_rel_id = $this->_id; $this->_comment->_rel_type = $this->_sql_table; $this->_comment->_status = 'pending'; $this->_comment->create(); $this->_submitted = true; $_SESSION['visitor_name'] = $this->_comment->_name; $_SESSION['visitor_email'] = $this->_comment->_email; } catch (Exception $e) { $this->_submitted = false; } } }