From: <ma...@us...> - 2012-05-15 19:54:57
|
Revision: 9518 http://xoops.svn.sourceforge.net/xoops/?rev=9518&view=rev Author: mageg Date: 2012-05-15 19:54:50 +0000 (Tue, 15 May 2012) Log Message: ----------- update protecor plugins Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/center.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_advisory.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_center.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_prefix.html Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/form/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/form/center.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/form/index.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/center.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/center.php 2012-05-15 19:21:43 UTC (rev 9517) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/center.php 2012-05-15 19:54:50 UTC (rev 9518) @@ -131,11 +131,11 @@ usort($group1_ips, 'protector_ip_cmp'); $group1_ips4disp = htmlspecialchars(implode("\n", $group1_ips), ENT_QUOTES); // edit configs about IP ban and IPs for group=1 -$xoops->tpl->assign('ticket', $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'protector_admin')); -$xoops->tpl->assign('bad_ips4disp', $bad_ips4disp); -$xoops->tpl->assign('filepath4badips', htmlspecialchars($protector->get_filepath4badips())); -$xoops->tpl->assign('group1_ips4disp', $group1_ips4disp); -$xoops->tpl->assign('filepath4group1ips', htmlspecialchars($protector->get_filepath4group1ips())); + +$form = $xoops->getModuleForm(null, 'center'); +$form->getPrefIp($bad_ips4disp, $group1_ips4disp); +$form->render(); + // header of log listing // query for listing $rs = $db->query("SELECT count(lid) FROM $log_table"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/menu.php 2012-05-15 19:21:43 UTC (rev 9517) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/admin/menu.php 2012-05-15 19:54:50 UTC (rev 9518) @@ -21,28 +21,26 @@ defined('XOOPS_ROOT_PATH') or die('Restricted access'); -$pathIcon32 = '../../media/xoops/images/icons/32/'; - $adminmenu = array( array( 'title' => _MI_PROTECTOR_ADMINHOME, 'link' => 'admin/index.php', - 'icon' => $pathIcon32 . '/home.png', + 'icon' => '/home.png', ), array( 'title' => _MI_PROTECTOR_ADMININDEX, 'link' => 'admin/center.php', - 'icon' => $pathIcon32 . '/firewall.png', + 'icon' => '/firewall.png', ), array( 'title' => _MI_PROTECTOR_ADVISORY, 'link' => 'admin/advisory.php', - 'icon' => $pathIcon32 . '/security.png', + 'icon' => '/security.png', ), array( 'title' => _MI_PROTECTOR_PREFIXMANAGER, 'link' => 'admin/prefix_manager.php', - 'icon' => $pathIcon32 . '/manage.png', + 'icon' => '/manage.png', ), array( 'title' => _MI_PROTECTOR_ADMINABOUT, 'link' => 'admin/about.php', - 'icon' => $pathIcon32 . '/about.png', + 'icon' => '/about.png', ), ); \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/form ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/form/center.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/form/center.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/form/center.php 2012-05-15 19:54:50 UTC (rev 9518) @@ -0,0 +1,60 @@ +<?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. +*/ + +/** + * Center Form Class + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package Protector + * @since 2.6.0 + * @author Mage Gr\xE9gory (AKA Mage) + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class ProtectorCenterForm extends XoopsThemeForm +{ + /** + * @param null $obj + */ + public function __construct($obj = null) + { + } + + /** + * Maintenance Form + * @return void + */ + public function getPrefIp($bad_ips4disp, $group1_ips4disp) + { + $db = XoopsDatabaseFactory::getDatabaseConnection(); + $protector = Protector::getInstance($db->conn); + require_once dirname(dirname(__FILE__)) . '/gtickets.php'; + + parent::__construct('', "form_prefip", "center.php", 'post', true); + + $bad_ips = new XoopsFormTextArea(_AM_TH_BADIPS, 'bad_ips', $bad_ips4disp, 3, 90); + $bad_ips->setDescription('<br />' . htmlspecialchars($protector->get_filepath4badips())); + $bad_ips->setClass('span3'); + $this->addElement($bad_ips); + + $group1_ips = new XoopsFormTextArea(_AM_TH_GROUP1IPS, 'group1_ips', $group1_ips4disp, 3, 90); + $group1_ips->setDescription('<br />' . htmlspecialchars($protector->get_filepath4group1ips())); + $group1_ips->setClass('span3'); + $this->addElement($group1_ips); + $formTicket = new xoopsGTicket; + $this->addElement(new XoopsFormHidden("action", "update_ips")); + $this->addElement($formTicket->getTicketXoopsForm(__LINE__, 1800, 'protector_admin')); + $this->addElement(new XoopsFormButton('', "submit_prefip", _SUBMIT, "submit")); + } +} Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/form/center.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/form/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/form/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/form/index.html 2012-05-15 19:54:50 UTC (rev 9518) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/help/help.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/help/help.html 2012-05-15 19:21:43 UTC (rev 9517) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/language/english/help/help.html 2012-05-15 19:54:50 UTC (rev 9518) @@ -1,68 +1,65 @@ -<div id="help-template" class="outer"> - <h1 class="head">Help: <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/protector/admin/index.php" title="Back to the administration of Protector"> Protector <img src="<{xoAdminIcons home.png}>" alt="Back to the administration of Protector"/></a></h1> - <!-- -----Help Content ---------- --> - <h4 class="odd">Description</h4> - <p class="even">Protector is a module to defend your XOOPS CMS from various malicious attacks.</p> - <h4 class="odd">Install/uninstall</h4> - <p>First, define XOOPS_TRUST_PATH into mainfile.php if you've never done it yet.</p> +<!-- -----Help Content ---------- --> +<h4 class="odd">Description</h4> +<p class="even">Protector is a module to defend your XOOPS CMS from various malicious attacks.</p> +<h4 class="odd">Install/uninstall</h4> +<p>First, define XOOPS_TRUST_PATH into mainfile.php if you've never done it yet.</p> +<br /> +<p>Copy html/modules/protector in the archive into your XOOPS_ROOT_PATH/modules/</p> +<p>Copy xoops_trust_path/modules/protector in the archive into your XOOPS_TRUST_PATH/modules/</p> +<br /> +<p>Turn permission of XOOPS_TRUST_PATH/modules/protector/configs writable</p> +<h4 class="odd">= How to rescue =</h4> +<p class="even">If you've been banned from Protector, just delete files under XOOPS_TRUST_PATH/modules/protector/configs/</p> +<h4 class="odd">Introduction for filter-plugins in this archive.</h4> +<p class="even">- postcommon_post_deny_by_rbl.php <br /> - <p>Copy html/modules/protector in the archive into your XOOPS_ROOT_PATH/modules/</p> - <p>Copy xoops_trust_path/modules/protector in the archive into your XOOPS_TRUST_PATH/modules/</p> + an anti-SPAM plugin. <br /> - <p>Turn permission of XOOPS_TRUST_PATH/modules/protector/configs writable</p> - <h4 class="odd">= How to rescue =</h4> - <p class="even">If you've been banned from Protector, just delete files under XOOPS_TRUST_PATH/modules/protector/configs/</p> - <h4 class="odd">Introduction for filter-plugins in this archive.</h4> - <p class="even">- postcommon_post_deny_by_rbl.php - <br /> - an anti-SPAM plugin. - <br /> - All of Post from IP registered in RBL will be rejected. - <br /> - This plugin can slow the performance of Post, especially chat modules. - </p> - <p>- postcommon_post_deny_by_httpbl.php - <br /> - an anti-SPAM plugin. - <br /> - All of Post from IP registered in http:BL will be rejected. - <br /> - Before using it, get HTTPBL_KEY from http://www.projecthoneypot.org/ and set it into the filter file. - <br /> - define( 'PROTECTOR_HTTPBL_KEY' , '............' ) ; - </p> - <p class="even">- postcommon_post_need_multibyte.php - <br /> - an anti-SPAM plugin. - <br /> - Post without multi-byte characters will be rejected. - <br /> - This plugin is only for sites of japanese, tchinese, schinese, and korean. - </p> - <p>- postcommon_post_htmlpurify4guest.php - <br /> - All post data sent by guests will be purified by HTMLPurifier. - <br /> - If you allow guests posting HTML, I strongly recommend you to enable it. - </p> - <p class="even">-postcommon_register_insert_js_check.php - <br /> - This plugin prevents your site from robot's user registering. - <br /> - Required JavaScript working on the vistors browser. - </p> - <p>- bruteforce_overrun_message.php - <br /> - Specify a message for visitors tried wrong passwords more than the specified times. - <br /> - All plugins named *_message.php specifys the message for rejected accesses. - </p> - <p class="even">- precommon_bwlimit_errorlog.php - <br /> - When band width limitaion works unfortunately, this plugin logs it into Apache's error_log. - </p> - <p>All plugins named *_errorlog.php log some informations into Apaches error_log.</p> - <h4 class="odd">Tutorial</h4> - <p class="even">Tutorial coming soon.</p> - <!-- -----Help Content ---------- --> -</div> \ No newline at end of file + All of Post from IP registered in RBL will be rejected. + <br /> + This plugin can slow the performance of Post, especially chat modules. +</p> +<p>- postcommon_post_deny_by_httpbl.php + <br /> + an anti-SPAM plugin. + <br /> + All of Post from IP registered in http:BL will be rejected. + <br /> + Before using it, get HTTPBL_KEY from http://www.projecthoneypot.org/ and set it into the filter file. + <br /> + define( 'PROTECTOR_HTTPBL_KEY' , '............' ) ; +</p> +<p class="even">- postcommon_post_need_multibyte.php + <br /> + an anti-SPAM plugin. + <br /> + Post without multi-byte characters will be rejected. + <br /> + This plugin is only for sites of japanese, tchinese, schinese, and korean. +</p> +<p>- postcommon_post_htmlpurify4guest.php + <br /> + All post data sent by guests will be purified by HTMLPurifier. + <br /> + If you allow guests posting HTML, I strongly recommend you to enable it. +</p> +<p class="even">-postcommon_register_insert_js_check.php + <br /> + This plugin prevents your site from robot's user registering. + <br /> + Required JavaScript working on the vistors browser. +</p> +<p>- bruteforce_overrun_message.php + <br /> + Specify a message for visitors tried wrong passwords more than the specified times. + <br /> + All plugins named *_message.php specifys the message for rejected accesses. +</p> +<p class="even">- precommon_bwlimit_errorlog.php + <br /> + When band width limitaion works unfortunately, this plugin logs it into Apache's error_log. +</p> +<p>All plugins named *_errorlog.php log some informations into Apaches error_log.</p> +<h4 class="odd">Tutorial</h4> +<p class="even">Tutorial coming soon.</p> +<!-- -----Help Content ---------- --> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_advisory.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_advisory.html 2012-05-15 19:21:43 UTC (rev 9517) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_advisory.html 2012-05-15 19:54:50 UTC (rev 9518) @@ -1,6 +1,6 @@ <{includeq file="admin:system|admin_navigation.html"}> <{includeq file="admin:system|admin_tips.html"}> -<table id="xo-advisorylist-sorter" cellspacing="1" class="outer tablesorter"> +<table id="xo-advisorylist-sorter" class="outer tablesorter"> <thead> <tr> <th class="txtcenter width15"><{$smarty.const._AM_ADV_TYPE}></th> @@ -13,12 +13,12 @@ <{foreach item=security from=$security}> <tr class="<{cycle values='even,odd'}>"> <td class="txtcenter"><{$security.type}></td> - <td class="txtcenter"> + <td class="xo-actions txtcenter"> <{if $security.status == '1'}> - <img src="<{xoAdminIcons success.png}>" alt="OK" height="16"/> + <img src="<{xoAdminIcons success.png}>" alt="OK" /> <{/if}> <{if $security.status == '0'}> - <img src="<{xoAdminIcons cancel.png}>" alt="<{$smarty.const._AM_ADV_NOTSECURE}>" height="16"/> + <img src="<{xoAdminIcons cancel.png}>" alt="<{$smarty.const._AM_ADV_NOTSECURE}>"/> <{/if}> <{if $security.status == '-'}> <{$security.status}> @@ -27,7 +27,7 @@ <td class="txtleft"><{$security.info}></td> <td class="xo-actions txtcenter"> <{if $security.text != ''}> - <img class="tooltip" onclick="display_dialog(<{$security.id}>, true, true, 'slide', 'slide', 200, 520);" src="<{xoAdminIcons display.png}>" title="<{$smarty.const._AM_ADV_VIEW}>" alt="<{$smarty.const._AM_ADV_VIEW}>" /> + <img class="xo-tooltip" onclick="display_dialog(<{$security.id}>, true, true, 'slide', 'slide', 200, 520);" src="<{xoAdminIcons display.png}>" title="<{$smarty.const._AM_ADV_VIEW}>" alt="<{$smarty.const._AM_ADV_VIEW}>" /> <{/if}> </td> </tr> @@ -51,7 +51,7 @@ <div class="xo-window-data"> <ul> <li class="black"><strong><{$smarty.const._AM_ADV_CHECKCONTAMI}>:</strong> <a href='<{$uri_contami}>' target='_blank'><{$uri_contami}></a></li> - <br /> + <li> </li> <li class="black"><strong><{$smarty.const._AM_ADV_CHECKISOCOM}>:</strong> <a href='<{$uri_isocom}>' target='_blank'><{$uri_isocom}></a></li> </ul> </div> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_center.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_center.html 2012-05-15 19:21:43 UTC (rev 9517) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_center.html 2012-05-15 19:54:50 UTC (rev 9518) @@ -1,65 +1,17 @@ <{includeq file="admin:system|admin_navigation.html"}> <{includeq file="admin:system|admin_tips.html"}> -<form name='ConfigForm' action='center.php' method='post'> - <{$ticket}> - <input type='hidden' name='action' value='update_ips' /> - <table width="100%" cellspacing="1" cellpadding='4' class="outer"> - <thead> - <tr> - <th colspan="2" class="txtcenter"><{$smarty.const._AM_PROTECTOR_PREFIX}></th> - </tr> - </thead> - <tbody> - <tr valign='top' align='left'> - <td class="txtleft width25 head"> - <{$smarty.const._AM_TH_BADIPS}> - </td> - <td class='even'> - <textarea name='bad_ips' id='bad_ips' style='width:200px' rows="3" cols="150"><{$bad_ips4disp}></textarea> - <br /> - <{$filepath4badips}> - </td> - </tr> - <tr valign='top' align='left'> - <td class="txtleft width25 head"> - <{$smarty.const._AM_TH_GROUP1IPS}> - </td> - <td class='even'> - <textarea name='group1_ips' id='group1_ips' style='width:200px' rows="3" cols="150"><{$group1_ips4disp}></textarea> - <br /> - <{$filepath4group1ips}> - </td> - </tr> - <tr valign='top' align='left'> - <td class='head'> </td> - <td class='even'> - <input type='submit' value='<{$smarty.const._GO}>' /> - </td> - </tr> - </tbody> - </table> +<{includeq file="module:system|system_form.html"}> +<form class="form-inline" name="filter" id="filter" action="center.php" method="get"> + <fieldset> + <select name='num' onchange='submit();'><{$num_options}></select> + <input class="btn" type='submit' value='<{$smarty.const._SUBMIT}>'> + </fieldset> </form> -<form action='center.php' method='get'> - <table width="100%" cellspacing="1" cellpadding='4'> - <tbody> - <tr> - <td align='left'> - <select name='num' onchange='submit();'><{$num_options}></select> - <input type='submit' value='<{$smarty.const._SUBMIT}>' /> - </td> - <td align='right'> - <{$nav_html}> - </td> - </tr> - </tbody> - </table> -</form> - <form name='MainForm' action='center.php' method='post'> <{$ticket}> <input type='hidden' name='action' value='' /> - <table width="100%" cellspacing="1" cellpadding='4' class="outer"> + <table class="outer"> <thead> <tr> <th class="txtcenter width2"> @@ -94,19 +46,19 @@ <tr class="odd"> <td colspan="6" class="txtleft"> <{$smarty.const._AM_LABEL_REMOVE}> - <input type='button' value='<{$smarty.const._AM_BUTTON_REMOVE}>' onclick='if(confirm("<{$smarty.const._AM_JS_REMOVECONFIRM}>")){document.MainForm.action.value="delete"; submit();}' /> + <input class="btn" type='button' value='<{$smarty.const._AM_BUTTON_REMOVE}>' onclick='if(confirm("<{$smarty.const._AM_JS_REMOVECONFIRM}>")){document.MainForm.action.value="delete"; submit();}' /> </td> </tr> </tbody> </table> - <div align='right'> + <div class="floatright"> <{$nav_html}> </div> <br /> <br /> - <div align='right'> - <{$smarty.const._AM_LABEL_COMPACTLOG}><input type='button' value='<{$smarty.const._AM_BUTTON_COMPACTLOG}>' onclick='if(confirm("<{$smarty.const._AM_JS_COMPACTLOGCONFIRM}>")){document.MainForm.action.value="compactlog"; submit();}' /> + <div class="floatright"> + <{$smarty.const._AM_LABEL_COMPACTLOG}> <input class="btn" type='button' value='<{$smarty.const._AM_BUTTON_COMPACTLOG}>' onclick='if(confirm("<{$smarty.const._AM_JS_COMPACTLOGCONFIRM}>")){document.MainForm.action.value="compactlog"; submit();}' /> - <{$smarty.const._AM_LABEL_REMOVEALL}><input type='button' value='<{$smarty.const._AM_BUTTON_REMOVEALL}>' onclick='if(confirm("<{$smarty.const._AM_JS_REMOVEALLCONFIRM}>")){document.MainForm.action.value="deleteall"; submit();}' /> + <{$smarty.const._AM_LABEL_REMOVEALL}> <input class="btn" type='button' value='<{$smarty.const._AM_BUTTON_REMOVEALL}>' onclick='if(confirm("<{$smarty.const._AM_JS_REMOVEALLCONFIRM}>")){document.MainForm.action.value="deleteall"; submit();}' /> </div> </form> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_prefix.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_prefix.html 2012-05-15 19:21:43 UTC (rev 9517) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/templates/admin/protector_prefix.html 2012-05-15 19:54:50 UTC (rev 9518) @@ -7,7 +7,7 @@ <{/if}> <{if $aff_table}> -<table id="xo-advisorylist-sorter" cellspacing="1" class="outer tablesorter"> +<table id="xo-advisorylist-sorter" class="outer tablesorter"> <thead> <tr> <th class="txtcenter width10"><{$smarty.const._AM_PROTECTOR_PREFIX}></th> @@ -28,11 +28,11 @@ <td class="txtcenter"><{$table.count}></td> <td class="txtcenter"><{$table.update}></td> <td class="txtcenter"> - <form action='prefix_manager.php' method='post' style='margin:0px;'> + <form class="form-inline" action='prefix_manager.php' method='post' style='margin:0px;'> <{$table.ticket}> <input type='hidden' name='old_prefix' value='<{$table.prefix}>' /> <input type='text' name='new_prefix' size='8' maxlength='16' /> - <input type='submit' name='copy' value='copy' /> + <input class="btn" type='submit' name='copy' value='copy' /> </form> </td> <td class="txtcenter"> @@ -40,9 +40,9 @@ <{$table.ticket}> <input type='hidden' name='prefix' value='<{$table.prefix}>' /> <{if $table.del}> - <input type='submit' name='delete' value='delete' onclick='return confirm("<{$smarty.const._AM_CONFIRM_DELETE}>")' /> + <input class="btn" type='submit' name='delete' value='delete' onclick='return confirm("<{$smarty.const._AM_CONFIRM_DELETE}>")' /> <{/if}> - <input type='submit' name='backup' value='backup' onclick='this.form.target=\"_blank\"' /> + <input class="btn" type='submit' name='backup' value='backup' onclick='this.form.target="_blank"' /> </form> </td> </tr> @@ -61,7 +61,7 @@ <div class="xo-window-data"> <ul> <li class="black"><{$prefix}></li> - <br /> + <li> </li> <li class="black"><{$prefix_line}></li> </ul> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |