当前位置: 首页>>代码示例>>PHP>>正文


PHP ExtraFields::getOptionalsFromPost方法代码示例

本文整理汇总了PHP中ExtraFields::getOptionalsFromPost方法的典型用法代码示例。如果您正苦于以下问题:PHP ExtraFields::getOptionalsFromPost方法的具体用法?PHP ExtraFields::getOptionalsFromPost怎么用?PHP ExtraFields::getOptionalsFromPost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ExtraFields的用法示例。


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

示例1: GETPOST

 $info_bits = 0;
 if (preg_match('/\\*/', $vat_rate)) {
     $info_bits |= 0x1;
 }
 // Define vat_rate
 $vat_rate = str_replace('*', '', $vat_rate);
 $localtax1_rate = get_localtax($vat_rate, 1, $object->thirdparty);
 $localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty);
 // Add buying price
 $fournprice = price2num(GETPOST('fournprice') ? GETPOST('fournprice') : '');
 $buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : '');
 // If buying_price is '0', we muste keep this value
 // Extrafields
 $extrafieldsline = new ExtraFields($db);
 $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
 $array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline);
 // Unset extrafield
 if (is_array($extralabelsline)) {
     // Get extra fields
     foreach ($extralabelsline as $key => $value) {
         unset($_POST["options_" . $key]);
     }
 }
 // Define special_code for special lines
 $special_code = GETPOST('special_code');
 if (!GETPOST('qty')) {
     $special_code = 3;
 }
 $line = new FactureLigne($db);
 $line->fetch(GETPOST('lineid'));
 $percent = $line->get_prev_progress();
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:facture.php

示例2: ExtraFields

    if ($search_type == '') {
        $search_type = '1';
    }
}
if ($type === '0') {
    $contextpage = 'productlist';
    if ($search_type == '') {
        $search_type = '0';
    }
}
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array($contextpage));
$extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
$extralabels = $extrafields->fetch_name_optionals_label('product');
$search_array_options = $extrafields->getOptionalsFromPost($extralabels, '', 'search_');
if (empty($action)) {
    $action = 'list';
}
// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
$canvas = GETPOST("canvas");
$objcanvas = null;
if (!empty($canvas)) {
    require_once DOL_DOCUMENT_ROOT . '/core/class/canvas.class.php';
    $objcanvas = new Canvas($db, $action);
    $objcanvas->getCanvas('product', 'list', $canvas);
}
// Security check
if ($type == '0') {
    $result = restrictedArea($user, 'produit', '', '', '', '', '', $objcanvas);
} else {
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:list.php

示例3: GETPOST

                 $j++;
                 $stockLocation = "ent1" . $i . "_" . $j;
                 $qty = "qtyl" . $i . '_' . $j;
             }
         } else {
             var_dump($_POST);
             var_dump($batch);
             //shipment line for product with no batch management and no multiple stock location
             if (GETPOST($qty, 'int') > 0) {
                 $totalqty += GETPOST($qty, 'int');
             }
         }
     }
     // Extrafields
     $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
     $array_options[$i] = $extrafieldsline->getOptionalsFromPost($extralabelsline, $i);
     // Unset extrafield
     if (is_array($extralabelsline)) {
         // Get extra fields
         foreach ($extralabelsline as $key => $value) {
             unset($_POST["options_" . $key]);
         }
     }
 }
 //var_dump($batch_line[2]);
 if ($totalqty > 0) {
     //var_dump($_POST);exit;
     for ($i = 0; $i < $num; $i++) {
         $qty = "qtyl" . $i;
         if (!isset($batch_line[$i])) {
             // not batch mode
开发者ID:NoisyBoy86,项目名称:Dolibarr_test,代码行数:31,代码来源:card.php


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