本文整理汇总了PHP中Groups::getGroupsForSelect方法的典型用法代码示例。如果您正苦于以下问题:PHP Groups::getGroupsForSelect方法的具体用法?PHP Groups::getGroupsForSelect怎么用?PHP Groups::getGroupsForSelect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Groups
的用法示例。
在下文中一共展示了Groups::getGroupsForSelect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$results = $releases->search($searchSearchName, $searchUsenetName, $searchPoster, $searchGroups, [$searchCat], $searchSizeFrom, $searchSizeTo, $searchHasNFO, $searchHascomments, $searchdaysnew, $searchdaysold, $offset, ITEMS_PER_PAGE, $orderby, -1, $page->userdata["categoryexclusions"], "advanced");
}
$page->smarty->assign('lastvisit', $page->userdata['lastlogin']);
if (sizeof($results) > 0) {
$totalRows = $results[0]['_totalrows'];
} else {
$totalRows = 0;
}
$page->smarty->assign('pagertotalitems', $totalRows);
$page->smarty->assign('pageroffset', $offset);
$page->smarty->assign('pageritemsperpage', ITEMS_PER_PAGE);
$page->smarty->assign('pagerquerysuffix', "#results");
$pager = $page->smarty->fetch("pager.tpl");
$page->smarty->assign('pager', $pager);
}
$grouplist = $grp->getGroupsForSelect();
$page->smarty->assign('grouplist', $grouplist);
$catlist = $c->getForSelect();
$page->smarty->assign('catlist', $catlist);
$sizelist = array(-1 => '--Select--', 1 => '100MB', 2 => '250MB', 3 => '500MB', 4 => '1GB', 5 => '2GB', 6 => '3GB', 7 => '4GB', 8 => '8GB', 9 => '16GB', 10 => '32GB', 11 => '64GB');
$page->smarty->assign('sizelist', $sizelist);
$page->smarty->assign('results', $results);
$page->smarty->assign('sadvanced', $searchtype != "basic");
$ft1 = $page->settings->checkIndex('releases', 'ix_releases_name_searchname_ft');
$ft2 = $page->settings->checkIndex('releases', 'ix_releases_name_ft');
$ft3 = $page->settings->checkIndex('releases', 'ix_releases_searchname_ft');
switch (nZEDb_RELEASE_SEARCH_TYPE) {
case ReleaseSearch::FULLTEXT:
$search_description = 'MySQL Full Text Search Rules:<br />
A leading exclamation point(! in place of +) indicates that this word must be present in each row that is returned.<br />
A leading minus sign indicates that this word must not be present in any of the rows that are returned.<br />
示例2: default
case ReleaseSearch::FULLTEXT:
$search_description = 'MySQL Full Text Search Rules:<br />
A leading exclamation point(! in place of +) indicates that this word must be present in each row that is returned.<br />
A leading minus sign indicates that this word must not be present in any of the rows that are returned.<br />
By default (when neither + nor - is specified) the word is optional, but the rows that contain it are rated higher.<br />
See <a target="_blank" href=\'http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html\'>docs</a> for more operators.';
break;
case ReleaseSearch::LIKE:
$search_description = 'Include ^ to indicate search must start with term, -- to exclude words.';
break;
case ReleaseSearch::SPHINX:
default:
$search_description = 'Sphinx Search Rules:<br />
The search is case insensitive.<br />
All words must be separated by spaces.
Do not seperate words using . or _ or -, sphinx will match a space against those automatically.<br />
Putting | between words makes any of those words optional.<br />
Putting << between words makes the word on the left have to be before the word on the right.<br />
Putting - or ! in front of a word makes that word excluded. Do not add a space between the - or ! and the word.<br />
Quoting all the words using " will look for an exact match.<br />
Putting ^ at the start will limit searches to releases that start with that word.<br />
Putting $ at the end will limit searches to releases that end with that word.<br />
Putting a * after a word will do a partial word search. ie: fish* will match fishing.<br />
If your search is only words seperated by spaces, all those words will be mandatory, the order of the words is not important.<br />
You can enclose words using paranthesis. ie: (^game*|^dex*)s03*(x264<<nogrp$)<br />
You can combine some of these rules, but not all.<br />';
break;
}
$page->smarty->assign(['sizelist' => [-1 => '--Select--', 1 => '100MB', 2 => '250MB', 3 => '500MB', 4 => '1GB', 5 => '2GB', 6 => '3GB', 7 => '4GB', 8 => '8GB', 9 => '16GB', 10 => '32GB', 11 => '64GB'], 'results' => $results, 'sadvanced' => $searchType != "basic", 'grouplist' => $groups->getGroupsForSelect(), 'catlist' => (new Category(['Settings' => $page->settings]))->getForSelect(), 'search_description' => $search_description, 'pager' => $page->smarty->fetch("pager.tpl")]);
$page->content = $page->smarty->fetch('search.tpl');
$page->render();