AAAAPKv?\) .htaccessnuW+A Order allow,deny Deny from all PKv?\V index.htmlnuW+A PKv?\U++ weblink.phpnuW+AloadArray($array['params']); $array['params'] = (string)$registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { $registry = new JRegistry(); $registry->loadArray($array['metadata']); $array['metadata'] = (string)$registry; } return parent::bind($array, $ignore); } /** * Overload the store method for the Weblinks table. * * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { $date = JFactory::getDate(); $user = JFactory::getUser(); if ($this->id) { // Existing item $this->modified = $date->toSql(); $this->modified_by = $user->get('id'); } else { // New weblink. A weblink created and created_by field can be set by the user, // so we don't touch either of these if they are set. if (!intval($this->created)) { $this->created = $date->toSql(); } if (empty($this->created_by)) { $this->created_by = $user->get('id'); } } // Verify that the alias is unique $table = JTable::getInstance('Weblink', 'WeblinksTable'); if ($table->load(array('alias'=>$this->alias, 'catid'=>$this->catid)) && ($table->id != $this->id || $this->id==0)) { $this->setError(JText::_('COM_WEBLINKS_ERROR_UNIQUE_ALIAS')); return false; } // Attempt to store the user data. return parent::store($updateNulls); } /** * Overloaded check method to ensure data integrity. * * @return boolean True on success. */ public function check() { if (JFilterInput::checkAttribute(array ('href', $this->url))) { $this->setError(JText::_('COM_WEBLINKS_ERR_TABLES_PROVIDE_URL')); return false; } // check for valid name if (trim($this->title) == '') { $this->setError(JText::_('COM_WEBLINKS_ERR_TABLES_TITLE')); return false; } // check for existing name $query = 'SELECT id FROM #__weblinks WHERE title = '.$this->_db->Quote($this->title).' AND catid = '.(int) $this->catid; $this->_db->setQuery($query); $xid = intval($this->_db->loadResult()); if ($xid && $xid != intval($this->id)) { $this->setError(JText::_('COM_WEBLINKS_ERR_TABLES_NAME')); return false; } if (empty($this->alias)) { $this->alias = $this->title; } $this->alias = JApplication::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); } // Check the publish down date is not earlier than publish up. if ($this->publish_down > $this->_db->getNullDate() && $this->publish_down < $this->publish_up) { $this->setError(JText::_('JGLOBAL_START_PUBLISH_AFTER_FINISH')); return false; } // clean up keywords -- eliminate extra spaces between phrases // and cr (\r) and lf (\n) characters from string if (!empty($this->metakey)) { // only process if not empty $bad_characters = array("\n", "\r", "\"", "<", ">"); // array of characters to remove $after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); // remove bad characters $keys = explode(',', $after_clean); // create array using commas as delimiter $clean_keys = array(); foreach($keys as $key) { if (trim($key)) { // ignore blank keywords $clean_keys[] = trim($key); } } $this->metakey = implode(", ", $clean_keys); // put array back together delimited by ", " } return true; } /** * Method to set the publishing state for a row or list of rows in the database * table. The method respects checked out rows by other users and will attempt * to checkin rows that it can after adjustments are made. * * @param mixed An optional array of primary key values to update. If not * set the instance property value is used. * @param integer The publishing state. eg. [0 = unpublished, 1 = published] * @param integer The user id of the user performing the operation. * @return boolean True on success. * @since 1.0.4 */ public function publish($pks = null, $state = 1, $userId = 0) { // Initialise variables. $k = $this->_tbl_key; // Sanitize input. JArrayHelper::toInteger($pks); $userId = (int) $userId; $state = (int) $state; // If there are no primary keys set check to see if the instance key is set. if (empty($pks)) { if ($this->$k) { $pks = array($this->$k); } // Nothing to set publishing state on, return false. else { $this->setError(JText::_('JLIB_DATABASE_ERROR_NO_ROWS_SELECTED')); return false; } } // Build the WHERE clause for the primary keys. $where = $k.'='.implode(' OR '.$k.'=', $pks); // Determine if there is checkin support for the table. if (!property_exists($this, 'checked_out') || !property_exists($this, 'checked_out_time')) { $checkin = ''; } else { $checkin = ' AND (checked_out = 0 OR checked_out = '.(int) $userId.')'; } // Update the publishing state for rows with the given primary keys. $this->_db->setQuery( 'UPDATE '.$this->_db->quoteName($this->_tbl) . ' SET '.$this->_db->quoteName('state').' = '.(int) $state . ' WHERE ('.$where.')' . $checkin ); $this->_db->query(); // Check for a database error. if ($this->_db->getErrorNum()) { $this->setError($this->_db->getErrorMsg()); return false; } // If checkin is supported and all rows were adjusted, check them in. if ($checkin && (count($pks) == $this->_db->getAffectedRows())) { // Checkin the rows. foreach($pks as $pk) { $this->checkin($pk); } } // If the JTable instance value is in the list of primary keys that were set, set the instance. if (in_array($this->$k, $pks)) { $this->state = $state; } $this->setError(''); return true; } } PKn>A\j newsfeed.phpnuW+AloadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { $registry = new JRegistry(); $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } return parent::bind($array, $ignore); } /** * Overloaded check method to ensure data integrity. * * @return boolean True on success. */ function check() { // Check for valid name. if (trim($this->name) == '') { $this->setError(JText::_('COM_NEWSFEEDS_WARNING_PROVIDE_VALID_NAME')); return false; } if (empty($this->alias)) { $this->alias = $this->name; } $this->alias = JApplication::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); } // Check the publish down date is not earlier than publish up. if (intval($this->publish_down) > 0 && $this->publish_down < $this->publish_up) { $this->setError(JText::_('JGLOBAL_START_PUBLISH_AFTER_FINISH')); return false; } // clean up keywords -- eliminate extra spaces between phrases // and cr (\r) and lf (\n) characters from string if (!empty($this->metakey)) { // only process if not empty $bad_characters = array("\n", "\r", "\"", "<", ">"); // array of characters to remove $after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); // remove bad characters $keys = explode(',', $after_clean); // create array using commas as delimiter $clean_keys = array(); foreach($keys as $key) { if (trim($key)) { // ignore blank keywords $clean_keys[] = trim($key); } } $this->metakey = implode(", ", $clean_keys); // put array back together delimited by ", " } // clean up description -- eliminate quotes and <> brackets if (!empty($this->metadesc)) { // only process if not empty $bad_characters = array("\"", "<", ">"); $this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc); } return true; } /** * Overriden JTable::store to set modified data and user id. * * @param boolean True to update fields even if they are null. * @return boolean True on success. * @since 1.6 */ public function store($updateNulls = false) { $date = JFactory::getDate(); $user = JFactory::getUser(); if ($this->id) { // Existing item $this->modified = $date->toSql(); $this->modified_by = $user->get('id'); } else { // New newsfeed. A feed created and created_by field can be set by the user, // so we don't touch either of these if they are set. if (!intval($this->created)) { $this->created = $date->toSql(); } if (empty($this->created_by)) { $this->created_by = $user->get('id'); } } // Verify that the alias is unique $table = JTable::getInstance('Newsfeed', 'NewsfeedsTable'); if ($table->load(array('alias'=>$this->alias, 'catid'=>$this->catid)) && ($table->id != $this->id || $this->id==0)) { $this->setError(JText::_('COM_NEWSFEEDS_ERROR_UNIQUE_ALIAS')); return false; } return parent::store($updateNulls); } } PKIIA\ sliders.phpnuW+AloadArray($array['params']); $array['params'] = (string)$registry; } if(empty($array['alias'])) { $array['alias'] = $array['title']; } $array['alias'] = JFilterOutput::stringURLSafe($array['alias']); if(trim(str_replace('-','',$array['alias'])) == '') { $array['alias'] = JFactory::getDate()->format("Y-m-d-H-i-s"); } //dmp($array);exit(); return parent::bind($array, $ignore); } //public function delete($pk=null){ /* dmp($_REQUEST); MaxFunctionsAdmin::showTrace("delete item"); dmp("items delete"); exit(); */ //parent::delete($pk); //} } PKnA\loadArray($array['params']); $array['params'] = (string)$registry; } // Verify that the default style is not unset if ($array['home']=='0' && $this->home=='1') { $this->setError(JText::_('COM_TEMPLATES_ERROR_CANNOT_UNSET_DEFAULT_STYLE')); return false; } return parent::bind($array, $ignore); } /** * Overloaded check method to ensure data integrity. * * @return boolean True on success. */ function check() { if (empty($this->title)) { $this->setError(JText::_('COM_TEMPLATES_ERROR_STYLE_REQUIRES_TITLE')); return false; } return true; } /** * Overloaded store method to ensure unicity of default style. * * @param boolean True to update fields even if they are null. * @return boolean True on success. * @since 1.0 * @link http://docs.joomla.org/JTable/store */ public function store($updateNulls = false) { if ($this->home!='0') { $query = $this->_db->getQuery(true); $query->update('#__template_styles'); $query->set('home=\'0\''); $query->where('client_id='.(int)$this->client_id); $query->where('home='.$this->_db->quote($this->home)); $this->_db->setQuery($query); $this->_db->query(); } return parent::store($updateNulls); } /** * Overloaded store method to unsure existence of a default style for a template. * * @param mixed An optional primary key value to delete. If not set the * instance property value is used. * @return boolean True on success. * @since 1.0 * @link http://docs.joomla.org/JTable/delete */ public function delete($pk = null) { $k = $this->_tbl_key; $pk = (is_null($pk)) ? $this->$k : $pk; if (!is_null($pk)) { $query = $this->_db->getQuery(true); $query->from('#__template_styles'); $query->select('id'); $query->where('client_id='.(int)$this->client_id); $query->where('template='.$this->_db->quote($this->template)); $this->_db->setQuery($query); $results = $this->_db->loadColumn(); if (count($results)==1 && $results[0]==$pk) { $this->setError(JText::_('COM_TEMPLATES_ERROR_CANNOT_DELETE_LAST_STYLE')); return false; } } return parent::delete($pk); } } PK.A\DŽF"F" banner.phpnuW+Acreated = $date->toSql(); } function clicks() { $query = 'UPDATE #__banners' . ' SET clicks = (clicks + 1)' . ' WHERE id = ' . (int) $this->id ; $this->_db->setQuery($query); $this->_db->query(); } /** * Overloaded check function * * @return boolean * @see JTable::check * @since 1.5 */ function check() { // Set name $this->name = htmlspecialchars_decode($this->name, ENT_QUOTES); // Set alias $this->alias = JApplication::stringURLSafe($this->alias); if (empty($this->alias)) { $this->alias = JApplication::stringURLSafe($this->name); } // Check the publish down date is not earlier than publish up. if ($this->publish_down > $this->_db->getNullDate() && $this->publish_down < $this->publish_up) { $this->setError(JText::_('JGLOBAL_START_PUBLISH_AFTER_FINISH')); return false; } // Set ordering if ($this->state < 0) { // Set ordering to 0 if state is archived or trashed $this->ordering = 0; } elseif (empty($this->ordering)) { // Set ordering to last if ordering was 0 $this->ordering = self::getNextOrder($this->_db->quoteName('catid').'=' . $this->_db->Quote($this->catid).' AND state>=0'); } return true; } /** * Overloaded bind function * * @param array $hash named array * @return null|string null is operation was satisfactory, otherwise returns an error * @see JTable:bind * @since 1.5 */ public function bind($array, $ignore = array()) { if (isset($array['params']) && is_array($array['params'])) { $registry = new JRegistry(); $registry->loadArray($array['params']); if((int) $registry->get('width', 0) < 0){ $this->setError(JText::sprintf('JLIB_DATABASE_ERROR_NEGATIVE_NOT_PERMITTED', JText::_('COM_BANNERS_FIELD_WIDTH_LABEL'))); return false; } if((int) $registry->get('height', 0) < 0){ $this->setError(JText::sprintf('JLIB_DATABASE_ERROR_NEGATIVE_NOT_PERMITTED', JText::_('COM_BANNERS_FIELD_HEIGHT_LABEL'))); return false; } // Converts the width and height to an absolute numeric value: $width = abs((int) $registry->get('width', 0)); $height = abs((int) $registry->get('height', 0)); // Sets the width and height to an empty string if = 0 $registry->set('width', ($width ? $width : '')); $registry->set('height', ($height ? $height : '')); $array['params'] = (string)$registry; } if (isset($array['imptotal'])) { $array['imptotal'] = abs((int) $array['imptotal']); } return parent::bind($array, $ignore); } /** * method to store a row * * @param boolean $updateNulls True to update fields even if they are null. */ function store($updateNulls = false) { if (empty($this->id)) { $purchase_type = $this->purchase_type; if ($purchase_type < 0 && $this->cid) { $client = JTable::getInstance('Client', 'BannersTable'); $client->load($this->cid); $purchase_type = $client->purchase_type; } if ($purchase_type < 0) { $params = JComponentHelper::getParams('com_banners'); $purchase_type = $params->get('purchase_type'); } switch($purchase_type) { case 1: $this->reset=$this->_db->getNullDate(); break; case 2: $date = JFactory::getDate('+1 year '.date('Y-m-d', strtotime('now'))); $reset = $this->_db->Quote($date->toSql()); break; case 3: $date = JFactory::getDate('+1 month '.date('Y-m-d', strtotime('now'))); $reset = $this->_db->Quote($date->toSql()); break; case 4: $date = JFactory::getDate('+7 day '.date('Y-m-d', strtotime('now'))); $reset = $this->_db->Quote($date->toSql()); break; case 5: $date = JFactory::getDate('+1 day '.date('Y-m-d', strtotime('now'))); $reset = $this->_db->Quote($date->toSql()); break; } // Store the row parent::store($updateNulls); } else { // Get the old row $oldrow = JTable::getInstance('Banner', 'BannersTable'); if (!$oldrow->load($this->id) && $oldrow->getError()) { $this->setError($oldrow->getError()); } // Verify that the alias is unique $table = JTable::getInstance('Banner', 'BannersTable'); if ($table->load(array('alias'=>$this->alias, 'catid'=>$this->catid)) && ($table->id != $this->id || $this->id==0)) { $this->setError(JText::_('COM_BANNERS_ERROR_UNIQUE_ALIAS')); return false; } // Store the new row parent::store($updateNulls); // Need to reorder ? if ($oldrow->state>=0 && ($this->state < 0 || $oldrow->catid != $this->catid)) { // Reorder the oldrow $this->reorder($this->_db->quoteName('catid').'=' . $this->_db->Quote($oldrow->catid).' AND state>=0'); } } return count($this->getErrors())==0; } /** * Method to set the publishing state for a row or list of rows in the database * table. The method respects checked out rows by other users and will attempt * to checkin rows that it can after adjustments are made. * * @param mixed An optional array of primary key values to update. If not * set the instance property value is used. * @param integer The publishing state. eg. [0 = unpublished, 1 = published, 2=archived, -2=trashed] * @param integer The user id of the user performing the operation. * @return boolean True on success. * @since 1.6 */ public function publish($pks = null, $state = 1, $userId = 0) { // Initialise variables. $k = $this->_tbl_key; // Sanitize input. JArrayHelper::toInteger($pks); $userId = (int) $userId; $state = (int) $state; // If there are no primary keys set check to see if the instance key is set. if (empty($pks)) { if ($this->$k) { $pks = array($this->$k); } // Nothing to set publishing state on, return false. else { $this->setError(JText::_('JLIB_DATABASE_ERROR_NO_ROWS_SELECTED')); return false; } } // Get an instance of the table $table = JTable::getInstance('Banner', 'BannersTable'); // For all keys foreach ($pks as $pk) { // Load the banner if(!$table->load($pk)) { $this->setError($table->getError()); } // Verify checkout if($table->checked_out==0 || $table->checked_out==$userId) { // Change the state $table->state = $state; $table->checked_out=0; $table->checked_out_time=$this->_db->getNullDate(); // Check the row $table->check(); // Store the row if (!$table->store()) { $this->setError($table->getError()); } } } return count($this->getErrors())==0; } /** * Method to set the sticky state for a row or list of rows in the database * table. The method respects checked out rows by other users and will attempt * to checkin rows that it can after adjustments are made. * * @param mixed An optional array of primary key values to update. If not * set the instance property value is used. * @param integer The sticky state. eg. [0 = unsticked, 1 = sticked] * @param integer The user id of the user performing the operation. * @return boolean True on success. * @since 1.6 */ public function stick($pks = null, $state = 1, $userId = 0) { // Initialise variables. $k = $this->_tbl_key; // Sanitize input. JArrayHelper::toInteger($pks); $userId = (int) $userId; $state = (int) $state; // If there are no primary keys set check to see if the instance key is set. if (empty($pks)) { if ($this->$k) { $pks = array($this->$k); } // Nothing to set publishing state on, return false. else { $this->setError(JText::_('JLIB_DATABASE_ERROR_NO_ROWS_SELECTED')); return false; } } // Get an instance of the table $table = JTable::getInstance('Banner', 'BannersTable'); // For all keys foreach ($pks as $pk) { // Load the banner if(!$table->load($pk)) { $this->setError($table->getError()); } // Verify checkout if($table->checked_out==0 || $table->checked_out==$userId) { // Change the state $table->sticky = $state; $table->checked_out=0; $table->checked_out_time=$this->_db->getNullDate(); // Check the row $table->check(); // Store the row if (!$table->store()) { $this->setError($table->getError()); } } } return count($this->getErrors())==0; } } PK.A\x NY  client.phpnuW+Achecked_out_time = $_db->getNullDate(); parent::__construct('#__banner_clients', 'id', $_db); } /** * Method to set the publishing state for a row or list of rows in the database * table. The method respects checked out rows by other users and will attempt * to checkin rows that it can after adjustments are made. * * @param mixed An optional array of primary key values to update. If not * set the instance property value is used. * @param integer The publishing state. eg. [0 = unpublished, 1 = published] * @param integer The user id of the user performing the operation. * @return boolean True on success. * @since 1.0.4 */ public function publish($pks = null, $state = 1, $userId = 0) { // Initialise variables. $k = $this->_tbl_key; // Sanitize input. JArrayHelper::toInteger($pks); $userId = (int) $userId; $state = (int) $state; // If there are no primary keys set check to see if the instance key is set. if (empty($pks)) { if ($this->$k) { $pks = array($this->$k); } // Nothing to set publishing state on, return false. else { $this->setError(JText::_('JLIB_DATABASE_ERROR_NO_ROWS_SELECTED')); return false; } } // Build the WHERE clause for the primary keys. $where = $k.'='.implode(' OR '.$k.'=', $pks); // Determine if there is checkin support for the table. if (!property_exists($this, 'checked_out') || !property_exists($this, 'checked_out_time')) { $checkin = ''; } else { $checkin = ' AND (checked_out = 0 OR checked_out = '.(int) $userId.')'; } // Update the publishing state for rows with the given primary keys. $this->_db->setQuery( 'UPDATE '.$this->_db->quoteName($this->_tbl). ' SET '.$this->_db->quoteName('state').' = '.(int) $state . ' WHERE ('.$where.')' . $checkin ); $this->_db->query(); // Check for a database error. if ($this->_db->getErrorNum()) { $this->setError($this->_db->getErrorMsg()); return false; } // If checkin is supported and all rows were adjusted, check them in. if ($checkin && (count($pks) == $this->_db->getAffectedRows())) { // Checkin the rows. foreach($pks as $pk) { $this->checkin($pk); } } // If the JTable instance value is in the list of primary keys that were set, set the instance. if (in_array($this->$k, $pks)) { $this->state = $state; } $this->setError(''); return true; } } PK=A\#cJ contact.phpnuW+AloadArray($array['params']); $array['params'] = (string) $registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { $registry = new JRegistry(); $registry->loadArray($array['metadata']); $array['metadata'] = (string) $registry; } return parent::bind($array, $ignore); } /** * Stores a contact * * @param boolean True to update fields even if they are null. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { // Transform the params field if (is_array($this->params)) { $registry = new JRegistry(); $registry->loadArray($this->params); $this->params = (string)$registry; } $date = JFactory::getDate(); $user = JFactory::getUser(); if ($this->id) { // Existing item $this->modified = $date->toSql(); $this->modified_by = $user->get('id'); } else { // New newsfeed. A feed created and created_by field can be set by the user, // so we don't touch either of these if they are set. if (!intval($this->created)) { $this->created = $date->toSql(); } if (empty($this->created_by)) { $this->created_by = $user->get('id'); } } // Verify that the alias is unique $table = JTable::getInstance('Contact', 'ContactTable'); if ($table->load(array('alias'=>$this->alias, 'catid'=>$this->catid)) && ($table->id != $this->id || $this->id==0)) { $this->setError(JText::_('COM_CONTACT_ERROR_UNIQUE_ALIAS')); return false; } // Attempt to store the data. return parent::store($updateNulls); } /** * Overloaded check function * * @return boolean * @see JTable::check * @since 1.5 */ function check() { $this->default_con = intval($this->default_con); if (JFilterInput::checkAttribute(array ('href', $this->webpage))) { $this->setError(JText::_('COM_CONTACT_WARNING_PROVIDE_VALID_URL')); return false; } /** check for valid name */ if (trim($this->name) == '') { $this->setError(JText::_('COM_CONTACT_WARNING_PROVIDE_VALID_NAME')); return false; } if (empty($this->alias)) { $this->alias = $this->name; } $this->alias = JApplication::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); } /** check for valid category */ if (trim($this->catid) == '') { $this->setError(JText::_('COM_CONTACT_WARNING_CATEGORY')); return false; } // Check the publish down date is not earlier than publish up. if (intval($this->publish_down) > 0 && $this->publish_down < $this->publish_up) { $this->setError(JText::_('JGLOBAL_START_PUBLISH_AFTER_FINISH')); return false; } // clean up keywords -- eliminate extra spaces between phrases // and cr (\r) and lf (\n) characters from string if (!empty($this->metakey)) { // only process if not empty $bad_characters = array("\n", "\r", "\"", "<", ">"); // array of characters to remove $after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); // remove bad characters $keys = explode(',', $after_clean); // create array using commas as delimiter $clean_keys = array(); foreach($keys as $key) { if (trim($key)) { // ignore blank keywords $clean_keys[] = trim($key); } } $this->metakey = implode(", ", $clean_keys); // put array back together delimited by ", " } // clean up description -- eliminate quotes and <> brackets if (!empty($this->metadesc)) { // only process if not empty $bad_characters = array("\"", "<", ">"); $this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc); } return true; } } PKv?\) .htaccessnuW+APKv?\V index.htmlnuW+APKv?\U++ weblink.phpnuW+APKn>A\j wnewsfeed.phpnuW+APKIIA\ +sliders.phpnuW+APKIIA\ }m/item.phpnuW+APKnA\