if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
$pagetitle = "- $module_name";
include("header.php");
title("");
OpenTable();
echo "
模組名稱 | 模組說明 | 存取權限 |
";
$result = sql_query("SELECT title, custom_title, view, description FROM ".$prefix."_modules WHERE active='1' AND title!='$module_name' ORDER BY title ASC", $dbi);
while(list($m_title, $custom_title, $view, $description) = sql_fetch_row($result, $dbi)) {
$m_title2 = ereg_replace("_", " ", $m_title);
if ($custom_title != "") {
$m_title2 = $custom_title;
}
switch($view) {
case "0":
$disc = "完全開放"; break;
case "1":
$disc = "僅限會員"; break;
case "2":
$disc = "僅限管理員"; break;
}
echo " $m_title2 | $description | $disc |
";
}
echo "
";
CloseTable();
include("footer.php");
?>