:::

18-2 上課範例:admin/groupperm.php

<?php
include 'header.php';
include_once XOOPS_ROOT_PATH."/modules/" . $xoopsModule->getVar("dirname") . "/class/admin.php" ;
$index_admin = new ModuleAdmin() ;
echo $index_admin->addNavigation('groupperm.php') ;

//引入XOOPS的權限表單物件檔
include_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php';

//取得本模組編號
$module_id = $xoopsModule->getVar('mid');

//權限項目陣列
$item_list = array(
	'1' => "觀看內文",
  '2' => "發布文章"
);

//頁面標題
$title_of_form = "細部權限設定";

//權限名稱
$perm_name = 'tad_note_perm';

//權限描述
$perm_desc = '請勾選欲開放給群組使用的權限:<br>';

//建立XOOPS權限表單
$formi = new XoopsGroupPermForm($title_of_form, $module_id, $perm_name, $perm_desc);

//將權限項目設進表單中
foreach ($item_list as $item_id => $item_name) {
	$formi->addItem($item_id, $item_name);
}

echo $formi->render();
include "footer.php";
?>

:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D677%26tbsn%3D22

書籍目錄

展開 | 闔起

線上使用者

54人線上 (10人在瀏覽線上書籍)

會員: 0

訪客: 54

更多…