please wait"; $lang_exit="Logout"; /////////////////////////////////////////////////////////////////////////// // CONFIGURATION ENDS HERE /////////////////////////////////////////////////////////////////////////// /////////////[DO NOT EDIT AFTER THIS LINE]//////////////////////////////// $mess=replace($mess); $nick=nick_replace($nick); $nick=substr(trim($nick),0,15); global $nick; ///////////IF Nickname is shorter than 3 chars retur an error message and let the user relogin////////// if($nick !='' && strlen($nick)<3){$gum=""; $login_error_message.='Nickname is to short, it has to be longer than 3 chars, also avoid special chars in nickname. Allowed chars: A-Z, a-z, 0-9, - _ @
'; } $G=nick_replace(substr(trim($G),0,1)); $A=nick_replace(substr(trim($A),0,2)); $room=replace($room); header("Content-type: text/vnd.wap.wml; charset=$encoding"); header("Cache-Control: no-store, no-cache, must-revalidate"); print ""; echo ""; ?> "; echo "

watch sexy videos at nza-vids!
"; echo "\"GumChat\"/
"; echo $login_error_message; $n = 0; $files = ''; if ($handle = opendir("rooms/")) { while (false !== ($file = readdir($handle))) { if($file != '.' && $file != '..' && $file != 'files'&& $file != 'cgi-bin'&& $file != 'chat') { if($n >= 0 && $n < 20){ $onfile=file("online/on$file"); $counts=count($onfile); if($counts<2){ $gumdata = explode(":",$onfile[0]); $ablaufzeit = time()-"250"; if($gumdata[0]<=$ablaufzeit){ $fp = fopen("online/on$file","w+"); $counts=0; } } $total=$total+$counts; $n++; } } } closedir($handle); } echo "$total $lang_user_in_chat!
"; echo "$lang_nickname
"; echo $lang_gender.'
'; echo"$lang_age
"; echo $lang_show_smilies.'
'; echo "$lang_enter"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
[xhtml] [wml]
$home_page_title"; echo "
(c) GumSlone 2004-2008
GumChat v 1.7

"; echo ""; } if ($gum=="rooms") { echo ""; echo ""; echo "

"; $nick = ereg_replace(" ", "_", $nick); if(preg_match("/[^\da-zA-Z-@_]+/", $nick)||$nick=="") $error='Not suported chars in Nickname!
'; if(empty($error)){ if($WLC)echo "Welcome to chat $nick
"; echo "$lang_select_chatroom
"; $n = 0; $files = ''; if ($handle = opendir("rooms/")) { while (false !== ($file = readdir($handle))) { if($file != '.' && $file != '..' && $file != 'files'&& $file != 'cgi-bin'&& $file != 'chat') { if($n >= 0 && $n < 20){ $onfile=file("online/on$file"); $counts=count($onfile); $total=$total+$counts; $n++; echo "$file [$counts]
"; } } } closedir($handle); } }else echo $error."Back
"; echo "
$total $lang_users $n $lang_chatrooms!"; echo "
$lang_exit
"; echo "
(c) GumSlone 2004-2008

"; echo "
"; } if ($gum=="croom") { $onxfile = @file("online/on$room"); $countonl= count($onxfile); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "

"; echo "$lang_say "; echo " $lang_refresh
"; $mess=replace($mess); $mess=substr(trim($mess),0,160); $_mudata = explode(" ",$mess); $count_spaces=count($_mudata); $count_chars = strlen($mess); if($count_chars < 5 && $mess!=""){$chat_error_message.='The message is to short, it has to be longer than 4 chars
'; } $text = "&&$C&&$nick $_time&&$mess&&"; if($count_spaces<3 && $count_chars > 30)$FOUND=1; if($count_spaces<5 && $count_chars > 40)$FOUND=1; if($mess!=""&&!$chat_error_message){ $udata = explode("&&",$text); $udata[3] = htmlspecialchars($udata[3]); $udata[3] = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)','', $udata[3]); $udata[3] = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)','', $udata[3]); $udata[3] = filterBadWords($udata[3]); $udata[3] = substr(trim($udata[3]),0,160); if($sm==1)$udata[3] = ReplaceTextToSmilies($udata[3]); echo"".htmlspecialchars($udata[2])." »
".$udata[3]."

"; }else echo $chat_error_message; $fp = FOpen("rooms/$room", "r"); $smilies_decode_num=1; while ($radka = FGetS($fp, 512)) { $udata = explode("&&",$radka); if ($udata[2]!=""){ ////////////////////////ANTIFLOOOOOOOOOOOOOOOOOD//////////////////// if(isset($mess)){ if($udata[3]==$antiflood){$FOUND=1;} if(trim($udata[2]) == trim($mess)) {$FOUND=1;} $first_check= substr(trim($udata[2]),1,11); if($first_check==substr(trim($mess),1,11)){$FOUND=1;} if($first_check==substr(trim($mess),2,11)){$FOUND=1;} if($first_check==substr(trim($mess),3,11)){$FOUND=1;} if($first_check==substr(trim($mess),4,11)){$FOUND=1;} if($first_check==substr(trim($mess),5,11)){$FOUND=1;} if($first_check==substr(trim($mess),6,11)){$FOUND=1;} if($first_check==substr(trim($mess),7,11)){$FOUND=1;} if($first_check==substr(trim($mess),8,11)){$FOUND=1;} if(!isset($FOUND)){ $count_udata = strlen($udata[2]); if($count_chars > 15 && (substr(trim($udata[2]),($count_udata-15),11)==substr(trim($mess),($count_chars-15),11))){$FOUND=1;} if($count_chars > 15 && (substr(trim($udata[2]),($count_udata-15),11)==substr(trim($mess),($count_chars-14),11))){$FOUND=1;} if($count_chars > 15 && (substr(trim($udata[2]),($count_udata-15),11)==substr(trim($mess),($count_chars-13),11))){$FOUND=1;} if($count_chars > 15 && (substr(trim($udata[2]),($count_udata-15),11)==substr(trim($mess),($count_chars-12),11))){$FOUND=1;} } } /////////////////////////END OF ANTIFLOOD CHECK//////////////////// $udata[3] = htmlspecialchars($udata[3]); $udata[3] = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)','', $udata[3]); $udata[3] = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)','', $udata[3]); $udata[3] = filterBadWords($udata[3]); $udata[3] = substr(trim($udata[3]),0,160); if($sm==1)$udata[3] = ReplaceTextToSmilies($udata[3]); if($sm==1&&$smilies_decode_num<=$smilies_decode)$udata[3] = ReplaceTextToSmilies($udata[3]); $smilies_decode_num++; echo"".htmlspecialchars($udata[2])." »
".$udata[3]."

"; } } FClose($fp); /////////////////////WRITING A TEXT MESSAGE TO the FILE/////////////////////////// if(!$FOUND&&$mess!=""&&$nick!=""&&!$chat_error_message){ $text = stripslashes($text); $text = strip_tags($text); $text = preg_replace("(\r\n|\n|\r)", "", $text); $text = ereg_replace("_", " ", $text); if (File_Exists("rooms/".$room)) { $zpravy = File("rooms/".$room); } $fp = FOpen("rooms/".$room, "w"); FPutS($fp, $text."\n"); for ($i=0; $i<$_room_size; $i++) { FPutS($fp, $zpravy[$i]); } FClose($fp); } /////////////////////END OF WRITING A TEXT MESSAGE TO the FILE/////////////////////////// echo "$lang_say "; echo " $lang_refresh
"; echo "$lang_who_is_online
"; echo "$lang_change_chatroom
"; echo "$lang_smilies
"; echo "$lang_exit
"; echo "
(c) GumSlone 2004-2008

"; echo "
"; //////////////////SAY//////////////////////////////////////////////////////////////// echo ""; echo ""; echo ""; echo "

"; echo "$lang_message
"; echo "$lang_say"; echo ""; echo ""; echo ""; echo ""; //echo "
$lang_chat"; echo "
Back
"; echo "
(c) GumSlone 2004-2008

"; echo "
"; } if ($gum=="smilies") { echo ""; echo ""; echo ""; echo "

"; $conf["items_per_page"] = 5; if(isset($npage))$page=$npage-1; if(!isset($page))$page=0; if($page<0)$page=0; $total = 0; if(!($dp = opendir("./smilies/"))) die ("Cannot open ./smilies/"); $file_array = array(); while ($file = readdir ($dp)) { if(substr($file,0,1) != '.' and $file != '..' and $file != 'index.php') { $file_array[] = $file; } } $file_count = count ($file_array); sort ($file_array); if ($file_count > 0) { $first_record = $page * $conf["items_per_page"]; $last_record = $first_record + $conf["items_per_page"]; while (list($fileIndexValue, $file_name) = each ($file_array)) { if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record)) { $user = explode ('.', $file_name); echo "\".".$user[0].".\"/ .".$user[0].".
"; } } if (($file_count > 0) AND ($last_record < $file_count)) { // next button $next_page = $page + 1; echo "
$lang_next
"; } if (($file_count > 0) AND ($page != 0)) { // previous button $prev_page = $page -1; echo "
$lang_prev
"; } } closedir($dp); echo "$file_count $lang_smilies
"; $pages=ceil($file_count/$conf["items_per_page"]); echo "Page ".($page+1)." of $pages
"; if($pages>2)echo "Jump to Page: Jump
"; echo "$lang_chat"; echo "
(c) GumSlone 2004-2008

"; echo "
"; } if ($gum=="online") { echo ""; echo ""; echo ""; echo "

"; $xfile = @file("online/on$room"); $xfile = array_reverse($xfile); $p = 25; if ($npage == ""){$npage = "1";} $countfile= count($xfile); $first = $countfile - ($p * ($npage - 1)); $second = $countfile - ($p * $npage) + 1; if ($second < 1) {$second = 1;} $npages = ceil($countfile / $p); if ($npage <= $npages and $npage>1) $gline_rew = "$lang_prev"; if ($npages > 1 and $npage<$npages) $gline_next = "$lang_next"; if($npage==1)$nn=1; else $nn=(($npage-1)*$p)+1; for ($i = $first-1; $i >= $second-1; $i--) { $xdata = explode(':',$xfile[$i]); $udata = explode(' ',$xdata[1]); if($udata[2]==m) $gender=$lang_male; if($udata[2]==f) $gender=$lang_female; echo $nn++.". $udata[0] $gender ($udata[3]) $udata[1]
"; } print"
"; if ($npages>1) print $gline_rew."| ".$gline_next; echo "
$lang_chat"; echo "
(c) GumSlone 2004-2008

"; echo "
"; } function filterBadWords($str){ // words to filter, you can add here some more $badwords=array( "Fuck", "Bitch", "Dick", "Hitler", "Nazi", "Asshole", "Chod", "Wichser"); // replace filtered words with $replacements=array( "???", "***"); for($i=0;$i < sizeof($badwords);$i++){ srand((double)microtime()*1000000); $rand_key = (rand()%sizeof($replacements)); $str=eregi_replace($badwords[$i], $replacements[$rand_key], $str); } return $str; } function ReplaceTextToSmilies($str){ $dir = "smilies/"; if (is_dir($dir)) { if ($dh = opendir($dir)) { $smilie_count = 0; while (($file = readdir($dh)) !== false) { $smilie=explode(".",$file); if($file!='.' && $file!='..'){ if (preg_match ("/\.".$smilie[0]."\./i", $str)) $smilie_count++; if($smilie_count<4)$str = str_replace('.'.$smilie[0].'.', ''.$smilie[0].'', $str); else if ($smilie_count>3) break; } } closedir($dh); } } return $str; } function replace($text) { $text = trim($text); $text = strip_tags($text); $text = stripslashes($text); $text = preg_replace("(\r\n|\n|\r)", "", $text); $text=str_replace(".com","",$text); $text=str_replace(".net","",$text); $text=str_replace(".biz","",$text); $text=str_replace(".wen.","",$text); $text=str_replace(".Wen.","",$text); $text=str_replace('tjtj','',$text); $text=str_replace('gmgm','',$text); $text=str_replace('papap','',$text); $text=str_replace('mamam','',$text); $text=str_replace('wawaw','',$text); $text=str_replace('gagag','',$text); $text=str_replace('wpw','',$text); $text=str_replace('atat','',$text); $text=str_replace('jajaj','',$text); $text=str_replace('mjm','',$text); $text=str_replace('gjg','',$text); $text=str_replace('jatj','',$text); $text=str_replace('tpt','',$text); $text=str_replace('___','_',$text); $text=str_replace('__','_',$text); $text=str_replace(" . .."," .",$text); $text=str_replace(".. . ",". ",$text); $text=str_replace(" . . "," ",$text); $text=str_replace(" . "," ",$text); $text=str_replace("...","..",$text); $text=str_replace(" "," ",$text); $text=str_replace('??? ???',"",$text); $text=str_replace('??????',"",$text); $text=str_replace('*** ***',"",$text); $text=str_replace('******',"",$text); $text=str_replace('??? ***',"",$text); $text=str_replace('???***',"",$text); $text=str_replace('*** ???',"",$text); $text=str_replace('***???',"",$text); $text=str_replace("\\","",$text); //[:punct:] $text = preg_replace('/[^[:space:][:alnum:]\@\.\:\,\-\+\!\?\'\"\(\)\]\[\=\}\{\%\*\~\#\<\>\^]/','',$text); $text=str_replace("\$","*",$text); return $text; } function nick_replace($text) { $text = trim($text); $text=str_replace("__","_",$text); $text = preg_replace("(\r\n|\n|\r)", "", $text); $text = preg_replace('/[^[:alnum:]\_\@\-\^]/','',$text); return $text; } /////////////////////////////////////////////////////////////////////////// // END OF SCRIPT ENJOY! /////////////////////////////////////////////////////////////////////////// ?>