本文整理汇总了PHP中loadModuleAdminMenu函数的典型用法代码示例。如果您正苦于以下问题:PHP loadModuleAdminMenu函数的具体用法?PHP loadModuleAdminMenu怎么用?PHP loadModuleAdminMenu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了loadModuleAdminMenu函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$fm_options[-1 * $c] = "[" . $categories[$c] . "]";
foreach (array_keys($forums[$c]) as $f) {
$fm_options[$f] = $forums[$c][$f]["prefix"] . $forums[$c][$f]["forum_name"];
}
}
unset($forums, $categories);
$fmform = new XoopsThemeForm(_AM_NEWBB_TYPE_FORUM, 'fmform', xoops_getenv("PHP_SELF"), "post");
$fm_select = new XoopsFormSelect(_AM_NEWBB_PERM_FORUMS, 'forum', null, 5, false);
$fm_select->addOptionArray($fm_options);
$fmform->addElement($fm_select);
$tray = new XoopsFormElementTray('');
$tray->addElement(new XoopsFormHidden('op', 'edit_forum'));
$tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
$tray->addElement(new XoopsFormButton('', 'reset', _CANCEL, 'reset'));
$fmform->addElement($tray);
loadModuleAdminMenu(11, _AM_NEWBB_TYPE_FORUM);
echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_ACTION . "</legend>";
echo "<br />";
echo "<a style='border: 1px solid #5E5D63; color: #000000; font-family: verdana, tahoma, arial, helvetica, sans-serif; font-size: 1em; padding: 4px 8px; text-align:center;' href='" . xoops_getenv("PHP_SELF") . "?op=add'>";
echo _AM_NEWBB_TYPE_ADD . "</a> | ";
echo "<a style='border: 1px solid #5E5D63; color: #000000; font-family: verdana, tahoma, arial, helvetica, sans-serif; font-size: 1em; padding: 4px 8px; text-align:center;' href='" . xoops_getenv("PHP_SELF") . "?op=template'>";
echo _AM_NEWBB_TYPE_TEMPLATE . "</a> | ";
echo "<a style='border: 1px solid #5E5D63; color: #000000; font-family: verdana, tahoma, arial, helvetica, sans-serif; font-size: 1em; padding: 4px 8px; text-align:center;' href='" . xoops_getenv("PHP_SELF") . "?op=forum'>";
echo _AM_NEWBB_TYPE_FORUM . "</a> | ";
echo "</fieldset>";
echo "<br />";
echo "<br />";
echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_TYPE_FORUM . "</legend>";
echo "<br />";
$fmform->display();
echo "</fieldset>";
示例2: xoops_cp_header
<?php
include 'header.php';
xoops_cp_header();
loadModuleAdminMenu(4, "");
$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : 'list';
$post_time = isset($_REQUEST["begin"]) ? $_REQUEST["begin"] : '';
$sort = isset($_REQUEST['sort']) ? trim($_REQUEST['sort']) : 'desc';
$start = isset($_REQUEST['start']) ? trim($_REQUEST['start']) : 0;
$limit = 10;
if (!empty($post_time)) {
$begin = isset($_REQUEST["begin"]["date"]) ? strtotime($_REQUEST["begin"]["date"]) : 0;
$begin = $begin + $_REQUEST["begin"]["time"];
$finish = isset($_REQUEST["finish"]["date"]) ? strtotime($_REQUEST["finish"]["date"]) : 0;
$finish = $finish + $_REQUEST["finish"]["time"];
} else {
$begin = time();
$finish = time();
}
$subscribe_handler = xoops_getmodulehandler('subscribe', 'newsletter');
$subscribelog_handler = xoops_getmodulehandler('subscribelog', 'newsletter');
switch ($op) {
default:
case 'list':
if ($sort == 'desc') {
$time = time();
} else {
$time = 0;
$criteria = new CriteriaCompo();
$criteria->setSort('subscribe_timestamp');
$criteria->setOrder('asc');
示例3: xoops_cp_header
* 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 BEIJING XOOPS Co.Ltd. http://www.xoops.com.cn
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package spotlight
* @since 1.0.0
* @author Mengjue Shao <magic.shao@gmail.com>
* @author Susheng Yang <ezskyyoung@gmail.com>
* @version $Id: admin.page.php 1 2010-8-31 ezsky$
*/
include 'header.php';
xoops_cp_header();
loadModuleAdminMenu(2);
$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['page_id']) ? 'edit' : 'display');
$page_id = isset($_REQUEST['page_id']) ? intval($_REQUEST['page_id']) : '';
$sp_id = isset($_REQUEST['sp_id']) ? intval($_REQUEST['sp_id']) : '';
$sp_handler =& xoops_getmodulehandler('spotlight', 'spotlight');
$page_handler =& xoops_getmodulehandler('page', 'spotlight');
$spotlights = $sp_handler->getList();
if (empty($spotlights)) {
redirect_header('admin.spotlight.php', 3, _AM_SPOTLIGHT_PLEASE_ADD_SLIDE);
}
$sp_name = !empty($sp_id) ? $spotlights[$sp_id] : current($spotlights);
$sp_id = !empty($sp_id) ? $sp_id : current($sp_handler->getIds());
switch ($op) {
default:
case 'display':
$page_order = isset($_REQUEST['page_order']) ? $_REQUEST['page_order'] : '';
示例4: xoops_cp_header
<?php
include "../../../include/cp_header.php";
xoops_cp_header();
include_once XOOPS_ROOT_PATH . "/Frameworks/art/functions.admin.php";
loadModuleAdminMenu(5, "About");
echo '<link rel="stylesheet" type="text/css" media="screen" href="../css/admin.css" />';
echo '<div id="m_body">';
echo "About";
echo '</div>';
xoops_cp_footer();
示例5: loadModuleAdminMenu
loadModuleAdminMenu(2, _AM_NEWBB_CREATENEWFORUM);
echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_CREATENEWFORUM . "</legend>";
echo "<br />";
$parent_forum = @intval($_GET['forum']);
$cat_id = @intval($_GET['cat_id']);
if (!$parent_forum && !$cat_id) {
break;
}
$forum_obj =& $forum_handler->create();
$forum_obj->setVar("parent_forum", $parent_forum);
$forum_obj->setVar("cat_id", $cat_id);
include XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/include/form.forum.php";
echo "</fieldset>";
break;
default:
loadModuleAdminMenu(2, _AM_NEWBB_FORUM_MANAGER);
$echo = "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_FORUM_MANAGER . "</legend>";
$echo .= "<br />";
$echo .= "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
$echo .= "<tr align='center'>";
$echo .= "<td class='bg3' colspan='2'>" . _AM_NEWBB_NAME . "</td>";
$echo .= "<td class='bg3'>" . _AM_NEWBB_EDIT . "</td>";
$echo .= "<td class='bg3'>" . _AM_NEWBB_DELETE . "</td>";
$echo .= "<td class='bg3'>" . _AM_NEWBB_ADD . "</td>";
$echo .= "<td class='bg3'>" . _AM_NEWBB_MOVE . "</td>";
$echo .= "<td class='bg3'>" . _AM_NEWBB_MERGE . "</td>";
$echo .= "</tr>";
$category_handler =& xoops_getmodulehandler('category', 'newbb');
$criteria_category = new CriteriaCompo(new criteria('1', 1));
$criteria_category->setSort('cat_order');
$categories = $category_handler->getList($criteria_category);
示例6: redirect_header
}
for ($i = 0; $i < count($orders); $i++) {
$sql = "update " . $xoopsDB->prefix("bb_forums") . " set forum_order = " . $orders[$i] . " WHERE forum_id=" . $forum[$i];
if (!($result = $xoopsDB->query($sql))) {
redirect_header("admin_forum_reorder.php", 1, _AM_NEWBB_FORUM_ERROR);
}
}
redirect_header("admin_forum_reorder.php", 1, _AM_NEWBB_BOARDREORDER);
} else {
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
$orders = array();
$cat_orders = array();
$forum = array();
$cat = array();
xoops_cp_header();
loadModuleAdminMenu(6, _AM_NEWBB_SETFORUMORDER);
echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_SETFORUMORDER . "</legend>";
echo "<br /><br /><table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
$tform = new XoopsThemeForm(_AM_NEWBB_SETFORUMORDER, "", "");
$tform->display();
echo "<form name='reorder' method='post'>";
echo "<table border='0' width='100%' cellpadding='2' cellspacing='1' class='outer'>";
echo "<tr>";
echo "<td class='head' align='left' width='60%'><strong>" . _AM_NEWBB_REORDERTITLE . "</strong></td>";
echo "<td class='head' align='center'><strong>" . _AM_NEWBB_REORDERWEIGHT . "</strong></td>";
echo "</tr>";
$forum_handler =& xoops_getmodulehandler('forum', 'newbb');
$category_handler =& xoops_getmodulehandler('category', 'newbb');
$criteria_category = new CriteriaCompo(new criteria('1', 1));
$criteria_category->setSort('cat_order');
$categories = $category_handler->getAll($criteria_category, array("cat_id", "cat_order", "cat_title"));
示例7: loadModuleAdminMenu
case "process":
default:
include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/class/xoopsformloader.php";
if ($item == 'process') {
$process_result = 0;
$item_other = 'processed';
$title_other = _AM_XFORUM_PROCESSEDREPORT;
$extra = _AM_XFORUM_REPORTEXTRA;
} else {
$process_result = 1;
$item_other = 'process';
$title_other = _AM_XFORUM_PROCESSREPORT;
$extra = _DELETE;
}
$limit = 10;
loadModuleAdminMenu(8, _AM_XFORUM_REPORTADMIN);
echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XFORUM_REPORTADMIN . "</legend>";
echo "<br />";
echo "<a style='border: 1px solid #5E5D63; color: #000000; font-family: verdana, tahoma, arial, helvetica, sans-serif; font-size: 1em; padding: 4px 8px; text-align:center;' href=\"admin_report.php?item={$item_other}\">" . $title_other . "</a><br /><br />";
echo '<form action="' . xoops_getenv('PHP_SELF') . '" method="post">';
echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
echo "<tr align='center'>";
echo "<td class='bg3' width='80%'>" . _AM_XFORUM_REPORTTITLE . "</td>";
echo "<td class='bg3' width='10%'>" . $extra . "</td>";
echo "</tr>";
$reports = $report_handler->getAllReports(0, "ASC", $limit, $start, $process_result);
foreach ($reports as $report) {
$post_link = "<a href=\"" . XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/viewtopic.php?post_id=" . $report['post_id'] . "&topic_id=" . $report['topic_id'] . "&forum=" . $report['forum_id'] . "&viewmode=thread\" target=\"checkreport\">" . $myts->htmlSpecialChars($report['subject']) . "</a>";
$checkbox = '<input type="checkbox" name="report_id[' . $report['report_id'] . ']" value="1" checked="checked" />';
if ($item == 'process') {
$memo = '<input type="text" name="report_memo[' . $report['report_id'] . ']" maxlength="255" size="80" />';
示例8: xoops_cp_header
// 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. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //
// Author: XOOPS Foundation //
// URL: http://www.xoops.org/ //
// Project: The XOOPS Project //
// ------------------------------------------------------------------------- //
include 'header.php';
xoops_cp_header();
loadModuleAdminMenu(2, "");
$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['id']) ? "edit" : 'list');
$handler =& xoops_getmodulehandler('category');
switch ($op) {
default:
case "list":
$criteria = new CriteriaCompo();
$criteria->setSort('cat_weight');
$criteria->setOrder('ASC');
$GLOBALS['xoopsTpl']->assign('categories', $handler->getObjects($criteria, true, false));
$template_main = "profile_admin_categorylist.html";
break;
case "new":
include_once '../include/forms.php';
$obj =& $handler->create();
$form = $obj->getForm();
示例9: xoops_cp_header
<?php
/**
* Article module for XOOPS
*
* 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 article
* @since 1.0
* @author Taiwen Jiang <phppp@users.sourceforge.net>
* @version $Id: admin.block.php 2178 2008-09-26 08:34:09Z phppp $
*/
include "header.php";
xoops_cp_header();
require XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/include/vars.php";
loadModuleAdminMenu(5);
echo "<div style=\"padding: 8px;\">";
echo "<h2>Coming soon ...</h2>";
echo "</div>";
xoops_cp_footer();
exit;
示例10: xoops_cp_header
<?php
include 'header.php';
xoops_cp_header();
loadModuleAdminMenu(0, "");
xoops_loadLanguage("main", "press");
$op = isset($_REQUEST["op"]) ? $_REQUEST["op"] : "create";
$topic_id = isset($_GET["topic_id"]) ? intval($_GET["topic_id"]) : 0;
$topic_handler = xoops_getmodulehandler("topics");
$topic = $topic_handler->get($topic_id);
switch ($op) {
default:
case "create":
require_once dirname(__FILE__) . "../../include/form.php";
$template_main = "press_cp_edit.html";
break;
case "edit":
if (is_object($topic)) {
$cat_id = $topic->getVar("cat_id");
$subject = $topic->getVar("subject");
$content = $topic->getVar("content", "n");
$date = $topic->getVar("topic_date");
} else {
$topic_id = 0;
$date = time();
}
require_once dirname(__FILE__) . "../../include/form.php";
$template_main = "press_cp_edit.html";
break;
case "delete":
xoops_confirm(array("topic_id" => $topic_id, "op" => "deletetopic"), "action.php", "确定删除 [ {$topic->getVar("subject")} ] 这篇主题.");
示例11: forum_admin_chmod
$res = forum_admin_chmod($path, 0777);
$msg = $res ? _AM_XFORUM_PERMSET : _AM_XFORUM_PERMNOTSET;
redirect_header('index.php', 2, $msg . ': ' . $path);
exit;
break;
case "senddigest":
$digest_handler =& xoops_getmodulehandler('digest', 'xforum');
$res = $digest_handler->process(true);
$msg = $res ? _AM_XFORUM_DIGEST_FAILED : _AM_XFORUM_DIGEST_SENT;
redirect_header('index.php', 2, $msg);
exit;
break;
case "default":
default:
xoops_cp_header();
loadModuleAdminMenu(0, "Index");
$imageLibs = forum_getImageLibs();
echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XFORUM_PREFERENCES . "</legend>";
echo "<div style='padding: 12px;'>" . _AM_XFORUM_POLLMODULE . ": ";
$module_handler =& xoops_gethandler('module');
$xoopspoll =& $module_handler->getByDirname('xoopspoll');
if (is_object($xoopspoll)) {
$isOK = $xoopspoll->getVar('isactive');
} else {
$isOK = false;
}
echo $isOK ? _AM_XFORUM_AVAILABLE : _AM_XFORUM_NOTAVAILABLE;
echo "</div>";
echo "<div style='padding: 8px;'>";
echo "<a href='http://www.imagemagick.org' target='_blank'>" . _AM_XFORUM_IMAGEMAGICK . " </a>";
if (array_key_exists('imagemagick', $imageLibs)) {
示例12: xoops_cp_header
* 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 Co.Ltd. http://www.xoops.com.cn
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package links
* @since 1.0.0
* @author Mengjue Shao <magic.shao@gmail.com>
* @author Susheng Yang <ezskyyoung@gmail.com>
* @version $Id: admin.index.php 1 2010-1-22 ezsky$
*/
include 'header.php';
xoops_cp_header();
loadModuleAdminMenu(0);
$path = isset($_REQUEST['path']) ? $_REQUEST['path'] : '';
$cat_handler =& xoops_getmodulehandler('category', 'links');
$links_handler =& xoops_getmodulehandler('links', 'links');
$create = array('logo_dir' => XOOPS_ROOT_PATH . $xoopsModuleConfig['logo_dir']);
if ($path) {
include_once "../include/functions.php";
switch ($path) {
case 'logo_dir':
Linksmkdirs($create['logo_dir']);
break;
default:
break;
}
}
foreach ($create as $k => $v) {
示例13: xoops_cp_header
// 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. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //
include "admin_header.php";
include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/class/xoopsformloader.php";
xoops_cp_header();
loadModuleAdminMenu(5, _AM_NEWBB_PRUNE_TITLE);
echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_NEWBB_PRUNE_TITLE . "</legend>";
echo "<br /><br /><table width='100%' border='0' cellspacing='1' class='outer'>" . "<tr><td class='odd'>";
if (!empty($_POST['submit'])) {
$post_list = null;
$topic_list = null;
$topics_number = 0;
$posts_number = 0;
if (empty($_POST["forums"])) {
redirect_header("./admin_forum_prune.php", 1, _AM_NEWBB_PRUNE_FORUMSELERROR);
} elseif (is_array($_POST["forums"])) {
$selected_forums = implode(",", $_POST["forums"]);
}
$prune_days = $myts->addSlashes($_POST["days"]);
$prune_ddays = time() - $prune_days;
$archive = $myts->addSlashes($_POST["archive"]);
示例14: xoops_cp_header
<?php
/**
* newbb
*
* @copyright The XOOPS project http://www.xoops.org/
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @author Taiwen Jiang (phppp or D.J.) <php_pp@hotmail.com>
* @since 4.00
* @version $Id$
* @package module::newbb
*/
include 'admin_header.php';
xoops_cp_header();
loadModuleAdminMenu(12, _AM_NEWBB_SYNCFORUM);
//if (!empty($_GET['type'])) {
$start = intval(@$_GET['start']);
switch (@$_GET['type']) {
case "forum":
$forum_handler =& xoops_getmodulehandler('forum', 'newbb');
if ($start >= ($count = $forum_handler->getCount())) {
break;
}
if (empty($start)) {
$mysql_version = version_compare(mysql_get_server_info(), "4.1.0", "ge");
/* for MySQL 4.1+ */
if ($mysql_version) {
$sql = "\tUPDATE " . $xoopsDB->prefix("bb_forums") . "\tSET parent_forum = 0" . "\tWHERE (parent_forum NOT IN ( SELECT DISTINCT forum_id FROM " . $xoopsDB->prefix("bb_forums") . "))" . "\t\tOR parent_forum = forum_id";
} else {
// for 4.0+
/* */
示例15: xoops_cp_header
*/
/**
* XOOPS tag management module
*
* @copyright The XOOPS project http://sourceforge.net/projects/xoops/
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @since 1.0.0
* @author Taiwen Jiang <phppp@users.sourceforge.net>
* @version $Id: syn.tag.php 2292 2008-10-12 04:53:18Z phppp $
* @package tag
*/
include 'header.php';
require_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
xoops_cp_header();
include XOOPS_ROOT_PATH . "/modules/tag/include/vars.php";
echo function_exists("loadModuleAdminMenu") ? loadModuleAdminMenu(2) : "";
$limit = 10;
$modid = intval(@$_GET['modid']);
$start = intval(@$_GET['start']);
$limit = isset($_GET['limit']) ? intval($_GET['limit']) : 100;
$sql = " SELECT tag_modid, COUNT(DISTINCT tag_id) AS count_tag";
$sql .= " FROM " . $xoopsDB->prefix("tag_link");
$sql .= " GROUP BY tag_modid";
$counts_module = array();
$module_list = array();
if ($result = $xoopsDB->query($sql)) {
while ($myrow = $xoopsDB->fetchArray($result)) {
$counts_module[$myrow["tag_modid"]] = $myrow["count_tag"];
}
if (!empty($counts_module)) {
$module_handler =& xoops_gethandler("module");