|
From: <zy...@us...> - 2014-12-22 19:32:26
|
Revision: 12913
http://sourceforge.net/p/xoops/svn/12913
Author: zyspec
Date: 2014-12-22 19:32:22 +0000 (Mon, 22 Dec 2014)
Log Message:
-----------
- sanitized various ids passed into method/functions to reduce security vulnerability
- added module preference setting to remove admin impressions and clicks from banner count
- added module preference setting to set maximum file upload size
- added ability to change banner status from Admin banner edit page
- added banner and image directory removal on uninstall
- added additional banner categories for industry standard size banners
- moved images, css, & js to assets subdirectory
- moved mimetypes.inc.php from ./class to ./include directory where it belongs
- converted dirname(__FILE__) to __DIR__
- removed files for permissions & block management (functionality previously removed), uses XOOPS standard methods
- removed/commented english language defines that are no longer used
- removed RwbannerAbout class as it's no longer used. Module now uses XOOPS standard method to display module info
- fixed bug if installed in directory other than default preload could not determine if module is active
- re-arranged admin code and tabs to make operations more intuitive
- updated Admin help to reflect operation & usage changes
- minor code & comment cleanup to improve performance & maintainability
Modified Paths:
--------------
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/about.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/admin.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/admin_footer.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/admin_header.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/blocksadmin.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/exibe.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/import.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/index.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/main.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/menu.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/upgrade.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/blocks/ajaxbanner.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/blocks/banner.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/blocks/dropinbanner.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/blocks/estatisticas.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/blocks/lightboxbanner.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/blocks/popadbanner.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/class/FlashHeader.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/class/about.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/class/class.banner.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/class/class.categoria.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/class/class.tags.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/conta_click.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/docs/LEIAME (2).TXT
XoopsModules/rw_banner/branches/zyspec/rwbanner/docs/LEIAME.TXT
XoopsModules/rw_banner/branches/zyspec/rwbanner/docs/LISEZMOI.TXT
XoopsModules/rw_banner/branches/zyspec/rwbanner/docs/README (2).TXT
XoopsModules/rw_banner/branches/zyspec/rwbanner/docs/changelog.txt
XoopsModules/rw_banner/branches/zyspec/rwbanner/docs/header.php_com_hack_rwbanner.txt
XoopsModules/rw_banner/branches/zyspec/rwbanner/docs/header.php_com_hack_rwbanner_french.txt
XoopsModules/rw_banner/branches/zyspec/rwbanner/docs/install.txt
XoopsModules/rw_banner/branches/zyspec/rwbanner/docs/readme.txt
XoopsModules/rw_banner/branches/zyspec/rwbanner/include/bbcode.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/include/functions.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/include/getajaxbanner.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/include/maketags.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/index.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/inser.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/language/english/admin.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/language/english/blocks.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/language/english/help/help.html
XoopsModules/rw_banner/branches/zyspec/rwbanner/language/english/main.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/language/english/modinfo.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/preloads/core.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/sql/mysql.sql
XoopsModules/rw_banner/branches/zyspec/rwbanner/xoops_version.php
Added Paths:
-----------
XoopsModules/rw_banner/branches/zyspec/
XoopsModules/rw_banner/branches/zyspec/rwbanner/
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/banners.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/categories.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/tags.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/assets/
XoopsModules/rw_banner/branches/zyspec/rwbanner/assets/css/
XoopsModules/rw_banner/branches/zyspec/rwbanner/assets/images/
XoopsModules/rw_banner/branches/zyspec/rwbanner/assets/index.html
XoopsModules/rw_banner/branches/zyspec/rwbanner/assets/js/
XoopsModules/rw_banner/branches/zyspec/rwbanner/include/mimetypes.inc.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/templates/blocks/block_ajax_banner.tpl
XoopsModules/rw_banner/branches/zyspec/rwbanner/templates/blocks/block_banner.tpl
XoopsModules/rw_banner/branches/zyspec/rwbanner/templates/blocks/block_dropin_banner.tpl
XoopsModules/rw_banner/branches/zyspec/rwbanner/templates/blocks/block_estatisticas_banner.tpl
XoopsModules/rw_banner/branches/zyspec/rwbanner/templates/blocks/block_lightbox_banner.tpl
XoopsModules/rw_banner/branches/zyspec/rwbanner/templates/blocks/block_popad_banner.tpl
Removed Paths:
-------------
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/about2.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/admin_header2.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/inser.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/insercateg.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/insertag.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/myblockform.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/myblocksadmin.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/mygroupperm.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/mygrouppermform.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/perm.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/permissions.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/permissions2.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/class/mimetypes.inc.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/css/
XoopsModules/rw_banner/branches/zyspec/rwbanner/images/
XoopsModules/rw_banner/branches/zyspec/rwbanner/include/blocksadmin.inc.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/include/gtickets.php
XoopsModules/rw_banner/branches/zyspec/rwbanner/js/
XoopsModules/rw_banner/branches/zyspec/rwbanner/templates/blocks/block_ajax_banner.html
XoopsModules/rw_banner/branches/zyspec/rwbanner/templates/blocks/block_banner.html
XoopsModules/rw_banner/branches/zyspec/rwbanner/templates/blocks/block_dropin_banner.html
XoopsModules/rw_banner/branches/zyspec/rwbanner/templates/blocks/block_estatisticas_banner.html
XoopsModules/rw_banner/branches/zyspec/rwbanner/templates/blocks/block_lightbox_banner.html
XoopsModules/rw_banner/branches/zyspec/rwbanner/templates/blocks/block_popad_banner.html
Modified: XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/about.php
===================================================================
--- XoopsModules/rw_banner/trunk/rwbanner/admin/about.php 2014-10-13 19:09:46 UTC (rev 12815)
+++ XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/about.php 2014-12-22 19:32:22 UTC (rev 12913)
@@ -1,5 +1,5 @@
<?php
-/**
+/*
*
* 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
@@ -7,14 +7,16 @@
* 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://www.xoops.org)
- * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
- * @author XOOPS Development Team
- * @version $Id $
+ */
+/**
+ * @package:: rwbanner
+ * @copyright:: {@link http://www.xoops.org The XOOPS Project}
+ * @license:: {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
+ * @author:: XOOPS Module Development Team
+ * @version:: $Id: $
**/
-include_once dirname(__FILE__) . '/admin_header.php';
+include_once __DIR__ . '/admin_header.php';
xoops_cp_header();
@@ -23,4 +25,4 @@
echo $aboutAdmin->addNavigation('about.php');
echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
-include 'admin_footer.php';
\ No newline at end of file
+include __DIR__ . '/admin_footer.php';
Deleted: XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/about2.php
===================================================================
--- XoopsModules/rw_banner/trunk/rwbanner/admin/about2.php 2014-10-13 19:09:46 UTC (rev 12815)
+++ XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/about2.php 2014-12-22 19:32:22 UTC (rev 12913)
@@ -1,36 +0,0 @@
-<?php
-// ------------------------------------------------------------------------ //
-// RW-Banner //
-// Copyright (c) 2006 BrInfo //
-// <http://www.brinfo.com.br> //
-// ------------------------------------------------------------------------ //
-// This program is free software; you can redistribute it and/or modify //
-// it under the terms of the GNU General Public License as published by //
-// the Free Software Foundation; either version 2 of the License, or //
-// (at your option) any later version. //
-// //
-// 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. 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: Rodrigo Pereira Lima (BrInfo - Soluções Web) //
-// Site: http://www.brinfo.com.br //
-// Project: RW-Banner //
-// Descrição: Sistema de gerenciamento de mídias publicitárias //
-// ------------------------------------------------------------------------- //
-
-include_once("admin_header.php");
-
-include_once("../class/about.php");
-$aboutObj = new RwbannerAbout(_AM_RWBANNER_ABOUT);
-$aboutObj->render();
Modified: XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/admin.php
===================================================================
--- XoopsModules/rw_banner/trunk/rwbanner/admin/admin.php 2014-10-13 19:09:46 UTC (rev 12815)
+++ XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/admin.php 2014-12-22 19:32:22 UTC (rev 12913)
@@ -1,154 +1,163 @@
<?php
-// ------------------------------------------------------------------------ //
-// RW-Banner //
-// Copyright (c) 2006 BrInfo //
-// <http://www.brinfo.com.br> //
-// ------------------------------------------------------------------------ //
-// This program is free software; you can redistribute it and/or modify //
-// it under the terms of the GNU General Public License as published by //
-// the Free Software Foundation; either version 2 of the License, or //
-// (at your option) any later version. //
-// //
-// 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. 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: Rodrigo Pereira Lima (BrInfo - Soluções Web) //
-// Site: http://www.brinfo.com.br //
-// Project: RW-Banner //
-// Descrição: Sistema de gerenciamento de mídias publicitárias //
-// ------------------------------------------------------------------------- //
+/*
+ RW-Banner
+ Copyright (c) 2006 BrInfo
+ <http://www.brinfo.com.br>
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-$admin_mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+ 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.
-$fct = empty( $_POST['fct'] ) ? '' : trim( $_POST['fct'] ) ;
-$fct = empty( $_GET['fct'] ) ? $fct : trim( $_GET['fct'] ) ;
-if( empty( $fct ) ) $fct = 'preferences' ;
+ 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
+*/
+/**
+ * XOOPS rwbanner Banner Click Redirect page
+ *
+ * @package:: rwbanner
+ * @copyright:: {@link www.brinfo.com.br BrInfo - Soluções Web}
+ * @license:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license}
+ * @author:: Rodrigo Pereira Lima aka RpLima (http://www.brinfo.com.br)
+ * @since:: 1.0
+ * @version:: $Id $
+ *
+ */
+$admin_mydirname = basename(dirname(__DIR__));
+
+$fct = XoopsRequest::getString('fct', 'preferences');
+$fct = trim($fct);
+/*
+$fct = empty($_POST['fct']) ? 'preferences' : trim($_POST['fct']);
+$fct = empty($_GET['fct']) ? $fct : trim($_GET['fct']);
+*/
+
include "../../../mainfile.php";
-include XOOPS_ROOT_PATH."/include/cp_functions.php";
-include_once XOOPS_ROOT_PATH."/kernel/module.php";
-include_once "../include/gtickets.php" ;// GIJ
+include $GLOBALS['xoops']->path("/include/cp_functions.php");
+include_once $GLOBALS['xoops']->path("/kernel/module.php");
$admintest = 0;
-if (is_object($xoopsUser)) {
- $xoopsModule =& XoopsModule::getByDirname("system");
- if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
- redirect_header(XOOPS_URL.'/user.php',3,_MD_RWBANNER_NOPERM);
- exit();
- }
- $admintest=1;
+if ($GLOBALS['xoopsUser'] instanceof XoopsUser) {
+ $GLOBALS['xoopsModule'] =& XoopsModule::getByDirname('system');
+ if (!$GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->mid()) ) {
+ redirect_header($GLOBALS['xoops']->url('www/user.php'), 3, _MD_RWBANNER_NOPERM);
+ exit();
+ }
+ $admintest = 1;
} else {
- redirect_header(XOOPS_URL.'/user.php',3,_MD_RWBANNER_NOPERM);
- exit();
+ redirect_header($GLOBALS['xoops']->url('www/user.php'), 3, _MD_RWBANNER_NOPERM);
+ exit();
}
// include system category definitions
-include_once XOOPS_ROOT_PATH."/modules/system/constants.php";
+include_once $GLOBALS['xoops']->path('modules/system/constants.php');
$error = false;
-if ($admintest != 0) {
- if (isset($fct) && $fct != '') {
- if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) {
- if ( file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php") ) {
- include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php";
- } else {
- include XOOPS_ROOT_PATH."/modules/system/language/english/admin.php";
- }
- if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) {
- include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php";
- } elseif (file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) {
- include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php";
- }
- include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php";
- $sysperm_handler =& xoops_gethandler('groupperm');
- $category = !empty($modversion['category']) ? intval($modversion['category']) : 0;
- unset($modversion);
- if ($category > 0) {
- $groups =& $xoopsUser->getGroups();
- if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))){
-// if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php")) {
-// include_once XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php"; GIJ
- if (file_exists("../include/{$fct}.inc.php")) {
- include_once "../include/{$fct}.inc.php" ;
- } else {
- $error = true;
- }
- } else {
- $error = true;
- }
- } elseif ($fct == 'version') {
- if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/version/main.php")) {
- include_once XOOPS_ROOT_PATH."/modules/system/admin/version/main.php";
- } else {
- $error = true;
- }
- } else {
- $error = true;
- }
- } else {
- $error = true;
- }
- } else {
- $error = true;
- }
+if (0 != $admintest) {
+ if ('' != $fct) {
+ if (file_exists($GLOBALS['xoops']->path("modules/system/admin/{$fct}/xoops_version.php"))) {
+ xoops_loadLanguage('admin', 'system');
+/*
+ if (file_exists($GLOBALS['xoops']->path("modules/system/language/{$GLOBALS['xoopsConfig']['language']}/admin.php"))) {
+ include $GLOBALS['xoops']->path("modules/system/language/{$GLOBALS['xoopsConfig']['language']}/admin.php");
+ } else {
+ include $GLOBALS['xoops']->path('modules/system/language/english/admin.php');
+ }
+*/
+ if (file_exists($GLOBALS['xoops']->path("modules/system/language/{$GLOBALS['xoopsConfig']['language']}/admin/{$fct}.php"))) {
+ include $GLOBALS['xoops']->path("modules/system/language/{$GLOBALS['xoopsConfig']['language']}/admin/{$fct}.php");
+ } elseif (file_exists($GLOBALS['xoops']->path("modules/system/language/english/admin/{$fct}.php"))) {
+ include $GLOBALS['xoops']->path("modules/system/language/english/admin/{$fct}.php");
+ }
+ include $GLOBALS['xoops']->path("modules/system/admin/{$fct}/xoops_version.php");
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ $category = !empty($modversion['category']) ? intval($modversion['category']) : 0;
+ unset($modversion);
+ if ($category > 0) {
+ $groups =& $GLOBALS['xoopsUser']->getGroups();
+ if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $GLOBALS['xoopsModule']->getVar('mid'))) {
+// if (file_exists(XOOPS_ROOT_PATH."modules/system/admin/".$fct."/main.php")) {
+// include_once XOOPS_ROOT_PATH."modules/system/admin/".$fct."/main.php"; GIJ
+ if (file_exists("../include/{$fct}.inc.php")) {
+ include_once "../include/{$fct}.inc.php";
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
+ } elseif ('version' == $fct) {
+ if (file_exists($GLOBALS['xoops']->path('modules/system/admin/version/main.php'))) {
+ include_once $GLOBALS['xoops']->path('modules/system/admin/version/main.php');
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
}
if (false != $error) {
- xoops_cp_header();
- echo "<h4>System Configuration</h4>";
- echo '<table class="outer" cellpadding="4" cellspacing="1">';
- echo '<tr>';
- $groups = $xoopsUser->getGroups();
- $all_ok = false;
- if (!in_array(XOOPS_GROUP_ADMIN, $groups)) {
- $sysperm_handler =& xoops_gethandler('groupperm');
- $ok_syscats =& $sysperm_handler->getItemIds('system_admin', $groups);
- } else {
- $all_ok = true;
- }
- $admin_dir = XOOPS_ROOT_PATH."/modules/system/admin";
- $handle = opendir($admin_dir);
- $counter = 0;
- $class = 'even';
- while ($file = readdir($handle)) {
- if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) {
- include $admin_dir.'/'.$file.'/xoops_version.php';
- if ($modversion['hasAdmin']) {
- $category = isset($modversion['category']) ? intval($modversion['category']) : 0;
- if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) {
- echo "<td class='$class' align='center' valign='bottom' width='19%'>";
- echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n";
- echo "</td>";
- $counter++;
- $class = ($class == 'even') ? 'odd' : 'even';
- }
- if ( $counter > 4 ) {
- $counter = 0;
- echo "</tr>";
- echo "<tr>";
- }
- }
- unset($modversion);
- }
- }
- while ($counter < 5) {
- echo '<td class="'.$class.'"> </td>';
- $class = ($class == 'even') ? 'odd' : 'even';
- $counter++;
- }
- echo '</tr></table>';
+ xoops_cp_header();
+ echo "<h4>System Configuration</h4>\n";
+ echo "<table class='outer' cellpadding='4' cellspacing='1'>\n";
+ echo "<tr>\n";
+ $groups = $GLOBALS['xoopsUser']->getGroups();
+ $all_ok = false;
+ if (!in_array(XOOPS_GROUP_ADMIN, $groups)) {
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ $ok_syscats =& $sysperm_handler->getItemIds('system_admin', $groups);
+ } else {
+ $all_ok = true;
+ }
+ $admin_dir = $GLOBALS['xoops']->path('modules/system/admin');
+ $handle = opendir($admin_dir);
+ $counter = 0;
+ $class = 'even';
+ while ($file = readdir($handle)) {
+ if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) {
+ include $admin_dir.'/'.$file.'/xoops_version.php';
+ if ($modversion['hasAdmin']) {
+ $category = isset($modversion['category']) ? intval($modversion['category']) : 0;
+ if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) {
+ echo "<td class='$class' align='center' valign='bottom' width='19%'>\n";
+ echo " <a href='" . $GLOBALS['xoops']->buildUrl("modules/system/admin.php", array('fct'=>$file)) . "'><b>" . trim($modversion['name']) . "</b></a>\n";
+ echo "</td>\n";
+ ++$counter;
+ $class = ('even' == $class) ? 'odd' : 'even';
+ }
+ if ($counter > 4) {
+ $counter = 0;
+ echo "</tr>\n";
+ echo "<tr>\n";
+ }
+ }
+ unset($modversion);
+ }
+ }
+ while ($counter < 5) {
+ echo "<td class='{$class}'> </td>\n";
+ $class = ('even' == $class) ? 'odd' : 'even';
+ ++$counter;
+ }
+ echo '</tr></table>';
xoops_cp_footer();
}
Modified: XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/admin_footer.php
===================================================================
--- XoopsModules/rw_banner/trunk/rwbanner/admin/admin_footer.php 2014-10-13 19:09:46 UTC (rev 12815)
+++ XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/admin_footer.php 2014-12-22 19:32:22 UTC (rev 12913)
@@ -1,10 +1,26 @@
<?php
+/*
+ *
+ * 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.
+ */
+/**
+ * @package:: rwbanner
+ * @copyright:: {@link http://www.xoops.org The XOOPS Project}
+ * @license:: {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
+ * @author:: XOOPS Module Development Team
+ * @version:: $Id: $
+ **/
global $pathIcon32;
echo "<div class='adminfooter'>\n"
- ." <div style='text-align: center;'>\n"
- ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
- ." </div>\n"
- ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
- ."</div>";
+ . " <div class='txtcenter'>\n"
+ . " <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
+ . " </div>\n"
+ . " " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
+ . "</div>\n";
-xoops_cp_footer();
\ No newline at end of file
+xoops_cp_footer();
Modified: XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/admin_header.php
===================================================================
--- XoopsModules/rw_banner/trunk/rwbanner/admin/admin_header.php 2014-10-13 19:09:46 UTC (rev 12815)
+++ XoopsModules/rw_banner/branches/zyspec/rwbanner/admin/admin_header.php 2014-12-22 19:32:22 UTC (rev 12913)
@@ -11,42 +11,41 @@
* @copyright The XOOPS Project (http://www.xoops.org)
* @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
* @author XOOPS Development Team
- * @version $Id $
+ * @version $Id: $
**/
-$path = dirname(dirname(dirname(dirname(__FILE__))));
-include_once $path . '/mainfile.php';
-include_once $path . '/header.php';
-include_once $path . '/include/cp_functions.php';
-require_once $path . '/include/cp_header.php';
+require_once "../../../include/cp_header.php";
+include_once $GLOBALS['xoops']->path('/mainfile.php');
+include_once $GLOBALS['xoops']->path('/header.php');
+include_once $GLOBALS['xoops']->path('/include/cp_functions.php');
-include_once $path . "/kernel/module.php";
-include_once $path . "/class/xoopstree.php";
-include_once $path . "/class/xoopslists.php";
-include_once $path . "/class/xoopsformloader.php";
-include_once $path . '/class/pagenav.php';
+include_once $GLOBALS['xoops']->path('/kernel/module.php');
+include_once $GLOBALS['xoops']->path('/class/xoopstree.php');
+include_once $GLOBALS['xoops']->path('/class/xoopslists.php');
+include_once $GLOBALS['xoops']->path('/class/xoopsformloader.php');
+include_once $GLOBALS['xoops']->path('/class/pagenav.php');
-$dirname = basename(dirname(dirname(__FILE__)));
+$path = dirname(dirname(dirname(__DIR__)));
+$dirname = basename(dirname(__DIR__));
$module_handler = xoops_gethandler('module');
$module = $module_handler->getByDirname($dirname);
-if (is_object($xoopsUser)) {
- $xoopsModule = XoopsModule::getByDirname($dirname);
- if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
- redirect_header(XOOPS_URL . "/", 1, _MD_RWBANNER_NOPERM);
+if (is_object($GLO...
[truncated message content] |