set( 'date', $now->toMySQL() ); } function clicks() { $query = 'UPDATE #__banner' . ' SET clicks = ( clicks + 1 )' . ' WHERE bid = ' . (int) $this->bid ; $this->_db->setQuery( $query ); $this->_db->query(); } /** * Overloaded check function * * @access public * @return boolean * @see JTable::check * @since 1.5 */ function check() { // check for valid client id if (is_null($this->cid) || $this->cid == 0) { $this->setError(JText::_( 'BNR_CLIENT' )); return false; } // check for valid name if(trim($this->name) == '') { $this->setError(JText::_( 'BNR_NAME' )); return false; } if(empty($this->alias)) { $this->alias = $this->name; } $this->alias = JFilterOutput::stringURLSafe($this->alias); /*if(trim($this->imageurl) == '') { $this->setError(JText::_( 'BNR_IMAGE' )); return false; } if(trim($this->clickurl) == '' && trim($this->custombannercode) == '') { $this->setError(JText::_( 'BNR_URL' )); return false; }*/ return true; } } ?>