本文整理汇总了PHP中Categorie::rechercher方法的典型用法代码示例。如果您正苦于以下问题:PHP Categorie::rechercher方法的具体用法?PHP Categorie::rechercher怎么用?PHP Categorie::rechercher使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Categorie
的用法示例。
在下文中一共展示了Categorie::rechercher方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
print $html->select_all_categories('','subcatof');
print '</td>';
print '<td><input type="submit" class="button" value="'.$langs->trans ("Search").'"></td></tr>';
*/
print '</table></form>';
print '</td><td valign="top" width="70%">';
/*
* Categories found
*/
if($_POST['catname'] || $_REQUEST['id'])
{
$cats = $categstatic->rechercher($_REQUEST['id'],$_POST['catname'],$_POST['type']);
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("FoundCats").'</td></tr>';
$var=true;
foreach ($cats as $cat)
{
$var = ! $var;
print "\t<tr ".$bc[$var].">\n";
print "\t\t<td>";
$categstatic->id=$cat->id;
$categstatic->ref=$cat->label;
$categstatic->label=$cat->label;
$categstatic->type=$cat->type;
print $categstatic->getNomUrl(1,'');
示例2: foreach
// faire une rech dans une sous categorie uniquement
print '<tr '.$bc[0].'><td>';
print $langs->trans("SubCatOf").':</td><td>';
print $form->select_all_categories('','subcatof');
print '</td>';
print '<td><input type="submit" class="button" value="'.$langs->trans ("Search").'"></td></tr>';
*/
print '</table></form>';
//print '</td><td valign="top" width="70%">';
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
/*
* Categories found
*/
if ($catname || $id > 0) {
$cats = $categstatic->rechercher($id, $catname, $type);
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">' . $langs->trans("FoundCats") . '</td></tr>';
$var = true;
foreach ($cats as $cat) {
$var = !$var;
print "\t<tr " . $bc[$var] . ">\n";
print "\t\t<td>";
$categstatic->id = $cat->id;
$categstatic->ref = $cat->label;
$categstatic->label = $cat->label;
$categstatic->type = $cat->type;
print $categstatic->getNomUrl(1, '');
print "</td>\n";
print "\t\t<td>" . $cat->description . "</td>\n";
print "\t</tr>\n";
示例3: foreach
/*
// faire une rech dans une sous categorie uniquement
print '<tr '.$bc[0].'><td>';
print $langs->trans("SubCatOf").':</td><td>';
print $form->select_all_categories('','subcatof');
print '</td>';
print '<td><input type="submit" class="button" value="'.$langs->trans ("Search").'"></td></tr>';
*/
print '</table></form>';
print '</td><td valign="top" width="70%">';
/*
* Categories found
*/
if ($_POST['catname'] || $id > 0) {
$cats = $categstatic->rechercher($id, $_POST['catname'], $type);
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">' . $langs->trans("FoundCats") . '</td></tr>';
$var = true;
foreach ($cats as $cat) {
$var = !$var;
print "\t<tr " . $bc[$var] . ">\n";
print "\t\t<td>";
$categstatic->id = $cat->id;
$categstatic->ref = $cat->label;
$categstatic->label = $cat->label;
$categstatic->type = $cat->type;
print $categstatic->getNomUrl(1, '');
print "</td>\n";
print "\t\t<td>" . $cat->description . "</td>\n";
print "\t</tr>\n";