HEX
Server: Apache
System: Linux webm005.cluster114.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: epubdjye (129326)
PHP: 8.5.7
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/e/p/u/epubdjye/www17/old/administrator/components/com_acymailing/classes/cpanel.php
<?php
/**
 * @copyright	Copyright (C) 2009-2012 ACYBA SARL - All rights reserved.
 * @license		http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
 */
defined('_JEXEC') or die('Restricted access');
?>
<?php
class cpanelClass extends acymailingClass{
	function load(){
		$query = 'SELECT * FROM '.acymailing_table('config');
		$this->database->setQuery($query);
		$this->values = $this->database->loadObjectList('namekey');
	}
	function get($namekey,$default = ''){
		if(isset($this->values[$namekey])) return $this->values[$namekey]->value;
		return $default;
	}
	function save($configObject){
		$query = 'REPLACE INTO '.acymailing_table('config').' (namekey,value) VALUES ';
		$params = array();
		$i = 0;
		foreach($configObject as $namekey => $value){
			$i++;
			if($i>100){
				$query .= implode(',',$params);
				$this->database->setQuery($query);
				if(!$this->database->query()) return false;
				$i = 0;
				$query = 'REPLACE INTO '.acymailing_table('config').' (namekey,value) VALUES ';
				$params = array();
			}
			if (empty($this->values[$namekey])) $this->values[$namekey] = new stdClass();
			$this->values[$namekey]->value = $value;
			$params[] = '('.$this->database->Quote(strip_tags($namekey)).','.$this->database->Quote(strip_tags($value,'<br/>')).')';
		}
		if(empty($params)) return true;
		$query .= implode(',',$params);
		$this->database->setQuery($query);
		return $this->database->query();
	}
}