From 9785472323c8cd7806ffd1458ef565c03fddf0fa Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Fri, 13 Mar 2009 00:52:37 +0000 Subject: [PATCH] new layout: thread log, pending users, login page (fixed layout); fix mail etc. git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@403 c66351dc-e62f-0410-b875-e3a5c0b9693f --- src/messenger/js/users.js | 92 +++------- src/messenger/webim/default.css | 169 +++++++++++++++++- src/messenger/webim/install/index.php | 2 + src/messenger/webim/js/brws.js | 2 +- src/messenger/webim/js/ie.js | 9 +- src/messenger/webim/js/users.js | 2 +- src/messenger/webim/libs/chat.php | 1 + src/messenger/webim/libs/common.php | 2 + src/messenger/webim/locales/en/properties | 3 +- src/messenger/webim/operator/login.php | 5 +- .../webim/operator/threadprocessor.php | 2 + src/messenger/webim/view/ban.php | 162 ++++++++--------- src/messenger/webim/view/inc_locales.php | 23 ++- src/messenger/webim/view/inc_main.php | 30 +++- src/messenger/webim/view/inc_menu.php | 2 +- src/messenger/webim/view/login.php | 42 ++--- src/messenger/webim/view/pending_users.php | 151 ++++------------ src/messenger/webim/view/thread_log.php | 105 ++++++----- src/messenger/webim/view/thread_search.php | 2 +- 19 files changed, 434 insertions(+), 372 deletions(-) diff --git a/src/messenger/js/users.js b/src/messenger/js/users.js index fdbd7502..ee6a3044 100644 --- a/src/messenger/js/users.js +++ b/src/messenger/js/users.js @@ -55,36 +55,6 @@ Class.inherit( Ajax.PeriodicalUpdater, Ajax.Base, { var HtmlGenerationUtils = { - insertSplitter: function( _row ) { - var cell = _row.insertCell(-1); - cell.style.backgroundImage = 'url('+webimRoot+'/images/tablediv3.gif)'; - cell.innerHTML = ''; - }, - - removeHr: function(_table, _index ) { - _table.deleteRow(_index+2); - _table.deleteRow(_index+1); - _table.deleteRow(_index); - }, - - insertHr: function(_table, _index) { - var row = _table.insertRow(_index); - var cell = row.insertCell(-1); - cell.colSpan = 13; - cell.height = 2; - - row = _table.insertRow(_index); - cell = row.insertCell(-1); - cell.colSpan = 13; - cell.style.backgroundColor = '#E1E1E1'; - cell.innerHTML = ''; - - row = _table.insertRow(_index); - cell = row.insertCell(-1); - cell.colSpan = 13; - cell.height = 2; - }, - popupLink: function(link, title, wndid, inner, width, height,linkclass) { return ''+ @@ -98,7 +68,7 @@ var HtmlGenerationUtils = { viewOpenCell: function(username,servlet,id,canview,canopen,ban,message,cantakenow) { var cellsCount = 2; var link = servlet+"?thread="+id; - var gen = ''; + var gen = ''; if(canopen || canview ) { gen += HtmlGenerationUtils.popupLink( (cantakenow||!canview) ? link : link+"&viewonly=true", localized[canopen ? 0 : 1], "ImCenter"+id, username, 640, 480, ban); } else { @@ -126,7 +96,7 @@ var HtmlGenerationUtils = { }, banCell: function(id,banid){ return ''+ - HtmlGenerationUtils.popupLink( webimRoot+'/operator/ban.php?'+(banid ? 'id='+banid : 'thread='+id), localized[2], "ban"+id, ''+localized[2]+'', 550, 440, null)+ + HtmlGenerationUtils.popupLink( webimRoot+'/operator/ban.php?'+(banid ? 'id='+banid : 'thread='+id), localized[2], "ban"+id, ''+localized[2]+'', 720, 480, null)+ ''; } }; @@ -190,7 +160,6 @@ Class.inherit( Ajax.ThreadListUpdater, Ajax.Base, { var row = CommonUtils.getRow("thr"+id, this.t); if( stateid == "closed" ) { if( row ) { - HtmlGenerationUtils.removeHr(this.t, row.rowIndex+1); this.t.deleteRow(row.rowIndex); } this.threadTimers[id] = null; @@ -203,10 +172,10 @@ Class.inherit( Ajax.ThreadListUpdater, Ajax.Base, { var agent = NodeUtils.getNodeValue(node,"agent"); var modified = NodeUtils.getNodeValue(node,"modified"); var message = NodeUtils.getNodeValue(node,"message"); - var etc = ''+NodeUtils.getNodeValue(node,"useragent")+''; + var etc = ''+NodeUtils.getNodeValue(node,"useragent")+''; if(ban != null) { - etc = ''+NodeUtils.getNodeValue(node,"reason")+''; + etc = ''+NodeUtils.getNodeValue(node,"reason")+''; } if(canban) { @@ -214,33 +183,25 @@ Class.inherit( Ajax.ThreadListUpdater, Ajax.Base, { } etc = HtmlGenerationUtils.generateOneRowTable(etc); - var startRow = CommonUtils.getRow(stateid, this.t); - var endRow = CommonUtils.getRow(stateid+"end", this.t); + var startRow = CommonUtils.getRow("t"+stateid, this.t); + var endRow = CommonUtils.getRow("t"+stateid+"end", this.t); if( row != null && (row.rowIndex <= startRow.rowIndex || row.rowIndex >= endRow.rowIndex ) ) { - HtmlGenerationUtils.removeHr(this.t, row.rowIndex+1); this.t.deleteRow(row.rowIndex); this.threadTimers[id] = null; row = null; } if( row == null ) { row = this.t.insertRow(startRow.rowIndex+1); - HtmlGenerationUtils.insertHr(this.t, startRow.rowIndex+2); row.id = "thr"+id; this.threadTimers[id] = new Array(vtime,modified,stateid); - CommonUtils.insertCell(row, "name", "table", null, 30, HtmlGenerationUtils.viewOpenCell(vname,this._options.agentservl,id,canview,canopen,ban,message,stateid!='chat')); - HtmlGenerationUtils.insertSplitter(row); - CommonUtils.insertCell(row, "contid", "table", "center", null, vaddr ); - HtmlGenerationUtils.insertSplitter(row); - CommonUtils.insertCell(row, "state", "table", "center", null, vstate ); - HtmlGenerationUtils.insertSplitter(row); - CommonUtils.insertCell(row, "op", "table", "center", null, agent ); - HtmlGenerationUtils.insertSplitter(row); - CommonUtils.insertCell(row, "time", "table", "center", null, this.getTimeSince(vtime) ); - HtmlGenerationUtils.insertSplitter(row); - CommonUtils.insertCell(row, "wait", "table", "center", null, (stateid!='chat' ? this.getTimeSince(modified) : '-') ); - HtmlGenerationUtils.insertSplitter(row); - CommonUtils.insertCell(row, "etc", "table", "center", null, etc ); + CommonUtils.insertCell(row, "name", "visitor", null, null, HtmlGenerationUtils.viewOpenCell(vname,this._options.agentservl,id,canview,canopen,ban,message,stateid!='chat')); + CommonUtils.insertCell(row, "contid", "visitor", "center", null, vaddr ); + CommonUtils.insertCell(row, "state", "visitor", "center", null, vstate ); + CommonUtils.insertCell(row, "op", "visitor", "center", null, agent ); + CommonUtils.insertCell(row, "time", "visitor", "center", null, this.getTimeSince(vtime) ); + CommonUtils.insertCell(row, "wait", "visitor", "center", null, (stateid!='chat' ? this.getTimeSince(modified) : '-') ); + CommonUtils.insertCell(row, "etc", "visitor", "center", null, etc ); if( stateid == 'wait' || stateid == 'prio' ) return true; @@ -258,21 +219,20 @@ Class.inherit( Ajax.ThreadListUpdater, Ajax.Base, { }, updateQueueMessages: function() { - function updateQueue(t,id,nclients) { - var startRow = t.rows[id]; - var endRow = t.rows[id+"end"]; - if( startRow == null || endRow == null ) - return; - var _status = endRow.cells["status"]; - if( _status == null ) - return; - _status.innerHTML = (startRow.rowIndex + 1 == endRow.rowIndex) ? nclients : ""; - _status.height = (startRow.rowIndex + 1 == endRow.rowIndex) ? 30 : 10; + function queueNotEmpty(t,id) { + var startRow = $(id); + var endRow = $(id+"end"); + if( startRow == null || endRow == null ) { + return false; + } + return startRow.rowIndex+1 < endRow.rowIndex; } - - updateQueue(this.t, "wait", this._options.noclients); - updateQueue(this.t, "prio", this._options.noclients); - updateQueue(this.t, "chat", this._options.noclients); + var _status = $("statustd"); + if( _status) { + var notempty = queueNotEmpty(this.t, "twait") || queueNotEmpty(this.t, "tprio") || queueNotEmpty(this.t, "tchat"); + _status.innerHTML = notempty ? "" : this._options.noclients; + _status.height = notempty ? 5 : 30; + } }, getTimeSince: function(srvtime) { diff --git a/src/messenger/webim/default.css b/src/messenger/webim/default.css index 3f265cf9..512943e5 100644 --- a/src/messenger/webim/default.css +++ b/src/messenger/webim/default.css @@ -40,16 +40,28 @@ a { color: #2f7599; } -#wrap { +#wrap400, #wrap700, #fixedwrap { position:relative; - width: 100%; margin: 0px auto -41px; height:auto !important; height:100%; min-height:100%; +} + +#wrap400 { + width: 100%; + min-width:400px; +} + +#wrap700 { + width: 100%; min-width:700px; } +#fixedwrap { + width: 850px; +} + .contentdiv { float:left; width: 100%; @@ -60,6 +72,10 @@ a { padding: 10px 60px 10px 20px; } +.contentnomenu { + padding: 10px 60px 10px 20px; +} + .empty_inner { height:40px; } @@ -96,7 +112,7 @@ a { #header { width: 100%; height: 32px; - margin: 0px auto 10px auto; + margin: 0px -2px 10px 0px; padding-top: 10px; padding-bottom: 5px; background: url(images/graydot.gif) repeat-x left bottom; @@ -386,6 +402,47 @@ table.list tbody tr:hover td, table.list tbody tr:hover td a { color: #1D485E; } +/* awaiting */ + +table.awaiting { + font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; + background: #fff; + width: 100%; + border-collapse: collapse; + text-align: left; +} + +table.awaiting th { + font-size: 1.2em; + font-weight: normal; + color: #1D485E; + padding: 10px 8px; + border-bottom: 2px solid #2F7598; +} + +table.awaiting td.visitor { + color: #2f7599; + border-bottom: 1px solid #ccc; + padding: 10px 8px; + margin: 0px; +} + +.firstmessage a { + font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; + font-size: 10px; + text-decoration: none; + color: #6a6a6a; +} + +.firstmessage a:hover { + color: #8a6a6a; +} + +#connstatus { + float:right; + margin: 10px 10px; +} + /* search */ #searchtext { @@ -407,8 +464,66 @@ table.list tbody tr:hover td, table.list tbody tr:hover td a { /* login */ +#loginsmallpane { + float: right; + padding: 10px 15px 0px 0px; + margin-right: 0px; + line-height: 22px; + display: inline; +} + +#loginsmallpane input { + margin: 0px 3px; + padding: 0px 2px; +} + +#loginsmallpane .butt { + height: 1.3em; + border: 0px; + background: none; +} + +#loginsmallpane .butt:hover { + background: #aaa; +} + +#loginintro { + width: 400px; + margin: 10px 30px; +} + #loginpane { - width: 350px; + width: 400px; + margin: 30px 30px; +} + +#loginpane .header h2 { + font-size: 2em; + margin-bottom: 0.9em; + padding-bottom: 0.8em; + border-bottom: 2px solid #2F7598; +} + +/* thread log */ + +.logpane { + margin: 10px 0px; + line-height: 150%; +} + +.logpane .header { + padding-bottom: 0.8em; + border-bottom: 2px solid #2F7598; +} + +.logpane .wlabel { + width: 10em; + float: left; + margin-right:10px; +} + +.logpane .wvalue { + float: left; } /* dashboard */ @@ -421,6 +536,9 @@ table.list tbody tr:hover td, table.list tbody tr:hover td a { float: left; } +.dashitem:hover { +} + .dashitem a { background: url(images/graydot.gif) repeat-x left bottom; padding-bottom: 10px; @@ -435,3 +553,46 @@ table.list tbody tr:hover td, table.list tbody tr:hover td a { list-style-position: inside; margin-left: 2em; } + +/* chat */ + +.message { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + color: #4F4F4F; + padding: 15px 0px 0px 0px; + line-height: 17px; +} + +.message span.time { + color: #000000; +} + +.message span.nuser { + color: #B11E23; + font-weight: bold; +} + +.message span.nagent { + font-weight: bold; +} + +.message span.minf { + color: #1E48B1; + font-size: 11px; +} + +.message span.mevent { + color: #A1A1A1; + font-size: 11px; +} + +.message span.mhidden { + color: #A1A1A1; + font-size: 11px; +} + +.message span.mconn { + color: #A1A1A1; + font-size: 11px; +} diff --git a/src/messenger/webim/install/index.php b/src/messenger/webim/install/index.php index 7571215d..a66fe001 100644 --- a/src/messenger/webim/install/index.php +++ b/src/messenger/webim/install/index.php @@ -139,6 +139,8 @@ function check_status() { $page['nextstep'] = getlocal("installed.login_link"); $page['nextnotice'] = getlocal("installed.notice"); $page['nextstepurl'] = "$webimroot/"; + + $page['show_small_login'] = true; mysql_close($link); diff --git a/src/messenger/webim/js/brws.js b/src/messenger/webim/js/brws.js index 1c6a561f..798445dd 100644 --- a/src/messenger/webim/js/brws.js +++ b/src/messenger/webim/js/brws.js @@ -1 +1 @@ -var myAgent="";var lk=0;var myRealAgent="";function ok(){var pk=["\157pe\162\141","\155si\145","\u0073afa\u0072i","\u0066\151re\146o\u0078","\u006ee\u0074sc\u0061pe","\155o\172\u0069ll\141"];var bj=navigator.userAgent.toLowerCase();for(var i=0;i'+content+'';} mj+='\074\u002f\u0074d\u003e\074\u0074\144\u003e\074\u0069mg\u0020\163\u0072c\075"'+ht+'/\u0069\u006d\u0061\147\u0065s/\146\u0072ee.gif" \167\u0069dt\u0068\075"5"\u0020\150\145i\147\u0068t="\061"\040\u0062\u006frde\162\075"0" \141l\u0074\u003d""\076\u003c/\u0074\u0064\u003e';if(yi){mj+='\u003ct\144\u0020\167\u0069\u0064\u0074\150\075"\u0033\060" \141\u006c\151\147\156\075"\u0063\145\u006e\164e\162">';mj+=ji.ei(link,localized[0],"I\155\u0043enter"+id,'\074\151\u006dg\u0020\163r\143\u003d"'+ht+'/\151\u006dage\163\057tbl\151\143l\163\160\u0065a\153\u002e\u0067i\146" w\151d\u0074h\u003d"1\065"\040he\151\u0067ht\075"15"\040\142\u006f\u0072\u0064er="0"\u0020\u0061\154\164\u003d"'+localized[0]+'">',0x280,(413+67),null);mj+='(23+7)?xt.substring(0,(19+11))+'..\056':xt;mj+='\u003c\057a\076\074\057\164\u0064\u003e';} return ji.bi(mj);} ,nj:function(id,qj){return'\u003ct\u0064\040\u0077\u0069\144\u0074h="\u0033\060" \u0061\154ign="c\u0065nt\u0065\u0072"\076'+ji.ei(ht+'/\157per\141\164\157\u0072\057\142\u0061n\u002ep\u0068p\u003f'+(qj?'\u0069\u0064='+qj:'\164\u0068r\145ad='+id),localized[2],"\u0062an"+id,'<\u0069\155\147 \163r\143="'+ht+'\057\u0069\u006d\u0061\147\u0065s\057b\141\156\056g\151f"\040\u0077\151\u0064\u0074\150\075"15" h\145i\u0067\u0068t="\u0031\065" b\u006f\u0072\144e\u0072\u003d"0" \141\u006ct\u003d"'+localized[2]+'"\076',(386+164),0x1b8,null)+'<\u002f\u0074\u0064\u003e';} } ;sq.rj=mn.nn();mn.sn(sq.rj,sq.lq,{qn:function(pq){this.oq(pq);this.pq.ii=this.ii.on(this);this.pq.lu=this.lu.on(this);this.pq.ku=this.ku.on(this);this.pq.sj=0;this.tj=new Object();this.uj=0;this.t=this.pq.hj;this.ij=new sq.hi(this.pq);} ,ii:function(){return"\u0063\157m\160\141n\171\u003d"+this.pq.company+"&\163\151\156c\145\u003d"+this.pq.sj;} ,nu:function(pu){this.pq.status.innerHTML=pu;} ,lu:function(s){this.nu(s);} ,jj:function(uh){var id,kj,lj,xi=false,yi=false,oj=false,zi=null,qj=null;for(var i=0;i'+qs.rs(uh,"\u0072\145ason")+'\074/\164\144\076';} if(oj){vj+=ji.nj(id,qj);} vj=ji.bi(vj);var wj=ls.os(kj,this.t);var xj=ls.os(kj+"\u0065n\144",this.t);if(di!=null&&(di.rowIndex<=wj.rowIndex||di.rowIndex>=xj.rowIndex)){ji.li(this.t,di.rowIndex+1);this.t.deleteRow(di.rowIndex);this.tj[id]=null;di=null;} if(di==null){di=this.t.insertRow(wj.rowIndex+1);ji.pi(this.t,wj.rowIndex+2);di.id="\164hr"+id;this.tj[id]=new Array(aj,cj,kj);ls.insertCell(di,"\u006e\u0061\u006de","t\141\142\u006ce",null,036,ji.ci(fj,this.pq.agentservl,id,xi,yi,zi,xt,kj!='ch\141\u0074'));ji.ki(di);ls.insertCell(di,"\u0063\157\156\164i\144","\164\u0061\u0062\154\u0065","c\u0065nte\u0072",null,gj);ji.ki(di);ls.insertCell(di,"\163t\141\164e","tabl\145","\u0063e\156\u0074\145\162",null,lj);ji.ki(di);ls.insertCell(di,"\157p","\164\u0061\u0062\u006ce","ce\156t\145\u0072",null,bj);ji.ki(di);ls.insertCell(di,"t\151\155e","t\141\u0062\154\u0065","\143\145nt\u0065r",null,this.yj(aj));ji.ki(di);ls.insertCell(di,"wait","\164\u0061b\154\u0065","ce\156\164\u0065\u0072",null,(kj!='cha\u0074'?this.yj(cj):'\u002d'));ji.ki(di);ls.insertCell(di,"etc","ta\142\154e","\143e\156te\162",null,vj);if(kj=='\u0077\141\u0069\164'||kj=='\u0070\u0072\151o')return true;} else{this.tj[id]=new Array(aj,cj,kj);dj(this.t,di,"\156a\155\145",ji.ci(fj,this.pq.agentservl,id,xi,yi,zi,xt,kj!='\143\150a\164'));dj(this.t,di,"co\u006e\164\151d",gj);dj(this.t,di,"\163ta\u0074\145",lj);dj(this.t,di,"\u006f\u0070",bj);dj(this.t,di,"\164im\u0065",this.yj(aj));dj(this.t,di,"w\u0061\u0069\164",(kj!='\143h\u0061\164'?this.yj(cj):'\u002d'));dj(this.t,di,"\145tc",vj);} return false;} ,zj:function(){function $j(t,id,_j){var wj=t.rows[id];var xj=t.rows[id+"e\u006e\144"];if(wj==null||xj==null)return;var mk=xj.cells["s\164\u0061\u0074\165s"];if(mk==null)return;mk.innerHTML=(wj.rowIndex+1==xj.rowIndex)?_j:"";mk.height=(wj.rowIndex+1==xj.rowIndex)?0x1e:(8+2);} $j(this.t,"\u0077\u0061i\u0074",this.pq.noclients);$j(this.t,"pr\151\u006f",this.pq.noclients);$j(this.t,"\u0063hat",this.pq.noclients);} ,yj:function(nk){var qk=Math.floor(((new Date()).getTime()-nk-this.uj)/01750);var rk=Math.floor(qk/074);var sk="";qk=qk%(47+13);if(qk<012)qk="\u0030"+qk;if(rk>=(50+10)){var tk=Math.floor(rk/074);rk=rk%074;if(rk<(9+1))rk="0"+rk;sk=tk+"\072";} return sk+rk+":"+qk;} ,uk:function(){for(var i in this.tj){if(this.tj[i]!=null){var value=this.tj[i];var di=ls.os("\164\150r"+i,this.t);if(di!=null){function dj(ds,di,id,ej){var ws=ls.fs(id,di,ds);if(ws)ws.innerHTML=ej;} dj(this.t,di,"\u0074im\u0065",this.yj(value[0]));dj(this.t,di,"\167\141\u0069t",(value[2]!='c\150a\u0074'?this.yj(value[1]):'\055'));} } } } ,ku:function(hk){var ik=false;if(hk.tagName=='\u0074\u0068read\u0073'){var jk=qs.ks(hk,"\u0074\u0069\u006de");var kk=qs.ks(hk,"\162e\u0076\151\u0073\151o\u006e");if(jk)this.uj=(new Date()).getTime()-jk;if(kk)this.pq.sj=kk;for(var i=0;i'+oi+'<\u002f\141\076';} ,di:function(content){return'\u003c\u0074able\u0020\u0077\u0069d\u0074\150\u003d"\061\u0030\u0030\045"\u0020c\u0065ll\u0073\160\141ci\u006eg="\060"\040c\145l\154pad\u0064i\u006e\u0067\075"\060"\040b\u006f\u0072\144\u0065r="\060"\076<\u0074r\u003e'+content+'\u003c/tr><\057t\u0061\142\u006c\u0065>';} ,ei:function(fi,gi,id,ai,bi,ci,xt,vi){var wi=2;var link=gi+"\u003fth\u0072ead="+id;var xi='';} xi+='\074\057\u0074\u0064\076';if(bi){xi+='<\164d \167i\u0064\u0074\150\u003d"30"\u0020\141lig\u006e="ce\u006et\u0065r"\u003e';xi+=ji.ki(link,localized[0],"\111mCe\156te\162"+id,'\u003c\u0069\155g \u0073\162\143="'+ht+'/\151mage\163\u002ft\u0062l\u0069cl\163p\u0065\141k.\147i\u0066" \167i\u0064\u0074\u0068\075"15"\040\150\u0065\151\147ht\u003d"15" \142\u006f\162\u0064e\u0072\u003d"\060" \141\u006c\u0074\075"'+localized[0]+'"\u003e',01200,(411+69),null);xi+='\u003c/\u0074d>';wi++;} if(ai){xi+='\u003ct\u0064 w\u0069dt\150="\u0033\u0030"\u0020\u0061lig\156\u003d"c\145\156ter">';xi+=ji.ki(link+"\u0026vi\u0065\u0077o\156l\u0079\075\164\162\u0075e",localized[1],"I\155\u0043e\u006e\u0074\145r"+id,'\074\151\155\147\040\u0073\u0072\u0063="'+ht+'\u002fi\u006d\u0061\u0067\u0065\u0073\057\164\u0062\u006ci\u0063\u006c\u0072\145a\144\u002eg\151\u0066"\u0020w\151\144t\150\u003d"1\u0035" \150ei\147h\164\075"15"\040b\157\u0072d\u0065\162="\060"\u0020a\154t\075"'+localized[1]+'"\076',(535+105),0740,null);xi+='\074/\u0074d\076';wi++;} if(xt!=""){xi+='<\057t\162>\074t\162>\074\164\144\040c\u006ca\163s="\146ir\163tme\u0073sa\147\u0065"\u0020al\151\147\u006e\u003d"\162\151g\u0068t" c\157lspan\u003d"'+wi+'"\076\074\u0061 \150\162e\u0066\075"\u006a\141\166a\163c\162ipt:\u0076o\u0069\144(0\051"\u0020t\u0069\164le="'+xt+'" \157\u006ecl\u0069ck\075"\141\154\u0065\u0072t(th\u0069s.t\151\164\u006ce);r\145\u0074u\162\u006e \146al\u0073e;"\076';xi+=xt.length>036?xt.substring(0,0x1e)+'\056\u002e\056':xt;xi+='\074\057\u0061\u003e\u003c\u002f\164\u0064>';} return ji.di(xi);} ,yi:function(id,zi){return'\074t\144\040\167id\164\150="\0630"\040al\u0069gn="ce\156\u0074\145r">'+ji.ki(ht+'\u002f\157\160e\u0072a\164\u006f\u0072/\u0062\141n\056p\u0068\u0070\u003f'+(zi?'\151\u0064='+zi:'t\u0068\162\145ad\u003d'+id),localized[2],"\u0062a\u006e"+id,'\u003ci\155\147 \163r\143="'+ht+'\057im\141\u0067\u0065s\u002f\u0062\141\156\056g\151f"\040\u0077\151\u0064\164\u0068\075"15"\u0020\u0068\u0065\u0069g\u0068\u0074\075"\u0031\u0035" b\157r\u0064e\u0072\075"0"\u0020a\u006c\u0074="'+localized[2]+'"\076',(525+195),0x1e0,null)+''+qs.rs(uh,"\162\u0065\u0061\u0073\157n")+'\074\057t\144>';} if(hj){gj+=ji.yi(id,zi);} gj=ji.di(gj);var aj=ls.os("\164"+tj,this.t);var bj=ls.os("t"+tj+"en\u0064",this.t);if(kj!=null&&(kj.rowIndex<=aj.rowIndex||kj.rowIndex>=bj.rowIndex)){this.t.deleteRow(kj.rowIndex);this.mj[id]=null;kj=null;} if(kj==null){kj=this.t.insertRow(aj.rowIndex+1);kj.id="\u0074\150\u0072"+id;this.mj[id]=new Array(dj,fj,tj);ls.insertCell(kj,"\u006ea\u006de","vi\163it\157r",null,null,ji.ei(oj,this.pq.agentservl,id,ai,bi,ci,xt,tj!='\u0063\150\141\164'));ls.insertCell(kj,"\143\157\156\u0074\u0069\144","\u0076i\u0073\151\164\u006f\u0072","ce\u006e\u0074\145r",null,pj);ls.insertCell(kj,"\163\164\u0061\u0074\u0065","\u0076\151s\u0069\164o\162","\143\145\u006e\164e\u0072",null,uj);ls.insertCell(kj,"\157\160","\166i\u0073itor","c\145n\164er",null,ej);ls.insertCell(kj,"time","\166\u0069\163\151tor","c\u0065nt\u0065r",null,this.cj(dj));ls.insertCell(kj,"\u0077\u0061\151\u0074","\u0076i\u0073\151\164\u006f\u0072","\143\145\u006ete\162",null,(tj!='\u0063\150\u0061\164'?this.cj(fj):'-'));ls.insertCell(kj,"\145t\u0063","v\u0069\163\151\u0074\u006fr","\143\u0065nt\u0065\u0072",null,gj);if(tj=='wa\151\164'||tj=='\u0070\u0072io')return true;} else{this.mj[id]=new Array(dj,fj,tj);jj(this.t,kj,"\u006e\u0061m\145",ji.ei(oj,this.pq.agentservl,id,ai,bi,ci,xt,tj!='\143h\u0061\164'));jj(this.t,kj,"c\u006f\u006et\151d",pj);jj(this.t,kj,"\163t\u0061te",uj);jj(this.t,kj,"op",ej);jj(this.t,kj,"t\u0069\155\145",this.cj(dj));jj(this.t,kj,"\167\141\151\164",(tj!='\u0063ha\164'?this.cj(fj):'\055'));jj(this.t,kj,"\145tc",gj);} return false;} ,vj:function(){function wj(t,id){var aj=$(id);var bj=$(id+"\u0065n\u0064");if(aj==null||bj==null){return false;} return aj.rowIndex+1=074){var nk=Math.floor(_j/(58+2));_j=_j%(44+16);if(_j<(7+3))_j="\060"+_j;mk=nk+":";} return mk+_j+"\072"+$j;} ,qk:function(){for(var i in this.mj){if(this.mj[i]!=null){var value=this.mj[i];var kj=ls.os("\u0074h\162"+i,this.t);if(kj!=null){function jj(ds,kj,id,lj){var ws=ls.fs(id,kj,ds);if(ws)ws.innerHTML=lj;} jj(this.t,kj,"t\151\155e",this.cj(value[0]));jj(this.t,kj,"\u0077\u0061\u0069t",(value[2]!='\143\150\u0061t'?this.cj(value[1]):'-'));} } } } ,ku:function(rk){var sk=false;if(rk.tagName=='\164\u0068\u0072\u0065a\144\163'){var tk=qs.ks(rk,"\164i\155\u0065");var uk=qs.ks(rk,"\u0072\u0065\166i\u0073ion");if(tk)this.nj=(new Date()).getTime()-tk;if(uk)this.pq._i=uk;for(var i=0;ihere if you want to edit it. button.delete=Delete @@ -242,7 +243,7 @@ page_bans.title=Blocked page_bans.to=Till page_client.pending_users=You can find awaiting visitors. page_login.error=Entered login/password is incorrect -page_login.intro=Login to access administrative tools, see your visitors and browse the history. +page_login.intro=Please enter your username and password to access administrative tools, see your visitors and browse the history. page_login.login=Login: page_login.password=Password: page_login.remember=Remember diff --git a/src/messenger/webim/operator/login.php b/src/messenger/webim/operator/login.php index 89cdaa72..deb7aeb2 100644 --- a/src/messenger/webim/operator/login.php +++ b/src/messenger/webim/operator/login.php @@ -16,6 +16,8 @@ require_once('../libs/common.php'); require_once('../libs/operator.php'); $errors = array(); +$page = array( 'backPath' => '', 'formisRemember' => true, 'version' => $version); + if( isset($_POST['login']) && isset($_POST['password']) ) { $login = getparam('login'); $password = getparam('password'); @@ -33,10 +35,11 @@ if( isset($_POST['login']) && isset($_POST['password']) ) { exit; } else { $errors[] = getlocal("page_login.error"); + $page['formlogin'] = $login; } } -$page = array( 'backPath' => '', 'formisRemember' => true, 'version' => $version, 'localeLinks' => get_locale_links("$webimroot/operator/login.php") ); +$page['localeLinks'] = get_locale_links("$webimroot/operator/login.php"); start_html_output(); require('../view/login.php'); ?> \ No newline at end of file diff --git a/src/messenger/webim/operator/threadprocessor.php b/src/messenger/webim/operator/threadprocessor.php index 15e3bae5..be0c2aed 100644 --- a/src/messenger/webim/operator/threadprocessor.php +++ b/src/messenger/webim/operator/threadprocessor.php @@ -15,6 +15,7 @@ require_once('../libs/common.php'); require_once('../libs/operator.php'); require_once('../libs/chat.php'); +require_once('../libs/userinfo.php'); $operator = check_login(); @@ -24,6 +25,7 @@ if( isset($_GET['threadid'])) { $threadid = verifyparam( "threadid", "/^(\d{1,9})?$/", ""); $lastid = -1; $page['threadMessages'] = get_messages($threadid,"html",false,$lastid); + $page['thread'] = thread_by_id($threadid); } start_html_output(); diff --git a/src/messenger/webim/view/ban.php b/src/messenger/webim/view/ban.php index 066077b0..09bfde8b 100644 --- a/src/messenger/webim/view/ban.php +++ b/src/messenger/webim/view/ban.php @@ -11,107 +11,85 @@ * Contributors: * Evgeny Gryaznov - initial API and implementation */ + +$page['title'] = getlocal("page_ban.title"); + +function tpl_content() { global $page, $webimroot, $errors; ?> - - - - - - - - - - - <?php echo getlocal("page_ban.title") ?> - <?php echo getlocal("app.title") ?> - - -"> -"> - - - - - - - - -
- -
-

-
|">|">
- - - - - + -
+ +
+
+ + + + +

- - 0 ) { ?> - - - - - - -
- 0 ) { - print getlocal("errors.header"); - foreach( $errors as $e ) { - print getlocal("errors.prefix"); - print $e; - print getlocal("errors.suffix"); - } - print getlocal("errors.footer"); - } ?> - -
- - - -
-
- - -
-
- - - - - - - - - - - - - -
*
- -
*
- -
- -
- - - - -
-
-
- - +
+ + + + +
+ +
+
+
*
+
+ +
+
+
+
+
+
*
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+ +
+ +
+
+ +
+ +
+ +
+ +
+ + + + \ No newline at end of file diff --git a/src/messenger/webim/view/inc_locales.php b/src/messenger/webim/view/inc_locales.php index 9ed2e6f8..c23bf710 100644 --- a/src/messenger/webim/view/inc_locales.php +++ b/src/messenger/webim/view/inc_locales.php @@ -2,18 +2,23 @@ function menuloc($id) { global $current_locale; if($current_locale == $id) { - return " class=\"active\""; + echo " class=\"active\""; } return ""; } +function tpl_menu() { global $page, $webimroot, $errors, $current_locale; +?> + +
  • +

    locales

    + +
  • + -$page['right_menu'] = ""; - -if(isset($page) && isset($page['localeLinks'])) { - $page['right_menu'] .= "
  • \n

    locales

    \n\n
  • "; + \ No newline at end of file diff --git a/src/messenger/webim/view/inc_main.php b/src/messenger/webim/view/inc_main.php index 18d599ae..02057f5f 100644 --- a/src/messenger/webim/view/inc_main.php +++ b/src/messenger/webim/view/inc_main.php @@ -3,14 +3,18 @@ + <?php echo $page['title'] ?> - <?php echo getlocal("app.title") ?> - -
    + style="min-width: 400px;"> +
    ">
    +
    + +
    +
    - + diff --git a/src/messenger/webim/view/inc_menu.php b/src/messenger/webim/view/inc_menu.php index 4b2b042a..3eeb6bc8 100644 --- a/src/messenger/webim/view/inc_menu.php +++ b/src/messenger/webim/view/inc_menu.php @@ -7,7 +7,7 @@ function menuli($name) { return ""; } -function rightmenu_content() { global $page, $webimroot, $errors; +function tpl_menu() { global $page, $webimroot, $errors; if(isset($page) && isset($page['operator'])) { ?>
  • main

    diff --git a/src/messenger/webim/view/login.php b/src/messenger/webim/view/login.php index 5cad58b9..c5741d82 100644 --- a/src/messenger/webim/view/login.php +++ b/src/messenger/webim/view/login.php @@ -13,35 +13,33 @@ */ require_once('inc_locales.php'); -$page['title'] = getlocal("page_login.title"); - -function rightmenu_content() { global $page, $webimroot, $errors, $current_locale; - $message = get_image(get_app_location(false,false)."/button.php?image=webim&lang=$current_locale", 0, 0); - $code = generate_button("",$current_locale,"",$message,false,false); -?> -
  • -

    contact us

    - -
  • - - -
    -
    - +
    +

    +
    -
    + +
    +

    +
    + +

    + + +
    @@ -73,12 +71,6 @@ require_once('inc_errors.php');
    - -
    - -
    - -
    diff --git a/src/messenger/webim/view/pending_users.php b/src/messenger/webim/view/pending_users.php index 95f5b94e..a37ab3d2 100644 --- a/src/messenger/webim/view/pending_users.php +++ b/src/messenger/webim/view/pending_users.php @@ -11,15 +11,13 @@ * Contributors: * Evgeny Gryaznov - initial API and implementation */ -?> - - +$page['title'] = getlocal("clients.title"); - - +function tpl_header() { global $page, $webimroot; +?> - +/images/favicon.ico" type="image/x-icon"/> - - <?php echo getlocal("clients.title") ?> - <?php echo getlocal("app.title") ?> - +function tpl_content() { global $page, $webimroot; +?> -"> -"> - + +
    + +
    +
    - - - +
    + - - -
    - -
    -

    -
    |">
    - - -
    - -
    -
    - - - - - - - -
    - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - + + + +
    - - - - - -
    -
    - - - - - -
    -
    - - - - -
    -
    Loading....
    -
    - - - - - - +
    +
    -
    -
    -
    - - + \ No newline at end of file diff --git a/src/messenger/webim/view/thread_log.php b/src/messenger/webim/view/thread_log.php index 86fc995b..4c5ca278 100644 --- a/src/messenger/webim/view/thread_log.php +++ b/src/messenger/webim/view/thread_log.php @@ -11,66 +11,73 @@ * Contributors: * Evgeny Gryaznov - initial API and implementation */ + +$page['title'] = getlocal("thread.chat_log"); + +function tpl_content() { global $page, $webimroot, $errors; +$chatthread = $page['thread']; ?> - - - - - - - - - - - - <?php echo getlocal("thread.chat_log") ?> - <?php echo getlocal("app.title") ?> - - -"> -"> - - - - - - - - -
    - -

    - -

    - - - - - - - - -
    - -
    - - - - - -
    +
    +
    + +
    + : +
    +
    + +
    +
    + +
    + : +
    +
    + +
    +
    + + +
    + : +
    +
    + +
    +
    + + +
    + : +
    +
    + + () +
    +
    +
    + +
    + +
    +


    -
    - - + \ No newline at end of file diff --git a/src/messenger/webim/view/thread_search.php b/src/messenger/webim/view/thread_search.php index 2d52fb5b..4c610a08 100644 --- a/src/messenger/webim/view/thread_search.php +++ b/src/messenger/webim/view/thread_search.php @@ -69,7 +69,7 @@ if( $page['pagination.items'] ) { foreach( $page['pagination.items'] as $chatthread ) { ?> - +