本文整理汇总了PHP中RMFunctions::get_groups_names方法的典型用法代码示例。如果您正苦于以下问题:PHP RMFunctions::get_groups_names方法的具体用法?PHP RMFunctions::get_groups_names怎么用?PHP RMFunctions::get_groups_names使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RMFunctions
的用法示例。
在下文中一共展示了RMFunctions::get_groups_names方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_categories
function show_categories()
{
global $xoopsModule, $xoopsModuleConfig, $xoopsConfig, $xoopsSecurity;
$db = Database::getInstance();
$sql = "SELECT COUNT(*) FROM " . $db->prefix("rmc_img_cats");
/**
* Paginacion de Resultados
*/
$page = rmc_server_var($_GET, 'page', 1);
$limit = $xoopsModuleConfig['catsnumber'];
list($num) = $db->fetchRow($db->query($sql));
$tpages = ceil($num / $limit);
$page = $page > $tpages ? $tpages : $page;
$start = $num <= 0 ? 0 : ($page - 1) * $limit;
$nav = new RMPageNav($num, $limit, $page, 5);
$nav->target_url('images.php?action=showcats&page={PAGE_NUM}');
// Get categories
$sql = "SELECT * FROM " . $db->prefix("rmc_img_cats") . " ORDER BY id_cat DESC LIMIT {$start},{$limit}";
$result = $db->query($sql);
$categories = array();
while ($row = $db->fetchArray($result)) {
$cat = new RMImageCategory();
$cat->assignVars($row);
$groups = $cat->getVar('groups');
$categories[] = array('id' => $cat->id(), 'name' => $cat->getVar('name'), 'status' => $cat->getVar('status'), 'gwrite' => RMFunctions::get_groups_names($groups['write']), 'gread' => RMFunctions::get_groups_names($groups['read']), 'sizes' => $cat->getVar('sizes'), 'images' => RMFunctions::get_num_records('rmc_images', 'cat=' . $cat->id()));
}
RMTemplate::get()->add_style('general.css', 'rmcommon');
RMTemplate::get()->add_style('imgmgr.css', 'rmcommon');
RMTemplate::get()->add_script('include/js/jquery.checkboxes.js');
RMFunctions::create_toolbar();
xoops_cp_header();
include RMTemplate::get()->get_template('images_categories.php', 'module', 'rmcommon');
xoops_cp_footer();
}