<?php chdir('..'); $Vtiger_Utils_Log = true; include_once('vtlib/Vtiger/Module.php'); include_once 'includes/mai...
<?php
chdir('..');
$Vtiger_Utils_Log = true;
include_once('vtlib/Vtiger/Module.php');
include_once 'includes/main/WebUI.php';
$fields1 = array(
'Family' => array( // Module name
'LBL_FAMILY_INFORMATION' => array( //block name
'cf_dependent_ince' => array(
'label' => 'LBL_cf_dependent_ince',
'uitype ' => 71,
'columntype' => 'decimal(25,8)',
'table' => 'vtiger_familycf',
'typeofdata' => 'N~O'
),
),
)
);
foreach ($fields1 as $ml => $mv) {
$module = Vtiger_Module::getInstance($ml);
if ($module) {
foreach ($mv as $bl => $bv) {
$block = Vtiger_Block::getInstance($bl, $module);
if (!$block) {
$block = new Vtiger_Block();
$block->label = $bl;
$block->__create($module);
} else {
// $block->__delete();
}
foreach ($bv as $fn => $fv) {
$field = Vtiger_Field::getInstance($fn, $module);
if (!$field) {
$field = new Vtiger_Field();
$field->name = $fn;
$field->label = $fv['label'];
$field->uitype = $fv['uitype'];
$field->table = $fv['table'];
$field->columntype = $fv['columntype'];
$field->typeofdata = $fv['typeofdata'];
$field->__create($block);
// uitype
if ($fv['uitype'] == 15 ) {
$field->setPicklistValues($fv['picklistvalues']);
}
if ($fv['uitype'] == 33 ) {
$field->setPicklistValues($fv['picklistvalues']);
}
echo "Field " . $fv['label'] . " is created!<br>";
} else {
// $field->__delete();
echo "Field " . $fv['label'] . " exist!<br>";
}
}
}
}
}
echo 'End Process';
exit;
?>
chdir('..');
$Vtiger_Utils_Log = true;
include_once('vtlib/Vtiger/Module.php');
include_once 'includes/main/WebUI.php';
$fields1 = array(
'Family' => array( // Module name
'LBL_FAMILY_INFORMATION' => array( //block name
'cf_dependent_ince' => array(
'label' => 'LBL_cf_dependent_ince',
'uitype ' => 71,
'columntype' => 'decimal(25,8)',
'table' => 'vtiger_familycf',
'typeofdata' => 'N~O'
),
),
)
);
foreach ($fields1 as $ml => $mv) {
$module = Vtiger_Module::getInstance($ml);
if ($module) {
foreach ($mv as $bl => $bv) {
$block = Vtiger_Block::getInstance($bl, $module);
if (!$block) {
$block = new Vtiger_Block();
$block->label = $bl;
$block->__create($module);
} else {
// $block->__delete();
}
foreach ($bv as $fn => $fv) {
$field = Vtiger_Field::getInstance($fn, $module);
if (!$field) {
$field = new Vtiger_Field();
$field->name = $fn;
$field->label = $fv['label'];
$field->uitype = $fv['uitype'];
$field->table = $fv['table'];
$field->columntype = $fv['columntype'];
$field->typeofdata = $fv['typeofdata'];
$field->__create($block);
// uitype
if ($fv['uitype'] == 15 ) {
$field->setPicklistValues($fv['picklistvalues']);
}
if ($fv['uitype'] == 33 ) {
$field->setPicklistValues($fv['picklistvalues']);
}
echo "Field " . $fv['label'] . " is created!<br>";
} else {
// $field->__delete();
echo "Field " . $fv['label'] . " exist!<br>";
}
}
}
}
}
echo 'End Process';
exit;
?>