本文整理汇总了PHP中Form::selectarray方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::selectarray方法的具体用法?PHP Form::selectarray怎么用?PHP Form::selectarray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Form
的用法示例。
在下文中一共展示了Form::selectarray方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: grapefruitGetTasksForProject
function grapefruitGetTasksForProject($name = 'fk_task', $socid = -1, $showempty = 1, $projectid = 0)
{
global $db;
dol_include_once('/core/class/html.form.class.php');
$form = new Form($db);
$TTask = getTaskByProjectId($projectid);
$return = array();
$return['value'] = $form->selectarray('fk_task', $TTask, '', 1, 0, 0, '', 0, 0, 0, '', 'minwidth100 maxwidth300', 1);
echo json_encode($return);
}
示例2: selectInputMethod
/**
* Return list of input method (mode used to receive order, like order received by email, fax, online)
* List found into table c_input_method.
*
* @param string $selected Id of preselected input method
* @param string $htmlname Name of HTML select list
* @param int $addempty 0=list with no empty value, 1=list with empty value
* @return array Tableau des sources de commandes
*/
function selectInputMethod($selected = '', $htmlname = 'source_id', $addempty = 0)
{
global $conf, $langs, $form;
if (!is_object($form)) {
$form = new Form($this->db);
}
$listofmethods = array();
$sql = "SELECT rowid, code, libelle as label";
$sql .= " FROM " . MAIN_DB_PREFIX . "c_input_method";
$sql .= " WHERE active = 1";
dol_syslog(get_class($this) . "::selectInputMethod", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$i = 0;
$num = $this->db->num_rows($resql);
while ($i < $num) {
$obj = $this->db->fetch_object($resql);
$listofmethods[$obj->rowid] = $langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : $obj->label;
$i++;
}
} else {
dol_print_error($this->db);
return -1;
}
print $form->selectarray($htmlname, $listofmethods, $selected, $addempty);
return 1;
}
示例3:
$moreforfilter .= '</div>';
}
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid) {
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('LinkedToSpecificUsers') . ': ';
$moreforfilter .= $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
$moreforfilter .= '</div>';
}
// If the user can view prospects other than his'
if ($conf->categorie->enabled && $user->rights->produit->lire) {
include_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('IncludingProductWithTag') . ': ';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
$moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1);
$moreforfilter .= '</div>';
}
if (!empty($moreforfilter)) {
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="10">';
print $moreforfilter;
print '</td></tr>';
}
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans('Ref'), $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans('RefCustomer'), $_SERVER["PHP_SELF"], 'p.ref_client', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans('Company'), $_SERVER["PHP_SELF"], 's.nom', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans('Town'), $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans('Date'), $_SERVER["PHP_SELF"], 'p.datep', '', $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans('DateEndPropalShort'), $_SERVER["PHP_SELF"], 'dfv', '', $param, 'align="center"', $sortfield, $sortorder);
示例4: CheckVAT
print "\n";
$s.='<a href="#" onclick="javascript: CheckVAT(document.formsoc.tva_intra.value);">'.$langs->trans("VATIntraCheck").'</a>';
$s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
}
else
{
$s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$object->id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
}
}
print $s;
print '</td>';
print '</tr>';
// Type - Size
print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>'."\n";
print $form->selectarray("typent_id",$formcompany->typent_array(0), $object->typent_id);
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
print '</td>';
print '<td>'.$langs->trans("Staff").'</td><td>';
print $form->selectarray("effectif_id",$formcompany->effectif_array(0), $object->effectif_id);
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
print '</td></tr>';
// Legal Form
print '<tr><td>'.$langs->trans('JuridicalStatus').'</td>';
print '<td colspan="3">';
if ($object->country_id)
{
$formcompany->select_forme_juridique($object->forme_juridique_code,$object->country_code);
}
else
示例5: array
$tmp = '<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOST('type') == 3 ? ' checked' : '') . '> ';
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#typedeposit, #valuedeposit").click(function() {
jQuery("#radio_deposit").prop("checked", true);
});
});
</script>';
$desc = $form->textwithpicto($tmp . $langs->trans("InvoiceDeposit"), $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3);
print '<table class="nobordernopadding"><tr><td>';
print $desc;
print '</td>';
if ($origin == 'propal' || $origin == 'commande') {
print '<td class="nowrap" style="padding-left: 5px">';
$arraylist = array('amount' => 'FixAmount', 'variable' => 'VarAmount');
print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1);
print '</td>';
print '<td class="nowrap" style="padding-left: 5px">' . $langs->trans('Value') . ':<input type="text" id="valuedeposit" name="valuedeposit" size="3" value="' . GETPOST('valuedeposit', 'int') . '"/>';
}
print '</td></tr></table>';
print '</div></div>';
}
if ($socid > 0) {
if (!empty($conf->global->INVOICE_USE_SITUATION)) {
// First situation invoice
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp = '<input type="radio" name="type" value="5"' . (GETPOST('type') == 5 ? ' checked' : '') . '> ';
$desc = $form->textwithpicto($tmp . $langs->trans("InvoiceFirstSituationAsk"), $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3);
print $desc;
print '</div></div>';
// Next situation invoice
示例6:
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="ventil">';
}
print load_fiche_titre("Ventilation");
print '<table class="border" width="100%">';
// Ref facture
print '<tr><td>' . $langs->trans("Invoice") . '</td>';
$facture_static->ref = $objp->facnumber;
$facture_static->id = $objp->facid;
print '<td>' . $facture_static->getNomUrl(1) . '</td>';
print '</tr>';
print '<tr><td width="20%">Ligne</td>';
print '<td>' . nl2br($objp->description) . '</td></tr>';
print '<tr><td width="20%">Ventiler dans le compte :</td><td>';
if ($objp->fk_code_ventilation == 0) {
print $form->selectarray("codeventil", $cgs, $objp->fk_code_ventilation);
} else {
print $cgs[$objp->fk_code_ventilation];
}
print '</td></tr>';
if ($objp->fk_code_ventilation == 0) {
print '<tr><td> </td><td><input type="submit" class="button" value="' . $langs->trans("Ventiler") . '"></td></tr>';
}
print '</table>';
print '</form>';
} else {
print "Error";
}
} else {
print "Error";
}
示例7: GETPOST
print '<input type="hidden" name="entity" value="' . $entity . '" />';
print '<input type="hidden" name="action" value="add" />';
print '<div id="divsubscribe">';
print '<table class="border" summary="form to subscribe" id="tablesubscribe">' . "\n";
// Type
if (empty($conf->global->MEMBER_NEWFORM_FORCETYPE)) {
$listoftype = $adht->liste_array();
$tmp = array_keys($listoftype);
$defaulttype = '';
$isempty = 1;
if (count($listoftype) == 1) {
$defaulttype = $tmp[0];
$isempty = 0;
}
print '<tr><td width="15%">' . $langs->trans("Type") . ' <FONT COLOR="red">*</FONT></td><td width="35%">';
print $form->selectarray("type", $adht->liste_array(), GETPOST('type') ? GETPOST('type') : $defaulttype, $isempty);
print '</td></tr>' . "\n";
} else {
$adht->fetch($conf->global->MEMBER_NEWFORM_FORCETYPE);
//print $adht->libelle;
print '<input type="hidden" id="type" name="type" value="' . $conf->global->MEMBER_NEWFORM_FORCETYPE . '">';
}
// Moral/Physic attribute
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Moral");
if (empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY)) {
print '<tr class="morphy"><td>' . $langs->trans('Nature') . ' <FONT COLOR="red">*</FONT></td><td>' . "\n";
print $form->selectarray("morphy", $morphys, GETPOST('morphy'), 1);
print '</td></tr>' . "\n";
} else {
print $morphys[$conf->global->MEMBER_NEWFORM_FORCEMORPHY];
示例8:
*/
// User
print '<tr><td>' . $langs->trans("User") . '</td><td>';
$include = '';
if (empty($user->rights->expensereport->readall) && empty($user->rights->expensereport->lire_tous)) {
$include = 'hierarchy';
}
print $form->select_dolusers($userid, 'userid', 1, '', 0, $include, '', 0, 0, 0, '', 0, '', 'maxwidth300');
print '</td></tr>';
// Year
print '<tr><td>' . $langs->trans("Year") . '</td><td>';
if (!in_array($year, $arrayyears)) {
$arrayyears[$year] = $year;
}
arsort($arrayyears);
print $form->selectarray('year', $arrayyears, $year, 0);
print '</td></tr>';
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="' . $langs->trans("Refresh") . '"></td></tr>';
print '</table>';
print '</form>';
print '<br><br>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre" height="24">';
print '<td align="center">' . $langs->trans("Year") . '</td>';
print '<td align="center">' . $langs->trans("Number") . '</td>';
print '<td align="center">' . $langs->trans("AmountTotal") . '</td>';
print '<td align="center">' . $langs->trans("AmountAverage") . '</td>';
print '</tr>';
$oldyear = 0;
foreach ($data as $val) {
$year = $val['year'];
示例9:
print '<td width="80%">'.$langs->trans("UseSearchToSelectCompany").'</td>';
if (! $conf->use_javascript_ajax)
{
print '<td nowrap="nowrap" align="right" colspan="2">';
print $langs->trans("NotAvailableWhenAjaxDisabled");
print "</td>";
}
else
{
print '<td width="60" align="right">';
$arrval=array('0'=>$langs->trans("No"),
'1'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch",1).')',
'2'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch",2).')',
'3'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch",3).')',
);
print $html->selectarray("activate_COMPANY_USE_SEARCH_TO_SELECT",$arrval,$conf->global->COMPANY_USE_SEARCH_TO_SELECT);
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td>";
}
print '</tr>';
print '</form>';
print '</table>';
dol_fiche_end();
$db->close();
llxFooter('$Date: 2011/07/31 22:23:23 $ - $Revision: 1.61 $');
示例10: GETPOST
print '</td></tr><tr><td>';
print $langs->trans("Width");
print ' </td><td><input name="sizeW" size="5" value="' . GETPOST('sizeW', 'int') . '"></td><td rowspan="3">';
print $formproduct->select_measuring_units("size_units", "size");
print '</td></tr><tr><td>';
print $langs->trans("Height");
print '</td><td><input name="sizeH" size="5" value="' . GETPOST('sizeH', 'int') . '"></td>';
print '</tr><tr><td>';
print $langs->trans("Depth");
print '</td><td><input name="sizeS" size="5" value="' . GETPOST('sizeS', 'int') . '"></td>';
print '</tr>';
// Delivery method
print "<tr><td>" . $langs->trans("DeliveryMethod") . "</td>";
print '<td colspan="3">';
$expe->fetch_delivery_methods();
print $form->selectarray("shipping_method_id", $expe->meths, GETPOST('shipping_method_id', 'int'), 1, 0, 0, "", 1);
if ($user->admin) {
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
}
print "</td></tr>\n";
// Tracking number
print "<tr><td>" . $langs->trans("TrackingNumber") . "</td>";
print '<td colspan="3">';
print '<input name="tracking_number" size="20" value="' . GETPOST('tracking_number', 'alpha') . '">';
print "</td></tr>\n";
// Other attributes
$parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"', 'socid' => $socid);
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $expe, $action);
// Note that $action and $object may have been modified by hook
if (empty($reshook) && !empty($extrafields->attribute_label)) {
print $expe->showOptionals($extrafields, 'edit');
示例11:
print_liste_field_titre($langs->trans("EndSubscription"),"liste.php","d.datefin",$param,"",'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Action"),"liste.php","",$param,"",'width="60" align="center"',$sortfield,$sortorder);
print "</tr>\n";
// Lignes des champs de filtre
print '<tr class="liste_titre">';
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" name="search_nom" value="'.$_REQUEST["search_nom"].'" size="12"></td>';
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" name="search_login" value="'.$_REQUEST["search_login"].'" size="7"></td>';
print '<td class="liste_titre">';
$listetype=$membertypestatic->liste_array();
print $form->selectarray("type", $listetype, $_REQUEST["type"], 1, 0, 0, '', 0, 12);
print '</td>';
print '<td class="liste_titre"> </td>';
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" name="search_email" value="'.$_REQUEST["search_email"].'" size="12"></td>';
print '<td class="liste_titre"> </td>';
print '<td align="right" colspan="2" class="liste_titre">';
print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print ' ';
print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
print '</td>';
示例12:
print "<br>";
print_titre($langs->trans('NewAttribute'));
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table summary="listofattributes" class="border" width="100%">';
print '<input type="hidden" name="action" value="add">';
// Label
print '<tr><td class="fieldrequired" required>'.$langs->trans("Label").'</td><td class="valeur"><input type="text" name="label" size="40" value="'.GETPOST('label').'"></td></tr>';
// Code
print '<tr><td class="fieldrequired" required>'.$langs->trans("AttributeCode").' ('.$langs->trans("AlphaNumOnlyCharsAndNoSpace").')</td><td class="valeur"><input type="text" name="attrname" size="10" value"'.GETPOST('attrname').'"></td></tr>';
// Type
print '<tr><td class="fieldrequired" required>'.$langs->trans("Type").'</td><td class="valeur">';
print $form->selectarray('type',$type2label,GETPOST('type'));
print '</td></tr>';
// Size
print '<tr><td class="fieldrequired" required>'.$langs->trans("Size").'</td><td><input type="text" name="size" size="5" value="'.(GETPOST('size')?GETPOST('size'):'255').'"></td></tr>';
print '<tr><td colspan="2" align="center"><input type="submit" name="button" class="button" value="'.$langs->trans("Save").'"> ';
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'"></td></tr>';
print "</form>\n";
print "</table>\n";
}
/* ************************************************************************** */
/* */
/* Edition d'un champ optionnel */
/* */
/* ************************************************************************** */
示例13: vatrate
$default_vat = $object->tva_tx;
}
}
print '<input type="text" class="flat" size="5" name="tva_tx" value="' . (GETPOST("tva_tx") ? vatrate(GETPOST("tva_tx")) : ($default_vat != '' ? vatrate($default_vat) : '')) . '">';
print '</td></tr>';
if (!empty($conf->dynamicprices->enabled)) {
// Price mode selector
print '<tr><td class="fieldrequired">' . $langs->trans("PriceMode") . '</td><td>';
$price_expression = new PriceExpression($db);
$price_expression_list = array(0 => $langs->trans("PriceNumeric"));
//Put the numeric mode as first option
foreach ($price_expression->list_price_expression() as $entry) {
$price_expression_list[$entry->id] = $entry->title;
}
$price_expression_preselection = GETPOST('eid') ? GETPOST('eid') : ($object->fk_supplier_price_expression ? $object->fk_supplier_price_expression : '0');
print $form->selectarray('eid', $price_expression_list, $price_expression_preselection);
print ' <div id="expression_editor" class="button">' . $langs->trans("PriceExpressionEditor") . '</div>';
print '</td></tr>';
// This code hides the numeric price input if is not selected, loads the editor page if editor button is pressed
print '<script type="text/javascript">
jQuery(document).ready(run);
function run() {
jQuery("#expression_editor").click(on_click);
jQuery("#eid").change(on_change);
on_change();
}
function on_click() {
window.location = "' . DOL_URL_ROOT . '/product/dynamic_price/editor.php?id=' . $id . '&tab=fournisseurs&eid=" + $("#eid").attr("value");
}
function on_change() {
if ($("#eid").attr("value") == 0) {
示例14: _liste
//.........这里部分代码省略.........
print "<td colspan=\"4\"><strong>";
print $prod->description;
print '</strong></td>';
} else {
if (empty($prod->rowid)) {
// ligne libre
print "<tr>";
print "<td> </td>";
print "<td colspan=\"4\">";
print $prod->description;
print '</td>';
} else {
print "<tr " . $bc[$var] . ">";
print "<td>" . ($i + 1) . "</td>";
print "<td>";
$p_static = new Product($db);
$p_static->ref = $prod->refProd;
$p_static->id = $prod->rowid;
print $p_static->getNomUrl(1);
print "</td>\n";
print '<td>';
print $prod->nomProd;
print '</td>';
print "<td>";
print $form->texte('', 'TQuantites[' . $prod->fk_commandedet . ']', $prod->qteCommandee, 3, 255);
print "</td>";
print "<td>" . $form->checkbox1('', 'TProducts[' . $prod->fk_commandedet . '][' . (int) $prod->rowid . ']', false, true, '', 'checkOF');
print "</td>";
print "</tr>\n";
$i++;
}
}
}
print '<tr class="liste_titre">';
echo '<th class="liste_titre" colspan="2"> </th><th class="liste_titre"> </th><th class="liste_titre"> </th>
<th class="liste_titre"><input type="checkbox" id="checkall" checked="checked" value="1"></th>
';
print '</tr>';
print "</table>";
?>
<script type="text/javascript">
$('input#checkall').change(function() {
$('input.checkOF').prop('checked',$(this).is(':checked'));
});
</script>
<?php
echo '<p align="right">' . $form->btsubmit('Créer OFs', 'subForm') . ' ' . $form->btsubmit('Créer un seul OF', 'subFormAlone') . '</p>';
$form->end();
echo '</div>';
$db->free($resql);
} else {
if (!empty($fk_product)) {
$sql = "SELECT ofe.rowid, ofe.numero, ofe.fk_soc, s.nom as client, SUM(IF(ofel.qty>0,ofel.qty,ofel.qty_needed) ) as nb_product_needed, ofel.fk_product, p.label as product, ofe.ordre, ofe.date_lancement , ofe.date_besoin\n , ofe.status, ofe.fk_user, ofe.total_cost\n FROM " . MAIN_DB_PREFIX . "assetOf as ofe \n LEFT JOIN " . MAIN_DB_PREFIX . "assetOf_line ofel ON (ofel.fk_assetOf=ofe.rowid AND ofel.type = 'NEEDED')\n LEFT JOIN " . MAIN_DB_PREFIX . "product p ON p.rowid = ofel.fk_product\n LEFT JOIN " . MAIN_DB_PREFIX . "societe s ON s.rowid = ofe.fk_soc\n WHERE ofe.entity=" . $conf->entity . " AND ofel.fk_product=" . $fk_product . " AND ofe.status!='CLOSE'";
$sql .= " GROUP BY ofe.rowid ";
if ($conf->global->ASSET_OF_LIST_BY_ROWID_DESC) {
$orderBy['ofe.rowid'] = 'DESC';
} else {
$orderBy['ofe.date_cre'] = 'DESC';
}
$TMath = array();
$THide = array('rowid', 'fk_user', 'fk_product', 'fk_soc');
if (empty($user->rights->asset->of->price)) {
$THide[] = 'total_cost';
} else {
$TMath['total_cost'] = 'sum';
}
$TMath['nb_product_needed'] = 'sum';
$l = new TListviewTBS('listeofproductneeded');
echo $langs->trans('ofListProductNeeded');
echo $l->render($PDOdb, $sql, array('limit' => array('nbLine' => $conf->liste_limit), 'orderBy' => $orderBy, 'subQuery' => array(), 'link' => array('Utilisateur en charge' => '<a href="' . dol_buildpath('/user/card.php?id=@fk_user@', 2) . '">' . img_picto('', 'object_user.png', '', 0) . ' @val@</a>', 'numero' => '<a href="' . dol_buildpath('/of/fiche_of.php?id=@rowid@', 2) . '">' . img_picto('', 'object_list.png', '', 0) . ' @val@</a>', 'product' => '<a href="' . dol_buildpath('/product/card.php?id=@fk_product@', 2) . '">' . img_picto('', 'object_product.png', '', 0) . ' @val@</a>', 'client' => '<a href="' . dol_buildpath('/societe/soc.php?id=@fk_soc@', 2) . '">' . img_picto('', 'object_company.png', '', 0) . ' @val@</a>'), 'translate' => array(), 'hide' => $THide, 'type' => array('date_lancement' => 'date', 'date_besoin' => 'date', 'total_cost' => 'money', 'nb_product_needed' => 'number'), 'math' => $TMath, 'liste' => array('titre' => $langs->trans('ListOFAsset'), 'image' => img_picto('', 'title.png', '', 0), 'picto_precedent' => img_picto('', 'back.png', '', 0), 'picto_suivant' => img_picto('', 'next.png', '', 0), 'noheader' => (int) isset($_REQUEST['fk_soc']) | (int) isset($_REQUEST['fk_product']), 'messa geNothing' => "Il n'y a aucun " . $langs->trans('OFAsset') . " à afficher", 'picto_search' => img_picto('', 'search.png', '', 0)), 'title' => array('numero' => 'Numéro', 'ordre' => 'Priorité', 'date_lancement' => 'Date du lancement', 'date_besoin' => 'Date du besoin', 'status' => 'Status', 'login' => 'Utilisateur en charge', 'product' => 'Produit', 'client' => 'Client', 'nb_product_needed' => 'Nb produits nécessaire', 'total_cost' => 'Coût'), 'eval' => array('ordre' => 'TAssetOF::ordre(@val@)', 'status' => 'TAssetOF::status(@val@)', 'product' => 'get_format_libelle_produit(@fk_product@)', 'client' => 'get_format_libelle_societe(@fk_soc@)')));
}
echo '<div class="tabsAction">';
echo '<a id="bt_createOf" class="butAction" href="fiche_of.php?action=new' . (!empty($fk_product) ? '&fk_product=' . $fk_product : '') . '">' . $langs->trans('CreateOFAsset') . '</a>';
if ($conf->nomenclature->enabled && !empty($fk_product)) {
dol_include_once('/core/class/html.form.class.php');
dol_include_once('/asset/lib/asset.lib.php');
dol_include_once('/nomenclature/class/nomenclature.class.php');
$doliForm = new Form($db);
echo $doliForm->selectarray('fk_nomenclature', TNomenclature::get($PDOdb, $fk_product, true));
echo '<script type="text/javascript">
var url_create_of = $("#bt_createOf").attr("href");
$("#bt_createOf").attr("href","#");
$("#bt_createOf").click(function() {
var fk_nomenclature = $("select[name=fk_nomenclature]").val();
var href = url_create_of + "&fk_nomenclature=" + fk_nomenclature;
$(this).attr("href", href);
});
</script>';
}
echo '</div>';
}
$PDOdb->close();
llxFooter('');
}
示例15: sizeof
print '</td></tr><tr><td>';
print $langs->trans("Width");
print ' </td><td><input name="sizeW" size="4" value="' . $_POST["sizeW"] . '"></td><td rowspan="3">';
print $formproduct->select_measuring_units("size_units", "size");
print '</td></tr><tr><td>';
print $langs->trans("Height");
print '</td><td><input name="sizeH" size="4" value="' . $_POST["sizeH"] . '"></td>';
print '</tr><tr><td>';
print $langs->trans("Depth");
print '</td><td><input name="sizeS" size="4" value="' . $_POST["sizeS"] . '"></td>';
print '</tr>';
// Delivery method
print "<tr><td>" . $langs->trans("DeliveryMethod") . "</td>";
print '<td colspan="3">';
$expe->fetch_delivery_methods();
print $html->selectarray("expedition_method_id", $expe->meths, $_POST["expedition_method_id"], 1, 0, 0, "", 1);
print "</td></tr>\n";
// Tracking number
print "<tr><td>" . $langs->trans("TrackingNumber") . "</td>";
print '<td colspan="3">';
print '<input name="tracking_number" size="20" value="' . $_POST["tracking_number"] . '">';
print "</td></tr>\n";
print "</table>";
/*
* Lignes de commandes
*
*/
print '<br><table class="nobordernopadding" width="100%">';
//$lines = $object->fetch_lines(1);
$numAsked = sizeof($object->lines);
/* Lecture des expeditions deja effectuees */