✨ Features: - Migrated ALL files to new S3 structure (Projects, Contacts, Accounts, HelpDesk, Invoice, etc.) - Added Nextcloud folder buttons to ALL modules - Fixed Nextcloud editor integration - WebSocket server for real-time updates - Redis Pub/Sub integration - File path manager for organized storage - Redis caching for performance (Functions.php) 📁 New Structure: Documents/Project/ProjectName_ID/file_docID.ext Documents/Contacts/FirstName_LastName_ID/file_docID.ext Documents/Accounts/AccountName_ID/file_docID.ext 🔧 Technical: - FilePathManager for standardized paths - S3StorageService integration - WebSocket server (Node.js + Docker) - Redis cache for getBasicModuleInfo() - Predis library for Redis connectivity 📝 Scripts: - Migration scripts for all modules - Test pages for WebSocket/SSE/Polling - Documentation (MIGRATION_*.md, REDIS_*.md) 🎯 Result: 15,000+ files migrated successfully!
50 lines
1.4 KiB
PHP
50 lines
1.4 KiB
PHP
<?php
|
|
require_once '/var/www/fastuser/data/www/crm.clientright.ru/config.inc.php';
|
|
|
|
$pdo = new PDO(
|
|
"mysql:host={$dbconfig['db_server']};port=3306;dbname={$dbconfig['db_name']};charset=utf8",
|
|
$dbconfig['db_username'],
|
|
$dbconfig['db_password'],
|
|
[PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]
|
|
);
|
|
|
|
$sql = "SELECT n.notesid, n.title, n.filename, n.s3_key, n.filelocationtype, n.filesize, n.createdtime
|
|
FROM vtiger_notes n
|
|
WHERE n.notesid = 395959";
|
|
|
|
$stmt = $pdo->prepare($sql);
|
|
$stmt->execute();
|
|
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
|
|
if ($row) {
|
|
echo "📄 ФАЙЛ 395959:\n";
|
|
echo "=============\n";
|
|
echo "ID: {$row['notesid']}\n";
|
|
echo "Title: {$row['title']}\n";
|
|
echo "Created: {$row['createdtime']}\n";
|
|
echo "Filename: {$row['filename']}\n";
|
|
echo "S3 Key: {$row['s3_key']}\n";
|
|
echo "Location Type: {$row['filelocationtype']}\n";
|
|
echo "File Size: {$row['filesize']}\n";
|
|
|
|
$sql2 = "SELECT sr.crmid, p.projectname
|
|
FROM vtiger_senotesrel sr
|
|
LEFT JOIN vtiger_project p ON sr.crmid = p.projectid
|
|
WHERE sr.notesid = 395959";
|
|
$stmt2 = $pdo->prepare($sql2);
|
|
$stmt2->execute();
|
|
$rel = $stmt2->fetch(PDO::FETCH_ASSOC);
|
|
|
|
if ($rel) {
|
|
echo "\n📎 ПРИВЯЗКА:\n";
|
|
echo "Project ID: {$rel['crmid']}\n";
|
|
echo "Project Name: {$rel['projectname']}\n";
|
|
}
|
|
} else {
|
|
echo "Файл 395959 не найден!\n";
|
|
}
|
|
?>
|
|
|
|
|
|
|