$disonline = true; Number of bars showing recent content when new login (default is 30) $leastnum = 30; Default room name (the default is to change a file every day), if you remove D, it is a month to change a file $room = Date ("y-m-d"); Room save path, must end with/ $roomdir = "rooms/"; Encoding method $charset = "Utf-8"; Maximum number of client display items (not recommended too large) $maxdisplay = 300; Language $lang = Array ( Chat Room Description "description" => "Welcome to the mini Ajax chat room. Latest Version 1.2. Download please go to <a href= ' http://111cn.net ' target=_blank>www.111cn.net</a> ', Chat room Title "title" => "Mini Ajax Chatroom by Longbill", The first welcome to the chat room "Firstone" => "<span style= ' color: #16a5e9; ' >welcome to Longbill ' s mini ajax Chatroom!</span> ", Display when information has prohibited content "Ban" => "I am a pig!", Key words "keywords" => "chat room, mini, small, ajax,chat,chatroom,longbill,111cn.net,php, web Effects", Speaking tips "Hereyourwords" => "here to speak!" ); Error_reporting (e_all ^ e_notice ^ e_warning); Header ("content-type:text/html; Charset=utf-8 "); $get _past_sec = 3; If you find lost words, you can adjust the value of the appropriate size $touchs = 10; Check the time interval for online numbers if (!function_exists ("file_get_contents")) { function file_get_contents ($path) { if (!file_exists ($path)) return false; $fp = @fopen ($path, "R"); $all =fread ($fp, FileSize ($path)); Fclose ($FP); return $all; } } if (!function_exists ("file_put_contents")) { function file_put_contents ($path, $val) { $fp = @fopen ($path, "w"); Fputs ($fp, $val); Fclose ($FP); return true; } } $title = $lang ["title"]; $earlier = 10; $description = $lang ["description"]; $origroom = $room; $least = ($_get["Dis"])? Intval ($_get["Dis")): $leastnum; $touchme = $_post[' Touchme ']; if (!is_dir ($roomdir)) @mkdir ($roomdir) or Die ("error when creating folder $roomdir"); $room = $_get[' room ']; if (! $room) $room = $_post["Room"]; $room = Checkfilename ($room); if (! $room) $room = $origroom; $filename = $roomdir. $room. ". Dat.php "; $datafile = $roomdir. $room. ". PHP "; if (!file_exists ($filename)) @file_put_contents ($filename, ' <?php die ();? > '. ' ". Time ()." | ". $lang ["Firstone"]. " "); if (!file_exists ($datafile)) @file_put_contents ($datafile, ' <?php die ();? > '. ' "); $action = $_post["Action"]; function Checkfilename ($file) { if (! $file) return ""; $file = Trim ($file); $a = substr ($file,-1); $file = Eregi_replace ("^[.\/]*", "", $file); $file = Eregi_replace ("[. \/]*$", "", $file); $arr = Array (".. /","./","/","\",".. \",".\"); $file = Str_replace ($arr, "", $file); return $file; } |