<?php
/**
- * NP_Blacklist(JP) ($Revision: 1.7 $)
+ * NP_Blacklist(JP) ($Revision: 1.8 $)
* by hsur ( http://blog.cles.jp/np_cles )
- * $Id: NP_Blacklist.php,v 1.7 2007-02-06 16:15:37 hsur Exp $
+ * $Id: NP_Blacklist.php,v 1.8 2007-02-11 08:57:12 hsur Exp $
*
* Based on NP_Blacklist 0.98
* by xiffy
return 'http://blog.cles.jp/np_cles/category/31/subcatid/11';
}
function getVersion() {
- return '1.0.1';
+ return '1.0.2';
}
function getDescription() {
- return '[$Revision: 1.7 $]<br />'.NP_BLACKLIST_description;
+ return '[$Revision: 1.8 $]<br />'.NP_BLACKLIST_description;
}
function supportsFeature($what) {
switch ($what) {
break;
case 'htaccess':
+ $type = '';
if (isset ($_POST["type"])) {
- $type = (strpos(postVar("type"), "blocked") !== false) ? 'ip' : 'rules';
+ $type = (strpos(postVar("type"), "ip") !== false) ? 'ip' : 'rules';
}
- if (stristr(postVar("type"), "reset")) {
+ if (strpos(postVar("type"), "reset") !== false ) {
$tplVars['message'] = pbl_resetfile($type);
}
$tplVars['snippet'] = pbl_htaccess($type);
<span style="color: red;">{{message}}</span>
<h2>Here you can generate .htaccess snippets</h2>
<div class="pbform" style="margin-left:10px;">
- <form action="{{indexurl}}" method="post">
+ <form action="{{indexurl}}" method="post" style="display:inline">
<input type="hidden" name="ticket" value="{{ticket|}}" />
<input type="hidden" name="action" value="htaccess" />
- <button type="submit" label="ip" name="type" value="Generate blocked IP's">Generate blocked IP's</button>
- <button type="submit" label="ip" name="type" value="Generate rewrite rules">Generate rewrite rules</button><br />
+ <input type="hidden" name="type" value="generate_ip" />
+ <input type="submit" name="submit" value="Generate blocked IP's" />
+ </form>
+ <form action="{{indexurl}}" method="post" style="display:inline">
+ <input type="hidden" name="ticket" value="{{ticket|}}" />
+ <input type="hidden" name="action" value="htaccess" />
+ <input type="hidden" name="type" value="generate_rule" />
+ <input type="submit" name="submit" value="Generate rewrite rules" />
+ </form>
+ <br />
<br />
<textarea class="pbltextinput" cols="60" rows="15" name="snippet" >{{snippet}}</textarea><br />
<br />
- <button type="submit" label="ip" name="type" value="Reset blocked IP's">Reset blocked IP's</button>
- <button type="submit" label="ip" name="type" value="Reset rewrite rules">Reset rewrite rules</button>
+ <form action="{{indexurl}}" method="post" style="display:inline">
+ <input type="hidden" name="ticket" value="{{ticket|}}" />
+ <input type="hidden" name="action" value="htaccess" />
+ <input type="hidden" name="type" value="reset_ip" />
+ <input type="submit" name="submit" value="Reset blocked IP's" />
+ </form>
+ <form action="{{indexurl}}" method="post" style="display:inline">
+ <input type="hidden" name="ticket" value="{{ticket|}}" />
+ <input type="hidden" name="action" value="htaccess" />
+ <input type="hidden" name="type" value="reset_rule" />
+ <input type="submit" name="submit" value="Reset rewrite rules" />
</form>
</div>
<span style="color: red;">{{message}}</span>
<h2>.htaccess¥Õ¥¡¥¤¥ë¤ÎÀ¸À®</h2>
<div class="pbform" style="margin-left:10px;">
- <form action="{{indexurl}}" method="post">
+ <form action="{{indexurl}}" method="post" style="display:inline">
<input type="hidden" name="ticket" value="{{ticket|}}" />
<input type="hidden" name="action" value="htaccess" />
- <button type="submit" label="ip" name="type" value="Generate blocked IP's">IP¥ë¡¼¥ë¤ÎÀ¸À®</button>
- <button type="submit" label="ip" name="type" value="Generate rewrite rules">Rewrite¥ë¡¼¥ë¤ÎÀ¸À®</button><br />
+ <input type="hidden" name="type" value="generate_ip" />
+ <input type="submit" name="submit" value="IP¥ë¡¼¥ë¤ÎÀ¸À®" />
+ </form>
+ <form action="{{indexurl}}" method="post" style="display:inline">
+ <input type="hidden" name="ticket" value="{{ticket|}}" />
+ <input type="hidden" name="action" value="htaccess" />
+ <input type="hidden" name="type" value="generate_rule" />
+ <input type="submit" name="submit" value="Rewrite¥ë¡¼¥ë¤ÎÀ¸À®" />
+ </form>
+ <br />
<br />
<textarea class="pbltextinput" cols="60" rows="15" name="snippet" >{{snippet}}</textarea><br />
<br />
- <button type="submit" label="ip" name="type" value="Reset blocked IP's">IP¥Ö¥é¥Ã¥¯¥ê¥¹¥È¤Î¥ê¥»¥Ã¥È</button>
- <button type="submit" label="ip" name="type" value="Reset rewrite rules">Rewrite¥ë¡¼¥ë¤Î¥ê¥»¥Ã¥È</button>
+ <form action="{{indexurl}}" method="post" style="display:inline">
+ <input type="hidden" name="ticket" value="{{ticket|}}" />
+ <input type="hidden" name="action" value="htaccess" />
+ <input type="hidden" name="type" value="reset_ip" />
+ <input type="submit" name="submit" value="IP¥Ö¥é¥Ã¥¯¥ê¥¹¥È¤Î¥ê¥»¥Ã¥È" />
+ </form>
+ <form action="{{indexurl}}" method="post" style="display:inline">
+ <input type="hidden" name="ticket" value="{{ticket|}}" />
+ <input type="hidden" name="action" value="htaccess" />
+ <input type="hidden" name="type" value="reset_rule" />
+ <input type="submit" name="submit" value="Rewrite¥ë¡¼¥ë¤Î¥ê¥»¥Ã¥È" />
</form>
-</div>
+</div>
\ No newline at end of file
<span style="color: red;">{{message}}</span>
<h2>.htaccessファイルの生成</h2>
<div class="pbform" style="margin-left:10px;">
- <form action="{{indexurl}}" method="post">
+ <form action="{{indexurl}}" method="post" style="display:inline">
<input type="hidden" name="ticket" value="{{ticket|}}" />
<input type="hidden" name="action" value="htaccess" />
- <button type="submit" label="ip" name="type" value="Generate blocked IP's">IPルールの生成</button>
- <button type="submit" label="ip" name="type" value="Generate rewrite rules">Rewriteルールの生成</button><br />
+ <input type="hidden" name="type" value="generate_ip" />
+ <input type="submit" name="submit" value="IPルールの生成" />
+ </form>
+ <form action="{{indexurl}}" method="post" style="display:inline">
+ <input type="hidden" name="ticket" value="{{ticket|}}" />
+ <input type="hidden" name="action" value="htaccess" />
+ <input type="hidden" name="type" value="generate_rule" />
+ <input type="submit" name="submit" value="Rewriteルールの生成" />
+ </form>
+ <br />
<br />
<textarea class="pbltextinput" cols="60" rows="15" name="snippet" >{{snippet}}</textarea><br />
<br />
- <button type="submit" label="ip" name="type" value="Reset blocked IP's">IPブラックリストのリセット</button>
- <button type="submit" label="ip" name="type" value="Reset rewrite rules">Rewriteルールのリセット</button>
+ <form action="{{indexurl}}" method="post" style="display:inline">
+ <input type="hidden" name="ticket" value="{{ticket|}}" />
+ <input type="hidden" name="action" value="htaccess" />
+ <input type="hidden" name="type" value="reset_ip" />
+ <input type="submit" name="submit" value="IPブラックリストのリセット" />
+ </form>
+ <form action="{{indexurl}}" method="post" style="display:inline">
+ <input type="hidden" name="ticket" value="{{ticket|}}" />
+ <input type="hidden" name="action" value="htaccess" />
+ <input type="hidden" name="type" value="reset_rule" />
+ <input type="submit" name="submit" value="Rewriteルールのリセット" />
</form>
-</div>
+</div>
\ No newline at end of file