uawdijnntqw1x1x1
IP : 216.73.217.47
Hostname : xhost1.intravision.ru
Kernel : Linux xhost1.intravision.ru 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
.
/
.
/
.
/
backup
/
external_www
/
new02.medcomp.ru
/
bitrix
/
modules
/
catalog
/
general
/
contractor.php
/
/
<?php use Bitrix\Main\Localization\Loc; Loc::loadMessages(__FILE__); class CAllCatalogContractor { protected function checkFields($action, &$arFields) { $personType = intval($arFields["PERSON_TYPE"]); if($personType == CONTRACTOR_JURIDICAL && is_set($arFields, "COMPANY") && $arFields["COMPANY"] == '') { $GLOBALS["APPLICATION"]->ThrowException(Loc::getMessage("CC_EMPTY_COMPANY")); return false; } if (((($action == 'ADD' || is_set($arFields, "PERSON_NAME")) && strlen($arFields["PERSON_NAME"]) <= 0) && $personType == CONTRACTOR_INDIVIDUAL)) { $GLOBALS["APPLICATION"]->ThrowException(Loc::getMessage("CC_WRONG_PERSON_LASTNAME")); return false; } if (($action == 'UPDATE') && is_set($arFields, "ID")) unset($arFields["ID"]); return true; } static function update($id, $arFields) { global $DB; $id = intval($id); if(array_key_exists('DATE_CREATE', $arFields)) unset($arFields['DATE_CREATE']); if(array_key_exists('DATE_MODIFY', $arFields)) unset($arFields['DATE_MODIFY']); if(array_key_exists('CREATED_BY', $arFields)) unset($arFields['CREATED_BY']); $arFields['~DATE_MODIFY'] = $DB->GetNowFunction(); if($id <= 0 || !self::checkFields('UPDATE', $arFields)) return false; $strUpdate = $DB->PrepareUpdate("b_catalog_contractor", $arFields); if(!empty($strUpdate)) { $strSql = "UPDATE b_catalog_contractor SET ".$strUpdate." WHERE ID = ".$id." "; $DB->Query($strSql, false, "File: ".__FILE__."<br>Line: ".__LINE__); } return $id; } static function delete($id) { global $DB; $id = intval($id); if($id > 0) { $dbDocument = CCatalogDocs::getList(array(), array("CONTRACTOR_ID" => $id)); if($arDocument = $dbDocument->Fetch()) { $GLOBALS["APPLICATION"]->ThrowException(Loc::getMessage("CC_CONTRACTOR_HAVE_DOCS")); return false; } return $DB->Query("DELETE FROM b_catalog_contractor WHERE ID = ".$id." ", true); } return false; } }
/var/./././backup/external_www/new02.medcomp.ru/bitrix/modules/catalog/general/contractor.php