AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.111
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/departement-amisdessenior-.fr/libraries/compojoom/query/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/departement-amisdessenior-.fr/libraries/compojoom/query/helper.php
<?php
/**
 * @package    Lib_Compojoom
 * @author     DanielDimitrov <daniel@compojoom.com>
 * @date       08.01.2015
 *
 * @copyright  Copyright (C) 2008 - 2013 compojoom.com . All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */

defined('_JEXEC') or die('Restricted access');

/**
 * Class CompojoomQueryHelper
 *
 * @since  4.0.31
 */
class CompojoomQueryHelper
{
	/**
	 * Generates column IN ('a', 'b', '3')
	 *
	 * @param   string  $column  - the column name
	 * @param   array   $array   - the array to implode and escape
	 * @param   object  $db      - the db object
	 * @param   bool    $not     - Use NOT IN instead of IN
	 *
	 * @return string
	 */
	public static function in($column, $array, $db, $not = false, $castInt = false)
	{
		$n = ($not) ? " NOT " : "";

		return $db->qn($column) . $n . ' IN (' . self::implode($array, $db, 'q', $castInt) . ')';
	}

	/**
	 * Implode with value escaping
	 *
	 * @param   array   $values  - array with values to implode
	 * @param   object  $db      - the db object
	 * @param   string  $type    - the type of escaping we should do quote or quoteName (q or qn)
	 *
	 * @return string
	 */
	public static function implode($values, $db, $type = 'q', $castInt = false)
	{
		return implode(',', array_map(
				function ($v) use ($db, $type, $castInt)
				{
					if ($castInt)
					{
						$v = (int) $v;
					}

					return $db->$type($v);
				}, $values
			)
		);
	}

	/**
	 * Create proper array for Update query. The initial array has the form of array ('key' => 'value')
	 * the new array has the form of array( 'key = value', ...) both key and value are properly escaped
	 *
	 * @param   array   $array  - the array to format
	 * @param   object  $db     - the db object
	 *
	 * @return array
	 */
	public static function createProperArrayForUpdateQuery($array, $db)
	{
		$set = array();

		foreach ($array as $key => $value)
		{
			$set[] = $db->qn($key) . '=' . $db->q($value);
		}

		return $set;
	}
}

Anon7 - 2022
AnonSec Team