//activex Á¤º¸ var ax_root ="/uni_chat"; var ax_path =ax_root+"/izyax.cab"; var ax_clsid="1EC772E3-6882-4D42-812E-5882CCB60536"; var ax_version="1,0,0,9"; //°³ÀÎÁ¤º¸ var userid =""; var userbirth ="00"; var usernick ="unknwon"; var username ="unknwon"; var usersex ="¿©"; var userpurpose ="$*^&"; var data0="F0400000,F0500000,F0700000,F0800000,F1000000"; //¾Æ¹ÙŸ var data1="F0400000,F0500000,F0700000,F0800000,F1000000"; //½º¸ô¾Æ¹ÙŸ var data2="00"; //¿¬·É var data3="¿©"; //¼ºº° var data4="$*^&"; //±âŸÁ¤º¸1 var data5="0000"; //±âŸÁ¤º¸2 var data6=""; //±âŸÁ¤º¸3 var data7=""; //±âŸÁ¤º¸4 var getonetoonedata=new Array(4); //¼­¹öÁ¤º¸ var serverno =1; //if(userid.charCodeAt(0)>=110) serverno =2; //¸ÖƼ¼­¹ö var clientno =0; var server = new Array(); var port = new Array(); server[1]="192.168.62.18";port[1]=3010; server[2]="192.168.62.18";port[2]=3010; //server[1]="192.168.1.3";port[1]=3010; //server[2]="192.168.1.3";port[2]=3010; //ActiveXÁ¤º¸ var state=0; var connect = new Array(); for(i=0;i<=20;i++) connect[i]="0"; var msg_recv = new Array(); for(i=0;i<=20;i++) msg_recv[i]=""; var msg_deny = new Array(); for(i=0;i<=20;i++) msg_deny[i]=""; var msg_rslt = new Array(); for(i=0;i<=20;i++) msg_rslt[i]="0"; //¿¡·¯Á¤º¸ var init_error=0; document.write("
"); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write("
"); //#########################################½ÃÀÛ/¼³Ä¡¿ë ÇÔ¼ö######################################### function _init() { if(userid!=""){ document.write(""); if(!izyax) { install(); } clientno=setinitdata(); //alert(clientno); } } function setinitdata(stype,sno,targetid,groupcode) { if(userid!=""){ if(!stype) stype=0; if(!sno) sno=serverno; if(!targetid) targetid=""; if(!groupcode) groupcode="0"; var cno; if(init_error>600) { install(); return; } if(izyax.readyState==4) { if(getID()!="" && getID()!=userid) closecon(-1); cno=_connect(stype,sno); if(cno<0) return -1; userid=userid.replace(/ /gi,"").replace(/|/gi,"").replace(/'/gi,""); usernick=usernick.replace(/ /gi,"").replace(/|/gi,"").replace(/'/gi,""); var datas=""; for(i=0;i<8;i++) { var data=eval("data"+i); data=data.replace(/ /gi,"|").replace(/'/gi,""); if(!data || data=="")data="$%^&"; datas += data + " "; } var user=userid+"|"+sno; if (stype==0) targetid="$%^&"; if(getstate(cno)==1) putdata("i " + user + " " + usernick + " " + groupcode + " 0 $%^& " + targetid + " documentbase " + datas,cno); // alert("i " + user + " " + usernick + " " + groupcode + " 0 $%^& " + targetid + " documentbase " + datas); if(getstate(cno)>0) caldata(cno); } else { init_error++; setTimeout("setinitdata(" + stype + "," + sno + ")",1000); } return cno; } } function _connect(stype,sno) { try{ var cno=-1; var servercount=server.length-1; var i=0; while(cno<0 && i=server.length) sno=1; sno=1; return sno; } function install() { //alert("install ok"); } var chk_conn_num=new Array(); var chk_client_num=new Array(); for(i=0;i<20;i++) { chk_conn_num[i]=0;chk_client_num[i]=0; } //#########################################¹ÞÀº ÇÁ·ÎÅäÄÝ Ã³¸® ÇÔ¼ö######################################### function caldata(cno) { if(!cno)cno=clientno; if(cno<0) return; chk_conn(cno); chk_client(cno); var recvdata=""; while((recvdata=getline(cno))!="") { process(recvdata,cno); } setTimeout("caldata(" + cno + ")",500); } function process(recvdata,cno) { if(recvdata) { var data=recvdata.split(" "); tag=data[0]; if(tag=="i" || tag=="kmj") { connect[cno]="1"; // alert(tag); } else if(tag=="msg") { window.open(ax_root+"/recv_message.jsp?time_id=" + data[2],"",'width=500,height=410'); } else if(tag=="msgg")//Izytech.Sock¿¡¼­ ó¸®ÇѴٴµ¥.. ¿©±â ÀÖÀ½ { /* msg_rslt[cno]="1"; msg_recv[cno]=data[1]; msg_deny[cno]=data[2]; */ } //ÂÊÁöº¸³»±â ÇÁ·ÎÁ§Æ® else if(tag=="in") { if (data.length>7){//´ëÈ­½ÃÀÛ var d=new Date(); var arr=new Array(); arr[0]=window; arr[1]=data[1]; arr[2]=data[2]; arr[3]=data[3]; arr[4]=data[4]; arr[5]=data[5]; arr[6]=data[6]; arr[7]=data[7]; arr[8]=d.toLocaleString(); var i=0; var kmj=check_deny(arr[4],userid); if(kmj){ while(arr[3]!=(arr[3]=arr[3].replace("|"," "))); // if (dlinviteok==null||dlinviteok.closed){ dlinviteok=window.showModelessDialog(ax_root+'/ct_pop_inviteok.jsp',arr,'dialogwidth:408px;dialogheight:375px;edge:sunken;status:no;help:no;scroll:no'); // } }else{ //¸Þ¼¼Áö°ÅºÎ } } } //1:1äÆà ÇÁ·ÎÅäÄÝ****************************************************** else if(tag=="o") { //openModeless(ax_root+"/ot_onetoone_ok.jsp",data,300,300); //window.showModelessDialog(ax_root+"/ot_onetoone_ok.jsp",data,"dialogwidth:300px;dialogheight:300px;edge:sunken;status:no;help:no;scroll:no"); getonetoonedata[1]=data[1]; getonetoonedata[2]=data[2]; getonetoonedata[3]=data[3]; var url = ax_root+"/ot_onetoone_ok.jsp?memberid=" + data[1]; window.open(url,"onetoone","width=300,height=300"); } //Àüü äÆà ÇÁ·ÎÅäÄÝ****************************************************** else if(tag=="ba") { if(data[1]=="t") { showtext(data[2]); } } //äÆà ÇÁ·ÎÅäÄÝ****************************************************** if(this.ct_process) ct_process(recvdata); //1:1äÆà ÇÁ·ÎÅäÄÝ****************************************************** if(this.ot_process) ot_process(recvdata); } } function chk_conn(cno) { if(cno<0) return; chk_conn_num[cno]++; if(chk_conn_num[cno]>120) { putdata("tc",cno); chk_conn_num[cno]=0; } } function chk_client(cno) { if(cno<0) return; chk_client_num[cno]++; if(chk_client_num[cno]>1) { lclock(cno); chk_client_num[cno]=0; } } //#########################################ax ÀÎÅÍÆäÀ̽º ÇÔ¼ö######################################### function getline(cno) { try{ if(!cno)cno=clientno; if(cno<0) return; return izyax.getline(cno); }catch(e){} } function putdata(str,cno) { try{ if(!cno)cno=clientno; if(cno<0) return; izyax.putdata(cno,str); }catch(e){} } function closeroom(no) { if(no>10000)no=no-10000; var msg="close " + no; putdata(msg); } function closecon(cno) { try{ if(!cno)cno=clientno; if(cno<-1) return; izyax.closecon(cno); if(cno>=0) connect[cno]="0"; }catch(e){} } function lclock(cno) { try{ if(!cno)cno=clientno; if(cno<0) return; izyax.lclock(cno); }catch(e){} } function getstate(cno) { try{ if(!cno)cno=clientno; if(cno<0) return; return izyax.getstate(cno); }catch(e){ return -1; } } function getID() { try{ return izyax.getID(); }catch(e) { return ""; } } //#########################################»ç¿ëÀÚ »ç¿ë ÇÔ¼ö######################################### function uf_sendMessage(receiver) { if(!receiver) receiver=""; window.open(ax_root+"/send_message.jsp?receiver="+receiver,"","width=500,height=410"); } function start_oto(targetid) { window.open(ax_root+"/ot_chatmain.jsp?targetid="+targetid+"&bln_send=0","oto"+targetid,"width=430,height=500"); } function makeroom() { window.open(ax_root+"/ct_makeroom.jsp","makeroom","width=570,height=400"); } function start_chat(codeno,groupcode,pass) { if(!codeno)codeno=""; if(!groupcode)groupcode=""; if(!pass)pass=""; window.open(ax_root+"/ct_chat.jsp?codeno="+codeno+"&groupcode="+groupcode+"&pass="+pass,"ct"+codeno,"height=650,width=705,status=yes"); } //#########################################ÇÁ·ÎÅäÄÝ ÇÔ¼ö######################################### function message(receiver,memo,time_id,cno) { receiver=receiver.replace(/ /gi,"").replace(/|/,""); memo=memo.replace(/ /gi,"|"); var msg="msgg " + receiver + " " + time_id; putdata(msg,cno); } function onetoone(targetid,cno) { var msg="o " + targetid + " " + usernick + " " + data0 + " " + data1; putdata(msg,cno); } function inputmsg(memo,cno) { if(!cno) cno=clientno; if(!memo) memo=txt_chat.value; if(memo=="") return; var str,levelstr=""; str=""; str+=" "; str+=" "; str+=" "; str+=" "; str+="
" + usernick + " " + memo + "
"; str=str.replace(/ /gi,"|"); var msg="ba t " + str; txt_chat.value=""; showtext(str); putdata(msg,cno); } function showtext(memo) { if (memo=="")return; memo=memo.replace(/\|/gi," "); try{ tdtwoline.innerHTML=memo; if(top.fr_bottom.fr_chat)top.fr_bottom.fr_chat.document.write(memo); if(top.fr_bottom.fr_chat)top.fr_bottom.fr_chat.document.body.scrollTop=1000000; }catch(e){} } //#########################################ÀÏ¹Ý ÇÔ¼ö######################################### function openModeless(url,arr,w,h) { window.showModelessDialog(url,arr,"dialogwidth:" + w + "px;dialogheight:" + h + "px;edge:sunken;status:no;help:no;scroll:no"); } var xpheight=0; function myalt(str,win) { if(!str)return; if(!win)win=window; var arr=new Array(); arr[0]=str; var mywidth=190; if(str.length>30)mywidth=350; else if(str.length>22)mywidth=300; else if(str.length>14)mywidth=250; var myheight=115+xpheight; win.showModelessDialog('/uni_chat/alert.html',arr,'dialogwidth:'+mywidth+'px;dialogheight:'+myheight+'px;status:no;help:no;scroll:no;resizable:no'); } function check_deny(memberid,targetid) { var surl=ax_root+"/ct_deny_check.jsp?memberid="+memberid+"&targetid="+targetid; var re=WinHTTP(surl); return parseInt(re); } function WinHTTP(sUrl) { var url=sUrl; var d = new Date(); var t = d.getTime(); url+="&"+t; var oXMLHTTP = new ActiveXObject("Microsoft.XMLHTTP"); oXMLHTTP.open("GET", url, false); oXMLHTTP.setRequestHeader("Content-Type", "text/xml;charset=euc-kr"); oXMLHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); oXMLHTTP.send(); return oXMLHTTP.responseText; } //½ÃÀÛ ÇÁ·Î¼¼½º _init();