線上書籍

Home

[1042] XOOPS模組開發進階

<?php /** * Phone Book module * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code * which is considered copyrighted (c) material of the original comment or credit authors. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license http://www.fsf.org/copyleft/gpl.html GNU public license * @package Phone Book * @since 2.5 * @author tad * @version $Id $ **/ include_once "../../mainfile.php"; include_once "function.php"; //判斷是否對該模組有管理權限 $isAdmin = false; if ($xoopsUser) { $module_id = $xoopsModule->getVar('mid'); $isAdmin = $xoopsUser->isAdmin($module_id); } //$interface_menu[_TAD_TO_MOD]="index.php"; $interface_menu[_MD_PHONEBOOK_SMNAME1]="index.php"; $interface_icon[_MD_PHONEBOOK_SMNAME1]="fa-chevron-right"; $interface_menu['生日一覽']="birthday.php"; $interface_icon['生日一覽']="fa-chevron-right"; $interface_menu['統計圖表']="chart.php"; $interface_icon['統計圖表']="fa-chevron-right"; include_once $GLOBALS['xoops']->path('/modules/system/include/functions.php'); $cate_sn = system_CleanVars($_REQUEST, 'cate_sn', '', 'int'); $sn = system_CleanVars($_REQUEST, 'sn', '', 'int'); $county = system_CleanVars($_REQUEST, 'county', '', 'string'); $city = system_CleanVars($_REQUEST, 'city', '', 'string'); $keyword = system_CleanVars($_REQUEST, 'keyword', '', 'string'); $interface_menu['HTML下載']="html.php?cate_sn=$cate_sn&county=$county&city=$city&keyword=$keyword"; $interface_icon['HTML下載']="fa-chevron-right"; $interface_menu['CSV下載']="csv.php"; $interface_icon['CSV下載']="fa-chevron-right"; $interface_menu['JSON介接']="json.php"; $interface_icon['JSON介接']="fa-chevron-right"; $interface_menu['匯入餐廳']="get_json.php"; $interface_icon['匯入餐廳']="fa-chevron-right"; $interface_menu['下載Excel']="excel_one.php"; $interface_icon['下載Excel']="fa-chevron-right"; $interface_menu['下載PDF']="pdf.php?sn={$sn}"; $interface_icon['下載PDF']="fa-chevron-right"; if ($isAdmin) { $interface_menu[_TAD_TO_ADMIN] = "admin/main.php"; $interface_icon[_TAD_TO_ADMIN] = "fa-sign-in"; }