PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
real-time
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my settings
my profile
Public Pastes
xcxcxc
9 sec ago
Untitled
15 sec ago
Untitled
16 sec ago
AAAAHAHAHAHAH
19 sec ago
DIABLO 3 BETA Key ...
44 sec ago
iphone - change po...
22 sec ago
Adobe CS5 Ultimate...
30 sec ago
Hover Div System
28 sec ago
New Paste
==iNFO== Mod Name: Advanced Blacklist Mod Version: BETA Mod Author: bheesham Mod Description: A better blacklist. Mod Notes: Okay, instead of that hard to understand text... I'm just going to type it out so that normal people can understand it. XD ==/iNFO== ==iNSTaLL== K, now then. Here's the code for admin_whitelist(); ==CODE== function admin_whitelist() { $bwurl = $_POST['bwurl']; $bwsub = $_POST['bwsub']; $remove = $_POST['remove']; if($bwsub) { if($bwurl) { @mysql_query("INSERT INTO wcddl_whitelist VALUES ('".mysql_real_escape_string($bwurl)."')"); echo 'URL has been whitelisted.'; } if($remove) { $fishpan = 0; foreach($remove as $url) { mysql_query("DELETE FROM wcddl_whitelist WHERE url = '".mysql_real_escape_string($url)."'"); $fishpan++; } echo $fishpan.' sites were Removed from the whitelist.'; } } echo '<form action="" method="post"><table width="100%"> <tr><td>URL</td><td align="right">Remove</td></tr>'; $get = mysql_query("SELECT url FROM wcddl_whitelist"); while($row = mysql_fetch_assoc($get)) { echo '<tr><td><a href="http://'.$row['url'].'" target="_blank">'.$row['url'].'</a></td><td align="right"><input type="checkbox" name="remove[]" value="'.$row['url'].'"></td></tr>'; } echo '<tr><td colspan="2" align="right"><input type="submit" value="Remove Selected" name="bwsub"></td></tr> </table></form><br> <form action="" method="post"><table width="100%"> <tr><td align="center">whitelist an URL</td></tr> <tr><td align="center">DO NOT INCLUDE WWW., HTTP:// or a directory! ONLY THE HOST NAME<br><input type="text" name="bwurl"></td></tr> <tr><td align="center"><input type="submit" value="whitelist" name="bwsub"></td></tr></table></form>'; } ==/CODE= Now then. here is the code for admin_blacklist(); ==CODE== function admin_blacklist() { echo <<<TMP <a href="?go=blacklist&add">Add site to blacklist</a><br><br> <a href="?go=blacklist&view">View the blacklist</a><br><br> TMP; if (isset($_GET['add'])) { if (isset($_POST['addblacklist']) && !empty($_POST['blurl']) && !empty($_POST['blreason'])) { $blurl = $_POST['blurl']; $blurl = purl(str_replace("www.","",$blurl),"host"); $blurl = htmlentities($blurl); $blurl = addslashes($blurl); $blurl = strtolower($blurl); $blreason = $_POST['blreason']; $blreason = str_replace("\r\n", '<br />', $blreason); $blreason = str_replace("\n", '<br />', $blreason); $blreason = str_replace("\r", '<br />', $blreason); $blreason = addslashes($blreason); $time = time(); if (!empty($blurl)) { $exists = mysql_query('SELECT * FROM wcddl_blacklist WHERE url="'.addslashes($blurl).'"'); if (mysql_num_rows($exists)==0) { mysql_query('INSERT INTO wcddl_blacklist (url,date,reason) VALUES ("'.$blurl.'", "'.$time.'", "'.$blreason.'")'); $sid = mysql_query("SELECT id FROM wcddl_sites WHERE url = '".mysql_real_escape_string($blurl)."'"); $sid = mysql_result($sid,"id"); mysql_query("DELETE FROM wcddl_downloads WHERE sid = '".mysql_real_escape_string($sid)."'"); mysql_query("DELETE FROM wcddl_queue WHERE sid = '".mysql_real_escape_string($sid)."'"); echo $blurl.' has been added to the blacklist for:<br> '. stripslashes($blreason) . '<br><br><br>'; } else { echo "$blurl is already blacklisted.<br><br><br>"; } } else { echo "ERROR! Please take a look at the URL again... make sure that it has the HTTP:// in front of it.<br><br><br>"; } } echo <<<TMP <form action="" method="post"> <small>Site URL (You need to add the HTTP:// infront, the script will validate it):<small><br> <input type="text" name="blurl" /><br><br> <small>Reason (HTML is allowed. Just dont use \'s):</small><br> <textarea name="blreason" style="width: 50%;" rows="10"></textarea><br><br> <input type="submit" name="addblacklist"> </form> TMP; echo '<br /><br />'; echo 'Quick BL<br /><br />'; echo ' <p style="float: left;"> No link back<br /> <textarea cols="5" rows="5" onfocus="this.select();">You do not link back to <a href="index.php">File Empire</a>. You <strong>MUST</strong> link back to us. Get the code <a href="submit.php">here</a>. <br /> Be sure to read the <a href="submit.php">Rules</a> carefully. </textarea> </p> <p style="float: right;"> Down or not funtioning<br /> <textarea cols="5" rows="5" onfocus="this.select();">Your site is either down or not functioning properly. Email the webmaster when the issue has been resolved. <br /> Be sure to read the <a href="submit.php">Rules</a> carefully.</textarea> </p> <br /> <p style="float: left;"> Spam<br /> <textarea cols="5" rows="5" onfocus="this.select();">Your site has submitted spam. <br /> Be sure to read the <a href="submit.php">Rules</a> carefully.</textarea> </p> <p style="float: right;"> Does not exist<br /> <textarea cols="5" rows="5" onfocus="this.select();">The site does not exist. <br /> Be sure to read the <a href="submit.php">Rules</a> carefully.</textarea> </p> <p style="float: left"> Duplicate Site<br /> <textarea cols="5" rows="5" onfocus="this.select();">This is a duplicate of another site. <br /> Be sure to read the <a href="submit.php">Rules</a> carefully.</textarea> </p> <p style="float: right"> Does not link directly to download page.<br /> <textarea cols="5" rows="5" onfocus="this.select();">You do not link directly to the download page. <br /> Be sure to read the <a href="submit.php">Rules</a> carefully.</textarea> </p> <p style="float: left"> Submits duplicate downloads<br /> <textarea cols="5" rows="5" onfocus="this.select();">You submit duplicate downloads. <br /> Be sure to read the <a href="submit.php">Rules</a> carefully.</textarea> </p> '; } if (isset($_GET['view'])) { if (isset($_POST['delete'])) { mysql_query('DELETE FROM wcddl_blacklist WHERE id="'.$_POST['delete'].'"'); echo 'Deleted site with ID ' . $_POST['delete'] . ' the blacklist.'; } if (isset($_POST['edit'])) { echo '<form action="" method="post">'; $getble = mysql_query('SELECT * FROM wcddl_blacklist WHERE id="'.$_POST['edit'].'"'); if (mysql_num_rows($getble) == 1) { while($dude = mysql_fetch_assoc($getble)) { echo <<<TMP <input type="hidden" name="id" value="{$dude[id]}"><br> <small>Site URL (Include the HTTP:// again please):</small><br> <input type="text" name="blurl" value="http://{$dude[url]}" /><br> <small>Reason (NO HTML just BBCode!)</small><br> <textarea name="blreason" style="width: 50%;" rows="10">{$dude[reason]}</textarea><br><br> TMP; } } echo '<input type="submit" name="fined" value="Finish Editing" />'; echo '</form>'; } $getbl = mysql_query('SELECT * FROM wcddl_blacklist ORDER BY id DESC'); if (mysql_num_rows($getbl) != 0) { echo '<form action="" method="post"><table style="width: 100%;">'; echo '<tr><td style="width: 50%;">URL - Date</td><td style="width: 25%;">DELETE</delete></tr>'; while($bl = mysql_fetch_assoc($getbl)) { $date = date('d-m-Y', $bl[date]); echo <<<TMP <tr> <td><a href="http://{$bl[url]}">{$bl[url]} - {$date}</td> <td><input type="submit" name="delete" value="{$bl[id]}" style="width: 100%;" /></td> </tr> TMP; } echo '</table></form>'; } else { echo "No sites in blacklist"; } } } ==/CODE== And yes, You replace the old code with the new codes above. Now then. If you DO NOT have any sites in your blacklist... then you can use this code. ==CODE== SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS `wcddl_blacklist`; CREATE TABLE `wcddl_blacklist` ( `id` int(11) NOT NULL auto_increment, `url` varchar(255) NOT NULL, `date` varchar(255) NOT NULL, `reason` mediumtext NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; ==/CODE== If you already have a blacklist... then you'll have to insert each URL in with this query... Later on there may be an easier way... but I doubt it cuz i have other stuff i want to code. ==CODE== INSERT INTO wcddl_blacklist (url,date,reason) VALUES ('[SITE URL]', '1255541430', "[REASON]") ==/CODE== When you're inserting sites... make sure that there is NO trailing slashes OR http://www. OR http:// in them. So if You wanted to blacklist lets say... http://www.warezcoders.com/forum OR <-- Yes.. there is an alternative. You can copy all of the URL's that you blacklisted already into a text file, then use the admin panel of the BlackList to add them. A lot faster. A lot easier. If you have too much sites in your blacklist then.. its gunna be a long day for you if you really want to use it. You would actually put just warezcoders.com get it? if you dont, read it over again. Well... now its time to show the user the blacklist. Or else this would kind of been useless. Here is the code for that. Make sure tht you include funcs.php ==CODE== <form action="" method="post"> <p> Site URL (http:// is required): <input type="text" name="blurl" value="http://" /> <input type="submit" name="blsear" /> </p> </form> <table style="width: 100%;"> <tbody> <tr> <th style="width: 30%">URL</th> <th style="width: 70%">Reason & Date</th> </tr> <?php $where = null; if (isset($_POST['blsear'])) { $blurl = $_POST['blurl']; $blurl = purl(str_replace("www.","",$blurl),"host"); $blurl = htmlentities($blurl); $blurl = addslashes($blurl); $blurl = strtolower($blurl); if (!empty($blurl)) { $where = ' WHERE url LIKE "%'.$blurl.'%"'; } } $getbl = mysql_query('SELECT * FROM wcddl_blacklist '.$where.' ORDER BY id DESC LIMIT 50'); $alternate = 0; if (mysql_num_rows($getbl) != 0) { while($inf = mysql_fetch_assoc($getbl)) { if ($alternate == 0) { echo '<tr>'; $alternate = 1; } else { echo '<tr>'; $alternate = 0; } $reason = stripslashes($inf['reason']); $reason = str_replace(' />', '>', $reason); $reason = str_replace('<br><br>', '<br>', $reason); $date = date('d-m-Y', $inf['date']); echo <<<TMP <td style="border-bottom: 2px solid;">{$inf['url']}</td> <td style="border-bottom: 2px solid;"><p>$reason <br>Blacklisted on: $date</p></td> </tr> TMP; } } else { echo '<tr><td style="color: #FFF;" colspan="2">No search met your criteria.</td></tr>'; } ?> </tbody> </table> ==/CODE== O, it would be great if you could link back to my site. http://file-empire.com/ if you dont... then don't expect me to give any support. ==/iNSTaLL== ==MaNuaL iNSTRuCTiONS== None. Just try to link back to http://file-empire.com on your website. ==/MaNuaL iNSTRuCTiONS==
Optional Paste Settings
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
HTML 5
Java
JavaScript
Lua
None
Perl
PHP
Python
Rails
-------------
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
ActionScript
ActionScript 3
Ada
ALGOL 68
Apache Log
AppleScript
APT Sources
ASM (NASM)
ASP
autoconf
Autohotkey
AutoIt
Avisynth
Awk
BASCOM AVR
Bash
Basic4GL
BibTeX
Blitz Basic
BNF
BOO
BrainFuck
C
C for Macs
C Intermediate Language
C#
C++
C++ (with QT extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
ChaiScript
Clojure
Clone C
Clone C++
CMake
COBOL
CoffeeScript
ColdFusion
CSS
Cuesheet
D
DCS
Delphi
Delphi Prism (Oxygene)
Diff
DIV
DOS
DOT
E
ECMAScript
Eiffel
Email
EPC
Erlang
F#
Falcon
FO Language
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
Game Maker
GDB
Genero
Genie
GetText
Go
Groovy
GwBasic
Haskell
HicEst
HQ9 Plus
HTML
HTML 5
Icon
IDL
INI file
Inno Script
INTERCAL
IO
J
Java
Java 5
JavaScript
jQuery
KiXtart
Latex
Liberty BASIC
Linden Scripting
Lisp
LLVM
Loco Basic
Logtalk
LOL Code
Lotus Formulas
Lotus Script
LScript
Lua
M68000 Assembler
MagikSF
Make
MapBasic
MatLab
mIRC
MIX Assembler
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MPASM
MXML
MySQL
newLISP
None
NullSoft Installer
Oberon 2
Objeck Programming Langua
Objective C
OCalm Brief
OCaml
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
Pascal
PAWN
PCRE
Per
Perl
Perl 6
PHP
PHP Brief
Pic 16
Pike
Pixel Bender
PL/SQL
PostgreSQL
POV-Ray
Power Shell
PowerBuilder
ProFTPd
Progress
Prolog
Properties
ProvideX
PureBasic
PyCon
Python
q/kdb+
QBasic
R
Rails
REBOL
REG
Robots
RPM Spec
Ruby
Ruby Gnuplot
SAS
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
SQL
SystemVerilog
T-SQL
TCL
Tera Term
thinBasic
TypoScript
Unicon
UnrealScript
Vala
VB.NET
VeriLog
VHDL
VIM
Visual Pro Log
VisualBasic
VisualFoxPro
WhiteSpace
WHOIS
Winbatch
XBasic
XML
Xorg Config
XPP
YAML
Z80 Assembler
ZXBasic
Paste Expiration:
Never
10 Minutes
1 Hour
1 Day
1 Month
Paste Exposure:
Public
Unlisted
Private (members only)
Paste Name / Title:
Hello
Guest
Sign Up
or
Login
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login