Files
crm.clientright.ru/modules/ITS4YouReports/ReportScheduler.php
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

94 lines
3.7 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');
// require_once('modules/ITS4YouReports/ITS4YouReports.php');
require_once 'modules/ITS4YouReports/ScheduledReports4You.php';
global $app_strings;
global $app_list_strings;
global $mod_strings;
$current_module_strings = return_module_language($current_language, 'ITS4YouReports');
global $list_max_entries_per_page;
global $urlPrefix;
global $log;
global $currentModule;
global $image_path;
global $theme;
global $current_user;
$smarty_obj = new vtigerCRM_Smarty;
$smarty_obj->assign("MOD", $mod_strings);
$smarty_obj->assign("APP", $app_strings);
$smarty_obj->assign("IMAGE_PATH",$image_path);
$smarty_obj->assign("DATEFORMAT",$current_user->date_format);
$smarty_obj->assign("JS_DATEFORMAT",parse_calendardate($app_strings['NTC_DATE_FORMAT']));
/* SCHEDULE REPORTS START */
$reportid = "";
if(isset($_REQUEST["record"]) && $_REQUEST["record"]!=""){
$reportid = vtlib_purify($_REQUEST["record"]);
}
$scheduledReport = new ITS4YouScheduledReport($adb, $reportid);
$availableUsersHTML = $scheduledReport->getAvailableUsersHTML();
$availableGroupsHTML = $scheduledReport->getAvailableGroupsHTML();
$availableRolesHTML = $scheduledReport->getAvailableRolesHTML();
$availableRolesAndSubHTML = $scheduledReport->getAvailableRolesAndSubordinatesHTML();
$smarty_obj->assign("AVAILABLE_USERS", $availableUsersHTML);
$smarty_obj->assign("AVAILABLE_GROUPS", $availableGroupsHTML);
$smarty_obj->assign("AVAILABLE_ROLES", $availableRolesHTML);
$smarty_obj->assign("AVAILABLE_ROLESANDSUB", $availableRolesAndSubHTML);
$scheduledReport->id = $reportid;
$scheduledReport->user = $current_user;
$scheduledReport->getReportScheduleInfo();
if(isset($_REQUEST['mode']) && $_REQUEST['mode']=='ajax'){
$is_scheduled = $_REQUEST['isReportScheduled'];
$report_format = $_REQUEST['scheduledReportFormat'];
$selectedRecipientsHTML = $scheduledReport->getSelectedRecipientsHTML();
}else{
$is_scheduled = $scheduledReport->isScheduled;
$report_format = $scheduledReport->scheduledFormat;
$selectedRecipientsHTML = $scheduledReport->getSelectedRecipientsHTML();
}
$smarty_obj->assign('IS_SCHEDULED', $is_scheduled);
$smarty_obj->assign('REPORT_FORMAT', $report_format);
$smarty_obj->assign("SELECTED_RECIPIENTS", $selectedRecipientsHTML);
$smarty_obj->assign("schtypeid",$scheduledReport->scheduledInterval['scheduletype']);
$smarty_obj->assign("schtime",$scheduledReport->scheduledInterval['time']);
$smarty_obj->assign("schday",$scheduledReport->scheduledInterval['date']);
$smarty_obj->assign("schweek",$scheduledReport->scheduledInterval['day']);
$smarty_obj->assign("schmonth",$scheduledReport->scheduledInterval['month']);
/* SCHEDULE REPORTS END */
$PDFMakerInstalled = vtlib_isModuleActive("PDFMaker");
if($PDFMakerInstalled===true && file_exists('modules/PDFMaker/mpdf/mpdf.php')===true){
$PDFMakerInstalled = true;
}else{
$PDFMakerInstalled = false;
}
$smarty_obj->assign("PDFMakerActive", $PDFMakerInstalled);
if(isset($_REQUEST['mode']) && $_REQUEST['mode']=='ajax'){
$smarty_obj->display(vtlib_getModuleTemplate($currentModule,'ReportSchedulerContent.tpl'));
}else{
$smarty_obj->display(vtlib_getModuleTemplate($currentModule,'ReportScheduler.tpl'));
}
?>