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

PHP getBlockName函数代码示例

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

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



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

示例1: getListFiledOfModule

 function getListFiledOfModule($moduleName, $relID = false)
 {
     $db = PearDatabase::getInstance();
     $tabid = getTabid($moduleName);
     $sql = "select `fieldid`, `fieldlabel`, `uitype`, `block` from vtiger_field where tabid = ? AND presence <> ? AND typeofdata <> ? AND `block` NOT IN (?)";
     $result = $db->pquery($sql, array($tabid, 1, 'P~M', 0));
     $output = array();
     $block = ['blockId' => '', 'blockLabel' => ''];
     for ($i = 0; $i < $db->num_rows($result); $i++) {
         $blockid = $db->query_result($result, $i, 'block');
         if ($block['blockId'] != $blockid) {
             $block['blockId'] = $blockid;
             $block['blockLabel'] = getBlockName($blockid);
         }
         if ($relID) {
             $id = $db->query_result($result, $i, 'fieldid') . '||' . $relID;
         } else {
             $id = $db->query_result($result, $i, 'fieldid');
         }
         $output[$blockid][$i]['label'] = vtranslate($db->query_result($result, $i, 'fieldlabel'), $moduleName);
         $output[$blockid][$i]['id'] = $id;
         $output[$blockid][$i]['uitype'] = $db->query_result($result, $i, 'uitype');
         $output[$blockid]['blockLabel'] = vtranslate($block['blockLabel'], $moduleName);
     }
     return $output;
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:26,代码来源:Module.php


示例2: fixGetColumnsListbyBlockForInventory

 function fixGetColumnsListbyBlockForInventory($module, $blockid, &$module_columnlist)
 {
     global $log;
     $blockname = getBlockName($blockid);
     if ($blockname == 'LBL_RELATED_PRODUCTS' && ($module == 'PurchaseOrder' || $module == 'SalesOrder' || $module == 'Quotes' || $module == 'Invoice')) {
         $fieldtablename = 'vtiger_inventoryproductrel';
         $fields = array('productid' => getTranslatedString('Product Name', $module), 'serviceid' => getTranslatedString('Service Name', $module), 'listprice' => getTranslatedString('List Price', $module), 'discount_amount' => getTranslatedString('Discount', $module), 'quantity' => getTranslatedString('Quantity', $module), 'comment' => getTranslatedString('Comments', $module));
         $fields_datatype = array('productid' => 'V', 'serviceid' => 'V', 'listprice' => 'I', 'discount_amount' => 'I', 'quantity' => 'I', 'comment' => 'V');
         foreach ($fields as $fieldcolname => $label) {
             $column_name = str_replace(' ', '__', $label);
             $fieldtypeofdata = $fields_datatype[$fieldcolname];
             $optionvalue = $fieldtablename . ":" . $fieldcolname . ":" . $module . "__" . $column_name . ":" . $fieldcolname . ":" . $fieldtypeofdata;
             $module_columnlist[$optionvalue] = $label;
         }
     }
     $log->info("Reports :: FieldColumns->Successfully returned ColumnslistbyBlock" . $module . $block);
     return $module_columnlist;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:18,代码来源:Reports.php


示例3: getColumnsListbyBlock

 /** Function to get vtiger_fields for the given module and block
  *  This function gets the vtiger_fields for the given module
  *  It accepts the module and the block as arguments and
  *  returns the array column lists
  *  Array module_columnlist[ vtiger_fieldtablename:fieldcolname:module_fieldlabel1:fieldname:fieldtypeofdata]=fieldlabel
  */
 function getColumnsListbyBlock($module, $block)
 {
     global $adb, $log, $current_user;
     if (is_string($block)) {
         $block = explode(",", $block);
     }
     $skipTalbes = array('vtiger_emaildetails', 'vtiger_attachments');
     $tabid = getTabid($module);
     if ($module == 'Calendar') {
         $tabid = array('9', '16');
     }
     $params = array($tabid, $block);
     require 'user_privileges/user_privileges_' . $current_user->id . '.php';
     //Security Check
     if ($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0) {
         $sql = "select * from vtiger_field where vtiger_field.tabid in (" . generateQuestionMarks($tabid) . ") and vtiger_field.block in (" . generateQuestionMarks($block) . ") and vtiger_field.displaytype in (1,2,3) and vtiger_field.presence in (0,2) AND tablename NOT IN (" . generateQuestionMarks($skipTalbes) . ") ";
         //fix for Ticket #4016
         if ($module == "Calendar") {
             $sql .= " group by vtiger_field.fieldlabel order by sequence";
         } else {
             $sql .= " order by sequence";
         }
     } else {
         $profileList = getCurrentUserProfileList();
         $sql = "select * from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid in (" . generateQuestionMarks($tabid) . ") and vtiger_field.block in (" . generateQuestionMarks($block) . ") and vtiger_field.displaytype in (1,2,3) and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_field.presence in (0,2)";
         if (count($profileList) > 0) {
             $sql .= " and vtiger_profile2field.profileid in (" . generateQuestionMarks($profileList) . ")";
             array_push($params, $profileList);
         }
         $sql .= ' and tablename NOT IN (' . generateQuestionMarks($skipTalbes) . ') ';
         //fix for Ticket #4016
         if ($module == "Calendar") {
             $sql .= " group by vtiger_field.fieldlabel order by sequence";
         } else {
             $sql .= " group by vtiger_field.fieldid order by sequence";
         }
     }
     array_push($params, $skipTalbes);
     $module_columnlist = array();
     $result = $adb->pquery($sql, $params);
     $noofrows = $adb->num_rows($result);
     for ($i = 0; $i < $noofrows; $i++) {
         $fieldtablename = $adb->query_result($result, $i, "tablename");
         $fieldcolname = $adb->query_result($result, $i, "columnname");
         $fieldname = $adb->query_result($result, $i, "fieldname");
         $fieldtype = $adb->query_result($result, $i, "typeofdata");
         $uitype = $adb->query_result($result, $i, "uitype");
         $fieldtype = explode("~", $fieldtype);
         $fieldtypeofdata = $fieldtype[0];
         $blockid = $adb->query_result($result, $i, "block");
         //Here we Changing the displaytype of the field. So that its criteria will be displayed correctly in Reports Advance Filter.
         $fieldtypeofdata = ChangeTypeOfData_Filter($fieldtablename, $fieldcolname, $fieldtypeofdata);
         if ($uitype == 68 || $uitype == 59) {
             $fieldtypeofdata = 'V';
         }
         if ($fieldtablename == "vtiger_crmentity") {
             $fieldtablename = $fieldtablename . $module;
         }
         if ($fieldname == "assigned_user_id") {
             $fieldtablename = "vtiger_users" . $module;
             $fieldcolname = "user_name";
         }
         if ($fieldname == "assigned_user_id1") {
             $fieldtablename = "vtiger_usersRel1";
             $fieldcolname = "user_name";
         }
         $fieldlabel = $adb->query_result($result, $i, "fieldlabel");
         if ($module == 'Emails' and $fieldlabel == 'Date & Time Sent') {
             $fieldlabel = 'Date Sent';
             $fieldtypeofdata = 'D';
         }
         $fieldlabel1 = str_replace(' ', '_', $fieldlabel);
         $fieldlabel1 = ReportRun::replaceSpecialChar($fieldlabel1);
         $optionvalue = $fieldtablename . ":" . $fieldcolname . ":" . $module . "_" . $fieldlabel1 . ":" . $fieldname . ":" . $fieldtypeofdata;
         $this->adv_rel_fields[$fieldtypeofdata][] = '$' . $module . '#' . $fieldname . '$' . "::" . getTranslatedString($module, $module) . " " . getTranslatedString($fieldlabel, $module);
         $module_columnlist[$optionvalue] = $fieldlabel;
     }
     $blockname = getBlockName($block);
     if ($blockname == 'LBL_RELATED_PRODUCTS' && in_array($module, getInventoryModules())) {
         $fieldtablename = 'vtiger_inventoryproductrel';
         $fields = array('productid' => getTranslatedString('Product Name', $module), 'serviceid' => getTranslatedString('Service Name', $module), 'listprice' => getTranslatedString('List Price', $module), 'discount' => getTranslatedString('Discount', $module), 'quantity' => getTranslatedString('Quantity', $module), 'comment' => getTranslatedString('Comments', $module));
         $fields_datatype = array('productid' => 'V', 'serviceid' => 'V', 'listprice' => 'N', 'discount' => 'N', 'quantity' => 'N', 'comment' => 'V');
         foreach ($fields as $fieldcolname => $label) {
             $fieldtypeofdata = $fields_datatype[$fieldcolname];
             if ($fieldcolname != 'productid' || $fieldcolname != 'serviceid') {
                 $optionvalue = $fieldtablename . $module . ":" . $fieldcolname . ":" . $module . "_" . $label . ":" . $fieldcolname . ":" . $fieldtypeofdata;
             } else {
                 $optionvalue = $fieldtablename . ":" . $fieldcolname . ":" . $module . "_" . $label . ":" . $fieldcolname . ":" . $fieldtypeofdata;
             }
             $module_columnlist[$optionvalue] = $label;
         }
     }
     $log->info("Reports :: FieldColumns->Successfully returned ColumnslistbyBlock" . $module . $block);
     return $module_columnlist;
//.........这里部分代码省略.........
开发者ID:kikojover,项目名称:corebos,代码行数:101,代码来源:Reports.php


示例4: getBlockName

 public function getBlockName()
 {
     if (empty($this->blockName)) {
         $this->blockName = getBlockName($this->blockId);
     }
     return $this->blockName;
 }
开发者ID:jgjermeni,项目名称:corebos,代码行数:7,代码来源:WebserviceField.php


示例5: getMainModuleFields

 public static function getMainModuleFields($moduleName)
 {
     $db = PearDatabase::getInstance();
     if (is_array($moduleName)) {
         $moduleName = $moduleName['moduleName'];
     } elseif (strpos($moduleName, '+') !== false) {
         $moduleName = explode('+', $moduleName)[1];
     }
     $tabId = getTabid($moduleName);
     $query = 'SELECT `fieldid`, `fieldlabel`, `fieldname`, `uitype`, `block` FROM `vtiger_field` WHERE `tabid` = ? AND `presence` != ? AND `typeofdata` != ? AND `block` NOT IN (?) ORDER BY block,sequence;';
     $result = $db->pquery($query, [$tabId, 1, 'P~M', 0]);
     $output = [];
     $currentBlockId = '';
     $currentBlockName = '';
     $i = 0;
     while ($row = $db->fetchByAssoc($result)) {
         if ($currentBlockId != $row['block']) {
             $currentBlockName = vtranslate(getBlockName($row['block']), $moduleName);
         }
         $currentBlockId = $row['block'];
         $output[$currentBlockName][$i]['label'] = vtranslate($row['fieldlabel'], $moduleName);
         $output[$currentBlockName][$i]['id'] = $row['fieldid'];
         $output[$currentBlockName][$i]['name'] = $row['fieldname'];
         $output[$currentBlockName][$i]['uitype'] = $row['uitype'];
         $i++;
     }
     return $output;
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:28,代码来源:Module.php


示例6: explode

            if (count($arr) < 3) {
                break;
            }
            $lines = explode(",", $arr[2]);
            foreach ($lines as $key => $value) {
                $lines[$key] = base64_decode($value);
            }
            $fdata = implode("<br />", $lines);
            break;
        case 23:
        case 24:
            $arr = explode("x ", $fdata);
            //Separate the quantity from the item/block number
            $item = explode(":", $arr[1]);
            //Separate the damage value from the item/block
            $changeString = $arr[0] . "x " . getBlockName($item[0]);
            //String is now "quantity"x "blockname"
            if ($item[1] != "0") {
                $changeString = $changeString . ":" . $item[1];
            }
            //If item has a damage value other than 0, add it to changeString
            $fdata = $changeString;
            break;
    }
    $action = str_replace(array_reverse(array_keys($lang["actions"])), array_reverse($lang["actions"]), $action);
    //Add to output row
    array_push($row, $entry->data_id, $entry->timestamp, $players[$entry->player_id], $action, $worlds[$entry->world_id], round($entry->x, 1) . "," . round($entry->y, 1) . "," . round($entry->z, 1), $fdata);
    array_push($output["data"], $row);
}
echo json_encode($output);
/*
开发者ID:EriolEandur,项目名称:HawkReloaded,代码行数:31,代码来源:interface.php


示例7: getColumnsListbyBlock


//.........这里部分代码省略.........
     } else {
         $profileList = getCurrentUserProfileList();
         $sql = "select * from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid in (" . generateQuestionMarks($tabid) . ")  and vtiger_field.block in (" . generateQuestionMarks($block) . ") and vtiger_field.displaytype in (1,2,3) and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_field.presence in (0,2)";
         if (count($profileList) > 0) {
             $sql .= " and vtiger_profile2field.profileid in (" . generateQuestionMarks($profileList) . ")";
             array_push($params, $profileList);
         }
         //fix for Ticket #4016
         if ($module == "Calendar") {
             $sql .= " group by vtiger_field.fieldid,vtiger_field.fieldlabel order by sequence";
         } else {
             $sql .= " group by vtiger_field.fieldid order by sequence";
         }
     }
     $result = $adb->pquery($sql, $params);
     $noofrows = $adb->num_rows($result);
     for ($i = 0; $i < $noofrows; $i++) {
         $fieldtablename = $adb->query_result($result, $i, "tablename");
         $fieldcolname = $adb->query_result($result, $i, "columnname");
         $fieldname = $adb->query_result($result, $i, "fieldname");
         $fieldtype = $adb->query_result($result, $i, "typeofdata");
         $uitype = $adb->query_result($result, $i, "uitype");
         $fieldtype = explode("~", $fieldtype);
         $fieldtypeofdata = $fieldtype[0];
         //Here we Changing the displaytype of the field. So that its criteria will be displayed correctly in Reports Advance Filter.
         $fieldtypeofdata = ChangeTypeOfData_Filter($fieldtablename, $fieldcolname, $fieldtypeofdata);
         if ($uitype == 68 || $uitype == 59) {
             $fieldtypeofdata = 'V';
         }
         if ($fieldtablename == "vtiger_crmentity") {
             $fieldtablename = $fieldtablename . $module;
         }
         if ($fieldname == "assigned_user_id") {
             $fieldtablename = "vtiger_users" . $module;
             $fieldcolname = "user_name";
         }
         if ($fieldname == "account_id") {
             $fieldtablename = "vtiger_account" . $module;
             $fieldcolname = "accountname";
         }
         if ($fieldname == "contact_id") {
             $fieldtablename = "vtiger_contactdetails" . $module;
             $fieldcolname = "lastname";
         }
         if ($fieldname == "parent_id") {
             $fieldtablename = "vtiger_crmentityRel" . $module;
             $fieldcolname = "setype";
         }
         if ($fieldname == "vendor_id") {
             $fieldtablename = "vtiger_vendorRel" . $module;
             $fieldcolname = "vendorname";
         }
         if ($fieldname == "potential_id") {
             $fieldtablename = "vtiger_potentialRel" . $module;
             $fieldcolname = "potentialname";
         }
         if ($fieldname == "assigned_user_id1") {
             $fieldtablename = "vtiger_usersRel1";
             $fieldcolname = "user_name";
         }
         if ($fieldname == 'quote_id') {
             $fieldtablename = "vtiger_quotes" . $module;
             $fieldcolname = "subject";
         }
         $product_id_tables = array("vtiger_troubletickets" => "vtiger_productsRel", "vtiger_campaign" => "vtiger_productsCampaigns", "vtiger_faq" => "vtiger_productsFaq");
         if ($fieldname == 'product_id' && isset($product_id_tables[$fieldtablename])) {
             $fieldtablename = $product_id_tables[$fieldtablename];
             $fieldcolname = "productname";
         }
         if ($fieldname == 'campaignid' && $module == 'Potentials') {
             $fieldtablename = "vtiger_campaign" . $module;
             $fieldcolname = "campaignname";
         }
         if ($fieldname == 'currency_id' && $fieldtablename == 'vtiger_pricebook') {
             $fieldtablename = "vtiger_currency_info" . $module;
             $fieldcolname = "currency_name";
         }
         $fieldlabel = $adb->query_result($result, $i, "fieldlabel");
         $fieldlabel1 = str_replace(" ", "_", $fieldlabel);
         $optionvalue = $fieldtablename . ":" . $fieldcolname . ":" . $module . "_" . $fieldlabel1 . ":" . $fieldname . ":" . $fieldtypeofdata;
         $this->adv_rel_fields[$fieldtypeofdata][] = '$' . $module . '#' . $fieldname . '$' . "::" . getTranslatedString($module, $module) . " " . $fieldlabel;
         //added to escape attachments fields in Reports as we have multiple attachments
         if ($module != 'HelpDesk' || $fieldname != 'filename') {
             $module_columnlist[$optionvalue] = $fieldlabel;
         }
     }
     $blockname = getBlockName($block);
     if ($blockname == 'LBL_RELATED_PRODUCTS' && ($module == 'PurchaseOrder' || $module == 'SalesOrder' || $module == 'Quotes' || $module == 'Invoice')) {
         $fieldtablename = 'vtiger_inventoryproductrel';
         $fields = array('productid' => getTranslatedString('Product Name', $module), 'serviceid' => getTranslatedString('Service Name', $module), 'listprice' => getTranslatedString('List Price', $module), 'discount' => getTranslatedString('Discount', $module), 'quantity' => getTranslatedString('Quantity', $module), 'comment' => getTranslatedString('Comments', $module));
         $fields_datatype = array('productid' => 'V', 'serviceid' => 'V', 'listprice' => 'I', 'discount' => 'I', 'quantity' => 'I', 'comment' => 'V');
         foreach ($fields as $fieldcolname => $label) {
             $fieldtypeofdata = $fields_datatype[$fieldcolname];
             $optionvalue = $fieldtablename . ":" . $fieldcolname . ":" . $module . "_" . $label . ":" . $fieldcolname . ":" . $fieldtypeofdata;
             $module_columnlist[$optionvalue] = $label;
         }
     }
     $log->info("Reports :: FieldColumns->Successfully returned ColumnslistbyBlock" . $module . $block);
     return $module_columnlist;
 }
开发者ID:hardikk,项目名称:HNH,代码行数:101,代码来源:Reports.php


示例8: getColumnsListbyBlock


//.........这里部分代码省略.........
         //$adb->setDebug(false);
         $noofrows = $adb->num_rows($f_result);
         $lead_converted_added = false;
         for ($i = 0; $i < $noofrows; $i++) {
             //$_SESSION_r4u_rel_fields = unserialize($_SESSION[$r4u_rel_fields_name]);
             //$_SESSION_r4u_sel_fields = unserialize($_SESSION[$r4u_sel_fields_name]);
             $fieldid = $adb->query_result($f_result, $i, "fieldid");
             // ITS4YOU-UP SlOl 1. 10. 2013 10:46:35
             $fieldtablename = $adb->query_result($f_result, $i, "tablename");
             if ($this->primarymodule != $module) {
                 $fieldtablename = $fieldtablename;
                 if ($relfieldid != "") {
                     $fieldtablename .= "_{$relfieldid}";
                 }
             }
             $fieldcolname = $adb->query_result($f_result, $i, "columnname");
             $fieldname = $adb->query_result($f_result, $i, "fieldname");
             $fieldtype = $adb->query_result($f_result, $i, "typeofdata");
             $uitype = $adb->query_result($f_result, $i, "uitype");
             $fieldtype = explode("~", $fieldtype);
             // Fix to get table alias for orderby and groupby sql
             /* if ($relfieldid == "" && in_array($uitype, array("10",))) {
                $relfieldid = $fieldid;
                } */
             $fieldtypeofdata = $fieldtype[0];
             //Here we Changing the displaytype of the field. So that its criteria will be displayed correctly in Reports Advance Filter.
             $fieldtypeofdata = ChangeTypeOfData_Filter($fieldtablename, $fieldcolname, $fieldtypeofdata);
             if ($uitype == 68 || $uitype == 59) {
                 $fieldtypeofdata = 'V';
             }
             $fieldlabel = $adb->query_result($f_result, $i, "fieldlabel");
             $fieldlabel1 = $fieldlabel;
             if ($relfieldid != "") {
                 $relfieldid_str = $relfieldid;
             }
             // this is defining module id for uitype 10
             if ($relfieldid != "" && $this->primarymodule != $module) {
                 $rel_field_row = $adb->fetchByAssoc($adb->pquery("SELECT uitype FROM vtiger_field WHERE fieldid = ? ", array($relfieldid)), 0);
                 $rel_field_uitype = $rel_field_row["uitype"];
                 if ($rel_field_uitype == 10) {
                     $relfieldid_str = getTabid($module) . ":" . $relfieldid;
                 }
             }
             $module_lbl = vtranslate($module, $module);
             $optionvalue = $fieldtablename . ":" . $fieldcolname . ":" . $module . "_" . $fieldlabel1 . ":" . $fieldname . ":" . $fieldtypeofdata . ($relfieldid != "" ? ":" . $relfieldid_str : "");
             // $optionvalue = $fieldtablename.":".$fieldcolname.":".$module."_".$fieldlabel1.":".$fieldname.":".$fieldtypeofdata;
             $adv_rel_field_val = '$' . $module . '#' . $fieldname . '$' . "::" . $module_lbl . " " . $fieldlabel;
             $this->adv_rel_fields[$fieldtypeofdata][] = $adv_rel_field_val;
             // ITS4YOU-CR SlOl 26. 3. 2014 10:57:41
             if (in_array($uitype, ITS4YouReports::$s_uitypes) && !array_key_exists($optionvalue, $this->adv_sel_fields) && !in_array($module, array("Users"))) {
                 $this->adv_sel_fields[$optionvalue] = true;
             }
             // ITS4YOU-END 26. 3. 2014 10:57:44
             $translate_module = $module;
             //added to escape attachments fields in Reports as we have multiple attachments
             if ($module != 'HelpDesk' || $fieldname != 'filename') {
                 $module_columnlist[$optionvalue] = vtranslate($fieldlabel, $translate_module);
             }
             // ITS4YOU-CR SlOl - IS CONVERTED FIELD FOR LEADS
             if ($module == "Leads" && $block == 13 && $i == $noofrows - 1 && $lead_converted_added != true) {
                 $sc_col_str = "vtiger_leaddetails:converted:" . $module . "_Converted:converted:C";
                 $this->adv_sel_fields[$sc_col_str] = true;
                 $lead_converted_added = true;
                 $module_columnlist[$sc_col_str] = vtranslate("Converted", $module);
             }
             // CONVERTED END
             unset($_SESSION[$r4u_rel_fields_name]);
             $_SESSION[$r4u_rel_fields_name] = serialize($this->adv_rel_fields);
             unset($_SESSION[$r4u_sel_fields_name]);
             $_SESSION[$r4u_sel_fields_name] = serialize($this->adv_sel_fields);
         }
         $blockname = getBlockName($block);
         if ($blockname == 'LBL_RELATED_PRODUCTS' && in_array($module, self::$inventory_modules)) {
             if ($relfieldid != "") {
                 $rel_field_row = $adb->fetchByAssoc($adb->pquery("SELECT uitype FROM vtiger_field WHERE fieldid = ? ", array($relfieldid)), 0);
                 $rel_field_uitype = $rel_field_row["uitype"];
                 if ($rel_field_uitype == 10) {
                     $relfieldid_str = ":" . getTabid($module) . ":" . $relfieldid;
                 } else {
                     $relfieldid_str = ":" . $relfieldid;
                 }
             }
             $fieldtablename = 'vtiger_inventoryproductrel';
             if ($relfieldid != "") {
                 $fieldtablename .= "_{$relfieldid}";
             }
             $fields = array('prodname' => $module_lbl . " " . vtranslate('LBL_PRODUCT_SERVICE_NAME', $this->currentModule), 'ps_productcategory' => $module_lbl . " " . vtranslate('LBL_ITEM_CATEGORY', $this->currentModule), 'ps_productno' => $module_lbl . " " . vtranslate('LBL_ITEM_NO', $this->currentModule), 'comment' => $module_lbl . " " . vtranslate('Comments', $module), 'quantity' => $module_lbl . " " . vtranslate('Quantity', $module), 'listprice' => $module_lbl . " " . vtranslate('List Price', $module), 'ps_producttotal' => $module_lbl . " " . vtranslate('LBL_PRODUCT_TOTAL', $this->currentModule), 'discount' => $module_lbl . " " . vtranslate('Discount', $module), 'ps_productstotalafterdiscount' => $module_lbl . " " . vtranslate('LBL_PRODUCTTOTALAFTERDISCOUNT', $this->currentModule), 'ps_productvatsum' => $module_lbl . " " . vtranslate('LBL_PRODUCT_VAT_SUM', $this->currentModule), 'ps_producttotalsum' => $module_lbl . " " . vtranslate('LBL_PRODUCT_TOTAL_VAT', $this->currentModule));
             $fields_datatype = array('prodname' => 'V', 'ps_productcategory' => 'V', 'ps_productno' => 'V', 'comment' => 'V', 'prodname' => 'V', 'quantity' => 'I', 'listprice' => 'I', 'ps_producttotal' => 'I', 'discount' => 'I', 'ps_productstotalafterdiscount' => 'I', 'ps_productvatsum' => 'I', 'ps_producttotalsum' => 'I');
             $module_lbl = vtranslate($module, $module);
             foreach ($fields as $fieldcolname => $label) {
                 $fieldtypeofdata = $fields_datatype[$fieldcolname];
                 $optionvalue = $fieldtablename . ":" . $fieldcolname . ":" . $module . "_" . $label . ":" . $fieldcolname . ":" . $fieldtypeofdata . $relfieldid_str;
                 $module_columnlist[$optionvalue] = $label;
                 // $module_lbl." ".
             }
         }
         $_SESSION[$r4u_columnlist_name] = serialize($module_columnlist);
         return $module_columnlist;
     }
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:101,代码来源:ITS4YouReports.php


示例9: getFieldListbyBlock

 function getFieldListbyBlock($module, $block, $type)
 {
     global $adb;
     global $log;
     global $current_user;
     if (is_string($block)) {
         $block = explode(",", $block);
     }
     $tabid = getTabid($module, $this->dbname);
     if ($module == 'Calendar') {
         $tabid = array('9', '16');
     }
     $params = array($tabid, $block);
     $sql = "select * from {$this->dbname}.vtiger_field where vtiger_field.tabid in (" . generateQuestionMarks($tabid) . ") and vtiger_field.block in (" . generateQuestionMarks($block) . ") and vtiger_field.displaytype in (1,2,3) and vtiger_field.presence in (0,2) ";
     $result = $adb->pquery($sql, $params);
     $pmod = getTabModuleName($this->primodule, $this->dbname);
     $noofrows = $adb->num_rows($result);
     for ($i = 0; $i < $noofrows; $i++) {
         $fieldtablename = $adb->query_result($result, $i, "tablename");
         $fieldcolname = $adb->query_result($result, $i, "columnname");
         $fieldname = $adb->query_result($result, $i, "fieldname");
         $fieldtype = $adb->query_result($result, $i, "typeofdata");
         $uitype = $adb->query_result($result, $i, "uitype");
         $fieldid = $adb->query_result($result, $i, "fieldid");
         $fieldtype = explode("~", $fieldtype);
         $fieldtypeofdata = $fieldtype[0];
         if ($uitype == 68 || $uitype == 59) {
             $fieldtypeofdata = 'V';
         }
         if ($fieldtablename == "vtiger_crmentity") {
             $fieldtablename = $fieldtablename . $module;
         }
         if ($fieldname == "assigned_user_id") {
             $fieldtablename = "vtiger_users" . $module;
             $fieldcolname = "user_name";
         }
         if ($fieldname == "assigned_user_id1") {
             $fieldtablename = "vtiger_usersRel1";
             $fieldcolname = "user_name";
         }
         $fieldlabel = $adb->query_result($result, $i, "fieldlabel");
         $fieldlabel1 = str_replace(" ", "_", $fieldlabel);
         if ($type == "related") {
             $optionvalue = $fieldtablename . ":" . $fieldcolname . ":" . $module . ":" . $fieldname . ":" . $fieldid . ":" . $type . ":" . $this->rel_fields->{$pmod}->{$module};
         } else {
             $optionvalue = $fieldtablename . ":" . $fieldcolname . ":" . $module . ":" . $fieldname . ":" . $fieldid . ":" . $type;
         }
         if ($module != 'HelpDesk' || $fieldname != 'filename') {
             $module_columnlist[$optionvalue] = $fieldlabel;
         }
     }
     $blockname = getBlockName($block, $this->dbname);
     if ($blockname == 'LBL_RELATED_PRODUCTS' && ($module == 'PurchaseOrder' || $module == 'SalesOrder' || $module == 'Quotes' || $module == 'Invoice')) {
         $fieldtablename = 'vtiger_inventoryproductrel';
         $fields = array('productid' => getTranslatedString('Product Name', $module), 'serviceid' => getTranslatedString('Service Name', $module), 'listprice' => getTranslatedString('List Price', $module), 'discount' => getTranslatedString('Discount', $module), 'quantity' => getTranslatedString('Quantity', $module), 'comment' => getTranslatedString('Comments', $module));
         $fields_datatype = array('productid' => 'V', 'serviceid' => 'V', 'listprice' => 'I', 'discount' => 'I', 'quantity' => 'I', 'comment' => 'V');
         foreach ($fields as $fieldcolname => $label) {
             $fieldtypeofdata = $fields_datatype[$fieldcolname];
             if ($type == "related") {
                 $optionvalue = $fieldtablename . ":" . $fieldcolname . ":" . $module . ":" . $fieldcolname . ":" . $fieldid . ":" . $type . ":" . $this->rel_fields->{$pmod}->{$module};
             } else {
                 $optionvalue = $fieldtablename . ":" . $fieldcolname . ":" . $module . ":" . $fieldcolname . ":" . $fieldid . ":" . $type;
             }
             $module_columnlist[$optionvalue] = $label;
         }
     }
     $log->info("Map :: FieldColumns->Successfully returned FieldlistbyBlock" . $module . $block);
     return $module_columnlist;
 }
开发者ID:kduqi,项目名称:corebos,代码行数:69,代码来源:cbMap_processes.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getBlocks函数代码示例发布时间:2022-05-15
下一篇:
PHP getBlockId函数代码示例发布时间: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