• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getFieldid函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getFieldid函数的典型用法代码示例。如果您正苦于以下问题:PHP getFieldid函数的具体用法?PHP getFieldid怎么用?PHP getFieldid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getFieldid函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getDependentPicklistFields

 static function getDependentPicklistFields($module = '')
 {
     global $adb;
     if (empty($module)) {
         $result = $adb->pquery('SELECT DISTINCT sourcefield, targetfield, tabid FROM vtiger_picklist_dependency', array());
     } else {
         $tabId = getTabid($module);
         $result = $adb->pquery('SELECT DISTINCT sourcefield, targetfield, tabid FROM vtiger_picklist_dependency WHERE tabid=?', array($tabId));
     }
     $noofrows = $adb->num_rows($result);
     $dependentPicklists = array();
     if ($noofrows > 0) {
         $fieldlist = array();
         for ($i = 0; $i < $noofrows; ++$i) {
             $fieldTabId = $adb->query_result($result, $i, 'tabid');
             $sourceField = $adb->query_result($result, $i, 'sourcefield');
             $targetField = $adb->query_result($result, $i, 'targetfield');
             if (getFieldid($fieldTabId, $sourceField) == false || getFieldid($fieldTabId, $targetField) == false) {
                 continue;
             }
             $fieldResult = $adb->pquery('SELECT fieldlabel FROM vtiger_field WHERE fieldname = ?', array($sourceField));
             $sourceFieldLabel = $adb->query_result($fieldResult, 0, 'fieldlabel');
             $fieldResult = $adb->pquery('SELECT fieldlabel FROM vtiger_field WHERE fieldname = ?', array($targetField));
             $targetFieldLabel = $adb->query_result($fieldResult, 0, 'fieldlabel');
             $forModule = getTabModuleName($fieldTabId);
             $dependentPicklists[] = array('sourcefield' => $sourceField, 'sourcefieldlabel' => vtranslate($sourceFieldLabel, $forModule), 'targetfield' => $targetField, 'targetfieldlabel' => vtranslate($targetFieldLabel, $forModule), 'module' => $forModule);
         }
     }
     return $dependentPicklists;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:30,代码来源:DependentPickListUtils.php


示例2: isFieldActive

/** Function to check if the field is Active
 *  @params  $modulename -- Module Name :: String Type
 *   		 $fieldname  -- Field Name  :: String Type
 */
function isFieldActive($modulename, $fieldname)
{
    $fieldid = getFieldid(getTabid($modulename), $fieldname, true);
    return $fieldid !== false;
}
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:9,代码来源:UserInfoUtil.php


示例3: getValue


//.........这里部分代码省略.........
            $value = getTranslatedString($temp_val, $currentModule);
        } elseif ($uitype == 71 || $uitype == 72) {
            if ($temp_val != '') {
                if ($fieldname == 'unit_price') {
                    $currency_id = getProductBaseCurrency($entity_id, $module);
                    $cursym_convrate = getCurrencySymbolandCRate($currency_id);
                    $value = "<font style='color:grey;'>" . $cursym_convrate['symbol'] . "</font> " . $temp_val;
                } else {
                    $rate = $user_info['conv_rate'];
                    //changes made to remove vtiger_currency symbol infront of each vtiger_potential amount
                    if ($temp_val != 0) {
                        $value = convertFromDollar($temp_val, $rate);
                    } else {
                        $value = $temp_val;
                    }
                }
            } else {
                $value = '';
            }
        } elseif ($uitype == 17) {
            $value = '<a href="http://' . $field_val . '" target="_blank">' . $temp_val . '</a>';
        } elseif ($uitype == 13 || $uitype == 104 && ($_REQUEST['action'] != 'Popup' && $_REQUEST['file'] != 'Popup')) {
            if ($_SESSION['internal_mailer'] == 1) {
                //check added for email link in user detailview
                if ($module == 'Calendar') {
                    if (getActivityType($entity_id) == 'Task') {
                        $tabid = 9;
                    } else {
                        $tabid = 16;
                    }
                } else {
                    $tabid = getTabid($module);
                }
                $fieldid = getFieldid($tabid, $fieldname);
                if (empty($popuptype)) {
                    $value = '<a href="javascript:InternalMailer(' . $entity_id . ',' . $fieldid . ',\'' . $fieldname . '\',\'' . $module . '\',\'record_id\');">' . $temp_val . '</a>';
                } else {
                    $value = $temp_val;
                }
            } else {
                $value = '<a href="mailto:' . $field_val . '">' . $temp_val . '</a>';
            }
        } elseif ($uitype == 56) {
            if ($temp_val == 1) {
                $value = $app_strings['yes'];
            } elseif ($temp_val == 0) {
                $value = $app_strings['no'];
            } else {
                $value = '';
            }
        } elseif ($uitype == 57) {
            if ($temp_val != '') {
                $sql = "SELECT * FROM vtiger_contactdetails WHERE contactid=?";
                $result = $adb->pquery($sql, array($temp_val));
                $value = '';
                if ($adb->num_rows($result)) {
                    $name = getFullNameFromQResult($result, 0, "Contacts");
                    $value = '<a href=index.php?module=Contacts&action=DetailView&record=' . $temp_val . '>' . $name . '</a>';
                }
            } else {
                $value = '';
            }
        } elseif ($uitype == 58) {
            if ($temp_val != '') {
                $sql = "SELECT * FROM vtiger_campaign WHERE campaignid=?";
                $result = $adb->pquery($sql, array($temp_val));
开发者ID:latechdirect,项目名称:vtiger,代码行数:67,代码来源:ListViewUtils.php


示例4: addDefaultLeadMapping

 function addDefaultLeadMapping()
 {
     global $adb;
     $fieldMap = array(array('company', 'accountname', null, 'potentialname', 0), array('industry', 'industry', null, null, 1), array('phone', 'phone', 'phone', null), 1, array('fax', 'fax', 'fax', null, 1), array('rating', 'rating', null, null, 1), array('email', 'email1', 'email', null, 0), array('website', 'website', null, null, 1), array('city', 'bill_city', 'mailingcity', null, 1), array('code', 'bill_code', 'mailingcode', null, 1), array('country', 'bill_country', 'mailingcountry', null, 1), array('state', 'bill_state', 'mailingstate', null, 1), array('lane', 'bill_street', 'mailingstreet', null, 1), array('pobox', 'bill_pobox', 'mailingpobox', null, 1), array('city', 'ship_city', null, null, 1), array('code', 'ship_code', null, null, 1), array('country', 'ship_country', null, null, 1), array('state', 'ship_state', null, null, 1), array('lane', 'ship_street', null, null, 1), array('pobox', 'ship_pobox', null, null, 1), array('description', 'description', 'description', 'description', 1), array('salutationtype', null, 'salutationtype', null, 1), array('firstname', null, 'firstname', null, 0), array('lastname', null, 'lastname', null, 0), array('mobile', null, 'mobile', null, 1), array('designation', null, 'title', null, 1), array('secondaryemail', null, 'secondaryemail', null, 1), array('leadsource', null, 'leadsource', 'leadsource', 1), array('leadstatus', null, null, null, 1), array('noofemployees', 'employees', null, null, 1), array('annualrevenue', 'annual_revenue', null, null, 1));
     $leadTab = getTabid('Leads');
     $accountTab = getTabid('Accounts');
     $contactTab = getTabid('Contacts');
     $potentialTab = getTabid('Potentials');
     $mapSql = "INSERT INTO vtiger_convertleadmapping(leadfid,accountfid,contactfid,potentialfid,editable) values(?,?,?,?,?)";
     foreach ($fieldMap as $values) {
         $leadfid = getFieldid($leadTab, $values[0]);
         $accountfid = getFieldid($accountTab, $values[1]);
         $contactfid = getFieldid($contactTab, $values[2]);
         $potentialfid = getFieldid($potentialTab, $values[3]);
         $editable = $values[4];
         $adb->pquery($mapSql, array($leadfid, $accountfid, $contactfid, $potentialfid, $editable));
     }
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:18,代码来源:DefaultDataPopulator.php


示例5: getToolTipText

/**
 * function to return the tooltip information
 * @param int $view - there can be multiple tooltips for a single module; this variable decides which is for which field
 * @param int $tabid - tabid of the field for which the tooltip has to be fetched
 * @param int $id - this  is the crmid of the record
 * returns the tooltip string 
 */
function getToolTipText($view, $fieldname, $module, $value)
{
    global $adb, $app_strings;
    $keys = array_keys($value[0]);
    //getting the quickview list here
    $fieldlabel = array();
    $fieldid = getFieldid(getTabid($module), $fieldname);
    $quickview = 'select fieldname,fieldlabel from vtiger_quickview inner join vtiger_field on vtiger_quickview.related_fieldid=vtiger_field.fieldid where vtiger_quickview.fieldid = ? and currentview= ? and vtiger_field.presence in (0,2) order by vtiger_quickview.sequence';
    $result = $adb->pquery($quickview, array($fieldid, $view));
    $count = $adb->num_rows($result);
    $text = '';
    $fieldname = array();
    for ($i = 0; $i < $count; $i++) {
        $fieldname = $adb->query_result($result, $i, "fieldname");
        if (in_array($fieldname, $keys)) {
            $fieldlabel = $adb->query_result($result, $i, "fieldlabel");
            $label = getTranslatedString($fieldlabel);
            $fieldvalue = $value[0][$fieldname];
            if (strlen($fieldvalue) > 35) {
                $fieldvalue = substr($fieldvalue, 0, 35) . '...';
            }
            $text[$label] = $fieldvalue;
        }
    }
    return $text;
}
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:33,代码来源:TooltipUtils.php


示例6: getBlockId

$otherEventDuration->column = 'othereventduration';
$otherEventDuration->columntype = 'varchar(100)';
$otherEventDuration->typeofdata = 'V~O';
$otherEventDuration->uitype = 16;
$otherEventDuration->sequence = 4;
$otherEventDuration->defaultvalue = 5;
$calendarSettings->addField($otherEventDuration);
$otherEventDuration->setPicklistValues(array('5', '10', '30', '60', '120'));
$blockId = getBlockId($tabId, 'LBL_CALENDAR_SETTINGS');
$sql = 'UPDATE vtiger_field SET block = ? , displaytype = ? WHERE tabid = ? AND tablename = ? AND columnname in (?,?,?,?,?,?)';
Migration_Index_View::ExecuteQuery($sql, array($blockId, 1, $tabId, 'vtiger_users', 'time_zone', 'activity_view', 'reminder_interval', 'date_format', 'start_hour', 'hour_format'));
Migration_Index_View::ExecuteQuery('UPDATE vtiger_field SET uitype = ? WHERE tabid = ? AND tablename = ? AND columnname in (?,?)', array(16, $tabId, 'vtiger_users', 'hour_format', 'start_hour'));
$fieldid = getFieldid($tabId, 'hour_format');
$hour_format = Vtiger_Field::getInstance($fieldid, $moduleInstance);
$hour_format->setPicklistValues(array(12, 24));
$fieldid = getFieldid($tabId, 'start_hour');
$start_hour = Vtiger_Field::getInstance($fieldid, $moduleInstance);
$start_hour->setPicklistValues(array('00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00'));
//update hour_format value in existing customers
Migration_Index_View::ExecuteQuery('UPDATE vtiger_users SET hour_format = ? WHERE hour_format = ? OR hour_format = ?', array(12, 'am/pm', ''));
//add user default values
//SalesPlatform.ru begin
Migration_Index_View::ExecuteQuery('UPDATE vtiger_users SET dayoftheweek = ?, callduration = ?, othereventduration = ?, start_hour = ? ', array('Monday', 5, 5, '00:00'));
/*vtiger commented code
Migration_Index_View::ExecuteQuery('UPDATE vtiger_users SET dayoftheweek = ?, callduration = ?, othereventduration = ?, start_hour = ? ', array('Sunday', 5, 5, '00:00'));
 */
//SalesPlatform.ru end
$moduleInstance = Vtiger_Module::getInstance('Events');
$tabId = getTabid('Events');
// Update/Increment the sequence for the succeeding blocks of Events module, with starting sequence 4
Migration_Index_View::ExecuteQuery('UPDATE vtiger_blocks SET sequence = sequence+1 WHERE tabid=? AND sequence >= 4', array($tabId));
开发者ID:gitter-badger,项目名称:openshift-salesplatform,代码行数:31,代码来源:540_to_600RC.php


示例7: ExecutePQuery

if ($adb->num_rows($check_res) > 0) {
    ExecutePQuery($update_mapping, array(getFieldid($leadTab, 'email'), getFieldid($accountTab, 'email1'), getFieldid($contactTab, 'email'), 0));
} else {
    ExecutePQuery($insert_mapping, array(getFieldid($leadTab, 'email'), getFieldid($accountTab, 'email1'), getFieldid($contactTab, 'email'), null, 0));
}
$check_res = $adb->pquery($check_mapping, array(getFieldid($leadTab, 'firstname'), 0, getFieldid($contactTab, 'firstname'), 0));
if ($adb->num_rows($check_res) > 0) {
    ExecutePQuery($update_mapping, array(getFieldid($leadTab, 'firstname'), 0, getFieldid($contactTab, 'firstname'), 0));
} else {
    ExecutePQuery($insert_mapping, array(getFieldid($leadTab, 'firstname'), null, getFieldid($contactTab, 'firstname'), null, 0));
}
$check_res = $adb->pquery($check_mapping, array(getFieldid($leadTab, 'lastname'), 0, getFieldid($contactTab, 'lastname'), 0));
if ($adb->num_rows($check_res) > 0) {
    ExecutePQuery($update_mapping, array(getFieldid($leadTab, 'lastname'), 0, getFieldid($contactTab, 'lastname'), 0));
} else {
    ExecutePQuery($insert_mapping, array(getFieldid($leadTab, 'lastname'), null, getFieldid($contactTab, 'lastname'), null, 0));
}
$productInstance = Vtiger_Module::getInstance('Products');
$serviceInstance = Vtiger_Module::getInstance('Services');
/* Replace 'Handler' field with 'Assigned to' field for Products and Services - starts */
ExecuteQuery("UPDATE vtiger_crmentity, vtiger_products SET vtiger_crmentity.smownerid = vtiger_products.handler WHERE vtiger_crmentity.crmid = vtiger_products.productid");
ExecuteQuery("ALTER TABLE vtiger_products DROP COLUMN handler");
ExecutePQuery("UPDATE vtiger_field SET columnname = 'smownerid', tablename = 'vtiger_crmentity', uitype = '53', typeofdata = 'V~M', info_type = 'BAS', quickcreate = 0, quickcreatesequence = 5\r\n\t\t\t\tWHERE columnname = 'handler' AND tablename = 'vtiger_products' AND tabid = ?", array($productsTabId));
$oldProductHandlerColumnName = 'vtiger_products:handler:assigned_user_id:Products_Handler:V';
$newProductHandlerColumnName = 'vtiger_crmentity:smownerid:assigned_user_id:Products_Handler:V';
ExecutePQuery("UPDATE vtiger_cvcolumnlist SET columnname=? WHERE columnname=?", array($newProductHandlerColumnName, $oldProductHandlerColumnName));
ExecutePQuery("UPDATE vtiger_cvadvfilter SET columnname=? WHERE columnname=?", array($newProductHandlerColumnName, $oldProductHandlerColumnName));
ExecuteQuery("UPDATE vtiger_crmentity, vtiger_service SET vtiger_crmentity.smownerid = vtiger_service.handler WHERE vtiger_crmentity.crmid = vtiger_service.serviceid");
ExecuteQuery("ALTER TABLE vtiger_service DROP COLUMN handler");
ExecutePQuery("UPDATE vtiger_field SET columnname = 'smownerid', tablename = 'vtiger_crmentity', uitype = '53', typeofdata = 'V~M', info_type = 'BAS', quickcreate = 0, quickcreatesequence = 4\r\n\t\t\t\tWHERE columnname = 'handler' AND tablename = 'vtiger_service' AND tabid = ?", array($servicesTabId));
$oldServiceOwnerColumnName = 'vtiger_service:handler:assigned_user_id:Services_Owner:V';
开发者ID:mslokhat,项目名称:corebos,代码行数:31,代码来源:530_to_540rc.php


示例8: getMappedFieldValue

 function getMappedFieldValue($module, $fieldName, $editable)
 {
     global $adb, $default_charset;
     $fieldid = getFieldid(getTabid($module), $fieldName);
     $sql = "SELECT leadfid FROM vtiger_convertleadmapping\n\t\t\tWHERE (accountfid=?\n\t\t\tOR contactfid=?\n\t\t\tOR potentialfid=?)\n\t\t\tAND editable=?";
     $result = $adb->pquery($sql, array($fieldid, $fieldid, $fieldid, $editable));
     $leadfid = $adb->query_result($result, 0, 'leadfid');
     $sql = "SELECT fieldname FROM vtiger_field WHERE fieldid=? AND tabid=?";
     $result = $adb->pquery($sql, array($leadfid, getTabid('Leads')));
     $leadfname = $adb->query_result($result, 0, 'fieldname');
     $fieldinfo = $this->getFieldInfo($module, $fieldName);
     if ($fieldinfo['type']['name'] == 'picklist' || $fieldinfo['type']['name'] == 'multipicklist') {
         $valuelist = null;
         switch ($fieldName) {
             case 'industry':
                 $valuelist = $this->getIndustryList();
                 break;
             case 'sales_stage':
                 $valuelist = $this->getSalesStageList();
                 break;
         }
         foreach ($fieldinfo['type']['picklistValues'] as $key => $values) {
             if ($values['value'] == $this->row[$leadfname]) {
                 return $this->row[$leadfname];
             }
         }
         return $fieldinfo['default'];
     }
     $value = html_entity_decode($this->row[$leadfname], ENT_QUOTES, $default_charset);
     return htmlentities($value, ENT_QUOTES, $default_charset);
     //return $this->row[$leadfname];
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:32,代码来源:ConvertLeadUI.php



注:本文中的getFieldid函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getFields函数代码示例发布时间:2022-05-15
下一篇:
PHP getFieldVisibilityPermission函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap