[ Index ] |
|
Code source de GeekLog 1.4.1 |
1 <?php 2 3 /** 4 * File: EditIPofURL.Admin.class.php 5 * This is the Edit IPBlacklist Module for the Geeklog Spam-X plugin 6 * 7 * Copyright (C) 2004-2006 by the following authors: 8 * Author Tom Willett tomw AT pigstye DOT net 9 * Dirk Haun dirk AT haun-online DOT de 10 * 11 * Licensed under GNU General Public License 12 * 13 * $Id: EditIPofURL.Admin.class.php,v 1.5 2006/09/02 14:22:26 dhaun Exp $ 14 */ 15 16 if (strpos ($_SERVER['PHP_SELF'], 'EditIPofURL.Admin.class.php') !== false) { 17 die ('This file can not be used on its own!'); 18 } 19 20 /** 21 * IP of URL Black List Editor 22 */ 23 24 require_once ($_CONF['path'] . 'plugins/spamx/BaseAdmin.class.php'); 25 26 class EditIPofUrl extends BaseAdmin { 27 /** 28 * Constructor 29 */ 30 function display() 31 { 32 global $_CONF, $_TABLES, $LANG_SX00; 33 34 $action = ''; 35 if (isset ($_GET['action'])) { 36 $action = COM_applyFilter ($_GET['action']); 37 } else if (isset ($_POST['paction'])) { 38 $action = COM_applyFilter ($_POST['paction']); 39 } 40 41 $entry = ''; 42 if (isset ($_GET['entry'])) { 43 $entry = COM_stripslashes ($_GET['entry']); 44 } else if (isset ($_POST['pentry'])) { 45 $entry = COM_stripslashes ($_POST['pentry']); 46 } 47 48 if ($action == 'delete') { 49 $entry = addslashes ($entry); 50 $result = DB_query ("DELETE FROM {$_TABLES['spamx']} WHERE name = 'IPofUrl' AND value = '$entry'"); 51 } elseif ($action == $LANG_SX00['addentry']) { 52 if (!empty ($entry)) { 53 $entry = addslashes ($entry); 54 $result = DB_query ("INSERT INTO {$_TABLES['spamx']} VALUES ('IPofUrl', '$entry')"); 55 } 56 } 57 58 $display = '<hr>' . LB . '<p><b>'; 59 $display .= $LANG_SX00['ipofurlblack']; 60 $display .= '</b></p>' . LB . '<ul>' . LB; 61 $result = DB_query ("SELECT value FROM {$_TABLES['spamx']} WHERE name = 'IPofUrl'"); 62 $nrows = DB_numRows ($result); 63 for ($i = 0; $i < $nrows; $i++) { 64 list($e) = DB_fetchArray ($result); 65 $display .= '<li><a href="' . $_CONF['site_admin_url'] . '/plugins/spamx/index.php?command=EditIPofUrl&action=delete&entry=' . urlencode ($e) . '">' . htmlspecialchars ($e) . '</a></li>' . LB; 66 } 67 $display .= '</ul>' . LB . '<p>' . $LANG_SX00['e1'] . '</p>' . LB; 68 $display .= '<p>' . $LANG_SX00['e2'] . '</p>' . LB; 69 $display .= '<form method="POST" action="' . $_CONF['site_admin_url'] . '/plugins/spamx/index.php?command=EditIPofUrl">'; 70 $display .= '<input type="text" size ="30" name="pentry"> '; 71 $display .= '<input type="submit" name="paction" value="' . $LANG_SX00['addentry'] . '">' . LB; 72 $display .= '</form>' . LB; 73 74 return $display; 75 } 76 77 function link() 78 { 79 return 'Edit IP of URL Blacklist'; 80 } 81 } 82 83 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Wed Nov 21 12:27:40 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |