Files
crm.clientright.ru/find_applicant_field.php

25 lines
847 B
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;
// Получаем все custom поля для модуля Project
$query = "SELECT fieldname, fieldlabel FROM vtiger_field WHERE tabid = (SELECT tabid FROM vtiger_tab WHERE name = 'Project') AND fieldname LIKE 'cf_%'";
$result = $adb->pquery($query, array());
echo "All custom fields for Project module:\n";
while ($row = $adb->fetch_array($result)) {
$fieldname = $row['fieldname'];
$fieldlabel = $row['fieldlabel'];
// Ищем поля, связанные с заявителем
if (stripos($fieldlabel, 'заявитель') !== false ||
stripos($fieldlabel, 'applicant') !== false ||
stripos($fieldlabel, 'заяв') !== false) {
echo "*** $fieldname - $fieldlabel ***\n";
} else {
echo "$fieldname - $fieldlabel\n";
}
}
?>