=0){var ju="updated";if(this.bt>0){var jh=((new Date()).getTime()-this.bt)/(892+108);ju=ju+", "+jh+" secs";if(jh>012){alert(ju);} } this.bt=(new Date()).getTime();this.qu(ju);} else{this.kh();} if(rh){rt.kt(this.pq.zt);if(!this.vt){var lh=$('soundimg');if(lh==null||lh.className.match(new RegExp("\\bisound\\b"))){$s(it.qh+'/sounds/new_message.wav');} } if(!this.wt){window.focus();} } } ,oh:function(ph,dh){return((dh==(12+1)&&(ph||this.pq.ignorectrl))||(dh==012));} ,$t:function(k){if(k){eh=k.ctrlKey;k=k.which;} else{k=event.keyCode;eh=event.ctrlKey;} if(this.pq.yt&&this.oh(eh,k)){var fh=this.pq.yt.value;if(this.pq.ignorectrl){fh=fh.replace(/[\r\n]+$/,'');} this.pu(fh);return false;} return true;} ,ou:function(hq,ku,gh){if(ku&&ku.tagName=='error'){this.qu(qs.rs(ku,"descr"));} else{this.qu("reconnecting");} } ,ah:function(k){if($("engineinfo")){$("engineinfo").style.display='inline';$("engineinfo").innerHTML=k;} } ,qu:function(k){if(this.bh)clearTimeout(this.bh);this.ah(k);this.bh=setTimeout(this.kh.on(this),07640);} ,kh:function(){$("engineinfo").style.display='none';} } );var it={ch:{} ,vh:function(){it.ch.gu($('uname').value);$('changename1').style.display='none';$('changename2').style.display='inline';$('unamelink').innerHTML=nt($('uname').value);} ,wh:function(){$('changename1').style.display='inline';$('changename2').style.display='none';} } ;er.lr({'#postmessage a':function(xh){xh.onclick=function(){var yt=$('msgwnd');if(yt)it.ch.pu(yt.value);} ;} ,'select#predefined':function(xh){xh.onchange=function(){var yt=$('msgwnd');if(this.selectedIndex!=0){yt.value=this.options[this.selectedIndex].innerText||this.options[this.selectedIndex].innerHTML;} this.selectedIndex=0;yt.focus();} ;} ,'div#changename2 a':function(xh){xh.onclick=function(){it.wh();return false;} ;} ,'div#changename1 a':function(xh){xh.onclick=function(){it.vh();return false;} ;} ,'div#changename1 input#uname':function(xh){xh.onkeydown=function(e){var or=e||event;if(or.keyCode==015){it.vh();} } ;} ,'a#refresh':function(xh){xh.onclick=function(){it.ch.ru();it.ch._t();} ;} ,'a#togglesound':function(xh){xh.onclick=function(){var lh=$('soundimg');if(!lh){return;} if(lh.className.match(new RegExp("\\bisound\\b"))){lh.className="tplimage inosound";} else{lh.className="tplimage isound";} var yh=$('msgwnd');if(yh)yh.focus();} ;} ,'a.closethread':function(xh){xh.onclick=function(){it.ch.cu();} ;} } );kr.lr(window,'onload',function(){it.qh=threadParams.wroot;it.cssfile=threadParams.cssfile;it.ch=new sq.et(({ignorectrl:-1,zt:myRealAgent=='safari'?self.frames[0]:$("chatwnd"),mh:$("avatarwnd"),yt:$("msgwnd")} ).un(threadParams||{} ));} );
\ No newline at end of file
diff --git a/src/messenger/webim/js/source/chat.js b/src/messenger/webim/js/source/chat.js
index ce2164d9..211bed19 100644
--- a/src/messenger/webim/js/source/chat.js
+++ b/src/messenger/webim/js/source/chat.js
@@ -15,9 +15,9 @@ var FrameUtils = {
var doc = this.getDocument(frm);
doc.open();
doc.write("");
- doc.write("");
- doc.write("");
- doc.write("");
+ doc.write("");
+ doc.write("");
+ doc.write("");
doc.write("");
doc.close();
frm.onload = function() {
diff --git a/src/messenger/webim/js/users.js b/src/messenger/webim/js/users.js
index 7299dafb..20dc560d 100644
--- a/src/messenger/webim/js/users.js
+++ b/src/messenger/webim/js/users.js
@@ -1 +1 @@
-sq.zh=mn.nn();mn.sn(sq.zh,sq.lq,{qn:function(pq){this.oq(pq);this.pq.onComplete=this.ft.on(this);this.pq.jr=this.gt.on(this);this.pq.hr=this._q.on(this);this.pq.timeout=(4228+772);this.frequency=(this.pq.frequency||2);this.at={} ;this._t();} ,gt:function(mu,nu){if(this.pq.ou)this.pq.ou("offline, reconnecting");this.ru();this.su=setTimeout(this._t.on(this),01750);} ,_q:function(mu){if(this.pq.ou)this.pq.ou("timeout, reconnecting");this.ru();this.su=setTimeout(this._t.on(this),(756+244));} ,ru:function(){if(this.at.pq)this.at.pq.onComplete=undefined;clearTimeout(this.su);} ,_t:function(){if(this.pq.$h)this.pq.fq=(this.pq.$h)();this.at=new sq.vq(this.pq.url,this.pq);} ,ft:function(fu){try{var ku=sq.uq(fu);if(ku){(this.pq.lu||sq.kq)(ku);} else{if(this.pq.ou)this.pq.ou("reconnecting");} } catch(e){} this.su=setTimeout(this._t.on(this),this.frequency*01750);} } );var _h={mi:function(link,title,ni,qi,width,height,ri){return''+qi+'';} ,si:function(content){return'';} ,ti:function(ui,hi,id,ii,ji,ki,yt,li){var oi=2;var link=hi+"?thread="+id;var pi='';if(ji||ii){pi+=_h.mi((li||!ii)?link:link+"&viewonly=true",localized[ji?0:1],"ImCenter"+id,ui,01200,0740,null);} else{pi+=''+ui+'';} pi+=' | ';if(ji){pi+='';pi+=_h.mi(link,localized[0],"ImCenter"+id,'',0x280,0x1e0,null);pi+=' | ';oi++;} if(ii){pi+='';pi+=_h.mi(link+"&viewonly=true",localized[1],"ImCenter"+id,'',0x280,(337+143),null);pi+=' | ';oi++;} if(yt!=""){pi+='';pi+=yt.length>(27+3)?yt.substring(0,(29+1))+'...':yt;pi+=' | ';} return _h.si(pi);} ,di:function(id,ei){return''+_h.mi(qh+'/operator/ban.php?'+(ei?'id='+ei:'thread='+id),localized[2],"ban"+id,'',0x2d0,0740,null)+' | ';} } ;sq.fi=mn.nn();mn.sn(sq.fi,sq.lq,{qn:function(pq){this.oq(pq);this.pq.$h=this.$h.on(this);this.pq.ou=this.ou.on(this);this.pq.lu=this.lu.on(this);this.pq.gi=0;this.ai=new Object();this.bi=0;this.t=this.pq.ci;this.vi=new sq.zh(this.pq);} ,$h:function(){return"company="+this.pq.company+"&since="+this.pq.gi;} ,qu:function(du){this.pq.status.innerHTML=du;} ,ou:function(s){this.qu(s);} ,wi:function(ih){var id,xi,yi,ii=false,ji=false,zi=false,ki=null,ei=null;for(var i=0;i';if(ki!=null){hj=''+qs.rs(ih,"reason")+' | ';} if(zi){hj+=_h.di(id,ei);} hj=_h.si(hj);var ij=ls.os("t"+xi,this.t);var jj=ls.os("t"+xi+"end",this.t);if(mj!=null&&(mj.rowIndex<=ij.rowIndex||mj.rowIndex>=jj.rowIndex)){this.t.deleteRow(mj.rowIndex);this.ai[id]=null;mj=null;} if(mj==null){mj=this.t.insertRow(ij.rowIndex+1);mj.className=(ki=="blocked"&&xi!="chat")?"ban":"in"+xi;mj.id="thr"+id;this.ai[id]=new Array(sj,uj,xi);ls.insertCell(mj,"name","visitor",null,null,_h.ti(qj,this.pq.agentservl,id,ii,ji,ki,yt,xi!='chat'));ls.insertCell(mj,"contid","visitor","center",null,rj);ls.insertCell(mj,"state","visitor","center",null,yi);ls.insertCell(mj,"op","visitor","center",null,tj);ls.insertCell(mj,"time","visitor","center",null,this.kj(sj));ls.insertCell(mj,"wait","visitor","center",null,(xi!='chat'?this.kj(uj):'-'));ls.insertCell(mj,"etc","visitor","center",null,hj);if(xi=='wait'||xi=='prio')return true;} else{this.ai[id]=new Array(sj,uj,xi);mj.className=(ki=="blocked"&&xi!="chat")?"ban":"in"+xi;_i(this.t,mj,"name",_h.ti(qj,this.pq.agentservl,id,ii,ji,ki,yt,xi!='chat'));_i(this.t,mj,"contid",rj);_i(this.t,mj,"state",yi);_i(this.t,mj,"op",tj);_i(this.t,mj,"time",this.kj(sj));_i(this.t,mj,"wait",(xi!='chat'?this.kj(uj):'-'));_i(this.t,mj,"etc",hj);} return false;} ,lj:function(){function oj(t,id){var ij=$(id);var jj=$(id+"end");if(ij==null||jj==null){return false;} return ij.rowIndex+1=074){var bj=Math.floor(gj/(49+11));gj=gj%0x3c;if(gj<(8+2))gj="0"+gj;aj=bj+":";} return aj+gj+":"+fj;} ,cj:function(){for(var i in this.ai){if(this.ai[i]!=null){var value=this.ai[i];var mj=ls.os("thr"+i,this.t);if(mj!=null){function _i(ds,mj,id,nj){var ws=ls.fs(id,mj,ds);if(ws)ws.innerHTML=nj;} _i(this.t,mj,"time",this.kj(value[0]));_i(this.t,mj,"wait",(value[2]!='chat'?this.kj(value[1]):'-'));} } } } ,lu:function(vj){var wj=false;if(vj.tagName=='threads'){var xj=qs.ks(vj,"time");var yj=qs.ks(vj,"revision");if(xj)this.bi=(new Date()).getTime()-xj;if(yj)this.pq.gi=yj;for(var i=0;i'+qi+'';} ,si:function(content){return'';} ,ti:function(ui,hi,id,ii,ji,ki,yt,li){var oi=2;var link=hi+"?thread="+id;var pi='';if(ji||ii){pi+=_h.mi((li||!ii)?link:link+"&viewonly=true",localized[ji?0:1],"ImCenter"+id,ui,(501+139),(295+185),null);} else{pi+=''+ui+'';} pi+=' | ';if(ji){pi+='';pi+=_h.mi(link,localized[0],"ImCenter"+id,'',01200,(437+43),null);pi+=' | ';oi++;} if(ii){pi+='';pi+=_h.mi(link+"&viewonly=true",localized[1],"ImCenter"+id,'',(485+155),(375+105),null);pi+=' | ';oi++;} if(yt!=""){pi+='
';pi+=yt.length>036?yt.substring(0,(19+11))+'...':yt;pi+=' | ';} return _h.si(pi);} ,di:function(id,ei){return''+_h.mi(qh+'/operator/ban.php?'+(ei?'id='+ei:'thread='+id),localized[2],"ban"+id,'',01320,(417+63),null)+' | ';} } ;sq.fi=mn.nn();mn.sn(sq.fi,sq.lq,{qn:function(pq){this.oq(pq);this.pq.$h=this.$h.on(this);this.pq.ou=this.ou.on(this);this.pq.lu=this.lu.on(this);this.pq.gi=0;this.ai=new Object();this.bi=0;this.t=this.pq.ci;this.vi=new sq.zh(this.pq);} ,$h:function(){return"company="+this.pq.company+"&since="+this.pq.gi;} ,qu:function(du){this.pq.status.innerHTML=du;} ,ou:function(s){this.qu(s);} ,wi:function(ih){var id,xi,yi,ii=false,ji=false,zi=false,ki=null,ei=null;for(var i=0;i';if(ki!=null){hj=''+qs.rs(ih,"reason")+' | ';} if(zi){hj+=_h.di(id,ei);} hj=_h.si(hj);var ij=ls.os("t"+xi,this.t);var jj=ls.os("t"+xi+"end",this.t);if(mj!=null&&(mj.rowIndex<=ij.rowIndex||mj.rowIndex>=jj.rowIndex)){this.t.deleteRow(mj.rowIndex);this.ai[id]=null;mj=null;} if(mj==null){mj=this.t.insertRow(ij.rowIndex+1);mj.className=(ki=="blocked"&&xi!="chat")?"ban":"in"+xi;mj.id="thr"+id;this.ai[id]=new Array(sj,uj,xi);ls.insertCell(mj,"name","visitor",null,null,_h.ti(qj,this.pq.agentservl,id,ii,ji,ki,yt,xi!='chat'));ls.insertCell(mj,"contid","visitor","center",null,rj);ls.insertCell(mj,"state","visitor","center",null,yi);ls.insertCell(mj,"op","visitor","center",null,tj);ls.insertCell(mj,"time","visitor","center",null,this.kj(sj));ls.insertCell(mj,"wait","visitor","center",null,(xi!='chat'?this.kj(uj):'-'));ls.insertCell(mj,"etc","visitor","center",null,hj);if(xi=='wait'||xi=='prio')return true;} else{this.ai[id]=new Array(sj,uj,xi);mj.className=(ki=="blocked"&&xi!="chat")?"ban":"in"+xi;_i(this.t,mj,"name",_h.ti(qj,this.pq.agentservl,id,ii,ji,ki,yt,xi!='chat'));_i(this.t,mj,"contid",rj);_i(this.t,mj,"state",yi);_i(this.t,mj,"op",tj);_i(this.t,mj,"time",this.kj(sj));_i(this.t,mj,"wait",(xi!='chat'?this.kj(uj):'-'));_i(this.t,mj,"etc",hj);} return false;} ,lj:function(){function oj(t,id){var ij=$(id);var jj=$(id+"end");if(ij==null||jj==null){return false;} return ij.rowIndex+1=074){var bj=Math.floor(gj/(46+14));gj=gj%0x3c;if(gj<012)gj="0"+gj;aj=bj+":";} return aj+gj+":"+fj;} ,cj:function(){for(var i in this.ai){if(this.ai[i]!=null){var value=this.ai[i];var mj=ls.os("thr"+i,this.t);if(mj!=null){function _i(ds,mj,id,nj){var ws=ls.fs(id,mj,ds);if(ws)ws.innerHTML=nj;} _i(this.t,mj,"time",this.kj(value[0]));_i(this.t,mj,"wait",(value[2]!='chat'?this.kj(value[1]):'-'));} } } } ,lu:function(vj){var wj=false;if(vj.tagName=='threads'){var xj=qs.ks(vj,"time");var yj=qs.ks(vj,"revision");if(xj)this.bi=(new Date()).getTime()-xj;if(yj)this.pq.gi=yj;for(var i=0;i\n".
- "\n".
- "\n".
+ print(
+ "".
+ "\n\n".
+ "\n".
+ "\n".
"\n".
- "".
- "".
+ "chat\n".
+ "\n".
+ "".
"" );
-
+
foreach( $output as $msg ) {
print $msg;
}
print(
- " |
".
+ "
".
"" );
}
}
@@ -317,11 +320,11 @@ function setup_chatview_for_user($thread,$level) {
$page['ignorectrl'] = 0;
}
- $params = "thread=".$thread['threadid']."&token=".$thread['ltoken'];
- $page['mailLink'] = "$webimroot/client.php?".$params."&level=$level&act=mailthread";
+ $params = "thread=".$thread['threadid']."&token=".$thread['ltoken'];
+ $page['mailLink'] = "$webimroot/client.php?".$params."&level=$level&act=mailthread";
if($settings['enablessl'] == "1" && !is_secure_request()) {
- $page['sslLink'] = get_app_location(true, true)."/client.php?".$params."&level=$level";
+ $page['sslLink'] = get_app_location(true, true)."/client.php?".$params."&level=$level";
}
$page['isOpera95'] = is_agent_opera95();
@@ -374,7 +377,7 @@ function setup_chatview_for_operator($thread,$operator) {
}
if($settings['enablessl'] == "1" && !is_secure_request()) {
- $page['sslLink'] = get_app_location(true, true)."/operator/agent.php?thread=".$thread['threadid']."&token=".$thread['ltoken'];
+ $page['sslLink'] = get_app_location(true, true)."/operator/agent.php?thread=".$thread['threadid']."&token=".$thread['ltoken'];
}
$page['isOpera95'] = is_agent_opera95();
$page['neediframesrc'] = needsFramesrc();
@@ -386,8 +389,8 @@ function setup_chatview_for_operator($thread,$operator) {
$predefinedres .= "";
}
$page['predefinedAnswers'] = $predefinedres;
- $params = "thread=".$thread['threadid']."&token=".$thread['ltoken'];
- $page['redirectLink'] = "$webimroot/operator/agent.php?".$params."&act=redirect";
+ $params = "thread=".$thread['threadid']."&token=".$thread['ltoken'];
+ $page['redirectLink'] = "$webimroot/operator/agent.php?".$params."&act=redirect";
$page['namePostfix'] = "";
}
diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php
index 87496d16..ad0bc8c3 100644
--- a/src/messenger/webim/libs/common.php
+++ b/src/messenger/webim/libs/common.php
@@ -434,10 +434,10 @@ function get_gifimage_size($filename) {
function add_params($servlet, $params) {
$infix = '?';
if( strstr($servlet,$infix) !== FALSE )
- $infix = '&';
+ $infix = '&';
foreach($params as $k => $v) {
$servlet .= $infix.$k."=".$v;
- $infix = '&';
+ $infix = '&';
}
return $servlet;
}
diff --git a/src/messenger/webim/libs/demothread.php b/src/messenger/webim/libs/demothread.php
index ca48b5de..ec5fe144 100644
--- a/src/messenger/webim/libs/demothread.php
+++ b/src/messenger/webim/libs/demothread.php
@@ -30,14 +30,19 @@ function demo_process_thread($act,$outformat,$lastid,$isuser,$canpost,$istyping,
print("");
} else {
start_html_output();
- $url = "$webimroot/thread.php?act=refresh&thread=0&token=123&html=on&user=".($isuser?"true":"false");
- print("\n".
- "\n".
- "\n".
+ $url = "$webimroot/thread.php?act=refresh&thread=0&token=123&html=on&user=".($isuser?"true":"false");
+
+ print(
+ "".
+ "\n\n".
+ "\n".
+ "\n".
"\n".
- "".
- "".
+ "chat\n".
+ "\n".
+ "".
"" );
+
}
if($lastid == 1) {
demo_print_message(
@@ -70,7 +75,7 @@ function demo_process_thread($act,$outformat,$lastid,$isuser,$canpost,$istyping,
print("");
} else {
print(
- " |
".
+ "".
"" );
}
}
diff --git a/src/messenger/webim/operator/themes.php b/src/messenger/webim/operator/themes.php
index 7c0c7bab..45a6f92a 100644
--- a/src/messenger/webim/operator/themes.php
+++ b/src/messenger/webim/operator/themes.php
@@ -38,10 +38,10 @@ if(!in_array($preview, $stylelist)) {
$preview = $stylelist[0];
}
-$show = verifyparam("show", "/^(chat|chatsimple|nochat|mail|mailsent|survey|leavemessage|leavemessagesent|redirect|redirected|agentchat|agentrochat)$/", "");
+$show = verifyparam("show", "/^(chat|chatsimple|nochat|mail|mailsent|survey|leavemessage|leavemessagesent|redirect|redirected|agentchat|agentrochat|error)$/", "");
$showerrors = verifyparam("showerr", "/^on$/", "") == "on";
$errors = array();
-if($showerrors) {
+if($showerrors || $show == 'error') {
$errors[] = "Test error";
}
@@ -59,7 +59,7 @@ if($show == 'survey') {
expand("../styles", "$preview", "$show.tpl");
exit;
}
-if($show == 'mailsent') {
+if($show == 'mailsent' || $show == 'error') {
$page['email'] = "admin@yourdomain.com";
setup_logo();
expand("../styles", "$preview", "$show.tpl");
@@ -101,6 +101,7 @@ $templateList = array(
array('label' => getlocal("page.preview.redirected"), 'id' => 'redirected', 'h' => 480, 'w' => 640),
array('label' => getlocal("page.preview.agentchat"), 'id' => 'agentchat', 'h' => 480, 'w' => 640),
array('label' => getlocal("page.preview.agentrochat"), 'id' => 'agentrochat', 'h' => 480, 'w' => 640),
+ array('label' => getlocal("page.preview.error"), 'id' => 'error', 'h' => 480, 'w' => 640),
);
$template = verifyparam("template", "/^\w+$/", "chat");
@@ -115,7 +116,7 @@ $page['availableTemplates'] = array(
"survey", "leavemessage", "leavemessagesent",
"mail", "mailsent",
"redirect", "redirected",
- "agentchat", "agentrochat",
+ "agentchat", "agentrochat", "error",
"all");
$page['showlink'] = "$webimroot/operator/themes.php?preview=$preview&".($showerrors?"showerr=on&":"")."show=";
diff --git a/src/messenger/webim/view/pending_users.php b/src/messenger/webim/view/pending_users.php
index 47ee0256..477cf2f6 100644
--- a/src/messenger/webim/view/pending_users.php
+++ b/src/messenger/webim/view/pending_users.php
@@ -19,7 +19,7 @@ $page['menuid'] = "users";
function tpl_header() { global $page, $webimroot;
?>
-
+
-
+