LastID = "1"; isposted = Mgettime; (str) { Str.replace (/(^\s*) | ( \s*$)/g, "" Str=ue.geteditor (' Myeditor ').Str=$ (' #mess '). Ue.geteditor (' Myeditor '). SetContent (", _getargs (Name, Jsfilename = Rname =RegExp (jsfilename+ "(\ \?) (. *))?$" Jss=document.getelementsbytagname (' script ' (i = 0;i < jss.length; i++ j = (J.SRC&&J.SRC. oo = J.src.match (rname) [2 (oo&& (t = oo.match (/([^&=]+) = ([^=&]+)/ (L = 0; L < T.length; l++R = tt = R.match (/([^&=]+) = ([^=&]+)/ < span="">
'); userid1=$ (' #userid1 '). (userid1== ' Everyone 'Alert (' Please select a Chat object Oh!\n\n Click on the user name! ')$ ("#userid2"). attr ("Checked", (Name.length > 1 && name!= "Everyone"$ ("#userto").$ ("#userid1"). attr ("Checked",$ ("#userid2"). attr ("Checked", (Name.length > 8New_name = name.(0, 6}New_name = document.getElementById ("Tousertitle"). InnerHTML = "" + new_name + ""} $ ("#userto"). Val ("Everyone") $ ("#userid1"). attr ("Checked",$ ("#userid2"). attr ("Checked", document.getElementById ("Tousertitle"). InnerHTML = "User" Messvalue =$ ("#mess").Messvalue= (messvalue.length>650Alert ("Participate in interactive tip: \ n Pro, input text is not a bit more?!") , talk less!\n\n copy over the text! Please clear the format first! " ($ ("#mess"). html (). length<2Alert ("Participate in interactive tips: \ n Please fill in the content you want to publish, the length must be 2~250 bytes!") " D = Username = $ ("#username"). Userto = $ ("#userto"). UserID = $ ("#userid"). Mess = Userpid = $ ("#userpid"). IP = $ ("#IP"). Usertype = $ ("#usertype"). Sendurl = "Username=" +username+ "&userto=" +userto+ "&userid=" +userid+ "&userpid=" +userpid+ "&mess=" + Mess + "&ip=" +ip + "&usertype=" +usertype+ "&d=" +d. Sendurl =Xmlhttp.sendreq (' POST ', ' send.php ', Sendurl, Response = obj. (response== ' OK ' (!isposted = Setcontentmess (); (response== ' false 'Alert ("Send failed! Your character contains an illegal word " D = GETURL = "getmess.php?lastid=" +lastid + "&numbermess=80&d=" +d.gettime ();$.Type: "GET",DataType: "xml",Url:geturl,Async,timeout:80000, Success(Data, isposted = ChatEL = $ ("#chat"$ (data). Find ("message").(I Sid =$ (this). Find ("Sid"). SUCC =$ (this). Find ("SUCC"). UMAX =$ (this). Find ("Umax"). User =$ (This). Find ("User"). Userto =$ (this). Find ("Userto"). UserID =$ (this). Find ("userid"). Usersex =$ (this). Find ("Usersex"). Usertype =$ (this). Find ("Usertype"). Userpic =$ (this). Find ("Userpic"). Userpid =$ (this). Find ("Userpid"). Text =$ (this). Find ("text"). =$ (This). Find ("date"). UID = _getargs (' Function.js ', ' 2 ' (succ==1 (uid>=98Delhtml= ' [delete] [delete all information for this user] '}Delhtml= " (usertype>=98 chatelinnerhtml = '
- Admin (' + user + ') ' + Userto + ' say ' + < span=""> + ' ' +delhtml+ '
' +text + '
'ChatEL.} chatelinnerhtml = '
- (' + user + ') ' + Userto + ' say ' + < span=""> + ' ' +delhtml+ '
' + text+ '
'ChatEL. LastID = UMAX;Chatel.scrolltop (document.getElementById ("chat"). scrollheight); (!isposted = (succ==0LastID = SID;Chatel.scrolltop = Chatel.scrollheight; (!isposted = }, Error(Xmlhttprequest,textstatus, (textstatus== "Timeout"$ ("#msg"). Show (). HTML ("You haven't spoken for a long time."). FadeOut (3200 (!isposted = }
* This chat system has been developed using Php+ajax+mysql! Database supports MySQL, supports XML, supports TXT, supports accsess and other databases, can be converted freely
Chat Features: 1: Emoji 2: Hyperlink 3: Send picture, 4 send file, 5 font settings, 6 doodle function
Function: Can speak to a person, can also speak to all people, support private chat (VIP function)
Support PHP Long connection Sleep implementation of the chat room source code and AJAX implementation of the chat room codes
Author: margin (qq:249189520----QQ Group: 90316079-----Account 1:admin Password: admin account 2:demo Password: Demo
Official website: http://www.0917cc.com
Php+ajax chat room Simulation Push http://room.0917y.com/websystems/Chatroom2/
You can view the connection process under Firefox ff what's different from the following
Php+ajax Chat Room http://room.0917y.com/websystems/Chatroom/index.php?pid=25&ppid=64
* Simulation push is implemented based on PHP long connection sleep
Deficiencies and shortcomings:
I've been confused all night. The problem is that the first time you insert a space at the beginning of the editor! Always prompt for errors! It seems to be related to the XML specification!
And it seems that the editor ueditor the problem taken out of the space will be c2a0 will become garbled, handling this situation \u00a0 do not know how to deal with
Server filtering is not possible! Customer's filter is not yet! Ask the master to look at ....
http://www.bkjia.com/PHPjc/626624.html www.bkjia.com true http://www.bkjia.com/PHPjc/626624.html techarticle LastID = "1"; isposted = Mgettime; (str) {str.replace (/(^\s*) | ( \s*$)/g, "" Str=ue.geteditor (' Myeditor '). Str= $ (' #mess '). Ue.geteditor (' Myeditor '). SetContent (", _getargs (name, JsF ...