error: can't open file"); $val = file($file); print " $sitename shoutbox
Welcome $wname

$val[9]
$val[8]
$val[7]
$val[6]
$val[5]
$val[4]
$val[3]
$val[2]
$val[1]
$val[0]





View all - Help
$message
"; fclose($fp); } function asteriscos($input){ return $output = str_repeat("*", (strlen($input))); } function filtro($input){ global $badwords; foreach ($badwords as $correct){ $input = str_replace($correct, asteriscos($correct), strtolower($input)); $inputf = ucfirst($input); } return $inputf; } function emoticon($input){ global $smilies; foreach($smilies as $value=>$icon){ $input = str_replace($value, $icon, $input); } return $input; } function makeurl($site, $mail, $name){ if (($site != "http://") && (!empty($site))){ if (($mail != "your@mail.com") && (!empty($mail))){ $namelink = "$name"; $namemailto = "@"; $nametopost = "$namemailto$namelink"; }else{ $namelink = "$name"; $namemailto = "@"; $nametopost = "$namemailto$namelink"; } }else{ if (($mail != "your@mail.com") && (!empty($mail))){ $namemailto = "@"; $namelink = "$name"; $nametopost = "$namemailto$namelink"; }else{ $namelink = "$name"; $namemailto = "@"; $nametopost = "$namemailto$namelink"; } } return $nametopost; } if ($_GET['action'] == "add"){ $validatem = "/[a-zA-Z0-9]+[a-zA-Z-_0-9.]*@[a-zA-Z0-9-]+.[a-zA-Z]{2,3}[.a-zA-Z]*/"; $validateu = "/^((.*?):\/\/)([^\/:]*)(:([^\/]*))?([^\?]*\/?)?(\?(.*))?$/"; $validatea = "/[a-zA-Z0-9]+@{1}([a-zA-Z0-9]+)?/"; $smilies = array(":)" => ":)", ":(" => ":(", ":p" => ":P", ":d" => ":D", ":@" => ":@", ":o" => ":o", ":s" => ":S", ";)" => ";)", "=blush" => "=blush", "=boggle" => "=boggle", "=cool" => "=cool", "=huh" => "=huh", "=notsure" => "=notsure", "=ooh" => "=ooh", "=rolleyes" => "=rolleyes", "=sleep" => "=sleep", "=stress" => "=stress", "=tired" => "=tired", "=urgh" => "=urgh", "=worry" => "=worry"); $_POST['name'] = strip_tags($_POST['name'], ""); $_POST['name'] = ucfirst (strtolower($_POST['name'])); $_POST['mensaje'] = strip_tags($_POST['mensaje'], ""); $_POST['mensaje'] = filtro($_POST['mensaje']); $_POST['site'] = strip_tags($_POST['site'], ""); $_POST['site'] = strtolower($_POST['site']); $_POST['email'] = strip_tags($_POST['email'], ""); $_POST['email'] = strtolower($_POST['email']); if (($_POST['name'] == "name") || ($_POST['name'] == "Name") || (empty($_POST['name']))){ $message = "Enter name"; $url = $_POST['site']; $pemail = $_POST['email']; $posted = $_POST['mensaje']; form(); } elseif (in_array($_POST['name'], $admin)){ $message = "Only Admin can post under $_POST[name] nick"; $url = $_POST['site']; $pemail = $_POST['email']; $posted = $_POST['mensaje']; form(); } elseif (preg_match($validatea, $_POST['name'])){ $veradmin = explode("@", $_POST['name']); if (in_array($veradmin[0], $admin)){ if (($veradmin[1] != $password) || (empty($veradmin[1]))){ $message= "Password incorrect"; $url = $_POST['site']; $pemail = $_POST['email']; $posted = $_POST['mensaje']; form(); }else{ $_POST['name'] = "$veradmin[0]"; if ($_POST['mensaje'] == "Message"){ $message = "Enter message"; $url = $_POST['site']; $pemail = $_POST['email']; $pname = $_POST['name']; form(); } elseif (empty($_POST['mensaje'])){ $message = "Enter message"; $url = $_POST['site']; $pemail = $_POST['email']; $pname = $_POST['name']; form(); } elseif ($maxchar <= strlen($_POST['mensaje'])){ $message = "Message must be less than $maxchar chars"; $url = $_POST['site']; $pemail = $_POST['email']; $pname = $_POST['name']; form(); } elseif ((!empty($_POST['email'])) && (!preg_match($validatem, $_POST['email']))){ $message = "Enter valid email or left the field empty"; $url = $_POST['site']; $pname = $_POST['name']; $posted = $_POST['mensaje']; form(); } elseif ((!empty($_POST['site'])) && (!preg_match($validateu, $_POST['site']))){ $message = "Url must start with http:// or
left the field empty"; $url = "http://"; $pemail = $_POST['email']; $pname = $_POST['name']; $posted = $_POST['mensaje']; form(); }else{ $file = "dataflood.db"; if (file_exists($file)){ $fp = fopen($file, "r+") or die("error: can't open file"); $read = fread($fp, filesize($file)); rewind($fp); $cookiename=$_POST['name']; $cookieurl=$_POST['site']; $cookiemail=$_POST['email']; setcookie("flood_name", "$cookiename", time()+7776000); setcookie("flood_site", "$cookieurl", time()+7776000); setcookie("flood_email", "$cookiemail", time()+7776000); $nametopost = makeurl($_POST['site'], $_POST['email'], $_POST['name']); $_POST['mensaje'] = wordwrap($_POST['mensaje'], $maxlenword, " ", 1); $_POST['mensaje'] = emoticon($_POST['mensaje']); $_POST['mensaje'] = stripslashes($_POST['mensaje']); $write = fwrite($fp, "::$nametopost: $_POST[mensaje]\n".$read); fclose($fp); print ""; }else{ print "error: dataflood.db must be in the same dir than this script"; } } } }else{ $message = "Bad admin name"; $url = $_POST['site']; $pemail = $_POST['email']; $posted = $_POST['mensaje']; form(); } } elseif ($namemaxchar <= strlen($_POST['name'])){ $message = "Username must be less than $namemaxchar chars"; $url = $_POST['site']; $pemail = $_POST['email']; $posted = $_POST['mensaje']; form(); } elseif (($_POST['mensaje'] == "Message") || (empty($_POST['mensaje'])) || ($_POST['mensaje'] == "message")){ $message = "Enter message"; $url = $_POST['site']; $pemail = $_POST['email']; $pname = $_POST['name']; form(); } elseif ($maxchar+1 <= strlen($_POST['mensaje'])){ $message = "Message must be less than $maxchar chars"; $url = $_POST['site']; $pemail = $_POST['email']; $pname = $_POST['name']; form(); } elseif ((!empty($_POST['email'])) && (!preg_match($validatem, $_POST['email']))){ $message = "Enter valid email or left the field empty"; $url = $_POST['site']; $pname = $_POST['name']; $posted = $_POST['mensaje']; form(); } elseif ((!empty($_POST['site'])) && (!preg_match($validateu, $_POST['site']))){ $message = "Url must start with http:// or
left the field empty"; $url = "http://"; $pemail = $_POST['email']; $pname = $_POST['name']; $posted = $_POST['mensaje']; form(); }else{ if ((!empty($_COOKIE['flood_anti'])) && (time() - $_COOKIE['flood_anti'] <= $floodtime)){ $message = "The time allowed between posts is: $floodtime seconds"; $pname = $_POST['name']; $wname = $_POST['name']; $url = $_POST['site']; $pemail = $_POST['email']; $posted = $_POST['mensaje']; form(); }else{ $file = "dataflood.db"; if (file_exists($file)){ $fp = fopen($file, "r+") or die("error: can't open file"); $read = fread($fp, filesize($file)); rewind($fp); $cookiename=$_POST['name']; $cookieurl=$_POST['site']; $cookiemail=$_POST['email']; setcookie("flood_name", "$cookiename", time()+7776000); setcookie("flood_site", "$cookieurl", time()+7776000); setcookie("flood_email", "$cookiemail", time()+7776000); setcookie("flood_anti", time(), time()+3600); $nametopost = makeurl($_POST['site'], $_POST['email'], $_POST['name']); $_POST['mensaje'] = wordwrap($_POST['mensaje'], $maxlenword, " ", 1); $_POST['mensaje'] = emoticon($_POST['mensaje']); $_POST['mensaje'] = stripslashes($_POST['mensaje']); $write = fwrite($fp, "::$nametopost: $_POST[mensaje]\n".$read); fclose($fp); print ""; }else{ print "error: dataflood.db must be in the same dir than this script"; } } } }elseif ($_GET['action'] == "viewall"){ $file = "dataflood.db"; $fp = fopen($file, "r") or die("error: can't open file"); $val = file($file); $valr = array_reverse($val); $todos = sizeof($valr); if ((isset($_COOKIE['flood_name'])) && ($_COOKIE['flood_name'] != "")){ $waname = $_COOKIE['flood_name']; }else{ $waname = "Guest!"; } print " Flood-all
Welcome $waname

"; $i=-1; while($i < $todos){ $i++; print ""; $i++; print""; } print "
$valr[$i]
$valr[$i]


[Floodbox v1.0]

"; fclose($fp); }elseif ($_GET['action'] == "help"){ print " floodbox v1.0 help
FLOODHELP

Where can I download this shoutbox ?

In the website floodboy.net

How can I post smilies in my messages ?

Very easy, when you write:
:) will be replaced with :)

When your write:
=ooh will be replaced with =ooh

Here is a list with all the smilies available:


:) :)
:( :(
:p :p
:D :D
:@ :@
:o :o
:S :S
;) ;)
=blush =blush
=boggle =boggle
=cool =cool
=huh =huh
=notsure =notsure
=ooh =ooh
=rolleyes =rolleyes
=sleep =sleep
=stress =stress
=tired =tired
=urgh =urgh
=worry =worry


Need more help ?

Questions, hacks, bugs, requests, comments go to the floodbox board at floodboy.net/board/

"; }else{ if (isset($_COOKIE['flood_name'])){ if ($_COOKIE['flood_name'] == ""){ $wname = "Guest!"; $pname = "name"; $pemail="your@mail.com"; $url="http://"; }else{ if ((empty($_COOKIE['flood_site'])) || ($_COOKIE['flood_site'] == "")){ if ((empty($_COOKIE['flood_email'])) || ($_COOKIE['flood_email'] == "")){ $wname = $_COOKIE['flood_name']; $pname = $_COOKIE['flood_name']; $url = "http://"; $pemail = "your@mail.com"; }else{ $wname = $_COOKIE['flood_name']; $pname = $_COOKIE['flood_name']; $url = "http://"; $pemail = $_COOKIE['flood_email']; } }else{ if ((empty($_COOKIE['flood_email'])) || ($_COOKIE['flood_email'] == "")){ $wname = $_COOKIE['flood_name']; $pname = $_COOKIE['flood_name']; $url = $_COOKIE['flood_site']; $pemail = "your@mail.com"; }else{ $wname = $_COOKIE['flood_name']; $pname = $_COOKIE['flood_name']; $url = $_COOKIE['flood_site']; $pemail = $_COOKIE['flood_email']; } } } }else{ $wname = "Guest!"; $pname = "name"; $pemail="your@mail.com"; $url="http://"; } $message=""; $posted="message"; form(); } ?>