線上書籍

Home

[1071]XOOPS模組開發

<?php /*-----------引入檔案區--------------*/ $xoopsOption['template_main'] = "snews_adm_topic.tpl"; include_once "header.php"; include_once "../function.php"; /*-----------function區--------------*/ //顯示預設頁面內容 function show_content() { global $xoopsTpl; $main = "主題頁面"; $xoopsTpl->assign('content', $main); } /*-----------執行動作判斷區----------*/ include_once $GLOBALS['xoops']->path('/modules/system/include/functions.php'); $op = system_CleanVars($_REQUEST, 'op', '', 'string'); // $sn = system_CleanVars($_REQUEST, 'sn', 0, 'int'); switch ($op) { // case "xxx": // xxx(); // header("location:{$_SERVER['PHP_SELF']}"); // exit; default: show_content(); break; } include_once 'footer.php';