- 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.
111 lines
3.6 KiB
PHP
111 lines
3.6 KiB
PHP
<?php
|
|
|
|
/*+********************************************************************************
|
|
* The content of this file is subject to the Reports 4 You license.
|
|
* ("License"); You may not use this file except in compliance with the License
|
|
* The Initial Developer of the Original Code is IT-Solutions4You s.r.o.
|
|
* Portions created by IT-Solutions4You s.r.o. are Copyright(C) IT-Solutions4You s.r.o.
|
|
* All Rights Reserved.
|
|
********************************************************************************/
|
|
|
|
require_once('Smarty_setup.php');
|
|
require_once("data/Tracker.php");
|
|
require_once('include/logging.php');
|
|
require_once('include/utils/utils.php');
|
|
// ITS4YOU-CR SlOl 20.12.2010 R4U singlerow
|
|
require_once('modules/ITS4YouReports/ITS4YouReports.php');
|
|
|
|
global $app_strings;
|
|
global $mod_strings;
|
|
|
|
$recordid = vtlib_purify($_REQUEST['record']);
|
|
|
|
$sec_module = array();
|
|
|
|
$BLOCK1 = "";
|
|
|
|
$SumOptions = array();
|
|
$searchtype = vtlib_purify($_REQUEST["searchtype"]);
|
|
if($searchtype=="secondary"){
|
|
$SumOptions2 = $SumOptionsR = array();
|
|
$SumOptions2 = getSecondaryColumns($SumOptions2,$secondarymodule);
|
|
|
|
$reporttype = vtlib_purify($_REQUEST['selectedreporttype']);
|
|
if($reporttype=='timeline' || $reporttype=='grouping'){
|
|
foreach ($ITS4YouReports->relatedmodulesarray as $secondarymodule) {
|
|
$SumOptionsL = sgetColumntoTotalOptions($SumOptions2,$secondarymodule);
|
|
if(!empty($SumOptionsL)){
|
|
$SumOptionsR = array_merge($SumOptionsR,$SumOptionsL,array());
|
|
}
|
|
}
|
|
}else{
|
|
$SumOptionsR = $SumOptions2;
|
|
}
|
|
|
|
foreach ($SumOptionsR AS $optgroup2 => $optionsdata2)
|
|
{
|
|
if ($BLOCK2 != "")
|
|
$BLOCK2 .= "(|@!@|)";
|
|
$BLOCK2 .= $optgroup2;
|
|
$BLOCK2 .= "(|@|)";
|
|
$BLOCK2 .= Zend_JSON::encode($optionsdata2);
|
|
}
|
|
|
|
$BLOCK2 = ($BLOCK2!='')?$BLOCK2:"EMPTY_RELS(|@!@|)".$mod_strings['NO_REL_FIELDS'];
|
|
$BLOCK_R .= "__BLOCKS__".$BLOCK2;
|
|
}else{
|
|
$secondarymodule = '';
|
|
$secondarymodules =Array();
|
|
|
|
$ITS4YouReports = ITS4YouReports::getStoredITS4YouReport();
|
|
$primarymodule = $ITS4YouReports->primarymodule;
|
|
$reportid = $ITS4YouReports->record;
|
|
if(!empty($ITS4YouReports->related_modules[$primarymodule])) {
|
|
foreach($ITS4YouReports->related_modules[$primarymodule] as $key=>$value){
|
|
if(isset($_REQUEST["secondarymodule_".$value]))
|
|
$secondarymodules[]= $_REQUEST["secondarymodule_".$value];
|
|
}
|
|
}
|
|
|
|
$secondarymodule_arr = $ITS4YouReports->getReportRelatedModules($ITS4YouReports->primarymoduleid);
|
|
foreach ($secondarymodule_arr as $key=>$relmodule) {
|
|
$a_secondarymodule[] = $relmodule['id'];
|
|
}
|
|
$secondarymodule = implode(":", $a_secondarymodule);
|
|
$ITS4YouReports->getSecModuleColumnsList($secondarymodule);
|
|
|
|
$SumOptions = getPrimaryColumns($SumOptions,$primarymodule,true);
|
|
|
|
$reporttype = vtlib_purify($_REQUEST['selectedreporttype']);
|
|
if($reporttype=='timeline' || $reporttype=='grouping'){
|
|
$SumOptions = sgetColumntoTotalOptions($SumOptions,$primarymodule,array());
|
|
}
|
|
}
|
|
$search_for = vtlib_purify(trim($_REQUEST["search_for"]));
|
|
if(isset($search_for) && $search_for!=""){
|
|
foreach ($SumOptions as $block_name=>$fields) {
|
|
$fi = 0;
|
|
foreach ($fields as $key=>$field_array) {
|
|
$pos = strpos(strtolower($field_array["text"]), strtolower($search_for));
|
|
if($pos === false){
|
|
// show("The string '$search_for' was not found in the string '".$field_array["text"]."'");
|
|
}else{
|
|
$new_SumOptions[$block_name][$fi] = $field_array;
|
|
$fi++;
|
|
}
|
|
}
|
|
}
|
|
$SumOptions = $new_SumOptions;
|
|
}
|
|
|
|
foreach ($SumOptions AS $optgroup => $optionsdata)
|
|
{
|
|
if ($BLOCK1 != "")
|
|
$BLOCK1 .= "(|@!@|)";
|
|
$BLOCK1 .= $optgroup;
|
|
$BLOCK1 .= "(|@|)";
|
|
$BLOCK1 .= Zend_JSON::encode($optionsdata);
|
|
}
|
|
$BLOCK1 = ($BLOCK1!='')?$BLOCK1:"EMPTY_RELS(|@!@|)".$mod_strings['NO_REL_FIELDS'];
|
|
echo $BLOCK1;
|
|
?>
|