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/vkapi.market/lib/property/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/vkapi.market/lib/property/variant.php
<?php

namespace VKapi\Market\Property;

use Bitrix\Main\Entity;
use Bitrix\Main\Localization\Loc;
use Bitrix\Main\ORM\Query\Query;
/**
 * ����� �� ����� � ������� ��������� �������
 * 
 * ���
 * + ID int(11) NOT NULL AUTO_INCREMENT,
 * + GROUP_ID int(11) NOT NULL,
 * + PROPERTY_ID int(11) NOT NULL,
 * + ENUM_ID int(11) NOT NULL,
 * + VK_VARIANT_ID int(11) NOT NULL,
 * ������
 * + PRIMARY KEY (`ID`),
 * + KEY `ix_gid_pid_eid` (`GROUP_ID`, `PROPERTY_ID`, `ENUM_ID`) USING BTREE ,
 * @package VKapi\Market\Property
 */
class VariantTable extends \Bitrix\Main\Entity\DataManager
{
    public static function getFilePath()
    {
        return __FILE__;
    }
    public static function getTableName()
    {
        return 'vkapi_market_property_variant';
    }
    public static function getMap()
    {
        return array(new \Bitrix\Main\Entity\IntegerField('ID', array('primary' => true, 'autocomplete' => true)), new \Bitrix\Main\Entity\IntegerField('GROUP_ID', array(
            // ������������� ����� � ���������, ����� ������������ �����
            'required' => true,
        )), new \Bitrix\Main\Entity\IntegerField('PROPERTY_ID', array(
            //id ��������
            'required' => true,
        )), new \Bitrix\Main\Entity\IntegerField('ENUM_ID', array(
            //id ������ ��������
            'required' => true,
        )), new \Bitrix\Main\Entity\IntegerField('VK_VARIANT_ID', array(
            // id �������������� � ��
            'required' => true,
        )), new \Bitrix\Main\Entity\ExpressionField('CNT', 'COUNT(ID)'));
    }
    /**
 * �������� ��� ������� �������� � ������,
 * ���������� ��� ������ �����
 * 
 * @param $groupId
 * @return \Bitrix\Main\DB\Result
 * @throws \Bitrix\Main\Db\SqlQueryException
 */
    public static function deleteAllByGroupId($groupId)
    {
        $entity = static::getEntity();
        $connection = $entity->getConnection();
        return $connection->query(sprintf('DELETE FROM %s WHERE %s', $connection->getSqlHelper()->quote($entity->getDbTableName()), \Bitrix\Main\ORM\Query\Query::buildFilterSql($entity, ['GROUP_ID' => abs(intval($groupId))])));
    }
    /**
 * �������� ������� ������� �������� � ������
 * @param $groupId
 * @param $arPropertyId
 * @return \Bitrix\Main\DB\Result|null
 * @throws \Bitrix\Main\ArgumentException
 * @throws \Bitrix\Main\DB\SqlQueryException
 * @throws \Bitrix\Main\SystemException
 */
    public static function deleteByGroupIdPropertyId($groupId, $arPropertyId)
    {
        $entity = static::getEntity();
        $connection = $entity->getConnection();
        $arPropertyId = (array) $arPropertyId;
        if (empty($arPropertyId)) {
            return null;
        }
        return $connection->query(sprintf('DELETE FROM %s WHERE %s', $connection->getSqlHelper()->quote($entity->getDbTableName()), \Bitrix\Main\ORM\Query\Query::buildFilterSql($entity, ['GROUP_ID' => abs(intval($groupId)), 'PROPERTY_ID' => $arPropertyId])));
    }
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit