本文整理汇总了PHP中FormOther::select_categories方法的典型用法代码示例。如果您正苦于以下问题:PHP FormOther::select_categories方法的具体用法?PHP FormOther::select_categories怎么用?PHP FormOther::select_categories使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormOther
的用法示例。
在下文中一共展示了FormOther::select_categories方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
print '<input type="hidden" name="action" value="list">';
print '<input type="hidden" name="sortfield" value="' . $sortfield . '">';
print '<input type="hidden" name="sortorder" value="' . $sortorder . '">';
print '<input type="hidden" name="type" value="' . $type . '">';
if ($sall) {
foreach ($fieldstosearchall as $key => $val) {
$fieldstosearchall[$key] = $langs->trans($val);
}
print $langs->trans("FilterOnInto", $sall) . join(', ', $fieldstosearchall);
}
// Filter on categories
$moreforfilter = '';
if (!empty($conf->categorie->enabled)) {
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('Categories') . ': ';
$moreforfilter .= $htmlother->select_categories(Categorie::TYPE_PRODUCT, $search_categ, 'search_categ', 1);
$moreforfilter .= '</div>';
}
if ($moreforfilter) {
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters);
// Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
if (empty($conf->global->PRODUIT_MULTIPRICES)) {
$titlesellprice = $langs->trans("SellingPrice");
if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
$titlesellprice = $form->textwithpicto($langs->trans("SellingPrice"), $langs->trans("DefaultPriceRealPriceMayDependOnCustomer"));
示例2:
print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
if ($sall)
{
print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall;
}
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
print "<table class=\"noborder\" width=\"100%\">";
// Filter on categories
$moreforfilter='';
if ($conf->categorie->enabled)
{
$moreforfilter.=$langs->trans('Categories'). ': ';
$moreforfilter.=$htmlother->select_categories(3,$search_categ,'search_categ');
$moreforfilter.=' ';
}
if ($moreforfilter)
{
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="8">';
print $moreforfilter;
print '</td></tr>';
}
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),"liste.php","d.nom",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Login"),"liste.php","d.login",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Type"),"liste.php","t.libelle",$param,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Person"),"liste.php","d.morphy",$param,"","",$sortfield,$sortorder);
示例3:
} else {
dol_print_error($db);
}
}
// Show array
$i = 0;
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
// Extra parameters management
foreach ($headerparams as $key => $value) {
print '<input type="hidden" name="' . $key . '" value="' . $value . '">';
}
print "<table class=\"noborder\" width=\"100%\">";
// Category filter
print '<tr class="liste_titre">';
print '<td>';
print $langs->trans("Category") . ': ' . $formother->select_categories(2, $selected_cat, 'search_categ', true);
print ' ';
print $langs->trans("SubCats") . '? ';
print '<input type="checkbox" name="subcat" value="yes"';
if ($subcat) {
print ' checked="checked"';
}
print '></td>';
print '<td colspan="4" align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">';
print '</td>';
print '</tr>';
// Array titles
print "<tr class='liste_titre'>";
print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "nom", "", $paramslink, "", $sortfield, $sortorder);
if ($modecompta == 'CREANCES-DETTES') {
示例4:
$param .= "&filter=" . $filter;
}
if ($type > 0) {
$param .= "&type=" . $type;
}
print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords);
if ($sall) {
print $langs->trans("Filter") . " (" . $langs->trans("Ref") . ", " . $langs->trans("Lastname") . ", " . $langs->trans("Firstname") . ", " . $langs->trans("EMail") . ", " . $langs->trans("Address") . " " . $langs->trans("or") . " " . $langs->trans("Town") . "): " . $sall;
}
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . ($param ? '?' . $param : '') . '">';
print "<table class=\"noborder\" width=\"100%\">";
// Filter on categories
$moreforfilter = '';
if (!empty($conf->categorie->enabled)) {
$moreforfilter .= $langs->trans('Categories') . ': ';
$moreforfilter .= $formother->select_categories(3, $search_categ, 'search_categ', 1);
$moreforfilter .= ' ';
}
if ($moreforfilter) {
print '<tr class="liste_titre">';
print '<td class="liste_titre" colspan="9">';
print $moreforfilter;
print '</td></tr>';
}
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "d.rowid", $param, "", "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Name") . " / " . $langs->trans("Company"), $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Login"), $_SERVER["PHP_SELF"], "d.login", $param, "", "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Type"), $_SERVER["PHP_SELF"], "t.libelle", $param, "", "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Person"), $_SERVER["PHP_SELF"], "d.morphy", $param, "", "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("EMail"), $_SERVER["PHP_SELF"], "d.email", $param, "", "", $sortfield, $sortorder);
示例5:
} else {
dol_print_error($db);
}
}
// Show array
$i = 0;
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
// Extra parameters management
foreach ($headerparams as $key => $value) {
print '<input type="hidden" name="' . $key . '" value="' . $value . '">';
}
print "<table class=\"noborder\" width=\"100%\">";
// Category filter
print '<tr class="liste_titre">';
print '<td>';
print $langs->trans("Category") . ': ' . $formother->select_categories(Categorie::TYPE_CUSTOMER, $selected_cat, 'search_categ', true);
print ' ';
print $langs->trans("SubCats") . '? ';
print '<input type="checkbox" name="subcat" value="yes"';
if ($subcat) {
print ' checked';
}
print '></td>';
print '<td colspan="4" align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">';
print '</td>';
print '</tr>';
// Array titles
print "<tr class='liste_titre'>";
print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "nom", "", $paramslink, "", $sortfield, $sortorder);
if ($modecompta == 'CREANCES-DETTES') {
示例6: array
$i = 0;
$param = "&search_name=" . $search_name . "&search_supplier_code=" . $search_supplier_code . "&search_zipcode=" . $search_zipcode . "&search_town=" . $search_town;
if ($search_categ != '') {
$param .= '&search_categ=' . $search_categ;
}
if ($search_status != '') {
$param .= '&search_status=' . $search_status;
}
print_barre_liste($langs->trans("ListOfSuppliers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies');
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">' . "\n";
// Filter on categories
$moreforfilter = '';
if (!empty($conf->categorie->enabled)) {
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$moreforfilter .= $langs->trans('Categories') . ': ';
$moreforfilter .= $htmlother->select_categories(Categorie::TYPE_SUPPLIER, $search_categ, 'search_categ', 1);
$moreforfilter .= ' ';
}
if ($moreforfilter) {
print '<div class="liste_titre">';
print $moreforfilter;
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters);
// Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
print '<table class="liste" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom", "", $param, 'valign="middle"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Zip"), $_SERVER["PHP_SELF"], "s.zip", "", $param, 'valign="middle"', $sortfield, $sortorder);