From: <luc...@us...> - 2014-10-26 20:03:46
|
Revision: 12821 http://sourceforge.net/p/xoops/svn/12821 Author: luciorota Date: 2014-10-26 20:03:41 +0000 (Sun, 26 Oct 2014) Log Message: ----------- add new files standardize module fixed bug when reporting eror Modified Paths: -------------- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/about.php XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_footer.php XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_header.php XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/index.php XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/menu.php XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/css/style.css XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/js/script.js XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php XoopsModules/xhttperror/branches/luciorota/xhttperror/class/index.html XoopsModules/xhttperror/branches/luciorota/xhttperror/class/report.php XoopsModules/xhttperror/branches/luciorota/xhttperror/class/request.php XoopsModules/xhttperror/branches/luciorota/xhttperror/class/xhttperror.php XoopsModules/xhttperror/branches/luciorota/xhttperror/header.php XoopsModules/xhttperror/branches/luciorota/xhttperror/include/common.php XoopsModules/xhttperror/branches/luciorota/xhttperror/include/constants.php XoopsModules/xhttperror/branches/luciorota/xhttperror/include/functions.php XoopsModules/xhttperror/branches/luciorota/xhttperror/include/oninstall.php XoopsModules/xhttperror/branches/luciorota/xhttperror/include/onuninstall.php XoopsModules/xhttperror/branches/luciorota/xhttperror/include/onupdate.php XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/admin.php XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/help/help.html XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/main.php XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/modinfo.php XoopsModules/xhttperror/branches/luciorota/xhttperror/sql/mysql.sql XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/admin/xhttperror_admin_errors_list.tpl XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/admin/xhttperror_admin_reports_list.tpl XoopsModules/xhttperror/branches/luciorota/xhttperror/xoops_version.php Added Paths: ----------- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/16x16/ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/16x16/index.html XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/error.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/house.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/index.html XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/information.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report_error.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/index.html XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/index.html XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.png XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.xcf XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/xoopsmicrobutton.gif XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/index.html XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/install.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/lang_diff.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/languages.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/license.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/readme1st.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/smarty_diff.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/upgrade.txt XoopsModules/xhttperror/branches/luciorota/xhttperror/error.php XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/common.php XoopsModules/xhttperror/branches/luciorota/xhttperror/language/english/help/extra_info.html XoopsModules/xhttperror/branches/luciorota/xhttperror/templates/xhttperror_error.tpl Removed Paths: ------------- XoopsModules/xhttperror/branches/luciorota/xhttperror/index.php Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/about.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/about.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/about.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -8,8 +8,19 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ +/** + * xhttperror module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package xhttperror + * @since 1.00 + * @author Xoops Development Team + * @version svn:$id$ + */ -include_once dirname(__FILE__) . '/admin_header.php'; +$currentFile = basename(__FILE__); +include_once __DIR__ . '/admin_header.php'; xoops_cp_header(); @@ -18,4 +29,4 @@ echo $aboutAdmin->addNavigation('about.php'); echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); -include 'admin_footer.php'; +include __DIR__ . '/admin_footer.php'; Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_footer.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_footer.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_footer.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -8,6 +8,16 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ +/** + * Xhttperror module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package xhttperror + * @since 1.00 + * @author Xoops Development Team + * @version svn:$id$ + */ echo "<div class='adminfooter'>\n"; echo " <div style='text-align: center;'>\n"; Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_header.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_header.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/admin_header.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -8,9 +8,19 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ +/** + * xhttperror module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package xhttperror + * @since 1.00 + * @author Xoops Development Team + * @version svn:$id$ + */ -include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; -include_once dirname(dirname(__FILE__)) . '/include/common.php'; +include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; +include_once dirname(__DIR__) . '/include/common.php'; // Include xoops admin header include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; @@ -26,86 +36,6 @@ xoops_loadLanguage('main', $xhttperror->getModule()->dirname()); if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { - include_once(XOOPS_ROOT_PATH . '/class/template.php'); + include_once XOOPS_ROOT_PATH . '/class/template.php'; $xoopsTpl = new XoopsTpl(); } -/* - - - - - - - - - - - - -// Include xoops admin header -include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; -include_once XOOPS_ROOT_PATH . '/class/tree.php'; -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; -xoops_load ('XoopsUserUtility'); - -$module_handler =& xoops_gethandler('module'); -$xoopsModule = & $module_handler->getByDirname($dirname); -$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); -$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); -$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); -$pathImageModule = XOOPS_URL . '/modules/'. $GLOBALS['xoopsModule']->getVar('dirname') .'/images'; - -// Include module functions -include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/config.php"; -include_once XOOPS_ROOT_PATH . "/modules/{$dirname}/include/functions.php"; - - - -// Check and load moduleadmin classes -$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); -$globalLanguage = $GLOBALS['xoopsConfig']['language']; -if ( file_exists($pathDir . '/language/' . $globalLanguage . '/main.php')){ - include_once $pathDir . '/language/' . $globalLanguage . '/main.php'; -} else { - include_once $pathDir . '/language/english/main.php'; -} -if ( file_exists($pathDir . '/moduleadmin.php')){ - include_once $pathDir . '/moduleadmin.php'; - //return true; -} else { - xoops_cp_header(); - echo xoops_error(_AM_XADDRESSES_NOFRAMEWORKS); - xoops_cp_footer(); - //return false; -} - -$myts =& MyTextSanitizer::getInstance(); - -// Get user groups -$groupPermHandler =& xoops_gethandler('groupperm'); -if ($xoopsUser) { - $moduleperm_handler =& xoops_gethandler('groupperm'); - if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups())) { - redirect_header(XOOPS_URL, 1, _NOPERM); - exit(); - } -} else { - redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); - exit(); -} - -if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { - include_once(XOOPS_ROOT_PATH."/class/template.php"); - $xoopsTpl = new XoopsTpl(); -} - -$xoopsTpl->assign('pathImageIcon', $pathImageIcon); -$xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); -//xoops_cp_header(); - -//Load module languages -xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); -xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); -xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); -*/ \ No newline at end of file Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/error.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -1,142 +1,151 @@ -<?php -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XHTTPERROR - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/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. See the - * GNU General Public License for more details. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GNU General Public License v3.0 - * @package xhttperror - * @author Rota Lucio ( luc...@gm... ) - * - * $Rev$: Revision of last commit - * $Author$: Author of last commit - * $Date$: Date of last commit - * **************************************************************************** - */ - -$currentFile = basename(__FILE__); -include 'admin_header.php'; - -$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['error_id']) ? "edit_error" : 'list_errors'); -switch($op ) { - default: - case 'list_errors' : - // render start here - xoops_cp_header(); - // render submenu - $modcreate_admin = new ModuleAdmin(); - echo $modcreate_admin->addNavigation('errors.php'); - $modcreate_admin->addItemButton(_AM_XHTTPERROR_ERROR_ADD, '' . $currentFile . '?op=edit_error', 'add'); - echo $modcreate_admin->renderButton(); - - $errorCount = $xhttperror->getHandler('error')->getCount(); - if($errorCount > 0) { - $criteria = new CriteriaCompo(); - $criteria->setSort('error_statuscode'); - $criteria->setOrder('ASC'); - $errorObjs = $xhttperror->getHandler('error')->getObjects($criteria, true, false); - - $GLOBALS['xoopsTpl']->assign('errors', $errorObjs); - $GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() ); - $GLOBALS['xoopsTpl']->display("db:{$xhttperror->getModule()->dirname()}_admin_errors_list.tpl"); - } else { - echo _AM_XHTTPERROR_ERROR_NOERRORS; - } - - include "admin_footer.php"; - break; - - case 'edit_error' : - case 'new_error' : - // render start here - xoops_cp_header(); - // render submenu - $modcreate_admin = new ModuleAdmin(); - echo $modcreate_admin->addNavigation('errors.php'); - $modcreate_admin->addItemButton(_AM_XHTTPERROR_ERROR_LIST, '' . $currentFile . '?op=list_errors', 'list'); - echo $modcreate_admin->renderButton(); - - if (isset($_REQUEST['error_id'])) { - $errorObj = $xhttperror->getHandler('error')->get($_REQUEST['error_id']); - } else { - $errorObj = $xhttperror->getHandler('error')->create(); - - } - $form = $errorObj->getForm(); - $form->display(); - - include "admin_footer.php"; - break; - - case 'save_error' : - if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - if ( isset($_REQUEST['error_id']) ) { - $errorObj = $xhttperror->getHandler('error')->get($_REQUEST['error_id']); - } else { - $errorObj = $xhttperror->getHandler('error')->create(); - } - // Check statuscode - if ( isset($_REQUEST['error_statuscode']) ) { - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('error_statuscode', $_REQUEST['error_statuscode'])); - if ($xhttperror->getHandler('error')->getCount($criteria) > 0) { - redirect_header($currentFile, 3, _AM_XHTTPERROR_STATUSCODE_EXISTS ); - } else { - $errorObj->setVar('error_statuscode', $_REQUEST['error_statuscode']); - } - } - $errorObj->setVar('error_title', $_REQUEST['error_title']); - $errorObj->setVar('error_text', $_REQUEST['error_text']); - $errorObj->setVar('error_text_html', $_REQUEST['error_text_html']); - $errorObj->setVar('error_text_smiley', $_REQUEST['error_text_smiley']); - $errorObj->setVar('error_text_breaks', $_REQUEST['error_text_breaks']); - $errorObj->setVar('error_showme', $_REQUEST['error_showme']); - $errorObj->setVar('error_redirect', $_REQUEST['error_redirect']); - $errorObj->setVar('error_redirect_time', (int)$_REQUEST['error_redirect_time']); - /* IN PROGRESS - $errorObj->setVar('error_redirect_message', (int)$_REQUEST['error_redirect_message']); - */ - $errorObj->setVar('error_redirect_uri', $_REQUEST['error_redirect_uri']); - - if ( $xhttperror->getHandler('error')->insert($errorObj) ) { - redirect_header($currentFile, 3, _AM_XHTTPERROR_SAVEDSUCCESS ); - } else { - redirect_header($currentFile, 3, _AM_XHTTPERROR_NOTSAVED ); - } - break; - - case 'delete_error' : - $errorObj = $xhttperror->getHandler('error')->get($_REQUEST['error_id']); - if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { - if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - if ($xhttperror->getHandler('error')->delete($errorObj)) { - redirect_header($currentFile, 3, _AM_XHTTPERROR_DELETEDSUCCESS); - } else { - echo $errorObj->getHtmlErrors(); - } - } else { - // render start here - xoops_cp_header(); - xoops_confirm(array('ok' => 1, 'error_id' => $_REQUEST['error_id'], 'op' => 'delete_error'), $_SERVER['REQUEST_URI'], sprintf(_AM_XHTTPERROR_ERROR_RUSUREDEL, $errorObj->getVar('error_title'))); - xoops_cp_footer(); - } - break; -} +<?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. + */ +/** + * xhttperror module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package xhttperror + * @since 1.00 + * @author Xoops Development Team + * @version svn:$id$ + */ + +$currentFile = basename(__FILE__); +include_once __DIR__ . '/admin_header.php'; + +$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : (isset($_REQUEST['error_id']) ? 'edit_error' : 'list_errors'); +switch($op ) { + default: + case 'list_errors': + // render start here + xoops_cp_header(); + // render submenu + $modcreate_admin = new ModuleAdmin(); + echo $modcreate_admin->addNavigation($currentFile); + $modcreate_admin->addItemButton(_CO_XHTTPERROR_BUTTON_ERROR_ADD, '' . $currentFile . '?op=edit_error', 'add'); + echo $modcreate_admin->renderButton(); + // + $errorCount = $xhttperror->getHandler('error')->getCount(); + if($errorCount > 0) { + $criteria = new CriteriaCompo(); + $criteria->setSort('error_statuscode'); + $criteria->setOrder('ASC'); + $errors = $xhttperror->getHandler('error')->getObjects($criteria, true, false); // as array + $GLOBALS['xoopsTpl']->assign('errors', $errors); + $GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() ); + $GLOBALS['xoopsTpl']->display("db:{$xhttperror->getModule()->dirname()}_admin_errors_list.tpl"); + } else { + echo _CO_XHTTPERROR_WARNING_NOERRORS; + } + include __DIR__ . '/admin_footer.php'; + break; + + case 'edit_error': + case 'new_error': + // render start here + xoops_cp_header(); + // render submenu + $modcreate_admin = new ModuleAdmin(); + echo $modcreate_admin->addNavigation($currentFile); + $modcreate_admin->addItemButton(_CO_XHTTPERROR_BUTTON_ERRORS_LIST, '' . $currentFile . '?op=list_errors', 'list'); + echo $modcreate_admin->renderButton(); + // + $error_id = XhttperrorRequest::getInt('error_id', 0); + $errorObj = $xhttperror->getHandler('error')->get($error_id); + if (!$errorObj) { + // ERROR + redirect_header($currentFile, 3, _CO_XHTTPERROR_ERROR_NOERROR); + exit(); + } + $form = $errorObj->getForm(); + $form->display(); + // + include __DIR__ . '/admin_footer.php'; + break; + + case 'save_error': + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + $error_id = XhttperrorRequest::getInt('error_id', 0, 'POST'); + $isNewError = ($error_id == 0) ? true : false; + $errorObj = $module_skeleton->getHandler('error')->get($error_id); + // Check statuscode + if (isset($_REQUEST['error_statuscode'])) { + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('error_statuscode', $_REQUEST['error_statuscode'])); + if ($xhttperror->getHandler('error')->getCount($criteria) > 0) { + redirect_header($currentFile, 3, _AM_XHTTPERROR_STATUSCODE_EXISTS); // IN PROGRESS + } else { + $errorObj->setVar('error_statuscode', $_REQUEST['error_statuscode']); + } + } + $error_title = XhttperrorRequest::getString('error_title', '', 'POST'); + $error_text = XhttperrorRequest::getString('error_text', '', 'POST'); + $error_text_html = XhttperrorRequest::getString('error_text_html', '', 'POST'); + // + $errorObj->setVar('error_title', $error_title); + $errorObj->setVar('error_text', $error_text); + $errorObj->setVar('error_text_html', $error_text_html); + $errorObj->setVar('error_text_smiley', $_REQUEST['error_text_smiley']); + $errorObj->setVar('error_text_breaks', $_REQUEST['error_text_breaks']); + $errorObj->setVar('error_showme', $_REQUEST['error_showme']); + $errorObj->setVar('error_redirect', $_REQUEST['error_redirect']); + $errorObj->setVar('error_redirect_time', (int) $_REQUEST['error_redirect_time']); + /* IN PROGRESS + $errorObj->setVar('error_redirect_message', (int)$_REQUEST['error_redirect_message']); + */ + $errorObj->setVar('error_redirect_uri', $_REQUEST['error_redirect_uri']); + if ($xhttperror->getHandler('error')->insert($errorObj)) { + redirect_header($currentFile, 3, _CO_XHTTPERROR_ERROR_STORED); + } else { + // ERROR + xoops_cp_header(); + echo $errorObj->getHtmlErrors(); + xoops_cp_footer(); + exit(); + } + break; + + case 'delete_error': + $error_id = XhttperrorRequest::getInt('error_id', 0); + $errorObj = $xhttperror->getHandler('error')->get($error_id); + if (!$errorObj) { + // ERROR + redirect_header($currentFile, 3, _CO_XHTTPERROR_ERROR_NOERROR); + exit(); + } + if (XhttperrorRequest::getBool('ok', false, 'POST') == true) { + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + if ($xhttperror->getHandler('error')->delete($errorObj)) { + redirect_header($currentFile, 3, _CO_XHTTPERROR_ERROR_DELETED); + } else { + // ERROR + xoops_cp_header(); + echo $errorObj->getHtmlErrors(); + xoops_cp_footer(); + exit(); + } + } else { + xoops_cp_header(); + xoops_confirm( + array('ok' => true, 'op' => 'delete_error', 'error_id' => $error_id), + $_SERVER['REQUEST_URI'], + _CO_XHTTPERROR_ERROR_DELETE_AREUSURE, + _DELETE + ); + xoops_cp_footer(); + } + break; +} Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/index.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/index.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/index.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -9,18 +9,18 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ /** - * Module_skeleton module + * xhttperror module * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) - * @package module_skeleton + * @package xhttperror * @since 1.00 * @author Xoops Development Team * @version svn:$id$ */ $currentFile = basename(__FILE__); -include_once dirname(__FILE__) . '/admin_header.php'; +include_once __DIR__ . '/admin_header.php'; define('_RED', '#FF0000'); // Red define('_GREEN', '#00AA00'); // Green @@ -35,9 +35,9 @@ $indexAdmin->addInfoBox(_AM_XHTTPERROR_INTRO); $indexAdmin->addInfoBoxLine(_AM_XHTTPERROR_INTRO, _AM_XHTTPERROR_INFO); if( file_exists(XOOPS_ROOT_PATH . "/.htaccess")) { - $htaccessCheck = _AM_XHTTPERROR_FILECHK . XOOPS_ROOT_PATH ."/.htaccess " . "<br />" . _AM_XHTTPERROR_FILEEXISTS; + $htaccessCheck = _AM_XHTTPERROR_FILECHK . XOOPS_ROOT_PATH . "/.htaccess " . "<br />" . _AM_XHTTPERROR_FILEEXISTS; } else { - $htaccessCheck = _AM_XHTTPERROR_FILECHK . XOOPS_ROOT_PATH ."/.htaccess " . "<br />" . _AM_XHTTPERROR_FILENOEXIST; + $htaccessCheck = _AM_XHTTPERROR_FILECHK . XOOPS_ROOT_PATH . "/.htaccess " . "<br />" . _AM_XHTTPERROR_FILENOEXIST; } $indexAdmin->addInfoBoxLine(_AM_XHTTPERROR_INTRO, $htaccessCheck); $indexAdmin->addInfoBoxLine(_AM_XHTTPERROR_INTRO, _AM_XHTTPERROR_ADDCODE); @@ -46,15 +46,15 @@ } else { // get errors $criteria = new CriteriaCompo(); - $errors = $xhttperror->getHandler('error')->getObjects($criteria); - foreach ($errors as $error) { - $msg_id = $error->getVar('error_id'); - $error_statuscode = $error->getVar('error_statuscode'); - $hmtl = "ErrorDocument " . $error_statuscode . " " . XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/index.php?error=" . $error_statuscode . ""; + $errorObjs = $xhttperror->getHandler('error')->getObjects($criteria); + foreach ($errorObjs as $errorObj) { + $error_id = $errorObj->getVar('error_id'); + $error_statuscode = $errorObj->getVar('error_statuscode'); + $hmtl = "ErrorDocument " . $error_statuscode . " " . XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/error.php?error=" . $error_statuscode . ""; $indexAdmin->addInfoBoxLine(_AM_XHTTPERROR_INTRO, $hmtl); } } -echo $indexAdmin->addNavigation('index.php'); +echo $indexAdmin->addNavigation($currentFile); echo $indexAdmin->renderIndex(); -include 'admin_footer.php'; +include __DIR__ . '/admin_footer.php'; Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/menu.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/menu.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/menu.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -13,7 +13,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) - * @package xhttperror + * @package xhttperror * @since 1.00 * @author Xoops Development Team * @version svn:$id$ Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/admin/report.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -1,81 +1,93 @@ -<?php -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XHTTPERROR - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/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. See the - * GNU General Public License for more details. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GNU General Public License v3.0 - * @package xhttperror - * @author Rota Lucio ( luc...@gm... ) - * - * $Rev$: Revision of last commit - * $Author$: Author of last commit - * $Date$: Date of last commit - * **************************************************************************** - */ - -$currentFile = basename(__FILE__); -include 'admin_header.php'; - -$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : 'list_reports'; -switch($op ) { - default: - case 'list_reports' : - // render start here - xoops_cp_header(); - // render submenu - $modcreate_admin = new ModuleAdmin(); - echo $modcreate_admin->addNavigation('reports.php'); - - $reportCount = $xhttperror->getHandler('report')->getCount(); - if($reportCount > 0) { - $criteria = new CriteriaCompo(); - $criteria->setSort('report_date'); - $criteria->setOrder('ASC'); - $criteria->setLimit($xhttperror->getConfig('reports_perpage')); - $reportObjs = $xhttperror->getHandler('report')->getObjects($criteria, true, false); - foreach ($reportObjs as $key => $reportObj) { - $reportObjs[$key]['report_user'] = XoopsUserUtility::getUnameFromId($reportObj['report_uid'], false, true); - $reportObjs[$key]['report_date'] = formatTimeStamp($reportObj['report_date'], _DATESTRING); - } - $GLOBALS['xoopsTpl']->assign('reports', $reportObjs); - $GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() ); - $GLOBALS['xoopsTpl']->display("db:{$xhttperror->getModule()->dirname()}_admin_reports_list.html"); - } else { - echo _AM_XHTTPERROR_REPORT_NOREPORTS; - } - include "admin_footer.php"; - break; - case 'delete_report' : - $reportObj = $xhttperror->getHandler('report')->get($_REQUEST['report_id']); - if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { - if ( !$GLOBALS['xoopsSecurity']->check() ) { - redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - if ( $xhttperror->getHandler('report')->delete($reportObj)) { - redirect_header($currentFile, 3, _AM_XHTTPERROR_DELETEDSUCCESS ); - } else { - echo $reportObj->getHtmlErrors(); - } - } else { - // render start here - xoops_cp_header(); - xoops_confirm(array('ok' => 1, 'report_id' => $_REQUEST['report_id'], 'op' => 'delete_report'), $_SERVER['REQUEST_URI'], sprintf(_AM_XHTTPERROR_REPORT_RUSUREDEL, $reportObj->getVar('report_id'))); - xoops_cp_footer(); - } - break; -} +<?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. + */ +/** + * xhttperror module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package xhttperror + * @since 1.00 + * @author Xoops Development Team + * @version svn:$id$ + */ + +$currentFile = basename(__FILE__); +include_once __DIR__ . '/admin_header.php'; + +$op = XhttperrorRequest::getString('op', 'list_reports'); +switch($op) { + default: + case 'list_reports': + // render start here + xoops_cp_header(); + // render submenu + $modcreate_admin = new ModuleAdmin(); + echo $modcreate_admin->addNavigation($currentFile); + // + $reportCount = $xhttperror->getHandler('report')->getCount(); + if($reportCount > 0) { + $start = XhttperrorRequest::getInt('start', 0); + $criteria = new CriteriaCompo(); + $criteria->setSort('report_date'); + $criteria->setOrder('ASC'); + $criteria->setStart($start); + $criteria->setLimit($xhttperror->getConfig('reports_perpage')); + $reports = $xhttperror->getHandler('report')->getObjects($criteria, true, false); // as array + foreach ($reports as $key => $report) { + $report['report_owner_uname'] = XoopsUserUtility::getUnameFromId($report['report_uid']); + $report['report_date_formatted'] = XoopsLocal::formatTimestamp($report['report_date'], 'l'); + $GLOBALS['xoopsTpl']->append('reports', $report); + } + $GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML()); + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($reportCount, $xhttperror->getConfig('reports_perpage'), $start, 'start'); + $GLOBALS['xoopsTpl']->assign('reports_pagenav', $pagenav->renderNav()); + // + $GLOBALS['xoopsTpl']->display("db:{$xhttperror->getModule()->dirname()}_admin_reports_list.tpl"); + } else { + echo _CO_XHTTPERROR_WARNING_NOREPORTS; + } + include __DIR__ . '/admin_footer.php'; + break; + + case 'delete_report' : + $report_id = XhttperrorRequest::getInt('report_id', 0); + $reportObj = $xhttperror->getHandler('report')->get($report_id); + if (!$reportObj) { + // ERROR + redirect_header($currentFile, 3, _CO_XHTTPERROR_ERROR_NOREPORT); + exit(); + } + if (XhttperrorRequest::getBool('ok', false, 'POST') == true) { + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + if ($xhttperror->getHandler('report')->delete($reportObj)) { + redirect_header($currentFile, 3, _CO_XHTTPERROR_REPORT_DELETED); + } else { + // ERROR + xoops_cp_header(); + echo $reportObj->getHtmlErrors(); + xoops_cp_footer(); + exit(); + } + } else { + xoops_cp_header(); + xoops_confirm( + array('ok' => true, 'op' => 'delete_report', 'report_id' => $report_id), + $_SERVER['REQUEST_URI'], + _CO_XHTTPERROR_REPORT_DELETE_AREUSURE, + _DELETE + ); + xoops_cp_footer(); + } + break; +} Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/css/style.css =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/css/style.css 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/css/style.css 2014-10-26 20:03:41 UTC (rev 12821) @@ -1,36 +1 @@ -@charset "UTF-8"; -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XHTTPERROR - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/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. See the - * GNU General Public License for more details. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GPL see LICENSE - * @package xhttperror - * @author Rota Lucio ( luc...@gm... ) - * - * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ - * **************************************************************************** - */ - - -.box-header { - margin: 2px; - padding: 5px; - background-color: #ccc; - width: 100%; - height: 50px; -} +@charset "UTF-8"; Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/16x16/index.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/16x16/index.html (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/16x16/index.html 2014-10-26 20:03:41 UTC (rev 12821) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/error.png =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/error.png =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/error.png 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/error.png 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/error.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/house.png =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/house.png =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/house.png 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/house.png 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/house.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/index.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/index.html (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/index.html 2014-10-26 20:03:41 UTC (rev 12821) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/information.png =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/information.png =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/information.png 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/information.png 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/information.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report.png =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report.png =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report.png 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report.png 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report_error.png =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report_error.png =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report_error.png 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report_error.png 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/32x32/report_error.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/index.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/index.html (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/icons/index.html 2014-10-26 20:03:41 UTC (rev 12821) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/index.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/index.html (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/index.html 2014-10-26 20:03:41 UTC (rev 12821) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.png =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.png =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.png 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.png 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.xcf =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.xcf =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.xcf 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.xcf 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/module_logo.xcf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/xoopsmicrobutton.gif =================================================================== (Binary files differ) Index: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/xoopsmicrobutton.gif =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/xoopsmicrobutton.gif 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/xoopsmicrobutton.gif 2014-10-26 20:03:41 UTC (rev 12821) Property changes on: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/images/xoopsmicrobutton.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/js/script.js =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/js/script.js 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/assets/js/script.js 2014-10-26 20:03:41 UTC (rev 12821) @@ -1,34 +1 @@ - -/** - * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XHTTPERROR - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * Rota Lucio ( http://luciorota.altervista.org/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. See the - * GNU General Public License for more details. - * --------------------------------------------------------------------------- - * @copyright Rota Lucio ( http://luciorota.altervista.org/xoops/ ) - * @license GPL see LICENSE - * @package xhttperror - * @author Rota Lucio ( luc...@gm... ) - * - * Version : 1.0 Mon 2012/07/23 14:17:52 : XOOPS Exp $ - * **************************************************************************** - */ - -$(document).ready(function(){ - $( "button, input:button, input:submit, input:file, input:reset" ).css("color","inherit").button(); - $( ".check" ).css("color","#fff").button(); - $( ".radio" ).css("color","#fff").buttonset(); - $( ".toolbar" ).css("color","#000").buttonset(); -}); +// NOP Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/error.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -9,7 +9,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ /** - * Xhttperror module + * xhttperror module * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) @@ -18,12 +18,13 @@ * @author Xoops Development Team * @version svn:$id$ */ + defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); -include_once dirname(dirname(__FILE__)) . '/include/common.php'; +include_once dirname(__DIR__) . '/include/common.php'; -define('XHTTPERR_REDIRECT_NO', 0); -define('XHTTPERR_REDIRECT_URI', 1); -define('XHTTPERR_REDIRECT_PREVIOUS', 2); +define('_XHTTPERROR_REDIRECT_NO', 0); +define('_XHTTPERROR_REDIRECT_URI', 1); +define('_XHTTPERROR_REDIRECT_PREVIOUS', 2); /** * Class XhttperrorError @@ -53,7 +54,7 @@ $this->initVar('error_text_smiley', XOBJ_DTYPE_INT, true, false); // default: true $this->initVar('error_text_breaks', XOBJ_DTYPE_INT, false, false); // default: false $this->initVar("error_showme", XOBJ_DTYPE_INT, true, false); // default: true - $this->initVar("error_redirect", XOBJ_DTYPE_INT, XHTTPERR_REDIRECT_NO, false); // default: XHTTPERR_REDIRECT_NO + $this->initVar("error_redirect", XOBJ_DTYPE_INT, XHTTPERROR_REDIRECT_NO, false); // default: XHTTPERROR_REDIRECT_NO $this->initVar("error_redirect_time", XOBJ_DTYPE_INT, 3, false); // default: 3 seconds $this->initVar("error_redirect_message", XOBJ_DTYPE_TXTBOX, '', false); // IN PROGRESS $this->initVar("error_redirect_uri", XOBJ_DTYPE_URL, XOOPS_URL, false); // default XOOPS_URL @@ -66,7 +67,7 @@ if ($action === false) { $action = $_SERVER['REQUEST_URI']; } - $title = $this->isNew() ? sprintf(_AM_XHTTPERROR_ERROR_ADD) : sprintf(_AM_XHTTPERROR_ERROR_EDIT); + $title = $this->isNew() ? _CO_XHTTPERROR_BUTTON_ERROR_ADD : _CO_XHTTPERROR_BUTTON_ERROR_EDIT; // $form = new XoopsThemeForm($title, 'form_error', $action, 'post', true); $form->setExtra('enctype="multipart/form-data"'); @@ -112,9 +113,9 @@ $form->addElement(new XoopsFormLabel(_AM_XHTTPERROR_ERROR_REDIRECT_OPTIONS, '', '')); // error: error_reditrect $errorRedirect = new XoopsFormSelect (_AM_XHTTPERROR_ERROR_REDIRECT, 'error_redirect', $this->getVar('error_redirect'), 1, false); - $errorRedirect->addOption (XHTTPERR_REDIRECT_NO, _AM_XHTTPERROR_ERROR_REDIRECT_OPTION_NO); - $errorRedirect->addOption (XHTTPERR_REDIRECT_URI, _AM_XHTTPERROR_ERROR_REDIRECT_OPTION_URI); - $errorRedirect->addOption (XHTTPERR_REDIRECT_PREVIOUS, _AM_XHTTPERROR_ERROR_REDIRECT_OPTION_PREVIOUS); + $errorRedirect->addOption (XHTTPERROR_REDIRECT_NO, _AM_XHTTPERROR_ERROR_REDIRECT_OPTION_NO); + $errorRedirect->addOption (XHTTPERROR_REDIRECT_URI, _AM_XHTTPERROR_ERROR_REDIRECT_OPTION_URI); + $errorRedirect->addOption (XHTTPERROR_REDIRECT_PREVIOUS, _AM_XHTTPERROR_ERROR_REDIRECT_OPTION_PREVIOUS); //$errorRedirect = new XoopsFormRadioYN(, _YES, _NO); $errorRedirect->setDescription(_AM_XHTTPERROR_ERROR_REDIRECT_DESC); $form->addElement($errorRedirect); @@ -147,7 +148,7 @@ $form->addElement(new XoopsFormHidden('error_id', $this->getVar('error_id'))); } // form: button tray - $button_tray = new XoopsFormElementTray(_AM_XHTTPERROR_ACTION, '' ,''); + $button_tray = new XoopsFormElementTray(_CO_XHTTPERROR_ACTIONS, '' ,''); $button_tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); $button_tray->addElement(new XoopsFormButton('', 'reset', _RESET, 'reset')); $cancel_button = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/index.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/index.html 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/index.html 2014-10-26 20:03:41 UTC (rev 12821) @@ -1 +1 @@ - <script>history.go(-1);</script> \ No newline at end of file +<script>history.go(-1);</script> \ No newline at end of file Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/report.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/report.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/report.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -9,17 +9,18 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ /** - * Xhttperror module + * xhttperror module * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) - * @package module_skeleton + * @package xhttperror * @since 1.00 * @author Xoops Development Team * @version svn:$id$ */ + defined('XOOPS_ROOT_PATH') || die('XOOPS root path not defined'); -include_once dirname(dirname(__FILE__)) . '/include/common.php'; +include_once dirname(__DIR__) . '/include/common.php'; /** * Class XhttperrorReport Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/request.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/request.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/request.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -19,7 +19,7 @@ * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. * @package xhttperror - * @since 1.1 + * @since 1.01 * @author Lucio Rota <luc...@gm...> * @author trabis <lus...@gm...> * @version svn:$id$ Modified: XoopsModules/xhttperror/branches/luciorota/xhttperror/class/xhttperror.php =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/class/xhttperror.php 2014-10-26 20:00:31 UTC (rev 12820) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/class/xhttperror.php 2014-10-26 20:03:41 UTC (rev 12821) @@ -15,7 +15,7 @@ * @license http://www.fsf.org/copyleft/gpl.html GNU public license * @package Class * @subpackage Utils - * @since 1.1 + * @since 1.01 * @author Lucio Rota <luc...@gm...> * @author trabis <lus...@gm...> * @version $Id:$ Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/changelog.txt 2014-10-26 20:03:41 UTC (rev 12821) @@ -0,0 +1,17 @@ +xHttpError History + +Key: ++ Added feature. +- Removed. +! Bug fix. +o General comment. + +version 1.01 (Released: 2014/10/24) +=================================== +o Upgraded to Xoops 2.5.7 coding standard. +o Refactory all language definitions +! store wrong requested uri in reports (REDIRECT_URL, REDIRECT_QUERY_STRING) + +version 1.00 (Released: 2012/08/06) +=================================== +o First public release. Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/index.html =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/index.html (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/index.html 2014-10-26 20:03:41 UTC (rev 12821) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/install.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/install.txt (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/install.txt 2014-10-26 20:03:41 UTC (rev 12821) @@ -0,0 +1,41 @@ +Installing this module + +1) Installing on web site: + ======================= + + Via FTP: + ======== + Most people will want to use this method... + + 1.1) Unarchive the module archive on your computer using your favourite + archive utility. + 1.2) Upload the folder module's folder (do not rename it, or change the case!) + and its contents to the "modules" folder on your web site using your FTP + client. + 1.3) Go to section 2.1. + + + Via SSH/Shell: + ============== + If your ISP provides you with SSH access, you can use this method. More + experienced Linux/FreeBSD users may find it quicker. + + 1.1) Download the module archive (or upload from your computer) to + somewhere on your web site. You can do this easily using "wget" + e.g., wget http://www.urltoarchive.com/filename.tar.gz + 1.2) Go to the XOOPS module directory, e.g., "cd /path/to/xoops/modules" + 1.3) Extract the archive, if you downloaded the *.tar.gz version, + this can be done by "tar zxvf articles_archivename.tar.gz". If you + have the *.zip archive, use "unzip articles_archivename.zip". + 1.4) Delete the archive if you no longer need it, to save web space. + 1.5) Go to section 2.1. + +2) Installing into the XOOPS system: + ================================= + + 2.1) Report in to your XOOPS web site as an administrator, and navigate to the + modules admin area ("system admin -> modules"). Scroll to the lower + section of the page where the modules that are not installed are listed. + 2.2) Click on the "Install" icon for the module's listing and follow the + instructions. + 2.3) Click on the module's icon in the left to go to its admin area. Added: XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/lang_diff.txt =================================================================== --- XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/lang_diff.txt (rev 0) +++ XoopsModules/xhttperror/branches/luciorota/xhttperror/docs/lang_diff.txt 2014-10-2... [truncated message content] |