Files
crm.clientright.ru/search_1994.php

46 lines
1.7 KiB
PHP
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
require_once('config.php');
global $adb;
// Поищем все поля, которые содержат "1994"
$query = "SELECT fieldname, fieldlabel FROM vtiger_field WHERE tabid = (SELECT tabid FROM vtiger_tab WHERE name = 'Project') AND fieldname LIKE '%1994%'";
$result = $adb->pquery($query, array());
echo "Fields containing '1994':\n";
while ($row = $adb->fetch_array($result)) {
$fieldname = $row['fieldname'];
$fieldlabel = $row['fieldlabel'];
echo "$fieldname - $fieldlabel\n";
}
// Также проверим структуру таблицы vtiger_project
echo "\nChecking vtiger_project table structure for fields containing '1994':\n";
$query2 = "SHOW COLUMNS FROM vtiger_project LIKE '%1994%'";
$result2 = $adb->pquery($query2, array());
while ($row2 = $adb->fetch_array($result2)) {
$field = $row2['Field'];
echo "$field - " . $row2['Type'] . "\n";
}
// Проверим все custom поля проекта
echo "\nAll custom fields for Project module:\n";
$query3 = "SELECT fieldname, fieldlabel FROM vtiger_field WHERE tabid = (SELECT tabid FROM vtiger_tab WHERE name = 'Project') AND fieldname LIKE 'cf_%' ORDER BY fieldname";
$result3 = $adb->pquery($query3, array());
while ($row3 = $adb->fetch_array($result3)) {
$fieldname = $row3['fieldname'];
$fieldlabel = $row3['fieldlabel'];
// Выделим поля, которые могут быть связаны с заявителем
if (stripos($fieldlabel, 'заявитель') !== false ||
stripos($fieldlabel, 'applicant') !== false ||
stripos($fieldlabel, 'заяв') !== false) {
echo "*** $fieldname - $fieldlabel ***\n";
} else {
echo "$fieldname - $fieldlabel\n";
}
}
?>