線上書籍

Home

1041 XOOPS模組開發

<?php //引入TadTools的函式庫 if(!file_exists(XOOPS_ROOT_PATH."/modules/tadtools/tad_function.php")){ redirect_header("http://www.tad0616.net/modules/tad_uploader/index.php?of_cat_sn=50",3, _TAD_NEED_TADTOOLS); } include_once XOOPS_ROOT_PATH."/modules/tadtools/tad_function.php"; //是否為審核人員 function is_verify(){ global $xoopsUser , $xoopsModule; $perm_name = 'tad_ebook'; $perm_itemid = intval(1); $groups =($xoopsUser)? $xoopsUser->getGroups():XOOPS_GROUP_ANONYMOUS; $module_id = $xoopsModule->getVar('mid'); $gperm_handler =& xoops_gethandler('groupperm'); if($gperm_handler->checkRight($perm_name, $perm_itemid, $groups, $module_id)){ return true; }else{ return false; } } ?>