Files
crm.clientright.ru/x.php

39 lines
1.2 KiB
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
exit();
echo "start\n";
require 'config.inc.php';
ini_set('display_errors', 1);
error_reporting(E_ALL);
require 'includes/main/WebUI.php';
$current_user = Users::getActiveAdminUser();
$adb->database->SetFetchMode(2);
echo '<pre>' . date('H:i:s') . "\n";
$id = 30426;
$record = Vtiger_Record_Model::getInstanceById($id);
$docs = Vtiger_Base_Service::getDocs($record);
$files = Vtiger_Base_Service::getPaths($docs);
echo var_export($files,1);
/*
$mailerInstance = Emails_Mailer_Model::getInstance();
//$mailerInstance->From = 'help@clientright.ru';
//$mailerInstance->Sender = 'help@clientright.ru';
$mailerInstance->FromName = 'Клиентправ';
$mailerInstance->Subject = 'test subj';
$mailerInstance->Body = 'test content';
$mailerInstance->AddAddress('denis.k@pinstudio.ru');
$mailerInstance->isSMTP();
$mailerInstance->SMTPDebug = 3;
$mailerInstance->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";};
var_export($mailerInstance->send(true));
var_export($mailerInstance->getError());
//var_export($mailerInstance);
$n = 'storage/2023/October/week1/30318_КВП-дог-тест-удалить.pdf';
var_export(file_exists($n));
//var_export(Vtiger_Base_Service::getArchive(30316));
*/
echo "\nend\n";