403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/ilovecveti.ru/bitrix/modules/sproduction.datasync/lib/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/ilovecveti.ru/bitrix/modules/sproduction.datasync/lib/settingsiblocksmain.php
<?php
/**
 *    Iblocks Settings
 *
 * @mail support@s-production.online
 * @link s-production.online
 */

namespace SProduction\Datasync;

use Bitrix\Main,
	Bitrix\Main\DB\Exception,
	Bitrix\Main\Config\Option;

class SettingsIblocksMain
{

	/**
	 * Get a comparable table of prices types
	 */
	public static function getPricesCT() {
		$tc = Settings::get("price_types_table_comp", true);
		if (!$tc) {
			$tc = [];
			$store_prices = StorePrices::getTypes();
			foreach ($store_prices as $item) {
				$tc[$item['id']] = '';
			}
		}
		return $tc;
	}

	/**
	 * Get a comparable table of measure types
	 */
	public static function getMeasuresCT() {
		$tc = Settings::get("measures_table_comp", true);
		if (!$tc) {
			$tc = [];
			$store_measures = StoreMeasures::getTypes();
			$portal_measures = PortalMeasures::getTypes();
			foreach ($store_measures as $s_item) {
				$tc[$s_item['id']] = '';
				if ($s_item['code']) {
					foreach ($portal_measures as $p_item) {
						if ($p_item['code'] == $s_item['code']) {
							$tc[$s_item['id']] = $p_item['id'];
						}
					}
				}
			}
		}
		return $tc;
	}

	/**
	 * Get a comparable table of measure types
	 */
	public static function getPortalMeasure($store_id) {
		$portal_id = false;
		if ($store_id) {
			$tc = self::getMeasuresCT();
			if (isset($tc[$store_id])) {
				$portal_id = $tc[$store_id];
			}
		}
		return $portal_id;
	}

	/**
	 * Get a comparable table of VAT
	 */
	public static function getVatCT() {
		$tc = Settings::get("vat_table_comp", true);
		if (!$tc) {
			$tc = [];
			$store_items = StoreVat::getTypes();
			foreach ($store_items as $s_item) {
				$tc[$s_item['id']] = '';
			}
		}
		return $tc;
	}

	/**
	 * Get a comparable table of measure types
	 */
	public static function getPortalVat($store_id) {
		$portal_id = false;
		if ($store_id) {
			$tc = self::getVatCT();
			if (isset($tc[$store_id])) {
				$portal_id = $tc[$store_id];
			}
		}
		return $portal_id;
	}

}

Youez - 2016 - github.com/yon3zu
LinuXploit