<?php
use XoopsModules\Tadtools\Utility;
//判斷是否對該模組有管理權限 $_SESSION['tad_signup_adm']
$is_admin = basename(__DIR__) . '_adm';
if (!isset($_SESSION[$is_admin])) {
$_SESSION[$is_admin] = ($xoopsUser) ? $xoopsUser->isAdmin() : false;
}
// 判斷有無開設活動的權限
if (!isset($_SESSION['can_add'])) {
$_SESSION['can_add'] = Utility::power_chk('tad_signup', '1');
}
//回模組首頁
$interface_menu[_TAD_TO_MOD] = "index.php";
$interface_icon[_TAD_TO_MOD] = "fa-chevron-right";
$interface_menu[_MD_TAD_SIGNUP_MY_RECORD] = "my_signup.php";
$interface_icon[_MD_TAD_SIGNUP_MY_RECORD] = "fa-chevron-right";
//模組後台
if ($_SESSION[$is_admin]) {
$interface_menu[_TAD_TO_ADMIN] = "admin/main.php";
$interface_icon[_TAD_TO_ADMIN] = "fa-chevron-right";
}
link to https://github.com/tadlearn/tad_signup/commit/e0b28577851751f3db70a9a886fe1cdf2d4e5421 \