Files
Fedor ac7467f0b4 Major CRM updates: AI Assistant, Court Status API, S3 integration improvements, and extensive file storage system
- Added comprehensive AI Assistant system (aiassist/ directory):
  * Vector search and embedding capabilities
  * Typebot proxy integration
  * Elastic search functionality
  * Message classification and chat history
  * MCP proxy for external integrations

- Implemented Court Status API (GetCourtStatus.php):
  * Real-time court document status checking
  * Integration with external court systems
  * Comprehensive error handling and logging

- Enhanced S3 integration:
  * Improved file backup system with metadata
  * Batch processing capabilities
  * Enhanced error logging and recovery
  * Copy operations with URL fixing

- Added Telegram contact creation API
- Improved error logging across all modules
- Enhanced callback system for AI responses
- Extensive backup file storage with timestamps
- Updated documentation and README files

- File storage improvements:
  * Thousands of backup files with proper metadata
  * Fix operations for broken file references
  * Project-specific backup and recovery systems
  * Comprehensive file integrity checking

Total: 26,461+ files added/modified including AWS SDK, vendor dependencies, and extensive backup system.
2025-10-16 11:17:21 +03:00

181 lines
3.5 KiB
PHP

<?php
/**
* This function returns
*
* @param $name - array name
* @param $value -
*
* */
if (!function_exists('addToCFArray')) {
function addToCFArray($name, $value)
{
global $PDFContent;
$PDFContent->PDFMakerCFArray[$name][] = $value;
return "";
}
}
/**
* Join array elements with a string
*
* @param $name - array name
* @param $glue -
*
* */
if (!function_exists('implodeCFArray')) {
function implodeCFArray($name, $glue)
{
global $PDFContent;
return implode($glue, $PDFContent->PDFMakerCFArray[$name]);
}
}
/**
* This function returns
*
* @param $name - array name
* @param $value -
*
* */
if (!function_exists('addToCFArrayALL')) {
function addToCFArrayALL($name, $value)
{
global $PDFContent;
$PDFContent->PDFMakerCFArrayAll[$name][] = $value;
return "";
}
}
/**
* Join array elements with a string
*
* @param $name - array name
* @param $glue -
*
* */
if (!function_exists('implodeCFArrayALL')) {
function implodeCFArrayALL($name, $glue)
{
global $PDFContent;
return implode($glue, $PDFContent->PDFMakerCFArrayAll[$name]);
}
}
/**
* This function returns the sum of values in an array.
*
* @param $name - array name
*
* */
if (!function_exists('sumCFArray')) {
function sumCFArray($name, $type = 'number')
{
$value = sumCFArrayFloat($name);
return its4you_formatFloatToPDF($value, $type);
}
}
if (!function_exists('sumCFArrayFloat')) {
function sumCFArrayFloat($name)
{
global $PDFContent;
foreach ($PDFContent->PDFMakerCFArray[$name] as $key => $number) {
$data = its4you_formatNumberInfo($number);
$PDFContent->PDFMakerCFArray[$name][$key] = $data['float'];
}
return array_sum($PDFContent->PDFMakerCFArray[$name]);
}
}
if (!function_exists('sumCFArrayFloatAll')) {
function sumCFArrayFloatAll($name)
{
global $PDFContent;
foreach ($PDFContent->PDFMakerCFArrayAll[$name] as $key => $number) {
$data = its4you_formatNumberInfo($number);
$PDFContent->PDFMakerCFArrayAll[$name][$key] = $data['float'];
}
return array_sum($PDFContent->PDFMakerCFArrayAll[$name]);
}
}
if (!function_exists('sumCFArrayInt')) {
/**
* @param $name
* @return int
*/
function sumCFArrayInt($name)
{
return intval(sumCFArrayFloat($name));
}
}
if (!function_exists('sumCFArrayRound')) {
/**
* @param $name
* @param $roundNum
* @return int|float
*/
function sumCFArrayRound($name, $roundNum, $type = 'number')
{
$value = round(sumCFArrayFloat($name), intval($roundNum));
return its4you_formatFloatToPDF($value, $type);
}
}
/**
* This function returns the sum of values in an array.
*
* @param $name - array name
*
* */
if (!function_exists('sumCFArrayAll')) {
function sumCFArrayAll($name, $type = 'number')
{
return its4you_formatFloatToPDF(sumCFArrayFloatAll($name), $type);
}
}
/**
* @param string $name
* @param string $value
* @param string $inArrayReturn
* @param string $notInArrayReturn
* @return string
*/
if (!function_exists('inCFArray')) {
function inCFArray($name, $value, $inArrayReturn = '', $notInArrayReturn = '')
{
global $PDFContent;
return in_array($value, (array)$PDFContent->PDFMakerCFArray[$name]) ? $inArrayReturn : $notInArrayReturn;
}
}