Added Dutch support (Thanks Peter)

Ylian Saint-Hilaire committed Dec 17, 2019 at 14:06 UTC c890eb5468f2cc5aed0ef53be8a1c9fc835f4b42
89 files changed +28445 -1485
package.json
+1 -1
@@ -1,6 +1,6 @@
1 {
2 "name": "meshcentral",
3 - "version": "0.4.5-w",
3 + "version": "0.4.5-x",
4 "keywords": [
5 "Remote Management",
6 "Intel AMT",
public/translations/player-min_nl.htm new
+1
@@ -0,0 +1 @@
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><body style=overflow:hidden;background-color:#000><div id=p11 class=noselect style=overflow:hidden><div id=deskarea0><div id=deskarea1 class=areaHead><div class=toright2><div class=deskareaicon title="Schakel weergavemodus"onclick=toggleAspectRatio(1)>⇲</div></div><div><input id=OpenFileButton type=button value="Open bestand..."onclick=openfile()> <span id=deskstatus></span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x style="max-height:calc(100vh - 54px);height:calc(100vh - 54px)"onclick=togglePause()><div id=bigok style="display:none;left:calc((100vh / 2))"><b>✓</b></div><div id=bigfail style="display:none;left:calc((100vh / 2))"><b>✗</b></div><div id=metadatadiv style=padding:20px;color:#d3d3d3;text-align:left;display:none></div><div id=DeskParent><canvas id=Desk width=640 height=480></canvas></div><div id=TermParent style=display:none><pre id=Term></pre></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=clearConsoleMsg()></div></div><div id=deskarea4 class=areaFoot><div class=toright2><div id=timespan style=padding-top:4px;padding-right:4px>00:00:00</div></div><div>&nbsp; <input id=PlayButton type=button value=Afspelen disabled onclick=play()> <input id=PauseButton type=button value=Pause disabled onclick=pause()> <input id=RestartButton type=button value=Herstarten disabled onclick=restart()> <select id=PlaySpeed onchange=this.blur()><option value=4>kwart snelheid<option value=2>halve snelheid<option value=1 selected>Normale snelheid<option value=0.5>2x Snelheid<option value=0.25>4x snelheid<option value=0.1>10x Sneheid</select></div></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>✖</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Afbreken onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=Oke onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=Verwijderen style=display:none onclick=dialogclose(2)></div></div></div></div><script>var recFile=null,recFilePtr=0,recFileStartTime=0,recFileLastTime=0,recFileEndTime=0,recFileMetadata=null,recFileProtocol=0,agentDesktop=null,amtDesktop=null,playing=!1,readState=0,waitTimer=null,waitTimerArgs=null,deskAspectRatio=0,currentDeltaTimeTotalSec=0;function start(){window.onresize=deskAdjust,document.ondrop=ondrop,document.ondragover=ondragover,document.ondragleave=ondragleave,document.onkeypress=onkeypress,Q("PlaySpeed").value=1,cleanup()}function readNextBlock(l){if(recFilePtr+16>recFile.size)QS("progressbar").width="100%",l(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);if(recFilePtr+16+a>recFile.size)QS("progressbar").width="100%",l(-1);else{var i=new FileReader;i.onload=function(){recFilePtr+=16+a,QS("progressbar").width=0==recFileEndTime?Math.floor(recFilePtr/recFile.size*100)+"%":Math.floor((recFileLastTime-recFileStartTime)/(recFileEndTime-recFileStartTime)*100)+"%",l(e,t,r,this.result)},i.readAsBinaryString(recFile.slice(recFilePtr+16,recFilePtr+16+a))}},e.readAsBinaryString(recFile.slice(recFilePtr,recFilePtr+16))}}function readLastBlock(i){if(recFile.size<32)i(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);3==e&&16==a&&"MeshCentralMCREC"==this.result.substring(16,32)?i(e,t,r):i(-1)},e.readAsBinaryString(recFile.slice(recFile.size-32,recFile.size))}}function addInfo(e,t){return null==t?"":addInfoNoEsc(e,EscapeHtml(t))}function addInfoNoEsc(e,t){return null==t?"":"<span style=color:gray>"+EscapeHtml(e)+"</span>:&nbsp;<span style=font-size:20px>"+t+"</span><br/>"}function processFirstBlock(e,t,a,r){if(recFileProtocol=0,1==e&&0==t){try{recFileMetadata=JSON.parse(r)}catch(e){return void cleanup()}if(null!=recFileMetadata&&"MeshCentralRelaySession"==recFileMetadata.magic&&1==recFileMetadata.ver){var i="";if(i+=addInfo("Time",recFileMetadata.time),0!=recFileEndTime){var l=Math.floor((recFileEndTime-a)/1e3);i+=addInfo("Looptijd",format("{0} seconde {1}",l,1<l?"s":""))}if(i+=addInfo("Gebruikersnaam",recFileMetadata.username),i+=addInfo("GebruikersID",recFileMetadata.userid),i+=addInfo("SessieID",recFileMetadata.sessionid),recFileMetadata.ipaddr1&&recFileMetadata.ipaddr2&&(i+=addInfo("Adressen",format("{0} tot {1}",recFileMetadata.ipaddr1,recFileMetadata.ipaddr2))),recFileMetadata.devicename&&(i+=addInfo("Apparaat naam",recFileMetadata.devicename)),i+=addInfo("NodeID",recFileMetadata.nodeid),recFileMetadata.protocol){var n=recFileMetadata.protocol;1==n?n="MeshCentral Terminal":2==n?n="MeshCentral Desktop":100==n?n="Intel&reg; AMT WSMAN":101==n&&(n="Intel&reg; AMT omleiding"),i+=addInfoNoEsc("Protocol",n)}QV("DeskParent",!0),QV("TermParent",!1),1==recFileMetadata.protocol?(recFileProtocol=1,i+="<br /><br /><span style=color:gray>Druk op [spatie] om te spelen / pauzeren.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a):2==recFileMetadata.protocol?(recFileProtocol=2,i+="<br /><br /><span style=color:gray>Druk op [spatie] om te spelen / pauzeren.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(agentDesktop=CreateAgentRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,agentDesktop.State=3,deskAdjust()):101==recFileMetadata.protocol&&(recFileProtocol=101,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start(),deskAdjust()),QV("metadatadiv",!0),QH("metadatadiv",i),QH("deskstatus",recFile.name)}else cleanup()}else cleanup()}function processBlock(e,t,a,r){if(e<0)pause();else{var i=Math.round((a-recFileLastTime)*parseFloat(Q("PlaySpeed").value));i<5?processBlockEx(e,t,a,r):(waitTimerArgs=[e,t,a,r],waitTimer=setTimeout(function(){waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3])},i))}}function processBlockEx(e,t,a,r){if(0!=playing){var i=0!=(1&t),l=0!=(2&t),n=Math.floor((a-recFileStartTime)/1e3);if(currentDeltaTimeTotalSec!=n){currentDeltaTimeTotalSec=n;var o=Math.floor(n/3600);n-=3600*o;var s=Math.floor(n/60);n-=60*o;var d=Math.floor(n);QH("timespan",pad2(o)+":"+pad2(s)+":"+pad2(d))}2==e&&i&&!l?1==recFileProtocol?agentTerminal.ProcessData(r):2==recFileProtocol?agentDesktop.ProcessData(r):101==recFileProtocol&&(0==readState&&"4100000000000000"==rstr2hex(r)?(readState=1,8<r.length&&amtDesktop.ProcessData(r.substring(8))):1==readState&&amtDesktop.ProcessData(r)):2==e&&i&&l&&101==recFileProtocol&&"0000000008080001000700070003050200000000"==rstr2hex(r)&&(amtDesktop.bpp=1),recFileLastTime=a,playing&&readNextBlock(processBlock)}}function cleanup(){recFilePtr=0,playing=!1,(recFileMetadata=recFile=null)!=agentDesktop&&(agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height),agentDesktop=null),null!=amtDesktop&&(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),amtDesktop=null),recFileEndTime=currentDeltaTimeTotalSec=readState=0,(agentTerminal=waitTimerArgs=null)!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null),QH("deskstatus",""),QE("PlayButton",!1),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("metadatadiv",!0),QH("metadatadiv",'<span style="font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px">MeshCentral Session Player</span><br /><br /><span style=color:gray>Sleep een .mcrec-bestand of klik op "Bestand openen..."</span>'),QV("DeskParent",!0),QV("TermParent",!1)}function ondrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer){var t=[];for(var a in e.dataTransfer.files)null!=e.dataTransfer.files[a].type&&null!=e.dataTransfer.files[a].size&&0!=e.dataTransfer.files[a].size&&e.dataTransfer.files[a].name.endsWith(".mcrec")&&t.push(e.dataTransfer.files[a]);0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}))}}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,dragtimer=null;function ondragover(e){haltEvent(e),null!=dragtimer&&(clearTimeout(dragtimer),dragtimer=null);QV("bigok",!0),QV("bigfail",!1)}function ondragleave(e){haltEvent(e),dragtimer=setTimeout(function(){QV("bigfail",!1),QV("bigok",!1),dragtimer=null},10)}function onkeypress(e){xxdialogMode||(" "==e.key&&(togglePause(),haltEvent(e)),"1"==e.key&&(Q("PlaySpeed").value=4,haltEvent(e)),"2"==e.key&&(Q("PlaySpeed").value=2,haltEvent(e)),"3"==e.key&&(Q("PlaySpeed").value=1,haltEvent(e)),"4"==e.key&&(Q("PlaySpeed").value=.5,haltEvent(e)),"5"==e.key&&(Q("PlaySpeed").value=.25,haltEvent(e)),"6"==e.key&&(Q("PlaySpeed").value=.1,haltEvent(e)),"0"==e.key&&(pause(),restart(),haltEvent(e)))}function openfile(){setDialogMode(2,"Open bestand...",3,openfileEx,'<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />'),QE("idx_dlgOkButton",!1)}function openfileEx(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}),Q("OpenFileButton").blur())}function openfileChanged(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}QE("idx_dlgOkButton",1==t.length)}function togglePause(){return null!=recFile&&(1==playing?pause():recFilePtr!=recFile.size&&play()),!1}function play(){Q("PlayButton").blur(),1!=playing&&0!=recFileProtocol&&(playing=!0,QV("metadatadiv",!1),QE("PlayButton",!1),QE("PauseButton",!0),QE("RestartButton",!1),1==recFileProtocol&&null==agentTerminal&&(QV("DeskParent",!1),QV("TermParent",!0),agentTerminal=CreateAmtRemoteTerminal("Term",{}),agentTerminal.State=3),readNextBlock(processBlock))}function pause(){Q("PauseButton").blur(),0!=playing&&(playing=!1,QE("PlayButton",recFilePtr!=recFile.size),QE("PauseButton",!1),QE("RestartButton",0!=recFilePtr),null!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3]),waitTimerArgs=null))}function restart(){Q("RestartButton").blur(),1!=playing&&(currentDeltaTimeTotalSec=readState=recFilePtr=0,QV("metadatadiv",!0),QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("DeskParent",!0),QV("TermParent",!1),agentDesktop?agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height):amtDesktop?(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start()):agentTerminal=agentTerminal&&null)}function clearConsoleMsg(){QH("p11DeskConsoleMsg","")}function toggleAspectRatio(e){1===e&&(deskAspectRatio=(deskAspectRatio+1)%3),deskAdjust()}function deskAdjust(){var e=Q("DeskParent").clientHeight,t=Q("DeskParent").clientWidth,a=Q("Desk").height,r=Q("Desk").width;if(2==deskAspectRatio)QS("Desk")["margin-top"]=null,QS("Desk").height="100%",QS("Desk").width="100%",QS("DeskParent").overflow="hidden";else if(1==deskAspectRatio)QS("Desk")["margin-top"]="0px",QS("Desk").height=a+"px",QS("Desk").width=r+"px",QS("DeskParent").overflow="scroll";else{if(a/r<e/t){var i=a*t/r+"px";QS("Desk").height=i,QS("Desk").width="100%"}else{var l=r*e/a+"px";QS("Desk").height="100%",QS("Desk").width=l}QS("Desk")["margin-top"]=null,QS("DeskParent").overflow="hidden"}}var xxcurrentView=-1;function setDialogMode(e,t,a,r,i,l){xxdialogMode=e,xxdialogFunc=r,xxdialogButtons=a,xxdialogTag=l,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&a),QV("idx_dlgCancelButton",2&a),QV("id_dialogclose",2&a||8&a),QV("idx_dlgDeleteButton",4&a),QV("idx_dlgButtonBar",7&a),t&&QH("id_dialogtitle",t);for(var n=1;n<3;n++)QV("dialog"+n,n==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){var t=xxdialogFunc,a=xxdialogButtons,r=xxdialogTag;setDialogMode(),(8&a||e)&&t&&t(e,r)}function messagebox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e)}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function pad2(e){var t="00"+e;return t.substr(t.length-2)}function format(e){var a=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==a[t]?a[t]:e})}start()</script>
\ No newline at end of file
public/translations/player_nl.htm new
+537
@@ -0,0 +1,537 @@
1 +<!DOCTYPE html><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head>
2 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 + <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
4 + <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 + <meta name="apple-mobile-web-app-capable" content="yes">
6 + <meta name="format-detection" content="telephone=no">
7 + <link type="text/css" href="styles/style.css" media="screen" rel="stylesheet" title="CSS">
8 + <script type="text/javascript" src="scripts/common-0.0.1.js"></script>
9 + <script type="text/javascript" src="scripts/agent-desktop-0.0.2.js"></script>
10 + <script type="text/javascript" src="scripts/amt-desktop-0.0.2.js"></script>
11 + <script type="text/javascript" src="scripts/amt-terminal-0.0.2.js"></script>
12 + <script type="text/javascript" src="scripts/zlib.js"></script>
13 + <script type="text/javascript" src="scripts/zlib-inflate.js"></script>
14 + <script type="text/javascript" src="scripts/zlib-adler32.js"></script>
15 + <script type="text/javascript" src="scripts/zlib-crc32.js"></script>
16 +</head>
17 +<body style="overflow:hidden;background-color:black">
18 + <div id="p11" class="noselect" style="overflow:hidden">
19 + <div id="deskarea0">
20 + <div id="deskarea1" class="areaHead">
21 + <div class="toright2">
22 + <div class="deskareaicon" title="Schakel weergavemodus" onclick="toggleAspectRatio(1)">⇲</div>
23 + </div>
24 + <div>
25 + <input id="OpenFileButton" type="button" value="Open bestand..." onclick="openfile()">
26 + <span id="deskstatus"></span>
27 + </div>
28 + </div>
29 + <div id="deskarea2" style="">
30 + <div class="areaProgress"><div id="progressbar" style=""></div></div>
31 + </div>
32 + <div id="deskarea3x" style="max-height:calc(100vh - 54px);height:calc(100vh - 54px);" onclick="togglePause()">
33 + <div id="bigok" style="display:none;left:calc((100vh / 2))"><b>✓</b></div>
34 + <div id="bigfail" style="display:none;left:calc((100vh / 2))"><b>✗</b></div>
35 + <div id="metadatadiv" style="padding:20px;color:lightgrey;text-align:left;display:none"></div>
36 + <div id="DeskParent">
37 + <canvas id="Desk" width="640" height="480"></canvas>
38 + </div>
39 + <div id="TermParent" style="display:none">
40 + <pre id="Term"></pre>
41 + </div>
42 + <div id="p11DeskConsoleMsg" style="display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:yellow;background-color:rgba(0,0,0,0.6);padding:10px;border-radius:5px" onclick="clearConsoleMsg()"></div>
43 + </div>
44 + <div id="deskarea4" class="areaFoot">
45 + <div class="toright2">
46 + <div id="timespan" style="padding-top:4px;padding-right:4px">00:00:00</div>
47 + </div>
48 + <div>
49 + &nbsp;
50 + <input id="PlayButton" type="button" value="Afspelen" disabled="disabled" onclick="play()">
51 + <input id="PauseButton" type="button" value="Pause" disabled="disabled" onclick="pause()">
52 + <input id="RestartButton" type="button" value="Herstarten" disabled="disabled" onclick="restart()">
53 + <select id="PlaySpeed" onchange="this.blur();">
54 + <option value="4">kwart snelheid</option>
55 + <option value="2">halve snelheid</option>
56 + <option value="1" selected="">Normale snelheid</option>
57 + <option value="0.5">2x Snelheid</option>
58 + <option value="0.25">4x snelheid</option>
59 + <option value="0.1">10x Sneheid</option>
60 + </select>
61 + </div>
62 + </div>
63 + </div>
64 + <div id="dialog" class="noselect" style="display:none">
65 + <div id="dialogHeader">
66 + <div tabindex="0" id="id_dialogclose" onclick="setDialogMode()" onkeypress="if (event.key == 'Enter') setDialogMode()">✖</div>
67 + <div id="id_dialogtitle"></div>
68 + </div>
69 + <div id="dialogBody">
70 + <div id="dialog1">
71 + <div id="id_dialogMessage" style=""></div>
72 + </div>
73 + <div id="dialog2" style="">
74 + <div id="id_dialogOptions"></div>
75 + </div>
76 + </div>
77 + <div id="idx_dlgButtonBar">
78 + <input id="idx_dlgCancelButton" type="button" value="Afbreken" style="" onclick="dialogclose(0)">
79 + <input id="idx_dlgOkButton" type="button" value="Oke" style="" onclick="dialogclose(1)">
80 + <div><input id="idx_dlgDeleteButton" type="button" value="Verwijderen" style="display:none" onclick="dialogclose(2)"></div>
81 + </div>
82 + </div>
83 + </div>
84 + <script>
85 + var recFile = null;
86 + var recFilePtr = 0;
87 + var recFileStartTime = 0;
88 + var recFileLastTime = 0;
89 + var recFileEndTime = 0;
90 + var recFileMetadata = null;
91 + var recFileProtocol = 0;
92 + var agentDesktop = null;
93 + var amtDesktop = null;
94 + var playing = false;
95 + var readState = 0;
96 + var waitTimer = null;
97 + var waitTimerArgs = null;
98 + var deskAspectRatio = 0;
99 + var currentDeltaTimeTotalSec = 0;
100 +
101 + function start() {
102 + window.onresize = deskAdjust;
103 + document.ondrop = ondrop;
104 + document.ondragover = ondragover;
105 + document.ondragleave = ondragleave;
106 + document.onkeypress = onkeypress;
107 + Q('PlaySpeed').value = 1;
108 + cleanup();
109 + }
110 +
111 + function readNextBlock(func) {
112 + if ((recFilePtr + 16) > recFile.size) { QS('progressbar').width = '100%'; func(-1); } else {
113 + var fr = new FileReader();
114 + fr.onload = function () {
115 + var type = ReadShort(this.result, 0);
116 + var flags = ReadShort(this.result, 2);
117 + var size = ReadInt(this.result, 4);
118 + var time = (ReadInt(this.result, 8) << 32) + ReadInt(this.result, 12);
119 + if ((recFilePtr + 16 + size) > recFile.size) { QS('progressbar').width = '100%'; func(-1); } else {
120 + var fr2 = new FileReader();
121 + fr2.onload = function () {
122 + recFilePtr += (16 + size);
123 + if (recFileEndTime == 0) {
124 + // File pointer progress bar
125 + QS('progressbar').width = Math.floor(100 * (recFilePtr / recFile.size)) + '%';
126 + } else {
127 + // Time progress bar
128 + QS('progressbar').width = Math.floor(((recFileLastTime - recFileStartTime) / (recFileEndTime - recFileStartTime)) * 100) + '%';
129 + }
130 + func(type, flags, time, this.result);
131 + };
132 + fr2.readAsBinaryString(recFile.slice(recFilePtr + 16, recFilePtr + 16 + size));
133 + }
134 + };
135 + fr.readAsBinaryString(recFile.slice(recFilePtr, recFilePtr + 16));
136 + }
137 + }
138 +
139 + function readLastBlock(func) {
140 + if (recFile.size < 32) { func(-1); } else {
141 + var fr = new FileReader();
142 + fr.onload = function () {
143 + var type = ReadShort(this.result, 0);
144 + var flags = ReadShort(this.result, 2);
145 + var size = ReadInt(this.result, 4);
146 + var time = (ReadInt(this.result, 8) << 32) + ReadInt(this.result, 12);
147 + if ((type == 3) && (size == 16) && (this.result.substring(16, 32) == 'MeshCentralMCREC')) { func(type, flags, time); } else { func(-1); }
148 + };
149 + fr.readAsBinaryString(recFile.slice(recFile.size - 32, recFile.size));
150 + }
151 + }
152 +
153 + function addInfo(name, value) { if (value == null) return ''; return addInfoNoEsc(name, EscapeHtml(value)); }
154 +
155 + function addInfoNoEsc(name, value) {
156 + if (value == null) return '';
157 + return '<span style=color:gray>' + EscapeHtml(name) + '</span>:&nbsp;<span style=font-size:20px>' + value + '</span><br/>';
158 + }
159 +
160 + function processFirstBlock(type, flags, time, data) {
161 + recFileProtocol = 0;
162 + if ((type != 1) || (flags != 0)) { cleanup(); return; }
163 + try { recFileMetadata = JSON.parse(data) } catch (ex) { cleanup(); return; }
164 + if ((recFileMetadata == null) || (recFileMetadata.magic != 'MeshCentralRelaySession') || (recFileMetadata.ver != 1)) { cleanup(); return; }
165 + var x = '';
166 + x += addInfo("Time", recFileMetadata.time);
167 + if (recFileEndTime != 0) { var secs = Math.floor((recFileEndTime - time) / 1000); x += addInfo("Looptijd", format("{0} seconde {1}", secs, (secs > 1) ? 's' : '')); }
168 + x += addInfo("Gebruikersnaam", recFileMetadata.username);
169 + x += addInfo("GebruikersID", recFileMetadata.userid);
170 + x += addInfo("SessieID", recFileMetadata.sessionid);
171 + if (recFileMetadata.ipaddr1 && recFileMetadata.ipaddr2) { x += addInfo("Adressen", format("{0} tot {1}", recFileMetadata.ipaddr1, recFileMetadata.ipaddr2)); }
172 + if (recFileMetadata.devicename) { x += addInfo("Apparaat naam", recFileMetadata.devicename); }
173 + x += addInfo("NodeID", recFileMetadata.nodeid);
174 + if (recFileMetadata.protocol) {
175 + var p = recFileMetadata.protocol;
176 + if (p == 1) { p = "MeshCentral Terminal"; }
177 + else if (p == 2) { p = "MeshCentral Desktop"; }
178 + else if (p == 100) { p = "Intel&reg; AMT WSMAN"; }
179 + else if (p == 101) { p = "Intel&reg; AMT omleiding"; }
180 + x += addInfoNoEsc("Protocol", p);
181 + }
182 + QV('DeskParent', true);
183 + QV('TermParent', false);
184 + if (recFileMetadata.protocol == 1) {
185 + // MeshCentral remote terminal
186 + recFileProtocol = 1;
187 + x += '<br /><br /><span style=color:gray>' + "Druk op [spatie] om te spelen / pauzeren." + '</span>';
188 + QE('PlayButton', true);
189 + QE('PauseButton', false);
190 + QE('RestartButton', false);
191 + recFileStartTime = recFileLastTime = time;
192 + }
193 + else if (recFileMetadata.protocol == 2) {
194 + // MeshCentral remote desktop
195 + recFileProtocol = 2;
196 + x += '<br /><br /><span style=color:gray>' + "Druk op [spatie] om te spelen / pauzeren." + '</span>';
197 + QE('PlayButton', true);
198 + QE('PauseButton', false);
199 + QE('RestartButton', false);
200 + recFileStartTime = recFileLastTime = time;
201 + agentDesktop = CreateAgentRemoteDesktop('Desk');
202 + agentDesktop.onScreenSizeChange = deskAdjust;
203 + agentDesktop.State = 3;
204 + deskAdjust();
205 + }
206 + else if (recFileMetadata.protocol == 101) {
207 + // Intel AMT Redirection
208 + recFileProtocol = 101;
209 + x += '<br /><br /><span style=color:gray>Press [space] to play/pause.</span>';
210 + QE('PlayButton', true);
211 + QE('PauseButton', false);
212 + QE('RestartButton', false);
213 + recFileStartTime = recFileLastTime = time;
214 + amtDesktop = CreateAmtRemoteDesktop('Desk');
215 + amtDesktop.onScreenSizeChange = deskAdjust;
216 + amtDesktop.State = 3;
217 + amtDesktop.Start();
218 + deskAdjust();
219 + }
220 + QV('metadatadiv', true);
221 + QH('metadatadiv', x);
222 + QH('deskstatus', recFile.name);
223 + }
224 +
225 + function processBlock(type, flags, time, data) {
226 + if (type < 0) { pause(); return; }
227 + var waitTime = Math.round((time - recFileLastTime) * parseFloat(Q('PlaySpeed').value));
228 + if (waitTime < 5) {
229 + processBlockEx(type, flags, time, data);
230 + } else {
231 + waitTimerArgs = [type, flags, time, data]
232 + waitTimer = setTimeout(function () { waitTimer = null; processBlockEx(waitTimerArgs[0], waitTimerArgs[1], waitTimerArgs[2], waitTimerArgs[3]); }, waitTime);
233 + }
234 + }
235 +
236 + function processBlockEx(type, flags, time, data) {
237 + if (playing == false) return;
238 + var flagBinary = (flags & 1) != 0, flagUser = (flags & 2) != 0;
239 +
240 + // Update the clock
241 + var deltaTimeTotalSec = Math.floor((time - recFileStartTime) / 1000);
242 + if (currentDeltaTimeTotalSec != deltaTimeTotalSec) {
243 + currentDeltaTimeTotalSec = deltaTimeTotalSec;
244 + var deltaTimeHours = Math.floor(deltaTimeTotalSec / 3600);
245 + deltaTimeTotalSec -= (deltaTimeHours * 3600)
246 + var deltaTimeMinutes = Math.floor(deltaTimeTotalSec / 60);
247 + deltaTimeTotalSec -= (deltaTimeHours * 60)
248 + var deltaTimeSeconds = Math.floor(deltaTimeTotalSec);
249 + QH('timespan', pad2(deltaTimeHours) + ':' + pad2(deltaTimeMinutes) + ':' + pad2(deltaTimeSeconds))
250 + }
251 +
252 + if ((type == 2) && flagBinary && !flagUser) {
253 + // Device --> User data
254 + if (recFileProtocol == 1) {
255 + // MeshCentral Terminal
256 + agentTerminal.ProcessData(data);
257 + } else if (recFileProtocol == 2) {
258 + // MeshCentral Remote Desktop
259 + agentDesktop.ProcessData(data);
260 + } else if (recFileProtocol == 101) {
261 + // Intel AMT KVM
262 + if ((readState == 0) && (rstr2hex(data) == '4100000000000000')) {
263 + // We are not authenticated, KVM data starts here.
264 + readState = 1;
265 + if (data.length > 8) { amtDesktop.ProcessData(data.substring(8)); }
266 + } else if (readState == 1) {
267 + amtDesktop.ProcessData(data);
268 + }
269 + }
270 + } else if ((type == 2) && flagBinary && flagUser) {
271 + // User --> Device data
272 + if (recFileProtocol == 101) {
273 + // Intel AMT KVM
274 + if (rstr2hex(data) == '0000000008080001000700070003050200000000') { amtDesktop.bpp = 1; } // Switch to 1 byte per pixel.
275 + }
276 + }
277 +
278 + recFileLastTime = time;
279 + if (playing) { readNextBlock(processBlock); }
280 + }
281 +
282 + function cleanup() {
283 + recFile = null;
284 + recFilePtr = 0;
285 + recFileMetadata = null;
286 + playing = false;
287 + if (agentDesktop != null) { agentDesktop.Canvas.clearRect(0, 0, agentDesktop.CanvasId.width, agentDesktop.CanvasId.height); agentDesktop = null; }
288 + if (amtDesktop != null) { amtDesktop.canvas.clearRect(0, 0, amtDesktop.CanvasId.width, amtDesktop.CanvasId.height); amtDesktop = null; }
289 + readState = 0;
290 + waitTimerArgs = null;
291 + currentDeltaTimeTotalSec = 0;
292 + recFileEndTime = 0;
293 + agentTerminal = null;
294 + if (waitTimer != null) { clearTimeout(waitTimer); waitTimer = null; }
295 + QH('deskstatus', '');
296 + QE('PlayButton', false);
297 + QE('PauseButton', false);
298 + QE('RestartButton', false);
299 + QS('progressbar').width = '0px';
300 + QH('timespan', '00:00:00');
301 + QV('metadatadiv', true);
302 + QH('metadatadiv', '<span style=\"font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px\">MeshCentral Session Player</span><br /><br /><span style=color:gray>' + "Sleep een .mcrec-bestand of klik op \"Bestand openen...\"" + '</span>');
303 + QV('DeskParent', true);
304 + QV('TermParent', false);
305 + }
306 +
307 + function ondrop(e) {
308 + haltEvent(e);
309 + QV('bigfail', false);
310 + QV('bigok', false);
311 +
312 + // Check if these are files we can upload, remove all folders.
313 + if (e.dataTransfer == null) return;
314 + var files = [];
315 + for (var i in e.dataTransfer.files) {
316 + if ((e.dataTransfer.files[i].type != null) && (e.dataTransfer.files[i].size != null) && (e.dataTransfer.files[i].size != 0) && (e.dataTransfer.files[i].name.endsWith('.mcrec'))) {
317 + files.push(e.dataTransfer.files[i]);
318 + }
319 + }
320 + if (files.length == 0) return;
321 + cleanup();
322 + recFile = files[0];
323 + recFilePtr = 0;
324 + readNextBlock(processFirstBlock);
325 + readLastBlock(function (type, flags, time) { if (type == 3) { recFileEndTime = time; } else { recFileEndTime = 0; } });
326 + }
327 +
328 + var dragtimer = null;
329 + function ondragover(e) {
330 + haltEvent(e);
331 + if (dragtimer != null) { clearTimeout(dragtimer); dragtimer = null; }
332 + var ac = true;
333 + QV('bigok', ac);
334 + QV('bigfail', !ac);
335 + }
336 +
337 + function ondragleave(e) {
338 + haltEvent(e);
339 + dragtimer = setTimeout(function () { QV('bigfail', false); QV('bigok', false); dragtimer = null; }, 10);
340 + }
341 +
342 + function onkeypress(e) {
343 + if (xxdialogMode) return;
344 + if (e.key == ' ') { togglePause(); haltEvent(e); }
345 + if (e.key == '1') { Q('PlaySpeed').value = 4; haltEvent(e); }
346 + if (e.key == '2') { Q('PlaySpeed').value = 2; haltEvent(e); }
347 + if (e.key == '3') { Q('PlaySpeed').value = 1; haltEvent(e); }
348 + if (e.key == '4') { Q('PlaySpeed').value = 0.5; haltEvent(e); }
349 + if (e.key == '5') { Q('PlaySpeed').value = 0.25; haltEvent(e); }
350 + if (e.key == '6') { Q('PlaySpeed').value = 0.1; haltEvent(e); }
351 + if (e.key == '0') { pause(); restart(); haltEvent(e); }
352 + }
353 +
354 + function openfile() {
355 + var x = '<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />';
356 + setDialogMode(2, "Open bestand...", 3, openfileEx, x);
357 + QE('idx_dlgOkButton', false);
358 + }
359 +
360 + function openfileEx() {
361 + var xfiles = Q('p2fileinput').files;
362 + if (xfiles != null) { var files = []; for (var i in xfiles) { if ((xfiles[i].type != null) && (xfiles[i].size != null) && (xfiles[i].size != 0) && (xfiles[i].name.endsWith('.mcrec'))) { files.push(xfiles[i]); } } }
363 + if (files.length == 0) return;
364 + cleanup();
365 + recFile = files[0];
366 + recFilePtr = 0;
367 + readNextBlock(processFirstBlock);
368 + readLastBlock(function (type, flags, time) { if (type == 3) { recFileEndTime = time; } else { recFileEndTime = 0; } });
369 + Q('OpenFileButton').blur();
370 + }
371 +
372 + function openfileChanged() {
373 + var xfiles = Q('p2fileinput').files;
374 + if (xfiles != null) { var files = []; for (var i in xfiles) { if ((xfiles[i].type != null) && (xfiles[i].size != null) && (xfiles[i].size != 0) && (xfiles[i].name.endsWith('.mcrec'))) { files.push(xfiles[i]); } } }
375 + QE('idx_dlgOkButton', files.length == 1);
376 + }
377 +
378 + function togglePause() {
379 + if (recFile != null) { if (playing == true) { pause(); } else { if (recFilePtr != recFile.size) { play(); } } } return false;
380 + }
381 +
382 + function play() {
383 + Q('PlayButton').blur();
384 + if ((playing == true) || (recFileProtocol == 0)) return;
385 + playing = true;
386 + QV('metadatadiv', false);
387 + QE('PlayButton', false);
388 + QE('PauseButton', true);
389 + QE('RestartButton', false);
390 + if ((recFileProtocol == 1) && (agentTerminal == null)) {
391 + QV('DeskParent', false);
392 + QV('TermParent', true);
393 + agentTerminal = CreateAmtRemoteTerminal('Term', {});
394 + agentTerminal.State = 3;
395 + }
396 + readNextBlock(processBlock);
397 + }
398 +
399 + function pause() {
400 + Q('PauseButton').blur();
401 + if (playing == false) return;
402 + playing = false;
403 + QE('PlayButton', recFilePtr != recFile.size);
404 + QE('PauseButton', false);
405 + QE('RestartButton', recFilePtr != 0);
406 + if (waitTimer != null) {
407 + clearTimeout(waitTimer);
408 + waitTimer = null;
409 + processBlockEx(waitTimerArgs[0], waitTimerArgs[1], waitTimerArgs[2], waitTimerArgs[3]);
410 + waitTimerArgs = null;
411 + }
412 + }
413 +
414 + function restart() {
415 + Q('RestartButton').blur();
416 + if (playing == true) return;
417 + recFilePtr = 0;
418 + readState = 0;
419 + currentDeltaTimeTotalSec = 0;
420 + QV('metadatadiv', true);
421 + QE('PlayButton', true);
422 + QE('PauseButton', false);
423 + QE('RestartButton', false);
424 + QS('progressbar').width = '0px';
425 + QH('timespan', '00:00:00');
426 + QV('DeskParent', true);
427 + QV('TermParent', false);
428 + if (agentDesktop) {
429 + agentDesktop.Canvas.clearRect(0, 0, agentDesktop.CanvasId.width, agentDesktop.CanvasId.height);
430 + } else if (amtDesktop) {
431 + amtDesktop.canvas.clearRect(0, 0, amtDesktop.CanvasId.width, amtDesktop.CanvasId.height);
432 + amtDesktop = CreateAmtRemoteDesktop('Desk');
433 + amtDesktop.onScreenSizeChange = deskAdjust;
434 + amtDesktop.State = 3;
435 + amtDesktop.Start();
436 + } else if (agentTerminal) {
437 + agentTerminal = null;
438 + }
439 + }
440 +
441 + function clearConsoleMsg() { QH('p11DeskConsoleMsg', ''); }
442 +
443 + // Toggle the web page to full screen
444 + function toggleAspectRatio(toggle) {
445 + if (toggle === 1) { deskAspectRatio = ((deskAspectRatio + 1) % 3); }
446 + deskAdjust();
447 + }
448 +
449 + function deskAdjust() {
450 + var parentH = Q('DeskParent').clientHeight, parentW = Q('DeskParent').clientWidth;
451 + var deskH = Q('Desk').height, deskW = Q('Desk').width;
452 +
453 + if (deskAspectRatio == 2) {
454 + // Scale mode
455 + QS('Desk')['margin-top'] = null;
456 + QS('Desk').height = '100%';
457 + QS('Desk').width = '100%';
458 + QS('DeskParent').overflow = 'hidden';
459 + } else if (deskAspectRatio == 1) {
460 + // Zoomed mode
461 + QS('Desk')['margin-top'] = '0px';
462 + //QS('Desk')['margin-left'] = '0px';
463 + QS('Desk').height = deskH + 'px';
464 + QS('Desk').width = deskW + 'px';
465 + QS('DeskParent').overflow = 'scroll';
466 + } else {
467 + // Fixed aspect ratio
468 + if ((parentH / parentW) > (deskH / deskW)) {
469 + var hNew = ((deskH * parentW) / deskW) + 'px';
470 + //if (webPageFullScreen || fullscreen) {
471 + //QS('deskarea3x').height = null;
472 + //} else {
473 + // QS('deskarea3x').height = hNew;
474 + //QS('deskarea3x').height = null;
475 + //}
476 + QS('Desk').height = hNew;
477 + QS('Desk').width = '100%';
478 + } else {
479 + var wNew = ((deskW * parentH) / deskH) + 'px';
480 + //if (webPageFullScreen || fullscreen) {
481 + //QS('Desk').height = null;
482 + //} else {
483 + QS('Desk').height = '100%';
484 + //}
485 + QS('Desk').width = wNew;
486 + }
487 + QS('Desk')['margin-top'] = null;
488 + QS('DeskParent').overflow = 'hidden';
489 + }
490 + }
491 +
492 + //
493 + // POPUP DIALOG
494 + //
495 +
496 + // null = Hidden, 1 = Generic Message
497 + var xxdialogMode;
498 + var xxdialogFunc;
499 + var xxdialogButtons;
500 + var xxdialogTag;
501 + var xxcurrentView = -1;
502 +
503 + // Display a dialog box
504 + // Parameters: Dialog Mode (0 = none), Dialog Title, Buttons (1 = OK, 2 = Cancel, 3 = OK & Cancel), Call back function(0 = Cancel, 1 = OK), Dialog Content (Mode 2 only)
505 + function setDialogMode(x, y, b, f, c, tag) {
506 + xxdialogMode = x;
507 + xxdialogFunc = f;
508 + xxdialogButtons = b;
509 + xxdialogTag = tag;
510 + QE('idx_dlgOkButton', true);
511 + QV('idx_dlgOkButton', b & 1);
512 + QV('idx_dlgCancelButton', b & 2);
513 + QV('id_dialogclose', (b & 2) || (b & 8));
514 + QV('idx_dlgDeleteButton', b & 4);
515 + QV('idx_dlgButtonBar', b & 7);
516 + if (y) QH('id_dialogtitle', y);
517 + for (var i = 1; i < 3; i++) { QV('dialog' + i, i == x); } // Edit this line when more dialogs are added
518 + QV('dialog', x);
519 + if (c) { if (x == 2) { QH('id_dialogOptions', c); } else { QH('id_dialogMessage', c); } }
520 + }
521 +
522 + function dialogclose(x) {
523 + var f = xxdialogFunc, b = xxdialogButtons, t = xxdialogTag;
524 + setDialogMode();
525 + if (((b & 8) || x) && f) f(x, t);
526 + }
527 +
528 + function messagebox(t, m) { setSessionActivity(); QH('id_dialogMessage', m); setDialogMode(1, t, 1); }
529 + function statusbox(t, m) { setSessionActivity(); QH('id_dialogMessage', m); setDialogMode(1, t); }
530 + function haltEvent(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; }
531 + function pad2(num) { var s = '00' + num; return s.substr(s.length - 2); }
532 + function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
533 +
534 + start();
535 + </script>
536 +
537 +</body></html>
\ No newline at end of file
public/translator.htm
+1
@@ -70,6 +70,7 @@
70 <option value="it">Italian (it)</option>
71 <option value="ja">Japanese (ja)</option>
72 <option value="ko">Korean (ko)</option>
73 + <option value="nl">Dutch (nl)</option>
74 <option value="pl">Polish (pl)</option>
75 <option value="pt">Portuguese (pt)</option>
76 <option value="ru">Russian (ru)</option>
translate/translate.js
+1 -1
@@ -78,7 +78,7 @@ function start() {
78 console.log(' MINIFYALL');
79 console.log(' Minify the main MeshCentral english web pages.');
80 console.log('');
81 - console.log(' MERGE [sourcefile] [tartgetfile] [language code]');
81 + console.log(' MERGE [sourcefile] [targetfile] [language code]');
82 console.log(' Merge a language from a translation file into another translation file.');
83 console.log('');
84 console.log(' TOTEXT [translationfile] [textfile] [language code]');
translate/translate.json
+2791 -1400
@@ -8,7 +8,8 @@
8 ],
9 "pt": "0",
10 "ja": "0",
11 - "cs": "0"
11 + "cs": "0",
12 + "nl": "0"
13 },
14 {
15 "en": "3",
@@ -17,7 +18,8 @@
18 ],
19 "pt": "3",
20 "ja": "3",
20 - "cs": "3"
21 + "cs": "3",
22 + "nl": "3"
23 },
24 {
25 "en": "404",
@@ -27,7 +29,8 @@
29 ],
30 "pt": "404",
31 "ja": "404",
30 - "cs": "404"
32 + "cs": "404",
33 + "nl": "404"
34 },
35 {
36 "en": " + CIRA",
@@ -38,7 +41,7 @@
41 ],
42 "pt": " + CIRA",
43 "ja": " + CIRA",
41 - "cs": "+ CIRA"
44 + "cs": " + CIRA"
45 },
46 {
47 "en": " - Reset in {0} day{1}.",
@@ -49,7 +52,8 @@
52 "default-mobile.handlebars->9->13"
53 ],
54 "pt": " - Redefinir em {0} dia {1}.",
52 - "ja": " -{0}日でリセット{1}。"
55 + "ja": " -{0}日でリセット{1}。",
56 + "nl": " - Reset in {0} dag(en){1}."
57 },
58 {
59 "en": " - Reset in {0} hour{1}.",
@@ -60,18 +64,20 @@
64 "default-mobile.handlebars->9->12"
65 ],
66 "pt": " - Redefinir em {0} hora {1}.",
63 - "ja": " -{0}時間でリセット{1}。"
67 + "ja": " -{0}時間でリセット{1}。",
68 + "nl": " - Reset in {0} uur{1}."
69 },
70 {
71 "en": " - Reset in {0} minute{1}.",
72 "cs": " - Reset v {0} minut{1}.",
68 - "fr": "- Réinitialisation en {0} minute {1}.",
73 + "fr": " - Réinitialisation en {0} minute {1}.",
74 "xloc": [
75 "default.handlebars->23->22",
76 "default-mobile.handlebars->9->11"
77 ],
73 - "pt": "- Redefinir em {0} minuto {1}.",
74 - "ja": " -{0}分でリセット{1}。"
78 + "pt": " - Redefinir em {0} minuto {1}.",
79 + "ja": " -{0}分でリセット{1}。",
80 + "nl": " - Reset in {0} minuten{1}."
81 },
82 {
83 "en": " - Reset on next login.",
@@ -84,7 +90,8 @@
90 "default-mobile.handlebars->9->10"
91 ],
92 "pt": " - Redefinir no próximo login.",
87 - "ja": " -次回ログイン時にリセット。"
93 + "ja": " -次回ログイン時にリセット。",
94 + "nl": " - Reset bij volgende inlog."
95 },
96 {
97 "en": " / ",
@@ -93,7 +100,8 @@
100 ],
101 "pt": " / ",
102 "ja": " /",
96 - "cs": " / "
103 + "cs": " / ",
104 + "nl": " / "
105 },
106 {
107 "en": " Add User",
@@ -103,7 +111,8 @@
111 "default-mobile.handlebars->9->277"
112 ],
113 "pt": " Adicionar usuário",
106 - "ja": " ユーザーを追加する"
114 + "ja": " ユーザーを追加する",
115 + "nl": " gebruiker toevoegen"
116 },
117 {
118 "en": " and authenticate to the server using this username and any password.",
@@ -113,7 +122,8 @@
122 "default.handlebars->23->231"
123 ],
124 "pt": " e autenticar no servidor usando esse nome de usuário e qualquer senha.",
116 - "ja": " このユーザー名とパスワードを使用してサーバーに対して認証します。"
125 + "ja": " このユーザー名とパスワードを使用してサーバーに対して認証します。",
126 + "nl": " verifieer bij de server met deze gebruikersnaam en elk wachtwoord."
127 },
128 {
129 "en": " and authenticate to the server using this username and password.",
@@ -123,7 +133,8 @@
133 "default.handlebars->23->230"
134 ],
135 "pt": " e autenticar no servidor usando esse nome de usuário e senha.",
126 - "ja": " このユーザー名とパスワードを使用してサーバーに対して認証します。"
136 + "ja": " このユーザー名とパスワードを使用してサーバーに対して認証します。",
137 + "nl": " verifieer bij de server met deze gebruikersnaam en wachtwoord."
138 },
139 {
140 "en": " node",
@@ -133,7 +144,8 @@
144 "default-mobile.handlebars->9->124"
145 ],
146 "pt": " nó",
136 - "ja": " ノード"
147 + "ja": " ノード",
148 + "nl": " apparaat"
149 },
150 {
151 "en": " nodes",
@@ -143,7 +155,8 @@
155 "default-mobile.handlebars->9->125"
156 ],
157 "pt": " nós",
146 - "ja": " ノード"
158 + "ja": " ノード",
159 + "nl": " apparaten"
160 },
161 {
162 "en": " Password hint can be used but is not recommanded.",
@@ -153,7 +166,8 @@
166 "default.handlebars->23->897"
167 ],
168 "pt": " Dica de senha pode ser usada, mas não é recomendada.",
156 - "ja": " パスワードヒントは使用できますが、推奨されません。"
169 + "ja": " パスワードヒントは使用できますが、推奨されません。",
170 + "nl": " Een wachtwoord hint kan gebruikt worden maar wordt afgeraden"
171 },
172 {
173 "en": " Users need to login to this server once before they can be added to a device group.",
@@ -173,7 +187,8 @@
187 "default.handlebars->23->128"
188 ],
189 "pt": " com TLS.",
176 - "ja": " TLSを使用。"
190 + "ja": " TLSを使用。",
191 + "nl": " met TLS."
192 },
193 {
194 "en": " without TLS.",
@@ -183,7 +198,8 @@
198 "default.handlebars->23->129"
199 ],
200 "pt": " sem TLS.",
186 - "ja": " TLSなし。"
201 + "ja": " TLSなし。",
202 + "nl": "zonder TLS."
203 },
204 {
205 "en": "(",
@@ -193,7 +209,8 @@
209 ],
210 "pt": "(",
211 "ja": "(",
196 - "cs": "("
212 + "cs": "(",
213 + "nl": "("
214 },
215 {
216 "en": "(optional)",
@@ -202,7 +219,8 @@
219 "default.handlebars->23->267"
220 ],
221 "pt": "(opcional)",
205 - "ja": "(オプション)"
222 + "ja": "(オプション)",
223 + "nl": "(optioneel)"
224 },
225 {
226 "en": ")",
@@ -212,7 +230,8 @@
230 ],
231 "pt": ")",
232 "ja": ")",
215 - "cs": ")"
233 + "cs": ")",
234 + "nl": ")"
235 },
236 {
237 "en": "* For BSD, run \\\"pkg install wget sudo bash\\\" first.",
@@ -221,7 +240,8 @@
240 "default.handlebars->23->298"
241 ],
242 "pt": "* Para o BSD, execute \\\"pkg install wget sudo bash\\\".",
224 - "ja": "* BSDの場合、最初に\\\"pkg install wget sudo bash \\\"を実行します。"
243 + "ja": "* BSDの場合、最初に\\\"pkg install wget sudo bash\\\"を実行します。",
244 + "nl": "* Voor BSD, start eerst \\\"pkg install wget sudo bash\\\" ."
245 },
246 {
247 "en": "* Leave blank to assign a random password to each device.",
@@ -230,7 +250,8 @@
250 "default.handlebars->23->1014"
251 ],
252 "pt": "* Deixe em branco para atribuir uma senha aleatória a cada dispositivo.",
233 - "ja": "*空白のままにして、各デバイスにランダムなパスワードを割り当てます。"
253 + "ja": "*空白のままにして、各デバイスにランダムなパスワードを割り当てます。",
254 + "nl": "* Laat leeg om een willekeurig wachtwoord toe te wijzen aan elk apparaat."
255 },
256 {
257 "en": ",",
@@ -240,7 +261,8 @@
261 ],
262 "pt": ",",
263 "ja": "、",
243 - "cs": ","
264 + "cs": ",",
265 + "nl": ","
266 },
267 {
268 "en": ", ",
@@ -250,7 +272,8 @@
272 ],
273 "pt": ",",
274 "ja": "、",
253 - "cs": ", "
275 + "cs": ", ",
276 + "nl": ","
277 },
278 {
279 "en": ", click here to enable it.",
@@ -260,7 +283,8 @@
283 "default.handlebars->container->column_l->p12->p12warning->3->p12warninga"
284 ],
285 "pt": ", clique aqui para habilitá-lo.",
263 - "ja": "、ここをクリックして有効にします。"
286 + "ja": "、ここをクリックして有効にします。",
287 + "nl": ", klik hier om in te schakelen"
288 },
289 {
290 "en": ", Intel&reg; AMT only",
@@ -270,7 +294,8 @@
294 "default-mobile.handlebars->9->89"
295 ],
296 "pt": "Intelreg; ",
273 - "ja": "、Intel&reg; AMTのみ"
297 + "ja": "、Intel&reg; AMTのみ",
298 + "nl": ", Intel&reg; AMT alleen"
299 },
300 {
301 "en": ", MQTT is online",
@@ -279,7 +304,8 @@
304 "default.handlebars->23->651"
305 ],
306 "pt": ", O MQTT está online",
282 - "ja": "、MQTTはオンラインです"
307 + "ja": "、MQTTはオンラインです",
308 + "nl": ", MQTT is online"
309 },
310 {
311 "en": ", right click on it or press \"control\" and click on the file. Then select \"Open\" and follow the instructions.",
@@ -288,7 +314,8 @@
314 "agentinvite.handlebars->container->column_l->5->macostab->3"
315 ],
316 "pt": ", clique com o botão direito do mouse ou pressione \"control\".Em seguida, selecione \"Open\".",
291 - "ja": "、それを右クリックするか、「control」を押してファイルをクリックします。次に、「開く」を選択し、指示に従います。"
317 + "ja": "、それを右クリックするか、「control」を押してファイルをクリックします。次に、「開く」を選択し、指示に従います。",
318 + "nl": ", klik er met de rechtermuisknop op of druk op \"beheer\" en klik op het bestand. Daarna op \"open\" en volg de instructies."
319 },
320 {
321 "en": ", run it and press \"Install\" or \"Connect\".",
@@ -298,7 +325,8 @@
325 "agentinvite.handlebars->container->column_l->5->wintab32->3"
326 ],
327 "pt": ", execute-o e pressione \"Install\" or \"Connect\".",
301 - "ja": "、実行して「インストール」または「接続」を押します。"
328 + "ja": "、実行して「インストール」または「接続」を押します。",
329 + "nl": ", open het en klik op \"installeren\" of \"verbinden\"."
330 },
331 {
332 "en": ", Soft-KVM",
@@ -307,7 +335,8 @@
335 ],
336 "pt": ", Soft-KVM",
337 "ja": "、Soft-KVM",
310 - "cs": ", Soft-KVM"
338 + "cs": ", Soft-KVM",
339 + "nl": ", Soft-KVM"
340 },
341 {
342 "en": ", WebRTC",
@@ -320,7 +349,8 @@
349 ],
350 "pt": ", WebRTC",
351 "ja": "、WebRTC",
323 - "cs": ", WebRTC"
352 + "cs": ", WebRTC",
353 + "nl": ", WebRTC"
354 },
355 {
356 "en": "-",
@@ -329,7 +359,8 @@
359 ],
360 "pt": "-",
361 "ja": "-",
332 - "cs": "-"
362 + "cs": "-",
363 + "nl": "-"
364 },
365 {
366 "en": ".",
@@ -346,7 +377,8 @@
377 ],
378 "pt": ".",
379 "ja": "。",
349 - "cs": "."
380 + "cs": ".",
381 + "nl": "."
382 },
383 {
384 "en": "...",
@@ -359,7 +391,8 @@
391 ],
392 "pt": "...",
393 "ja": "...",
362 - "cs": "..."
394 + "cs": "...",
395 + "nl": "..."
396 },
397 {
398 "en": "00:00:00",
@@ -368,7 +401,8 @@
401 ],
402 "pt": "00:00:00",
403 "ja": "00:00:00",
371 - "cs": "00:00:00"
404 + "cs": "00:00:00",
405 + "nl": "00:00:00"
406 },
407 {
408 "en": "1 active session",
@@ -378,7 +412,8 @@
412 "default.handlebars->23->1230"
413 ],
414 "pt": "1 sessão ativa",
381 - "ja": "1つのアクティブなセッション"
415 + "ja": "1つのアクティブなセッション",
416 + "nl": "1 actieve sessie"
417 },
418 {
419 "en": "1 byte",
@@ -390,7 +425,8 @@
425 "default-mobile.handlebars->9->331"
426 ],
427 "pt": "1 byte",
393 - "ja": "1バイト"
428 + "ja": "1バイト",
429 + "nl": "1 byte"
430 },
431 {
432 "en": "1 day",
@@ -402,7 +438,8 @@
438 "default.handlebars->23->272"
439 ],
440 "pt": "1 dia",
405 - "ja": "1日"
441 + "ja": "1日",
442 + "nl": "1 dag"
443 },
444 {
445 "en": "1 group",
@@ -412,7 +449,8 @@
449 "default.handlebars->23->1216"
450 ],
451 "pt": "1 grupo",
415 - "ja": "1グループ"
452 + "ja": "1グループ",
453 + "nl": "1 groep"
454 },
455 {
456 "en": "1 hour",
@@ -423,7 +461,8 @@
461 "default.handlebars->23->270"
462 ],
463 "pt": "1 hora",
426 - "ja": "1時間"
464 + "ja": "1時間",
465 + "nl": "1 uur"
466 },
467 {
468 "en": "1 month",
@@ -435,7 +474,8 @@
474 "default.handlebars->23->274"
475 ],
476 "pt": "1 mês",
438 - "ja": "1ヶ月"
477 + "ja": "1ヶ月",
478 + "nl": "1 maand"
479 },
480 {
481 "en": "1 more user not shown, use search box to look for users...",
@@ -444,7 +484,8 @@
484 "default.handlebars->23->1136"
485 ],
486 "pt": "Mais 1 usuário não mostrado, use a caixa de pesquisa para procurar usuários...",
447 - "ja": "さらに1人のユーザーが表示されていません。検索ボックスを使用してユーザーを検索してください..."
487 + "ja": "さらに1人のユーザーが表示されていません。検索ボックスを使用してユーザーを検索してください...",
488 + "nl": "1 gebruiker niet getoond, gebruik de zoekfunctie om gebruikers te vinden"
489 },
490 {
491 "en": "1 node",
@@ -454,7 +495,8 @@
495 "default.handlebars->23->311"
496 ],
497 "pt": "1 nó",
457 - "ja": "1ノード"
498 + "ja": "1ノード",
499 + "nl": "1 apparaat"
500 },
501 {
502 "en": "1 session",
@@ -464,7 +506,8 @@
506 "default.handlebars->23->1140"
507 ],
508 "pt": "1 sessão",
467 - "ja": "1セッション"
509 + "ja": "1セッション",
510 + "nl": "1 sessie"
511 },
512 {
513 "en": "1 week",
@@ -476,7 +519,8 @@
519 "default.handlebars->23->273"
520 ],
521 "pt": "1 semana",
479 - "ja": "1週間"
522 + "ja": "1週間",
523 + "nl": "1 week"
524 },
525 {
526 "en": "1.AJAX Control Toolkit - New BSD License",
@@ -486,7 +530,8 @@
530 "terms-mobile.handlebars->container->page_content->column_l->9->1->0"
531 ],
532 "pt": "1.AJAX Control Toolkit - Nova licença BSD",
489 - "ja": "1.AJAX Control Toolkit-新しいBSDライセンス"
533 + "ja": "1.AJAX Control Toolkit-新しいBSDライセンス",
534 + "nl": "1.AJAX Control Toolkit - Nieuwe BSD Licentie"
535 },
536 {
537 "en": "1.Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.",
@@ -498,7 +543,8 @@
543 "terms-mobile.handlebars->container->page_content->column_l->31->1"
544 ],
545 "pt": "1.As redistribuições do código-fonte devem manter o aviso de direitos autorais acima, esta lista de condições e o aviso de isenção de responsabilidade a seguir.",
501 - "ja": "1.ソースコードの再配布には、上記の著作権表示、この条件リスト、および以下の免責事項を保持する必要があります。"
546 + "ja": "1.ソースコードの再配布には、上記の著作権表示、この条件リスト、および以下の免責事項を保持する必要があります。",
547 + "nl": "1. Herdistributies van broncode moeten de bovenstaande copyright kennisgeving en deze lijst met voorwaarden en de volgende disclaimer bevatten."
548 },
549 {
550 "en": "1/2 Speed",
@@ -508,7 +554,8 @@
554 "player.htm->p11->deskarea0->deskarea4->3->PlaySpeed->3"
555 ],
556 "pt": "1/2 velocidade",
511 - "ja": "1/2速度"
557 + "ja": "1/2速度",
558 + "nl": "halve snelheid"
559 },
560 {
561 "en": "1/4 Speed",
@@ -518,7 +565,8 @@
565 "player.htm->p11->deskarea0->deskarea4->3->PlaySpeed->1"
566 ],
567 "pt": "1/4 de velocidade",
521 - "ja": "1/4スピード"
568 + "ja": "1/4スピード",
569 + "nl": "kwart snelheid"
570 },
571 {
572 "en": "100%",
@@ -528,7 +576,8 @@
576 ],
577 "pt": "100%",
578 "ja": "100%",
531 - "cs": "100%"
579 + "cs": "100%",
580 + "nl": "100%"
581 },
582 {
583 "en": "100x30",
@@ -537,7 +586,8 @@
586 ],
587 "pt": "100x30",
588 "ja": "100x30",
540 - "cs": "100x30"
589 + "cs": "100x30",
590 + "nl": "100x30"
591 },
592 {
593 "en": "10x Speed",
@@ -547,7 +597,8 @@
597 "player.htm->p11->deskarea0->deskarea4->3->PlaySpeed->11"
598 ],
599 "pt": "10x Velocidade",
550 - "ja": "10倍速"
600 + "ja": "10倍速",
601 + "nl": "10x Sneheid"
602 },
603 {
604 "en": "12.5%",
@@ -557,7 +608,8 @@
608 ],
609 "pt": "12.5%",
610 "ja": "12.5%",
560 - "cs": "12.5%"
611 + "cs": "12.5%",
612 + "nl": "12.5%"
613 },
614 {
615 "en": "2-step login activation failed.",
@@ -566,7 +618,8 @@
618 "default.handlebars->23->89"
619 ],
620 "pt": "Falha na ativação do login em duas etapas.",
569 - "ja": "2段階ログインのアクティベーションに失敗しました。"
621 + "ja": "2段階ログインのアクティベーションに失敗しました。",
622 + "nl": "Tweestapsverificatie is msilukt."
623 },
624 {
625 "en": "2-step login activation removal failed.",
@@ -575,7 +628,8 @@
628 "default.handlebars->23->94"
629 ],
630 "pt": "A remoção da ativação do login em duas etapas falhou.",
578 - "ja": "2段階ログインアクティベーションの削除に失敗しました。"
631 + "ja": "2段階ログインアクティベーションの削除に失敗しました。",
632 + "nl": "Tweestapsverificatie verwijdering is mislukt."
633 },
634 {
635 "en": "2.OpenSSL – OpenSSL and SSLeay License",
@@ -585,7 +639,8 @@
639 "terms-mobile.handlebars->container->page_content->column_l->23->1->0"
640 ],
641 "pt": "2.OpenSSL - Licença OpenSSL e SSLeay",
588 - "ja": "2.OpenSSL – OpenSSLおよびSSLeayライセンス"
642 + "ja": "2.OpenSSL – OpenSSLおよびSSLeayライセンス",
643 + "nl": "2.OpenSSL – OpenSSL en SSLeay Licentie"
644 },
645 {
646 "en": "2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.",
@@ -597,7 +652,8 @@
652 "terms-mobile.handlebars->container->page_content->column_l->33->1"
653 ],
654 "pt": "2.As redistribuições em formato binário devem reproduzir o aviso de direitos autorais acima, esta lista de condições e o aviso de isenção de responsabilidade a seguir na documentação e / ou outros materiais fornecidos com a distribuição.",
600 - "ja": "2.バイナリ形式での再配布では、上記の著作権表示、この条件リスト、および以下の免責事項を、配布物とともに提供されるドキュメントおよび/またはその他の資料に複製する必要があります。"
655 + "ja": "2.バイナリ形式での再配布では、上記の著作権表示、この条件リスト、および以下の免責事項を、配布物とともに提供されるドキュメントおよび/またはその他の資料に複製する必要があります。",
656 + "nl": "2. Herdistributies in binaire vorm moeten de bovenstaande copyright kennisgeving, deze lijst met voorwaarden en de volgende disclaimer reproduceren in de documentatie en / of andere materialen die bij de distributie worden geleverd."
657 },
658 {
659 "en": "25%",
@@ -607,7 +663,8 @@
663 ],
664 "pt": "25%",
665 "ja": "25%",
610 - "cs": "25%"
666 + "cs": "25%",
667 + "nl": "25%"
668 },
669 {
670 "en": "2x Speed",
@@ -617,7 +674,8 @@
674 "player.htm->p11->deskarea0->deskarea4->3->PlaySpeed->7"
675 ],
676 "pt": "2x velocidade",
620 - "ja": "2倍速"
677 + "ja": "2倍速",
678 + "nl": "2x Snelheid"
679 },
680 {
681 "en": "3.All advertising materials mentioning features or use of this software must display the following acknowledgment: \"This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"",
@@ -627,7 +685,8 @@
685 "terms-mobile.handlebars->container->page_content->column_l->35->1"
686 ],
687 "pt": "3.Todos os materiais publicitários que mencionam os recursos ou o uso deste software devem exibir o seguinte reconhecimento: \"This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"",
630 - "ja": "3.このソフトウェアの機能または使用について言及するすべての広告資料には、「この製品には、OpenSSL Toolkitで使用するためにOpenSSL Projectによって開発されたソフトウェアが含まれます。(http://www.openssl.org/)」"
688 + "ja": "3.このソフトウェアの機能または使用について言及するすべての広告資料には、「この製品には、OpenSSL Toolkitで使用するためにOpenSSL Projectによって開発されたソフトウェアが含まれます。(http://www.openssl.org/)」",
689 + "nl": "3.Alle advertentiematerialen die functies of gebruik van deze software maken, moeten de volgende tekst bevatten: \"Dit product bevat software die is ontwikkeld door het OpenSSL-project voor gebruik in de OpenSSL Toolkit. (Http://www.openssl.org/)\""
690 },
691 {
692 "en": "3.jQuery Foundation - MIT License",
@@ -637,7 +696,8 @@
696 "terms-mobile.handlebars->container->page_content->column_l->45->1->0"
697 ],
698 "pt": "3.jQuery Foundation - Licença MIT",
640 - "ja": "3. jQuery Foundation-MITライセンス"
699 + "ja": "3. jQuery Foundation-MITライセンス",
700 + "nl": "3.jQuery Foundation - MIT Licentie"
701 },
702 {
703 "en": "3.Neither the name of CodePlex Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.",
@@ -647,7 +707,8 @@
707 "terms-mobile.handlebars->container->page_content->column_l->19->1"
708 ],
709 "pt": "3.Nem o nome da CodePlex Foundation nem os nomes de seus colaboradores podem ser usados \\u200b\\u200bpara endossar ou promover produtos derivados deste software sem permissão prévia por escrito específica.",
650 - "ja": "3. CodePlex Foundationの名前もその貢献者の名前も、書面による事前の許可なしに、このソフトウェアから派生した製品を推奨または宣伝するために使用することはできません。"
710 + "ja": "3. CodePlex Foundationの名前もその貢献者の名前も、書面による事前の許可なしに、このソフトウェアから派生した製品を推奨または宣伝するために使用することはできません。",
711 + "nl": "3. Noch de naam van CodePlex Foundation, noch de namen van haar bijdragers mogen worden gebruikt om producten die zijn afgeleid van deze software te ondersteunen of promoten zonder specifieke voorafgaande schriftelijke toestemming."
712 },
713 {
714 "en": "32bit version of the MeshAgent",
@@ -657,7 +718,8 @@
718 "default.handlebars->23->304"
719 ],
720 "pt": "Versão de 32 bits do MeshAgent",
660 - "ja": "MeshAgentの32ビットバージョン"
721 + "ja": "MeshAgentの32ビットバージョン",
722 + "nl": "32bit versie van de MeshAgent"
723 },
724 {
725 "en": "37.5%",
@@ -667,7 +729,8 @@
729 ],
730 "pt": "37..5%",
731 "ja": "37.5%",
670 - "cs": "37.5%"
732 + "cs": "37.5%",
733 + "nl": "37.5%"
734 },
735 {
736 "en": "4.jQuery User Interface - MIT License",
@@ -677,7 +740,8 @@
740 "terms-mobile.handlebars->container->page_content->column_l->51->1->0"
741 ],
742 "pt": "4.Interface do Usuário jQuery - Licença MIT",
680 - "ja": "4. jQueryユーザーインターフェイス-MITライセンス"
743 + "ja": "4. jQueryユーザーインターフェイス-MITライセンス",
744 + "nl": "4.jQuery Gebruikers Interface - MIT Licentie"
745 },
746 {
747 "en": "4.The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.",
@@ -686,7 +750,8 @@
750 "terms.handlebars->container->column_l->37->1",
751 "terms-mobile.handlebars->container->page_content->column_l->37->1"
752 ],
689 - "ja": "4.「OpenSSL Toolkit」および「OpenSSL Project」という名前は、事前の書面による許可なしに、このソフトウェアから派生した製品を推奨または宣伝するために使用しないでください。書面による許可については、openssl-core @ openssl.orgにお問い合わせください。"
753 + "ja": "4.「OpenSSL Toolkit」および「OpenSSL Project」という名前は、事前の書面による許可なしに、このソフトウェアから派生した製品を推奨または宣伝するために使用しないでください。書面による許可については、openssl-core @ openssl.orgにお問い合わせください。",
754 + "nl": "4. De namen \"OpenSSL Toolkit\" en \"OpenSSL Project\" mogen niet worden gebruikt om producten die zijn afgeleid van deze software te ondersteunen of promoten zonder voorafgaande schriftelijke toestemming. Neem voor schriftelijke toestemming contact op met openssl-core@openssl.org."
755 },
756 {
757 "en": "4x Speed",
@@ -696,7 +761,8 @@
761 "player.htm->p11->deskarea0->deskarea4->3->PlaySpeed->9"
762 ],
763 "pt": "4x velocidade",
699 - "ja": "4倍速"
764 + "ja": "4倍速",
765 + "nl": "4x snelheid"
766 },
767 {
768 "en": "5.noVNC - Mozilla Public License 2.0",
@@ -706,7 +772,8 @@
772 "terms-mobile.handlebars->container->page_content->column_l->59->1->0"
773 ],
774 "pt": "5.noVNC - Licença Pública Mozilla 2.0 0",
709 - "ja": "5. noVNC-Mozilla Public License 2.0"
775 + "ja": "5. noVNC-Mozilla Public License 2.0",
776 + "nl": "5.noVNC - Mozilla Public Licentie 2.0"
777 },
778 {
779 "en": "5.Products derived from this software may not be called \"OpenSSL\" nor may \"OpenSSL\" appear in their names without prior written permission of the OpenSSL Project.",
@@ -715,7 +782,8 @@
782 "terms.handlebars->container->column_l->39->1",
783 "terms-mobile.handlebars->container->page_content->column_l->39->1"
784 ],
718 - "ja": "5.このソフトウェアから派生した製品は、OpenSSL Projectの事前の書面による許可なしに、「OpenSSL」と呼ばれたり、名前に「OpenSSL」が表示されたりすることはありません。"
785 + "ja": "5.このソフトウェアから派生した製品は、OpenSSL Projectの事前の書面による許可なしに、「OpenSSL」と呼ばれたり、名前に「OpenSSL」が表示されたりすることはありません。",
786 + "nl": "5. Producten die zijn afgeleid van deze software mogen niet \"OpenSSL\" worden genoemd, noch mag \"OpenSSL\" in hun naam worden weergegeven zonder voorafgaande schriftelijke toestemming van het OpenSSL-project."
787 },
788 {
789 "en": "50%",
@@ -725,7 +793,8 @@
793 ],
794 "pt": "50%",
795 "ja": "50%",
728 - "cs": "50%"
796 + "cs": "50%",
797 + "nl": "50%"
798 },
799 {
800 "en": "6.Redistributions of any form whatsoever must retain the following acknowledgment: \"This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)\".",
@@ -735,7 +804,8 @@
804 "terms-mobile.handlebars->container->page_content->column_l->41->1"
805 ],
806 "pt": "6.As redistribuições de qualquer forma devem manter o seguinte reconhecimento: \"Este produto inclui software desenvolvido pelo OpenSSL Project para uso no OpenSSL Toolkit (http://www.openssl.org/)\".",
738 - "ja": "6.いかなる形式の再配布でも、「この製品には、OpenSSL Toolkit(http://www.openssl.org/)で使用するためにOpenSSL Projectによって開発されたソフトウェアが含まれます」という承認を保持する必要があります。"
807 + "ja": "6.いかなる形式の再配布でも、「この製品には、OpenSSL Toolkit(http://www.openssl.org/)で使用するためにOpenSSL Projectによって開発されたソフトウェアが含まれます」という承認を保持する必要があります。",
808 + "nl": "6. Herdistributies in welke vorm dan ook moet de volgende tekst behouden: \"Dit product bevat software die is ontwikkeld door het OpenSSL-project voor gebruik in de OpenSSL Toolkit (http://www.openssl.org/)\"."
809 },
810 {
811 "en": "62.5%",
@@ -745,7 +815,8 @@
815 ],
816 "pt": "62.5%",
817 "ja": "62.5%",
748 - "cs": "62.5%"
818 + "cs": "62.5%",
819 + "nl": "62.5%"
820 },
821 {
822 "en": "64bit version of the MeshAgent",
@@ -755,7 +826,8 @@
826 "default.handlebars->23->307"
827 ],
828 "pt": "Versão de 64 bits do MeshAgent",
758 - "ja": "MeshAgentの64ビットバージョン"
829 + "ja": "MeshAgentの64ビットバージョン",
830 + "nl": "64bit versie van de MeshAgent"
831 },
832 {
833 "en": "7 Day Power State",
@@ -764,7 +836,8 @@
836 "default.handlebars->23->523"
837 ],
838 "pt": "Estado de energia de 7 dias",
767 - "ja": "7日間の電源状態"
839 + "ja": "7日間の電源状態",
840 + "nl": "7 dagen stroom status"
841 },
842 {
843 "en": "7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UK License",
@@ -774,7 +847,8 @@
847 "terms-mobile.handlebars->container->page_content->column_l->73->1->0"
848 ],
849 "pt": "7.Webtoolkit Javascript Base 64 - Licença Creative Commons Attribution 2.0 UK",
777 - "ja": "7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UKライセンス"
850 + "ja": "7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UKライセンス",
851 + "nl": "7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UK Licentie"
852 },
853 {
854 "en": "75%",
@@ -784,7 +858,8 @@
858 ],
859 "pt": "75%",
860 "ja": "75%",
787 - "cs": "75%"
861 + "cs": "75%",
862 + "nl": "75%"
863 },
864 {
865 "en": "8 hours",
@@ -795,7 +870,8 @@
870 "default.handlebars->23->271"
871 ],
872 "pt": "8 horas",
798 - "ja": "8時間"
873 + "ja": "8時間",
874 + "nl": "8 uur"
875 },
876 {
877 "en": "80x25",
@@ -804,7 +880,8 @@
880 ],
881 "pt": "80x25",
882 "ja": "80x25",
807 - "cs": "80x25"
883 + "cs": "80x25",
884 + "nl": "80x25"
885 },
886 {
887 "en": "87.5%",
@@ -814,7 +891,8 @@
891 ],
892 "pt": "87.5%",
893 "ja": "87.5%",
817 - "cs": "87.5%"
894 + "cs": "87.5%",
895 + "nl": "87.5%"
896 },
897 {
898 "en": ":",
@@ -823,7 +901,8 @@
901 ],
902 "pt": ":",
903 "ja": ":",
826 - "cs": ":"
904 + "cs": ":",
905 + "nl": ":"
906 },
907 {
908 "en": "<a href=\\\"https://www.yubico.com/\\\" rel=\\\"noreferrer noopener\\\" target=\\\"_blank\\\">Hardware keys</a> are used as secondary login authentication.",
@@ -832,7 +911,8 @@
911 "default.handlebars->23->103"
912 ],
913 "pt": "<a href=\\\"https://www.yubico.com/\\\" rel=\\\"noreferrer noopener\\\" target=\\\"_blank\\\">Chaves Hardware</a> são usados como autenticação de login secundária.",
835 - "ja": "<a href=\\\"https://www.yubico.com/\\\" rel=\\\"noreferrer noopener\\\" target=\\\"_blank\\\">ハードウェアキー</a>は、セカンダリログイン認証として使用されます。"
914 + "ja": "<a href=\\\"https://www.yubico.com/\\\" rel=\\\"noreferrer noopener\\\" target=\\\"_blank\\\">ハードウェアキー</a>は、セカンダリログイン認証として使用されます。",
915 + "nl": "<a href=\\\"https://www.yubico.com/\\\" rel=\\\"noreferrer noopener\\\" target=\\\"_blank\\\">Hardware sleutels</a> worden gebruikt als secundaire inlogverificatie."
916 },
917 {
918 "en": "<b style=color:green>2-step login activation removed</b>. You can reactivate this feature at any time.",
@@ -841,7 +921,8 @@
921 "default-mobile.handlebars->9->19"
922 ],
923 "pt": "<b style=color:green>Ativação de login em duas etapas removida</b>. Você pode reativar esse recurso a qualquer momento.",
844 - "ja": "<b style = color:green> 2段階のログインアクティベーションが削除されました</ b>。この機能はいつでも再アクティブ化できます。"
924 + "ja": "<b style = color:green> 2段階のログインアクティベーションが削除されました</ b>。この機能はいつでも再アクティブ化できます。",
925 + "nl": "<b style=color:green> Tweestapsverificatie verwijderd</b>. Je kan deze functie ten allen tijde weer inschakelen."
926 },
927 {
928 "en": "<b style=color:green>2-step login activation successful</b>. You will now need a valid token to login again.",
@@ -850,7 +931,8 @@
931 "default-mobile.handlebars->9->16"
932 ],
933 "pt": "<b style=color:green> ativação de login em duas etapas </b>. Agora você precisará de um token válido para fazer login novamente.",
853 - "ja": "<b style = color:green> 2段階ログインの有効化に成功</ b>。再度ログインするには、有効なトークンが必要になります。"
934 + "ja": "<b style = color:green> 2段階ログインの有効化に成功</ b>。再度ログインするには、有効なトークンが必要になります。",
935 + "nl": "<b style=color:green>Tweestapsverificatie successvol</b>. U hebt nu een geldig token nodig om opnieuw in te loggen."
936 },
937 {
938 "en": "<b style=color:red>2-step login activation failed</b>. Clear the secret from the application and try again. You only have a few minutes to enter the proper code.",
@@ -859,7 +941,8 @@
941 "default-mobile.handlebars->9->17"
942 ],
943 "pt": "<b style=color:red> falha na ativação do login em duas etapas </b>. Limpe o segredo do aplicativo e tente novamente. Você tem apenas alguns minutos para inserir o código correto.",
862 - "ja": "<b style = color:red> 2段階ログインの有効化に失敗しました</ b>。アプリケーションから秘密をクリアして、再試行してください。適切なコードを入力するのに数分しかかかりません。"
944 + "ja": "<b style = color:red> 2段階ログインの有効化に失敗しました</ b>。アプリケーションから秘密をクリアして、再試行してください。適切なコードを入力するのに数分しかかかりません。",
945 + "nl": "<b style=color:red>Tweestapsverificatie mislukt</b>. Wis het geheim van de applicatie en probeer het opnieuw. Je hebt maar een paar minuten om de juiste code in te voeren."
946 },
947 {
948 "en": "<b style=color:red>2-step login activation removal failed</b>. Try again.",
@@ -868,7 +951,8 @@
951 "default-mobile.handlebars->9->20"
952 ],
953 "pt": "<b style=color:red> falha na remoção da ativação do login em duas etapas </b>. Tente novamente.",
871 - "ja": "<b style = color:red> 2段階のログインアクティベーションの削除に失敗しました</ b>。再試行する。"
954 + "ja": "<b style = color:red> 2段階のログインアクティベーションの削除に失敗しました</ b>。再試行する。",
955 + "nl": "<b style=color:red>Tweestapsverificatie verwijdering mislukt</b>. Probeer het opnieuw."
956 },
957 {
958 "en": "\\\\",
@@ -878,7 +962,8 @@
962 "default-mobile.handlebars->9->238"
963 ],
964 "ja": "\\\\",
881 - "cs": "\\\\"
965 + "cs": "\\\\",
966 + "nl": "\\\\"
967 },
968 {
969 "en": "Access Denied",
@@ -888,7 +973,8 @@
973 "default.handlebars->23->652"
974 ],
975 "pt": "Acesso Negado",
891 - "ja": "アクセスが拒否されました"
976 + "ja": "アクセスが拒否されました",
977 + "nl": "Toegang geweigerd"
978 },
979 {
980 "en": "Access denied.",
@@ -897,7 +983,8 @@
983 "login.handlebars->5->13",
984 "login-mobile.handlebars->5->13"
985 ],
900 - "ja": "アクセスが拒否されました。"
986 + "ja": "アクセスが拒否されました。",
987 + "nl": "Toegang geweigerd."
988 },
989 {
990 "en": "Access to server files",
@@ -906,7 +993,8 @@
993 "default.handlebars->23->1197"
994 ],
995 "pt": "Acesso aos arquivos do servidor",
909 - "ja": "サーバーファイルへのアクセス"
996 + "ja": "サーバーファイルへのアクセス",
997 + "nl": "Toegang tot de server bestanden"
998 },
999 {
1000 "en": "Account actions",
@@ -915,7 +1003,8 @@
1003 "default.handlebars->container->column_l->p2->p2AccountActions->1->0"
1004 ],
1005 "pt": "Ações da conta",
918 - "ja": "アカウントアクション"
1006 + "ja": "アカウントアクション",
1007 + "nl": "gebruikersacties"
1008 },
1009 {
1010 "en": "Account Actions",
@@ -924,7 +1013,8 @@
1013 "default-mobile.handlebars->container->page_content->column_l->p3->p3info->1->p3AccountActions->5->0"
1014 ],
1015 "pt": "Ações da Conta",
927 - "ja": "アカウントアクション"
1016 + "ja": "アカウントアクション",
1017 + "nl": "gebruikersacties"
1018 },
1019 {
1020 "en": "Account Creation",
@@ -934,7 +1024,8 @@
1024 "login-mobile.handlebars->container->page_content->column_l->1->1->0->1->createpanel->1->1->5->1"
1025 ],
1026 "pt": "Criação de conta",
937 - "ja": "アカウント作成"
1027 + "ja": "アカウント作成",
1028 + "nl": "Gebruikersaccount aanmaken"
1029 },
1030 {
1031 "en": "Account limit reached.",
@@ -943,7 +1034,8 @@
1034 "login.handlebars->5->3",
1035 "login-mobile.handlebars->5->3"
1036 ],
946 - "ja": "アカウントの上限に達しました。"
1037 + "ja": "アカウントの上限に達しました。",
1038 + "nl": "Gebruikersaccount limiet bereikt."
1039 },
1040 {
1041 "en": "Account locked.",
@@ -952,7 +1044,8 @@
1044 "login.handlebars->5->12",
1045 "login-mobile.handlebars->5->12"
1046 ],
955 - "ja": "アカウントがロックされました。"
1047 + "ja": "アカウントがロックされました。",
1048 + "nl": "Gebruikersaccount vergrendeld"
1049 },
1050 {
1051 "en": "Account not found.",
@@ -961,7 +1054,8 @@
1054 "login.handlebars->5->9",
1055 "login-mobile.handlebars->5->9"
1056 ],
964 - "ja": "アカウントが見つかりませんでした。"
1057 + "ja": "アカウントが見つかりませんでした。",
1058 + "nl": "Gebruikersaccount niet gevonden"
1059 },
1060 {
1061 "en": "Account Reset",
@@ -971,7 +1065,8 @@
1065 "login-mobile.handlebars->container->page_content->column_l->1->1->0->1->resetpanel->1->5->1"
1066 ],
1067 "pt": "Redefinição de conta",
974 - "ja": "アカウントのリセット"
1068 + "ja": "アカウントのリセット",
1069 + "nl": "Gebruikersaccount resetten"
1070 },
1071 {
1072 "en": "Account security",
@@ -980,7 +1075,8 @@
1075 "default.handlebars->container->column_l->p2->p2AccountSecurity->1->0"
1076 ],
1077 "pt": "Segurança da conta",
983 - "ja": "アカウントのセキュリティ"
1078 + "ja": "アカウントのセキュリティ",
1079 + "nl": "Gebruikersaccount beveiliging"
1080 },
1081 {
1082 "en": "Account Security",
@@ -997,7 +1093,8 @@
1093 "default-mobile.handlebars->9->128"
1094 ],
1095 "pt": "Segurança da Conta",
1000 - "ja": "アカウントのセキュリティ"
1096 + "ja": "アカウントのセキュリティ",
1097 + "nl": "Gebruikersaccount beveiliging"
1098 },
1099 {
1100 "en": "ACM",
@@ -1007,7 +1104,8 @@
1104 ],
1105 "pt": "ACM",
1106 "ja": "ACM",
1010 - "cs": "ACM"
1107 + "cs": "ACM",
1108 + "nl": "ACM"
1109 },
1110 {
1111 "en": "Action",
@@ -1017,7 +1115,8 @@
1115 "default.handlebars->23->657"
1116 ],
1117 "pt": "Ação",
1020 - "ja": "アクション"
1118 + "ja": "アクション",
1119 + "nl": "Aktie"
1120 },
1121 {
1122 "en": "Actions",
@@ -1031,7 +1130,8 @@
1130 "default-mobile.handlebars->container->page_content->column_l->p10->p10files->p13toolbar->1->0->1->1"
1131 ],
1132 "pt": "Ações",
1034 - "ja": "行動"
1133 + "ja": "行動",
1134 + "nl": "Akties"
1135 },
1136 {
1137 "en": "Activate camera & microphone",
@@ -1041,7 +1141,8 @@
1141 "messenger.handlebars->xtop->1"
1142 ],
1143 "pt": "Ativar câmera e microfone",
1044 - "ja": "カメラとマイクを有効にする"
1144 + "ja": "カメラとマイクを有効にする",
1145 + "nl": "Activeer camera & microfoon"
1146 },
1147 {
1148 "en": "Activate microphone",
@@ -1051,7 +1152,8 @@
1152 "messenger.handlebars->xtop->1"
1153 ],
1154 "pt": "Ativar microfone",
1054 - "ja": "マイクを有効にする"
1155 + "ja": "マイクを有効にする",
1156 + "nl": "Activeer microfoon"
1157 },
1158 {
1159 "en": "Activated",
@@ -1064,7 +1166,8 @@
1166 "default-mobile.handlebars->9->176"
1167 ],
1168 "pt": "ativado",
1067 - "ja": "有効化"
1169 + "ja": "有効化",
1170 + "nl": "Geactiveerd"
1171 },
1172 {
1173 "en": "Activation",
@@ -1076,7 +1179,8 @@
1179 "default.handlebars->23->979"
1180 ],
1181 "pt": "Ativação",
1079 - "ja": "アクティベーション"
1182 + "ja": "アクティベーション",
1183 + "nl": "Activatie"
1184 },
1185 {
1186 "en": "Active User{0}",
@@ -1085,7 +1189,8 @@
1189 "default.handlebars->23->460"
1190 ],
1191 "pt": "Usuário ativo {0}",
1088 - "ja": "アクティブユーザー{0}"
1192 + "ja": "アクティブユーザー{0}",
1193 + "nl": "Actieve gebruiker(s){0}"
1194 },
1195 {
1196 "en": "Add a new computer to this mesh by installing the mesh agent.",
@@ -1095,7 +1200,8 @@
1200 "default.handlebars->23->980"
1201 ],
1202 "pt": "Adicione um novo computador a essa malha instalando o agente de malha.",
1098 - "ja": "メッシュエージェントをインストールして、このメッシュに新しいコンピューターを追加します。"
1203 + "ja": "メッシュエージェントをインストールして、このメッシュに新しいコンピューターを追加します。",
1204 + "nl": "Voeg een nieuwe computer toe aan deze mesh door de mesh-agent te installeren."
1205 },
1206 {
1207 "en": "Add a new Intel&reg; AMT computer by scanning the local network.",
@@ -1104,7 +1210,8 @@
1210 "default.handlebars->23->191"
1211 ],
1212 "pt": "Adicione um novo Intelreg; Computador AMT digitalizando a rede local.",
1107 - "ja": "新しいIntel&reg;を追加しますローカルネットワークをスキャンしてAMTコンピューター。"
1213 + "ja": "新しいIntel&reg;を追加しますローカルネットワークをスキャンしてAMTコンピューター。",
1214 + "nl": "Voeg een nieuwe Intel® AMT computer toe door het lokale netwerk te scannen."
1215 },
1216 {
1217 "en": "Add a new Intel&reg; AMT computer that is located on the internet.",
@@ -1114,7 +1221,8 @@
1221 "default.handlebars->23->972"
1222 ],
1223 "pt": "Adicione um novo Intel&reg; Computador AMT localizado na Internet.",
1117 - "ja": "新しいIntel&reg;を追加しますインターネット上にあるAMTコンピューター。"
1224 + "ja": "新しいIntel&reg;を追加しますインターネット上にあるAMTコンピューター。",
1225 + "nl": "Voeg een nieuwe Intel® AMT computer toe welke zich op het internet bevind."
1226 },
1227 {
1228 "en": "Add a new Intel&reg; AMT computer that is located on the local network.",
@@ -1124,7 +1232,8 @@
1232 "default.handlebars->23->974"
1233 ],
1234 "pt": "Adicione um novo Intel&reg; AMT computer that is located on the local network.",
1127 - "ja": "新しいIntel&reg;を追加しますローカルネットワーク上にあるAMTコンピューター。"
1235 + "ja": "新しいIntel&reg;を追加しますローカルネットワーク上にあるAMTコンピューター。",
1236 + "nl": "Voeg een nieuwe Intel® AMT computer toe welke zich op het lokale netwerk bevind."
1237 },
1238 {
1239 "en": "Add a new Intel&reg; AMT device to device group \\\"{0}\\\".",
@@ -1133,7 +1242,8 @@
1242 "default.handlebars->23->201"
1243 ],
1244 "pt": "Adicione um novo Intel&reg; Dispositivo AMT para grupo de dispositivos \\\"{0}\\\".",
1136 - "ja": "新しいIntel&reg;を追加しますAMTデバイスからデバイスグループ\\\"{0} \\\"へ。"
1245 + "ja": "新しいIntel&reg;を追加しますAMTデバイスからデバイスグループ\\\"{0}\\\"へ。",
1246 + "nl": "Voeg een nieuwe Intel&reg; AMT computer toe aan een apparaatgroep \\\"{0}\\\"."
1247 },
1248 {
1249 "en": "Add Agent",
@@ -1143,7 +1253,8 @@
1253 "default.handlebars->23->198"
1254 ],
1255 "pt": "Adicionar agente",
1146 - "ja": "エージェントを追加"
1256 + "ja": "エージェントを追加",
1257 + "nl": "Toevoegen Agent"
1258 },
1259 {
1260 "en": "Add CIRA",
@@ -1153,7 +1264,8 @@
1264 "default.handlebars->23->188"
1265 ],
1266 "pt": "Adicionar CIRA",
1156 - "ja": "CIRAを追加"
1267 + "ja": "CIRAを追加",
1268 + "nl": "Toevoegen CIRA"
1269 },
1270 {
1271 "en": "Add Device Event",
@@ -1163,7 +1275,8 @@
1275 "default.handlebars->23->506"
1276 ],
1277 "pt": "Adicionar evento do dispositivo",
1166 - "ja": "デバイスイベントを追加"
1278 + "ja": "デバイスイベントを追加",
1279 + "nl": "Apparaatgebeurtenis toevoegen"
1280 },
1281 {
1282 "en": "Add Device Group",
@@ -1173,7 +1286,8 @@
1286 "default.handlebars->23->169"
1287 ],
1288 "pt": "Adicionar grupo de dispositivos",
1176 - "ja": "デバイスグループを追加"
1289 + "ja": "デバイスグループを追加",
1290 + "nl": "Apparaatgroep toevoegen"
1291 },
1292 {
1293 "en": "Add Intel&reg; AMT CIRA device",
@@ -1182,7 +1296,8 @@
1296 "default.handlebars->23->243"
1297 ],
1298 "pt": "Adicione Intelreg; ",
1185 - "ja": "Intel&reg;を追加AMT CIRAデバイス"
1299 + "ja": "Intel&reg;を追加AMT CIRAデバイス",
1300 + "nl": "Toevoegen Intel® AMT CIRA apparaat"
1301 },
1302 {
1303 "en": "Add Intel&reg; AMT device",
@@ -1191,7 +1306,8 @@
1306 "default.handlebars->23->211"
1307 ],
1308 "pt": "Adicione Intelreg; dispositivo AMT",
1194 - "ja": "Intel&reg;を追加AMTデバイス"
1309 + "ja": "Intel&reg;を追加AMTデバイス",
1310 + "nl": "Add Intel&reg; AMT aaparaat"
1311 },
1312 {
1313 "en": "Add Key",
@@ -1200,7 +1316,8 @@
1316 "default.handlebars->23->107"
1317 ],
1318 "pt": "Adicionar chave",
1203 - "ja": "キーを追加"
1319 + "ja": "キーを追加",
1320 + "nl": "Sleutel toevoegen"
1321 },
1322 {
1323 "en": "Add Local",
@@ -1209,7 +1326,8 @@
1326 "default.handlebars->23->190"
1327 ],
1328 "pt": "Adicionar local",
1212 - "ja": "ローカルを追加"
1329 + "ja": "ローカルを追加",
1330 + "nl": "Lokaal toevoegen"
1331 },
1332 {
1333 "en": "Add Mesh Agent",
@@ -1218,7 +1336,8 @@
1336 "default.handlebars->23->310"
1337 ],
1338 "pt": "Adicionar agente de malha",
1221 - "ja": "メッシュエージェントを追加"
1339 + "ja": "メッシュエージェントを追加",
1340 + "nl": "Toevoegen Mesh agent"
1341 },
1342 {
1343 "en": "add one",
@@ -1229,7 +1348,8 @@
1348 "default.handlebars->23->167"
1349 ],
1350 "pt": "Adicione um",
1232 - "ja": "ひとつ追加"
1351 + "ja": "ひとつ追加",
1352 + "nl": "Voeg toe"
1353 },
1354 {
1355 "en": "Add Security Key",
@@ -1244,7 +1364,8 @@
1364 "default.handlebars->23->677"
1365 ],
1366 "pt": "Adicionar chave de segurança",
1247 - "ja": "セキュリティキーを追加"
1367 + "ja": "セキュリティキーを追加",
1368 + "nl": "Beveiligingssleutel toevoegen"
1369 },
1370 {
1371 "en": "Add User to Mesh",
@@ -1254,7 +1375,8 @@
1375 "default-mobile.handlebars->9->306"
1376 ],
1377 "pt": "Adicionar usuário à malha",
1257 - "ja": "メッシュにユーザーを追加"
1378 + "ja": "メッシュにユーザーを追加",
1379 + "nl": "Gebruiker toevoegen aan Mesh"
1380 },
1381 {
1382 "en": "Add Users",
@@ -1264,7 +1386,8 @@
1386 "default.handlebars->23->971"
1387 ],
1388 "pt": "Adicionar usuários",
1267 - "ja": "ユーザーを追加"
1389 + "ja": "ユーザーを追加",
1390 + "nl": "Gebruikers toevoegen"
1391 },
1392 {
1393 "en": "Add Users to Device Group",
@@ -1273,7 +1396,8 @@
1396 "default.handlebars->23->1057"
1397 ],
1398 "pt": "Adicionar usuários ao grupo de dispositivos",
1276 - "ja": "ユーザーをデバイスグループに追加する"
1399 + "ja": "ユーザーをデバイスグループに追加する",
1400 + "nl": "Gebruikers toevoegen aan apparaatgroep"
1401 },
1402 {
1403 "en": "Add YubiKey&reg; OTP",
@@ -1282,7 +1406,8 @@
1406 "default.handlebars->23->108"
1407 ],
1408 "pt": "Adicione YubiKeyreg; OTP",
1285 - "ja": "YubiKey&reg;を追加OTP"
1409 + "ja": "YubiKey&reg;を追加OTP",
1410 + "nl": "Voeg YubiKey® OTP toe"
1411 },
1412 {
1413 "en": "Address",
@@ -1292,7 +1417,8 @@
1417 "default.handlebars->23->160"
1418 ],
1419 "pt": "Endereço",
1295 - "ja": "住所"
1420 + "ja": "住所",
1421 + "nl": "Adres"
1422 },
1423 {
1424 "en": "Addresses",
@@ -1301,7 +1427,8 @@
1427 "player.htm->3->7"
1428 ],
1429 "pt": "Endereços",
1304 - "ja": "住所"
1430 + "ja": "住所",
1431 + "nl": "Adressen"
1432 },
1433 {
1434 "en": "admin",
@@ -1310,7 +1437,8 @@
1437 ],
1438 "pt": "admin",
1439 "ja": "管理者",
1313 - "cs": "admin"
1440 + "cs": "admin",
1441 + "nl": "Beheerder"
1442 },
1443 {
1444 "en": "Admin Realms",
@@ -1319,7 +1447,8 @@
1447 "default.handlebars->23->1220"
1448 ],
1449 "pt": "Admin Realms",
1322 - "ja": "管理レルム"
1450 + "ja": "管理レルム",
1451 + "nl": "Beheerdersgebied"
1452 },
1453 {
1454 "en": "Administrative Realms",
@@ -1328,7 +1457,8 @@
1457 "default.handlebars->23->1184"
1458 ],
1459 "pt": "Domínios Administrativos",
1331 - "ja": "管理レルム"
1460 + "ja": "管理レルム",
1461 + "nl": "Administratieve gebieden"
1462 },
1463 {
1464 "en": "Administrator",
@@ -1337,7 +1467,8 @@
1467 ],
1468 "pt": "Administrador",
1469 "ja": "管理者",
1340 - "cs": "Administrátor"
1470 + "cs": "Administrátor",
1471 + "nl": "Beheerder"
1472 },
1473 {
1474 "en": "Afrikaans",
@@ -1346,7 +1477,8 @@
1477 ],
1478 "pt": "afrikaans",
1479 "ja": "アフリカーンス語",
1349 - "cs": "Afrikaans"
1480 + "cs": "Afrikaans",
1481 + "nl": "Afrikaans"
1482 },
1483 {
1484 "en": "Agent",
@@ -1361,7 +1493,8 @@
1493 "default-mobile.handlebars->9->187"
1494 ],
1495 "pt": "Agente",
1364 - "ja": "エージェント"
1496 + "ja": "エージェント",
1497 + "nl": "Agent"
1498 },
1499 {
1500 "en": "Agent Action",
@@ -1370,7 +1503,8 @@
1503 "default.handlebars->container->column_l->p15->consoleTable->1->0->1->1"
1504 ],
1505 "pt": "Ação do agente",
1373 - "ja": "エージェントアクション"
1506 + "ja": "エージェントアクション",
1507 + "nl": "Agent actie"
1508 },
1509 {
1510 "en": "Agent connected",
@@ -1381,7 +1515,8 @@
1515 "default.handlebars->23->498"
1516 ],
1517 "pt": "Agente conectado",
1384 - "ja": "接続されたエージェント"
1518 + "ja": "接続されたエージェント",
1519 + "nl": "Agent verbonden"
1520 },
1521 {
1522 "en": "Agent Console",
@@ -1391,7 +1526,8 @@
1526 "default-mobile.handlebars->9->312"
1527 ],
1528 "pt": "Console do agente",
1394 - "ja": "エージェントコンソール"
1529 + "ja": "エージェントコンソール",
1530 + "nl": "Agentconsole"
1531 },
1532 {
1533 "en": "Agent disconnected",
@@ -1400,7 +1536,8 @@
1536 "default.handlebars->23->122"
1537 ],
1538 "pt": "Agente desconectado",
1403 - "ja": "エージェントが切断されました"
1539 + "ja": "エージェントが切断されました",
1540 + "nl": "Agent niet verbonden"
1541 },
1542 {
1543 "en": "Agent is offline",
@@ -1409,7 +1546,8 @@
1546 "default.handlebars->23->650"
1547 ],
1548 "pt": "O agente está offline",
1412 - "ja": "エージェントはオフラインです"
1549 + "ja": "エージェントはオフラインです",
1550 + "nl": "Agent is offline"
1551 },
1552 {
1553 "en": "Agent is online",
@@ -1418,7 +1556,8 @@
1556 "default.handlebars->23->649"
1557 ],
1558 "pt": "Agente está online",
1421 - "ja": "エージェントはオンラインです"
1559 + "ja": "エージェントはオンラインです",
1560 + "nl": "Agent is online"
1561 },
1562 {
1563 "en": "Agent Relay",
@@ -1427,7 +1566,8 @@
1566 ],
1567 "pt": "Retransmissão do agente",
1568 "ja": "エージェントリレー",
1430 - "cs": "Agent Relay (přesměrování)"
1569 + "cs": "Agent Relay (přesměrování)",
1570 + "nl": "Agent Relay"
1571 },
1572 {
1573 "en": "Agent Remote Desktop",
@@ -1437,7 +1577,8 @@
1577 ],
1578 "pt": "Área de trabalho remota do agente",
1579 "ja": "エージェントリモートデスクトップ",
1440 - "cs": "Agent vzdálené plochy"
1580 + "cs": "Agent vzdálené plochy",
1581 + "nl": "Agent Extern bureaublad"
1582 },
1583 {
1584 "en": "Agent Tag",
@@ -1447,7 +1588,8 @@
1588 ],
1589 "pt": "Etiqueta do agente",
1590 "ja": "エージェントタグ",
1450 - "cs": "Značka agenta"
1591 + "cs": "Značka agenta",
1592 + "nl": "Agent Tag"
1593 },
1594 {
1595 "en": "Agents",
@@ -1456,7 +1598,8 @@
1598 "default.handlebars->23->1258"
1599 ],
1600 "pt": "Agentes",
1459 - "ja": "エージェント"
1601 + "ja": "エージェント",
1602 + "nl": "Agents"
1603 },
1604 {
1605 "en": "Albanian",
@@ -1465,7 +1608,8 @@
1608 ],
1609 "pt": "albanês",
1610 "ja": "アルバニア語",
1468 - "cs": "Albanian"
1611 + "cs": "Albanian",
1612 + "nl": "Albanees"
1613 },
1614 {
1615 "en": "All",
@@ -1477,7 +1621,8 @@
1621 "default-mobile.handlebars->9->243"
1622 ],
1623 "pt": "Todos",
1480 - "ja": "すべて"
1624 + "ja": "すべて",
1625 + "nl": "alles"
1626 },
1627 {
1628 "en": "All Displays",
@@ -1486,7 +1631,8 @@
1631 "default-mobile.handlebars->9->230"
1632 ],
1633 "pt": "Todas as telas",
1489 - "ja": "すべてのディスプレイ"
1634 + "ja": "すべてのディスプレイ",
1635 + "nl": "alle schermen"
1636 },
1637 {
1638 "en": "All Focus",
@@ -1497,7 +1643,8 @@
1643 ],
1644 "pt": "All Focus",
1645 "ja": "オールフォーカス",
1500 - "cs": "Zaměřit vše"
1646 + "cs": "Zaměřit vše",
1647 + "nl": "All Focus"
1648 },
1649 {
1650 "en": "Allow users to manage this device group and devices in this group.",
@@ -1507,7 +1654,8 @@
1654 ],
1655 "pt": "Permitir que os usuários gerenciem esse grupo de dispositivos e dispositivos neste grupo.",
1656 "ja": "ユーザーがこのデバイスグループとこのグループ内のデバイスを管理できるようにします。",
1510 - "cs": "Umožnit uživatelům spravovat tuto skupinu a zařízení v této skupině."
1657 + "cs": "Umožnit uživatelům spravovat tuto skupinu a zařízení v této skupině.",
1658 + "nl": "Gebruikers toestaan deze apparaatgroep en apparaten in deze groep te beheren."
1659 },
1660 {
1661 "en": "Alt-F4",
@@ -1517,7 +1665,8 @@
1665 ],
1666 "pt": "Alt-F4",
1667 "ja": "Alt-F4",
1520 - "cs": "Alt-F4"
1668 + "cs": "Alt-F4",
1669 + "nl": "Alt-F4"
1670 },
1671 {
1672 "en": "Alt-Tab",
@@ -1527,7 +1676,8 @@
1676 ],
1677 "pt": "Alt-Tab",
1678 "ja": "Alt-Tab",
1530 - "cs": "Alt-Tab"
1679 + "cs": "Alt-Tab",
1680 + "nl": "Alt-Tab"
1681 },
1682 {
1683 "en": "Alternate (F10 = ESC+0)",
@@ -1536,7 +1686,8 @@
1686 ],
1687 "pt": "Alternativo (F10 = ESC + 0)",
1688 "ja": "代替(F10 = ESC + 0)",
1539 - "cs": "Nebo (F10 = ESC+0)"
1689 + "cs": "Nebo (F10 = ESC+0)",
1690 + "nl": "Alternatief (F10 = ESC + 0)"
1691 },
1692 {
1693 "en": "Always Notify",
@@ -1546,7 +1697,8 @@
1697 ],
1698 "pt": "Notificar sempre",
1699 "ja": "常に通知する",
1549 - "cs": "Vždy upozorňovat"
1700 + "cs": "Vždy upozorňovat",
1701 + "nl": "Altijd informeren"
1702 },
1703 {
1704 "en": "Always Prompt",
@@ -1555,7 +1707,8 @@
1707 ],
1708 "pt": "Sempre alerta",
1709 "ja": "常にプロンプ​​ト",
1558 - "cs": "Vždy se dotázat"
1710 + "cs": "Vždy se dotázat",
1711 + "nl": "Altijd prompt"
1712 },
1713 {
1714 "en": "AMT",
@@ -1565,7 +1718,8 @@
1718 ],
1719 "pt": "AMT",
1720 "ja": "AMT",
1568 - "cs": "AMT"
1721 + "cs": "AMT",
1722 + "nl": "AMT"
1723 },
1724 {
1725 "en": "and its source can be downloaded from",
@@ -1575,7 +1729,8 @@
1729 ],
1730 "pt": "e sua fonte pode ser baixada de",
1731 "ja": "そのソースはからダウンロードできます",
1578 - "cs": "a jeho zdroj může být stažen z"
1732 + "cs": "a jeho zdroj může být stažen z",
1733 + "nl": "en de bron kan worden gedownload van"
1734 },
1735 {
1736 "en": "Android APK",
@@ -1585,7 +1740,8 @@
1740 ],
1741 "pt": "Android APK",
1742 "ja": "Android APK",
1588 - "cs": "Android APK"
1743 + "cs": "Android APK",
1744 + "nl": "Android APK"
1745 },
1746 {
1747 "en": "Android ARM",
@@ -1595,7 +1751,8 @@
1751 ],
1752 "pt": "Android ARM",
1753 "ja": "Android ARM",
1598 - "cs": "Android ARM"
1754 + "cs": "Android ARM",
1755 + "nl": "Android ARM"
1756 },
1757 {
1758 "en": "Android x86",
@@ -1605,7 +1762,8 @@
1762 ],
1763 "pt": "Android x86",
1764 "ja": "Android x86",
1608 - "cs": "Android x86"
1765 + "cs": "Android x86",
1766 + "nl": "Android x86"
1767 },
1768 {
1769 "en": "Antivirus",
@@ -1615,7 +1773,8 @@
1773 ],
1774 "pt": "Antivírus",
1775 "ja": "アンチウイルス",
1618 - "cs": "Antivir"
1776 + "cs": "Antivir",
1777 + "nl": "Anti-virus"
1778 },
1779 {
1780 "en": "Any supported",
@@ -1624,7 +1783,8 @@
1783 ],
1784 "pt": "Qualquer suportado",
1785 "ja": "サポートされているもの",
1627 - "cs": "Všechny podporovány"
1786 + "cs": "Všechny podporovány",
1787 + "nl": "Alle ondersteunde"
1788 },
1789 {
1790 "en": "Apple MacOS",
@@ -1633,7 +1793,8 @@
1793 ],
1794 "pt": "Apple MacOS",
1795 "ja": "Apple MacOS",
1636 - "cs": "Apple MacOS"
1796 + "cs": "Apple MacOS",
1797 + "nl": "Apple MacOS"
1798 },
1799 {
1800 "en": "Apple MacOS only",
@@ -1642,7 +1803,8 @@
1803 ],
1804 "pt": "Apenas Apple MacOS ",
1805 "ja": "Apple MacOSのみ",
1645 - "cs": "Apple MacOS pouze"
1806 + "cs": "Apple MacOS pouze",
1807 + "nl": "Apple MacOS alleen"
1808 },
1809 {
1810 "en": "Apple™ MacOS",
@@ -1651,7 +1813,8 @@
1813 ],
1814 "pt": "Apple™ MacOS",
1815 "ja": "Apple™MacOS",
1654 - "cs": "Apple™ MacOS"
1816 + "cs": "Apple™ MacOS",
1817 + "nl": "Apple™ MacOS"
1818 },
1819 {
1820 "en": "Arabic (Algeria)",
@@ -1660,7 +1823,8 @@
1823 ],
1824 "pt": "Árabe (Argélia)",
1825 "ja": "アラビア語(アルジェリア)",
1663 - "cs": "Arabic (Algeria)"
1826 + "cs": "Arabic (Algeria)",
1827 + "nl": "Arabisch (Algerije)"
1828 },
1829 {
1830 "en": "Arabic (Bahrain)",
@@ -1669,7 +1833,8 @@
1833 ],
1834 "pt": "Árabe (Bahrain)",
1835 "ja": "アラビア語(バーレーン)",
1672 - "cs": "Arabic (Bahrain)"
1836 + "cs": "Arabic (Bahrain)",
1837 + "nl": "Arabisch (Bahrein)"
1838 },
1839 {
1840 "en": "Arabic (Egypt)",
@@ -1678,7 +1843,8 @@
1843 ],
1844 "pt": "Árabe (Egito)",
1845 "ja": "アラビア語(エジプト)",
1681 - "cs": "Arabic (Egypt)"
1846 + "cs": "Arabic (Egypt)",
1847 + "nl": "Arabisch (Egypte)"
1848 },
1849 {
1850 "en": "Arabic (Iraq)",
@@ -1687,7 +1853,8 @@
1853 ],
1854 "pt": "Árabe (Iraque)",
1855 "ja": "アラビア語(イラク)",
1690 - "cs": "Arabic (Iraq)"
1856 + "cs": "Arabic (Iraq)",
1857 + "nl": "Arabisch (Irak)"
1858 },
1859 {
1860 "en": "Arabic (Jordan)",
@@ -1696,7 +1863,8 @@
1863 ],
1864 "pt": "Árabe (Jordânia)",
1865 "ja": "アラビア語(ヨルダン)",
1699 - "cs": "Arabic (Jordan)"
1866 + "cs": "Arabic (Jordan)",
1867 + "nl": "Arabisch (Jordanië)"
1868 },
1869 {
1870 "en": "Arabic (Kuwait)",
@@ -1705,7 +1873,8 @@
1873 ],
1874 "pt": "Árabe (Kuwait)",
1875 "ja": "アラビア語(クウェート)",
1708 - "cs": "Arabic (Kuwait)"
1876 + "cs": "Arabic (Kuwait)",
1877 + "nl": "Arabisch (Koeweit)"
1878 },
1879 {
1880 "en": "Arabic (Lebanon)",
@@ -1714,7 +1883,8 @@
1883 ],
1884 "pt": "Árabe (Líbano)",
1885 "ja": "アラビア語(レバノン)",
1717 - "cs": "Arabic (Lebanon)"
1886 + "cs": "Arabic (Lebanon)",
1887 + "nl": "Arabisch (Libanon)"
1888 },
1889 {
1890 "en": "Arabic (Libya)",
@@ -1723,7 +1893,8 @@
1893 ],
1894 "pt": "Árabe (Líbia)",
1895 "ja": "アラビア語(リビア)",
1726 - "cs": "Arabic (Libya)"
1896 + "cs": "Arabic (Libya)",
1897 + "nl": "Arabisch (Libië)"
1898 },
1899 {
1900 "en": "Arabic (Morocco)",
@@ -1732,7 +1903,8 @@
1903 ],
1904 "pt": "Árabe (Marrocos)",
1905 "ja": "アラビア語(モロッコ)",
1735 - "cs": "Arabic (Morocco)"
1906 + "cs": "Arabic (Morocco)",
1907 + "nl": "Arabisch (Marokko)"
1908 },
1909 {
1910 "en": "Arabic (Oman)",
@@ -1741,7 +1913,8 @@
1913 ],
1914 "pt": "Árabe (Omã)",
1915 "ja": "アラビア語(オマーン)",
1744 - "cs": "Arabic (Oman)"
1916 + "cs": "Arabic (Oman)",
1917 + "nl": "Arabisch (Oman)"
1918 },
1919 {
1920 "en": "Arabic (Qatar)",
@@ -1750,7 +1923,8 @@
1923 ],
1924 "pt": "Árabe (Catar)",
1925 "ja": "アラビア語(カタール)",
1753 - "cs": "Arabic (Qatar)"
1926 + "cs": "Arabic (Qatar)",
1927 + "nl": "Arabisch (Qatar)"
1928 },
1929 {
1930 "en": "Arabic (Saudi Arabia)",
@@ -1759,7 +1933,8 @@
1933 ],
1934 "pt": "Árabe (Arábia Saudita)",
1935 "ja": "アラビア語(サウジアラビア)",
1762 - "cs": "Arabic (Saudi Arabia)"
1936 + "cs": "Arabic (Saudi Arabia)",
1937 + "nl": "Arabisch (Saoedi-Arabië)"
1938 },
1939 {
1940 "en": "Arabic (Standard)",
@@ -1768,7 +1943,8 @@
1943 ],
1944 "pt": "Árabe (padrão)",
1945 "ja": "アラビア語(標準)",
1771 - "cs": "Arabic (Standard)"
1946 + "cs": "Arabic (Standard)",
1947 + "nl": "Arabisch (Standaard)"
1948 },
1949 {
1950 "en": "Arabic (Syria)",
@@ -1777,7 +1953,8 @@
1953 ],
1954 "pt": "Árabe (Síria)",
1955 "ja": "アラビア語(シリア)",
1780 - "cs": "Arabic (Syria)"
1956 + "cs": "Arabic (Syria)",
1957 + "nl": "Arabisch (Syrië)"
1958 },
1959 {
1960 "en": "Arabic (Tunisia)",
@@ -1786,7 +1963,8 @@
1963 ],
1964 "pt": "Árabe (Tunísia)",
1965 "ja": "アラビア語(チュニジア)",
1789 - "cs": "Arabic (Tunisia)"
1966 + "cs": "Arabic (Tunisia)",
1967 + "nl": "Arabisch (Tunesië)"
1968 },
1969 {
1970 "en": "Arabic (U.A.E.)",
@@ -1795,7 +1973,8 @@
1973 ],
1974 "pt": "Árabe (U.A.E)",
1975 "ja": "アラビア語(U.A.E.)",
1798 - "cs": "Arabic (U.A.E.)"
1976 + "cs": "Arabic (U.A.E.)",
1977 + "nl": "Arabisch (Verenigde Arabische Emiraten.)"
1978 },
1979 {
1980 "en": "Arabic (Yemen)",
@@ -1804,7 +1983,8 @@
1983 ],
1984 "pt": "Árabe (Iêmen)",
1985 "ja": "アラビア語(イエメン)",
1807 - "cs": "Arabic (Yemen)"
1986 + "cs": "Arabic (Yemen)",
1987 + "nl": "Arabisch (Jemen)"
1988 },
1989 {
1990 "en": "Aragonese",
@@ -1813,7 +1993,8 @@
1993 ],
1994 "pt": "Aragonês",
1995 "ja": "アラゴン語",
1816 - "cs": "Aragonese"
1996 + "cs": "Aragonese",
1997 + "nl": "Aragonese"
1998 },
1999 {
2000 "en": "Architecture",
@@ -1823,7 +2004,8 @@
2004 "default.handlebars->23->46"
2005 ],
2006 "pt": "Arquitetura",
1826 - "ja": "建築"
2007 + "ja": "建築",
2008 + "nl": "architectuur"
2009 },
2010 {
2011 "en": "Are you sure you want to connect to {0} devices?",
@@ -1831,7 +2013,8 @@
2013 "default.handlebars->23->182"
2014 ],
2015 "ja": "{0}台のデバイスに接続してもよろしいですか?",
1834 - "cs": "Opravdu připojit k {0} zařízení?"
2016 + "cs": "Opravdu připojit k {0} zařízení?",
2017 + "nl": "Weet u zeker dat u verbinding wilt maken met {0} -apparaten?"
2018 },
2019 {
2020 "en": "Are you sure you want to delete group {0}? Deleting the device group will also delete all information about devices within this group.",
@@ -1842,7 +2025,8 @@
2025 ],
2026 "pt": "Tem certeza de que deseja excluir o grupo {0}? A exclusão do grupo de dispositivos também excluirá todas as informações sobre os dispositivos desse grupo.",
2027 "ja": "グループ{0}を削除してもよろしいですか?デバイスグループを削除すると、このグループ内のデバイスに関するすべての情報も削除されます。",
1845 - "cs": "Opravdu smazat skupinu {0}? Smazáním skupiny se smažou všechny informace o zařízeních v této skupině."
2028 + "cs": "Opravdu smazat skupinu {0}? Smazáním skupiny se smažou všechny informace o zařízeních v této skupině.",
2029 + "nl": "Weet je zeker dat je groep {0} wilt verwijderen? Als u de apparaatgroep verwijdert, wordt ook alle informatie over apparaten binnen deze groep verwijderd."
2030 },
2031 {
2032 "en": "Are you sure you want to delete node {0}?",
@@ -1852,7 +2036,8 @@
2036 ],
2037 "pt": "Tem certeza de que deseja excluir o nó {0}?",
2038 "ja": "ノード{0}を削除してもよろしいですか?",
1855 - "cs": "Opravdu smazat nód {0}?"
2039 + "cs": "Opravdu smazat nód {0}?",
2040 + "nl": "Weet u zeker dat u apparaat {0} wilt verwijderen?"
2041 },
2042 {
2043 "en": "Are you sure you want to uninstall selected agent?",
@@ -1860,7 +2045,8 @@
2045 "default.handlebars->23->534"
2046 ],
2047 "ja": "選択したエージェントをアンインストールしてもよろしいですか?",
1863 - "cs": "Opravdu odinstalovat vybraného agenta?"
2048 + "cs": "Opravdu odinstalovat vybraného agenta?",
2049 + "nl": "Weet u zeker dat u de geselecteerde agent wilt verwijderen?"
2050 },
2051 {
2052 "en": "Are you sure you want to uninstall the selected {0} agents?",
@@ -1868,7 +2054,8 @@
2054 "default.handlebars->23->533"
2055 ],
2056 "ja": "選択した{0}エージェントをアンインストールしてもよろしいですか?",
1871 - "cs": "Opravdu odinstalovat vybraných {0} agentů?"
2057 + "cs": "Opravdu odinstalovat vybraných {0} agentů?",
2058 + "nl": "Weet u zeker dat u de geselecteerde {0} agenten wilt verwijderen?"
2059 },
2060 {
2061 "en": "Are you sure you want to {0} the plugin: {1}",
@@ -1876,7 +2063,8 @@
2063 "default.handlebars->23->1289"
2064 ],
2065 "ja": "プラグインを{0}してもよろしいですか:{1}",
1879 - "cs": "Opravdu {0} plugin: {1}"
2066 + "cs": "Opravdu {0} plugin: {1}",
2067 + "nl": "Weet u zeker dat u de plug-in {0} wilt gebruiken: {1}"
2068 },
2069 {
2070 "en": "ARM-Linaro",
@@ -1886,7 +2074,8 @@
2074 ],
2075 "pt": "ARM-Linaro",
2076 "ja": "ARM-リナロ",
1889 - "cs": "ARM-Linaro"
2077 + "cs": "ARM-Linaro",
2078 + "nl": "ARM-Linaro"
2079 },
2080 {
2081 "en": "Armenian",
@@ -1895,7 +2084,8 @@
2084 ],
2085 "pt": "Armênio",
2086 "ja": "アルメニア人",
1898 - "cs": "Armenian"
2087 + "cs": "Armenian",
2088 + "nl": "Armeens"
2089 },
2090 {
2091 "en": "ARMv6l / ARMv7l",
@@ -1905,7 +2095,8 @@
2095 ],
2096 "pt": "ARMv6l / ARMv7l",
2097 "ja": "ARMv6l / ARMv7l",
1908 - "cs": "ARMv6l / ARMv7l"
2098 + "cs": "ARMv6l / ARMv7l",
2099 + "nl": "ARMv6l / ARMv7l"
2100 },
2101 {
2102 "en": "ARMv6l / ARMv7l / NoKVM",
@@ -1915,7 +2106,8 @@
2106 ],
2107 "pt": "ARMv6l / ARMv7l / NoKVM",
2108 "ja": "ARMv6l / ARMv7l / NoKVM",
1918 - "cs": "ARMv6l / ARMv7l / NoKVM"
2109 + "cs": "ARMv6l / ARMv7l / NoKVM",
2110 + "nl": "ARMv6l / ARMv7l / NoKVM"
2111 },
2112 {
2113 "en": "ARMv8 64bit",
@@ -1925,7 +2117,8 @@
2117 ],
2118 "pt": "ARMv8 64bit",
2119 "ja": "ARMv8 64ビット",
1928 - "cs": "ARMv8 64bit"
2120 + "cs": "ARMv8 64bit",
2121 + "nl": "ARMv8 64bit"
2122 },
2123 {
2124 "en": "Assamese",
@@ -1934,7 +2127,8 @@
2127 ],
2128 "pt": "Assamese",
2129 "ja": "アッサム語",
1937 - "cs": "Assamese"
2130 + "cs": "Assamese",
2131 + "nl": "Assamees"
2132 },
2133 {
2134 "en": "Asturian",
@@ -1943,7 +2137,8 @@
2137 ],
2138 "pt": "Asturiano",
2139 "ja": "アストゥリアス",
1946 - "cs": "Asturian"
2140 + "cs": "Asturian",
2141 + "nl": "Asturische"
2142 },
2143 {
2144 "en": "Authentication App",
@@ -1952,7 +2147,8 @@
2147 ],
2148 "pt": "Aplicativo de autenticação",
2149 "ja": "認証アプリ",
1955 - "cs": "Autentizační aplikace"
2150 + "cs": "Autentizační aplikace",
2151 + "nl": "Verificatie-app"
2152 },
2153 {
2154 "en": "Authenticator App",
@@ -1968,7 +2164,8 @@
2164 ],
2165 "pt": "Autenticador de aplicativo",
2166 "ja": "認証アプリ",
1971 - "cs": "Aplikace pro autentizaci"
2167 + "cs": "Aplikace pro autentizaci",
2168 + "nl": "Verificatie-app"
2169 },
2170 {
2171 "en": "Authenticator app activation successful.",
@@ -1977,7 +2174,8 @@
2174 ],
2175 "pt": "Ativação do aplicativo autenticador bem-sucedida.",
2176 "ja": "認証アプリのアクティベーションが成功しました。",
1980 - "cs": "Aktivace autentizační aplikace úspěšná."
2177 + "cs": "Aktivace autentizační aplikace úspěšná.",
2178 + "nl": "Verificatie-app activatie geslaagd"
2179 },
2180 {
2181 "en": "Authenticator application removed.",
@@ -1986,7 +2184,8 @@
2184 ],
2185 "pt": "Aplicativo autenticador removido.",
2186 "ja": "認証アプリケーションが削除されました。",
1989 - "cs": "Autentizační aplikace odstraněna."
2187 + "cs": "Autentizační aplikace odstraněna.",
2188 + "nl": "Verificatie-applicatie verwijderd."
2189 },
2190 {
2191 "en": "Auto",
@@ -1997,7 +2196,8 @@
2196 ],
2197 "pt": "Auto",
2198 "ja": "オート",
2000 - "cs": "Auto"
2199 + "cs": "Auto",
2200 + "nl": "Automatisch"
2201 },
2202 {
2203 "en": "Auto-Remove",
@@ -2006,7 +2206,8 @@
2206 ],
2207 "pt": "Remover automaticamente",
2208 "ja": "自動削除",
2009 - "cs": "Automatické odstranění"
2209 + "cs": "Automatické odstranění",
2210 + "nl": "Geautomatiseerde verwijdering"
2211 },
2212 {
2213 "en": "AutoConnect",
@@ -2018,7 +2219,8 @@
2219 ],
2220 "pt": "Conexão automática",
2221 "ja": "自動接続",
2021 - "cs": "Automatické připojení"
2222 + "cs": "Automatické připojení",
2223 + "nl": "Automatisch verbinden"
2224 },
2225 {
2226 "en": "Automatic connect",
@@ -2028,7 +2230,8 @@
2230 ],
2231 "pt": "Conexão automática",
2232 "ja": "自動接続",
2031 - "cs": "Automatické připojení"
2233 + "cs": "Automatické připojení",
2234 + "nl": "Automatisch verbinden"
2235 },
2236 {
2237 "en": "Azerbaijani",
@@ -2037,7 +2240,8 @@
2240 ],
2241 "pt": "Azerbaijão",
2242 "ja": "アゼルバイジャン語",
2040 - "cs": "Azerbaijani"
2243 + "cs": "Azerbaijani",
2244 + "nl": "Azerbeidzjaanse"
2245 },
2246 {
2247 "en": "Back",
@@ -2062,7 +2266,8 @@
2266 "terms-mobile.handlebars->container->footer->1->1->0->3->1"
2267 ],
2268 "pt": "Voltar",
2065 - "ja": "バック"
2269 + "ja": "バック",
2270 + "nl": "Terug"
2271 },
2272 {
2273 "en": "Back to login",
@@ -2080,7 +2285,8 @@
2285 ],
2286 "pt": "Volte ao login",
2287 "ja": "ログインに戻る",
2083 - "cs": "Zpět na přihlášení"
2288 + "cs": "Zpět na přihlášení",
2289 + "nl": "Terug naar inloggen"
2290 },
2291 {
2292 "en": "Background & interactive",
@@ -2089,7 +2295,8 @@
2295 ],
2296 "pt": "Segundo plano e interativo",
2297 "ja": "背景とインタラクティブ",
2092 - "cs": "Na pozadí & interaktivní"
2298 + "cs": "Na pozadí & interaktivní",
2299 + "nl": "Achtergrond & interactief"
2300 },
2301 {
2302 "en": "Background and interactive",
@@ -2098,7 +2305,8 @@
2305 ],
2306 "pt": "Segundo plano e interativo",
2307 "ja": "背景とインタラクティブ",
2101 - "cs": "Na pozadí a interaktivní"
2308 + "cs": "Na pozadí a interaktivní",
2309 + "nl": "Achtergrond en interactief"
2310 },
2311 {
2312 "en": "Background only",
@@ -2108,7 +2316,8 @@
2316 ],
2317 "pt": "Apenas em segundo plano",
2318 "ja": "背景のみ",
2111 - "cs": "Pouze na pozadí"
2319 + "cs": "Pouze na pozadí",
2320 + "nl": "Achtergrond alleen"
2321 },
2322 {
2323 "en": "Backspace",
@@ -2118,7 +2327,8 @@
2327 ],
2328 "pt": "Excluir",
2329 "ja": "バックスペース",
2121 - "cs": "Zpětná klávesa (backspace)"
2330 + "cs": "Zpětná klávesa (backspace)",
2331 + "nl": "Backspace"
2332 },
2333 {
2334 "en": "Backup Codes",
@@ -2127,7 +2337,8 @@
2337 ],
2338 "pt": "Códigos de backup",
2339 "ja": "バックアップコード",
2130 - "cs": "Záloha kódu"
2340 + "cs": "Záloha kódu",
2341 + "nl": "Back-upcodes"
2342 },
2343 {
2344 "en": "Basque",
@@ -2136,7 +2347,8 @@
2347 ],
2348 "pt": "Basco",
2349 "ja": "バスク",
2139 - "cs": "Basque"
2350 + "cs": "Basque",
2351 + "nl": "baskisch"
2352 },
2353 {
2354 "en": "Batch create many user accounts",
@@ -2145,7 +2357,8 @@
2357 ],
2358 "pt": "Lote criar muitas contas de usuário",
2359 "ja": "多数のユーザーアカウントをバッチ作成する",
2148 - "cs": "Dávkově vytvořit více uživatelů"
2360 + "cs": "Dávkově vytvořit více uživatelů",
2361 + "nl": "Batch aanmaken gebruikersaccounts"
2362 },
2363 {
2364 "en": "Belarusian",
@@ -2154,7 +2367,8 @@
2367 ],
2368 "pt": "Bielorrusso",
2369 "ja": "ベラルーシ語",
2157 - "cs": "Belarusian"
2370 + "cs": "Belarusian",
2371 + "nl": "Wit-Rusland"
2372 },
2373 {
2374 "en": "Bengali",
@@ -2163,7 +2377,8 @@
2377 ],
2378 "pt": "Bengali",
2379 "ja": "ベンガル語",
2166 - "cs": "Bengali"
2380 + "cs": "Bengali",
2381 + "nl": "Bengalees"
2382 },
2383 {
2384 "en": "BIOS",
@@ -2172,7 +2387,8 @@
2387 ],
2388 "pt": "BIOS",
2389 "ja": "BIOS",
2175 - "cs": "BIOS"
2390 + "cs": "BIOS",
2391 + "nl": "BIOS"
2392 },
2393 {
2394 "en": "Bosnian",
@@ -2181,7 +2397,8 @@
2397 ],
2398 "pt": "Bósnia",
2399 "ja": "ボスニア語",
2184 - "cs": "Bosnian"
2400 + "cs": "Bosnian",
2401 + "nl": "Bosnisch"
2402 },
2403 {
2404 "en": "Breton",
@@ -2190,7 +2407,8 @@
2407 ],
2408 "pt": "Breton",
2409 "ja": "ブルトン",
2193 - "cs": "Breton"
2410 + "cs": "Breton",
2411 + "nl": "Breton"
2412 },
2413 {
2414 "en": "Broadcast",
@@ -2200,7 +2418,8 @@
2418 ],
2419 "pt": "Broadcast",
2420 "ja": "放送",
2203 - "cs": "Hromadná zpráva"
2421 + "cs": "Hromadná zpráva",
2422 + "nl": "Uitzending"
2423 },
2424 {
2425 "en": "Broadcast a message to all connected users.",
@@ -2209,7 +2428,8 @@
2428 ],
2429 "pt": "Transmita uma mensagem para todos os usuários conectados.",
2430 "ja": "接続されているすべてのユーザーにメッセージをブロードキャストします。",
2212 - "cs": "Zaslat hromadnou zprávu všem připojeným uživatelům."
2431 + "cs": "Zaslat hromadnou zprávu všem připojeným uživatelům.",
2432 + "nl": "Verzend een bericht naar alle verbonden gebruikers."
2433 },
2434 {
2435 "en": "Broadcast Message",
@@ -2219,7 +2439,8 @@
2439 ],
2440 "pt": "Mensagem de transmissão",
2441 "ja": "同報メッセージ",
2222 - "cs": "Hromadná zpráva"
2442 + "cs": "Hromadná zpráva",
2443 + "nl": "Bericht uitzenden"
2444 },
2445 {
2446 "en": "Bulgarian",
@@ -2228,7 +2449,8 @@
2449 ],
2450 "pt": "Búlgaria",
2451 "ja": "ブルガリア語",
2231 - "cs": "Bulgarian"
2452 + "cs": "Bulgarian",
2453 + "nl": "Bulgaars"
2454 },
2455 {
2456 "en": "Burmese",
@@ -2237,7 +2459,8 @@
2459 ],
2460 "pt": "Birmanês",
2461 "ja": "ビルマ語",
2240 - "cs": "Burmese"
2462 + "cs": "Burmese",
2463 + "nl": "Birmaans"
2464 },
2465 {
2466 "en": "Call Error",
@@ -2247,7 +2470,8 @@
2470 ],
2471 "pt": "Erro de chamada",
2472 "ja": "呼び出しエラー",
2250 - "cs": "Chybová volání"
2473 + "cs": "Chybová volání",
2474 + "nl": "Oproepfout"
2475 },
2476 {
2477 "en": "Cancel",
@@ -2263,7 +2487,8 @@
2487 "player.htm->p11->dialog->idx_dlgButtonBar"
2488 ],
2489 "pt": "Cancelar",
2266 - "ja": "キャンセル"
2490 + "ja": "キャンセル",
2491 + "nl": "Afbreken"
2492 },
2493 {
2494 "en": "Capacity / Speed",
@@ -2272,7 +2497,8 @@
2497 ],
2498 "pt": "Capacidade / velocidade",
2499 "ja": "容量/速度",
2275 - "cs": "Kapacita / Rychlost"
2500 + "cs": "Kapacita / Rychlost",
2501 + "nl": "Capaciteit / snelheid"
2502 },
2503 {
2504 "en": "Catalan",
@@ -2281,7 +2507,8 @@
2507 ],
2508 "pt": "Catalão",
2509 "ja": "カタロニア語",
2284 - "cs": "Catalan"
2510 + "cs": "Catalan",
2511 + "nl": "Catalaans"
2512 },
2513 {
2514 "en": "CCM",
@@ -2291,7 +2518,8 @@
2518 ],
2519 "pt": "CCM",
2520 "ja": "CCM",
2294 - "cs": "CCM"
2521 + "cs": "CCM",
2522 + "nl": "CCM"
2523 },
2524 {
2525 "en": "Center map here",
@@ -2301,7 +2529,8 @@
2529 ],
2530 "pt": "Centralize o mapa aqui",
2531 "ja": "センターマップはこちら",
2304 - "cs": "Vycentrovat mapu zde"
2532 + "cs": "Vycentrovat mapu zde",
2533 + "nl": "Centreer kaart hier"
2534 },
2535 {
2536 "en": "Chamorro",
@@ -2310,7 +2539,8 @@
2539 ],
2540 "pt": "Chamorro",
2541 "ja": "チャモロ",
2313 - "cs": "Chamorro"
2542 + "cs": "Chamorro",
2543 + "nl": "Chamorro"
2544 },
2545 {
2546 "en": "Change email address",
@@ -2320,7 +2550,8 @@
2550 "default-mobile.handlebars->container->page_content->column_l->p3->p3info->1->p3AccountActions->7->3->changeEmailId->0"
2551 ],
2552 "pt": "Mude o endereço de email",
2323 - "ja": "メールアドレスを変更する"
2553 + "ja": "メールアドレスを変更する",
2554 + "nl": "Verander e-mailadres"
2555 },
2556 {
2557 "en": "Change Email for {0}",
@@ -2329,7 +2560,8 @@
2560 "default.handlebars->23->1234"
2561 ],
2562 "pt": "Alterar email para {0}",
2332 - "ja": "{0}のメールを変更"
2563 + "ja": "{0}のメールを変更",
2564 + "nl": "Verander e-mail voor {0}"
2565 },
2566 {
2567 "en": "Change Group",
@@ -2340,7 +2572,8 @@
2572 "default.handlebars->23->543"
2573 ],
2574 "pt": "Alterar grupo",
2343 - "ja": "グループを変更"
2575 + "ja": "グループを変更",
2576 + "nl": "verander groep"
2577 },
2578 {
2579 "en": "Change Password",
@@ -2350,7 +2583,8 @@
2583 "default-mobile.handlebars->9->46"
2584 ],
2585 "pt": "Mudar senha",
2353 - "ja": "パスワードを変更する"
2586 + "ja": "パスワードを変更する",
2587 + "nl": "Verander wachtwoord"
2588 },
2589 {
2590 "en": "Change password",
@@ -2360,7 +2594,8 @@
2594 "default-mobile.handlebars->container->page_content->column_l->p3->p3info->1->p3AccountActions->7->5->0"
2595 ],
2596 "pt": "Mudar senha",
2363 - "ja": "パスワードを変更する"
2597 + "ja": "パスワードを変更する",
2598 + "nl": "Verander wachtwoord"
2599 },
2600 {
2601 "en": "Change Password for {0}",
@@ -2369,7 +2604,8 @@
2604 ],
2605 "pt": "Alterar senha para {0}",
2606 "ja": "{0}のパスワードを変更",
2372 - "cs": "Změnit heslo pro {0}"
2607 + "cs": "Změnit heslo pro {0}",
2608 + "nl": "Verander wachtwoord voor {0}"
2609 },
2610 {
2611 "en": "Change the agent Java Script code module",
@@ -2378,7 +2614,8 @@
2614 ],
2615 "pt": "Alterar o módulo de código Java Script do agente",
2616 "ja": "エージェントのJava Scriptコードモジュールを変更する",
2381 - "cs": "Změnit kód modulu agenta Java Script"
2617 + "cs": "Změnit kód modulu agenta Java Script",
2618 + "nl": "Wijzig de Javascript code module van de agent"
2619 },
2620 {
2621 "en": "Change the power state of the remote machine",
@@ -2387,7 +2624,8 @@
2624 ],
2625 "pt": "Alterar o estado de energia da máquina remota",
2626 "ja": "リモートマシンの電源状態を変更する",
2390 - "cs": "Změnit stav napájení vzdáleného zařízení"
2627 + "cs": "Změnit stav napájení vzdáleného zařízení",
2628 + "nl": "Wijzig de stroomstatus van het externe apparaat"
2629 },
2630 {
2631 "en": "Change your account email address here.",
@@ -2396,7 +2634,8 @@
2634 ],
2635 "pt": "Mude o endereço de e-mail da sua conta aqui.",
2636 "ja": "ここでアカウントのメールアドレスを変更します。",
2399 - "cs": "Změň si svůj email zde."
2637 + "cs": "Změň si svůj email zde.",
2638 + "nl": "Wijzig hier het e-mailadres van uw account."
2639 },
2640 {
2641 "en": "Change your account password by entering the old password and new password twice in the boxes below.",
@@ -2405,7 +2644,8 @@
2644 "default.handlebars->23->896"
2645 ],
2646 "pt": "Altere a senha da sua conta digitando a senha antiga e a nova senha duas vezes nas caixas abaixo.",
2408 - "ja": "下のボックスに古いパスワードと新しいパスワードを2回入力して、アカウントのパスワードを変更します。"
2647 + "ja": "下のボックスに古いパスワードと新しいパスワードを2回入力して、アカウントのパスワードを変更します。",
2648 + "nl": "Wijzig uw wachtwoord door het invoeren van het oude en het nieuwe wachtwoord twee keer in de vakken hieronder."
2649 },
2650 {
2651 "en": "Changing the language will require a refresh of the page.",
@@ -2414,7 +2654,8 @@
2654 ],
2655 "pt": "Alterar o idioma exigirá uma atualização da página.",
2656 "ja": "言語を変更するには、ページを更新する必要があります。",
2417 - "cs": "Změna jazyka vyžaduje obnovení stránky."
2657 + "cs": "Změna jazyka vyžaduje obnovení stránky.",
2658 + "nl": "Als u de taal wilt wijzigen, moet de pagina worden vernieuwd."
2659 },
2660 {
2661 "en": "Chat",
@@ -2423,7 +2664,8 @@
2664 ],
2665 "pt": "Chat",
2666 "ja": "チャット",
2426 - "cs": "Chat"
2667 + "cs": "Chat",
2668 + "nl": "Chat"
2669 },
2670 {
2671 "en": "Chat & Notify",
@@ -2435,7 +2677,8 @@
2677 ],
2678 "pt": "Chat & Notificação",
2679 "ja": "チャットと通知",
2438 - "cs": "Chat & Upozornění"
2680 + "cs": "Chat & Upozornění",
2681 + "nl": "Chat & Melden"
2682 },
2683 {
2684 "en": "Chechen",
@@ -2444,7 +2687,8 @@
2687 ],
2688 "pt": "Checheno",
2689 "ja": "チェチェン",
2447 - "cs": "Chechen"
2690 + "cs": "Chechen",
2691 + "nl": "Tsjetsjeense"
2692 },
2693 {
2694 "en": "Check and click OK to clear error log.",
@@ -2453,7 +2697,8 @@
2697 ],
2698 "pt": "Verifique e clique em OK para limpar o log de erros.",
2699 "ja": "チェックして[OK]をクリックし、エラーログをクリアします。",
2456 - "cs": "Zatrhni a klikni na OK pro vymazaní chybového logu."
2700 + "cs": "Zatrhni a klikni na OK pro vymazaní chybového logu.",
2701 + "nl": "Controleer en klik op OK om het foutenlogboek te wissen."
2702 },
2703 {
2704 "en": "Check and click OK to start server self-update.",
@@ -2462,7 +2707,8 @@
2707 ],
2708 "pt": "Marque e clique em OK para iniciar a atualização automática do servidor.",
2709 "ja": "チェックして[OK]をクリックし、サーバーの自己更新を開始します。",
2465 - "cs": "Zatrhni a klikni na OK pro automatickou aktializaci serveru. "
2710 + "cs": "Zatrhni a klikni na OK pro automatickou aktializaci serveru. ",
2711 + "nl": "Controleer en klik op OK om de serverupdate te starten."
2712 },
2713 {
2714 "en": "Check server version",
@@ -2471,7 +2717,8 @@
2717 "default.handlebars->container->column_l->p6->p2ServerActions->3->p2ServerActionsVersion->0"
2718 ],
2719 "pt": "Verifique a versão do servidor",
2474 - "ja": "サーバーのバージョンを確認する"
2720 + "ja": "サーバーのバージョンを確認する",
2721 + "nl": "Controleer server versie"
2722 },
2723 {
2724 "en": "Checking...",
@@ -2481,7 +2728,8 @@
2728 "default.handlebars->23->1286"
2729 ],
2730 "pt": "Verificando ...",
2484 - "ja": "確認しています..."
2731 + "ja": "確認しています...",
2732 + "nl": "Controleren..."
2733 },
2734 {
2735 "en": "Chinese",
@@ -2490,7 +2738,8 @@
2738 ],
2739 "pt": "Chinês",
2740 "ja": "中国語",
2493 - "cs": "Chinese"
2741 + "cs": "Chinese",
2742 + "nl": "Chinees"
2743 },
2744 {
2745 "en": "Chinese (Hong Kong)",
@@ -2499,7 +2748,8 @@
2748 ],
2749 "pt": "Chinês (Hong Kong)",
2750 "ja": "中国語(香港)",
2502 - "cs": "Chinese (Hong Kong)"
2751 + "cs": "Chinese (Hong Kong)",
2752 + "nl": "Chinees (Hong Kong)"
2753 },
2754 {
2755 "en": "Chinese (PRC)",
@@ -2508,7 +2758,8 @@
2758 ],
2759 "pt": "Chinês (PRC)",
2760 "ja": "中国語(PRC)",
2511 - "cs": "Chinese (PRC)"
2761 + "cs": "Chinese (PRC)",
2762 + "nl": "Chinees (PRC)"
2763 },
2764 {
2765 "en": "Chinese (Singapore)",
@@ -2517,7 +2768,8 @@
2768 ],
2769 "pt": "Chinês (Singapura)",
2770 "ja": "中国語(シンガポール)",
2520 - "cs": "Chinese (Singapore)"
2771 + "cs": "Chinese (Singapore)",
2772 + "nl": "Chinees (Singapore)"
2773 },
2774 {
2775 "en": "Chinese (Taiwan)",
@@ -2526,7 +2778,8 @@
2778 ],
2779 "pt": "Chinês (Taiwan)",
2780 "ja": "中国語(台湾)",
2529 - "cs": "Chinese (Taiwan)"
2781 + "cs": "Chinese (Taiwan)",
2782 + "nl": "Chinees (Taiwan)"
2783 },
2784 {
2785 "en": "ChromeOS",
@@ -2536,7 +2789,8 @@
2789 ],
2790 "pt": "ChromeOS",
2791 "ja": "ChromeOS",
2539 - "cs": "ChromeOS"
2792 + "cs": "ChromeOS",
2793 + "nl": "ChromeOS"
2794 },
2795 {
2796 "en": "Chuvash",
@@ -2545,7 +2799,8 @@
2799 ],
2800 "pt": "Chuvash",
2801 "ja": "チュヴァシュ",
2548 - "cs": "Chuvash"
2802 + "cs": "Chuvash",
2803 + "nl": "Chuvash"
2804 },
2805 {
2806 "en": "CIRA",
@@ -2558,7 +2813,8 @@
2813 ],
2814 "pt": "CIRA",
2815 "ja": "CIRA",
2561 - "cs": "CIRA"
2816 + "cs": "CIRA",
2817 + "nl": "CIRA"
2818 },
2819 {
2820 "en": "CIRA Server",
@@ -2567,7 +2823,8 @@
2823 ],
2824 "pt": "Servidor CIRA",
2825 "ja": "CIRAサーバー",
2570 - "cs": "CIRA Server"
2826 + "cs": "CIRA Server",
2827 + "nl": "CIRA Server"
2828 },
2829 {
2830 "en": "CIRA Server Commands",
@@ -2576,7 +2833,8 @@
2833 ],
2834 "pt": "Comandos do servidor CIRA",
2835 "ja": "CIRAサーバーコマンド",
2579 - "cs": "CIRA Server příkazy"
2836 + "cs": "CIRA Server příkazy",
2837 + "nl": "CIRA Server opdrachten"
2838 },
2839 {
2840 "en": "Cleanup CIRA",
@@ -2585,7 +2843,8 @@
2843 ],
2844 "pt": "Limpeza CIRA",
2845 "ja": "CIRAのクリーンアップ",
2588 - "cs": "Vymazat CIRA"
2846 + "cs": "Vymazat CIRA",
2847 + "nl": "Opruimen CIRA"
2848 },
2849 {
2850 "en": "Clear",
@@ -2607,7 +2866,8 @@
2866 ],
2867 "pt": "Limpo",
2868 "ja": "クリア",
2610 - "cs": "Vymazat"
2869 + "cs": "Vymazat",
2870 + "nl": "Wissen"
2871 },
2872 {
2873 "en": "Clear the core",
@@ -2616,7 +2876,8 @@
2876 ],
2877 "pt": "Limpe o núcleo",
2878 "ja": "コアをクリアする",
2619 - "cs": "Vymazat jádro"
2879 + "cs": "Vymazat jádro",
2880 + "nl": "Maak de kern leeg"
2881 },
2882 {
2883 "en": "Clear the secret from the application and try again. You only have a few minutes to enter the proper code.",
@@ -2625,7 +2886,8 @@
2886 ],
2887 "pt": "Limpe o segredo do aplicativo e tente novamente. Você tem apenas alguns minutos para inserir o código correto.",
2888 "ja": "アプリケーションから秘密をクリアして、再試行してください。適切なコードを入力するのに数分しかかかりません。",
2628 - "cs": "Vymaž tajemství z aplikace a zkus to znovu. Máš na zadání správného kódu jen pár minut."
2889 + "cs": "Vymaž tajemství z aplikace a zkus to znovu. Máš na zadání správného kódu jen pár minut.",
2890 + "nl": "Wis het geheim van de applicatie en probeer het opnieuw. Je hebt maar een paar minuten om de juiste code in te voeren."
2891 },
2892 {
2893 "en": "Clear Tokens",
@@ -2634,7 +2896,8 @@
2896 ],
2897 "pt": "Limpar Tokens",
2898 "ja": "クリアトークン",
2637 - "cs": "Vymazat tokeny"
2899 + "cs": "Vymazat tokeny",
2900 + "nl": "Wis Tokens"
2901 },
2902 {
2903 "en": "click here to create a device group",
@@ -2643,7 +2906,8 @@
2906 ],
2907 "pt": "clique aqui para criar um grupo de dispositivos",
2908 "ja": "ここをクリックしてデバイスグループを作成します",
2646 - "cs": "klikni zde pro vytvoření skupiny zařízení"
2909 + "cs": "klikni zde pro vytvoření skupiny zařízení",
2910 + "nl": "klik hier om een apparaatgroep te maken"
2911 },
2912 {
2913 "en": "Click here to edit the server-side device name",
@@ -2652,7 +2916,8 @@
2916 ],
2917 "pt": "clique aqui para criar um grupo de dispositivos",
2918 "ja": "サーバー側のデバイス名を編集するにはここをクリックしてください",
2655 - "cs": "Klikni zde pro úpravu server-side jména zařízení"
2919 + "cs": "Klikni zde pro úpravu server-side jména zařízení",
2920 + "nl": "Klik hier om de apparaatnaam van de server te bewerken"
2921 },
2922 {
2923 "en": "Click ok to send a verification mail to:",
@@ -2662,7 +2927,8 @@
2927 ],
2928 "pt": "Clique em ok para enviar um email de verificação para:",
2929 "ja": "[OK]をクリックして確認メールを送信します:",
2665 - "cs": "Klikni na OK pro zaslání verifikačního emailu na:"
2930 + "cs": "Klikni na OK pro zaslání verifikačního emailu na:",
2931 + "nl": "Klik op OK om een verificatiebericht te sturen naar:"
2932 },
2933 {
2934 "en": "click to reconnect",
@@ -2672,7 +2938,8 @@
2938 "default-mobile.handlebars->container->page_content->column_l->p0->1->p0message->2->0"
2939 ],
2940 "pt": "clique para reconectar",
2675 - "ja": "クリックして再接続"
2941 + "ja": "クリックして再接続",
2942 + "nl": "klik om opnieuw verbinding te maken"
2943 },
2944 {
2945 "en": "Click to view current notifications",
@@ -2681,7 +2948,8 @@
2948 ],
2949 "pt": "Clique para visualizar as notificações atuais",
2950 "ja": "クリックして現在の通知を表示します",
2684 - "cs": "Klikni pro zobrazení nastavení notifikací"
2951 + "cs": "Klikni pro zobrazení nastavení notifikací",
2952 + "nl": "Klik om de huidige meldingen te bekijken"
2953 },
2954 {
2955 "en": "Client Initiated Remote Access",
@@ -2691,7 +2959,8 @@
2959 ],
2960 "pt": "Acesso remoto iniciado pelo cliente",
2961 "ja": "クライアントが開始したリモートアクセス",
2694 - "cs": "Vzdálený přístup iniciováný klientem"
2962 + "cs": "Vzdálený přístup iniciováný klientem",
2963 + "nl": "Gebruiker geïnitieerde externe toegang"
2964 },
2965 {
2966 "en": "Clipboard",
@@ -2700,7 +2969,8 @@
2969 ],
2970 "pt": "Área de transferência",
2971 "ja": "クリップボード",
2703 - "cs": "Schránka"
2972 + "cs": "Schránka",
2973 + "nl": "Klembord"
2974 },
2975 {
2976 "en": "Close",
@@ -2712,7 +2982,8 @@
2982 ],
2983 "pt": "Fechar",
2984 "ja": "閉じる",
2715 - "cs": "Zavřít"
2985 + "cs": "Zavřít",
2986 + "nl": "Sluiten"
2987 },
2988 {
2989 "en": "Columns",
@@ -2722,7 +2993,8 @@
2993 "default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->9->devListToolbarView->viewselect->1"
2994 ],
2995 "pt": "Colunas",
2725 - "ja": "列"
2996 + "ja": "列",
2997 + "nl": "kolommen"
2998 },
2999 {
3000 "en": "Confim {0} of {1} entrie{2} to this location?",
@@ -2732,7 +3004,8 @@
3004 ],
3005 "pt": "Confirme {0} da {1} entrada {2} para este local?",
3006 "ja": "{1}エントリ{2}のうち{0}をこの場所に拘束しますか?",
2735 - "cs": "Potvrdit {0} z {1} záznam{2} do tohoto umístění?"
3007 + "cs": "Potvrdit {0} z {1} záznam{2} do tohoto umístění?",
3008 + "nl": "Bevestig {0} van {1} vermelding {2} voor deze locatie?"
3009 },
3010 {
3011 "en": "Confirm",
@@ -2746,7 +3019,8 @@
3019 ],
3020 "pt": "Confirme",
3021 "ja": "確認する",
2749 - "cs": "Potvrdit"
3022 + "cs": "Potvrdit",
3023 + "nl": "Bevestig"
3024 },
3025 {
3026 "en": "Confirm copy of 1 entrie to this location?",
@@ -2756,7 +3030,8 @@
3030 ],
3031 "pt": "Confirmar cópia de 1 entrada para este local?",
3032 "ja": "この場所への1つのエントリのコピーを確認しますか?",
2759 - "cs": "Potvrdit kopírování jednoho záznamu do tohoto umístění?"
3033 + "cs": "Potvrdit kopírování jednoho záznamu do tohoto umístění?",
3034 + "nl": "Bevestig kopie van 1 vermelding tot deze locatie?"
3035 },
3036 {
3037 "en": "Confirm copy of {0} entries's to this location?",
@@ -2766,7 +3041,8 @@
3041 ],
3042 "pt": "Confirmar cópia de {0} entradas para este local?",
3043 "ja": "{0}エントリのコピーをこの場所に確認しますか?",
2769 - "cs": "Potvrdit kopírování {0} zaznámů do tohoto umístění?"
3044 + "cs": "Potvrdit kopírování {0} zaznámů do tohoto umístění?",
3045 + "nl": "Bevestig kopieën van {0} vermeldingen tot deze locatie?"
3046 },
3047 {
3048 "en": "Confirm delete selected devices(s)?",
@@ -2775,7 +3051,8 @@
3051 "default.handlebars->23->359"
3052 ],
3053 "pt": "Confirmar a exclusão dos dispositivos selecionados?",
2778 - "ja": "選択したデバイスの削除を確認しますか?"
3054 + "ja": "選択したデバイスの削除を確認しますか?",
3055 + "nl": "Bevestig geselecteerde apparaten verwijderen?"
3056 },
3057 {
3058 "en": "Confirm move of 1 entrie to this location?",
@@ -2785,7 +3062,8 @@
3062 ],
3063 "pt": "Confirmar a movimentação de 1 entrada para este local?",
3064 "ja": "1エントリのこの場所への移動を確認しますか?",
2788 - "cs": "Potvrdit přesun jednoho záznamu do tohoto umístění?"
3065 + "cs": "Potvrdit přesun jednoho záznamu do tohoto umístění?",
3066 + "nl": "Verplaatsing van 1 vermelding naar deze locatie bevestigen?"
3067 },
3068 {
3069 "en": "Confirm move of {0} entries's to this location?",
@@ -2795,7 +3073,8 @@
3073 ],
3074 "pt": "Confirmar a movimentação de {0} entradas para este local?",
3075 "ja": "{0}エントリのこの場所への移動を確認しますか?",
2798 - "cs": "Potvrdit přesun {0} záznamů do tohoto umístění?"
3076 + "cs": "Potvrdit přesun {0} záznamů do tohoto umístění?",
3077 + "nl": "Verplaatsing van {0} vermeldingen naar deze locatie bevestigen?"
3078 },
3079 {
3080 "en": "Confirm overwrite?",
@@ -2803,7 +3082,8 @@
3082 "default.handlebars->23->1112"
3083 ],
3084 "ja": "上書きを確認しますか?",
2806 - "cs": "Potvrdit přepsání?"
3085 + "cs": "Potvrdit přepsání?",
3086 + "nl": "Bevestig overschrijven?"
3087 },
3088 {
3089 "en": "Confirm removal of authenticator application 2-step login?",
@@ -2813,7 +3093,8 @@
3093 ],
3094 "pt": "Confirmar remoção do login do aplicativo autenticador em duas etapas?",
3095 "ja": "認証アプリケーションの削除2段階ログインを確認しますか?",
2816 - "cs": "Potvrdit odstranění autentizační aplikace pro 2-faktorové přihlašování?"
3096 + "cs": "Potvrdit odstranění autentizační aplikace pro 2-faktorové přihlašování?",
3097 + "nl": "Bevestig de verwijdering van de Tweestapsverificatie applicatie?"
3098 },
3099 {
3100 "en": "Confirm removal of user {0}?",
@@ -2823,7 +3104,8 @@
3104 ],
3105 "pt": "Confirmar remoção do usuário {0}?",
3106 "ja": "ユーザー{0}の削除を確認しますか?",
2826 - "cs": "Potvrdit odstranění uživatele {0}?"
3107 + "cs": "Potvrdit odstranění uživatele {0}?",
3108 + "nl": "Bevestig de verwijdering van gebruiker {0}?"
3109 },
3110 {
3111 "en": "Connect",
@@ -2839,7 +3121,8 @@
3121 "default-mobile.handlebars->9->233"
3122 ],
3123 "pt": "Conectar",
2842 - "ja": "つなぐ"
3124 + "ja": "つなぐ",
3125 + "nl": "Verbinden"
3126 },
3127 {
3128 "en": "Connect All",
@@ -2849,7 +3132,8 @@
3132 ],
3133 "pt": "Conectar todos",
3134 "ja": "すべて接続",
2852 - "cs": "Připojit vše"
3135 + "cs": "Připojit vše",
3136 + "nl": "Alles verbinden"
3137 },
3138 {
3139 "en": "Connect to server",
@@ -2859,7 +3143,8 @@
3143 "default.handlebars->23->1013"
3144 ],
3145 "pt": "Conecte-se ao servidor",
2862 - "ja": "サーバーに接続する"
3146 + "ja": "サーバーに接続する",
3147 + "nl": "Verbinden met de server"
3148 },
3149 {
3150 "en": "Connect using Intel AMT hardware KVM",
@@ -2868,7 +3153,8 @@
3153 "default.handlebars->container->column_l->p12->termTable->1->1->0->1->3->connectbutton2hspan"
3154 ],
3155 "ja": "Intel AMTハードウェアKVMを使用して接続する",
2871 - "cs": "Připojit pomocí Intel AMT hardware KVM"
3156 + "cs": "Připojit pomocí Intel AMT hardware KVM",
3157 + "nl": "Maak verbinding met Intel AMT hardware KVM"
3158 },
3159 {
3160 "en": "Connected",
@@ -2878,7 +3164,8 @@
3164 ],
3165 "pt": "Conectado",
3166 "ja": "接続済み",
2881 - "cs": "Připojeno"
3167 + "cs": "Připojeno",
3168 + "nl": "Verbonden"
3169 },
3170 {
3171 "en": "Connected.",
@@ -2887,7 +3174,8 @@
3174 "messenger.handlebars->13->7"
3175 ],
3176 "pt": "Conectado.",
2890 - "ja": "接続済み。"
3177 + "ja": "接続済み。",
3178 + "nl": "Verbonden."
3179 },
3180 {
3181 "en": "Connecting...",
@@ -2903,7 +3191,8 @@
3191 ],
3192 "pt": "Conectando...",
3193 "ja": "接続しています...",
2906 - "cs": "Připojování..."
3194 + "cs": "Připojování...",
3195 + "nl": "Verbinden..."
3196 },
3197 {
3198 "en": "Connection closed.",
@@ -2912,7 +3201,8 @@
3201 ],
3202 "pt": "Conexão fechada.",
3203 "ja": "接続が閉じられました。",
2915 - "cs": "Připojení ukončeno."
3204 + "cs": "Připojení ukončeno.",
3205 + "nl": "Verbinding gesloten."
3206 },
3207 {
3208 "en": "Connection Count",
@@ -2921,7 +3211,8 @@
3211 ],
3212 "pt": "Contagem de conexões",
3213 "ja": "接続数",
2924 - "cs": "Čítač připojení"
3214 + "cs": "Čítač připojení",
3215 + "nl": "Aantal verbindingen"
3216 },
3217 {
3218 "en": "Connection Relay",
@@ -2930,7 +3221,8 @@
3221 ],
3222 "pt": "Encaminhador de conexão",
3223 "ja": "接続リレー",
2933 - "cs": "Přesměrování spojení"
3224 + "cs": "Přesměrování spojení",
3225 + "nl": "Verbindings Relay"
3226 },
3227 {
3228 "en": "Connections",
@@ -2939,7 +3231,8 @@
3231 ],
3232 "pt": "Conexões",
3233 "ja": "接続",
2942 - "cs": "Spojení"
3234 + "cs": "Spojení",
3235 + "nl": "Verbindingen"
3236 },
3237 {
3238 "en": "Connectivity",
@@ -2951,7 +3244,8 @@
3244 ],
3245 "pt": "Conectividade",
3246 "ja": "接続性",
2954 - "cs": "Konektivita"
3247 + "cs": "Konektivita",
3248 + "nl": "connectiviteit"
3249 },
3250 {
3251 "en": "Console",
@@ -2962,7 +3256,8 @@
3256 "default.handlebars->container->topbar->1->1->ServerSubMenuSpan->ServerSubMenu->1->0->ServerConsole"
3257 ],
3258 "pt": "Console",
2965 - "ja": "コンソール"
3259 + "ja": "コンソール",
3260 + "nl": "Console"
3261 },
3262 {
3263 "en": "Console - ",
@@ -2971,7 +3266,8 @@
3266 "default.handlebars->23->389"
3267 ],
3268 "pt": "Console - ",
2974 - "ja": "コンソール -"
3269 + "ja": "コンソール -",
3270 + "nl": "Console - "
3271 },
3272 {
3273 "en": "console.txt",
@@ -2980,7 +3276,8 @@
3276 ],
3277 "pt": "console.txt",
3278 "ja": "console.txt",
2983 - "cs": "console.txt"
3279 + "cs": "console.txt",
3280 + "nl": "console.txt"
3281 },
3282 {
3283 "en": "Cookie encoder",
@@ -2989,7 +3286,8 @@
3286 ],
3287 "pt": "Codificador de cookies",
3288 "ja": "Cookieエンコーダー",
2992 - "cs": "Cookie dekodér"
3289 + "cs": "Cookie dekodér",
3290 + "nl": "Cookie encoder"
3291 },
3292 {
3293 "en": "Copy",
@@ -3001,7 +3299,8 @@
3299 "default-mobile.handlebars->container->page_content->column_l->p10->p10files->p13toolbar->1->2->1->3"
3300 ],
3301 "pt": "Copiar",
3004 - "ja": "コピー"
3302 + "ja": "コピー",
3303 + "nl": "Kopie"
3304 },
3305 {
3306 "en": "copy",
@@ -3011,7 +3310,8 @@
3310 ],
3311 "pt": "Copiar",
3312 "ja": "コピー",
3014 - "cs": "kopírovat"
3313 + "cs": "kopírovat",
3314 + "nl": "kopie"
3315 },
3316 {
3317 "en": "Copy address to clipboard",
@@ -3024,7 +3324,8 @@
3324 ],
3325 "pt": "Copiar endereço para a área de transferência",
3326 "ja": "クリップボードにアドレスをコピー",
3027 - "cs": "Kopírovat adresu do schránky"
3327 + "cs": "Kopírovat adresu do schránky",
3328 + "nl": "Kopieer adres naar het klembord"
3329 },
3330 {
3331 "en": "Copy link to clipboard",
@@ -3033,7 +3334,8 @@
3334 ],
3335 "pt": "Copiar link para a área de transferência",
3336 "ja": "リンクをクリップボードにコピー",
3036 - "cs": "Kopírovat odkaz do schránky"
3337 + "cs": "Kopírovat odkaz do schránky",
3338 + "nl": "Kopieer link naar het klembord"
3339 },
3340 {
3341 "en": "Copy MAC address to clipboard",
@@ -3043,7 +3345,8 @@
3345 "default.handlebars->23->71"
3346 ],
3347 "pt": "Copiar endereço MAC para a área de transferência",
3046 - "ja": "MACアドレスをクリップボードにコピー"
3348 + "ja": "MACアドレスをクリップボードにコピー",
3349 + "nl": "Kopieer MAC adres naar het klembord"
3350 },
3351 {
3352 "en": "Copy MacOS agent URL to clipboard",
@@ -3052,7 +3355,8 @@
3355 "default.handlebars->23->301"
3356 ],
3357 "pt": "Copiar o URL do agente MacOS para a área de transferência",
3055 - "ja": "MacOSエージェントのURLをクリップボードにコピーします"
3358 + "ja": "MacOSエージェントのURLをクリップボードにコピーします",
3359 + "nl": "Kopieer MacOS agent link naar het klembord"
3360 },
3361 {
3362 "en": "Copy name to clipboard",
@@ -3061,7 +3365,8 @@
3365 "default.handlebars->23->61"
3366 ],
3367 "pt": "Copiar nome para a área de transferência",
3064 - "ja": "名前をクリップボードにコピー"
3368 + "ja": "名前をクリップボードにコピー",
3369 + "nl": "Kopieer de naam naar het klembord"
3370 },
3371 {
3372 "en": "Copy to clipboard",
@@ -3071,7 +3376,8 @@
3376 "agentinvite.handlebars->container->column_l->5->linuxtab"
3377 ],
3378 "pt": "Copiar para área de transferência",
3074 - "ja": "クリップボードにコピー"
3379 + "ja": "クリップボードにコピー",
3380 + "nl": "Kopieer naar het klembord"
3381 },
3382 {
3383 "en": "Copy valid codes to clipboard",
@@ -3080,7 +3386,8 @@
3386 ],
3387 "pt": "Copiar códigos válidos para a área de transferência",
3388 "ja": "有効なコードをクリップボードにコピー",
3083 - "cs": "Kopírovat platné kódy do schránky"
3389 + "cs": "Kopírovat platné kódy do schránky",
3390 + "nl": "Kopieer de geldige code's naar het klembord"
3391 },
3392 {
3393 "en": "Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.",
@@ -3090,7 +3397,8 @@
3397 ],
3398 "pt": "Copyright (c) 1998-2011 O Projeto OpenSSL.Todos os direitos reservados.",
3399 "ja": "Copyright(c)1998-2011 The OpenSSL Project。全著作権所有。",
3093 - "cs": "Copyright (c) 1998-2011 The OpenSSL Project. Všechna práva vyhrazena."
3400 + "cs": "Copyright (c) 1998-2011 The OpenSSL Project. Všechna práva vyhrazena.",
3401 + "nl": "Copyright (c) 1998-2011 The OpenSSL Project. Alle rechten voorbehouden."
3402 },
3403 {
3404 "en": "Copyright (c) 2009, CodePlex Foundation. All rights reserved.",
@@ -3100,7 +3408,8 @@
3408 ],
3409 "pt": "Direitos autorais (c) 2009, CodePlex Foundation.Todos os direitos reservados.",
3410 "ja": "Copyright(c)2009、CodePlex Foundation。全著作権所有。",
3103 - "cs": "Copyright (c) 2009, CodePlex Foundation. Všechna práva vyhrazena."
3411 + "cs": "Copyright (c) 2009, CodePlex Foundation. Všechna práva vyhrazena.",
3412 + "nl": "Copyright (c) 2009, CodePlex Foundation. Alle rechten voorbehouden."
3413 },
3414 {
3415 "en": "Copyright (c) 2010 Wojciech 'RRH' Ryrych",
@@ -3110,7 +3419,8 @@
3419 ],
3420 "pt": "Copyright (c) 2010 Wojciech 'RRH' Ryrych",
3421 "ja": "Copyright(c)2010 Wojciech 'RRH' Ryrych",
3113 - "cs": "Copyright (c) 2010 Wojciech 'RRH' Ryrych"
3422 + "cs": "Copyright (c) 2010 Wojciech 'RRH' Ryrych",
3423 + "nl": "Copyright (c) 2010 Wojciech 'RRH' Ryrych"
3424 },
3425 {
3426 "en": "Copyright (C) 2011 Joel Martin This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.",
@@ -3120,7 +3430,8 @@
3430 ],
3431 "pt": "Copyright (C) 2011 Joel Martin Este formulário de código-fonte está sujeito aos termos da Licença Pública Mozilla, v.2.0 0.Se uma cópia da MPL não foi distribuída com este arquivo, você pode obter uma em http: // mozilla.org / MPL / 2.0 /.",
3432 "ja": "Copyright(C)2011 Joel Martinこのソースコードフォームには、Mozilla Public License v。2.0の条件が適用されます。 MPLのコピーがこのファイルとともに配布されていない場合は、http://mozilla.org/MPL/2.0/から入手できます。",
3123 - "cs": "Copyright (C) 2011 Joel Martin This Source Code Form podléhá podmínkám Mozilla Public licence, v. 2.0. Pokud kopie tohoto MPL nebyla distribuována s tímto souborem, můžete si ji pořídit na adrese http://mozilla.org/MPL/2.0/."
3433 + "cs": "Copyright (C) 2011 Joel Martin This Source Code Form podléhá podmínkám Mozilla Public licence, v. 2.0. Pokud kopie tohoto MPL nebyla distribuována s tímto souborem, můžete si ji pořídit na adrese http://mozilla.org/MPL/2.0/.",
3434 + "nl": "Copyright (C) 2011 Joel Martin Dit broncodeformulier is onderworpen aan de voorwaarden van de Mozilla Public License, v. 2.0. Als een kopie van de MPL niet met dit bestand is verspreid, kunt u er een verkrijgen op http://mozilla.org/MPL/2.0/."
3435 },
3436 {
3437 "en": "Copyright 2013 jQuery Foundation and other contributors",
@@ -3130,7 +3441,8 @@
3441 ],
3442 "pt": "Copyright 2013 jQuery Foundation e outros colaboradores",
3443 "ja": "Copyright 2013 jQuery Foundationおよびその他の貢献者",
3133 - "cs": "Copyright 2013 jQuery Foundation a ostatní přispěvatelé"
3444 + "cs": "Copyright 2013 jQuery Foundation a ostatní přispěvatelé",
3445 + "nl": "Copyright 2013 jQuery Foundation en andere bijdragers"
3446 },
3447 {
3448 "en": "Copyright 2013 jQuery Foundation and other contributors,",
@@ -3140,7 +3452,8 @@
3452 ],
3453 "pt": "Copyright 2013 jQuery Foundation e outros colaboradores,",
3454 "ja": "Copyright 2013 jQuery Foundationおよびその他の貢献者、",
3143 - "cs": "Copyright 2013 jQuery Foundation a ostatní přispěvatelé,"
3455 + "cs": "Copyright 2013 jQuery Foundation a ostatní přispěvatelé,",
3456 + "nl": "Copyright 2013 jQuery Foundation en andere bijdragers,"
3457 },
3458 {
3459 "en": "Core Server",
@@ -3149,7 +3462,8 @@
3462 ],
3463 "pt": "Servidor Core",
3464 "ja": "コアサーバー",
3152 - "cs": "Hlavní server"
3465 + "cs": "Hlavní server",
3466 + "nl": "Core Server"
3467 },
3468 {
3469 "en": "Corsican",
@@ -3158,7 +3472,8 @@
3472 ],
3473 "pt": "Corso",
3474 "ja": "コルシカ",
3161 - "cs": "Corsican"
3475 + "cs": "Corsican",
3476 + "nl": "Corsicaans"
3477 },
3478 {
3479 "en": "CPU load in the last 15 minutes",
@@ -3167,7 +3482,8 @@
3482 ],
3483 "pt": "Carga da CPU nos últimos 15 minutos",
3484 "ja": "過去15分間のCPU負荷",
3170 - "cs": "CPU zatížení v posledních 15 minutách"
3485 + "cs": "CPU zatížení v posledních 15 minutách",
3486 + "nl": "CPU-belasting in de afgelopen 15 minuten"
3487 },
3488 {
3489 "en": "CPU load in the last 5 minutes",
@@ -3176,7 +3492,8 @@
3492 ],
3493 "pt": "Carga da CPU nos últimos 5 minutos",
3494 "ja": "過去5分間のCPU負荷",
3179 - "cs": "CPU zatížení v posledních 5 minutách"
3495 + "cs": "CPU zatížení v posledních 5 minutách",
3496 + "nl": "CPU-belasting in de afgelopen 5 minuten"
3497 },
3498 {
3499 "en": "CPU load in the last minute",
@@ -3185,7 +3502,8 @@
3502 "default.handlebars->23->1251"
3503 ],
3504 "pt": "Carga da CPU no último minuto",
3188 - "ja": "直前のCPU負荷"
3505 + "ja": "直前のCPU負荷",
3506 + "nl": "CPU-belasting in de laatste minuut"
3507 },
3508 {
3509 "en": "CR+LF",
@@ -3196,7 +3514,8 @@
3514 ],
3515 "pt": "CR + LF",
3516 "ja": "CR + LF",
3199 - "cs": "CR+LF"
3517 + "cs": "CR+LF",
3518 + "nl": "CR+LF"
3519 },
3520 {
3521 "en": "Create a new device group using the options below.",
@@ -3205,7 +3524,8 @@
3524 "default.handlebars->23->910"
3525 ],
3526 "pt": "Crie um novo grupo de dispositivos usando as opções abaixo.",
3208 - "ja": "以下のオプションを使用して、新しいデバイスグループを作成します。"
3527 + "ja": "以下のオプションを使用して、新しいデバイスグループを作成します。",
3528 + "nl": "Maak een nieuwe apparaatgroep met behulp van de onderstaande opties."
3529 },
3530 {
3531 "en": "Create a new group of devices.",
@@ -3214,7 +3534,8 @@
3534 "default.handlebars->23->168"
3535 ],
3536 "pt": "Crie um novo grupo de dispositivos.",
3217 - "ja": "デバイスの新しいグループを作成します。"
3537 + "ja": "デバイスの新しいグループを作成します。",
3538 + "nl": "Maak een nieuwe apparaatgroep."
3539 },
3540 {
3541 "en": "Create Account",
@@ -3225,7 +3546,8 @@
3546 ],
3547 "pt": "Criar conta",
3548 "ja": "アカウントを作成する",
3228 - "cs": "Vytvořit účet"
3549 + "cs": "Vytvořit účet",
3550 + "nl": "Account aanmaken"
3551 },
3552 {
3553 "en": "Create Device Group",
@@ -3234,7 +3556,8 @@
3556 "default-mobile.handlebars->9->58"
3557 ],
3558 "pt": "Criar grupo de dispositivo",
3237 - "ja": "デバイスグループを作成する"
3559 + "ja": "デバイスグループを作成する",
3560 + "nl": "Apparaatgroep aanmaken"
3561 },
3562 {
3563 "en": "Create many accounts at once by importing a JSON file with the following format:",
@@ -3243,7 +3566,8 @@
3566 ],
3567 "pt": "Crie várias contas ao mesmo tempo importando um arquivo JSON com o seguinte formato:",
3568 "ja": "次の形式のJSONファイルをインポートして、一度に多くのアカウントを作成します。",
3246 - "cs": "Vytvořit více účtu najednou pomocí importu JSON souboru s následujícím formátem:"
3569 + "cs": "Vytvořit více účtu najednou pomocí importu JSON souboru s následujícím formátem:",
3570 + "nl": "Maak meerdere accounts tegelijk door een JSON-bestand met de volgende indeling te importeren:"
3571 },
3572 {
3573 "en": "Create one",
@@ -3253,7 +3577,8 @@
3577 "login-mobile.handlebars->container->page_content->column_l->1->1->0->1->loginpanel->1->newAccountDiv->1"
3578 ],
3579 "pt": "Crie um",
3256 - "ja": "一つ作る"
3580 + "ja": "一つ作る",
3581 + "nl": "Creëer er een"
3582 },
3583 {
3584 "en": "Creation",
@@ -3262,7 +3587,8 @@
3587 ],
3588 "pt": "Criação",
3589 "ja": "作成",
3265 - "cs": "Vytváření"
3590 + "cs": "Vytváření",
3591 + "nl": "Aanmaken"
3592 },
3593 {
3594 "en": "Creation Token:",
@@ -3272,7 +3598,8 @@
3598 ],
3599 "pt": "Token de criação",
3600 "ja": "作成トークン:",
3275 - "cs": "Vytvoření tokenu:"
3601 + "cs": "Vytvoření tokenu:",
3602 + "nl": "Token aanmaken:"
3603 },
3604 {
3605 "en": "Cree",
@@ -3281,7 +3608,8 @@
3608 ],
3609 "pt": "Cree",
3610 "ja": "クリー語",
3284 - "cs": "Cree"
3611 + "cs": "Cree",
3612 + "nl": "Cree"
3613 },
3614 {
3615 "en": "Croatian",
@@ -3290,7 +3618,8 @@
3618 ],
3619 "pt": "Croata",
3620 "ja": "クロアチア語",
3293 - "cs": "Croatian"
3621 + "cs": "Croatian",
3622 + "nl": "Kroatisch"
3623 },
3624 {
3625 "en": "CSV Format",
@@ -3300,7 +3629,8 @@
3629 ],
3630 "pt": "Formato CSV",
3631 "ja": "CSV形式",
3303 - "cs": "CSV formát"
3632 + "cs": "CSV formát",
3633 + "nl": "CSV Formaat"
3634 },
3635 {
3636 "en": "Ctl-C",
@@ -3309,7 +3639,8 @@
3639 ],
3640 "pt": "CTRL-C",
3641 "ja": "Ctl-C",
3312 - "cs": "Ctl-C"
3642 + "cs": "Ctl-C",
3643 + "nl": "Ctl-C"
3644 },
3645 {
3646 "en": "Ctl-X",
@@ -3318,7 +3649,8 @@
3649 ],
3650 "pt": "CTRL-X",
3651 "ja": "Ctl-X",
3321 - "cs": "Ctl-X"
3652 + "cs": "Ctl-X",
3653 + "nl": "Ctl-X"
3654 },
3655 {
3656 "en": "Ctrl",
@@ -3327,7 +3659,8 @@
3659 ],
3660 "pt": "CTRL",
3661 "ja": "Ctrl",
3330 - "cs": "Ctrl"
3662 + "cs": "Ctrl",
3663 + "nl": "Ctrl"
3664 },
3665 {
3666 "en": "Ctrl+Alt+Del",
@@ -3337,7 +3670,8 @@
3670 ],
3671 "pt": "CTRL+ALT+DEL",
3672 "ja": "Ctrl + Alt + Del",
3340 - "cs": "Ctrl+Alt+Del"
3673 + "cs": "Ctrl+Alt+Del",
3674 + "nl": "Ctrl+Alt+Del"
3675 },
3676 {
3677 "en": "Ctrl-W",
@@ -3347,7 +3681,8 @@
3681 ],
3682 "pt": "CTRL-W",
3683 "ja": "Ctrl-W",
3350 - "cs": "Ctrl-W"
3684 + "cs": "Ctrl-W",
3685 + "nl": "Ctrl-W"
3686 },
3687 {
3688 "en": "Current Version",
@@ -3356,7 +3691,8 @@
3691 ],
3692 "pt": "Versão Atual",
3693 "ja": "現行版",
3359 - "cs": "Aktuální verze"
3694 + "cs": "Aktuální verze",
3695 + "nl": "Huidige versie"
3696 },
3697 {
3698 "en": "Cut",
@@ -3368,7 +3704,8 @@
3704 "default-mobile.handlebars->container->page_content->column_l->p10->p10files->p13toolbar->1->2->1->3"
3705 ],
3706 "pt": "Cortar",
3371 - "ja": "カット"
3707 + "ja": "カット",
3708 + "nl": "Knippen"
3709 },
3710 {
3711 "en": "Czech",
@@ -3377,7 +3714,8 @@
3714 ],
3715 "pt": "Tcheco",
3716 "ja": "チェコ語",
3380 - "cs": "Czech"
3717 + "cs": "Czech",
3718 + "nl": "Tsjechisch"
3719 },
3720 {
3721 "en": "Danish",
@@ -3386,7 +3724,8 @@
3724 ],
3725 "pt": "Dinamarquês",
3726 "ja": "デンマーク語",
3389 - "cs": "Danish"
3727 + "cs": "Danish",
3728 + "nl": "Deens"
3729 },
3730 {
3731 "en": "DataChannel",
@@ -3395,7 +3734,8 @@
3734 ],
3735 "pt": "DataChannel",
3736 "ja": "データチャネル",
3398 - "cs": "Datový kanál"
3737 + "cs": "Datový kanál",
3738 + "nl": "Data kanaal"
3739 },
3740 {
3741 "en": "Dates & Time",
@@ -3404,7 +3744,8 @@
3744 "default.handlebars->23->879"
3745 ],
3746 "pt": "Datas e Horário",
3407 - "ja": "日時"
3747 + "ja": "日時",
3748 + "nl": "Datum & Tiid"
3749 },
3750 {
3751 "en": "Day",
@@ -3413,7 +3754,8 @@
3754 "default.handlebars->23->521"
3755 ],
3756 "pt": "Dia",
3416 - "ja": "日"
3757 + "ja": "日",
3758 + "nl": "Dag"
3759 },
3760 {
3761 "en": "Deactivate Client Control Mode (CCM)",
@@ -3422,7 +3764,8 @@
3764 ],
3765 "pt": "Desativar o modo de controle do cliente (CCM)",
3766 "ja": "クライアント制御モード(CCM)を無効にする",
3425 - "cs": "Deaktivace Client Control Mode (CCM)"
3767 + "cs": "Deaktivace Client Control Mode (CCM)",
3768 + "nl": "Deactiveer Client Control Mode (CCM)"
3769 },
3770 {
3771 "en": "Deep Sleep",
@@ -3432,7 +3775,8 @@
3775 ],
3776 "pt": "Deep Sleep",
3777 "ja": "深い眠り",
3435 - "cs": "Hluboký spánek"
3778 + "cs": "Hluboký spánek",
3779 + "nl": "Slaapstand"
3780 },
3781 {
3782 "en": "Delete",
@@ -3450,7 +3794,8 @@
3794 "player.htm->p11->dialog->idx_dlgButtonBar->5"
3795 ],
3796 "pt": "Deletar",
3453 - "ja": "削除する"
3797 + "ja": "削除する",
3798 + "nl": "Verwijderen"
3799 },
3800 {
3801 "en": "Delete Account",
@@ -3460,7 +3805,8 @@
3805 "default-mobile.handlebars->9->40"
3806 ],
3807 "pt": "Deletar Conta",
3463 - "ja": "アカウントを削除する"
3808 + "ja": "アカウントを削除する",
3809 + "nl": "Verwijder account"
3810 },
3811 {
3812 "en": "Delete account",
@@ -3470,7 +3816,8 @@
3816 "default-mobile.handlebars->container->page_content->column_l->p3->p3info->1->p3AccountActions->7->7->0"
3817 ],
3818 "pt": "Deletar conta",
3473 - "ja": "アカウントを削除する"
3819 + "ja": "アカウントを削除する",
3820 + "nl": "Verwijder account"
3821 },
3822 {
3823 "en": "Delete Device",
@@ -3480,7 +3827,8 @@
3827 "default-mobile.handlebars->9->196"
3828 ],
3829 "pt": "Excluir dispositivo",
3483 - "ja": "デバイスを削除"
3830 + "ja": "デバイスを削除",
3831 + "nl": "Verwijder apparaat"
3832 },
3833 {
3834 "en": "Delete devices",
@@ -3489,7 +3837,8 @@
3837 ],
3838 "pt": "Excluir Dispositivos",
3839 "ja": "デバイスを削除する",
3492 - "cs": "Smazat zařízení"
3840 + "cs": "Smazat zařízení",
3841 + "nl": "Verwijder apparaten"
3842 },
3843 {
3844 "en": "Delete Group",
@@ -3501,7 +3850,8 @@
3850 "default-mobile.handlebars->9->285"
3851 ],
3852 "pt": "Excluir grupo",
3504 - "ja": "グループを削除"
3853 + "ja": "グループを削除",
3854 + "nl": "Verwijder groep"
3855 },
3856 {
3857 "en": "Delete Node",
@@ -3511,7 +3861,8 @@
3861 "default-mobile.handlebars->9->215"
3862 ],
3863 "pt": "Excluir nó",
3514 - "ja": "ノードを削除"
3864 + "ja": "ノードを削除",
3865 + "nl": "Verwijder apparaat"
3866 },
3867 {
3868 "en": "Delete Nodes",
@@ -3520,7 +3871,8 @@
3871 "default.handlebars->23->361"
3872 ],
3873 "pt": "Excluir nós",
3523 - "ja": "ノードを削除する"
3874 + "ja": "ノードを削除する",
3875 + "nl": "Verwijder apparaten"
3876 },
3877 {
3878 "en": "Delete selected item?",
@@ -3532,7 +3884,8 @@
3884 "default-mobile.handlebars->9->248"
3885 ],
3886 "pt": "Excluir item selecionado?",
3535 - "ja": "選択したアイテムを削除しますか?"
3887 + "ja": "選択したアイテムを削除しますか?",
3888 + "nl": "Verwijder geselecteerde item?"
3889 },
3890 {
3891 "en": "Delete User {0}",
@@ -3541,7 +3894,8 @@
3894 "default.handlebars->23->1242"
3895 ],
3896 "pt": "Excluir usuário {0}",
3544 - "ja": "ユーザーを削除{0}"
3897 + "ja": "ユーザーを削除{0}",
3898 + "nl": "Verwijder gebruiker {0}"
3899 },
3900 {
3901 "en": "Delete {0} selected items?",
@@ -3553,7 +3907,8 @@
3907 "default-mobile.handlebars->9->247"
3908 ],
3909 "pt": "Excluir {0} itens selecionados?",
3556 - "ja": "選択したアイテム{0}を削除しますか?"
3910 + "ja": "選択したアイテム{0}を削除しますか?",
3911 + "nl": "Verwijder {0} gelecteerde items?"
3912 },
3913 {
3914 "en": "Delete {0}?",
@@ -3562,7 +3917,8 @@
3917 "default-mobile.handlebars->9->216"
3918 ],
3919 "pt": "Excluir {0}?",
3565 - "ja": "{0}を削除しますか?"
3920 + "ja": "{0}を削除しますか?",
3921 + "nl": "Verwijder {0}?"
3922 },
3923 {
3924 "en": "Descend by date",
@@ -3574,7 +3930,8 @@
3930 ],
3931 "pt": "Descrescente por data",
3932 "ja": "日付で降順",
3577 - "cs": "Sestupně podle datumu"
3933 + "cs": "Sestupně podle datumu",
3934 + "nl": "Aflopend op datum"
3935 },
3936 {
3937 "en": "Descend by name",
@@ -3586,7 +3943,8 @@
3943 ],
3944 "pt": "Decrescente por nome",
3945 "ja": "名前で降順",
3589 - "cs": "Sestupně podle jména"
3946 + "cs": "Sestupně podle jména",
3947 + "nl": "Aflopend op naam"
3948 },
3949 {
3950 "en": "Descend by size",
@@ -3598,7 +3956,8 @@
3956 ],
3957 "pt": "Decrescente por tamanho",
3958 "ja": "サイズで降順",
3601 - "cs": "Sestupně podle velikosti"
3959 + "cs": "Sestupně podle velikosti",
3960 + "nl": "Aflopend op grootte"
3961 },
3962 {
3963 "en": "Description",
@@ -3620,7 +3979,8 @@
3979 "default-mobile.handlebars->9->287"
3980 ],
3981 "pt": "Descrição",
3623 - "ja": "説明"
3982 + "ja": "説明",
3983 + "nl": "Omschrijving"
3984 },
3985 {
3986 "en": "DeskControl",
@@ -3629,7 +3989,8 @@
3989 ],
3990 "pt": "DeskControl",
3991 "ja": "DeskControl",
3632 - "cs": "DeskControl"
3992 + "cs": "DeskControl",
3993 + "nl": "Besturing"
3994 },
3995 {
3996 "en": "Desktop",
@@ -3641,7 +4002,8 @@
4002 "default.handlebars->23->1024"
4003 ],
4004 "pt": "Área de Trabalho",
3644 - "ja": "デスクトップ"
4005 + "ja": "デスクトップ",
4006 + "nl": "bureaublad"
4007 },
4008 {
4009 "en": "Desktop -",
@@ -3650,7 +4012,8 @@
4012 ],
4013 "pt": "Área de Trabalho - ",
4014 "ja": "デスクトップ-",
3653 - "cs": "Plocha -"
4015 + "cs": "Plocha -",
4016 + "nl": "bureaublad - "
4017 },
4018 {
4019 "en": "Desktop Notify",
@@ -3659,7 +4022,8 @@
4022 ],
4023 "pt": "Notificação na área de trabalho",
4024 "ja": "デスクトップ通知",
3662 - "cs": "Informovat na ploše"
4025 + "cs": "Informovat na ploše",
4026 + "nl": "bureaublad melding"
4027 },
4028 {
4029 "en": "Desktop Prompt",
@@ -3668,7 +4032,8 @@
4032 ],
4033 "pt": "Prompt da área de trabalho",
4034 "ja": "デスクトッププロンプト",
3671 - "cs": "Výzva na ploše"
4035 + "cs": "Výzva na ploše",
4036 + "nl": "Bureaublad vraag"
4037 },
4038 {
4039 "en": "Desktop Prompt+Toolbar",
@@ -3677,7 +4042,8 @@
4042 ],
4043 "pt": "Prompt da área de trabalho + barra de ferramentas",
4044 "ja": "デスクトッププロンプト+ツールバー",
3680 - "cs": "Výzva na ploše+panel nástrojů"
4045 + "cs": "Výzva na ploše+panel nástrojů",
4046 + "nl": "Bureaublad vraag en werkbalk"
4047 },
4048 {
4049 "en": "Desktop Toolbar",
@@ -3686,7 +4052,8 @@
4052 ],
4053 "pt": "Barra de ferramentas da área de trabalho",
4054 "ja": "デスクトップツールバー",
3689 - "cs": "Panel nástrojů na ploše"
4055 + "cs": "Panel nástrojů na ploše",
4056 + "nl": "Bureaublad werkbalk"
4057 },
4058 {
4059 "en": "Desktops",
@@ -3696,7 +4063,8 @@
4063 "default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->9->devListToolbarView->viewselect->5"
4064 ],
4065 "pt": "Áreas de trabalho",
3699 - "ja": "デスクトップ"
4066 + "ja": "デスクトップ",
4067 + "nl": "Bureaubladen"
4068 },
4069 {
4070 "en": "Details",
@@ -3705,7 +4073,8 @@
4073 "default.handlebars->container->topbar->1->1->MainSubMenuSpan->MainSubMenu->1->0->MainDevInfo"
4074 ],
4075 "pt": "Detalhes",
3708 - "ja": "詳細"
4076 + "ja": "詳細",
4077 + "nl": "Details"
4078 },
4079 {
4080 "en": "Details -",
@@ -3714,7 +4083,8 @@
4083 "default.handlebars->container->column_l->p17->p17title->3"
4084 ],
4085 "pt": "Detalhes - ",
3717 - "ja": "詳細-"
4086 + "ja": "詳細-",
4087 + "nl": "Details -"
4088 },
4089 {
4090 "en": "Device",
@@ -3723,7 +4093,8 @@
4093 "default.handlebars->container->column_l->p1->devListToolbarSpan->1->0->9->devListToolbarSort->sortselect->5"
4094 ],
4095 "pt": "Dispositivo",
3726 - "ja": "デバイス"
4096 + "ja": "デバイス",
4097 + "nl": "Apparaat"
4098 },
4099 {
4100 "en": "Device Action",
@@ -3733,7 +4104,8 @@
4104 "default-mobile.handlebars->9->208"
4105 ],
4106 "pt": "Ação do dispositivo",
3736 - "ja": "デバイスアクション"
4107 + "ja": "デバイスアクション",
4108 + "nl": "Apparaatactie"
4109 },
4110 {
4111 "en": "Device connections.",
@@ -3742,7 +4114,8 @@
4114 ],
4115 "pt": "Conexões de dispositivos.",
4116 "ja": "デバイス接続。",
3745 - "cs": "Připojení zařízení"
4117 + "cs": "Připojení zařízení",
4118 + "nl": "Apparaat verbindingen."
4119 },
4120 {
4121 "en": "Device disconnections.",
@@ -3751,7 +4124,8 @@
4124 ],
4125 "pt": "Desconexões de dispositivos.",
4126 "ja": "デバイスの切断。",
3754 - "cs": "Odpojení zařízení"
4127 + "cs": "Odpojení zařízení",
4128 + "nl": "Apparaat verbroken."
4129 },
4130 {
4131 "en": "Device group notes can be viewed and changed by other device group administrators.",
@@ -3760,7 +4134,8 @@
4134 ],
4135 "pt": "As notas do grupo de dispositivos podem ser visualizadas e alteradas por outros administradores do grupo de dispositivos.",
4136 "ja": "デバイスグループのメモは、他のデバイスグループ管理者が表示および変更できます。",
3763 - "cs": "Poznámky pro skupinu zařízení si může prohlédnout nebo upravit jen jiný administrátor skupiny."
4137 + "cs": "Poznámky pro skupinu zařízení si může prohlédnout nebo upravit jen jiný administrátor skupiny.",
4138 + "nl": "Apparaatgroepnotities kunnen worden bekeken en gewijzigd door andere apparaatgroepbeheerders."
4139 },
4140 {
4141 "en": "Device Group User",
@@ -3770,7 +4145,8 @@
4145 "default-mobile.handlebars->9->328"
4146 ],
4147 "pt": "Usuário do grupo de dispositivos",
3773 - "ja": "デバイスグループユーザー"
4148 + "ja": "デバイスグループユーザー",
4149 + "nl": "Apparaatgroep gebruiker"
4150 },
4151 {
4152 "en": "Device Groups",
@@ -3781,7 +4157,8 @@
4157 "default-mobile.handlebars->container->page_content->column_l->p3->p3info->1->3"
4158 ],
4159 "pt": "Grupos de dispositivos",
3784 - "ja": "デバイスグループ"
4160 + "ja": "デバイスグループ",
4161 + "nl": "Apparaatgroepen"
4162 },
4163 {
4164 "en": "Device is detected but power state could not be obtained.",
@@ -3790,7 +4167,8 @@
4167 "default.handlebars->23->325"
4168 ],
4169 "pt": "O dispositivo foi detectado, mas não foi possível obter o estado de energia.",
3793 - "ja": "デバイスは検出されましたが、電源状態を取得できませんでした。"
4170 + "ja": "デバイスは検出されましたが、電源状態を取得できませんでした。",
4171 + "nl": "Apparaat is gedetecteerd, maar de stroomstatus kon niet worden verkregen."
4172 },
4173 {
4174 "en": "Device is hibernating (S4)",
@@ -3800,7 +4178,8 @@
4178 ],
4179 "pt": "O dispositivo está hibernando (S4)",
4180 "ja": "デバイスは休止状態です(S4)",
3803 - "cs": "Zařízení je hibernováno (S4)"
4181 + "cs": "Zařízení je hibernováno (S4)",
4182 + "nl": "Apparaat is in slaapstand (S4)"
4183 },
4184 {
4185 "en": "Device is in deep sleep state (S3)",
@@ -3810,7 +4189,8 @@
4189 "default-mobile.handlebars->9->114"
4190 ],
4191 "pt": "O dispositivo está no estado de sono profundo (S3)",
3813 - "ja": "デバイスはディープスリープ状態です(S3)"
4192 + "ja": "デバイスはディープスリープ状態です(S3)",
4193 + "nl": "Apparaat bevindt zich in diepe slaapstand (S3)"
4194 },
4195 {
4196 "en": "Device is in deep sleep state (S3).",
@@ -3819,7 +4199,8 @@
4199 "default.handlebars->23->319"
4200 ],
4201 "pt": "O dispositivo está no estado de suspensão profunda (S3).",
3822 - "ja": "デバイスはディープスリープ状態(S3)です。"
4202 + "ja": "デバイスはディープスリープ状態(S3)です。",
4203 + "nl": "Apparaat bevindt zich in diepe slaapstand (S3)."
4204 },
4205 {
4206 "en": "Device is in hibernating state (S4).",
@@ -3828,7 +4209,8 @@
4209 ],
4210 "pt": "O dispositivo está no estado de hibernação (S4).",
4211 "ja": "デバイスは休止状態です(S4)。",
3831 - "cs": "Zařízení je hibernováno (S4)."
4212 + "cs": "Zařízení je hibernováno (S4).",
4213 + "nl": "Apparaat bevindt zich in de slaapstand (S4)."
4214 },
4215 {
4216 "en": "Device is in powered off state (S5).",
@@ -3837,7 +4219,8 @@
4219 "default.handlebars->23->323"
4220 ],
4221 "pt": "O dispositivo está no estado desligado (S5).",
3840 - "ja": "デバイスは電源オフ状態です(S5)。"
4222 + "ja": "デバイスは電源オフ状態です(S5)。",
4223 + "nl": "Apparaat is uitgeschakeld (S5)."
4224 },
4225 {
4226 "en": "Device is in sleep state (S1)",
@@ -3847,7 +4230,8 @@
4230 "default-mobile.handlebars->9->112"
4231 ],
4232 "pt": "O dispositivo está no estado de suspensão (S1)",
3850 - "ja": "デバイスはスリープ状態です(S1)"
4233 + "ja": "デバイスはスリープ状態です(S1)",
4234 + "nl": "Apparaat bevindt zich in slaapstand (S1)"
4235 },
4236 {
4237 "en": "Device is in sleep state (S1).",
@@ -3856,7 +4240,8 @@
4240 ],
4241 "pt": "O dispositivo está no estado de suspensão (S1).",
4242 "ja": "デバイスはスリープ状態(S1)です。",
3859 - "cs": "Zařízení je ve stavu spánku (S1)."
4243 + "cs": "Zařízení je ve stavu spánku (S1).",
4244 + "nl": "Apparaat bevindt zich in slaapstand (S1)."
4245 },
4246 {
4247 "en": "Device is in sleep state (S2)",
@@ -3866,7 +4251,8 @@
4251 ],
4252 "pt": "O dispositivo está no estado de suspensão (S2)",
4253 "ja": "デバイスはスリープ状態です(S2)",
3869 - "cs": "Zařízení je ve stavu spánku (S2)"
4254 + "cs": "Zařízení je ve stavu spánku (S2)",
4255 + "nl": "Apparaat bevindt zich in slaapstand (S2)"
4256 },
4257 {
4258 "en": "Device is in sleep state (S2).",
@@ -3875,7 +4261,8 @@
4261 ],
4262 "pt": "O dispositivo está no estado de suspensão (S2).",
4263 "ja": "デバイスはスリープ状態(S2)です。",
3878 - "cs": "Zařízení je ve stavu spánku (S2)."
4264 + "cs": "Zařízení je ve stavu spánku (S2).",
4265 + "nl": "Apparaat bevindt zich in slaapstand (S2)."
4266 },
4267 {
4268 "en": "Device is in soft-off state (S5)",
@@ -3885,7 +4272,8 @@
4272 ],
4273 "pt": "O dispositivo está no estado soft-off (S5)",
4274 "ja": "デバイスはソフトオフ状態です(S5)",
3888 - "cs": "Zařízení je ve stavu soft-off (S5)"
4275 + "cs": "Zařízení je ve stavu soft-off (S5)",
4276 + "nl": "Apparaat is uitgeschakeld (S5)"
4277 },
4278 {
4279 "en": "Device is powered",
@@ -3895,7 +4283,8 @@
4283 "default-mobile.handlebars->9->111"
4284 ],
4285 "pt": "O dispositivo está ligado",
3898 - "ja": "デバイスに電源が入っています"
4286 + "ja": "デバイスに電源が入っています",
4287 + "nl": "Apparaat is ingeschakeld"
4288 },
4289 {
4290 "en": "Device is powered on.",
@@ -3904,7 +4293,8 @@
4293 ],
4294 "pt": "O dispositivo está ligado.",
4295 "ja": "デバイスの電源が入っています。",
3907 - "cs": "Zařízení je zapnuto."
4296 + "cs": "Zařízení je zapnuto.",
4297 + "nl": "Apparaat is ingeschakeld."
4298 },
4299 {
4300 "en": "Device is present, but power state cannot be determined",
@@ -3914,7 +4304,8 @@
4304 ],
4305 "pt": "O dispositivo está presente, mas o estado de energia não pode ser determinado",
4306 "ja": "デバイスは存在しますが、電源状態を判別できません",
3917 - "cs": "Zařízení je přítomno, ale nelze získat stav napájení"
4307 + "cs": "Zařízení je přítomno, ale nelze získat stav napájení",
4308 + "nl": "Apparaat is aanwezig, maar de stroomstatus kan niet worden bepaald"
4309 },
4310 {
4311 "en": "Device Location",
@@ -3923,7 +4314,8 @@
4314 ],
4315 "pt": "Localização do dispositivo",
4316 "ja": "デバイスの場所",
3926 - "cs": "Umístění zařízení"
4317 + "cs": "Umístění zařízení",
4318 + "nl": "Apparaat locatie"
4319 },
4320 {
4321 "en": "Device name",
@@ -3932,7 +4324,8 @@
4324 "default.handlebars->23->379"
4325 ],
4326 "pt": "Nome do dispositivo",
3935 - "ja": "装置名"
4327 + "ja": "装置名",
4328 + "nl": "Apparaat naam"
4329 },
4330 {
4331 "en": "Device Name",
@@ -3944,7 +4337,8 @@
4337 ],
4338 "pt": "Nome do Dispositivo",
4339 "ja": "装置名",
3947 - "cs": "Název zařízení"
4340 + "cs": "Název zařízení",
4341 + "nl": "Apparaat naam"
4342 },
4343 {
4344 "en": "Device Notification",
@@ -3953,7 +4347,8 @@
4347 ],
4348 "pt": "Notificação de dispositivo",
4349 "ja": "デバイス通知",
3956 - "cs": "Oznámení zařízení"
4350 + "cs": "Oznámení zařízení",
4351 + "nl": "Apparaatmelding"
4352 },
4353 {
4354 "en": "Device Toast",
@@ -3962,7 +4357,8 @@
4357 ],
4358 "pt": "Brinde do dispositivo",
4359 "ja": "デバイストースト",
3965 - "cs": "Device Toast"
4360 + "cs": "Device Toast",
4361 + "nl": "undefined"
4362 },
4363 {
4364 "en": "DeviceCheckbox",
@@ -3971,7 +4367,8 @@
4367 ],
4368 "pt": "Caixa de seleção do dispositivo",
4369 "ja": "DeviceCheckbox",
3974 - "cs": "DeviceCheckbox"
4370 + "cs": "DeviceCheckbox",
4371 + "nl": "Apparaat Checkbox"
4372 },
4373 {
4374 "en": "Disabled",
@@ -3980,7 +4377,8 @@
4377 ],
4378 "pt": "Desativado",
4379 "ja": "無効",
3983 - "cs": "Zakázáno"
4380 + "cs": "Zakázáno",
4381 + "nl": "Uitgeschakeld"
4382 },
4383 {
4384 "en": "Disconnect",
@@ -3994,7 +4392,8 @@
4392 ],
4393 "pt": "Desconectar",
4394 "ja": "切断する",
3997 - "cs": "Odpojit"
4395 + "cs": "Odpojit",
4396 + "nl": "Verbreken"
4397 },
4398 {
4399 "en": "Disconnect All",
@@ -4003,7 +4402,8 @@
4402 ],
4403 "pt": "Desconectar todos",
4404 "ja": "すべて切断",
4006 - "cs": "Odpojit vše"
4405 + "cs": "Odpojit vše",
4406 + "nl": "Verbreek alles"
4407 },
4408 {
4409 "en": "Disconnected",
@@ -4023,7 +4423,8 @@
4423 "default-mobile.handlebars->9->1"
4424 ],
4425 "pt": "Desconectado",
4026 - "ja": "切断されました"
4426 + "ja": "切断されました",
4427 + "nl": "Verbroken"
4428 },
4429 {
4430 "en": "Display a notification on the remote computer",
@@ -4032,7 +4433,8 @@
4433 ],
4434 "pt": "Exibir uma notificação no computador remoto",
4435 "ja": "リモートコンピューターに通知を表示する",
4035 - "cs": "Zobrazit notifikaci na vzdáleném zařízení"
4436 + "cs": "Zobrazit notifikaci na vzdáleném zařízení",
4437 + "nl": "Toon een melding op de externe computer"
4438 },
4439 {
4440 "en": "Display name",
@@ -4041,7 +4443,8 @@
4443 ],
4444 "pt": "Mostrar nome",
4445 "ja": "表示名",
4044 - "cs": "Zobrazované jméno"
4446 + "cs": "Zobrazované jméno",
4447 + "nl": "Schermnaam"
4448 },
4449 {
4450 "en": "DNS suffix",
@@ -4050,7 +4453,8 @@
4453 ],
4454 "pt": "Sufixo DNS",
4455 "ja": "DNSサフィックス",
4053 - "cs": "DNS suffix"
4456 + "cs": "DNS suffix",
4457 + "nl": "DNS-achtervoegsel"
4458 },
4459 {
4460 "en": "Do nothing",
@@ -4059,7 +4463,8 @@
4463 "default.handlebars->23->1003"
4464 ],
4465 "pt": "Fazer nada",
4062 - "ja": "何もしない"
4466 + "ja": "何もしない",
4467 + "nl": "Doe niets"
4468 },
4469 {
4470 "en": "Don't have an account?",
@@ -4069,7 +4474,8 @@
4474 "login-mobile.handlebars->container->page_content->column_l->1->1->0->1->loginpanel->1->newAccountDiv"
4475 ],
4476 "pt": "Não possui uma conta?",
4072 - "ja": "アカウントを持っていないのですか?"
4477 + "ja": "アカウントを持っていないのですか?",
4478 + "nl": "Heb je nog geen account?"
4479 },
4480 {
4481 "en": "Don\\'t configure",
@@ -4079,7 +4485,8 @@
4485 ],
4486 "pt": "Não configure",
4487 "ja": "設定しないでください",
4082 - "cs": "Nekonfigurovat"
4488 + "cs": "Nekonfigurovat",
4489 + "nl": "Configureer niet"
4490 },
4491 {
4492 "en": "Don\\'t connect to server",
@@ -4088,7 +4495,8 @@
4495 ],
4496 "pt": "Não conecte ao servidor",
4497 "ja": "サーバーに接続しない",
4091 - "cs": "Nepřipojovat se k serveru"
4498 + "cs": "Nepřipojovat se k serveru",
4499 + "nl": "Maak geen verbinding met de server"
4500 },
4501 {
4502 "en": "Download",
@@ -4098,7 +4506,8 @@
4506 "download.handlebars->container->page_content->column_l->1"
4507 ],
4508 "pt": "Baixar",
4101 - "ja": "ダウンロード"
4509 + "ja": "ダウンロード",
4510 + "nl": "Download"
4511 },
4512 {
4513 "en": "Download console text",
@@ -4107,7 +4516,8 @@
4516 ],
4517 "pt": "Baixar do texto do console",
4518 "ja": "コンソールテキストをダウンロードする",
4110 - "cs": "Stáhnout text z konzole"
4519 + "cs": "Stáhnout text z konzole",
4520 + "nl": "Consoletekst downloaden"
4521 },
4522 {
4523 "en": "Download data points (.csv)",
@@ -4116,7 +4526,8 @@
4526 ],
4527 "pt": "Baixar pontos de dados (.csv)",
4528 "ja": "データポイント(.csv)をダウンロードする",
4119 - "cs": "Stáhnout datové body (.csv)"
4529 + "cs": "Stáhnout datové body (.csv)",
4530 + "nl": "Gegevenspunten downloaden (.csv)"
4531 },
4532 {
4533 "en": "Download error log",
@@ -4125,7 +4536,8 @@
4536 ],
4537 "pt": "Baixar log de erro",
4538 "ja": "エラーログをダウンロードする",
4128 - "cs": "Stáhnout chybový log"
4539 + "cs": "Stáhnout chybový log",
4540 + "nl": "Foutenlogboek downloaden"
4541 },
4542 {
4543 "en": "Download Events",
@@ -4136,7 +4548,8 @@
4548 ],
4549 "pt": "Download de Eventos",
4550 "ja": "イベントをダウンロードする",
4139 - "cs": "Stáhnout události"
4551 + "cs": "Stáhnout události",
4552 + "nl": "Download gebeurtenissen"
4553 },
4554 {
4555 "en": "Download File",
@@ -4146,7 +4559,8 @@
4559 "default-mobile.handlebars->9->267"
4560 ],
4561 "pt": "⇬ Fazer download do arquivo",
4149 - "ja": "ダウンロードファイル"
4562 + "ja": "ダウンロードファイル",
4563 + "nl": "Download Bestand"
4564 },
4565 {
4566 "en": "Download MeshCentral Router, a TCP port mapping tool.",
@@ -4155,7 +4569,8 @@
4569 ],
4570 "pt": "Faça o download do MeshCentral Router, uma ferramenta de mapeamento de portas TCP.",
4571 "ja": "TCPポートマッピングツールであるMeshCentralルーターをダウンロードします。",
4158 - "cs": "Stáhnout MeshCentral, což je TCP nástroj pro mapování portů."
4572 + "cs": "Stáhnout MeshCentral, což je TCP nástroj pro mapování portů.",
4573 + "nl": "Download MeshCentral Router, een hulpmiddel voor het toewijzen van TCP-poorten."
4574 },
4575 {
4576 "en": "Download MeshCmd",
@@ -4164,7 +4579,8 @@
4579 ],
4580 "pt": "Baixar MeshCmd",
4581 "ja": "MeshCmdをダウンロード",
4167 - "cs": "Stáhnout MeshCmd"
4582 + "cs": "Stáhnout MeshCmd",
4583 + "nl": "Download MeshCmd"
4584 },
4585 {
4586 "en": "Download MeshCmd, a command line tool that performs many functions.",
@@ -4173,7 +4589,8 @@
4589 ],
4590 "pt": "Faça o download do MeshCmd, uma ferramenta de linha de comando que executa muitas funções.",
4591 "ja": "多くの機能を実行するコマンドラインツール、MeshCmdをダウンロードします。",
4176 - "cs": "Stáhnout MeshCmd, což je nástroj pro příkazovou řásku s mnoha funkcemi."
4592 + "cs": "Stáhnout MeshCmd, což je nástroj pro příkazovou řásku s mnoha funkcemi.",
4593 + "nl": "Download MeshCmd, een opdrachtregelprogramma dat vele functies uitvoert."
4594 },
4595 {
4596 "en": "Download Plugin",
@@ -4181,7 +4598,8 @@
4598 "default.handlebars->container->column_l->p42->3->3"
4599 ],
4600 "ja": "プラグインをダウンロード",
4184 - "cs": "Stáhnout plugin"
4601 + "cs": "Stáhnout plugin",
4602 + "nl": "Download Plugin"
4603 },
4604 {
4605 "en": "Download power events",
@@ -4190,7 +4608,8 @@
4608 ],
4609 "pt": "Download de eventos de energia",
4610 "ja": "電源イベントをダウンロードする",
4193 - "cs": "Stáhnout události napájení"
4611 + "cs": "Stáhnout události napájení",
4612 + "nl": "Downloaden Power gebeurtenissen"
4613 },
4614 {
4615 "en": "Download server backup",
@@ -4199,7 +4618,8 @@
4618 ],
4619 "pt": "Fazer o download do backup do servidor",
4620 "ja": "サーバーのバックアップをダウンロード",
4202 - "cs": "Stáhnout zálohu serveru"
4621 + "cs": "Stáhnout zálohu serveru",
4622 + "nl": "Download server back-up"
4623 },
4624 {
4625 "en": "Download the installer here",
@@ -4208,7 +4628,8 @@
4628 "agentinvite.handlebars->container->column_l->5->macostab->3->macosurl"
4629 ],
4630 "pt": "Faça o download do instalador aqui",
4211 - "ja": "ここからインストーラーをダウンロードしてください"
4631 + "ja": "ここからインストーラーをダウンロードしてください",
4632 + "nl": "Download het installatieprogramma hier"
4633 },
4634 {
4635 "en": "Download the list of events with one of the file formats below.",
@@ -4217,7 +4638,8 @@
4638 ],
4639 "pt": "Faça o download da lista de eventos com um dos formatos de arquivo abaixo.",
4640 "ja": "以下のファイル形式のいずれかでイベントのリストをダウンロードします。",
4220 - "cs": "Stáhnout seznam událostí v níže uvedeném formátu."
4641 + "cs": "Stáhnout seznam událostí v níže uvedeném formátu.",
4642 + "nl": "Download de lijst met gebeurtenissen in een van de onderstaande bestandsindelingen."
4643 },
4644 {
4645 "en": "Download the list of users with one of the file formats below.",
@@ -4226,7 +4648,8 @@
4648 ],
4649 "pt": "Baixe a lista de usuários com um dos formatos de arquivo abaixo.",
4650 "ja": "以下のファイル形式のいずれかでユーザーのリストをダウンロードします。",
4229 - "cs": "Stáhnout seznam uživatelů v níže uvedeném formátu."
4651 + "cs": "Stáhnout seznam uživatelů v níže uvedeném formátu.",
4652 + "nl": "Download de lijst met gebruikers in een van de onderstaande bestandsindelingen."
4653 },
4654 {
4655 "en": "Download the software here",
@@ -4236,7 +4659,8 @@
4659 ],
4660 "pt": "Faça o download do software aqui",
4661 "ja": "ここからソフトウェアをダウンロードしてください",
4239 - "cs": "Stáhnout software zde"
4662 + "cs": "Stáhnout software zde",
4663 + "nl": "Download de software hier"
4664 },
4665 {
4666 "en": "Download trace (.csv)",
@@ -4245,7 +4669,8 @@
4669 ],
4670 "pt": "Rastreio de download (.csv)",
4671 "ja": "トレースのダウンロード(.csv)",
4248 - "cs": "Stáhnout trace (.csv)"
4672 + "cs": "Stáhnout trace (.csv)",
4673 + "nl": "Download sporen (.csv)"
4674 },
4675 {
4676 "en": "Download user information",
@@ -4254,7 +4679,8 @@
4679 ],
4680 "pt": "Baixar informações do usuário",
4681 "ja": "ユーザー情報をダウンロードする",
4257 - "cs": "Stáhnout uživatelské informace"
4682 + "cs": "Stáhnout uživatelské informace",
4683 + "nl": "Download gebruikers informatie"
4684 },
4685 {
4686 "en": "Drag & drop a .mcrec file or click \\\"Open File...\\\"",
@@ -4263,7 +4689,8 @@
4689 ],
4690 "pt": "Arraste e solte um arquivo .mcrec ou clique em \\\"Abrir arquivo...\\\"",
4691 "ja": ".mcrecファイルをドラッグアンドドロップするか、[ファイルを開く...]をクリックします",
4266 - "cs": "Drag & drop soubor .mcrec nebo klikni na \\\"Otevřít soubor...\\\""
4692 + "cs": "Drag & drop soubor .mcrec nebo klikni na \\\"Otevřít soubor...\\\"",
4693 + "nl": "Sleep een .mcrec-bestand of klik op \\\"Bestand openen...\\\""
4694 },
4695 {
4696 "en": "Duration",
@@ -4272,7 +4699,8 @@
4699 ],
4700 "pt": "Duração",
4701 "ja": "期間",
4275 - "cs": "Trvání"
4702 + "cs": "Trvání",
4703 + "nl": "Looptijd"
4704 },
4705 {
4706 "en": "During activation, the agent will have access to admin password infomation.",
@@ -4281,7 +4709,8 @@
4709 ],
4710 "pt": "Durante a ativação, o agente terá acesso às informações da senha do administrador.",
4711 "ja": "アクティベーション中、エージェントは管理者パスワード情報にアクセスできます。",
4284 - "cs": "Během aktivace bude mít agent administrátorská práva."
4712 + "cs": "Během aktivace bude mít agent administrátorská práva.",
4713 + "nl": "Tijdens activering heeft de agent toegang tot beheerderswachtwoordinformatie."
4714 },
4715 {
4716 "en": "Dutch (Belgian)",
@@ -4290,7 +4719,8 @@
4719 ],
4720 "pt": "Holandês (belga)",
4721 "ja": "オランダ語(ベルギー)",
4293 - "cs": "Dutch (Belgian)"
4722 + "cs": "Dutch (Belgian)",
4723 + "nl": "Nederlands (Belgisch)"
4724 },
4725 {
4726 "en": "Dutch (Standard)",
@@ -4299,7 +4729,8 @@
4729 ],
4730 "pt": "Holandês (padrão)",
4731 "ja": "オランダ語(標準)",
4302 - "cs": "Dutch (Standard)"
4732 + "cs": "Dutch (Standard)",
4733 + "nl": "Nederlands (Standaard)"
4734 },
4735 {
4736 "en": "Edit",
@@ -4308,7 +4739,8 @@
4739 ],
4740 "pt": "Editar",
4741 "ja": "編集",
4311 - "cs": "Upravit"
4742 + "cs": "Upravit",
4743 + "nl": "Bewerk"
4744 },
4745 {
4746 "en": "Edit Device",
@@ -4318,7 +4750,8 @@
4750 ],
4751 "pt": "Editar dispositivo",
4752 "ja": "デバイスを編集",
4321 - "cs": "Upravit zařízení"
4753 + "cs": "Upravit zařízení",
4754 + "nl": "Bewerk apparaat"
4755 },
4756 {
4757 "en": "Edit Device Group",
@@ -4332,7 +4765,8 @@
4765 "default-mobile.handlebars->9->308"
4766 ],
4767 "pt": "Editar grupo de dispositivos",
4335 - "ja": "デバイスグループの編集"
4768 + "ja": "デバイスグループの編集",
4769 + "nl": "Bewerk apparaatgroep"
4770 },
4771 {
4772 "en": "Edit Device Group Features",
@@ -4341,7 +4775,8 @@
4775 ],
4776 "pt": "Editar recursos do grupo de dispositivos",
4777 "ja": "デバイスグループ機能の編集",
4344 - "cs": "Upravit vlastnosti skupiny zařízení"
4778 + "cs": "Upravit vlastnosti skupiny zařízení",
4779 + "nl": "Functies van apparaatgroep bewerken"
4780 },
4781 {
4782 "en": "Edit Device Group User Consent",
@@ -4350,7 +4785,8 @@
4785 ],
4786 "pt": "Editar consentimento do usuário do grupo de dispositivos",
4787 "ja": "デバイスグループユーザーの同意の編集",
4353 - "cs": "Upravit souhlas uživatele skupiny zařízení"
4788 + "cs": "Upravit souhlas uživatele skupiny zařízení",
4789 + "nl": "Toestemming gebruikersgroep bewerken"
4790 },
4791 {
4792 "en": "Edit Device Notes",
@@ -4360,7 +4796,8 @@
4796 "default-mobile.handlebars->9->302"
4797 ],
4798 "pt": "Editar notas do dispositivo",
4363 - "ja": "デバイスノートの編集"
4799 + "ja": "デバイスノートの編集",
4800 + "nl": "Apparaatnotities bewerken"
4801 },
4802 {
4803 "en": "Edit Intel&reg; AMT credentials",
@@ -4372,7 +4809,8 @@
4809 ],
4810 "pt": "Editar Intel & reg; Credenciais AMT",
4811 "ja": "Intelを編集&reg; AMTクレデンシャル",
4375 - "cs": "Upravit Intel&reg; AMT pověření"
4812 + "cs": "Upravit Intel&reg; AMT pověření",
4813 + "nl": "Bewerk Intel® AMT-gegevens"
4814 },
4815 {
4816 "en": "Edit Notes",
@@ -4383,7 +4821,8 @@
4821 ],
4822 "pt": "Editar notas",
4823 "ja": "メモを編集",
4386 - "cs": "Upravit poznámky"
4824 + "cs": "Upravit poznámky",
4825 + "nl": "Notities bewerken"
4826 },
4827 {
4828 "en": "Edit remote desktop settings",
@@ -4392,7 +4831,8 @@
4831 ],
4832 "pt": "Editar configurações da área de trabalho remota",
4833 "ja": "リモートデスクトップ設定を編集する",
4395 - "cs": "Upravit nastavení vzdálené plochy"
4834 + "cs": "Upravit nastavení vzdálené plochy",
4835 + "nl": "Bewerk externe bureaubladinstellingen"
4836 },
4837 {
4838 "en": "Edit User Device Group Permissions",
@@ -4401,7 +4841,8 @@
4841 ],
4842 "pt": "Editar permissões do grupo de dispositivos do usuário",
4843 "ja": "ユーザーデバイスグループ権限の編集",
4404 - "cs": "Upravit uživatelská práva pro skupinu zařízení "
4844 + "cs": "Upravit uživatelská práva pro skupinu zařízení ",
4845 + "nl": "Gebruikersrechten apparaatgroep bewerken"
4846 },
4847 {
4848 "en": "Email",
@@ -4415,7 +4856,8 @@
4856 ],
4857 "pt": "Email",
4858 "ja": "Eメール",
4418 - "cs": "Email"
4859 + "cs": "Email",
4860 + "nl": "Email"
4861 },
4862 {
4863 "en": "Email Address Change",
@@ -4425,7 +4867,8 @@
4867 "default-mobile.handlebars->9->35"
4868 ],
4869 "pt": "Alteração de endereço de email",
4428 - "ja": "メールアドレスの変更"
4870 + "ja": "メールアドレスの変更",
4871 + "nl": "Email Adres wijzigen"
4872 },
4873 {
4874 "en": "Email is verified",
@@ -4434,7 +4877,8 @@
4877 "default.handlebars->23->1202"
4878 ],
4879 "pt": "O email foi verificado",
4437 - "ja": "メールが確認されました"
4880 + "ja": "メールが確認されました",
4881 + "nl": "Email is geverifieerd"
4882 },
4883 {
4884 "en": "Email is verified.",
@@ -4443,7 +4887,8 @@
4887 "default.handlebars->23->1177"
4888 ],
4889 "pt": "O email foi verificado.",
4446 - "ja": "メールが確認されました。"
4890 + "ja": "メールが確認されました。",
4891 + "nl": "Email is geverifieerd."
4892 },
4893 {
4894 "en": "Email not verified",
@@ -4452,7 +4897,8 @@
4897 "default.handlebars->23->1203"
4898 ],
4899 "pt": "Email não verificado",
4455 - "ja": "メールが確認されていません"
4900 + "ja": "メールが確認されていません",
4901 + "nl": "Email is niet geverifieerd"
4902 },
4903 {
4904 "en": "Email Verification",
@@ -4462,7 +4908,8 @@
4908 ],
4909 "pt": "verificação de e-mail",
4910 "ja": "メール確認",
4465 - "cs": "Ověření emailu"
4911 + "cs": "Ověření emailu",
4912 + "nl": "email verificatie"
4913 },
4914 {
4915 "en": "Email:",
@@ -4476,7 +4923,8 @@
4923 ],
4924 "pt": "Email:",
4925 "ja": "Eメール:",
4479 - "cs": "Email:"
4926 + "cs": "Email:",
4927 + "nl": "Email:"
4928 },
4929 {
4930 "en": "Enable browser notification",
@@ -4485,7 +4933,8 @@
4933 "messenger.handlebars->xtop->1"
4934 ],
4935 "pt": "Ativar notificação do navegador",
4488 - "ja": "ブラウザ通知を有効にする"
4936 + "ja": "ブラウザ通知を有効にする",
4937 + "nl": "Schakel browsermelding in"
4938 },
4939 {
4940 "en": "Enable web notifications",
@@ -4494,7 +4943,8 @@
4943 "default.handlebars->container->column_l->p2->p2AccountActions->3->accountEnableNotificationsSpan->0"
4944 ],
4945 "pt": "Ativar notificações da web",
4497 - "ja": "Web通知を有効にする"
4946 + "ja": "Web通知を有効にする",
4947 + "nl": "Schakel webmeldingen in"
4948 },
4949 {
4950 "en": "Encoding",
@@ -4503,7 +4953,8 @@
4953 ],
4954 "pt": "Codificação",
4955 "ja": "エンコーディング",
4506 - "cs": "Kódování"
4956 + "cs": "Kódování",
4957 + "nl": "codering"
4958 },
4959 {
4960 "en": "English",
@@ -4512,7 +4963,8 @@
4963 ],
4964 "pt": "Inglês",
4965 "ja": "英語",
4515 - "cs": "English"
4966 + "cs": "English",
4967 + "nl": "Engels"
4968 },
4969 {
4970 "en": "English (Australia)",
@@ -4521,7 +4973,8 @@
4973 ],
4974 "pt": "Inglês (Austrália)",
4975 "ja": "英語(オーストラリア)",
4524 - "cs": "English (Australia)"
4976 + "cs": "English (Australia)",
4977 + "nl": "Engels (Australië)"
4978 },
4979 {
4980 "en": "English (Belize)",
@@ -4530,7 +4983,8 @@
4983 ],
4984 "pt": "Inglês (Belize)",
4985 "ja": "英語(ベリーズ)",
4533 - "cs": "English (Belize)"
4986 + "cs": "English (Belize)",
4987 + "nl": "Engels (Belize)"
4988 },
4989 {
4990 "en": "English (Canada)",
@@ -4539,7 +4993,8 @@
4993 ],
4994 "pt": "Inglês (Canadá)",
4995 "ja": "英語(カナダ)",
4542 - "cs": "English (Canada)"
4996 + "cs": "English (Canada)",
4997 + "nl": "Engels (Canada)"
4998 },
4999 {
5000 "en": "English (Ireland)",
@@ -4548,7 +5003,8 @@
5003 ],
5004 "pt": "Inglês (Irlanda)",
5005 "ja": "英語(アイルランド)",
4551 - "cs": "English (Ireland)"
5006 + "cs": "English (Ireland)",
5007 + "nl": "Engels (Ierland)"
5008 },
5009 {
5010 "en": "English (Jamaica)",
@@ -4557,7 +5013,8 @@
5013 ],
5014 "pt": "Inglês (Jamaica)",
5015 "ja": "英語(ジャマイカ)",
4560 - "cs": "English (Jamaica)"
5016 + "cs": "English (Jamaica)",
5017 + "nl": "Engels (Jamaica)"
5018 },
5019 {
5020 "en": "English (New Zealand)",
@@ -4566,7 +5023,8 @@
5023 ],
5024 "pt": "Inglês (Nova Zelândia)",
5025 "ja": "英語(ニュージーランド)",
4569 - "cs": "English (New Zealand)"
5026 + "cs": "English (New Zealand)",
5027 + "nl": "Engels (Nieuw Zeeland)"
5028 },
5029 {
5030 "en": "English (Philippines)",
@@ -4575,7 +5033,8 @@
5033 ],
5034 "pt": "Inglês (Filipinas)",
5035 "ja": "英語(フィリピン)",
4578 - "cs": "English (Philippines)"
5036 + "cs": "English (Philippines)",
5037 + "nl": "Engels (Filippijnen)"
5038 },
5039 {
5040 "en": "English (South Africa)",
@@ -4584,7 +5043,8 @@
5043 ],
5044 "pt": "Inglês (África do Sul)",
5045 "ja": "英語(南アフリカ)",
4587 - "cs": "English (South Africa)"
5046 + "cs": "English (South Africa)",
5047 + "nl": "Engels (Zuid Africa)"
5048 },
5049 {
5050 "en": "English (Trinidad & Tobago)",
@@ -4593,7 +5053,8 @@
5053 ],
5054 "pt": "Inglês (Trinidad Tobago)",
5055 "ja": "英語(トリニダードトバゴ)",
4596 - "cs": "English (Trinidad & Tobago)"
5056 + "cs": "English (Trinidad & Tobago)",
5057 + "nl": "Engels (Trinidad & Tobago)"
5058 },
5059 {
5060 "en": "English (United Kingdom)",
@@ -4603,7 +5064,8 @@
5064 ],
5065 "pt": "Inglês (Reino Unido)",
5066 "ja": "英語(イギリス)",
4606 - "cs": "English (United Kingdom)"
5067 + "cs": "English (United Kingdom)",
5068 + "nl": "Engels (Verenigd Koninkrijk)"
5069 },
5070 {
5071 "en": "English (United States)",
@@ -4613,7 +5075,8 @@
5075 ],
5076 "pt": "Inglês (Estados Unidos)",
5077 "ja": "英語(米国)",
4616 - "cs": "English (United States)"
5078 + "cs": "English (United States)",
5079 + "nl": "Engels (Verenigde staten van America)"
5080 },
5081 {
5082 "en": "English (Zimbabwe)",
@@ -4623,7 +5086,8 @@
5086 ],
5087 "pt": "Inglês (Zimbábue)",
5088 "ja": "英語(ジンバブエ)",
4626 - "cs": "English (Zimbabwe)"
5089 + "cs": "English (Zimbabwe)",
5090 + "nl": "Engels (Zimbabwe)"
5091 },
5092 {
5093 "en": "Enter",
@@ -4633,7 +5097,8 @@
5097 ],
5098 "pt": "Entrar",
5099 "ja": "入る",
4636 - "cs": "Zadání"
5100 + "cs": "Zadání",
5101 + "nl": "invoeren"
5102 },
5103 {
5104 "en": "Enter a comma seperate list of administrative realms names.",
@@ -4642,7 +5107,8 @@
5107 ],
5108 "pt": "Insira uma lista separada por vírgulas de nomes de regiões administrativas.",
5109 "ja": "管理レルム名のコンマ区切りリストを入力します。",
4645 - "cs": "Zadejte seznam administrativních realmů oddělených čárkami."
5110 + "cs": "Zadejte seznam administrativních realmů oddělených čárkami.",
5111 + "nl": "Voer een door komma's gescheiden lijst met beheerdersnamen in."
5112 },
5113 {
5114 "en": "Enter a range of IP addresses to scan for Intel AMT devices.",
@@ -4651,7 +5117,8 @@
5117 ],
5118 "pt": "Digite um intervalo de endereços IP para procurar dispositivos Intel AMT.",
5119 "ja": "IPアドレスの範囲を入力して、Intel AMTデバイスをスキャンします。",
4654 - "cs": "Zadejte rozsah IP adres pro vyhledání Intel AMT zařízení."
5120 + "cs": "Zadejte rozsah IP adres pro vyhledání Intel AMT zařízení.",
5121 + "nl": "Voer een reeks IP-adressen in om te scannen op Intel AMT-apparaten."
5122 },
5123 {
5124 "en": "Enter text and click OK to remotely type it using a US english keyboard. Make sure to place the remote cursor at the correct position before proceeding.",
@@ -4660,7 +5127,8 @@
5127 ],
5128 "pt": "Digite o texto e clique em OK para digitá-lo remotamente usando um teclado em inglês dos EUA.Certifique-se de colocar o cursor remoto na posição correta antes de continuar.",
5129 "ja": "テキストを入力し、[OK]をクリックして、米国英語キーボードを使用してリモートで入力します。続行する前に、リモートカーソルを正しい位置に配置してください。",
4663 - "cs": "Zadejte text a kliknutím na OK jej zadáte na dálku pomocí americké anglické klávesnice. Než budete pokračovat, nezapomeňte vzdálený kurzor na správnou pozici."
5130 + "cs": "Zadejte text a kliknutím na OK jej zadáte na dálku pomocí americké anglické klávesnice. Než budete pokračovat, nezapomeňte vzdálený kurzor na správnou pozici.",
5131 + "nl": "Voer tekst in en klik op OK om deze op afstand te typen met een Amerikaans Engels toetsenbord. Zorg ervoor dat u de externe cursor op de juiste positie plaatst voordat u doorgaat."
5132 },
5133 {
5134 "en": "Enter the account creation token",
@@ -4670,7 +5138,8 @@
5138 ],
5139 "pt": "Insira o token de criação da conta",
5140 "ja": "アカウント作成トークンを入力してください",
4673 - "cs": "Zadejte token pro vytvoření účtu"
5141 + "cs": "Zadejte token pro vytvoření účtu",
5142 + "nl": "Voer het token voor het maken van een account in"
5143 },
5144 {
5145 "en": "Enter the token here for 2-step login:",
@@ -4679,7 +5148,8 @@
5148 ],
5149 "pt": "Digite o token aqui para o login em duas etapas:",
5150 "ja": "2段階ログインのトークンをここに入力します。",
4682 - "cs": "Zadejte token pro 2-faktorové přihlášení:"
5151 + "cs": "Zadejte token pro 2-faktorové přihlášení:",
5152 + "nl": "Voer hier het token in voor tweestaps-aanmelding:"
5153 },
5154 {
5155 "en": "Error, Unable to add key.",
@@ -4688,7 +5158,8 @@
5158 ],
5159 "pt": "Erro, não foi possível adicionar a chave.",
5160 "ja": "エラー、キーを追加できません。",
4691 - "cs": "Chyba, nelze přidat klíč."
5161 + "cs": "Chyba, nelze přidat klíč.",
5162 + "nl": "Fout, kan sleutel niet toevoegen."
5163 },
5164 {
5165 "en": "ERROR: ",
@@ -4698,7 +5169,8 @@
5169 ],
5170 "pt": "ERRO:",
5171 "ja": "エラー:",
4701 - "cs": "CHYBA: "
5172 + "cs": "CHYBA: ",
5173 + "nl": "FOUT:"
5174 },
5175 {
5176 "en": "Error: No connection key specified.",
@@ -4707,7 +5179,8 @@
5179 ],
5180 "pt": "Erro: Nenhuma chave de conexão especificada.",
5181 "ja": "エラー:接続キーが指定されていません。",
4710 - "cs": "Chyba: nebyl zadán klíč pro připojení."
5182 + "cs": "Chyba: nebyl zadán klíč pro připojení.",
5183 + "nl": "Fout: geen verbindingssleutel opgegeven."
5184 },
5185 {
5186 "en": "ERROR: Unable to add key.",
@@ -4717,7 +5190,8 @@
5190 ],
5191 "pt": "ERRO: Não foi possível adicionar a chave.",
5192 "ja": "エラー:キーを追加できません。",
4720 - "cs": "CHYBA: nelze přidat klíč."
5193 + "cs": "CHYBA: nelze přidat klíč.",
5194 + "nl": "FOUT: kan sleutel niet toevoegen."
5195 },
5196 {
5197 "en": "ESC",
@@ -4726,7 +5200,8 @@
5200 ],
5201 "pt": "ESC",
5202 "ja": "ESC",
4729 - "cs": "ESC"
5203 + "cs": "ESC",
5204 + "nl": "ESC"
5205 },
5206 {
5207 "en": "Esperanto",
@@ -4735,7 +5210,8 @@
5210 ],
5211 "pt": "Esperanto",
5212 "ja": "エスペラント",
4738 - "cs": "Esperanto"
5213 + "cs": "Esperanto",
5214 + "nl": "Esperanto"
5215 },
5216 {
5217 "en": "Estonian",
@@ -4744,7 +5220,8 @@
5220 ],
5221 "pt": "Estoniano",
5222 "ja": "エストニア語",
4747 - "cs": "Estonian"
5223 + "cs": "Estonian",
5224 + "nl": "Estlands"
5225 },
5226 {
5227 "en": "Event Details",
@@ -4753,7 +5230,8 @@
5230 ],
5231 "pt": "Detalhes do evento",
5232 "ja": "イベントの詳細",
4756 - "cs": "Detail události"
5233 + "cs": "Detail události",
5234 + "nl": "Gebeurtenis details"
5235 },
5236 {
5237 "en": "Event List Export",
@@ -4762,7 +5240,8 @@
5240 ],
5241 "pt": "Exportação da lista de eventos",
5242 "ja": "イベントリストのエクスポート",
4765 - "cs": "Export seznamu událostí"
5243 + "cs": "Export seznamu událostí",
5244 + "nl": "Gebeurtenis Lijst exporteren"
5245 },
5246 {
5247 "en": "Events",
@@ -4774,7 +5253,8 @@
5253 "default.handlebars->container->topbar->1->1->UserSubMenuSpan->UserSubMenu->1->0->UserEvents"
5254 ],
5255 "pt": "Eventos",
4777 - "ja": "イベント"
5256 + "ja": "イベント",
5257 + "nl": "Gebeurtenissen"
5258 },
5259 {
5260 "en": "Events -",
@@ -4785,7 +5265,8 @@
5265 ],
5266 "pt": "Eventos -",
5267 "ja": "イベント-",
4788 - "cs": "Události -"
5268 + "cs": "Události -",
5269 + "nl": "Gebeurtenissen -"
5270 },
5271 {
5272 "en": "eventslist.csv",
@@ -4795,7 +5276,8 @@
5276 ],
5277 "pt": "eventslist.csv",
5278 "ja": "eventslist.csv",
4798 - "cs": "eventslist.csv"
5279 + "cs": "eventslist.csv",
5280 + "nl": "eventslist.csv"
5281 },
5282 {
5283 "en": "eventslist.json",
@@ -4805,7 +5287,8 @@
5287 ],
5288 "pt": "eventslist.json",
5289 "ja": "eventslist.json",
4808 - "cs": "eventslist.json"
5290 + "cs": "eventslist.json",
5291 + "nl": "eventslist.json"
5292 },
5293 {
5294 "en": "example@email.com",
@@ -4814,7 +5297,8 @@
5297 ],
5298 "pt": "example@email.com",
5299 "ja": "example@email.com",
4817 - "cs": "example@email.com"
5300 + "cs": "example@email.com",
5301 + "nl": "voorbeeld@email.nl"
5302 },
5303 {
5304 "en": "Existing account with this email address.",
@@ -4823,7 +5307,8 @@
5307 "login-mobile.handlebars->5->4"
5308 ],
5309 "ja": "このメールアドレスを持つ既存のアカウント。",
4826 - "cs": "Existuje účet s tímto emailem."
5310 + "cs": "Existuje účet s tímto emailem.",
5311 + "nl": "Bestaand account met dit e-mailadres."
5312 },
5313 {
5314 "en": "Extended Ascii",
@@ -4832,7 +5317,8 @@
5317 ],
5318 "pt": "Ascii estendido",
5319 "ja": "拡張アスキー",
4835 - "cs": "Rozšířené Ascii"
5320 + "cs": "Rozšířené Ascii",
5321 + "nl": "Extended Ascii"
5322 },
5323 {
5324 "en": "Extended ASCII",
@@ -4841,7 +5327,8 @@
5327 ],
5328 "pt": "ASCII estendido",
5329 "ja": "拡張ASCII",
4844 - "cs": "Rozšířené ASCII"
5330 + "cs": "Rozšířené ASCII",
5331 + "nl": "Extended ASCII"
5332 },
5333 {
5334 "en": "Faeroese",
@@ -4860,7 +5347,8 @@
5347 "default.handlebars->23->49"
5348 ],
5349 "pt": "Falhou",
4863 - "ja": "失敗しました"
5350 + "ja": "失敗しました",
5351 + "nl": "Mislukt"
5352 },
5353 {
5354 "en": "Farsi (Persian)",
@@ -4870,7 +5358,8 @@
5358 ],
5359 "pt": "Persa (persa)",
5360 "ja": "ペルシア語(ペルシャ語)",
4873 - "cs": "Farsi (Persian)"
5361 + "cs": "Farsi (Persian)",
5362 + "nl": "Perzisch (Perzisch)"
5363 },
5364 {
5365 "en": "Fast",
@@ -4881,7 +5370,8 @@
5370 "default-mobile.handlebars->dialog->3->dialog7->d7meshkvm->7->d7framelimiter->1"
5371 ],
5372 "pt": "Rápido",
4884 - "ja": "速い"
5373 + "ja": "速い",
5374 + "nl": "Snel"
5375 },
5376 {
5377 "en": "Features",
@@ -4890,7 +5380,8 @@
5380 "default.handlebars->23->945"
5381 ],
5382 "pt": "Recursos",
4893 - "ja": "特徴"
5383 + "ja": "特徴",
5384 + "nl": "Kenmerken"
5385 },
5386 {
5387 "en": "Fijian",
@@ -4899,7 +5390,8 @@
5390 ],
5391 "pt": "Fijiano",
5392 "ja": "フィジー人",
4902 - "cs": "Fijian"
5393 + "cs": "Fijian",
5394 + "nl": "Fijian"
5395 },
5396 {
5397 "en": "File Editor",
@@ -4910,7 +5402,8 @@
5402 ],
5403 "pt": "Editor de Arquivos",
5404 "ja": "ファイルエディター",
4913 - "cs": "Editor souborů"
5405 + "cs": "Editor souborů",
5406 + "nl": "Bestandsberwerker"
5407 },
5408 {
5409 "en": "File Selection",
@@ -4920,7 +5413,8 @@
5413 ],
5414 "pt": "Seleção de arquivo",
5415 "ja": "ファイル選択",
4923 - "cs": "Výběr souboru"
5416 + "cs": "Výběr souboru",
5417 + "nl": "Bestand selectie"
5418 },
5419 {
5420 "en": "Files",
@@ -4932,7 +5426,8 @@
5426 "default.handlebars->23->1031"
5427 ],
5428 "pt": "Arquivos",
4935 - "ja": "ファイル"
5429 + "ja": "ファイル",
5430 + "nl": "Bestanden"
5431 },
5432 {
5433 "en": "Files -",
@@ -4942,7 +5437,8 @@
5437 "default.handlebars->container->column_l->p13->p13title->3"
5438 ],
5439 "pt": "Arquivos - ",
4945 - "ja": "ファイル-"
5440 + "ja": "ファイル-",
5441 + "nl": "Bestanden -"
5442 },
5443 {
5444 "en": "Files Notify",
@@ -4951,7 +5447,8 @@
5447 ],
5448 "pt": "Notificação arquivos",
5449 "ja": "ファイル通知",
4954 - "cs": "Upozornit na soubory"
5450 + "cs": "Upozornit na soubory",
5451 + "nl": "Bestanden Melden"
5452 },
5453 {
5454 "en": "Files Prompt",
@@ -4960,7 +5457,8 @@
5457 ],
5458 "pt": "Arquivos do prompt",
5459 "ja": "ファイルプロンプト",
4963 - "cs": "Dotaz na soubory"
5460 + "cs": "Dotaz na soubory",
5461 + "nl": "Bestanden vragen"
5462 },
5463 {
5464 "en": "FileSystemDriver",
@@ -4969,7 +5467,8 @@
5467 ],
5468 "pt": "Driver do sistema de arquivos",
5469 "ja": "FileSystemDriver",
4972 - "cs": "Ovladač souborového systému"
5470 + "cs": "Ovladač souborového systému",

This file is too large to show in full.

views/agentinvite-min.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>&diams;<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Toggle night mode"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Remote Agent Installation<span id=groupname></span></h1><p>You have been invited to install a software that will allow a remote operator to fully access your computer remotely including the desktop and files. Only follow the instructions below if this invitation was expected and you know who will be accessing your computer. Selecting your operation system and follow the instructions below.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64bit</button> <button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32bit</button> <button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button> <button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>MacOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft&trade; Windows 64bit</h3><p><a id=win64url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft&trade; Windows 32bit</h3><p><a id=win32url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>To install, cut and paste the following command in a root terminal.<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>To uninstall, cut and paste the following command as root.<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple&trade; MacOS</h3><p><a id=macosurl>Download the installer here</a>, right click on it or press "control" and click on the file. Then select "Open" and follow the instructions.<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace(" active","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+=" active":document.getElementById("t"+t).className+=" active"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://'+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://'+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>&diams;<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Toggle night mode"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Remote Agent Installation<span id=groupname></span></h1><p>You have been invited to install a software that will allow a remote operator to fully access your computer remotely including the desktop and files. Only follow the instructions below if this invitation was expected and you know who will be accessing your computer. Selecting your operation system and follow the instructions below.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64bit</button> <button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32bit</button> <button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button> <button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>MacOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft&trade; Windows 64bit</h3><p><a id=win64url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft&trade; Windows 32bit</h3><p><a id=win32url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>To install, cut and paste the following command in a root terminal.<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>To uninstall, cut and paste the following command as root.<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple&trade; MacOS</h3><p><a id=macosurl>Download the installer here</a>, right click on it or press "control" and click on the file. Then select "Open" and follow the instructions.<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace(" active","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+=" active":document.getElementById("t"+t).className+=" active"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://'+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://'+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
views/download-min.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title1}}} - Download</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>Download</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right>{{{rootCertLink}}} &nbsp;<a href=terms>Terms &amp; Privacy</a></table></div></div></div>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title1}}} - Download</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>Download</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right>{{{rootCertLink}}} &nbsp;<a href=terms>Terms &amp; Privacy</a></table></div></div></div>
\ No newline at end of file
views/error404-min.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>&diams;<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Toggle night mode"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><div style=text-align:center;padding-top:30px;font-size:200px;font-family:Arial;color:#bbb><b>404</b></div><div style=text-align:center;font-size:20px;font-family:Arial;color:#999>This page does not exist</div><div style=text-align:center;padding-top:20px;font-size:20px;font-family:Arial;color:#999><a href=/ style=text-decoration:none><b>Go to main site</b></a></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Back</a></table></div></div><script>"use strict";var uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),terms="{{{terms}}}";function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}""!=terms&&QH("column_l",decodeURIComponent(terms)),QV("column_l",!0),userInterfaceSelectMenu()</script>
\ No newline at end of file
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:16px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>&diams;<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Toggle night mode"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><div style=text-align:center;padding-top:30px;font-size:200px;font-family:Arial;color:#bbb><b>404</b></div><div style=text-align:center;font-size:20px;font-family:Arial;color:#999>This page does not exist</div><div style=text-align:center;padding-top:20px;font-size:20px;font-family:Arial;color:#999><a href=/ style=text-decoration:none><b>Go to main site</b></a></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Back</a></table></div></div><script>"use strict";var uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),terms="{{{terms}}}";function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}""!=terms&&QH("column_l",decodeURIComponent(terms)),QV("column_l",!0),userInterfaceSelectMenu()</script>
\ No newline at end of file
views/message-min.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title}}} - {{{title3}}}</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>{{{title3}}}</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=terms>Terms &amp; Privacy</a></table></div></div></div>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title}}} - {{{title3}}}</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>{{{title3}}}</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=terms>Terms &amp; Privacy</a></table></div></div></div>
\ No newline at end of file
views/terms-min.handlebars
+1 -1
@@ -1,4 +1,4 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Terms of use</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0"></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>&diams;<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Toggle night mode"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Terms of use</h1><p>Please contact the site administrator for terms of use.<hr><p class=MsoNormal>The following are the required disclosures of open source components and software incorporated into this software.<p class=MsoNormal><b><span>1.AJAX Control Toolkit - New BSD License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright (c) 2009, CodePlex Foundation. All rights reserved.<o:p></o:p></span><p class=MsoNormal><span>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<o:p></o:p></span><p class=MsoNormal><span>1.Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.<o:p></o:p></span><p class=MsoNormal><span>2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.<o:p></o:p></span><p class=MsoNormal><span>3.Neither the name of CodePlex Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.<o:p></o:p></span><p class=MsoNormal><span>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<o:p></o:p></span><p class=MsoNormal><b><span>2.OpenSSL – OpenSSL and SSLeay License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=http://www.openssl.org/source/license.html>http://www.openssl.org/source/license.html</a></span><p class=MsoNormal><span>Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.<o:p></o:p></span><p class=MsoNormal><span>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<o:p></o:p></span><p class=MsoNormal><span>1.Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.<o:p></o:p></span><p class=MsoNormal><span>2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.<o:p></o:p></span><p class=MsoNormal><span>3.All advertising materials mentioning features or use of this software must display the following acknowledgment: &quot;This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)&quot;<o:p></o:p></span><p class=MsoNormal><span>4.The names &quot;OpenSSL Toolkit&quot; and &quot;OpenSSL Project&quot; must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.<o:p></o:p></span><p class=MsoNormal><span>5.Products derived from this software may not be called &quot;OpenSSL&quot; nor may &quot;OpenSSL&quot; appear in their names without prior written permission of the OpenSSL Project.<o:p></o:p></span><p class=MsoNormal><span>6.Redistributions of any form whatsoever must retain the following acknowledgment: &quot;This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)&quot;.<o:p></o:p></span><p class=MsoNormal><span>THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS&#39;&#39; AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<o:p></o:p></span><p class=MsoNormal><b><span>3.jQuery Foundation - MIT License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation and other contributors <a href=http://jquery.com/ >http://jquery.com/</a></span><p class=MsoNormal><span>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span><p class=MsoNormal><b><span>4.jQuery User Interface - MIT License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation and other contributors, <a href=http://jqueryui.com/ >http://jqueryui.com/</a></span><p class=MsoNormal><span>This software consists of voluntary contributions made by many individuals (AUTHORS.txt, http://jqueryui.com/about ). For exact contribution history,see the revision history and logs, available at http://jquery-ui.googlecode.com/svn/<o:p></o:p></span><p class=MsoNormal><span>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>5.noVNC - Mozilla Public License 2.0</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/kanaka/noVNC/blob/master/LICENSE.txt>https://github.com/kanaka/noVNC/blob/master/LICENSE.txt</a></span><p class=MsoNormal><span>Copyright (C) 2011 Joel Martin This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.<o:p></o:p></span><p class=MsoNormal><b><span>6.Rcarousel - MIT LIcense</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/ryrych/rcarousel/blob/master/widget/license>https://github.com/ryrych/rcarousel/blob/master/widget/license</a></span><p class=MsoNormal><span>Copyright (c) 2010 Wojciech &#39;RRH&#39; Ryrych<o:p></o:p></span><p class=MsoNormal><span>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UK License</span></b><span><o:p></o:p></span><p class=MsoNormal><span>This software uses code from <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a> licensed under the <a href=http://creativecommons.org/licenses/by/2.0/uk/legalcode>http://creativecommons.org/licenses/by/2.0/uk/legalcode</a> and its source can be downloaded from <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a>.<o:p></o:p></span></p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Back</a></table></div></div><script>'use strict';
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Terms of use</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0"></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>&diams;<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Fixed width interface"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Toggle night mode"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Terms of use</h1><p>Please contact the site administrator for terms of use.<hr><p class=MsoNormal>The following are the required disclosures of open source components and software incorporated into this software.<p class=MsoNormal><b><span>1.AJAX Control Toolkit - New BSD License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright (c) 2009, CodePlex Foundation. All rights reserved.<o:p></o:p></span><p class=MsoNormal><span>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<o:p></o:p></span><p class=MsoNormal><span>1.Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.<o:p></o:p></span><p class=MsoNormal><span>2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.<o:p></o:p></span><p class=MsoNormal><span>3.Neither the name of CodePlex Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.<o:p></o:p></span><p class=MsoNormal><span>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<o:p></o:p></span><p class=MsoNormal><b><span>2.OpenSSL – OpenSSL and SSLeay License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=http://www.openssl.org/source/license.html>http://www.openssl.org/source/license.html</a></span><p class=MsoNormal><span>Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.<o:p></o:p></span><p class=MsoNormal><span>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<o:p></o:p></span><p class=MsoNormal><span>1.Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.<o:p></o:p></span><p class=MsoNormal><span>2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.<o:p></o:p></span><p class=MsoNormal><span>3.All advertising materials mentioning features or use of this software must display the following acknowledgment: &quot;This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)&quot;<o:p></o:p></span><p class=MsoNormal><span>4.The names &quot;OpenSSL Toolkit&quot; and &quot;OpenSSL Project&quot; must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.<o:p></o:p></span><p class=MsoNormal><span>5.Products derived from this software may not be called &quot;OpenSSL&quot; nor may &quot;OpenSSL&quot; appear in their names without prior written permission of the OpenSSL Project.<o:p></o:p></span><p class=MsoNormal><span>6.Redistributions of any form whatsoever must retain the following acknowledgment: &quot;This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)&quot;.<o:p></o:p></span><p class=MsoNormal><span>THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS&#39;&#39; AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<o:p></o:p></span><p class=MsoNormal><b><span>3.jQuery Foundation - MIT License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation and other contributors <a href=http://jquery.com/ >http://jquery.com/</a></span><p class=MsoNormal><span>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span><p class=MsoNormal><b><span>4.jQuery User Interface - MIT License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation and other contributors, <a href=http://jqueryui.com/ >http://jqueryui.com/</a></span><p class=MsoNormal><span>This software consists of voluntary contributions made by many individuals (AUTHORS.txt, http://jqueryui.com/about ). For exact contribution history,see the revision history and logs, available at http://jquery-ui.googlecode.com/svn/<o:p></o:p></span><p class=MsoNormal><span>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>5.noVNC - Mozilla Public License 2.0</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/kanaka/noVNC/blob/master/LICENSE.txt>https://github.com/kanaka/noVNC/blob/master/LICENSE.txt</a></span><p class=MsoNormal><span>Copyright (C) 2011 Joel Martin This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.<o:p></o:p></span><p class=MsoNormal><b><span>6.Rcarousel - MIT LIcense</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/ryrych/rcarousel/blob/master/widget/license>https://github.com/ryrych/rcarousel/blob/master/widget/license</a></span><p class=MsoNormal><span>Copyright (c) 2010 Wojciech &#39;RRH&#39; Ryrych<o:p></o:p></span><p class=MsoNormal><span>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UK License</span></b><span><o:p></o:p></span><p class=MsoNormal><span>This software uses code from <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a> licensed under the <a href=http://creativecommons.org/licenses/by/2.0/uk/legalcode>http://creativecommons.org/licenses/by/2.0/uk/legalcode</a> and its source can be downloaded from <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a>.<o:p></o:p></span></p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Back</a></table></div></div><script>'use strict';
2 var uiMode = parseInt(getstore('uiMode', 1));
3 var webPageStackMenu = false;
4 var webPageFullScreen = true;
views/translations/agentinvite-min_cs.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Výběr rozhraní uživatele"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Rozhraní levé lišty"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Rozhraní horní lišty"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Rozhraní s pevnou šířkou"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Přepnout na noční mód"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Instalace agenta pro vzdálený přístup<span id=groupname></span></h1><p>Byla vám doručena pozvánka k instalaci softwaru, který umožňuje vzdálenou správu zařízení. Postupujte podle níže uvedených pokynů, pokud jste si vědom toho, že tato pozvánka je legitimní a chcete tento přístup umožnit. Vyberte si operační systém a postupujte dle pokynů níže.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64bit</button> <button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32bit</button> <button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button> <button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>MacOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 64bit</h3><p><a id=win64url>Stáhnout software zde</a>, spusťte soubor a zvolte "Install" nebo "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 32bit</h3><p><a id=win32url>Stáhnout software zde</a>, spusťte soubor a zvolte "Install" nebo "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>Pro instalaci spusťte následující příkaz s právy uživatele root.<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Zkopírovat do schránky"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>Pro odinstalování spustťe tento příkaz pod s uživatelskými právy root.<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Zkopírovat do schránky"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple™ MacOS</h3><p><a id=macosurl>Stáhnout instalaci zde</a>, poté spusťe instalaci. Postupujte dle instrukcí.<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace(" active","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+=" active":document.getElementById("t"+t).className+=" active"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://'+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://'+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Výběr rozhraní uživatele"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Rozhraní levé lišty"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Rozhraní horní lišty"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Rozhraní s pevnou šířkou"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Přepnout na noční mód"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Instalace agenta pro vzdálený přístup<span id=groupname></span></h1><p>Byla vám doručena pozvánka k instalaci softwaru, který umožňuje vzdálenou správu zařízení. Postupujte podle níže uvedených pokynů, pokud jste si vědom toho, že tato pozvánka je legitimní a chcete tento přístup umožnit. Vyberte si operační systém a postupujte dle pokynů níže.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64bit</button> <button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32bit</button> <button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button> <button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>MacOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 64bit</h3><p><a id=win64url>Stáhnout software zde</a>, spusťte soubor a zvolte "Install" nebo "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 32bit</h3><p><a id=win32url>Stáhnout software zde</a>, spusťte soubor a zvolte "Install" nebo "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>Pro instalaci spusťte následující příkaz s právy uživatele root.<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Zkopírovat do schránky"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>Pro odinstalování spustťe tento příkaz pod s uživatelskými právy root.<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Zkopírovat do schránky"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple™ MacOS</h3><p><a id=macosurl>Stáhnout instalaci zde</a>, poté spusťe instalaci. Postupujte dle instrukcí.<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace(" active","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+=" active":document.getElementById("t"+t).className+=" active"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://'+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://'+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
views/translations/agentinvite-min_fr.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface à largeur fixe"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Basculer mode nuit"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Installation de l'agent<span id=groupname></span></h1><p>You have been invited to install a software that will allow a remote operator to fully access your computer remotely including the desktop and files. Only follow the instructions below if this invitation was expected and you know who will be accessing your computer. Selecting your operation system and follow the instructions below.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64bit</button> <button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32bit</button> <button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button> <button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>MacOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 64bit</h3><p><a id=win64url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 32bit</h3><p><a id=win32url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>To install, cut and paste the following command in a root terminal.<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>To uninstall, cut and paste the following command as root.<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple™ MacOS</h3><p><a id=macosurl>Download the installer here</a>, right click on it or press "control" and click on the file. Then select "Open" and follow the instructions.<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace(" active","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+=" active":document.getElementById("t"+t).className+=" active"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://'+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://'+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface à largeur fixe"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Basculer mode nuit"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Installation de l'agent<span id=groupname></span></h1><p>You have been invited to install a software that will allow a remote operator to fully access your computer remotely including the desktop and files. Only follow the instructions below if this invitation was expected and you know who will be accessing your computer. Selecting your operation system and follow the instructions below.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64bit</button> <button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32bit</button> <button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button> <button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>MacOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 64bit</h3><p><a id=win64url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 32bit</h3><p><a id=win32url>Download the software here</a>, run it and press "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>To install, cut and paste the following command in a root terminal.<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>To uninstall, cut and paste the following command as root.<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copy to clipboard"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple™ MacOS</h3><p><a id=macosurl>Download the installer here</a>, right click on it or press "control" and click on the file. Then select "Open" and follow the instructions.<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace(" active","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+=" active":document.getElementById("t"+t).className+=" active"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://'+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://'+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
views/translations/agentinvite-min_ja.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title=ユーザーインターフェイスの選択 onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title=左バーインターフェイス><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title=トップバーインターフェース><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title=固定幅インターフェイス><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title=ナイトモードを切り替える><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>リモートエージェントのインストール<span id=groupname></span></h1><p>You have been invited to install a software that will allow a remote operator to fully access your computer remotely including the desktop and files. Only follow the instructions below if this invitation was expected and you know who will be accessing your computer. Selecting your operation system and follow the instructions below.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64ビット</button> <button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32ビット</button> <button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button> <button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>マックOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™Windows 64ビット</h3><p><a id=win64url>ここからソフトウェアをダウンロードしてください</a>、実行して「インストール」または「接続」を押します。<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™Windows 32ビット</h3><p><a id=win32url>ここからソフトウェアをダウンロードしてください</a>、実行して「インストール」または「接続」を押します。<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>インストールするには、ルートターミナルで次のコマンドをカットアンドペーストします。<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value=クリップボードにコピー style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>アンインストールするには、次のコマンドをルートとしてカットアンドペーストします。<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value=クリップボードにコピー style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple™MacOS</h3><p><a id=macosurl>ここからインストーラーをダウンロードしてください</a>、それを右クリックするか、「control」を押してファイルをクリックします。次に、「開く」を選択し、指示に従います。<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace(" active","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+=" active":document.getElementById("t"+t).className+=" active"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://'+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://'+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title=ユーザーインターフェイスの選択 onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title=左バーインターフェイス><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title=トップバーインターフェース><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title=固定幅インターフェイス><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title=ナイトモードを切り替える><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>リモートエージェントのインストール<span id=groupname></span></h1><p>You have been invited to install a software that will allow a remote operator to fully access your computer remotely including the desktop and files. Only follow the instructions below if this invitation was expected and you know who will be accessing your computer. Selecting your operation system and follow the instructions below.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64ビット</button> <button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32ビット</button> <button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button> <button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>マックOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™Windows 64ビット</h3><p><a id=win64url>ここからソフトウェアをダウンロードしてください</a>、実行して「インストール」または「接続」を押します。<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™Windows 32ビット</h3><p><a id=win32url>ここからソフトウェアをダウンロードしてください</a>、実行して「インストール」または「接続」を押します。<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>インストールするには、ルートターミナルで次のコマンドをカットアンドペーストします。<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value=クリップボードにコピー style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>アンインストールするには、次のコマンドをルートとしてカットアンドペーストします。<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value=クリップボードにコピー style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple™MacOS</h3><p><a id=macosurl>ここからインストーラーをダウンロードしてください</a>、それを右クリックするか、「control」を押してファイルをクリックします。次に、「開く」を選択し、指示に従います。<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace(" active","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+=" active":document.getElementById("t"+t).className+=" active"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://'+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://'+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
views/translations/agentinvite-min_nl.handlebars new
+1
@@ -0,0 +1 @@
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Selectie gebruikersinterface"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Linkerbalk interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Boven werkbalk interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface met vaste breedte"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Wissel nachtmodus"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Remote Agent installatie<span id=groupname></span></h1><p>U bent uitgenodigd om software te installeren waarmee een externe operator op afstand volledige toegang heeft tot uw computer, inclusief het bureaublad en de bestanden. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Volg de onderstaande instructies alleen als deze uitnodiging werd verwacht en u weet wie toegang krijgt tot uw computer. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Selecteer uw besturingssysteem en volg de onderstaande instructies.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64bit</button> <button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32bit</button> <button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button> <button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>MacOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 64bit</h3><p><a id=win64url>Download de software hier</a>, open het en klik op "installeren" of "verbinden".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 32bit</h3><p><a id=win32url>Download de software hier</a>, open het en klik op "installeren" of "verbinden".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>Om de volgende opdracht te installeren, knippen en plakken in een root-terminal.<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Kopieer naar het klembord"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>Om de installatie ongedaan te maken, knip en plak je de volgende opdracht als root.<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Kopieer naar het klembord"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple™ MacOS</h3><p><a id=macosurl>Download het installatieprogramma hier</a>, klik er met de rechtermuisknop op of druk op "beheer" en klik op het bestand. Daarna op "open" en volg de instructies.<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace(" active","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+=" active":document.getElementById("t"+t).className+=" active"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://'+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://'+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
views/translations/agentinvite-min_pt.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Seleção da interface do usuário"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Interface da barra esquerda"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Interface da barra superior"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface de largura fixa"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Alternar modo noturno"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Instalação remota do agente<span id=groupname></span></h1><p>Você foi convidado a instalar um software que permitirá que um operador remoto acesse totalmente seu computador remotamente, incluindo a área de trabalho e os arquivos. Siga apenas as instruções abaixo se esse convite for esperado e você sabe quem acessará seu computador. Selecionando seu sistema operacional e siga as instruções abaixo.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64 Bits</button> <button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32 Bits</button> <button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button> <button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>MacOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 64 bits</h3><p><a id=win64url>Faça o download do software aqui</a>, execute-o e pressione "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 32 bits</h3><p><a id=win32url>Faça o download do software aqui</a>, execute-o e pressione "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>Para instalar, recorte e cole o seguinte comando em um terminal raiz.<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copiar para área de transferência"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>Para desinstalar, recorte e cole o seguinte comando como raiz.<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copiar para área de transferência"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple™ MacOS</h3><p><a id=macosurl>Faça o download do instalador aqui</a>, clique com o botão direito do mouse ou pressione "control".Em seguida, selecione "Open".<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace(" active","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+=" active":document.getElementById("t"+t).className+=" active"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://'+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://'+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Agent Installation</title><style>.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:0;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#8f8}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}</style><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0">{{{logoutControl}}}</div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Seleção da interface do usuário"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Interface da barra esquerda"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Interface da barra superior"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface de largura fixa"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Alternar modo noturno"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Instalação remota do agente<span id=groupname></span></h1><p>Você foi convidado a instalar um software que permitirá que um operador remoto acesse totalmente seu computador remotamente, incluindo a área de trabalho e os arquivos. Siga apenas as instruções abaixo se esse convite for esperado e você sabe quem acessará seu computador. Selecionando seu sistema operacional e siga as instruções abaixo.<div><div class=tab><button id=twintab64 class=tablinks onclick='openTab(event,"wintab64")'>Windows 64 Bits</button> <button id=twintab32 class=tablinks onclick='openTab(event,"wintab32")'>Windows 32 Bits</button> <button id=tlinuxtab class=tablinks onclick='openTab(event,"linuxtab")'>Linux</button> <button id=tmacostab class=tablinks onclick='openTab(event,"macostab")'>MacOS</button></div><div id=wintab64 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 64 bits</h3><p><a id=win64url>Faça o download do software aqui</a>, execute-o e pressione "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=wintab32 class=tabcontent style=background-color:#fff;color:#000><h3>Microsoft™ Windows 32 bits</h3><p><a id=win32url>Faça o download do software aqui</a>, execute-o e pressione "Install" or "Connect".<div style=text-align:center><img class=winagent-img src=images/winagent.png></div></div><div id=linuxtab class=tabcontent style=background-color:#fff;color:#000><h3>Linux</h3><p>Para instalar, recorte e cole o seguinte comando em um terminal raiz.<div id=linuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copiar para área de transferência"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxInstall()><p>Para desinstalar, recorte e cole o seguinte comando como raiz.<div id=unlinuxinstall style="font-family:courier,'courier new',monospace;margin-left:30px"></div><input type=button value="Copiar para área de transferência"style=margin-left:30px;margin-top:4px onclick=copyToClipLinuxUnInstall()><br><br></div><div id=macostab class=tabcontent style=background-color:#fff;color:#000><h3>Apple™ MacOS</h3><p><a id=macosurl>Faça o download do instalador aqui</a>, clique com o botão direito do mouse ou pressione "control".Em seguida, selecione "Open".<div style=text-align:center><img src=images/macosagent.png></div></div></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right></table></div></div><script>"use strict";var linuxInstall,linuxUnInstall,uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",meshid="{{{meshid}}}",serverPort="{{{serverport}}}",serverHttps="{{{serverhttps}}}",serverNoProxy="{{{servernoproxy}}}",installFlags="{{{installflags}}}",groupName=decodeURIComponent("{{{meshname}}}");function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function openTab(e,t){var n,s,l;for(s=document.getElementsByClassName("tabcontent"),n=0;n<s.length;n++)s[n].style.display="none";for(l=document.getElementsByClassName("tablinks"),n=0;n<l.length;n++)l[n].className=l[n].className.replace(" active","");document.getElementById(t).style.display="block",null!=e?e.currentTarget.className+=" active":document.getElementById("t"+t).className+=" active"}function setup(){var e=window.location.hostname,t=domainUrl.substring(0,domainUrl.length-1),n="meshagents?id=4&meshid="+meshid;if(0!=installFlags&&(n+="&installflags="+installFlags),Q("win64url").href=n,n="meshagents?id=3&meshid="+meshid,0!=installFlags&&(n+="&installflags="+installFlags),Q("win32url").href=n,n="meshosxagent?id=16&meshid="+meshid,Q("macosurl").href=n,1==serverHttps){var s=443==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://'+e+s+t+" '"+meshid+"'\r\n","(wget https://"+e+s+domainUrl+'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://"+e+s+t+" '"+meshid+"'\r\n","wget https://"+e+s+domainUrl+"meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}else{s=80==serverPort?"":":"+serverPort;linuxUnInstall=0==serverNoProxy?(linuxInstall="(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://'+e+s+t+" '"+meshid+"'\r\n","(wget http://"+e+s+domainUrl+'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n'):(linuxInstall="wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://"+e+s+t+" '"+meshid+"'\r\n","wget http://"+e+s+domainUrl+"meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n")}QH("linuxinstall",linuxInstall),QH("unlinuxinstall",linuxUnInstall),0<=navigator.userAgent.indexOf("Win64")?openTab(null,"wintab64"):0<=navigator.userAgent.indexOf("Windows")?openTab(null,"wintab32"):0<=navigator.userAgent.indexOf("Linux")?openTab(null,"linuxtab"):0<=navigator.userAgent.indexOf("Macintosh")?openTab(null,"macostab"):openTab(null,"wintab64")}function copyToClipLinuxInstall(){copyTextToClip(linuxInstall)}function copyToClipLinuxUnInstall(){copyTextToClip(linuxUnInstall)}function copyTextToClip(e){var t=document.createElement("DIV");t.textContent=e,document.body.appendChild(t),function(e){if(document.selection)(t=document.body.createTextRange()).moveToElementText(e),t.select();else if(window.getSelection){var t;(t=document.createRange()).selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}}(t),document.execCommand("copy"),t.remove()}""!=groupName&&QH("groupname"," for "+groupName),userInterfaceSelectMenu(),setup()</script>
\ No newline at end of file
views/translations/agentinvite_cs.handlebars
+1 -1
@@ -46,7 +46,7 @@
46 <!-- Begin Masthead -->
47 <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
48 <div style="float:left">{{{titlehtml}}}</div>
49 - <div style="float:left; height: 66px; color:#c8c8c8; padding-left:20px; padding-top:8px">
49 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:14px; padding-top:7px">
50 <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
51 </div>
52 <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">
views/translations/agentinvite_fr.handlebars
+1 -1
@@ -46,7 +46,7 @@
46 <!-- Begin Masthead -->
47 <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
48 <div style="float:left">{{{titlehtml}}}</div>
49 - <div style="float:left; height: 66px; color:#c8c8c8; padding-left:20px; padding-top:8px">
49 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:14px; padding-top:7px">
50 <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
51 </div>
52 <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">
views/translations/agentinvite_ja.handlebars
+1 -1
@@ -46,7 +46,7 @@
46 <!-- Begin Masthead -->
47 <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
48 <div style="float:left">{{{titlehtml}}}</div>
49 - <div style="float:left; height: 66px; color:#c8c8c8; padding-left:20px; padding-top:8px">
49 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:14px; padding-top:7px">
50 <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
51 </div>
52 <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">
views/translations/agentinvite_nl.handlebars new
+295
@@ -0,0 +1,295 @@
1 +<!DOCTYPE html><html><head>
2 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 + <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
4 + <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 + <meta name="apple-mobile-web-app-capable" content="yes">
6 + <meta name="format-detection" content="telephone=no">
7 + <link type="text/css" href="styles/style.css" media="screen" rel="stylesheet" title="CSS">
8 + <script type="text/javascript" src="scripts/common-0.0.1.js"></script>
9 + <title>{{{title}}} - Agent Installation</title>
10 + <style>
11 + .tab {
12 + overflow: hidden;
13 + border: 1px solid #ccc;
14 + background-color: #f1f1f1;
15 + }
16 +
17 + .tab button {
18 + background-color: inherit;
19 + float: left;
20 + border: none;
21 + outline: none;
22 + cursor: pointer;
23 + padding: 14px 16px;
24 + transition: 0.3s;
25 + }
26 +
27 + .tab button:hover {
28 + background-color: #ddd;
29 + }
30 +
31 + .tab button.active {
32 + background-color: #8f8;
33 + }
34 +
35 + .tabcontent {
36 + display: none;
37 + padding: 6px 12px;
38 + border: 1px solid #ccc;
39 + border-top: none;
40 + }
41 +
42 + </style>
43 +</head>
44 +<body id="body" onload="if (typeof(startup) !== 'undefined') startup();" style="display:none;overflow:hidden">
45 + <div id="container">
46 + <!-- Begin Masthead -->
47 + <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
48 + <div style="float:left">{{{titlehtml}}}</div>
49 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:14px; padding-top:7px">
50 + <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
51 + </div>
52 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">
53 + <strong><font style="font-size:14px; font-family: Arial, Helvetica, sans-serif;">{{{title2}}}</font></strong>
54 + </div>
55 + <p id="logoutControl" style="color:white;font-size:11px;margin: 10px 10px 0;">{{{logoutControl}}}</p>
56 + </div>
57 + <div id="page_leftbar">
58 + <div style="height:16px"></div>
59 + </div>
60 + <div id="topbar" class="noselect style3" style="height:24px;position:relative">
61 + <div id="uiMenuButton" title="Selectie gebruikersinterface" onclick="showUserInterfaceSelectMenu()">
62 + ♦
63 + <div id="uiMenu" style="display:none">
64 + <div id="uiViewButton1" class="uiSelector" onclick="userInterfaceSelectMenu(1)" title="Linkerbalk interface"><div class="uiSelector1"></div></div>
65 + <div id="uiViewButton2" class="uiSelector" onclick="userInterfaceSelectMenu(2)" title="Boven werkbalk interface"><div class="uiSelector2"></div></div>
66 + <div id="uiViewButton3" class="uiSelector" onclick="userInterfaceSelectMenu(3)" title="Interface met vaste breedte"><div class="uiSelector3"></div></div>
67 + <div id="uiViewButton4" class="uiSelector" onclick="toggleNightMode()" title="Wissel nachtmodus"><div class="uiSelector4"></div></div>
68 + </div>
69 + </div>
70 + </div>
71 + <div id="column_l" style="max-height:calc(100vh - 135px);overflow-y:auto">
72 + <h1>Remote Agent installatie<span id="groupname"></span></h1>
73 + <p>
74 + U bent uitgenodigd om software te installeren waarmee een externe operator op afstand volledige toegang heeft tot uw computer, inclusief het bureaublad en de bestanden.
75 +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Volg de onderstaande instructies alleen als deze uitnodiging werd verwacht en u weet wie toegang krijgt tot uw computer.
76 +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Selecteer uw besturingssysteem en volg de onderstaande instructies.
77 + </p>
78 + <div>
79 + <div class="tab">
80 + <button id="twintab64" class="tablinks" onclick="openTab(event, 'wintab64')">Windows 64bit</button>
81 + <button id="twintab32" class="tablinks" onclick="openTab(event, 'wintab32')">Windows 32bit</button>
82 + <button id="tlinuxtab" class="tablinks" onclick="openTab(event, 'linuxtab')">Linux</button>
83 + <button id="tmacostab" class="tablinks" onclick="openTab(event, 'macostab')">MacOS</button>
84 + </div>
85 +
86 + <div id="wintab64" class="tabcontent" style="background-color:white;color:black">
87 + <h3>Microsoft™ Windows 64bit</h3>
88 + <p><a id="win64url">Download de software hier</a>, open het en klik op "installeren" of "verbinden".</p>
89 + <div style="text-align:center">
90 + <img class="winagent-img" src="images/winagent.png">
91 + </div>
92 + </div>
93 +
94 + <div id="wintab32" class="tabcontent" style="background-color:white;color:black">
95 + <h3>Microsoft™ Windows 32bit</h3>
96 + <p><a id="win32url">Download de software hier</a>, open het en klik op "installeren" of "verbinden".</p>
97 + <div style="text-align:center">
98 + <img class="winagent-img" src="images/winagent.png">
99 + </div>
100 + </div>
101 +
102 + <div id="linuxtab" class="tabcontent" style="background-color:white;color:black">
103 + <h3>Linux</h3>
104 + <p>Om de volgende opdracht te installeren, knippen en plakken in een root-terminal.</p>
105 + <div id="linuxinstall" style="font-family:courier,'courier new',monospace;margin-left:30px"></div>
106 + <input type="button" value="Kopieer naar het klembord" style="margin-left:30px;margin-top:4px" onclick="copyToClipLinuxInstall()">
107 + <p>Om de installatie ongedaan te maken, knip en plak je de volgende opdracht als root.</p>
108 + <div id="unlinuxinstall" style="font-family:courier,'courier new',monospace;margin-left:30px"></div>
109 + <input type="button" value="Kopieer naar het klembord" style="margin-left:30px;margin-top:4px" onclick="copyToClipLinuxUnInstall()">
110 + <br><br>
111 + </div>
112 +
113 + <div id="macostab" class="tabcontent" style="background-color:white;color:black">
114 + <h3>Apple™ MacOS</h3>
115 + <p><a id="macosurl">Download het installatieprogramma hier</a>, klik er met de rechtermuisknop op of druk op "beheer" en klik op het bestand. Daarna op "open" en volg de instructies.</p>
116 + <div style="text-align:center">
117 + <img src="images/macosagent.png">
118 + </div>
119 + </div>
120 + </div>
121 + </div>
122 + <div id="footer">
123 + <table cellpadding="0" cellspacing="10" style="width: 100%">
124 + <tbody><tr>
125 + <td style="text-align:left"></td>
126 + <td style="text-align:right"></td>
127 + </tr>
128 + </tbody></table>
129 + </div>
130 + </div>
131 + <script>
132 + 'use strict';
133 + var uiMode = parseInt(getstore('uiMode', 1));
134 + var webPageStackMenu = false;
135 + var webPageFullScreen = true;
136 + var nightMode = (getstore('_nightMode', '0') == '1');
137 + var domain = '{{{domain}}}';
138 + var domainUrl = '{{{domainurl}}}';
139 + var meshid = '{{{meshid}}}';
140 + var serverPort = '{{{serverport}}}';
141 + var serverHttps = '{{{serverhttps}}}';
142 + var serverNoProxy = '{{{servernoproxy}}}';
143 + var installFlags = '{{{installflags}}}';
144 + var groupName = decodeURIComponent('{{{meshname}}}');
145 + if (groupName != '') { QH('groupname', ' for ' + groupName); }
146 + userInterfaceSelectMenu();
147 + setup();
148 +
149 + // Toggle user interface menu
150 + function showUserInterfaceSelectMenu() {
151 + Q('uiViewButton1').classList.remove('uiSelectorSel');
152 + Q('uiViewButton2').classList.remove('uiSelectorSel');
153 + Q('uiViewButton3').classList.remove('uiSelectorSel');
154 + Q('uiViewButton4').classList.remove('uiSelectorSel');
155 + try { Q('uiViewButton' + uiMode).classList.add('uiSelectorSel'); } catch (ex) { }
156 + QV('uiMenu', (QS('uiMenu').display == 'none'));
157 + if (nightMode) { Q('uiViewButton4').classList.add('uiSelectorSel'); }
158 + }
159 +
160 + function userInterfaceSelectMenu(s) {
161 + if (s) { uiMode = s; putstore('uiMode', uiMode); }
162 + webPageFullScreen = (uiMode < 3);
163 + webPageStackMenu = true;//(uiMode > 1);
164 + toggleFullScreen(0);
165 + toggleStackMenu(0);
166 + QC('column_l').add('room4submenu');
167 + }
168 +
169 + function toggleNightMode() {
170 + nightMode = !nightMode;
171 + if (nightMode) { QC('body').add('night'); } else { QC('body').remove('night'); }
172 + putstore('_nightMode', nightMode ? '1' : '0');
173 + }
174 +
175 + // Toggle the web page to full screen
176 + function toggleFullScreen(toggle) {
177 + if (toggle === 1) { webPageFullScreen = !webPageFullScreen; putstore('webPageFullScreen', webPageFullScreen); }
178 + var hide = 0;
179 + //if (args.hide) { hide = parseInt(args.hide); }
180 + if (webPageFullScreen == false) {
181 + QC('body').remove('menu_stack');
182 + QC('body').remove('fullscreen');
183 + QC('body').remove('arg_hide');
184 + //if (xxcurrentView >= 10) QC('column_l').add('room4submenu');
185 + //QV('UserDummyMenuSpan', false);
186 + //QV('page_leftbar', false);
187 + } else {
188 + QC('body').add('fullscreen');
189 + if (hide & 16) QC('body').add('arg_hide'); // This is replacement for QV('page_leftbar', !(hide & 16));
190 + //QV('UserDummyMenuSpan', (xxcurrentView < 10) && webPageFullScreen);
191 + //QV('page_leftbar', true);
192 + }
193 + QV('body', true);
194 + }
195 +
196 + // If FullScreen, toggle menu to be horisontal or vertical
197 + function toggleStackMenu(toggle) {
198 + if (webPageFullScreen == true) {
199 + if (toggle === 1) {
200 + webPageStackMenu = !webPageStackMenu;
201 + putstore('webPageStackMenu', webPageStackMenu);
202 + }
203 + if (webPageStackMenu == false) {
204 + QC('body').remove('menu_stack');
205 + } else {
206 + QC('body').add('menu_stack');
207 + //if (xxcurrentView >= 10) QC('column_l').remove('room4submenu');
208 + }
209 + }
210 + }
211 +
212 + function putstore(name, val) { try { if (typeof (localStorage) === 'undefined') return; localStorage.setItem(name, val); } catch (e) { } }
213 + function getstore(name, val) { try { if (typeof (localStorage) === 'undefined') return val; var v = localStorage.getItem(name); if ((v == null) || (v == null)) return val; return v; } catch (e) { return val; } }
214 +
215 + function openTab(evt, tabname) {
216 + // Declare all variables
217 + var i, tabcontent, tablinks;
218 +
219 + // Get all elements with class="tabcontent" and hide them
220 + tabcontent = document.getElementsByClassName('tabcontent');
221 + for (i = 0; i < tabcontent.length; i++) {
222 + tabcontent[i].style.display = 'none';
223 + }
224 +
225 + // Get all elements with class="tablinks" and remove the class "active"
226 + tablinks = document.getElementsByClassName('tablinks');
227 + for (i = 0; i < tablinks.length; i++) {
228 + tablinks[i].className = tablinks[i].className.replace(' active', '');
229 + }
230 +
231 + // Show the current tab, and add an "active" class to the button that opened the tab
232 + document.getElementById(tabname).style.display = 'block';
233 + if (evt != null) { evt.currentTarget.className += ' active'; } else { document.getElementById('t' + tabname).className += ' active'; }
234 + }
235 +
236 + var linuxInstall, linuxUnInstall;
237 + function setup() {
238 + var servername = window.location.hostname;
239 + var domainUrlNoSlash = domainUrl.substring(0, domainUrl.length - 1);
240 +
241 + // Windows 64bit Setup
242 + var url = 'meshagents?id=4&meshid=' + meshid;
243 + if (installFlags != 0) { url += ('&installflags=' + installFlags); }
244 + Q('win64url').href = url;
245 +
246 + // Windows 32bit Setup
247 + url = 'meshagents?id=3&meshid=' + meshid;
248 + if (installFlags != 0) { url += ('&installflags=' + installFlags); }
249 + Q('win32url').href = url;
250 +
251 + // MacOS Setup
252 + url = 'meshosxagent?id=16&meshid=' + meshid;
253 + Q('macosurl').href = url;
254 +
255 + // Linux Setup
256 + if (serverHttps == 1) {
257 + var portStr = (serverPort == 443) ? '' : (":" + serverPort);
258 + if (serverNoProxy == 0) {
259 + linuxInstall = '(wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
260 + linuxUnInstall = '(wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
261 + } else {
262 + // Server asked that agent be installed to preferably not use a HTTP proxy.
263 + linuxInstall = 'wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
264 + linuxUnInstall = 'wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
265 + }
266 + } else {
267 + var portStr = (serverPort == 80) ? '' : (':' + serverPort);
268 + if (serverNoProxy == 0) {
269 + linuxInstall = '(wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
270 + linuxUnInstall = '(wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 -O ./meshinstall.sh || wget http://" + servername + portStr + domainUrl + "meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
271 + } else {
272 + // Server asked that agent be installed to preferably not use a HTTP proxy.
273 + linuxInstall = 'wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid + '\'\r\n';
274 + linuxUnInstall = 'wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
275 + }
276 + }
277 + QH('linuxinstall', linuxInstall);
278 + QH('unlinuxinstall', linuxUnInstall);
279 +
280 + // Attempt to detect the most likely operating system for this browser
281 + if (navigator.userAgent.indexOf('Win64') >= 0) { openTab(null, 'wintab64'); }
282 + else if (navigator.userAgent.indexOf('Windows') >= 0) { openTab(null, 'wintab32'); }
283 + else if (navigator.userAgent.indexOf('Linux') >= 0) { openTab(null, 'linuxtab'); }
284 + else if (navigator.userAgent.indexOf('Macintosh') >= 0) { openTab(null, 'macostab'); }
285 + else { openTab(null, 'wintab64'); }
286 + }
287 +
288 + function copyToClipLinuxInstall() { copyTextToClip(linuxInstall); }
289 + function copyToClipLinuxUnInstall() { copyTextToClip(linuxUnInstall); }
290 + function copyTextToClip(txt) { function selectElementText(e) { if (document.selection) { var range = document.body.createTextRange(); range.moveToElementText(e); range.select(); } else if (window.getSelection) { var range = document.createRange(); range.selectNode(e); window.getSelection().removeAllRanges(); window.getSelection().addRange(range); } } var e = document.createElement('DIV'); e.textContent = txt; document.body.appendChild(e); selectElementText(e); document.execCommand('copy'); e.remove(); }
291 +
292 + </script>
293 +
294 +
295 +</body></html>
\ No newline at end of file
views/translations/agentinvite_pt.handlebars
+1 -1
@@ -46,7 +46,7 @@
46 <!-- Begin Masthead -->
47 <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
48 <div style="float:left">{{{titlehtml}}}</div>
49 - <div style="float:left; height: 66px; color:#c8c8c8; padding-left:20px; padding-top:8px">
49 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:14px; padding-top:7px">
50 <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
51 </div>
52 <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">
views/translations/default-min_cs.handlebars
+2 -2
@@ -6370,10 +6370,10 @@
6370 if (currentMesh.amt.type == 1) { intelAmtPolicy = 'Deactivate Client Control Mode (CCM)'; }
6371 else if (currentMesh.amt.type == 2) {
6372 intelAmtPolicy = "Jednoduchý Client Control Mode (CCM)";
6373 - if (currentMesh.amt.cirasetup == 2) { intelAmtPolicy += "+ CIRA"; }
6373 + if (currentMesh.amt.cirasetup == 2) { intelAmtPolicy += " + CIRA"; }
6374 } else if (currentMesh.amt.type == 3) {
6375 intelAmtPolicy = "Jednoduchý Admin Control Mode (ACM)";
6376 - if (currentMesh.amt.cirasetup == 2) { intelAmtPolicy += "+ CIRA"; }
6376 + if (currentMesh.amt.cirasetup == 2) { intelAmtPolicy += " + CIRA"; }
6377 }
6378 }
6379 x += addHtmlValue("Intel&reg; AMT", addLinkConditional(intelAmtPolicy, 'p20editMeshAmt()', meshrights & 1));
views/translations/default-min_fr.handlebars
+1 -1
@@ -453,7 +453,7 @@
453 else if ((passRequirements != null) && (typeof passRequirements.reset == 'number')) {
454 var seconds = (userinfo.passchange) + (passRequirements.reset * 86400) - Math.floor(Date.now() / 1000);
455 if (seconds < 0) { QH('p2nextPasswordUpdateTime', " - Réinitialiser à la prochaine connexion."); }
456 - else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format("- Réinitialisation en {0} minute {1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
456 + else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format(" - Réinitialisation en {0} minute {1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
457 else if (seconds < 86400) { QH('p2nextPasswordUpdateTime', format(" - Réinitialisation dans {0} heure {1}.", Math.floor(seconds / 3600), addLetterS(Math.floor(seconds / 3600)))); }
458 else { QH('p2nextPasswordUpdateTime', format(" - Réinitialiser dans le {0} jour {1}."), Math.floor(seconds / 86400), addLetterS(Math.floor(seconds / 86400))); }
459 }
views/translations/default-min_ja.handlebars
+12 -12
@@ -2055,7 +2055,7 @@
2055 function addDeviceToMesh(meshid) {
2056 if (xxdialogMode) return false;
2057 var mesh = meshes[meshid];
2058 - var x = format("新しいIntel&reg;を追加しますAMTデバイスからデバイスグループ\"{0} \"へ。", EscapeHtml(mesh.name)) + '<br /><br />';
2058 + var x = format("新しいIntel&reg;を追加しますAMTデバイスからデバイスグループ\"{0}\"へ。", EscapeHtml(mesh.name)) + '<br /><br />';
2059 x += addHtmlValue("装置名", '<input id=dp1devicename style=width:230px maxlength=32 autocomplete=off onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');
2060 x += addHtmlValue("ホスト名", '<input id=dp1hostname style=width:230px maxlength=32 autocomplete=off placeholder=\"' + "デバイス名と同じ" + '\" onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');
2061 x += addHtmlValue("ユーザー名", '<input id=dp1username style=width:230px maxlength=32 autocomplete=off placeholder=\"' + "管理者" + '\" onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');
@@ -2080,7 +2080,7 @@
2080 var portStr = (serverinfo.port == 80) ? '' : (':' + serverinfo.port);
2081 url = 'ws://' + servername + portStr + domainUrl;
2082 }
2083 - var x = format("MeshCMDツールをダウンロードして次のように実行することにより、グループ\"{0} \"にIntel AMTクライアントコントロールモード(CCM)アクティベーションを実行します。", EscapeHtml(mesh.name)) + '<br /><br />';
2083 + var x = format("MeshCMDツールをダウンロードして次のように実行することにより、グループ\"{0}\"にIntel AMTクライアントコントロールモード(CCM)アクティベーションを実行します。", EscapeHtml(mesh.name)) + '<br /><br />';
2084 x += '<textarea readonly=readonly style=width:100%;resize:none;height:100px;overflow:auto;font-size:12px readonly>meshcmd amtccm --url ' + url + 'amtactivate?id=' + meshid.split('/')[2] + ' --serverhttpshash ' + serverinfo.tlshash + '</textarea>';
2085 setDialogMode(2, "Intel&reg; AMTアクティベーション", 9, null, x);
2086 Q('idx_dlgOkButton').focus();
@@ -2100,7 +2100,7 @@
2100 var portStr = (serverinfo.port == 80) ? '' : (':' + serverinfo.port);
2101 url = 'ws://' + servername + portStr + domainUrl;
2102 }
2103 - var x = format("MeshCMDツールをダウンロードして次のように実行することにより、グループ\"{0} \"にIntel AMT管理制御モード(ACM)アクティベーションを実行します。", EscapeHtml(mesh.name)) + '<br /><br />';
2103 + var x = format("MeshCMDツールをダウンロードして次のように実行することにより、グループ\"{0}\"にIntel AMT管理制御モード(ACM)アクティベーションを実行します。", EscapeHtml(mesh.name)) + '<br /><br />';
2104 x += '<textarea readonly=readonly style=width:100%;resize:none;height:100px;overflow:auto;font-size:12px readonly>meshcmd amtacm --url ' + url + 'amtactivate?id=' + meshid.split('/')[2] + ' --serverhttpshash ' + serverinfo.tlshash + '</textarea>';
2105 if (serverinfo.amtAcmFqdn != null) {
2106 x += ('<div style=margin-top:8px>' + "Intel AMTは、MEBxで信頼できるFQDNを使用して設定するか、ネットワーク上に有線LANが必要です。" + ' <b>' + serverinfo.amtAcmFqdn.join(', ') + '</b></div>');
@@ -2169,14 +2169,14 @@
2169 x += '<hr>';
2170
2171 // Setup CIRA using a MeshCommander script (Pretty Simple)
2172 - x += '<div id=dlgAddCira0>' + format("新しいIntel&reg;を追加するにはCIRAを使用してAMTデバイスからデバイスグループ\"{0} \"に移動し、次のスクリプトファイルをダウンロードして、<a href='http://meshcommander.com' rel='noreferrer noopener' target='_blank'> MeshCommander </を使用しますa>スクリプトを実行してコンピューターを構成します。", EscapeHtml(mesh.name)) + '<br /><br />';
2172 + x += '<div id=dlgAddCira0>' + format("新しいIntel&reg;を追加するにはCIRAを使用してAMTデバイスからデバイスグループ\"{0}\"に移動し、次のスクリプトファイルをダウンロードして、<a href='http://meshcommander.com' rel='noreferrer noopener' target='_blank'> MeshCommander </を使用しますa>スクリプトを実行してコンピューターを構成します。", EscapeHtml(mesh.name)) + '<br /><br />';
2173 //x += addHtmlValue('Setup CIRA', '<a href="mescript.ashx?type=1&meshid=' + meshidx.substring(0, 16) + '" download>cira_setup.mescript</a>');
2174 x += addHtmlValue("CIRAのセットアップ", '<a href="mescript.ashx?type=1&meshid=' + meshid + '" download>cira_setup.mescript</a>');
2175 x += addHtmlValue("CIRAのクリーンアップ", '<a href="mescript.ashx?type=2" download>cira_clean.mescript</a>');
2176 x += '</div>';
2177
2178 // Setup CIRA with user/pass authentication (Somewhat difficult)
2179 - x += '<div id=dlgAddCira1 style=display:none>' + format("新しいIntel&reg;を追加するにはAMTデバイスからCIRAを使用したデバイスグループ\"{0} \"に、Intel AMT内で信頼されたルートとして次の証明書をロード", EscapeHtml(mesh.name));
2179 + x += '<div id=dlgAddCira1 style=display:none>' + format("新しいIntel&reg;を追加するにはAMTデバイスからCIRAを使用したデバイスグループ\"{0}\"に、Intel AMT内で信頼されたルートとして次の証明書をロード", EscapeHtml(mesh.name));
2180 if (serverinfo.mpspass) { x += (" このユーザー名とパスワードを使用してサーバーに対して認証します。" + '<br /><br />'); } else { x += (" このユーザー名とパスワードを使用してサーバーに対して認証します。" + '<br /><br />'); }
2181 x += addHtmlValue("ルート証明書", '<a href=\"' + "MeshServerRootCert.cer" + '\" download>' + "ルート証明書ファイル" + '</a>');
2182 x += addHtmlValue("ユーザー名", '<input style=width:230px readonly value="' + meshidx.substring(0, 16) + '" />');
@@ -2186,7 +2186,7 @@
2186
2187 // Setup CIRA with certificate authentication (Really difficult, only if TLS offload is not used)
2188 if ((features & 16) == 0) {
2189 - x += '<div id=dlgAddCira2 style=display:none>' + format("新しいIntel&reg;を追加するにはCIRAを使用してデバイスグループ\"{0} \"へのAMTデバイス、Intel AMT内の信頼されたルートとして次の証明書を読み込み、次の共通名を持つクライアント証明書を使用して認証し、次のサーバーに接続します。", EscapeHtml(mesh.name)) + '<br /><br />';
2189 + x += '<div id=dlgAddCira2 style=display:none>' + format("新しいIntel&reg;を追加するにはCIRAを使用してデバイスグループ\"{0}\"へのAMTデバイス、Intel AMT内の信頼されたルートとして次の証明書を読み込み、次の共通名を持つクライアント証明書を使用して認証し、次のサーバーに接続します。", EscapeHtml(mesh.name)) + '<br /><br />';
2190 x += addHtmlValue("ルート証明書", '<a href="MeshServerRootCert.cer" download>' + "ルート証明書ファイル" + '</a>');
2191 x += addHtmlValue("組織", '<input style=width:230px readonly value="' + meshidx + '" />');
2192 if (serverinfo != null) { x += addHtmlValue("MPSサーバー", '<input style=width:230px readonly value="' + EscapeHtml(serverinfo.mpsname) + ':' + serverinfo.mpsport + '" />'); }
@@ -2218,7 +2218,7 @@
2218 var x = '', mesh = meshes[meshid];
2219 if (features & 64) {
2220 x += addHtmlValue("招待タイプ", '<select id=d2InviteType onchange=d2ChangedInviteType() style=width:236px><option value=0>Link invitation</option><option value=1>Email invitation</option></select>') + '<hr />';
2221 - x += '<div id=emailInviteDiv style=display:none>' + format("メッシュエージェントをインストールする人を招待します。 \"{0} \"デバイスグループのメッシュエージェントインストールへのリンクが記載されたメール。", EscapeHtml(mesh.name)) + '<br /><br />';
2221 + x += '<div id=emailInviteDiv style=display:none>' + format("メッシュエージェントをインストールする人を招待します。 \"{0}\"デバイスグループのメッシュエージェントインストールへのリンクが記載されたメール。", EscapeHtml(mesh.name)) + '<br /><br />';
2222 x += addHtmlValue("名前(オプション)", '<input id=agentInviteName value="" style=width:230px maxlength=64 />');
2223 x += addHtmlValue("Eメール", '<input id=agentInviteEmail style=width:230px placeholder=\"' + "example@email.com" + '\" onkeyup=validateAgentInvite()></input>');
2224 x += addHtmlValue("オペレーティング・システム", '<select id=agentInviteNameOs onchange=d2ChangedInviteType() style=width:236px><option value=4>' + "インストールリンクを送信" + '</option><option value=0 selected>' + "サポートされているもの" + '</option><option value=1>' + "Windowsのみ" + '</option><option value=3>' + "Apple MacOSのみ" + '</option><option value=2>' + "Linuxのみ" + '</option></select>');
@@ -2229,7 +2229,7 @@
2229 x += addHtmlValue("メッセージ" + '<br />' + "(オプション)", '<textarea id=agentInviteMessage value="" style=width:230px;height:100px;resize:none maxlength=1024 /></textarea>');
2230 x += '</div>';
2231 }
2232 - x += '<div id=urlInviteDiv>' + format("招待リンクを共有して、メッシュエージェントをインストールする人を招待します。このリンクは、ユーザーに\"{0} \"デバイスグループのインストール手順を示します。リンクは公開されており、このサーバーのアカウントは必要ありません。", EscapeHtml(mesh.name)) + '<br /><br />';
2232 + x += '<div id=urlInviteDiv>' + format("招待リンクを共有して、メッシュエージェントをインストールする人を招待します。このリンクは、ユーザーに\"{0}\"デバイスグループのインストール手順を示します。リンクは公開されており、このサーバーのアカウントは必要ありません。", EscapeHtml(mesh.name)) + '<br /><br />';
2233 x += addHtmlValue("リンクの有効期限", '<select id=d2inviteExpire style=width:236px onchange=d2RequestInvitationLink()><option value=1>' + "1時間" + '</option><option value=8>' + "8時間" + '</option><option value=24>' + "1日" + '</option><option value=168>' + "1週間" + '</option><option value=5040>' + "1ヶ月" + '</option><option value=0>' + "無制限" + '</option></select>');
2234 x += '<div id=agentInvitationLinkDiv style="text-align:center;font-size:large;margin:16px;display:none"><a href=# id=agentInvitationLink target="_blank" style=cursor:pointer></a> <img src=images/link4.png height=10 width=10 title=\"' + "リンクをクリップボードにコピー" + '\" style=cursor:pointer onclick=d2CopyInviteToClip()></div></div>';
2235 setDialogMode(2, "招待する", 3, performAgentInvite, x, meshid);
@@ -2281,7 +2281,7 @@
2281
2282 // Windows agent install
2283 //x += "<div id=agins_windows>To add a new computer to device group \"" + EscapeHtml(mesh.name) + "\", download the mesh agent and configuration file and install the agent on the computer to manage.<br /><br />";
2284 - x += '<div id=agins_windows>' + format("デバイスグループ\"{0} \"に新しいコンピューターを追加するには、メッシュエージェントをダウンロードし、管理するコンピューターにインストールします。このエージェントには、サーバーとデバイスグループの情報が埋め込まれています。", EscapeHtml(mesh.name)) + '<br /><br />';
2284 + x += '<div id=agins_windows>' + format("デバイスグループ\"{0}\"に新しいコンピューターを追加するには、メッシュエージェントをダウンロードし、管理するコンピューターにインストールします。このエージェントには、サーバーとデバイスグループの情報が埋め込まれています。", EscapeHtml(mesh.name)) + '<br /><br />';
2285 x += addHtmlValue("メッシュエージェント", '<a id=aginsw32lnk href="meshagents?id=3&meshid=' + meshid.split('/')[2] + '&installflags=0" download onclick="setDialogMode(0)" title=\"' + "MeshAgentの32ビットバージョン" + '\">' + "Windows(.exe)" + '</a> <img src=images/link4.png height=10 width=10 title="Copy Windows 32bit agent URL to clipboard" style=cursor:pointer onclick=copyAgentUrl("meshagents?id=3&meshid=' + meshid.split('/')[2] + '&installflags=",1)>');
2286 x += addHtmlValue("メッシュエージェント", '<a id=aginsw64lnk href="meshagents?id=4&meshid=' + meshid.split('/')[2] + '&installflags=0" download onclick="setDialogMode(0)" title=\"' + "MeshAgentの64ビットバージョン" + '\">' + "Windows x64(.exe)" + '</a> <img src=images/link4.png height=10 width=10 title="Copy Windows 64bit agent URL to clipboard" style=cursor:pointer onclick=copyAgentUrl("meshagents?id=4&meshid=' + meshid.split('/')[2] + '&installflags=",1)>');
2287 if (debugmode > 0) { x += addHtmlValue("設定ファイル", '<a id=aginswmshlnk href="meshsettings?id=' + meshid.split('/')[2] + '&installflags=0" rel="noreferrer noopener" target="_blank">' + format("{0}設定(.msh)", EscapeHtml(mesh.name)) + '</a>'); }
@@ -2290,10 +2290,10 @@
2290 // Linux agent install
2291 x += '<div id=agins_linux style=display:none>' + format("{0}にコンピューターを追加するには、次のコマンドを実行します。ルート資格情報が必要になります。", EscapeHtml(mesh.name)) + '<br />';
2292 x += '<textarea id=agins_linux_area rows=2 cols=20 readonly=readonly style=width:100%;resize:none;height:120px;overflow:scroll;font-size:12px readonly></textarea>';
2293 - x += '<div style=\'font-size:x-small\'>' + "* BSDの場合、最初に\"pkg install wget sudo bash \"を実行します。" + '</div></div>';
2293 + x += '<div style=\'font-size:x-small\'>' + "* BSDの場合、最初に\"pkg install wget sudo bash\"を実行します。" + '</div></div>';
2294
2295 // MacOS agent install
2296 - x += '<div id=agins_osx style=display:none>' + format("デバイスグループ\"{0} \"に新しいコンピューターを追加するには、メッシュエージェントをダウンロードし、管理するコンピューターにインストールします。このエージェントインストーラーには、サーバーとデバイスグループの情報が埋め込まれています。", EscapeHtml(mesh.name)) + '<br /><br />';
2296 + x += '<div id=agins_osx style=display:none>' + format("デバイスグループ\"{0}\"に新しいコンピューターを追加するには、メッシュエージェントをダウンロードし、管理するコンピューターにインストールします。このエージェントインストーラーには、サーバーとデバイスグループの情報が埋め込まれています。", EscapeHtml(mesh.name)) + '<br /><br />';
2297 x += addHtmlValue("メッシュエージェント", '<a href="meshosxagent?id=16&meshid=' + meshid.split('/')[2] + '" rel="noreferrer noopener" target="_blank" title="64bit version of MacOS Mesh Agent">MacOS Agent (64bit)</a> <img src=images/link4.png height=10 width=10 title="' + "MacOSエージェントのURLをクリップボードにコピーします" + '" style=cursor:pointer onclick=copyAgentUrl("meshosxagent?id=16&meshid=' + meshid.split('/')[2] + '",0)>');
2298 x += '</div>';
2299
@@ -4855,7 +4855,7 @@
4855 function dmousemove(e) { setSessionActivity(); e.addx = Q('DeskParent').scrollLeft; e.addy = Q('DeskParent').scrollTop; if (!xxdialogMode && desktop != null && Q('DeskControl').checked) { if ((webRtcDesktop != null) && (webRtcDesktop.softdesktop != null)) { webRtcDesktop.softdesktop.m.mousemove(e); desktop.m.sendKeepAlive(); } else { desktop.m.mousemove(e); } } }
4856 function dmousewheel(e) { setSessionActivity(); e.addx = Q('DeskParent').scrollLeft; e.addy = Q('DeskParent').scrollTop; if (!xxdialogMode && desktop != null && Q('DeskControl').checked) { if ((webRtcDesktop != null) && (webRtcDesktop.softdesktop != null)) { webRtcDesktop.softdesktop.m.mousewheel(e); desktop.m.sendKeepAlive(); } else { if (desktop.m.mousewheel) { desktop.m.mousewheel(e); } } haltEvent(e); return true; } return false; }
4857 function drotate(x) { if (!xxdialogMode && desktop != null) { desktop.m.setRotation(desktop.m.rotation + x); deskAdjust(); deskAdjust(); } }
4858 - function stopProcess(id, name) { setDialogMode(2, "プロセス制御", 3, stopProcessEx, format("プロセス#{0} \"{1} \"を停止しますか?", id, name), id); return false; }
4858 + function stopProcess(id, name) { setDialogMode(2, "プロセス制御", 3, stopProcessEx, format("プロセス#{0} \"{1}\"を停止しますか?", id, name), id); return false; }
4859 function stopProcessEx(buttons, tag) { meshserver.send({ action: 'msg', type: 'pskill', nodeid: currentNode._id, value: tag }); setTimeout(refreshDeskTools, 300); }
4860
4861 //
views/translations/default-min_nl.handlebars new
+8768
@@ -0,0 +1,8768 @@
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><link keeplink=1 type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><link type=text/css href=styles/ol.css media=screen rel=stylesheet title=CSS><link type=text/css href=styles/ol3-contextmenu.min.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-wsman-0.2.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-wsman-ws-0.2.0.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-redir-rtc-0.1.0.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/qrcode.min.js></script><script keeplink=1 src=scripts/u2f-api.js></script><script keeplink=1 src=scripts/charts.js></script><script keeplink=1 src=scripts/filesaver.js></script><body id=body onload='"undefined"!=typeof startup&&startup()'oncontextmenu=handleContextMenu(event) style=display:none;min-width:495px>{{{StartGeoLocation}}}<script keeplink=1 src=scripts/ol.js></script><script keeplink=1 src=scripts/ol3-contextmenu.js></script>{{{EndGeoLocation}}}<title>{{{title}}}</title><div id=contextMenu class="contextMenu noselect"style=display:none><div id=cxinfo class=cmtext onclick=cmaction(1,event)><b>Informatie</b></div><div id=cxdesktop class=cmtext onclick=cmaction(3,event)>bureaublad</div><div id=cxterminal class=cmtext onclick=cmaction(2,event)>Terminal</div><div id=cxfiles class=cmtext onclick=cmaction(4,event)>Bestanden</div><div id=cxevents class=cmtext onclick=cmaction(5,event)>Gebeurtenissen</div><div id=cxconsole class=cmtext onclick=cmaction(6,event)>Console</div><hr id=cxmgroupsplit><div id=cxmdesktop class=cmtext onclick=cmaction(7,event) style=display:none>Multi Desktop</div></div><div id=meshContextMenu class="contextMenu noselect"style=display:none;min-width:0><div id=cxselectall class=cmtext onclick=cmmeshaction(1,event)>Selecteer alles</div><div id=cxselectnone class=cmtext onclick=cmmeshaction(2,event)>Selecteer niets</div></div><div id=termShellContextMenu class="contextMenu noselect"style=display:none;min-width:0><div id=cxtermnorm class=cmtext onclick=cmtermaction(1,event)><b>Beheerder Shell</b></div><div id=cxtermps class=cmtext onclick=cmtermaction(6,event)>Beheerder PowerShell</div><div id=cxtermunorm class=cmtext onclick=cmtermaction(8,event)>Gebruiker Shell</div><div id=cxtermups class=cmtext onclick=cmtermaction(9,event)>Gebruiker PowerShell</div></div><div id=termShellContextMenuLinux class="contextMenu noselect"style=display:none;min-width:0><div id=cxtermnorm class=cmtext onclick=cmtermaction(1,event)><b>Root Shell</b></div><div id=cxtermps class=cmtext onclick=cmtermaction(8,event)>Gebruiker Shell</div></div><div id=container><div id=notifiyBox class=notifiyBox style=display:none></div><div id=masthead class=noselect><div style=float:left>{{{titlehtml}}}</div><div class=title>{{{title1}}}</div><div class=title2>{{{title2}}}</div><div style=float:right><div id=notificationCount onclick=clickNotificationIcon() class=unselectable style=display:none title="Klik om de huidige meldingen te bekijken">0</div></div><p id=logoutControl><span id=logoutControlSpan style=color:#fff></span><span id=idleTimeoutNotify style=color:#ff0></span></div><div id=page_leftbar><div style=height:16px></div><div id=LeftMenuMyDevices tabindex=0 class="lbbutton lbbuttonsel"title="Mijn apparaten"onclick=go(1,event) onkeypress='"Enter"==event.key&&go(1)'><div class=lb2></div></div><div id=LeftMenuMyAccount tabindex=0 class=lbbutton title="Mijn Account"onclick=go(2,event) onkeypress='"Enter"==event.key&&go(2)'><div class=lb1></div></div><div id=LeftMenuMyEvents tabindex=0 class=lbbutton title="Mijn gebeurtenissen"onclick=go(3,event) onkeypress='"Enter"==event.key&&go(3)'><div class=lb3></div></div><div id=LeftMenuMyFiles tabindex=0 class=lbbutton style=display:none title="Mijn bestanden"onclick=go(5,event) onkeypress='"Enter"==event.key&&go(5)'><div class=lb4></div></div><div id=LeftMenuMyUsers tabindex=0 class=lbbutton style=display:none title="Mijn gebruikers"onclick=go(4,event) onkeypress='"Enter"==event.key&&go(4)'><div class=lb5></div></div><div id=LeftMenuMyServer tabindex=0 class=lbbutton style=display:none title="Mijn server"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'><div class=lb6></div></div></div><div id=topbar class=noselect><div><div style=position:relative><div tabindex=0 id=uiMenuButton title="Selectie gebruikersinterface"onclick=showUserInterfaceSelectMenu() onkeypress='"Enter"==event.key&&showUserInterfaceSelectMenu()'>♦<div id=uiMenu style=display:none><div tabindex=0 id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Linkerbalk interface"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(1)'><div class=uiSelector1></div></div><div tabindex=0 id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Boven werkbalk interface"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(2)'><div class=uiSelector2></div></div><div tabindex=0 id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface met vaste breedte"onkeypress='"Enter"==event.key&&userInterfaceSelectMenu(3)'><div class=uiSelector3></div></div><div tabindex=0 id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Wissel nachtmodus"onkeypress='"Enter"==event.key&&toggleNightMode()'><div class=uiSelector4></div></div></div></div><table id=MainMenuSpan cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MainMenuMyDevices class="topbar_td style3x"onclick=go(1,event) onkeypress='"Enter"==event.key&&go(1)'>Mijn apparaten<td tabindex=0 id=MainMenuMyAccount class="topbar_td style3x"onclick=go(2,event) onkeypress='"Enter"==event.key&&go(2)'>Mijn Account<td tabindex=0 id=MainMenuMyEvents class="topbar_td style3x"onclick=go(3,event) onkeypress='"Enter"==event.key&&go(3)'>Mijn gebeurtenissen<td tabindex=0 id=MainMenuMyFiles class="topbar_td style3x"onclick=go(5,event) onkeypress='"Enter"==event.key&&go(5)'>Mijn bestanden<td tabindex=0 id=MainMenuMyUsers class="topbar_td style3x"onclick=go(4,event) onkeypress='"Enter"==event.key&&go(4)'>Mijn gebruikers<td tabindex=0 id=MainMenuMyServer class="topbar_td style3x"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'>Mijn server<td class="topbar_td_end style3">&nbsp;</table><div id=MainSubMenuSpan style=display:none><table id=MainSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MainDev class="topbar_td style3x"onclick=go(10,event) onkeypress='"Enter"==event.key&&go(10)'>Algemeen<td tabindex=0 id=MainDevDesktop class="topbar_td style3x"onclick=go(11,event) onkeypress='"Enter"==event.key&&go(11)'>bureaublad<td tabindex=0 id=MainDevTerminal class="topbar_td style3x"onclick=go(12,event) onkeypress='"Enter"==event.key&&go(12)'>Terminal<td tabindex=0 id=MainDevFiles class="topbar_td style3x"onclick=go(13,event) onkeypress='"Enter"==event.key&&go(13)'>Bestanden<td tabindex=0 id=MainDevEvents class="topbar_td style3x"onclick=go(16,event) onkeypress='"Enter"==event.key&&go(16)'>Gebeurtenissen<td tabindex=0 id=MainDevInfo class="topbar_td style3x"onclick=go(17,event) onkeypress='"Enter"==event.key&&go(17)'>Details<td tabindex=0 id=MainDevAmt class="topbar_td style3x"onclick=go(14,event) onkeypress='"Enter"==event.key&&go(14)'>Intel® AMT<td tabindex=0 id=MainDevConsole class="topbar_td style3x"onclick=go(15,event) onkeypress='"Enter"==event.key&&go(15)'>Console<td tabindex=0 id=MainDevPlugins class="topbar_td style3x"onclick=go(19,event) onkeypress='"Enter"==event.key&&go(19)'>Plugins<td class="topbar_td_end style3">&nbsp;</table></div><div id=MeshSubMenuSpan style=display:none><table id=MeshSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=MeshGeneral class="topbar_td style3x"onclick=go(20,event) onkeypress='"Enter"==event.key&&go(20)'>Algemeen<td class="topbar_td_end style3">&nbsp;</table></div><div id=UserSubMenuSpan style=display:none><table id=UserSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=UserGeneral class="topbar_td style3x"onclick=go(30,event) onkeypress='"Enter"==event.key&&go(30)'>Algemeen<td tabindex=0 id=UserEvents class="topbar_td style3x"onclick=go(31,event) onkeypress='"Enter"==event.key&&go(31)'>Gebeurtenissen<td class="topbar_td_end style3">&nbsp;</table></div><div id=ServerSubMenuSpan style=display:none><table id=ServerSubMenu cellpadding=0 cellspacing=0 class=style1><tr><td tabindex=0 id=ServerGeneral class="topbar_td style3x"onclick=go(6,event) onkeypress='"Enter"==event.key&&go(6)'>Algemeen<td tabindex=0 id=ServerStats class="topbar_td style3x"onclick=go(40,event) onkeypress='"Enter"==event.key&&go(40)'>Statistieken<td tabindex=0 id=ServerConsole class="topbar_td style3x"onclick=go(115,event) onkeypress='"Enter"==event.key&&go(115)'>Console<td tabindex=0 id=ServerTrace class="topbar_td style3x"onclick=go(41,event) onkeypress='"Enter"==event.key&&go(41)'>Traceer<td tabindex=0 id=ServerPlugins class="topbar_td style3x"onclick=go(42,event) onkeypress='"Enter"==event.key&&go(42)'>Plugins<td class="topbar_td_end style3">&nbsp;</table></div><div id=UserDummyMenuSpan><table id=UserDummyMenu cellpadding=0 cellspacing=0 class=style1><tr><td class=style3>&nbsp;</table></div></div></div></div><div id=column_l><div id=p0 style=display:none><div id=p0message><span id=p0span>Server verbroken</span>,<href onclick=reload() style=cursor:pointer><u>klik om opnieuw verbinding te maken</u></href>.</div></div><div id=p1 style=display:none><div style=display:none id=devListToolbarViewIcons><div tabindex=0 id=devViewButton1 class=viewSelector onclick=onDeviceViewChange(1) onkeypress='"Enter"==event.key&&onDeviceViewChange(1)'title=kolommen><div class=viewSelector2></div></div><div tabindex=0 id=devViewButton2 class=viewSelector onclick=onDeviceViewChange(2) onkeypress='"Enter"==event.key&&onDeviceViewChange(2)'title=Lijst><div class=viewSelector1></div></div><div tabindex=0 id=devViewButton3 class=viewSelector onclick=onDeviceViewChange(3) onkeypress='"Enter"==event.key&&onDeviceViewChange(3)'title=Bureaubladen><div class=viewSelector3></div></div><div tabindex=0 id=devViewButton4 class=viewSelector onclick=onDeviceViewChange(4) onkeypress='"Enter"==event.key&&onDeviceViewChange(4)'title=Kaart style=display:none><div class=viewSelector4></div></div></div><div><h1>Mijn apparaten</h1></div><table id=devListToolbarSpan class=noselect><tr><td class=h1><td id=devListToolbar class=style14 style=display:none>&nbsp;&nbsp;<input type=button id=SelectAllButton onclick=selectallButtonFunction() value="Selecteer alles">&nbsp; <input type=button id=GroupActionButton disabled value=Groepsactie onclick=groupActionFunction()>&nbsp; <input id=SearchInput placeholder=Filter onchange=masterUpdate(5) onkeyup=masterUpdate(5) autocomplete=off onfocus=onSearchFocus(1) onblur=onSearchFocus(0)>&nbsp; <label><input type=checkbox id=RealNameCheckBox onclick=onRealNameCheckBox()><span title="Toon apparaten besturingssysteemnaam">Naam van het besturingssysteem</span></label><td id=kvmListToolbar class=style14 style=display:none>&nbsp;&nbsp;<input type=button onclick=connectAllKvmFunction() value="Alles verbinden">&nbsp; <input type=button onclick=disconnectAllKvmFunction() value="Verbreek alles">&nbsp; <label><input type=checkbox id=autoConnectDesktopCheckbox onclick=autoConnectDesktops(event) title="Automatisch verbinden">Automatisch&nbsp;</label> <input type=button onclick=showMultiDesktopSettings() value=Instellingen>&nbsp;<td id=devMapToolbar class=style14 style=display:none>&nbsp;&nbsp;<input id=mapSearchLocation placeholder="Zoek locatie"onfocus=onMapSearchFocus(1) onblur=onMapSearchFocus(0)> <input type=button value=Zoeken title="Zoeken naar locatie"onclick=getSearchLocation()> <input type=button id=refreshmap title="Reset kaartweergave"value=Reset onclick=refreshMap(!1,!0)><td class=auto-style1 style=height:100%><div style=display:none id=devListToolbarView>Kijken <select id=viewselect onchange=onDeviceViewChange()><option value=1>kolommen<option value=2>Lijst<option value=3>Bureaubladen<option id=viewselectmapoption value=4 style=display:none>Kaart</select></div><div style=display:none id=devListToolbarSort>Sorteer <select id=sortselect onchange=masterUpdate(6)><option>Groep<option>Power<option>Apparaat<option>Tags</select> &nbsp;</div><div style=display:none id=devListToolbarSize>Grootte <select id=sizeselect onchange=onDeviceViewChange()><option value=0>Klein<option value=1>Gemiddeld<option value=2>Grote</select> &nbsp;</div><td class=h2></table><div id=NoMeshesPanel style=display:none><table><tr><td valign=top style=width:50px><img src=images/info.png><td><div id=getStarted1>om meteen aan de slag te gaan, <a href=# onclick="return account_createMesh()"><strong>klik hier om een apparaatgroep te maken</strong></a>.</div><div id=getStarted2>Geen apparaatgroepen.</div></table></div><div id=xdevices class=noselect style=display:none></div><div id=xdevicesmap style=display:none><div id=xmapSearchResultsDlg style=display:none><div id=xmapSearchResultsBck><div id=xmapSearchClose onclick=mapCloseSearchWindow()><b>X</b></div><div style=padding:5px>Locatie resultaten</div><div style=width:100%;margin:6px></div></div><div id=xmapSearchResults style=margin:6px></div></div></div><div id=xmap-info-window></div></div><div id=p2 style=display:none><h1>Mijn Account</h1><img id=p2AccountImage alt=""src=images/clipboard-128.png><div id=p2AccountSecurity style=display:none><p><strong>Gebruikersaccount beveiliging</strong><div style=margin-left:25px><div id=manageAuthApp><div class=p2AccountActions><span id=authAppSetupCheck><strong>✓</strong></span></div><span><a href=# onclick="return account_manageAuthApp()">Beheer authenticator-app</a><br></span></div><div id=manageHardwareOtp><div class=p2AccountActions><span id=authKeySetupCheck><strong>✓</strong></span></div><span><a href=# onclick="return account_manageHardwareOtp(0)">Beheer beveiligingssleutels</a><br></span></div><div id=manageOtp><div class=p2AccountActions><span id=authCodesSetupCheck><strong>✓</strong></span></div><span><a href=# onclick="return account_manageOtp(0)">Beheer back-up codes</a><br></span></div></div></div><div id=p2AccountActions><p><strong>gebruikersacties</strong><p class=mL><span id=verifyEmailId style=display:none><a href=# onclick="return account_showVerifyEmail()">Verifieer Email</a><br></span><span id=accountEnableNotificationsSpan style=display:none><a href=# onclick="return account_enableNotifications()">Schakel webmeldingen in</a><br></span><a href=# onclick="return account_showLocalizationSettings()">Lokalisatie instellingen</a><br><a href=# onclick="return account_showAccountNotifySettings()">meldingsinstellingen</a><br><span id=accountChangeEmailAddressSpan style=display:none><a href=# onclick="return account_showChangeEmail()">Verander e-mailadres</a><br></span><a href=# onclick="return account_showChangePassword()">Verander wachtwoord</a><span id=p2nextPasswordUpdateTime></span><br><a href=# onclick="return account_showDeleteAccount()">Verwijder account</a><br></p><br style=clear:both></div><strong>Apparaatgroepen</strong> <span id=p2createMeshLink1>( <a href=# onclick="return account_createMesh()"class=newMeshBtn>Nieuw</a> )</span><br><br><div id=p2meshes></div><div id=p2noMeshFound style=display:none>Geen apparaatgroepen.<span id=p2createMeshLink2> <a href=# onclick="return account_createMesh()"><strong>Begin hier!</strong></a></span></div><br style=clear:both></div><div id=p3 style=display:none><h1>Mijn gebeurtenissen</h1><table class=pTable><tr><td class=h1><td class=auto-style1>Tonen <select id=p3limitdropdown onchange=refreshEvents()><option value=60>Laatste 60<option value=120>Laatste 120<option value=250>Laatste 250<option value=500>Laatste 500<option value=1000>Laatste 1000</select>&nbsp; <a href=# onclick=p3showDownloadEventsDialog(2)><img src=images/link4.png height=10 width=10 title="Download gebeurtenissen"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p3events></div></div><div id=p4 style=display:none><h1>Mijn gebruikers</h1><table class=pTable><tr><td class=h1><td class=style14><div style=float:right><input type=button onclick=showUserBroadcastDialog() style=margin-right:6px value=Uitzending> <a href=# onclick=p4downloadUserInfo()><img style=cursor:pointer title="Download gebruikers informatie"src=images/link4.png></a><a href=# onclick=p4batchAccountCreate()><img id=p4UserBatchCreate style=cursor:pointer;display:none title="Batch aanmaken gebruikersaccounts"src=images/link6.png></a></div><div><input id=UserNewAccountButton type=button style=margin-left:6px onclick=showCreateNewAccountDialog() value="Nieuw account..."> <input id=UserSearchInput style=width:120px;margin-left:6px placeholder=Filter onchange=onUserSearchInputChanged() onkeyup=onUserSearchInputChanged() autocomplete=off onfocus=onUserSearchFocus(1) onblur=onUserSearchFocus(0)></div><td class=h2></table><div id=p3users></div></div><div id=p5 style=display:none><h1>Mijn bestanden</h1><table id=p5toolbar cellpadding=0 cellspacing=0><tr><td id=p5filehead valign=bottom><div id=p5rightOfButtons></div><div><input type=button id=p5FolderUp disabled onclick="return p5folderup()"value=Omhoog>&nbsp; <input type=button id=p5SelectAllButton disabled onclick=p5selectallfile() value="Selecteer alles">&nbsp; <input type=button id=p5RenameFileButton disabled value=Hernoemen onclick=p5renamefile()>&nbsp; <input type=button id=p5DeleteFileButton disabled value=Verwijderen onclick=p5deletefile()>&nbsp; <input type=button id=p5NewFolderButton disabled value="Nieuwe map"onclick=p5createfolder()>&nbsp; <input type=button id=p5UploadButton disabled value=Uploaden onclick=p5uploadFile()>&nbsp; <input type=button id=p5CutButton disabled value=Knippen onclick=p5copyFile(1)>&nbsp; <input type=button id=p5CopyButton disabled value=Kopie onclick=p5copyFile(0)>&nbsp; <input type=button id=p5PasteButton disabled value=Plakken onclick=p5pasteFile()>&nbsp;</div><tr><td id=p5filesubhead><div style=float:right><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Sorteren op naam<option value=2>Sorteren op grootte<option value=3>Sorteren op datum<option value=4>Aflopend op naam<option value=5>Aflopend op grootte<option value=6>Aflopend op datum</select></div><div>&nbsp;&nbsp;<span id=p5currentpath></span></div></table><div id=p5filetable><div id=p5PublicShare><div>Deze bestanden worden openbaar gedeeld, klik op "link" om de openbare URL te krijgen.</div></div><div id=bigok style=display:none><b>✓</b></div><div id=bigfail style=display:none><b>✗</b></div><span id=p5files></span></div><table id=p5toolbarBottom style=width:100% cellpadding=0 cellspacing=0><tr><td class=style6>&nbsp;<span id=p5bottomstatus></span></table></div><div id=p6 style=display:none><img id=MainMeshImage src=serverpic.ashx><h1>Mijn server</h1><div id=p2ServerActions><p><strong>Server acties</strong><div class=mL><div id=p2ServerActionsBackup><a href={{{domainurl}}}backup.zip rel="noreferrer noopener"target=_blank>Download server back-up</a></div><div id=p2ServerActionsRestore><a href=# onclick="return server_showRestoreDlg()">Herstel server met back-up</a></div><div id=p2ServerActionsVersion><a href=# onclick="return server_showVersionDlg()">Controleer server versie</a></div><div id=p2ServerActionsErrors><a href=# onclick="return server_showErrorsDlg()">Serverlogboek weergeven</a></div></div></div><br><strong>Serverstatistieken</strong><br><br><div id=serverStats><div id=serverCpuChartView style=display:none><div class=chartViewCanvas><canvas id=serverCpuChart></canvas></div><div class=chartViewText id=serverCpuChartText></div></div><div id=serverMemoryChartView style=display:none><div class=chartViewCanvas><canvas id=serverMemoryChart></canvas></div><div class=chartViewText id=serverMemoryChartText></div></div><br><br><div id=serverStatsTable></div></div><div id=serverWarningsDiv style=display:none><br><strong>Serverwaarschuwingen</strong><br><br><div id=serverWarnings></div></div></div><div id=p10 style=display:none><table style=width:100% cellpadding=0 cellspacing=0><tr><td style=width:auto valign=top><div id=p10title><div id=p10BackButton><div class=backButton tabindex=0 onclick=goBack() title=Terug onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Algemeen - <span id=p10deviceName></span></h1></div><div id=p10html></div><td style=width:20px><td style=width:200px><a href=# onclick=p10showiconselector()><img id=MainComputerImage></a><div id=MainComputerState></div></table><br><div id=p10html2></div><div id=p10html3></div></div><div id=p11 class=noselect style=display:none><div id=p11title><div id=p11deviceNameHeader><div id=p11BackButton><div class=backButton tabindex=0 onclick=goBack() title=Terug onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><div id=devListToolbarViewIcons><div class=viewSelector onclick=deskToggleFull(event) title="Volledig scherm. Houd shift ingedrukt om de browser op volledig scherm weer te geven."><div class=viewSelector5></div></div></div><h1>bureaublad - <span id=p11deviceName></span></h1></div></div><div id=p11warning onclick=showFeaturesDlg()><div class=icon2></div><div class=warningbox>Intel® AMT omleidingspoort of KVM-functie is uitgeschakeld<span id=p11warninga>, klik hier om in te schakelen</span></div></div><div id=p11warning2 onclick=showPowerActionDlg()><div class=icon2></div><div class=warningbox>Externe computer is niet ingeschakeld, klik hier om een stroomopdracht uit te voeren.</div></div><div id=deskarea0 cellpadding=0 cellspacing=0><div id=deskarea1 class=areaHead><div class=toright2><span id=p11power></span>&nbsp;<div class=deskareaicon title="Schakel weergavemodus"onclick=toggleAspectRatio(1)>⇲</div><div class=deskareaicon title="Draai naar links"onclick=drotate(-1)>↺</div><div class=deskareaicon title="Draai naar rechts"onclick=drotate(1)>↻</div><div id=deskRecordIcon class=deskareaicon title="Server neemt deze sessie op"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px></div><input id=deskFocusBtn type=button title="Schakel focusmodus in, indien actief wordt alleen het gebied rond de muis bijgewerkt"onkeypress=return!1 onkeydown=return!1 value="Focus alles"onclick=deskToggleFocus() style=margin-right:3px;display:none> <input id=deskSaveBtn type=button title="Bewaar een screenshot van het externe bureaublad"onkeypress=return!1 onkeydown=return!1 value=Opslaan... onclick=deskSaveImage() class=mR> <input id=deskActionsBtn type=button title="Voer krachtacties uit op het apparaat"onkeypress=return!1 onkeydown=return!1 value=Akties onclick=deviceActionFunction() class=mR> <input id=deskActionsSettings type=button value="Instellingen ..."title="Bewerk externe bureaubladinstellingen"onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings() class=mR> <input type=button title="Wijzig de stroomstatus van het externe apparaat"onkeypress=return!1 onkeydown=return!1 value="Power Actie's..."onclick=showPowerActionDlg() style=display:none></div><div><div id=idx_deskFullBtn2 onclick=deskToggleFull(event)>&nbsp;✖</div><input type=button id=autoconnectbutton1 value="Automatisch verbinden"onclick=autoConnectDesktop(event) onkeypress=return!1 onkeydown=return!1 style=display:none> <span id=connectbutton1span><input type=button id=connectbutton1 value=Verbinden onclick=connectDesktop(event,3) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=connectbutton1hspan>&nbsp;<input type=button id=connectbutton1h value="HW verbinden"title="Maak verbinding met Intel AMT hardware KVM"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=disconnectbutton1span>&nbsp;<input type=button id=disconnectbutton1 value=Verbreken onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1></span>&nbsp;<span id=deskstatus>Verbroken</span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x><div id=DeskFocus oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></div><div id=DeskParent><canvas id=Desk width=640 height=480 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools><div id=deskToolsAreaTop><a id=DeskToolsRefreshButton style=right:2px onclick=refreshDeskTools()>Ververs</a><div id=deskToolsTopTabProcess class=deskToolsTopTab onclick=changeDeskToolTab(0) style=left:0;bottom:0>Processen</div><div id=deskToolsTopTabService class=deskToolsTopTab onclick=changeDeskToolTab(1) style=display:none;left:90px;color:gray>Services</div></div><div id=deskToolsArea><div id=DeskToolsProcessTab><div id=deskToolsHeader><a class=colmn1 title="Sorteer op proces ID"onclick=sortProcess(0)>PID</a> <a class=colmn2 title="Sorteren op naam"onclick=sortProcess(1)>Naam</a></div><div id=DeskToolsProcesses></div></div><div id=DeskToolsServiceTab style=display:none><div id=deskToolsServiceHeader><a class=colmn1 style=width:70px title="Sorteer op status"onclick=sortService(0)>Status</a> <a class=colmn2 title="Sorteren op naam"onclick=sortService(1)>Naam</a></div><div id=DeskToolsServices></div></div></div></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p11clearConsoleMsg()></div><div id=p11DeskSessionSelector style=display:none;position:absolute;left:30px;top:17px;right:30px></div></div><div id=deskarea4 class=areaFoot><div class=toright2><span id=DeskTimer title="Sessie tijd"></span>&nbsp; <select id=termdisplays style=display:none onchange=deskSetDisplay(event) onkeypress=return!1 onkeydown=return!1></select>&nbsp; <input id=DeskToolsButton type=button value=Gereedschap title="Schakel hulpmiddelenweergave in"onkeypress=return!1 onkeydown=return!1 onclick=toggleDeskTools()>&nbsp; <span id=DeskChatButton class=deskarea title="Open chatvenster op deze computer"><img src=images/icon-chat.png onclick=deviceChat(event) height=16 width=16 style=padding-top:2px></span><span id=DeskNotifyButton title="Toon een melding op de externe computer"><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span><span id=DeskOpenWebButton title="Open een webadres op de externe computer"><img src=images/icon-url2.png onclick=deviceUrlFunction() height=16 width=16 style=padding-top:2px></span><span id=DeskBackgroundButton title="Wissel bureaubladachtergrond op afstand in"><img src=images/icon-background.png onclick=deviceToggleBackground(event) height=16 width=16 style=padding-top:2px></span></div><div><select id=deskkeys><option value=10>Ctrl+Alt+Del<option value=5>Win<option value=0>Win+pijl naar omlaag<option value=1>Win+ pijl omhoog<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab<option value=11>Win+pijl Links<option value=12>Win+pijl rechts</select> <input id=DeskWD type=button value=verzenden onkeypress=return!1 onkeydown=return!1 onclick=deskSendKeys()> <input id=DeskClip type=button value=Klembord onkeypress=return!1 onkeydown=return!1 onclick=showDeskClip()> <input id=DeskType type=button value=Typen onkeypress=return!1 onkeydown=return!1 onclick=showDeskType()> <label><span id=DeskControlSpan title="Schakelen tussen muis- en toetsenbordinvoer"><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1 onclick=toggleKvmControl()>Invoer</span></label>&nbsp;</div></div></div></div><div id=p12 style=display:none><div id=p12title><div id=p12BackButton><div class=backButton tabindex=0 onclick=goBack() title=Terug onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Terminal - <span id=p12deviceName></span></h1></div><div id=p12warning onclick=showFeaturesDlg()><div class=icon2></div><div class=warningbox>Intel® AMT omleidingspoort of KVM-functie is uitgeschakeld<span id=p12warninga>, klik hier om in te schakelen</span></div></div><div id=p12warning2 onclick=showPowerActionDlg()><div class=icon2></div><div class=warningbox>Externe computer is niet ingeschakeld, klik hier om een stroomopdracht uit te voeren.</div></div><div id=termTable style=position:relative><table style=width:100% cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><div id=termRecordIcon class=deskareaicon title="Server neemt deze sessie op"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px></div><input id=termActionsBtn type=button title="Voer krachtacties uit op het apparaat"onkeypress=return!1 onkeydown=return!1 value=Akties onclick=deviceActionFunction()></div><div><input type=button id=autoconnectbutton2 value="Automatisch verbinden"onclick=autoConnectTerminal(event) onkeypress=return!1 onkeydown=return!1 style=display:none> <span id=connectbutton2span><input type=button id=connectbutton2 value=Verbinden onclick=connectTerminal(event,1) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=connectbutton2hspan>&nbsp;<input type=button id=connectbutton2h value="HW verbinden"title="Maak verbinding met Intel AMT hardware KVM"onclick=connectTerminal(event,2) onkeypress=return!1 onkeydown=return!1 disabled></span><span id=disconnectbutton2span>&nbsp;<input type=button id=disconnectbutton2 value=Verbreken onclick=connectTerminal(event,0) onkeypress=return!1 onkeydown=return!1></span>&nbsp;<span id=termstatus>Verbroken</span><span id=termtitle></span></div><tr><td><div class=areaProgress><div id=termprogressbar></div></div><tr><td id=termarea3x><pre id=Term></pre><tr><td class=areaFoot><div class=toright2><span id=TermTimer title="Sessie tijd"></span>&nbsp; <span id=terminalSettingsButtons style=display:none><input id=id_tcrbutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value=CR+LF title="Wissel wat de return toets zal verzenden"onclick=termToggleCr()> <input id=id_tfxkeysbutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value="Intel (F10 = ESC+[OM)"title="Schakel het emulatietype van F1 naar F10-toetsen"onclick=termToggleFx()> <input id=id_ttypebutton type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton value="Extended Ascii"title="Schakel het type terminal emulatie in"onclick=termToggleType()> </span><span id=terminalSizeDropDown><select id=termSizeList onkeypress=return!1><option value=1>80x25<option value=2>100x30<option value=3 selected>Automatisch</select> </span><select id=specialkeylist onkeypress=return!1></select> <input id=specialkeylistinput type=button onkeypress=return!1 class=bottombutton value=verzenden title="Verzend de geselecteerde speciale sleutel"onclick=sendSpecialKey()></div><div>&nbsp; <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=ctrlcbutton value=Ctl-C onclick='termSendKey(3,"ctrlcbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=ctrlxbutton value=Ctl-X onclick='termSendKey(24,"ctrlxbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=escbutton value=ESC onclick='termSendKey(27,"escbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=bsbutton value=Backspace onclick='termSendKey(8,"bsbutton")'> <input type=button onkeypress=return!1 onkeydown=return!1 class=bottombutton id=pastebutton value=Plakken title="Plak tekst in de terminal"onclick=showTermPasteDialog()></div></table><div id=p12TermConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:45px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p12clearConsoleMsg()></div></div></div><div id=p13 style=display:none><div id=p13title><div id=p13BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Terug onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Bestanden - <span id=p13deviceName></span></h1></div><table id=p13toolbar cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><input id=filesActionsBtn type=button title="Voer krachtacties uit op het apparaat"value=Akties onclick=deviceActionFunction()><div id=filesRecordIcon class=deskareaicon title="Server neemt deze sessie op"style=display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px></div></div><div><input id=p13AutoConnect value="Automatisch verbinden"onclick=autoConnectFiles(event) type=button style=display:none> <input id=p13Connect value=Verbinden onclick=connectFiles(event) type=button> <span id=p13Status>Verbroken</span></div><tr><td class=areaHead2 valign=bottom><div id=p13rightOfButtons class=toright2></div><div><input type=button id=p13FolderUp disabled onclick=p13folderup() value=Omhoog>&nbsp; <input type=button id=p13SelectAllButton disabled onclick=p13selectallfile() value="Selecteer alles">&nbsp; <input type=button id=p13RenameFileButton disabled value=Hernoemen onclick=p13renamefile()>&nbsp; <input type=button id=p13DeleteFileButton disabled value=Verwijderen onclick=p13deletefile()>&nbsp; <input type=button id=p13ViewFileButton disabled value=Bewerk onclick=p13viewfile()>&nbsp; <input type=button id=p13NewFolderButton disabled value="Nieuwe map"onclick=p13createfolder()>&nbsp; <input type=button id=p13UploadButton disabled value=Uploaden onclick=p13uploadFile()>&nbsp; <input type=button id=p13CutButton disabled value=Knippen onclick=p13copyFile(1)>&nbsp; <input type=button id=p13CopyButton disabled value=Kopie onclick=p13copyFile(0)>&nbsp; <input type=button id=p13PasteButton disabled value=Plakken onclick=p13pasteFile()>&nbsp; <input type=button id=p13RefreshButton disabled value=Ververs onclick=p13folderup(9999)>&nbsp;</div><tr><td class=areaHead3><div class=toright2><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Sorteren op naam<option value=2>Sorteren op grootte<option value=3>Sorteren op datum<option value=4>Aflopend op naam<option value=5>Aflopend op grootte<option value=6>Aflopend op datum</select></div><div>&nbsp;&nbsp;<span id=p13currentpath></span></div></table><div id=p13FilesConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:165px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=p13clearConsoleMsg()></div><div id=p13filetable><div id=p13bigok style=display:none><b>✓</b></div><div id=p13bigfail style=display:none><b>✗</b></div><span id=p13files></span></div><table id=p13toolbarBottom cellpadding=0 cellspacing=0><tr><td class=style6>&nbsp;<span id=p13bottomstatus></span></table></div><div id=p14 style=display:none><div id=p14title><div id=p14BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Terug onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><div id=devListToolbarViewIcons><div class=viewSelector onclick=deskToggleFull(event) title="Volledig scherm. Houd shift ingedrukt om de browser op volledig scherm weer te geven."><div class=viewSelector5></div></div></div><h1>Intel® AMT - <span id=p14deviceName></span></h1></div><iframe id=p14iframe src={{{domainurl}}}commander.htm></iframe></div><div id=p15 style=display:none><div id=p15title><div id=p15BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Terug onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1><span id=p15deviceName></span></h1></div><table id=consoleTable cellpadding=0 cellspacing=0><tr><td class=areaHead><div class=toright2><div id=p15coreName title="Informatie over de huidige kern die op deze agent wordt uitgevoerd"></div><input type=button id=p15uploadCore value="Agent actie"onclick=p15uploadCore(event) title="Wijzig de Javascript code module van de agent"> <img onclick=p15downloadConsoleText() style=cursor:pointer;margin-top:6px title="Consoletekst downloaden"src=images/link4.png></div><div id=p15statetext></div><tr><td><div class=areaProgress><div id=consoleprogressbar></div></div><tr><td id=p15agentConsole><pre id=p15agentConsoleText></pre><tr><td class=areaFoot><table style=width:100%><tr><td style=width:99%><input id=p15consoleText style=width:100% onkeyup=p15consoleSend(event) onfocus=onConsoleFocus(1) onblur=onConsoleFocus(0)><td>&nbsp;<td id=p15outputselecttd><select id=p15outputselect><option value=1>Agent<option value=2>MQTT</select><td style=width:1%><input id=id_p15consoleClear type=button class=bottombutton value=Wissen onclick=p15consoleClear()></table></table></div><div id=p16 style=display:none><div id=p16title><div id=p16BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Terug onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Gebeurtenissen - <span id=p16deviceName></span></h1></div><table class=pTable><tr><td class=h1><td class=auto-style1>Tonen <select id=p16limitdropdown onchange=refreshDeviceEvents()><option value=60>Laatste 60<option value=120>Laatste 120<option value=250>Laatste 250<option value=500>Laatste 500<option value=1000>Laatste 1000</select> <a href=# onclick=p3showDownloadEventsDialog(1)><img src=images/link4.png height=10 width=10 title="Download gebeurtenissen"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p16events></div></div><div id=p17 style=display:none><div id=p17title><div id=p17BackButton style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Terug onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Details - <span id=p17deviceName></span></h1></div><div id=p17info></div></div><div id=p20 style=display:none><picture id=MainMeshImage style=border-width:0;height:200px;width:200px;float:right><source type=image/webp width=200 height=200 srcset=images/webp/mesh-256.webp><img alt=""width=200 height=200 src=images/mesh-256.png></picture><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Terug onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Algemeen - <span id=p20meshName></span></h1><p id=p20info></div><div id=p30 style=display:none><table style=width:100% cellpadding=0 cellspacing=0><tr><td style=width:auto valign=top><div id=p30title><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Terug onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Algemeen - <span id=p30userName></span></h1></div><div id=p30html></div><td style=width:20px><td style=width:200px><picture id=MainUserImage style=border-width:0;height:200px;width:200px;float:right><source type=image/webp width=200 height=200 srcset=images/webp/user-256.webp><img alt=""width=200 height=200 src=images/user-256.png></picture><div style=width:100%;text-align:center><strong><span id=MainUserState></span></strong></div></table><br><div id=p30html2></div><div id=p30html3></div></div><div id=p31 style=display:none><div style=float:left><div class=backButton tabindex=0 onclick=goBack() title=Terug onkeypress='"Enter"==event.key&&goBack()'><div class=backButtonEx></div></div></div><h1>Gebeurtenissen - <span id=p31userName></span></h1><table class=pTable><tr><td class=h1><td class=auto-style1>Tonen <select id=p31limitdropdown onchange=refreshUsersEvents()><option value=60>Laatste 60<option value=120>Laatste 120<option value=250>Laatste 250<option value=500>Laatste 500<option value=1000>Laatste 1000</select> <a href=# onclick=p3showDownloadEventsDialog(3)><img src=images/link4.png height=10 width=10 title="Download gebeurtenissen"style=cursor:pointer></a>&nbsp;<td class=h2></table><div id=p31events></div></div><div id=p40 style=display:none><h1>Mijn serverstatistieken</h1><div class=areaHead><div class=toright2><select id=p40type onchange=updateServerTimelineStats()><option value=0>Verbindingen<option value=1>Geheugen</select>&nbsp; <select id=p40time onchange=updateServerTimelineHours()><option value=3>Laatste 3 uur<option value=8>Laatste 8 uur<option value=24>Laatste dag<option value=168>Vorige week<option value=720>Laatste 30 dagen</select>&nbsp; <img src=images/link4.png height=10 width=10 title="Gegevenspunten downloaden (.csv)"style=cursor:pointer onclick=p40downloadEvents()>&nbsp;</div><div><input value=Ververs type=button onclick=refreshServerTimelineStats()> &nbsp;<label><input id=p40log type=checkbox onclick=updateServerTimelineHours()>Log-X</label></div></div><canvas id=serverMainStats></canvas></div><div id=p41 style=display:none><h1>Mijn server traceren</h1><div class=areaHead><div class=toright2>Tonen <select id=p41limitdropdown onchange=displayServerTrace()><option value=100>Laatste 100<option value=250>Laatste 250<option value=500>Laatste 500<option value=1000>Laatste 1000</select> <input value=Wissen type=button onclick=clearServerTracing()> <img src=images/link4.png height=10 width=10 title="Download sporen (.csv)"style=cursor:pointer onclick=p41downloadServerTrace()>&nbsp;</div><div><input value=traceren type=button onclick=setServerTracing()> <span id=p41traceStatus>Geen</span></div></div><div id=p41events></div></div><div id=p42 style=display:none><h1>Mijn serverplug-ins</h1><div class=areaHead><div class=toright2></div><div><input value="Download Plugin"type=button onclick="return pluginHandler.addPluginDlg()"></div></div><div id=pluginRestartNotice class=areaHead style=background-color:gold;display:none><div class=toright2><input value="Agentcores vernieuwen"type=button onclick="return distributeCore(),!1"></div><div style=padding:2px><div style=padding:2px><b>Opmerking:</b> Plug-ins zijn gewijzigd, dit kan een update van de agent vereisen.</div></div></div><table id=p42tbl><tr class=DevSt><th style=width:26px><th style=width:10px><th class=chName>Naam<th class=chDescription>Omschrijving<th class=chSite style=text-align:center>Link<th class=chVersion style=text-align:center>Versie<th class=chUpgradeAvail style=text-align:center>Laatste<th class=chStatus style=text-align:center>Status<th class=chAction style=text-align:center>Aktie<th style=width:10px></table><div id=pluginNoneNotice style=width:100%;text-align:center;padding-top:10px;display:none><i>Geen plug-ins op server.</i></div></div><div id=p43 style=display:none><div id=p43BackButton><div class=backButton tabindex=0 onclick=go(42) title=Terug onkeypress='"Enter"==event.key&&go(42)'><div class=backButtonEx></div></div></div><h1>Mijn serverplug-ins - <span id=p43title></span></h1><iframe id=p43iframe frameborder=0 style="width:100%;height:calc(100vh - 245px);max-height:calc(100vh - 245px)"></iframe></div><div id=p19 style=display:none><h1>Plugins - <span id=p19deviceName></span></h1><div id=p19headers></div><div id=p19pages></div></div><br id=column_l_bottomgap></div><div id=footer><div class=footer1>{{{footer}}}</div><div class=footer2><a id=verifyEmailId2 style=display:none href=# onclick=account_showVerifyEmail()>Verifieer Email</a> &nbsp;<a href=terms>Voorwaarden &amp; Privacy</a></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>✖</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div><div id=dialog3><div id=d3upload><div>Bestand selectie</div><select id=d3uploadMode onchange=d3modechange()><option value=1>Lokaal bestand uploaden<option value=2>Selectie serverbestand</select></div><div id=d3localmode style=display:none><div>Upload bestand</div><form id=d3localmodeform method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input id=d3auth name=auth style=display:none> <input id=d3attrib name=attrib style=display:none> <input type=file id=d3localFile name=files onchange=d3setActions()> <input type=submit id=d3submit style=display:none></form></div><div id=d3servermode><div id=d3serveraction valign=bottom><input type=button id=p3FolderUp disabled onclick=d3folderup() value=Omhoog>&nbsp;</div><div id=d3serverfiles></div></div></div><div id=dialog4><input id=d4WrapButton type=button value="Wrap On"onclick=d4ToggleWrap()> <input id=d4SizeButton type=button value=Klein onclick=d4ToggleSize()> <textarea id=d4editorarea style="height:calc(100vh - 286px);width:100%;overflow:scroll;resize:none;white-space:pre"></textarea></div><div id=dialog7><div id=d7meshkvm><h4>Agent Extern bureaublad</h4><div><div>Kwaliteit</div><select id=d7bitmapquality dir=rtl></select></div><div><div>Schalen</div><select id=d7bitmapscaling dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select></div><div><div>Frameverhouding</div><select id=d7framelimiter dir=rtl><option selected value=50>Snel<option value=100>Gemiddeld<option value=400>Traag<option value=1000>erg traag</select></div></div><div id=d7amtkvm><h4>Intel® AMT Hardware KVM</h4><div><div>Beeldcodering</div><select id=d7desktopmode><option value=1>RLE8, snelste<option value=2>RLE16, Aanbevolen<option value=3>RAW8, langzaam<option value=4>RAW16, Zeer langzaam</select></div><div><div>Andere instellingen</div><div id=d7otherset style=display:block><label style=display:block><input type=checkbox id=d7showfocus>Toon focus tool</label> <label style=display:block><input type=checkbox id=d7showcursor>Lokale muiscursor weergeven</label> <label style=display:block><input type=checkbox id=d7localKeyMap>Lokale toetsenbordkaart</label></div></div></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Afbreken onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=Oke onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=Verwijderen style=display:none onclick=dialogclose(2)></div></div></div><iframe name=fileUploadFrame style=display:none></iframe><form style=display:none method=post action=uploadfile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p5fileDragName name=name><input id=p5fileDragAuthCookie name=auth><input id=p5fileDragSize name=size><input id=p5fileDragType name=type><input id=p5fileDragData name=data><input id=p5fileDragLink name=link><input type=submit id=p5loginSubmit2 style=display:none></form><form style=display:none method=post action=uploadnodefile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p13fileDragName name=name><input id=p13fileDragSize name=size><input id=p13fileDragType name=type><input id=p13fileDragData name=data><input id=p13fileDragLink name=link><input type=submit id=p13loginSubmit2 style=display:none></form><audio id=chimes><source src=sounds/chimes.mp3 type=audio/mp3></audio></div><script>'use strict';
2 +
3 + // Process server-side web state
4 + var webState = '{{{webstate}}}';
5 + if (webState != '') { webState = JSON.parse(decodeURIComponent(webState)); }
6 + for (var i in webState) { localStorage.setItem(i, webState[i]); }
7 + if (!webState.loctag) { delete localStorage.removeItem('loctag'); }
8 +
9 + var args;
10 + var autoReconnect = true;
11 + var powerStatetable = ['', "ingeschakeld", "Slaap", "Slaap", "Slaap", "Slaapstand", "Uitzetten", "Aanwezig"];
12 + var StatusStrs = ["Verbroken", "Verbinden...", "Setup...", "Verbonden", "Intel® AMT verbonden"];
13 + var sort = 0;
14 + var searchFocus = 0;
15 + var mapSearchFocus = 0;
16 + var userSearchFocus = 0;
17 + var consoleFocus = 0;
18 + var showRealNames = false;
19 + var meshserver = null;
20 + var meshes = {};
21 + var meshcount = 0;
22 + var nodes = null;
23 + var filetree = {};
24 + var userinfo = null;
25 + var serverinfo = null;
26 + var events = [];
27 + var users = null;
28 + var wssessions = null;
29 + var nodeShortIdent = 0;
30 + var desktop;
31 + var desktopsettings = { encoding: 2, showfocus: false, showmouse: true, showcad: true, quality: 40, scaling: 1024, framerate: 50, localkeymap: false };
32 + var multidesktopsettings = { quality: 20, scaling: 128, framerate: 1000 };
33 + var terminal;
34 + var files;
35 + var debugLevel = parseInt('{{{debuglevel}}}');
36 + var features = parseInt('{{{features}}}');
37 + var sessionTime = parseInt('{{{sessiontime}}}');
38 + var domain = '{{{domain}}}';
39 + var domainUrl = '{{{domainurl}}}';
40 + var authCookie = '{{{authCookie}}}';
41 + var authRelayCookie = '{{{authRelayCookie}}}';
42 + var logoutControls = {{{logoutControls}}};
43 + var authCookieRenewTimer = null;
44 + var multiDesktop = {};
45 + var multiDesktopFilter = null;
46 + var serverPublicNamePort = '{{{serverDnsName}}}:{{{serverPublicPort}}}';
47 + var amtScanResults = null;
48 + var debugmode = 0;
49 + var clickOnce = (((features & 256) != 0) && detectClickOnce());
50 + var attemptWebRTC = ((features & 128) != 0);
51 + var passRequirements = '{{{passRequirements}}}';
52 + if (passRequirements != '') { passRequirements = JSON.parse(decodeURIComponent(passRequirements)); }
53 + var deskAspectRatio = 0;
54 + try { deskAspectRatio = parseInt(getstore('deskAspectRatio', '0')); } catch (ex) { }
55 + var uiMode = parseInt(getstore('uiMode', 1));
56 + var webPageStackMenu = false;
57 + var webPageFullScreen = true;
58 + var nightMode = (getstore('_nightMode', '0') == '1');
59 + var sessionActivity = Date.now();
60 + var updateSessionTimer = null;
61 + var pluginHandlerBuilder = {{{pluginHandler}}};
62 + var pluginHandler = null;
63 + if (pluginHandlerBuilder != null) { pluginHandler = new pluginHandlerBuilder(); }
64 + var installedPluginList = null;
65 +
66 + // Console Message Display Timers
67 + var p11DeskConsoleMsgTimer = null;
68 + var p12TermConsoleMsgTimer = null;
69 + var p13FilesConsoleMsgTimer = null;
70 +
71 + function startup() {
72 + if ((features & 32) == 0) {
73 + // Guard against other site's top frames (web bugs).
74 + var loc = null;
75 + try { loc = top.location.toString().toLowerCase(); } catch (e) { }
76 + if (top != self && (loc == null || top.active == false)) { top.location = self.location; return; }
77 + }
78 +
79 + // Setup logout control
80 + var logoutControl = '';
81 + if (logoutControls.name != null) { logoutControl = format("Welkom {0}.", logoutControls.name); }
82 + if (logoutControls.logoutUrl != null) { logoutControl += format(' <a href=\"' + logoutControls.logoutUrl + '\" style="color:white">' + "Uitloggen" + '</a>'); }
83 + QH('logoutControlSpan', logoutControl);
84 +
85 + // Check if we are in debug mode
86 + args = parseUriArgs();
87 + if (!args.locale) { var x = getstore('loctag', 0); if ((x != null) && (x != '*')) { args.locale = x; } }
88 + debugmode = args.debug;
89 + if (args.webrtc != null) { attemptWebRTC = (args.webrtc == 1); }
90 + QV('p13AutoConnect', debugmode); // Files
91 + QV('autoconnectbutton2', debugmode); // Terminal
92 + QV('autoconnectbutton1', debugmode); // Desktop
93 + //QV('DeskClip', debugmode); // Clipboard feature, not completed so show in in debug mode only.
94 +
95 + if (nightMode) { QC('body').add('night'); }
96 + toggleFullScreen();
97 +
98 + // Setup page visuals
99 + if (args.hide) {
100 + var hide = parseInt(args.hide);
101 + QV('masthead', !(hide & 1));
102 + QV('topbar', !(hide & 2));
103 + QV('footer', !(hide & 4));
104 + QV('p10title', !(hide & 8));
105 + QV('p11title', !(hide & 8));
106 + QV('p12title', !(hide & 8));
107 + QV('p13title', !(hide & 8));
108 + QV('p14title', !(hide & 8));
109 + QV('p15title', !(hide & 8));
110 + QV('p16title', !(hide & 8));
111 + //if (hide & 16) {
112 + // QV('page_leftbar', false);
113 + // QS('page_content').left = '0px';
114 + //}
115 +
116 + // Fix the main grid to zero-height elements we want to hide.
117 + QS('container')['grid-template-rows'] = ((hide & 1) ? '0' : '66') + 'px ' + ((hide & 2) ? '0' : '24') + 'px auto ' + ((hide & 4) ? '0' : '45') + 'px';
118 + QS('container')['-ms-grid-rows'] = ((hide & 1) ? '0' : '66') + 'px ' + ((hide & 2) ? '0' : '24') + 'px auto ' + ((hide & 4) ? '0' : '45') + 'px';
119 +
120 + // Adjust height of remote desktop, files and Intel AMT
121 + var xh = (((hide & 1) ? 0 : 66) + ((hide & 2) ? 0 : 24) + ((hide & 4) ? 0 : 45) + ((hide & 8) ? 0 : 60)); // 0 to 195
122 + QS('p3users')['max-height'] = 'calc(100vh - ' + (124 + xh) + 'px)';
123 + QS('p3events')['height'] = 'calc(100vh - ' + (124 + xh) + 'px)';
124 + QS('deskarea3x')['height'] = 'calc(100vh - ' + (75 + xh) + 'px)';
125 + QS('deskarea3x')['max-height'] = 'calc(100vh - ' + (75 + xh) + 'px)';
126 + QS('p5filetable')['height'] = 'calc(100vh - ' + (160 + xh) + 'px)';
127 + QS('p13filetable')['height'] = 'calc(100vh - ' + (124 + xh) + 'px)';
128 + QS('serverMainStats')['height'] = 'calc(100vh - ' + (110 + xh) + 'px)';
129 + QS('serverMainStats')['max-height'] = 'calc(100vh - ' + (110 + xh) + 'px)';
130 + QS('xdevices')['max-height'] = 'calc(100vh - ' + (124 + xh) + 'px)';
131 + QS('xdevicesmap')['max-height'] = 'calc(100vh - ' + (124 + xh) + 'px)';
132 + QS('p15agentConsole')['height'] = 'calc(100vh - ' + (84 + xh) + 'px)';
133 + QS('p15agentConsole')['max-height'] = 'calc(100vh - ' + (84 + xh) + 'px)';
134 + QS('p15agentConsoleText')['height'] = 'calc(100vh - ' + (81 + xh) + 'px)';
135 + QS('p15agentConsoleText')['max-height'] = 'calc(100vh - ' + (81 + xh) + 'px)';
136 + QS('p43iframe')['height'] = 'calc(100vh - ' + (84 + xh) + 'px)';
137 + QS('p43iframe')['max-height'] = 'calc(100vh - ' + (84 + xh) + 'px)';
138 + }
139 +
140 + // We are looking at a single device, remove all the back buttons
141 + if ('{{currentNode}}' != '') {
142 + QV('p10BackButton', false);
143 + QV('p11BackButton', false);
144 + QV('p12BackButton', false);
145 + QV('p13BackButton', false);
146 + QV('p14BackButton', false);
147 + QV('p15BackButton', false);
148 + QV('p16BackButton', false);
149 + }
150 + p1updateInfo();
151 +
152 + // Setup the context menu
153 + document.onclick = function (e) { hideContextMenu(); }
154 + document.onkeypress = ondockeypress;
155 + document.onkeydown = ondockeydown;
156 + document.onkeyup = ondockeyup;
157 + //window.addEventListener('focus', ondocfocus, false);
158 + window.addEventListener('blur', ondocblur, false);
159 + window.onresize = function () { masterUpdate(512); }
160 + setTimeout(function() { masterUpdate(512); }, 200);
161 +
162 + // Connect to the mesh server
163 + meshserver = MeshServerCreateControl(domainUrl, authCookie);
164 + meshserver.onStateChanged = onStateChanged;
165 + meshserver.onMessage = onMessage;
166 + meshserver.trace = (args.trace == 1);
167 + meshserver.Start();
168 +
169 + // Setup page controls
170 + Q('sortselect').selectedIndex = sort = getstore('sort', 0);
171 + Q('sizeselect').selectedIndex = getstore('_viewsize', 1);
172 + Q('SearchInput').value = getstore('_search', '');
173 + showRealNames = (getstore('showRealNames', 0) == 1);
174 + Q('RealNameCheckBox').checked = showRealNames;
175 + Q('viewselect').value = getstore('_deviceView', 1);
176 + Q('DeskControl').checked = (getstore('DeskControl', 1) == 1);
177 + QV('accountChangeEmailAddressSpan', (features & 0x200000) == 0);
178 +
179 + // Display the page devices
180 + masterUpdate(3)
181 + for (var j = 1; j < 5; j++) { Q('devViewButton' + j).classList.remove('viewSelectorSel'); }
182 + Q('devViewButton' + Q('viewselect').value).classList.add('viewSelectorSel');
183 +
184 + // Setup upload drag & drop
185 + Q('p5filetable').addEventListener('drop', p5fileDragDrop, false);
186 + Q('p5filetable').addEventListener('dragover', p5fileDragOver, false);
187 + Q('p5filetable').addEventListener('dragleave', p5fileDragLeave, false);
188 + //Q('p5fileCatchAllInput').addEventListener('drop', p5fileDragDrop, false);
189 + //Q('p5fileCatchAllInput').addEventListener('dragover', p5fileDragOver, false);
190 + //Q('p5fileCatchAllInput').addEventListener('dragleave', p5fileDragLeave, false);
191 +
192 + // Setup upload drag & drop
193 + Q('p13filetable').addEventListener('drop', p13fileDragDrop, false);
194 + Q('p13filetable').addEventListener('dragover', p13fileDragOver, false);
195 + Q('p13filetable').addEventListener('dragleave', p13fileDragLeave, false);
196 +
197 + // Timeline update interval
198 + setInterval(updateDeviceTimeline, 120000); // Check every 2 minutes
199 +
200 + // Load desktop settings
201 + var t = localStorage.getItem('desktopsettings');
202 + if (t != null) { desktopsettings = JSON.parse(t); }
203 + t = localStorage.getItem('multidesktopsettings');
204 + if (t != null) { multidesktopsettings = JSON.parse(t); }
205 + applyDesktopSettings();
206 +
207 + // Terminal special keys
208 + var x = '';
209 + for (var c = 1; c < 27; c++) x += '<option value=\'' + c + '\'>' + "Ctrl" + '-' + String.fromCharCode(64 + c) + ' (' + c + ')</option>';
210 + QH('specialkeylist', x);
211 +
212 + // Setup server stats panels
213 + setupGeneralServerStats();
214 + setupServerTimelineStats();
215 +
216 + // Setup the user interface in the right mode
217 + userInterfaceSelectMenu();
218 +
219 + // If SSPI or LDAP authentication not used, allow batch account creation.
220 + QV('p4UserBatchCreate', (features & 0x00080000) == 0);
221 +
222 + // Set the file editor
223 + d4EditWrapVal = getstore('editorWrap', 0);
224 + d4EditSizeVal = getstore('editorSize', 0);
225 + d4ToggleWrap(true);
226 + d4ToggleSize(true);
227 + }
228 +
229 + // Toggle the web page to full screen
230 + function toggleAspectRatio(toggle) {
231 + if (toggle === 1) { deskAspectRatio = ((deskAspectRatio + 1) % 3); putstore('deskAspectRatio', deskAspectRatio); }
232 + deskAdjust();
233 + }
234 +
235 + // If FullScreen, toggle menu to be horisontal or vertical
236 + function toggleStackMenu(toggle) {
237 + if (webPageFullScreen == true) {
238 + if (toggle === 1) {
239 + webPageStackMenu = !webPageStackMenu;
240 + putstore('webPageStackMenu', webPageStackMenu);
241 + }
242 + if (webPageStackMenu == false) {
243 + QC('body').remove('menu_stack');
244 + } else {
245 + QC('body').add('menu_stack');
246 + if (xxcurrentView >= 10) QC('column_l').remove('room4submenu');
247 + }
248 + deskAdjust();
249 + }
250 + }
251 +
252 + // Toggle user interface menu
253 + function showUserInterfaceSelectMenu() {
254 + Q('uiViewButton1').classList.remove('uiSelectorSel');
255 + Q('uiViewButton2').classList.remove('uiSelectorSel');
256 + Q('uiViewButton3').classList.remove('uiSelectorSel');
257 + Q('uiViewButton4').classList.remove('uiSelectorSel');
258 + try { Q('uiViewButton' + uiMode).classList.add('uiSelectorSel'); } catch (ex) { }
259 + QV('uiMenu', (QS('uiMenu').display == 'none'));
260 + //Q('uiViewButton1').focus();
261 + if (nightMode) { Q('uiViewButton4').classList.add('uiSelectorSel'); }
262 + }
263 +
264 + function userInterfaceSelectMenu(s) {
265 + if (s) { uiMode = s; putstore('uiMode', uiMode); }
266 + webPageFullScreen = (uiMode < 3);
267 + webPageStackMenu = (uiMode > 1);
268 + toggleFullScreen(0);
269 + toggleStackMenu(0);
270 + if (webPageStackMenu && (xxcurrentView >= 10)) { QC('column_l').add('room4submenu'); } else { QC('column_l').remove('room4submenu'); }
271 + }
272 +
273 + function toggleNightMode() {
274 + nightMode = !nightMode;
275 + if (nightMode) { QC('body').add('night'); } else { QC('body').remove('night'); }
276 + putstore('_nightMode', nightMode?'1':'0');
277 + }
278 +
279 + // Toggle the web page to full screen
280 + function toggleFullScreen(toggle) {
281 + if (toggle === 1) { webPageFullScreen = !webPageFullScreen; putstore('webPageFullScreen', webPageFullScreen); }
282 + var hide = 0;
283 + if (args.hide) { hide = parseInt(args.hide); }
284 + if (webPageFullScreen == false) {
285 + QC('body').remove('menu_stack');
286 + QC('body').remove('fullscreen');
287 + QC('body').remove('arg_hide');
288 + if (xxcurrentView >= 10) QC('column_l').add('room4submenu');
289 + QV('UserDummyMenuSpan', false);
290 + //QV('page_leftbar', false);
291 + } else {
292 + QC('body').add('fullscreen');
293 + if (hide & 16) QC('body').add('arg_hide'); // This is replacement for QV('page_leftbar', !(hide & 16));
294 + QV('page_leftbar', !(hide & 16));
295 + QV('MainMenuSpan', !(hide & 16));
296 + if (xxcurrentView >= 10) QC('column_l').remove('room4submenu');
297 + QV('UserDummyMenuSpan', (xxcurrentView < 10) && webPageFullScreen);
298 + }
299 + masterUpdate(512);
300 + QV('body', true);
301 + }
302 +
303 + function getNodeFromId(id) { if (nodes != null) { for (var i in nodes) { if (nodes[i]._id == id) return nodes[i]; } } return null; }
304 + function reload() {
305 + var x = window.location.href;
306 + if (x.endsWith('/#')) { x = x.substring(0, x.length - 2); }
307 + window.location.href = x;
308 + }
309 +
310 + function onStateChanged(server, state, prevState, errorCode) {
311 + if (state == 0) {
312 + // Control web socket disconnected
313 + setDialogMode(0); // Close any dialog boxes if present
314 + go(0); // Go to disconnection panel
315 +
316 + // Clean up
317 + powerTimeline = null;
318 + powerTimelineReq = null;
319 + powerTimelineNode = null;
320 + powerTimelineUpdate = null;
321 + deleteAllNotifications(); // Close and clear notifications if present
322 + hideContextMenu(); // Hide the context menu if present
323 + QV('verifyEmailId2', false);
324 + QV('logoutControl', false);
325 + if (errorCode == 'noauth') { QH('p0span', "Kan authenticatie niet uitvoeren"); return; }
326 + if (prevState == 2) { if (autoReconnect) { setTimeout(serverPoll, 5000); } } else { QH('p0span', "Kan geen websocket aansluiten"); }
327 + if (authCookieRenewTimer != null) { clearInterval(authCookieRenewTimer); authCookieRenewTimer = null; }
328 + } else if (state == 2) {
329 + // Fetch list of meshes, nodes, files
330 + meshserver.send({ action: 'meshes' });
331 + meshserver.send({ action: 'nodes', id: '{{currentNode}}' });
332 + if (pluginHandler != null) { meshserver.send({ action: 'plugins' }); }
333 + if ('{{currentNode}}' == '') { meshserver.send({ action: 'files' }); }
334 + if ('{{viewmode}}' == '') { go(1); }
335 + authCookieRenewTimer = setInterval(function () { meshserver.send({ action: 'authcookie' }); }, 1800000); // Request a cookie refresh every 30 minutes.
336 + }
337 + }
338 +
339 + // Poll the server, if it responds, refresh the page.
340 + function serverPoll() {
341 + var xdr = null;
342 + try { xdr = new XDomainRequest(); } catch (e) { }
343 + if (!xdr) xdr = new XMLHttpRequest();
344 + xdr.open('HEAD', window.location.href);
345 + xdr.timeout = 15000;
346 + xdr.onload = function () { reload(); };
347 + xdr.onerror = xdr.ontimeout = function () { setTimeout(serverPoll, 10000); };
348 + xdr.send();
349 + }
350 +
351 + // Return true if this browser supports clickonce
352 + function detectClickOnce() {
353 + for (var i in window.navigator.mimeTypes) { if (window.navigator.mimeTypes[i].type == 'application/x-ms-application') { return true; } }
354 + var userAgent = window.navigator.userAgent.toUpperCase();
355 + return (userAgent.indexOf('.NET CLR 3.5') >= 0) || (userAgent.indexOf('(WINDOWS NT ') >= 0);
356 + }
357 +
358 + function updateSiteAdmin() {
359 + var noServerBackup = '{{{noServerBackup}}}';
360 + var siteRights = userinfo.siteadmin;
361 + if (noServerBackup == 1) { siteRights &= 0xFFFFFFFA; } // If not server backups allowed, remove server backup and restore permissions
362 +
363 + // Update account actions
364 + QV('p2AccountSecurity', ((features & 4) == 0) && (serverinfo.domainauth == false) && ((features & 4096) != 0)); // Hide Account Security if in single user mode, domain authentication to 2 factor auth not supported.
365 + QV('p2AccountActions', ((features & 4) == 0) && (serverinfo.domainauth == false)); // Hide Account Actions if in single user mode or domain authentication
366 + QV('p2AccountImage', ((features & 4) == 0) && (serverinfo.domainauth == false)); // If account actions are not visible, also remove the image on that panel
367 + QV('p2ServerActions', siteRights & 21);
368 + QV('LeftMenuMyServer', siteRights & 21); // 16 + 4 + 1
369 + QV('MainMenuMyServer', siteRights & 21);
370 + QV('p2ServerActionsBackup', siteRights & 1);
371 + QV('p2ServerActionsRestore', siteRights & 4);
372 + QV('p2ServerActionsVersion', siteRights & 16);
373 + QV('MainMenuMyFiles', siteRights & 8);
374 + QV('LeftMenuMyFiles', siteRights & 8);
375 + if (((siteRights & 8) == 0) && (xxcurrentView == 5)) { setDialogMode(0); go(1); }
376 + if (currentNode != null) { gotoDevice(currentNode._id, xxcurrentView, true); }
377 +
378 + // Update user management state
379 + if ((userinfo.siteadmin & 2) != 0)
380 + {
381 + // We are user administrator
382 + if (users == null) { meshserver.send({ action: 'users' }); }
383 + if (wssessions == null) { meshserver.send({ action: 'wssessioncount' }); }
384 + } else {
385 + // We are not user administrator
386 + users = null;
387 + wssessions = null;
388 + updateUsers();
389 + if (xxcurrentView == 4 || ((xxcurrentView >= 30) && (xxcurrentView < 40))) { setDialogMode(0); go(1); currentUser = null; }
390 + }
391 + meshserver.send({ action: 'events', limit: parseInt(p3limitdropdown.value) });
392 + QV('ServerConsole', userinfo.siteadmin === 0xFFFFFFFF);
393 + QV('ServerTrace', userinfo.siteadmin === 0xFFFFFFFF);
394 + if ((xxcurrentView == 115) && (userinfo.siteadmin != 0xFFFFFFFF)) { go(6); }
395 + if ((xxcurrentView == 6) && ((userinfo.siteadmin & 21) == 0)) { go(1); }
396 +
397 + // If we are site administrator, register to get server statistics
398 + if ((siteRights & 21) != 0) { meshserver.send({ action: 'serverstats', interval: 10000 }); }
399 + }
400 +
401 + // To boost the speed of the web page when even floods occur, this method perform a delayed update on the web page.
402 + var updateNaggleTimer = null;
403 + var updateNaggleFlags = 0;
404 + function masterUpdate(flags) {
405 + updateNaggleFlags |= flags;
406 + if (updateNaggleTimer == null) {
407 + updateNaggleTimer = setTimeout(function () {
408 + if (updateNaggleFlags & 512) { center(); }
409 + if (updateNaggleFlags & 1) { onSearchInputChanged(); }
410 + if (updateNaggleFlags & 2) { onSortSelectChange(false); }
411 + if (updateNaggleFlags & 128) { updateMeshes(); }
412 + if (updateNaggleFlags & 4) { updateDevices(); }
413 + if (updateNaggleFlags & 8) { drawNotifications(); }
414 + {{{StartGeoLocationJS}}}if (updateNaggleFlags & 16) { updateMapMarkers(); }{{{EndGeoLocationJS}}}
415 + if (updateNaggleFlags & 32) { eventsUpdate(); }
416 + {{{StartGeoLocationJS}}}if (updateNaggleFlags & 64) { refreshMap(false, true); }{{{EndGeoLocationJS}}}
417 + if (updateNaggleFlags & 256) { drawDeviceTimeline(); }
418 + if (updateNaggleFlags & 1024) { deviceEventsUpdate(); }
419 + if (updateNaggleFlags & 2048) { userEventsUpdate(); }
420 + if (updateNaggleFlags & 4096) { p20updateMesh(); }
421 + updateNaggleTimer = null;
422 + updateNaggleFlags = 0;
423 + }, 150);
424 + }
425 + }
426 +
427 + var backupCodesWarningDone = false;
428 + function updateSelf() {
429 + QV('verifyEmailId', (userinfo.emailVerified !== true) && (userinfo.email != null) && (serverinfo.emailcheck == true));
430 + QV('verifyEmailId2', (userinfo.emailVerified !== true) && (userinfo.email != null) && (serverinfo.emailcheck == true));
431 + QV('manageOtp', (userinfo.otpsecret == 1) || (userinfo.otphkeys > 0));
432 + QV('authAppSetupCheck', userinfo.otpsecret == 1);
433 + QV('authKeySetupCheck', userinfo.otphkeys > 0);
434 + QV('authCodesSetupCheck', userinfo.otpkeys > 0);
435 + masterUpdate(4 + 128 + 4096);
436 +
437 + // Check if backup codes should really be enabled
438 + if ((backupCodesWarningDone == false) && !(userinfo.otpkeys > 0) && (((userinfo.otpsecret == 1) && !(userinfo.otphkeys > 0)) || ((userinfo.otpsecret != 1) && (userinfo.otphkeys == 1)))) {
439 + var n = { text: "Voeg back-upcodes met twee factoren toe. Als de huidige factor verloren gaat, is er geen manier om dit account te herstellen.", title: "Twee-factor authenticatie" };
440 + addNotification(n);
441 + backupCodesWarningDone = true;
442 + }
443 +
444 + // If we can't create new groups, hide all links that can do that.
445 + var newGroupsAllowed = ((userinfo.siteadmin == 0xFFFFFFFF) || ((userinfo.siteadmin & 64) == 0));
446 + QV('p2createMeshLink1', newGroupsAllowed);
447 + QV('p2createMeshLink2', newGroupsAllowed);
448 + QV('getStarted1', newGroupsAllowed);
449 + QV('getStarted2', !newGroupsAllowed);
450 +
451 + if (typeof userinfo.passchange == 'number') {
452 + if (userinfo.passchange == -1) { QH('p2nextPasswordUpdateTime', " - Reset bij volgende inlog."); }
453 + else if ((passRequirements != null) && (typeof passRequirements.reset == 'number')) {
454 + var seconds = (userinfo.passchange) + (passRequirements.reset * 86400) - Math.floor(Date.now() / 1000);
455 + if (seconds < 0) { QH('p2nextPasswordUpdateTime', " - Reset bij volgende inlog."); }
456 + else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format(" - Reset in {0} minuten{1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
457 + else if (seconds < 86400) { QH('p2nextPasswordUpdateTime', format(" - Reset in {0} uur{1}.", Math.floor(seconds / 3600), addLetterS(Math.floor(seconds / 3600)))); }
458 + else { QH('p2nextPasswordUpdateTime', format(" - Reset in {0} dag(en){1}."), Math.floor(seconds / 86400), addLetterS(Math.floor(seconds / 86400))); }
459 + }
460 + }
461 + }
462 +
463 + function addLetterS(x) { return (x > 1) ? 's' : ''; }
464 + function setSessionActivity() { sessionActivity = Date.now(); QH('idleTimeoutNotify', ''); }
465 + function checkIdleSessionTimeout() {
466 + var delta = (Date.now() - sessionActivity);
467 + if (delta > serverinfo.timeout) { window.location.href = 'logout'; } else {
468 + var ds = Math.round((serverinfo.timeout - delta) / 1000);
469 + if (ds <= 60) {
470 + QH('idleTimeoutNotify', '<br />' + format("{0} seconde {1} tot verbreken", ds, addLetterS(ds)));
471 + } else {
472 + ds = Math.round(ds / 60);
473 + if (ds <= 5) { QH('idleTimeoutNotify', '<br />' + format("{0} minuut {1} tot verbreken", ds, addLetterS(ds))); }
474 + }
475 + }
476 + }
477 +
478 + function onMessage(server, message) {
479 + switch (message.action) {
480 + case 'trace': {
481 + serverTrace.unshift(message);
482 + displayServerTrace();
483 + break;
484 + }
485 + case 'traceinfo': {
486 + if (typeof message.traceSources == 'object') {
487 + if ((message.traceSources != null) && (message.traceSources.length > 0)) {
488 + serverTraceSources = message.traceSources;
489 + QH('p41traceStatus', EscapeHtml(message.traceSources.join(', ')));
490 + } else {
491 + serverTraceSources = [];
492 + QH('p41traceStatus', "Geen");
493 + }
494 + }
495 + break;
496 + }
497 + case 'serverstats': {
498 + updateGeneralServerStats(message);
499 + break;
500 + }
501 + case 'serverwarnings': {
502 + if ((message.warnings != null) && (message.warnings.length > 0)) {
503 + var x = '';
504 + for (var i in message.warnings) { x += '<div style=color:red;padding-bottom:6px><b>' + "Waarschuwing" + message.warnings[i] + '</b></div>'; }
505 + QH('serverWarnings', x);
506 + QV('serverWarningsDiv', true);
507 + }
508 + break;
509 + }
510 + case 'servertimelinestats': {
511 + setServerTimelineStats(message.events);
512 + break;
513 + }
514 + case 'authcookie': {
515 + // Got an authentication cookie refresh
516 + authCookie = message.cookie;
517 + authRelayCookie = message.rcookie;
518 + break;
519 + }
520 + case 'serverinfo': {
521 + serverinfo = message.serverinfo;
522 + if (serverinfo.timeout) { setInterval(checkIdleSessionTimeout, 10000); checkIdleSessionTimeout(); }
523 + if (debugmode == 1) { console.log('Server time: ', printDateTime(new Date(serverinfo.serverTime))); }
524 + break;
525 + }
526 + case 'userinfo': {
527 + userinfo = message.userinfo;
528 + updateSiteAdmin();
529 + updateSelf();
530 + break;
531 + }
532 + case 'users': {
533 + users = {};
534 + for (var m in message.users) { users[message.users[m]._id] = message.users[m]; }
535 + updateUsers();
536 + break;
537 + }
538 + case 'wssessioncount': {
539 + wssessions = message.wssessions;
540 + updateUsers();
541 + break;
542 + }
543 + case 'meshes': {
544 + meshes = {};
545 + for (var m in message.meshes) { meshes[message.meshes[m]._id] = message.meshes[m]; }
546 + masterUpdate(4 + 128);
547 + break;
548 + }
549 + case 'files': {
550 + filetree = setupBackPointers(message.filetree);
551 + updateFiles();
552 + d3updatefiles();
553 + break;
554 + }
555 + case 'nodes': {
556 + nodes = [];
557 + for (var m in message.nodes) {
558 + if (!meshes[m]) { console.log('Invalid mesh (1): ' + m); continue; }
559 + for (var n in message.nodes[m]) {
560 + if (message.nodes[m][n]._id == null) { console.log('Invalid node (' + n + '): ' + JSON.stringify(message.nodes)); continue; }
561 + message.nodes[m][n].namel = message.nodes[m][n].name.toLowerCase();
562 + if (message.nodes[m][n].rname) { message.nodes[m][n].rnamel = message.nodes[m][n].rname.toLowerCase(); } else { message.nodes[m][n].rnamel = message.nodes[m][n].namel; }
563 + message.nodes[m][n].meshnamel = meshes[m].name.toLowerCase();
564 + message.nodes[m][n].meshid = m;
565 + message.nodes[m][n].state = (message.nodes[m][n].state)?(message.nodes[m][n].state):0;
566 + message.nodes[m][n].desc = message.nodes[m][n].desc;
567 + message.nodes[m][n].ip = message.nodes[m][n].ip;
568 + if (!message.nodes[m][n].icon) message.nodes[m][n].icon = 1;
569 + message.nodes[m][n].ident = ++nodeShortIdent;
570 + nodes.push(message.nodes[m][n]);
571 + }
572 + }
573 + masterUpdate(1 | 2 | 4 | 64);
574 +
575 + if (xxcurrentView == -1) { if ('{{viewmode}}' != '') { go(parseInt('{{viewmode}}')); } else { setDialogMode(0); go(1); } }
576 + if ('{{currentNode}}' != '') { gotoDevice('{{currentNode}}',parseInt('{{viewmode}}'));}
577 + break;
578 + }
579 + case 'powertimeline': {
580 + if (message.nodeid != powerTimelineReq) break;
581 + powerTimelineNode = message.nodeid;
582 + powerTimeline = message.timeline;
583 + powerTimelineUpdate = Date.now() + 300000; // Update every 5 minutes
584 + for (var i in powerTimeline) { if (i % 2 == 1) { powerTimeline[i] = powerTimeline[i] * 1000; } } // Decompress time
585 + if (currentNode._id == message.nodeid) { masterUpdate(256); }
586 + break;
587 + }
588 + case 'getsysinfo': {
589 + if (message.nodeid != powerTimelineReq) break;
590 + //console.log('getsysinfo', message); // ***********************
591 + if (message.noinfo === true) {
592 + QH('p17info', "Geen informatie over dit apparaat.");
593 + } else {
594 + var x = '', s = {};
595 + if (message.hardware) {
596 + if (message.hardware.identifiers) {
597 + var ident = message.hardware.identifiers;
598 + // BIOS
599 + x += '<div class=DevSt style=margin-bottom:3px><b>' + "BIOS" + '</b></div>';
600 + if (ident.bios_vendor) { x += addDetailItem("Verkoper", ident.bios_vendor, s); }
601 + if (ident.bios_version) { x += addDetailItem("Versie", ident.bios_version, s); }
602 + x += '<br />';
603 +
604 + // Motherboard
605 + x += '<div class=DevSt style=margin-bottom:3px><b>' + "Moederbord" + '</b></div>';
606 + if (ident.board_vendor) { x += addDetailItem("Verkoper", ident.board_vendor, s); }
607 + if (ident.board_name) { x += addDetailItem("Naam", ident.board_name, s); }
608 + if (ident.board_serial && (ident.board_serial != '')) { x += addDetailItem("Serieel", ident.board_serial, s); }
609 + if (ident.board_version) { x += addDetailItem("Versie", ident.board_version, s); }
610 + if (ident.product_uuid) { x += addDetailItem("Identifier", ident.product_uuid, s); }
611 + x += '<br />';
612 + }
613 +
614 + if (message.hardware.windows) {
615 + if (message.hardware.windows.memory) {
616 + // Memory
617 + x += '<div class=DevSt style=margin-bottom:3px><b>' + "Geheugen" + '</b></div>';
618 +
619 + // Sort Memory
620 + function memorySort(a, b) { if (a.BankLabel > b.BankLabel) return 1; if (a.BankLabel < b.BankLabel) return -1; return 0; }
621 + message.hardware.windows.memory.sort(memorySort);
622 +
623 + x += '<table style=width:100%>';
624 + for (var i in message.hardware.windows.memory) {
625 + var m = message.hardware.windows.memory[i];
626 + x += '<tr><td VALIGN=Top style=width:38px><img src="images/ram2.png" />'
627 + x += '<td><div style=background-color:lightgray;border-radius:5px;padding:8px>';
628 + x += '<div><b>' + m.BankLabel + '</b></div>';
629 + if (m.Capacity) { x += addDetailItem("Capaciteit / snelheid", format("{0} Mb, {1} Mhz", (m.Capacity / 1024 / 1024), m.Speed), s); }
630 + if (m.PartNumber) { x += addDetailItem("Onderdeel nummer", ((m.Manufacturer && m.Manufacturer != 'Undefined')?(m.Manufacturer + ', '):'') + m.PartNumber, s); }
631 + x += '</div>';
632 + }
633 + x += '</table><br />';
634 + }
635 +
636 + if (message.hardware.windows.osinfo) {
637 + // Operating System
638 + var m = message.hardware.windows.osinfo;
639 + x += '<div class=DevSt style=margin-bottom:3px><b>' + "Besturingssysteem" + '</b></div>';
640 + if (m.Caption) { x += addDetailItem("Naam", m.Caption, s); }
641 + if (m.Version) { x += addDetailItem("Versie", m.Version, s); }
642 + if (m.OSArchitecture) { x += addDetailItem("architectuur", m.OSArchitecture, s); }
643 + x += '<br />';
644 + }
645 +
646 + // Disks
647 + //x += '<div class=DevSt style=margin-bottom:3px><b>Disks</b></div>';
648 + //x += '<br />';
649 + }
650 + }
651 +
652 + QH('p17info', x);
653 + }
654 + break;
655 + }
656 + case 'lastconnect': {
657 + var node = getNodeFromId(message.nodeid);
658 + if (node != null) {
659 + node.lastconnect = message.time;
660 + node.lastaddr = message.addr;
661 + if ((currentNode._id == node._id) && (Q('MainComputerState').innerHTML == '')) {
662 + QH('MainComputerState', '<span>' + "Laatst gezien" + '<br />' + printDateTime(new Date(node.lastconnect)) + '</span>');
663 + }
664 + }
665 + break;
666 + }
667 + case 'msg': {
668 + // Check if this is a message from a node
669 + if (message.nodeid != null) {
670 + var index = -1;
671 + if (nodes != null) { for (var i in nodes) { if (nodes[i]._id == message.nodeid) { index = i; break; } } }
672 + if (index != -1) {
673 + // Node was found, dispatch the message
674 + if (message.type == 'console') { p15consoleReceive(nodes[index], message.value, message.source); } // This is a console message.
675 + else if (message.type == 'notify') { // This is a notification message.
676 + var n = getstore('notifications', 0);
677 + if (((n & 8) == 0) && (message.amtMessage != null)) { break; } // Intel AMT desktop & terminal messages should be ignored.
678 + var n = { text: message.value, title: message.title, icon: message.icon };
679 + if (message.nodeid != null) { n.nodeid = message.nodeid; }
680 + if (message.tag != null) { n.tag = message.tag; }
681 + if (message.username != null) { n.username = message.username; }
682 + addNotification(n);
683 + } else if (message.type == 'ps') {
684 + showDeskToolsProcesses(message);
685 + } else if (message.type == 'services') {
686 + showDeskToolsServices(message);
687 + } else if ((message.type == 'getclip') && (xxdialogTag == 'clipboard') && (currentNode != null) && (currentNode._id == message.nodeid)) {
688 + Q('d2clipText').value = message.data;
689 + } else if ((message.type == 'setclip') && (xxdialogTag == 'clipboard') && (currentNode != null) && (currentNode._id == message.nodeid)) {
690 + // Display success/fail on the clipboard dialog box.
691 + QH('dlgClipStatus', message.success ? '<span style=color:green>' + "Geslaagd" + '</span>' : '<span style=color:red>' + "Mislukt" + '</span>')
692 + setTimeout(function () { try { QH('dlgClipStatus', ''); } catch (ex) { } }, 2000);
693 + } else if ((message.type == 'userSessions') && (currentNode != null) && (currentNode._id == message.nodeid) && (desktop == null)) {
694 + // Got list of user sessions
695 + var userSessions = [];
696 + if (message.data != null) { for (var i in message.data) { if ((message.data[i].State == 'Active') || (message.data[i].StationName == 'Console') || (debugmode == 3)) { userSessions.push(message.data[i]); } } }
697 + if (userSessions.length == 0) { connectDesktop(null, 1); } // No active sessions, do a normal connection.
698 + else if (userSessions.length == 1) { connectDesktop(null, 1, userSessions[0].SessionId); } // One active session, connect to it
699 + else {
700 + var x = '';
701 + for (var i in userSessions) {
702 + x += '<div style="text-align:left;cursor:pointer;background-color:gray;margin:5px;padding:5px;border-radius:5px" onclick=connectDesktop(event,1,' + userSessions[i].SessionId + ')>' + userSessions[i].State + ', ' + userSessions[i].StationName;
703 + if (userSessions[i].Username) { if (userSessions[i].Domain) { x += ' - ' + userSessions[i].Domain + '/' + userSessions[i].Username; } else { x += ' - ' + userSessions[i].Username; } }
704 + x += '</div>';
705 + }
706 + QH('p11DeskSessionSelector', x);
707 + QV('p11DeskSessionSelector', true);
708 + }
709 + }
710 + }
711 + } else {
712 + if (message.type == 'notify') { // This is a notification message.
713 + var n = { text: message.value, title: message.title, icon: message.icon };
714 + if (message.tag != null) { n.tag = message.tag; }
715 + if (message.username != null) { n.username = message.username; }
716 + addNotification(n);
717 + }
718 + }
719 + break;
720 + }
721 + case 'getnetworkinfo': {
722 + if ((currentNode._id == message.nodeid) && (xxdialogMode == 2) && (xxdialogTag == 'if' + message.nodeid)) {
723 + if (message.netif == null) {
724 + QH('d2netinfo', "geen netwerkinterface informatie beschikbaar voor dit apparaat.");
725 + } else {
726 + var x = '<div class=dialogText>';
727 +
728 + if (currentNode.lastconnect) { x += addHtmlValue2("Laatste agentverbinding", printDateTime(new Date(currentNode.lastconnect))); }
729 + if (currentNode.lastaddr) {
730 + var splitip = currentNode.lastaddr.split(':');
731 + if (splitip.length > 2) {
732 + // IPv6
733 + x += addHtmlValue2("Laatste agentadres", currentNode.lastaddr + ' <img src="images/link4.png" title="Copy address to clipboard" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(currentNode.lastaddr) + '\") width=10 height=10>');
734 + } else {
735 + // IPv4
736 + if (isPrivateIP(currentNode.lastaddr)) {
737 + x += addHtmlValue2("Laatste agentadres", splitip[0] + ' <img src="images/link4.png" title="' + "Kopieer adres naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(splitip[0]) + '\") width=10 height=10>');
738 + } else {
739 + x += addHtmlValue2("Laatste agentadres", '<a href="https://iplocation.com/?ip=' + splitip[0] + '" rel="noreferrer noopener" target="MeshIPLoopup">' + splitip[0] + '</a> <img src="images/link4.png" title="' + "Kopieer adres naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(splitip[0]) + '\") width=10 height=10>');
740 + }
741 + }
742 + }
743 +
744 + x += addHtmlValue2("Laatste update van interfaces", printDateTime(new Date(message.updateTime)));
745 + for (var i in message.netif) {
746 + var net = message.netif[i];
747 + x += '<hr />'
748 + if (net.name) { x += addHtmlValue2("Naam", '<b>' + EscapeHtml(net.name) + '</b>'); }
749 + if (net.desc) { x += addHtmlValue2("Omschrijving", EscapeHtml(net.desc).replace('(R)', '&reg;').replace('(r)', '&reg;')); }
750 + if (net.dnssuffix) { x += addHtmlValue2("DNS-achtervoegsel", EscapeHtml(net.dnssuffix) + ' <img src="images/link4.png" title="' + "Kopieer de naam naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(net.dnssuffix) + '\") width=10 height=10>'); }
751 + if (net.mac) { x += addHtmlValue2("MAC adres", '<a href="https://dnslytics.com/mac-address-lookup/' + net.mac.substring(0, 6) + '" rel="noreferrer noopener" target="MeshMACLoopup">' + EscapeHtml(net.mac.toLowerCase()) + '</a> <img src="images/link4.png" title="' + "Kopieer MAC adres naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(net.mac.toLowerCase()) + '\") width=10 height=10>'); }
752 + if (net.v4addr) { x += addHtmlValue2("IPv4 adres", EscapeHtml(net.v4addr) + ' <img src="images/link4.png" title="' + "Kopieer adres naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(net.v4addr) + '\") width=10 height=10>'); }
753 + if (net.v4mask) { x += addHtmlValue2("IPv4 mask", EscapeHtml(net.v4mask) + ' <img src="images/link4.png" title="' + "Kopieer adres naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(net.v4mask) + '\") width=10 height=10>'); }
754 + if (net.v4gateway) { x += addHtmlValue2("IPv4 gateway", EscapeHtml(net.v4gateway) + ' <img src="images/link4.png" title="' + "Kopieer adres naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(net.v4gateway) + '\") width=10 height=10>'); }
755 + if (net.gatewaymac) { x += addHtmlValue2("Gateway MAC", '<a href="https://dnslytics.com/mac-address-lookup/' + net.gatewaymac.substring(0, 6) + '" rel="noreferrer noopener" target="MeshMACLoopup">' + EscapeHtml(net.gatewaymac.toLowerCase()) + '</a> <img src="images/link4.png" title="' + "Kopieer MAC adres naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(net.gatewaymac.toLowerCase()) + '\") width=10 height=10>'); }
756 + }
757 + x += '</div>';
758 + QH('d2netinfo', x);
759 + }
760 + }
761 + break;
762 + }
763 + case 'serverversion': {
764 + if ((xxdialogMode == 2) && (xxdialogTag == 'MeshCentralServerUpdate')) {
765 + var x = '<div class=dialogText>';
766 + if (!message.current) { message.current = "Onbekend"; }
767 + if (!message.latest) { message.latest = "Onbekend"; }
768 + x += addHtmlValue2("Huidige versie", '<b>' + EscapeHtml(message.current) + '</b>');
769 + x += addHtmlValue2("Laatste versie", '<b>' + EscapeHtml(message.latest) + '</b>');
770 + x += '</div>';
771 + if ((message.latest.indexOf('.') == -1) || (message.current == message.latest) || ((features & 2048) == 0)) {
772 + setDialogMode(2, "MeshCentral Versie", 1, null, x);
773 + } else {
774 + setDialogMode(2, "MeshCentral Versie", 3, server_showVersionDlgEx, x + '<br /><label><input id=d2updateCheck type=checkbox onclick=server_showVersionDlgUpdate() /> ' + "Controleer en klik op OK om de serverupdate te starten." + '</label>');
775 + server_showVersionDlgUpdate();
776 + }
777 + }
778 + break;
779 + }
780 + case 'servererrors': {
781 + if ((xxdialogMode == 2) && (xxdialogTag == 'MeshCentralServerErrors')) {
782 + if (message.data == null) {
783 + setDialogMode(2, "MeshCentral serverfouten", 1, null, "Server heeft geen foutenlogboek.");
784 + } else {
785 + var x = '<div class="dialogText dialogTextLog"><pre id=d2ServerErrorsLogPre>' + message.data + '<pre></div>';
786 + setDialogMode(2, "MeshCentral serverfouten", 3, server_showErrorsDlgEx, x + '<br /><div style=float:right><img src=images/link4.png height=10 width=10 title="' + "Foutenlogboek downloaden" + '" style=cursor:pointer onclick=d2CopyServerErrorsToClip()></div><div><label><input id=d2updateCheck type=checkbox onclick=server_showVersionDlgUpdate() /> ' + "Controleer en klik op OK om het foutenlogboek te wissen." + '</label></div>');
787 + server_showVersionDlgUpdate();
788 + }
789 + }
790 + break;
791 + }
792 + case 'serverconsole': {
793 + p15consoleReceive('serverconsole', message.value);
794 + break;
795 + }
796 + case 'events': {
797 + if ((message.nodeid != null) && (message.nodeid == currentNode._id)) {
798 + currentDeviceEvents = message.events;
799 + masterUpdate(1024);
800 + } else if ((message.user != null) && (message.user == currentUser.name)) {
801 + currentUserEvents = message.events;
802 + masterUpdate(2048);
803 + } else {
804 + events = message.events;
805 + masterUpdate(32);
806 + }
807 + break;
808 + }
809 + case 'getcookie': {
810 + if (message.tag == 'clickonce') {
811 + var basicPort = '{{{serverRedirPort}}}' == '' ? '{{{serverPublicPort}}}' : '{{{serverRedirPort}}}';
812 + var rdpurl = 'http://' + window.location.hostname + ':' + basicPort + '/clickonce/minirouter/MeshMiniRouter.application?WS=wss%3A%2F%2F' + window.location.hostname + '%2Fmeshrelay.ashx%3Fauth=' + message.cookie + '&CH={{{webcerthash}}}&AP=' + message.protocol + ((debugmode == 1) ? '' : '&HOL=1');
813 + var newWindow = window.open(rdpurl, '_blank');
814 + newWindow.opener = null;
815 + }
816 + break;
817 + }
818 + case 'getNotes': {
819 + var n = Q('d2devNotes');
820 + if (n && (message.id == decodeURIComponent(n.attributes['noteid'].value))) {
821 + if (message.notes) { QH('d2devNotes', decodeURIComponent(message.notes)); } else { QH('d2devNotes', ''); }
822 + var ro = (n.attributes['ro'].value == 'true');
823 + if (ro == false) { // If we have permissions, set read/write on this note.
824 + n.removeAttribute('readonly');
825 + QE('idx_dlgOkButton', true);
826 + QV('idx_dlgOkButton', true);
827 + focusTextBox('d2devNotes');
828 + }
829 + }
830 + break;
831 + }
832 + case 'otpauth-request': {
833 + if ((xxdialogMode == 2) && (xxdialogTag == 'otpauth-request')) {
834 + var secret = message.secret;
835 + if (secret.length == 52) { secret = secret.split(/(.............)/).filter(Boolean).join(' '); }
836 + else if (secret.length == 32) { secret = secret.split(/(....)/).filter(Boolean).join(' '); secret = secret.substring(0, 20) + '<br/>' + secret.substring(20) }
837 + QH('d2optinfo', '<table style=width:380px><tr><td style=vertical-align:top>' + "Installeer <a href=\"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2\" rel=\"noreferrer noopener\" target=_blank> Google Authenticator </a> of een compatibele applicatie en scan de streepjescode, gebruik <a href=\"' + message.url +'\" rel=\"noreferrer noopener\" target=_blank> deze link </a> of voer de link in geheim. Voer vervolgens het huidige 6-cijferige token hieronder in om 2-staps aanmelding te activeren." + '<br /><br />Secret<br /><tt id=d2optsecret secret=\"' + message.secret + '\" style=font-size:12px>' + secret + '</tt><br /><br /></td><td style=width:1px;vertical-align:top><a href=\"' + message.url + '\" rel=\"noreferrer noopener\" target=_blank><div id="qrcode"></div></a></td><tr><td colspan=2 style="text-align:center;border-top:1px solid black"><br />' + "Voer hier het token in voor tweestaps-aanmelding:" + ' <input type=text onkeypress=\"return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)\" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></td></table>');
838 + new QRCode(Q('qrcode'), { text: message.url, width: 128, height: 128, colorDark: '#000000', colorLight: '#EEE', correctLevel: QRCode.CorrectLevel.H });
839 + QV('idx_dlgOkButton', true);
840 + QE('idx_dlgOkButton', false);
841 + Q('d2otpauthinput').focus();
842 + }
843 + break;
844 + }
845 + case 'otpauth-setup': {
846 + if (xxdialogMode) return;
847 + setDialogMode(2, "Verificatie-app", 1, null, message.success ? ('<b style=color:green>' + "Verificatie-app activatie geslaagd" + '</b> ' + "U hebt nu een geldig token nodig om opnieuw in te loggen.") : ('<b style=color:red>' + "Tweestapsverificatie is msilukt." + '</b> ' + "Wis het geheim van de applicatie en probeer het opnieuw. Je hebt maar een paar minuten om de juiste code in te voeren."));
848 + break;
849 + }
850 + case 'otpauth-clear': {
851 + if (xxdialogMode) return;
852 + setDialogMode(2, "Verificatie-app", 1, null, message.success ? ('<b>' + "Verificatie-applicatie verwijderd." + '</b> ' + "U kunt deze functie op elk moment opnieuw activeren.") : ('<b style=color:red>' + "Tweestapsverificatie verwijdering is mislukt." + '</b> ' + "Probeer opnieuw"));
853 + break;
854 + }
855 + case 'otpauth-getpasswords': {
856 + if (xxdialogMode) return;
857 + var x = "Eenmalige tokens kunnen worden gebruikt als secundaire authenticatie. Genereer een set, druk ze af en bewaar ze op een veilige plaats.";
858 + x += '<div style="border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px"><div style="padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold"><table class=selecttext style=width:100%;text-align:center>';
859 + if (message.passwords) {
860 + var j = 0, clipb = '';
861 + for (var i in message.passwords) {
862 + if (++j % 2) { x += '<tr>'; }
863 + var p = '' + message.passwords[i].p;
864 + while (p.length < 8) { p = '0' + p; }
865 + if (message.passwords[i].u === true) {
866 + x += '<td>' + p.substring(0, 4) + '&nbsp;' + p.substring(4);
867 + if (clipb != '') { clipb += ' '; }
868 + clipb += p;
869 + } else {
870 + x += '<td><strike style=color:#BBB>' + p.substring(0, 4) + '&nbsp;' + p.substring(4); + '</strike>';
871 + }
872 + }
873 + } else {
874 + x += '<tr><td>' + "geen actieve tokens";
875 + }
876 + x += '</table></div></div><br />';
877 + x += '<div><input type=button value=' + "Sluiten" + ' onclick=setDialogMode(0) style=float:right></input>';
878 + x += '<input type=button value="' + "Genereer nieuwe tokens" + '" onclick="account_manageOtp(1);"></input>';
879 + if (message.passwords != null) {
880 + x += '<input type=button value="' + "Wis Tokens" + '" onclick="account_manageOtp(2);"></input>';
881 + x += '&nbsp;<img src=images/link4.png height=10 width=10 title="' + "Kopieer de geldige code's naar het klembord" + '" style=cursor:pointer onclick=copyTextToClip2("' + encodeURIComponent(clipb) + '")>';
882 + }
883 + x += '</div><br />';
884 + setDialogMode(2, "Beheer back-up codes", 8, null, x, 'otpauth-manage');
885 + break;
886 + }
887 + case 'otp-hkey-get': {
888 + if (xxdialogMode && (xxdialogTag != 'otpauth-hardware-manage')) return;
889 + var start = '<div style="border-radius:6px;border:2px solid #CCC;background-color:#BBB;width:100%;box-sizing:border-box;margin-bottom:6px"><div style="margin:3px;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-weight:bold"><table style=width:100%;text-align:left>';
890 + var end = '</table></div></div>';
891 + var x = "<a href=\"https://www.yubico.com/\" rel=\"noreferrer noopener\" target=\"_blank\">Hardware sleutels</a> worden gebruikt als secundaire inlogverificatie.";
892 + x += '<div style="max-height:150px;overflow-y:auto;overflow-x:hidden;margin-top:6px;margin-bottom:6px">';
893 + if (message.keys && message.keys.length > 0) {
894 + for (var i in message.keys) {
895 + var key = message.keys[i], type = (key.type == 2)?'OTP':'WebAuthn';
896 + x += start + '<tr style=margin:5px><td style=width:30px><img width=24 height=18 src="images/hardware-key-' + type + '-24.png" style=margin-top:4px><td style=width:250px>' + key.name + '<td><input type=button value="' + "verwijderen" + '" onclick=account_removehkey(' + key.i + ')></input>' + end;
897 + }
898 + } else {
899 + x += start + '<tr style=text-align:center><td>' + "Geen sleutels geconfigureerd" + end;
900 + }
901 + x += '</div>';
902 + x += '<div><input type=button value="' + "Sluiten" + '" onclick=setDialogMode(0) style=float:right></input>';
903 + if ((features & 0x00020000) != 0) { x += '<input id=d2addkey3 type=button value="' + "Sleutel toevoegen" + '" onclick="account_addhkey(3);"></input>'; }
904 + if ((features & 0x00004000) != 0) { x += '<input id=d2addkey2 type=button value="' + "Voeg YubiKey® OTP toe" + '" onclick="account_addhkey(2);"></input>'; }
905 + x += '</div><br />';
906 + setDialogMode(2, "Beheer beveiligingssleutels", 8, null, x, 'otpauth-hardware-manage');
907 + if (u2fSupported() == false) { QE('d2addkey1', false); }
908 + break;
909 + }
910 + case 'otp-hkey-yubikey-add': {
911 + if (message.result) {
912 + meshserver.send({ action: 'otp-hkey-get' }); // Success, ask for the full list of keys.
913 + } else {
914 + setDialogMode(2, "Beveiligingssleutel toevoegen", 1, null, '<br />' + "Fout, kan sleutel niet toevoegen." + '<br /><br />');
915 + }
916 + break;
917 + }
918 + case 'otp-hkey-setup-response': {
919 + if (xxdialogMode && (xxdialogTag != 'otpauth-hardware-manage')) return;
920 + if (message.result == true) {
921 + meshserver.send({ action: 'otp-hkey-get' }); // Success, ask for the full list of keys.
922 + } else {
923 + setDialogMode(2, "Beveiligingssleutel toevoegen", 1, null, '<br />' + "FOUT: kan sleutel niet toevoegen." + '<br /><br />', 'otpauth-hardware-manage');
924 + }
925 + break;
926 + }
927 + case 'webauthn-startregister': {
928 + if (xxdialogMode && (xxdialogTag != 'otpauth-hardware-manage')) return;
929 + var x = "Druk nu op de sleutelknop." + '<br /><br /><div style=width:100%;text-align:center><img width=120 height=117 src="images/hardware-keypress-120.png" /></div><input id=dp1keyname style=display:none value=' + message.name + ' />';
930 + setDialogMode(2, "Beveiligingssleutel toevoegen", 2, null, x);
931 +
932 + var publicKey = message.request;
933 + message.request.challenge = Uint8Array.from(atob(message.request.challenge), function (c) { return c.charCodeAt(0) })
934 + message.request.user.id = Uint8Array.from(atob(message.request.user.id), function (c) { return c.charCodeAt(0) })
935 + navigator.credentials.create({ publicKey: publicKey })
936 + .then(function(newCredentialInfo) {
937 + // Public key credential
938 + var r = { rawId: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.rawId))), response: { attestationObject: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.response.attestationObject))), clientDataJSON: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.response.clientDataJSON))) }, type: newCredentialInfo.type };
939 + meshserver.send({ action: 'webauthn-endregister', response: r });
940 + setDialogMode(0);
941 + }, function(error) {
942 + // Error
943 + setDialogMode(2, "Beveiligingssleutel toevoegen", 1, null, "FOUT:" + error);
944 + });
945 + break;
946 + }
947 + case 'event': {
948 + if (!message.event.nolog) {
949 + if (currentNode && (message.event.nodeid == currentNode._id)) {
950 + // If this event has a nodeid and we are looking at this node, update the log in real time.
951 + currentDeviceEvents.unshift(message.event);
952 + var eventLimit = parseInt(p16limitdropdown.value);
953 + while (currentDeviceEvents.length > eventLimit) { currentDeviceEvents.pop(); } // Remove element(s) at the end
954 + masterUpdate(1024);
955 + }
956 +
957 + if (currentUser && (message.event.userid == currentUser._id)) {
958 + // If this event has a userid and we are looking at this user, update the log in real time.
959 + currentUserEvents.unshift(message.event);
960 + var eventLimit = parseInt(p31limitdropdown.value);
961 + while (currentUserEvents.length > eventLimit) { currentUserEvents.pop(); } // Remove element(s) at the end
962 + masterUpdate(2048);
963 + }
964 +
965 + // Add this event to the master events log.
966 + events.unshift(message.event);
967 + var eventLimit = parseInt(p3limitdropdown.value);
968 + while (events.length > eventLimit) { events.pop(); } // Remove element(s) at the end
969 + masterUpdate(32);
970 + }
971 + if (message.event.noact) break; // Take no action on this event
972 + switch (message.event.action) {
973 + case 'userWebState': {
974 + // New user web state, update the web page as needed
975 + if (localStorage != null) {
976 + var oldShowRealNames = localStorage.getItem('showRealNames');
977 + var oldUiMode = localStorage.getItem('uiMode');
978 + var oldSort = localStorage.getItem('sort');
979 + var oldLoctag = localStorage.getItem('loctag');
980 +
981 + var webstate = JSON.parse(message.event.state);
982 + for (var i in webstate) { localStorage.setItem(i, webstate[i]); }
983 +
984 + // Update the web page
985 + if ((webstate.deskAspectRatio != null) && (webstate.deskAspectRatio != deskAspectRatio)) { deskAspectRatio = webstate.deskAspectRatio; deskAdjust(); }
986 + if ((webstate.showRealNames != null) && (webstate.showRealNames != oldShowRealNames)) { showRealNames = Q('RealNameCheckBox').checked = (webstate.showRealNames == '1'); masterUpdate(6); }
987 + if ((webstate.uiMode != null) && (webstate.uiMode != oldUiMode)) { userInterfaceSelectMenu(parseInt(webstate.uiMode)); }
988 + if ((webstate.sort != null) && (webstate.sort != oldSort)) { document.getElementById('sortselect').selectedIndex = sort = parseInt(webstate.sort); masterUpdate(6); }
989 + if ((webstate.loctag != null) && (webstate.loctag != oldLoctag)) { if (webstate.loctag != null) { args.locale = webstate.loctag; } else { delete args.locale; } masterUpdate(0xFFFFFFFF); }
990 + }
991 + break;
992 + }
993 + case 'servertimelinestats': { addServerTimelineStats(message.event.data); break; }
994 + case 'accountcreate':
995 + case 'accountchange': {
996 + // An account was created or changed
997 + if (userinfo.name == message.event.account.name) {
998 + var newsiteadmin = message.event.account.siteadmin?message.event.account.siteadmin:0;
999 + var oldsiteadmin = userinfo.siteadmin?userinfo.siteadmin:0;
1000 + if ((message.event.account.quota != userinfo.quota) || (((userinfo.siteadmin & 8) == 0) && ((message.event.account.siteadmin & 8) != 0))) { meshserver.send({ action: 'files' }); }
1001 + var oldgroups = userinfo.groups;
1002 + userinfo = message.event.account;
1003 + if (oldsiteadmin != newsiteadmin) updateSiteAdmin();
1004 + updateSelf();
1005 +
1006 + if ((userinfo.siteadmin & 2) != 0) {
1007 + // Compare our groups
1008 + var og = oldgroups ? oldgroups : [];
1009 + var ng = userinfo.groups ? userinfo.groups : [];
1010 + if (og.join(',') != ng.join(',')) {
1011 + // Our groups have changed, re-ask for a list of users.
1012 + users = wssessions = null;
1013 + meshserver.send({ action: 'users' });
1014 + meshserver.send({ action: 'wssessioncount' });
1015 + }
1016 + }
1017 + }
1018 + if (users == null) break;
1019 +
1020 + // Check if the account is part of our user group
1021 + if ((userinfo.groups == null) || (userinfo.groups.length == 0) || (findOne(message.event.account.groups, userinfo.groups) == true)) {
1022 + users[message.event.account._id] = message.event.account; // Part of our groups, update this user.
1023 + } else {
1024 + delete users[message.event.account._id]; // No longer part of our groups, remove this user.
1025 + }
1026 +
1027 + updateUsers();
1028 + break;
1029 + }
1030 + case 'accountremove': {
1031 + // An account was removed
1032 + if (users == null) break;
1033 + delete users['user/' + domain + '/' + message.event.username.toLowerCase()];
1034 + updateUsers();
1035 + break;
1036 + }
1037 + case 'createmesh': {
1038 + // A new mesh was created
1039 + if ((meshes[message.event.meshid] == null) && (message.event.links[userinfo._id] != null)) { // Check if this is a mesh create for a mesh we own. If site administrator, we get all messages so need to ignore some.
1040 + meshes[message.event.meshid] = { _id: message.event.meshid, name: message.event.name, mtype: message.event.mtype, desc: message.event.desc, links: message.event.links };
1041 + masterUpdate(4 + 128);
1042 + meshserver.send({ action: 'files' });
1043 + }
1044 + break;
1045 + }
1046 + case 'meshchange': {
1047 + // Update mesh information
1048 + if (meshes[message.event.meshid] == null) {
1049 + // This is a new mesh for us
1050 + meshes[message.event.meshid] = { _id: message.event.meshid, name: message.event.name, mtype: message.event.mtype, desc: message.event.desc, links: message.event.links };
1051 + meshserver.send({ action: 'nodes' }); // Request a refresh of all nodes (TODO: We could optimize this to only request nodes for the new mesh).
1052 + } else {
1053 + // This is an existing mesh
1054 + if (message.event.name != null) {
1055 + meshes[message.event.meshid].name = message.event.name;
1056 + for (var i in nodes) { if (nodes[i].meshid == message.event.meshid) { nodes[i].meshnamel = message.event.name.toLowerCase(); } }
1057 + }
1058 + if (message.event.desc != null) { meshes[message.event.meshid].desc = message.event.desc; }
1059 + if (message.event.flags != null) { meshes[message.event.meshid].flags = message.event.flags; }
1060 + if (message.event.consent != null) { meshes[message.event.meshid].consent = message.event.consent; }
1061 + if (message.event.links) { meshes[message.event.meshid].links = message.event.links; }
1062 + if (message.event.amt) { meshes[message.event.meshid].amt = message.event.amt; }
1063 +
1064 + // Check if we lost rights to this mesh in this change.
1065 + if (meshes[message.event.meshid].links[userinfo._id] == null) {
1066 + if ((xxcurrentView == 20) && (currentMesh == meshes[message.event.meshid])) go(2);
1067 + delete meshes[message.event.meshid];
1068 +
1069 + // Delete all nodes in that mesh
1070 + var newnodes = [];
1071 + for (var i in nodes) { if (nodes[i].meshid != message.event.meshid) { newnodes.push(nodes[i]); } }
1072 + nodes = newnodes;
1073 +
1074 + // If we are looking at a node in the deleted mesh, move back to "My Devices"
1075 + if (xxcurrentView >= 10 && xxcurrentView < 20 && currentNode && currentNode.meshid == message.event.meshid) { setDialogMode(0); go(1); }
1076 + }
1077 + }
1078 + masterUpdate(4 + 128);
1079 + if (currentNode && (currentNode.meshid == message.event.meshid)) { currentNode = null; if ((xxcurrentView >= 10) && (xxcurrentView < 20)) { go(1); } }
1080 + //meshserver.send({ action: 'files' }); // TODO: Why do we need to do this??
1081 +
1082 + // If we are looking at a mesh that is now deleted, move back to "My Account"
1083 + if (xxcurrentView == 20 && currentMesh._id == message.event.meshid) { masterUpdate(4096); }
1084 + break;
1085 + }
1086 + case 'deletemesh': {
1087 + // Delete the mesh
1088 + if (meshes[message.event.meshid]) {
1089 + delete meshes[message.event.meshid];
1090 + masterUpdate(128);
1091 + meshserver.send({ action: 'files' });
1092 + }
1093 +
1094 + // Delete all nodes in that mesh
1095 + var newnodes = [];
1096 + if (nodes != null) { for (var i in nodes) { if (nodes[i].meshid != message.event.meshid) { newnodes.push(nodes[i]); } } }
1097 + nodes = newnodes;
1098 + masterUpdate(4);
1099 +
1100 + // If we are looking at a mesh that is now deleted, move back to "My Account"
1101 + if (xxcurrentView >= 20 && xxcurrentView < 30 && currentMesh._id == message.event.meshid) { setDialogMode(0); go(2); }
1102 + // If we are looking at a node in the deleted mesh, move back to "My Devices"
1103 + if (xxcurrentView >= 10 && xxcurrentView < 20 && currentNode && currentNode.meshid == message.event.meshid) { setDialogMode(0); go(1); }
1104 +
1105 + break;
1106 + }
1107 + case 'addnode': {
1108 + var node = message.event.node;
1109 + if (!meshes[node.meshid]) break; // This is a node for a mesh we don't know. Happens when we are site administrator, we get all messages.
1110 + if (getNodeFromId(node._id) != null) break; // This node is already known.
1111 + node.namel = node.name.toLowerCase();
1112 + if (node.rname) { node.rnamel = node.rname.toLowerCase(); } else { node.rnamel = node.namel; }
1113 + node.meshnamel = meshes[node.meshid].name.toLowerCase();
1114 + node.state = 0;
1115 + if (!node.icon) node.icon = 1;
1116 + node.ident = ++nodeShortIdent;
1117 + if (nodes == null) { }
1118 + nodes.push(node);
1119 +
1120 + // Web page update
1121 + masterUpdate(1 | 2 | 4 | 16);
1122 +
1123 + break;
1124 + }
1125 + case 'removenode': {
1126 + var index = -1;
1127 + for (var i in nodes) { if (nodes[i]._id == message.event.nodeid) { index = i; break; } }
1128 + if (index != -1) {
1129 + var node = nodes[index];
1130 + if (currentNode == node) {
1131 + if (xxcurrentView >= 10 && xxcurrentView < 20) { setDialogMode(0); go(1); }
1132 + currentNode = null;
1133 + // TODO: Correctly disconnect from this node (Desktop/Terminal/Files...)
1134 + }
1135 + nodes.splice(index, 1);
1136 +
1137 + // Web page update
1138 + masterUpdate(4 | 16);
1139 + }
1140 + break;
1141 + }
1142 + case 'changenode': {
1143 + var index = -1;
1144 + for (var i in nodes) { if (nodes[i]._id == message.event.nodeid) { index = i; break; } }
1145 + if (index != -1) {
1146 + var node = nodes[index];
1147 +
1148 + // Change the node
1149 + node.name = message.event.node.name;
1150 + node.rname = message.event.node.rname;
1151 + node.users = message.event.node.users;
1152 + node.host = message.event.node.host;
1153 + node.desc = message.event.node.desc;
1154 + node.ip = message.event.node.ip;
1155 + node.osdesc = message.event.node.osdesc;
1156 + node.publicip = message.event.node.publicip;
1157 + node.iploc = message.event.node.iploc;
1158 + node.wifiloc = message.event.node.wifiloc;
1159 + node.gpsloc = message.event.node.gpsloc;
1160 + node.tags = message.event.node.tags;
1161 + node.userloc = message.event.node.userloc;
1162 + if (message.event.node.agent != null) {
1163 + if (node.agent == null) node.agent = {};
1164 + if (message.event.node.agent.ver != null) { node.agent.ver = message.event.node.agent.ver; }
1165 + if (message.event.node.agent.id != null) { node.agent.id = message.event.node.agent.id; }
1166 + if (message.event.node.agent.caps != null) { node.agent.caps = message.event.node.agent.caps; }
1167 + if (message.event.node.agent.core != null) { node.agent.core = message.event.node.agent.core; } else { if (node.agent.core) { delete node.agent.core; } }
1168 + node.agent.tag = message.event.node.agent.tag;
1169 + }
1170 + if (message.event.node.intelamt != null) {
1171 + if (node.intelamt == null) node.intelamt = {};
1172 + if (message.event.node.intelamt.state != null) { node.intelamt.state = message.event.node.intelamt.state; }
1173 + if (message.event.node.intelamt.host != null) { node.intelamt.user = message.event.node.intelamt.host; }
1174 + if (message.event.node.intelamt.user != null) { node.intelamt.user = message.event.node.intelamt.user; }
1175 + if (message.event.node.intelamt.tls != null) { node.intelamt.tls = message.event.node.intelamt.tls; }
1176 + if (message.event.node.intelamt.ver != null) { node.intelamt.ver = message.event.node.intelamt.ver; }
1177 + if (message.event.node.intelamt.tag != null) { node.intelamt.tag = message.event.node.intelamt.tag; }
1178 + if (message.event.node.intelamt.uuid != null) { node.intelamt.uuid = message.event.node.intelamt.uuid; }
1179 + if (message.event.node.intelamt.realm != null) { node.intelamt.realm = message.event.node.intelamt.realm; }
1180 + }
1181 + if (message.event.node.av != null) { node.av = message.event.node.av; }
1182 + node.namel = node.name.toLowerCase();
1183 + if (node.rname) { node.rnamel = node.rname.toLowerCase(); } else { node.rnamel = node.namel; }
1184 + if (message.event.node.icon) { node.icon = message.event.node.icon; }
1185 +
1186 + // Web page update
1187 + masterUpdate(2 | 4 | 8 | 16);
1188 + refreshDevice(node._id);
1189 +
1190 + if ((currentNode == node) && (xxdialogMode != null) && (xxdialogTag == '@xxmap')) { p10showNodeLocationDialog(); }
1191 + }
1192 + break;
1193 + }
1194 + case 'nodemeshchange': {
1195 + var index = -1;
1196 + for (var i in nodes) { if (nodes[i]._id == message.event.nodeid) { index = i; break; } }
1197 + if (index != -1) {
1198 + var node = nodes[index];
1199 + if (meshes[message.event.newMeshId] == null) {
1200 + // We don't see the new mesh, remove this device
1201 +
1202 + // TODO: Correctly disconnect from this node (Desktop/Terminal/Files...)
1203 + if (currentNode == node) { if (xxcurrentView >= 10 && xxcurrentView < 20) { setDialogMode(0); go(1); } currentNode = null; }
1204 + nodes.splice(index, 1);
1205 + masterUpdate(4 | 16);
1206 + } else {
1207 + // We see the new mesh, move this device
1208 + node.meshid = message.event.newMeshId;
1209 + node.meshnamel = meshes[message.event.newMeshId].name.toLowerCase();
1210 + masterUpdate(1 | 2 | 4);
1211 + }
1212 + refreshDevice(message.event.nodeid);
1213 + } else {
1214 + // This is a new device, add it.
1215 + var node = message.event.node;
1216 + if (!meshes[node.meshid]) break; // This is a node for a mesh we don't know. Happens when we are site administrator, we get all messages.
1217 + node.namel = node.name.toLowerCase();
1218 + if (node.rname) { node.rnamel = node.rname.toLowerCase(); } else { node.rnamel = node.namel; }
1219 + node.meshnamel = meshes[node.meshid].name.toLowerCase();
1220 + node.state = 0;
1221 + if (!node.icon) node.icon = 1;
1222 + node.ident = ++nodeShortIdent;
1223 + if (nodes == null) { }
1224 + nodes.push(node);
1225 +
1226 + // Web page update
1227 + masterUpdate(1 | 2 | 4 | 16);
1228 + }
1229 + break;
1230 + }
1231 + case 'nodeconnect': {
1232 + // Indicated a node has changed connectivity state
1233 + var index = -1;
1234 + for (var i in nodes) { if (nodes[i]._id == message.event.nodeid) { index = i; break; } }
1235 + if (index != -1) {
1236 + var node = nodes[index];
1237 +
1238 + // Event the connection change if needed
1239 + var n = getstore('notifications', 0); // Account notification settings
1240 +
1241 + // Per-group notification settings
1242 + if (message.event.meshid && userinfo.links && userinfo.links[message.event.meshid] && userinfo.links[message.event.meshid].notify) {
1243 + n &= userinfo.links[message.event.meshid].notify;
1244 + } else {
1245 + n = 0;
1246 + }
1247 +
1248 + // Show the notification
1249 + if (n & 2) {
1250 + if (((node.conn & 1) == 0) && ((message.event.conn & 1) != 0)) { addNotification({ text: "Agent verbonden", title: node.name, icon: node.icon, nodeid: node._id }); }
1251 + if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { addNotification({ text: "Intel AMT gedetecteerd", title: node.name, icon: node.icon, nodeid: node._id }); }
1252 + if (((node.conn & 4) == 0) && ((message.event.conn & 4) != 0)) { addNotification({ text: "Intel AMT CIRA verbonden", title: node.name, icon: node.icon, nodeid: node._id }); }
1253 + if (((node.conn & 16) == 0) && ((message.event.conn & 16) != 0)) { addNotification({ text: "MQTT verbonden", title: node.name, icon: node.icon, nodeid: node._id }); }
1254 + }
1255 + if (n & 4) {
1256 + if (((node.conn & 1) != 0) && ((message.event.conn & 1) == 0)) { addNotification({ text: "Agent niet verbonden", title: node.name, icon: node.icon, nodeid: node._id }); }
1257 + if (((node.conn & 2) != 0) && ((message.event.conn & 2) == 0)) { addNotification({ text: "Intel AMT niet gedetecteerd", title: node.name, icon: node.icon, nodeid: node._id }); }
1258 + if (((node.conn & 4) != 0) && ((message.event.conn & 4) == 0)) { addNotification({ text: "Intel AMT CIRA verbroken", title: node.name, icon: node.icon, nodeid: node._id }); }
1259 + if (((node.conn & 16) != 0) && ((message.event.conn & 16) == 0)) { addNotification({ text: "MQTT verbroken", title: node.name, icon: node.icon, nodeid: node._id }); }
1260 + }
1261 +
1262 + // Change the node connection state
1263 + node.conn = message.event.conn;
1264 + node.pwr = message.event.pwr;
1265 +
1266 + // Web page update
1267 + masterUpdate(4 | 16);
1268 + refreshDevice(node._id);
1269 + }
1270 + break;
1271 + }
1272 + case 'wssessioncount': {
1273 + // Update the active web socket session count for a user
1274 + if (wssessions != null) {
1275 + if (message.event.count == 0 && wssessions['user/' + domain + '/' + message.event.username.toLowerCase()]) {
1276 + delete wssessions['user/' + domain + '/' + message.event.username.toLowerCase()];
1277 + } else {
1278 + wssessions['user/' + domain + '/' + message.event.username.toLowerCase()] = message.event.count;
1279 + }
1280 + updateUsers();
1281 + }
1282 + break;
1283 + }
1284 + case 'login': {
1285 + // Update the last login time
1286 + if (users != null && users['user/' + domain + '/' + message.event.username.toLowerCase()]) {
1287 + users['user/' + domain + '/' + message.event.username.toLowerCase()].login = Math.floor(new Date(message.event.time).getTime() / 1000);
1288 + }
1289 + break;
1290 + }
1291 + case 'scanamtdevice': {
1292 + // Populate the Intel AMT scan dialog box with the result of the RMCP scan
1293 + if ((xxdialogMode == null) || (!Q('dp1range')) || (Q('dp1range').value != message.event.range)) return;
1294 + var x = '';
1295 + if (message.event.results == null) {
1296 + // The scan could not occur because of an error. Likely the user range was invalid.
1297 + x = '<div style=width:100%;text-align:center;margin-top:12px>' + "Kan dit adresbereik niet scannen." + '</div><div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>' + "Voorbeeld van IP-bereikwaarden <br /> 192.168.0.100 <br /> 192.168.1.0/24 <br /> 192.167.0.1-192.168.0.100" + '</div>';
1298 + } else {
1299 + // Go thru all the results and populate the dialog box
1300 + amtScanResults = message.event.results;
1301 + for (var i in message.event.results) {
1302 + var r = message.event.results[i], shortname = r.hostname;
1303 + if (shortname.length > 20) { shortname = shortname.substring(0, 20) + '...'; }
1304 + var str = '<b title="' + EscapeHtml(r.hostname) + '">' + EscapeHtml(shortname) + '</b> - v' + r.ver;
1305 + if (r.state == 2) { if (r.tls == 1) { str += " met TLS."; } else { str += "zonder TLS."; } } else { str += ' not activated.'; }
1306 + x += '<div style=width:100%;margin-bottom:2px;background-color:lightgray><div style=padding:4px><div style=display:inline-block;margin-right:5px><input class=DevScanCheckbox name=dp1checkbox tag="' + EscapeHtml(i) + '" type=checkbox onclick=addAmtScanToMeshCheckbox() /></div><div class=j1 style=display:inline-block></div><div style=display:inline-block;margin-left:5px;overflow-x:auto;white-space:nowrap>' + str + '</div></div></div>';
1307 + }
1308 + // If no results where found, display a nice message
1309 + if (x == '') { x = '<div style=width:100%;text-align:center;margin-top:12px>Scan returned no results.</div><div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>Sample IP range values<br />192.168.0.100<br />192.168.1.0/24<br />192.167.0.1-192.168.0.100</div>'; }
1310 + }
1311 + // Set the html in the dialog box and re-enable the scan button
1312 + QH('dp1results', x);
1313 + QE('dp1range', true);
1314 + QE('dp1rangebutton', true);
1315 + break;
1316 + }
1317 + case 'notify': {
1318 + var n = { text: message.event.value, title: message.event.title, icon: message.event.icon };
1319 + if (message.event.tag != null) { n.tag = message.event.tag; }
1320 + addNotification(n);
1321 + break;
1322 + }
1323 + case 'traceinfo': {
1324 + if (typeof message.event.traceSources == 'object') {
1325 + if ((message.event.traceSources != null) && (message.event.traceSources.length > 0)) {
1326 + serverTraceSources = message.event.traceSources;
1327 + QH('p41traceStatus', EscapeHtml(message.event.traceSources.join(', ')));
1328 + } else {
1329 + serverTraceSources = [];
1330 + QH('p41traceStatus', "Geen");
1331 + }
1332 + }
1333 + break;
1334 + }
1335 + case 'sysinfohash': {
1336 + // If the sysinfo document has changed and we are looking at it, request an update.
1337 + if ((currentNode != null) && (message.event.nodeid == powerTimelineReq)) {
1338 + meshserver.send({ action: 'getsysinfo', nodeid: message.event.nodeid });
1339 + }
1340 + break;
1341 + }
1342 + case 'stopped': { // Server is stopping.
1343 + // Disconnect
1344 + //console.log(message.msg);
1345 + break;
1346 + }
1347 + case 'updatePluginList': {
1348 + installedPluginList = message.event.list;
1349 + updatePluginList();
1350 + break;
1351 + }
1352 + case 'pluginStateChange': {
1353 + if (pluginHandler == null) break;
1354 + pluginHandler.refreshPluginHandler();
1355 + break;
1356 + }
1357 + case 'plugin': {
1358 + if (pluginHandler == null) break;
1359 + try { pluginHandler[message.event.plugin][message.event.pluginaction](message); } catch (e) { console.log("PluginHandler could not event message: ", e); }
1360 + break;
1361 + }
1362 + default:
1363 + //console.log('Unknown message.event.action', message.event.action);
1364 + break;
1365 + }
1366 + break;
1367 + }
1368 + case 'createInviteLink': { // Agent installation invitation link
1369 + if (xxdialogTag != message.meshid) break;
1370 + var servername = serverinfo.name;
1371 + if ((servername.indexOf('.') == -1) || ((features & 2) != 0)) { servername = window.location.hostname; } // If the server name is not set or it's in LAN-only mode, use the URL hostname as server name.
1372 + var domainUrlNoSlash = domainUrl.substring(0, domainUrl.length - 1);
1373 + var url;
1374 + if (serverinfo.https == true) {
1375 + var portStr = (serverinfo.port == 443) ? '' : (':' + serverinfo.port);
1376 + url = 'https://' + servername + portStr + domainUrl + 'agentinvite?c=' + message.cookie;
1377 + } else {
1378 + var portStr = (serverinfo.port == 80) ? '' : (':' + serverinfo.port);
1379 + url = 'http://' + servername + portStr + domainUrl + 'agentinvite?c=' + message.cookie;
1380 + }
1381 + Q('agentInvitationLink').href = url;
1382 + var t = format("{0} uur{1}", message.expire, addLetterS(message.expire));
1383 + if (message.expire == 24) { t = "1 dag"; }
1384 + if (message.expire == 168) { t = "1 week"; }
1385 + if (message.expire == 5040) { t = "1 maand"; }
1386 + if (message.expire == 0) { t = "Ongelimiteerd"; }
1387 + QH('agentInvitationLink', format("Uitnodigingslink ({0})", t));
1388 + QV('agentInvitationLinkDiv', true);
1389 + break;
1390 + }
1391 + case 'getmqttlogin': {
1392 + if ((currentNode == null) || (currentNode._id != message.nodeid) || (xxdialogMode != null)) return;
1393 + var x = "Deze instellingen kunnen worden gebruikt om MQTT voor dit apparaat te verbinden." + '<br /><br />';
1394 + delete message.action;
1395 + delete message.nodeid;
1396 + x += '<textarea readonly=readonly style=width:100%;resize:none;height:100px;overflow:auto;font-size:12px readonly>' + JSON.stringify(message) + '</textarea>';
1397 + /*
1398 + x += addHtmlValue('Username', '<input style=width:230px readonly value="' + message.user + '" />');
1399 + x += addHtmlValue('Password', '<input style=width:230px readonly value="' + message.pass + '" />');
1400 + x += addHtmlValue('WS URL', '<input style=width:230px readonly value="' + message.wsUrl + '" />');
1401 + if (message.mpsUrl && message.mpsCertHash) {
1402 + x += addHtmlValue('MPS URL', '<input style=width:230px readonly value="' + message.mpsUrl + '" />');
1403 + x += addHtmlValue('MPS Cert Hash', '<input style=width:230px readonly value="' + message.mpsCertHash + '" />');
1404 + }
1405 + */
1406 + setDialogMode(2, "MQTT referenties", 1, null, x);
1407 + break;
1408 + }
1409 + case 'stopped': { // Server is stopping.
1410 + // Disconnect
1411 + autoReconnect = false;
1412 + QH('p0span', message.msg);
1413 + break;
1414 + }
1415 + case 'updatePluginList': {
1416 + installedPluginList = message.list;
1417 + updatePluginList();
1418 + break;
1419 + }
1420 + case 'pluginVersionsAvailable': {
1421 + if (pluginHandler == null) break;
1422 + updatePluginList(message.list);
1423 + break;
1424 + }
1425 + case 'downgradePluginVersions': {
1426 + var vSelect = '<select id="lastPluginVersion">';
1427 + message.info.versionList.forEach(function(v) { vSelect += '<option value="' + v.zipball_url + '">' + v.name + '</option>'; });
1428 + vSelect += '</select>';
1429 + setDialogMode(2, "Plugin Actie", 3, pluginActionEx, format('Select the version to downgrade the plugin: {0}', message.info.name) + '<hr />' + vSelect + '<hr />' + "Houd er rekening mee dat downgraden niet wordt aanbevolen. Doe dit alleen als een recente upgrade iets heeft gebroken." + + '<input id="lastPluginAct" type="hidden" value="downgrade" /><input id="lastPluginId" type="hidden" value="' + message.info.id + '" />');
1430 + break;
1431 + }
1432 + case 'pluginError': {
1433 + setDialogMode(2, "Plugin fout", 1, null, message.msg);
1434 + break;
1435 + }
1436 + case 'plugin': {
1437 + if ((pluginHandler == null) || (typeof message.plugin != 'string')) break;
1438 + try { pluginHandler[message.plugin][message.method](server, message); } catch (e) { console.log('Error loading plugin handler ('+ e + ')'); }
1439 + break;
1440 + }
1441 + default:
1442 + //console.log('Unknown message.action', message.action);
1443 + break;
1444 + }
1445 + }
1446 +
1447 + //
1448 + // MY DEVICES
1449 + //
1450 +
1451 + function onRealNameCheckBox() {
1452 + showRealNames = Q('RealNameCheckBox').checked;
1453 + putstore('showRealNames', showRealNames ? 1 : 0);
1454 + masterUpdate(6);
1455 + return;
1456 + }
1457 +
1458 + function onDeviceViewChange(i) {
1459 + if (i != null) { Q('viewselect').value = i; }
1460 + for (var j = 1; j < 5; j++) { Q('devViewButton' + j).classList.remove('viewSelectorSel'); }
1461 + Q('devViewButton' + Q('viewselect').value).classList.add('viewSelectorSel');
1462 + putstore('_deviceView', Q('viewselect').value);
1463 + putstore('_viewsize', Q('sizeselect').value);
1464 + masterUpdate(4);
1465 + setTimeout(function () { masterUpdate(512); }, 200);
1466 + }
1467 +
1468 + function ondockeypress(e) {
1469 + setSessionActivity();
1470 + if (!xxdialogMode && xxcurrentView == 11 && desktop && Q('DeskControl').checked) {
1471 + // Check what keys we are allows to send
1472 + if (currentNode != null) {
1473 + var mesh = meshes[currentNode.meshid];
1474 + var meshrights = mesh.links[userinfo._id].rights;
1475 + var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
1476 + if (inputAllowed == false) return false;
1477 + var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));
1478 + if (limitedInputAllowed == true) { if ((e.altKey == true) || (e.ctrlKey == true) || ((e.keyCode < 32) && (e.keyCode != 8) && (e.keyCode != 13)) || (e.keyCode > 90)) return false; }
1479 + }
1480 + return desktop.m.handleKeys(e);
1481 + }
1482 + if (!xxdialogMode && xxcurrentView == 12 && terminal && terminal.State == 3) { return terminal.m.TermHandleKeys(e); }
1483 + if (!xxdialogMode && ((xxcurrentView == 15) || (xxcurrentView == 115))) return agentConsoleHandleKeys(e);
1484 + if (!xxdialogMode && xxcurrentView == 4) {
1485 + if (e.ctrlKey == true || e.altKey == true || e.metaKey == true) return;
1486 + var processed = 0;
1487 + if (e.key) {
1488 + if (e.key.length === 1 && userSearchFocus == 0) { Q('UserSearchInput').value = ((Q('UserSearchInput').value + e.key)); processed = 1; }
1489 + if (e.keyCode == 8 && userSearchFocus == 0) { var x = Q('UserSearchInput').value; Q('UserSearchInput').value = x.substring(0, x.length - 1); processed = 1; }
1490 + if (e.keyCode == 27) { Q('UserSearchInput').value = ''; processed = 1; }
1491 + } else {
1492 + if (e.charCode != 0 && userSearchFocus == 0) { Q('UserSearchInput').value = ((Q('UserSearchInput').value + String.fromCharCode(e.charCode))); processed = 1; }
1493 + }
1494 + if (processed > 0) { if (processed == 1) { onUserSearchInputChanged(); } return haltEvent(e); }
1495 + }
1496 + if (xxdialogMode || xxcurrentView != 1) return;
1497 + if (e.ctrlKey == true && e.charCode == 96) {
1498 + showRealNames = !showRealNames;
1499 + Q('RealNameCheckBox').value = showRealNames;
1500 + putstore('showRealNames', showRealNames ? 1 : 0);
1501 + masterUpdate(6)
1502 + return;
1503 + }
1504 + if (e.ctrlKey == true || e.altKey == true || e.metaKey == true) return;
1505 + if (Q('viewselect').value < 3) {
1506 + var processed = 0;
1507 + if (e.key) {
1508 + if (e.key.length === 1 && searchFocus == 0) { Q('SearchInput').value = ((Q('SearchInput').value + e.key)); processed = 1; }
1509 + if (e.keyCode == 8 && searchFocus == 0) { var x = Q('SearchInput').value; Q('SearchInput').value = x.substring(0, x.length - 1); processed = 1; }
1510 + if (e.keyCode == 27) { Q('SearchInput').value = ''; processed = 1; }
1511 + } else {
1512 + if (e.charCode != 0 && searchFocus == 0) { Q('SearchInput').value = ((Q('SearchInput').value + String.fromCharCode(e.charCode))); processed = 1; }
1513 + }
1514 + if (processed > 0) { if (processed == 1) { masterUpdate(5); } return haltEvent(e); }
1515 + }
1516 + if (Q('viewselect').value == 3) {
1517 + if (e.key) {
1518 + if (e.key.length === 1 && mapSearchFocus == 0) { Q('mapSearchLocation').value = ((Q('mapSearchLocation').value + e.key)); processed = 1; }
1519 + //if (e.keyCode == 8 && mapSearchFocus == 0) { var x = Q('mapSearchLocation').value; Q('mapSearchLocation').value = x.substring(0, x.length - 1); processed = 1; }
1520 + if (e.keyCode == 27) { Q('mapSearchLocation').value = ''; mapCloseSearchWindow(); processed = 1; }
1521 + if (e.keyCode == 13) { getSearchLocation(); }
1522 + } else {
1523 + if (e.charCode != 0 && mapSearchFocus == 0) { Q('mapSearchLocation').value = ((Q('mapSearchLocation').value + String.fromCharCode(e.charCode))); processed = 1; }
1524 + }
1525 + }
1526 + }
1527 +
1528 + function ondockeydown(e) {
1529 + setSessionActivity();
1530 + if (!xxdialogMode && xxcurrentView == 11 && desktop && Q('DeskControl').checked) {
1531 + // Check what keys we are allows to send
1532 + if (currentNode != null) {
1533 + var mesh = meshes[currentNode.meshid];
1534 + var meshrights = mesh.links[userinfo._id].rights;
1535 + var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
1536 + if (inputAllowed == false) return false;
1537 + var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));
1538 + if (limitedInputAllowed == true) { if ((e.altKey == true) || (e.ctrlKey == true) || ((e.keyCode < 32) && (e.keyCode != 8) && (e.keyCode != 13)) || (e.keyCode > 90)) return false; }
1539 + }
1540 + return desktop.m.handleKeyDown(e);
1541 + }
1542 + if (!xxdialogMode && xxcurrentView == 12 && terminal && terminal.State == 3) { terminal.m.TermHandleKeyDown(e); if ((e.keyCode >= 37) && (e.keyCode <= 40)) { haltEvent(e); } }
1543 + if (!xxdialogMode && xxcurrentView == 13 && e.keyCode == 116 && p13filetree != null) { haltEvent(e); return false; } // F5 Refresh on files
1544 + if (!xxdialogMode && ((xxcurrentView == 15) || (xxcurrentView == 115))) { return agentConsoleHandleKeys(e); }
1545 + if (!xxdialogMode && xxcurrentView == 4) {
1546 + if (e.keyCode === 8 && userSearchFocus == 0) { var x = Q('UserSearchInput').value; Q('UserSearchInput').value = (x.substring(0, x.length - 1)); processed = 1; }
1547 + if (e.keyCode === 27) { Q('UserSearchInput').value = ''; processed = 1; }
1548 + if (processed > 0) { if (processed == 1) { masterUpdate(5); } return haltEvent(e); }
1549 + }
1550 + if (xxdialogMode || xxcurrentView != 1 || e.ctrlKey == true || e.altKey == true || e.metaKey == true) return;
1551 + var processed = 0;
1552 + if (Q('viewselect').value < 3) {
1553 + if (e.keyCode === 8 && searchFocus == 0) { var x = Q('SearchInput').value; Q('SearchInput').value = (x.substring(0, x.length - 1)); processed = 1; }
1554 + if (e.keyCode === 27) { Q('SearchInput').value = ''; processed = 1; }
1555 + if (processed > 0) { if (processed == 1) { masterUpdate(5); } return haltEvent(e); }
1556 + }
1557 + if (Q('viewselect').value == 3) {
1558 + if (e.keyCode === 8 && mapSearchFocus == 0) { var x = Q('mapSearchLocation').value; Q('mapSearchLocation').value = (x.substring(0, x.length - 1)); processed = 1; }
1559 + if (e.keyCode === 27) { Q('mapSearchLocation').value = ''; mapCloseSearchWindow(); processed = 1; }
1560 + }
1561 + }
1562 +
1563 + function ondockeyup(e) {
1564 + setSessionActivity();
1565 + if (!xxdialogMode && xxcurrentView == 11 && desktop && Q('DeskControl').checked) {
1566 + // Check what keys we are allows to send
1567 + if (currentNode != null) {
1568 + var mesh = meshes[currentNode.meshid];
1569 + var meshrights = mesh.links[userinfo._id].rights;
1570 + var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
1571 + if (inputAllowed == false) return false;
1572 + var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));
1573 + if (limitedInputAllowed == true) { if ((e.altKey == true) || (e.ctrlKey == true) || ((e.keyCode < 32) && (e.keyCode != 8) && (e.keyCode != 13)) || (e.keyCode > 90)) return false; }
1574 + }
1575 + return desktop.m.handleKeyUp(e);
1576 + }
1577 + if (!xxdialogMode && xxcurrentView == 12 && terminal && terminal.State == 3) { return terminal.m.TermHandleKeyUp(e); }
1578 + if (!xxdialogMode && xxcurrentView == 13 && e.keyCode == 116 && p13filetree != null) { p13folderup(9999); haltEvent(e); return false; } // F5 Refresh on files
1579 + if (!xxdialogMode && xxcurrentView == 4) { if ((e.keyCode === 8 && searchFocus == 0) || e.keyCode === 27) { return haltEvent(e); } }
1580 + if (xxdialogMode && e.keyCode == 27) { dialogclose(0); }
1581 + if (xxdialogMode || xxcurrentView != 0 || e.ctrlKey == true || e.altKey == true || e.metaKey == true) return;
1582 + if (Q('viewselect').value < 3) { if ((e.keyCode === 8 && searchFocus == 0) || e.keyCode === 27) { return haltEvent(e); } }
1583 + if (Q('viewselect').value == 3) { if ((e.keyCode === 8 && mapSearchFocus == 0) || e.keyCode === 27) { return haltEvent(e); } }
1584 + }
1585 +
1586 + //function ondocfocus() { }
1587 + // TODO: Add handleReleaseKeys() for Intel AMT.
1588 + function ondocblur() { if (!xxdialogMode && xxcurrentView == 11 && desktop && Q('DeskControl').checked && desktop.m.handleReleaseKeys) { return desktop.m.handleReleaseKeys(); } }
1589 +
1590 + // Highlights the device being hovered
1591 + function devMouseHover(element, over) {
1592 + setSessionActivity();
1593 + var view = Q('viewselect').value;
1594 + if (view == 1) {
1595 + var e = element.children[1].children[1];
1596 + e.children[0].classList.remove('g1s');
1597 + e.children[1].classList.remove('e2s');
1598 + e.children[2].classList.remove('g2s');
1599 + if (over == 1) {
1600 + e.children[0].classList.add('g1s');
1601 + e.children[1].classList.add('e2s');
1602 + e.children[2].classList.add('g2s');
1603 + }
1604 + } else if (view == 2) {
1605 + var e = element;
1606 + e.children[2].classList.remove('g1s');
1607 + e.children[4].classList.remove('e2s');
1608 + e.children[3].classList.remove('g2s');
1609 + if (over == 1) {
1610 + e.children[2].classList.add('g1s');
1611 + e.children[4].classList.add('e2s');
1612 + e.children[3].classList.add('g2s');
1613 + }
1614 + }
1615 + }
1616 +
1617 + var deviceHeaderId = 0;
1618 + var deviceHeaderTotal = 0;
1619 + var deviceHeadersTitles = {};
1620 + var deviceHeaderCount;
1621 + var deviceHeaders = {};
1622 + var oldviewmode = 0;
1623 + function updateDevices() {
1624 + if (nodes == null) { return; }
1625 + var r = '', c = 0, current = null, count = 0, displayedMeshes = {}, view = Q('viewselect').value, groups = {}, groupCount = {};
1626 + QV('xdevices', view < 4);
1627 + QV('xdevicesmap', view == 4);
1628 + QV('devListToolbar', view < 3);
1629 + QV('kvmListToolbar', view == 3);
1630 + QV('devMapToolbar', view == 4);
1631 + QV('devListToolbarSize', view == 3);
1632 + QV('NoMeshesPanel', meshcount == 0);
1633 + //QV('devListToolbarView', (meshcount != 0) && (nodes.length > 0));
1634 + QV('devListToolbarViewIcons', (meshcount != 0) && (nodes.length > 0));
1635 + QV('devListToolbarSort', (meshcount != 0) && (nodes.length > 0) && (view < 4));
1636 + if ((meshcount == 0) || (nodes.length == 0)) { view = 1; sort = 0; }
1637 + if (view == 4) {
1638 + setTimeout( function() { if (xxmap.map != null) { xxmap.map.updateSize(); } }, 200);
1639 + // TODO
1640 + } else {
1641 + // 3 wide, list view or desktop view
1642 + deviceHeaderId = 0;
1643 + deviceHeaderCount = {};
1644 + deviceHeaderTotal = 0;
1645 + deviceHeaders = {};
1646 + deviceHeadersTitles = {};
1647 + var kvmDivs = [];
1648 +
1649 + // Perform node sort
1650 + if (sort == 0) { nodes.sort(meshSort); }
1651 + else if (sort == 1) { nodes.sort(powerSort); }
1652 + else if (sort == 2) { if (showRealNames == true) { nodes.sort(deviceHostSort); } else { nodes.sort(deviceSort); } }
1653 +
1654 + // Save the list of currently checked nodeid's
1655 + var checkedNodeids = [], elements = document.getElementsByClassName('DeviceCheckbox'), checkcount = 0;
1656 + for (var i=0;i<elements.length;i++) { if (elements[i].checked) { checkedNodeids.push(elements[i].value); } }
1657 + if ((oldviewmode < 3) && (view == 3)) { multiDesktopFilter = checkedNodeids; }
1658 + else if ((oldviewmode == 3) && (view < 3)) { checkedNodeids = multiDesktopFilter; }
1659 +
1660 + // Compute the width of the device view.
1661 + var totalDeviceViewWidth = Q('column_l').clientWidth - 60;
1662 + var deviceBoxWidth = Math.floor(totalDeviceViewWidth / 301);
1663 + deviceBoxWidth = 301 + Math.floor((totalDeviceViewWidth - (deviceBoxWidth * 301)) / deviceBoxWidth);
1664 +
1665 + if ((view == 2) && (sort != 3)) {
1666 + r += '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Gebruiker" + '<th style=color:gray;width:120px>' + "Adres" + '<th style=color:gray;width:100px>' + "connectiviteit"; //<th style=color:gray;width:100px>State';
1667 + }
1668 +
1669 + // Go thru the list of nodes and display them
1670 + for (var i in nodes) {
1671 + var node = nodes[i];
1672 + if (node.v == false) continue;
1673 + var mesh2 = meshes[node.meshid], meshlinks = mesh2.links[userinfo._id];
1674 + if (meshlinks == null) continue;
1675 + var meshrights = meshlinks.rights;
1676 + if ((view == 3) && (mesh2.mtype == 1)) continue;
1677 + if (sort == 0) {
1678 + // Mesh header
1679 + if (node.meshid != current) {
1680 + deviceHeaderSet();
1681 + var extra = '';
1682 + if (view == 2) { r += '<tr><td colspan=5>'; }
1683 + if (meshes[node.meshid].mtype == 1) { extra = '<span class=devHeaderx>' + ", Intel&reg; AMT alleen" + '</span>'; }
1684 + if ((view == 1) && (current != null)) { if (c == 2) { r += '<td><div style=width:301px></div></td>'; } if (r != '') { r += '</tr></table>'; } }
1685 + if (view == 2) { r += '<div>'; }
1686 + r += '<div class=DevSt style=width:100%;padding-top:4px><span style=float:right>';
1687 + r += '<span id=DevxHeader' + deviceHeaderId + ' class=devHeaderx></span>' + extra;
1688 + r += '</span><span id=MxMESH tabindex=0 style=cursor:pointer onclick=gotoMesh("' + node.meshid + '") onkeypress="if (event.key==\'Enter\') gotoMesh(\'' + node.meshid + '\')">' + EscapeHtml(meshes[node.meshid].name) + '</span>' + getMeshActions(mesh2, meshrights) + '</div>';
1689 + if (view == 2) { r += '</div>'; }
1690 + current = node.meshid;
1691 + displayedMeshes[current] = 1;
1692 + c = 0;
1693 + }
1694 + } else if (sort == 1) {
1695 + // Power header
1696 + var pwr = node.pwr?node.pwr:0;
1697 + if (pwr !== current) {
1698 + deviceHeaderSet();
1699 + if ((view == 1) && (current !== null)) { if (c == 2) { r += '<td><div style=width:301px></div></td>'; } if (r != '') { r += '</tr></table>'; } }
1700 +
1701 + if (view == 2) { r += '<tr><td>'; }
1702 + r += '<div class=DevSt style=width:100%;padding-top:4px><span id=DevxHeader' + deviceHeaderId + ' class=devHeaderx style=float:right></span><span>' + PowerStateStr2(node.pwr) + '</span></div>';
1703 +
1704 + current = pwr;
1705 + c = 0;
1706 + }
1707 + } else if (sort == 2) {
1708 + // Device header
1709 + if (current == null) { current = '1'; }
1710 + }
1711 +
1712 + count++;
1713 + var title = EscapeHtml(node.name);
1714 + if (title.length == 0) { title = '<i>' + "Geen" + '</i>'; }
1715 + if ((node.rname != null) && (node.rname.length > 0)) { title += ' / ' + EscapeHtml(node.rname); }
1716 + var name = EscapeHtml(node.name);
1717 + if (showRealNames == true && node.rname != null) name = EscapeHtml(node.rname);
1718 + if (name.length == 0) { name = '<i>' + "Geen" + '</i>'; }
1719 +
1720 + // Node
1721 + var icon = node.icon;
1722 + if ((!node.conn) || (node.conn == 0)) { icon += ' gray'; }
1723 + if (view == 1) {
1724 + r += '<div id=devs onmouseover=devMouseHover(this,1) onmouseout=devMouseHover(this,0) style=display:inline-block;width:' + deviceBoxWidth + 'px;height:50px;padding-top:1px;padding-bottom:1px><div style=width:22px;height:50%;float:left;padding-top:12px><input class="' + node.meshid + ' DeviceCheckbox" onclick=p1updateInfo() value=devid_' + node._id + ' type=checkbox></div><div style=height:100%;cursor:pointer tabindex=0 onclick=gotoDevice(\'' + node._id + '\',null,null,event) onkeypress="if (event.key==\'Enter\') gotoDevice(\'' + node._id + '\',null,null,event)"><div class="i' + icon + '" style=width:50px;float:left></div><div style=height:100%><div class=g1></div><div class=e2><div class=e1 style=width:' + (deviceBoxWidth - 100) + 'px title="' + title + '">' + name + '</div><div>' + NodeStateStr(node) + '</div></div><div class=g2></div></div></div></div>';
1725 + } else if (view == 2) {
1726 + var states = [];
1727 + if (node.conn) {
1728 + if ((node.conn & 1) != 0) { states.push('<span title=\"' + "Mesh-agent is verbonden en klaar voor gebruik." + '\">' + "Agent" + '</span>'); }
1729 + if ((node.conn & 2) != 0) { states.push('<span title=\"' + "Intel® AMT CIRA is verbonden en klaar voor gebruik." + '\">' + "CIRA" + '</span>'); }
1730 + else if ((node.conn & 4) != 0) { states.push('<span title=\"' + "Intel® AMT is routeerbaar." + '\">' + "AMT" + '</span>'); }
1731 + if ((node.conn & 8) != 0) { states.push('<span title=\"' + "Mesh-agent is bereikbaar met een andere agent als relay." + '\">' + "Relay" + '</span>'); }
1732 + if ((node.conn & 16) != 0) { states.push('<span title=\"' + "MQTT verbinding met het apparaat is actief." + '\">' + "MQTT" + '</span>'); }
1733 + }
1734 + r += '<tr><td><div id=devs class=bar18 tabindex=0 onmouseover=devMouseHover(this,1) onmouseout=devMouseHover(this,0) style=height:18px;width:100%;font-size:medium onkeypress="if (event.key==\'Enter\') gotoDevice(\'' + node._id + '\',null,null,event)">';
1735 + r += '<div class=deviceBarCheckbox><input class="' + node.meshid + ' DeviceCheckbox" onclick=p1updateInfo() value=devid_' + node._id + ' type=checkbox></div>';
1736 + r += '<div class=deviceBarIcon onclick=gotoDevice(\'' + node._id + '\',null,null,event)><div class=\"j' + icon + '\" style=width:16px;margin-top:1px;margin-left:2px;height:16px></div></div>';
1737 + r += '<div class=g1 style=height:18px;float:left></div><div class=g2 style=height:18px;float:right></div>';
1738 + r += '<div style=cursor:pointer;font-size:14px title="' + title + '" onclick=gotoDevice(\'' + node._id + '\',null,null,event)><span style=width:300px>' + name + '</span></div></div></td>';
1739 + r += '<td style=text-align:center>' + getUserShortStr(node);
1740 + r += '<td style=text-align:center>' + (node.ip != null ? node.ip : '');
1741 + r += '<td style=text-align:center>' + states.join('&nbsp;+&nbsp;');
1742 + //r += '<td style=text-align:center>' + (node.pwr != null ? powerStateStrings[node.pwr] : '');
1743 + r += '</tr>';
1744 + } else if ((view == 3) && (node.conn & 1) && (((meshrights & 8) || (meshrights & 256)) != 0) && ((node.agent.caps & 1) != 0)) { // Check if we have rights and agent is capable of KVM.
1745 + if ((multiDesktopFilter) && ((multiDesktopFilter.length == 0) || (multiDesktopFilter.indexOf('devid_' + node._id) >= 0))) {
1746 + r += '<div id=devs style=display:inline-block;margin:1px;background-color:lightgray;border-radius:5px;position:relative><div tabindex=0 style=padding:3px;cursor:pointer onclick=gotoDevice(\'' + node._id + '\',11,null,event) onkeypress="if (event.key==\'Enter\') gotoDevice(\'' + node._id + '\',11,null,event)">';
1747 + //r += '<input class="' + node.meshid + ' DeviceCheckbox" onclick=p1updateInfo() value=devid_' + node._id + ' type=checkbox style=float:left>';
1748 + r += '<div class="j' + icon + '" style=width:16px;float:left></div>&nbsp;' + name + '</div>';
1749 + r += '<span onclick=gotoDevice(\'' + node._id + '\',null,null,event)></span><div id=xkvmid_' + node._id.split('/')[2] + '><div id=skvmid_' + node._id.split('/')[2] + ' tabindex=0 style="position:absolute;color:white;left:5px;top:27px;text-shadow:0px 0px 5px #000;z-index:1000;cursor:default" onclick=toggleKvmDevice(\'' + node._id + '\') onkeypress="if (event.key==\'Enter\') toggleKvmDevice(\'' + node._id + '\')">' + "Verbroken" + '</div></div>';
1750 + r += '</div>';
1751 + kvmDivs.push(node._id);
1752 + }
1753 + }
1754 +
1755 + // If we are displaying devices by group, put the device in the right group.
1756 + if ((sort == 3) && (r != '')) {
1757 + if (node.tags) {
1758 + for (var j in node.tags) {
1759 + var tag = node.tags[j];
1760 + if (groups[tag] == null) { groups[tag] = r; groupCount[tag] = 1; } else { groups[tag] += r; groupCount[tag] += 1; }
1761 + if (view == 3) break;
1762 + }
1763 + }
1764 + r = '';
1765 + }
1766 +
1767 + deviceHeaderTotal++;
1768 + if (typeof deviceHeaderCount[node.state] == 'undefined') { deviceHeaderCount[node.state] = 1; } else { deviceHeaderCount[node.state]++; }
1769 + }
1770 +
1771 + // Above 32 devices, gray out the auto connect feature.
1772 + if (kvmDivs.length >= 32) { Q('autoConnectDesktopCheckbox').checked = false; }
1773 + QE('autoConnectDesktopCheckbox', kvmDivs.length < 32);
1774 +
1775 + // If displaying devices by groups, sort the group names and display the devices.
1776 + if (sort == 3) {
1777 + if (view == 2) { r = '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Gebruiker" + '<th style=color:gray;width:120px>' + "Adres" + '<th style=color:gray;width:100px>' + "connectiviteit"; }
1778 +
1779 + var groupNames = [];
1780 + for (var i in groups) { groupNames.push(i); }
1781 + groupNames.sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()); });
1782 + for (var j in groupNames) {
1783 + var i = groupNames[j];
1784 + if (view == 2) {
1785 + r += '<tr><td colspan=4><div class=DevSt style=width:100%;padding-top:4px><span class=devHeaderx style=float:right>' + groupCount[i] + ' node' + ((groupCount[i] > 1) ? 's' : '') + '</span><span>' + i + '</span></div>' + groups[i];
1786 + } else {
1787 + r += '<div class=DevSt style=width:100%;padding-top:4px><span class=devHeaderx style=float:right>' + groupCount[i] + ' node' + ((groupCount[i] > 1) ? 's' : '') + '</span><span>' + i + '</span></div>' + groups[i];
1788 + }
1789 + }
1790 + }
1791 +
1792 + // If there is nothing to display, explain the problem
1793 + if ((r == '') && (meshcount > 0) && (Q('SearchInput').value != '')) {
1794 + if (sort == 3) {
1795 + r = '<div style="margin:30px">' + "Er zijn geen apparaten opgenomen in groepen, klik op een apparaat \"Groepen\" om toe te voegen aan een groep." + '</div>';
1796 + } else {
1797 + r = '<div style="margin:30px">' + "Geen apparaten die overeenkomen met deze zoekopdracht." + '</div>';
1798 + }
1799 + }
1800 +
1801 + if ((view == 1) && (c == 2)) r += '<td><div style=width:301px></div></td>'; // Adds device padding
1802 +
1803 + // Display all empty device groups, we need to do this because users can add devices to these at any time.
1804 + if ((sort == 0) && (Q('SearchInput').value == '') && (view < 3)) {
1805 + for (var i in meshes) {
1806 + var mesh = meshes[i], meshlink = mesh.links[userinfo._id];
1807 + if (meshlink != null) {
1808 + var meshrights = meshlink.rights;
1809 + if (displayedMeshes[mesh._id] == null) {
1810 + if ((current != '') && (r != '')) { r += '</tr></table>'; }
1811 + r += '<table style=width:100%;padding-top:4px cellpadding=0 cellspacing=0><tr><td colspan=3 class=DevSt><span id=MxMESH style=cursor:pointer onclick=gotoMesh("' + mesh._id + '")>' + EscapeHtml(mesh.name) + '</span><span>';
1812 + r += getMeshActions(mesh, meshrights);
1813 + r += '</span></td></tr><tr>';
1814 + if (mesh.mtype == 1) {
1815 + r += '<td><div style=padding:10px><i>' + "Geen Intel&reg; AMT-apparaten in deze mesh";
1816 + if ((meshrights & 4) != 0) { r += ', <a href=# style=cursor:pointer onclick=\'return addDeviceToMesh(\"' + mesh._id + '\")\'>' + "Voeg toe" + '</a>'; }
1817 + }
1818 + if (mesh.mtype == 2) {
1819 + r += '<td><div style=padding:10px><i>' + "Geen apparaten in deze groep";
1820 + if ((meshrights & 4) != 0) { r += ', <a href=# style=cursor:pointer onclick=\'return addAgentToMesh(\"' + mesh._id + '\")\'>' + "Voeg toe" + '</a>'; }
1821 + }
1822 + r += '.</i></div></td>';
1823 + current = mesh._id;
1824 + count++;
1825 + }
1826 + }
1827 + }
1828 + }
1829 + r += '</tr></table><div style=height:1px></div>'; // This height of 1 div fixes a problem in Linux firefox browsers
1830 +
1831 + // Add a "Add Device Group" option
1832 + r += '<div style=border-top-style:solid;border-top-width:1px;border-top-color:#DDDDDD;cursor:pointer;font-size:10px>';
1833 + if ((view < 3) && (sort == 0) && (meshcount > 0) && ((userinfo.siteadmin == 0xFFFFFFFF) || ((userinfo.siteadmin & 64) == 0))) {
1834 + r += '<a href=# onclick="return account_createMesh()" title=\"' + "Maak een nieuwe apparaatgroep." + '\" style=cursor:pointer>' + "Apparaatgroep toevoegen" + '</a>&nbsp';
1835 + }
1836 + if ((userinfo.siteadmin == 0xFFFFFFFF) || ((userinfo.siteadmin & 128) == 0)) {
1837 + r += '<a href=# onclick=\'return p10showMeshCmdDialog(0)\' style=cursor:pointer title=\"' + "Download MeshCmd, een opdrachtregelprogramma dat vele functies uitvoert." + '\">' + "MeshCmd" + '</a>&nbsp';
1838 + if (navigator.platform.toLowerCase() == 'win32') { r += '<a href=# onclick=\'return p10showMeshRouterDialog()\' style=cursor:pointer title=\"' + "Download MeshCentral Router, een hulpmiddel voor het toewijzen van TCP-poorten." + '\">' + "Router" + '</a>&nbsp'; }
1839 + }
1840 + r += '</div><br/>';
1841 +
1842 + QH('xdevices', r);
1843 + deviceHeaderSet();
1844 +
1845 + // Re-check nodeid's
1846 + var elements = document.getElementsByClassName('DeviceCheckbox'), checkcount = 0;
1847 + if (checkedNodeids) { for (var i=0;i<elements.length;i++) { elements[i].checked = (checkedNodeids.indexOf(elements[i].value) >= 0); } }
1848 +
1849 + for (var i in deviceHeaders) { QH(i, deviceHeaders[i]); }
1850 + for (var i in deviceHeadersTitles) { Q(i).title = deviceHeadersTitles[i]; }
1851 + p1updateInfo();
1852 +
1853 + // Take care of KVM surfaces in desktop view mode
1854 + if (view == 3) {
1855 + // Figure out and adjust the size to fill the width of the div
1856 + var vsize = [{ x: 180, y: 101 }, { x: 302, y: 169 }, { x: 454, y: 255 }][Q('sizeselect').selectedIndex];
1857 + //var realw = vsize.x + 2, tw = Q('xdevices').clientWidth - 30, xw = Math.floor(tw / realw);
1858 + var realw = vsize.x + 2, tw = totalDeviceViewWidth - 5, xw = Math.floor(tw / realw);
1859 + xw = realw + Math.floor((tw - (xw * realw)) / xw);
1860 + vsize.y = vsize.y * (xw / vsize.x);
1861 + vsize.x = xw;
1862 +
1863 + for (var i in multiDesktop) { multiDesktop[i].xxdelete = true; }
1864 + for (var i in kvmDivs) {
1865 + var id = kvmDivs[i], shortid = id.split('/')[2], desk = multiDesktop[id];
1866 + if (desk != null) {
1867 + // This device already has a canvas, use it.
1868 + desk.m.CanvasId.setAttribute('style', 'background-color:black;width:' + vsize.x + 'px;height:' + vsize.y + 'px');
1869 + Q('xkvmid_' + shortid).appendChild(desk.m.CanvasId);
1870 + delete desk.xxdelete;
1871 + QH('skvmid_' + shortid, ["Verbroken", "Verbinden...", "Setup...", '', ''][((desk.m.State == null)?desk.m.state:desk.m.State)]);
1872 + } else {
1873 + var node = getNodeFromId(id);
1874 + if ((desktopNode == node) && (desktop != null)) { // Check if the main desktop is this device, if it is, use that.
1875 + // This device already has a canvas, use it.
1876 + var c = desktop.m.CanvasId;
1877 + c.setAttribute('id', 'kvmid_' + shortid);
1878 + c.setAttribute('style', 'background-color:black;width:' + vsize.x + 'px;height:' + vsize.y + 'px');
1879 + c.setAttribute('onclick', 'toggleKvmDevice(\'' + id + '\')');
1880 + c.removeAttribute('onmousedown');
1881 + c.removeAttribute('onmouseup');
1882 + c.removeAttribute('onmousemove');
1883 + Q('xkvmid_' + shortid).appendChild(c);
1884 + QH('skvmid_' + shortid, ["Verbroken", "Verbinden...", "Setup...", '', ''][((desktop.m.State == null)?desktop.m.state:desktop.m.State)]);
1885 + if (desktop.m.SendCompressionLevel) { desktop.m.SendCompressionLevel(1, multidesktopsettings.quality, multidesktopsettings.scaling, multidesktopsettings.framerate); }
1886 + desktop.shortid = shortid;
1887 + desktop.onStateChanged = onMultiDesktopStateChange;
1888 + multiDesktop[id] = desktop;
1889 + desktop = desktopNode = currentNode = null;
1890 + // Setup a replacement desktop
1891 + QH('DeskParent', '<canvas id="Desk" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>');
1892 + } else {
1893 + // This is a new device, create a canvas for it.
1894 + var c = document.createElement('canvas');
1895 + c.setAttribute('id', 'kvmid_' + shortid);
1896 + c.setAttribute('width', 640);
1897 + c.setAttribute('height', 480);
1898 + c.setAttribute('oncontextmenu', 'return false');
1899 + c.setAttribute('style', 'background-color:black;width:' + vsize.x + 'px;height:' + vsize.y + 'px');
1900 + c.setAttribute('onclick', 'toggleKvmDevice(\'' + id + '\')');
1901 + try { Q('xkvmid_' + shortid).appendChild(c); } catch (ex) {}
1902 + // Check if we need to auto-connect
1903 + if (Q('autoConnectDesktopCheckbox').checked == true) { setTimeout(function() { connectMultiDesktop(node, 1); }, 100); }
1904 + }
1905 + }
1906 + }
1907 + for (var i in multiDesktop) {
1908 + // If a device is no longer viewed, disconnect it.
1909 + if (multiDesktop[i].xxdelete == true) { multiDesktop[i].Stop(); delete multiDesktop[i]; }
1910 + else if (debugmode && multiDesktop[i].m && multiDesktop[i].m.onScreenSizeChange) {
1911 + mdeskAdjust(multiDesktop[i].m, multiDesktop[i].m.ScreenWidth, multiDesktop[i].m.ScreenHeight, multiDesktop[i].m.CanvasId); // Adjust screen size change
1912 + }
1913 + }
1914 + deskAdjust();
1915 + } else {
1916 + disconnectAllKvmFunction();
1917 + Q('autoConnectDesktopCheckbox').checked = false;
1918 + }
1919 + }
1920 + oldviewmode = view;
1921 + }
1922 +
1923 + function toggleKvmDevice(node) {
1924 + if (typeof node == 'string') { node = getNodeFromId(node); } // Convert nodeid to node if needed
1925 + var mesh = meshes[node.meshid], meshrights = mesh.links[userinfo._id].rights;
1926 + if ((meshrights & 8) || (meshrights & 256)) { // Requires remote control rights or desktop view only rights
1927 + //var conn = 0;
1928 + //if ((node.conn & 1) != 0) { conn = 1; } else if ((node.conn & 6) != 0) { conn = 2; } // Check what type of connect we can do (Agent vs AMT)
1929 + if (node.conn & 1) { connectMultiDesktop(node, 1); }
1930 + }
1931 + }
1932 +
1933 + function getUserShortStr(node) {
1934 + if (node == null || node.users == null || node.users.length == 0) return '';
1935 + if (node.users.length > 1) { return '<span title="' + EscapeHtml(node.users.join(', ')) + '">' + nobreak(format("{0} gebruikers", node.users.length)) + '</span>'; }
1936 + var u = node.users[0], su = u, i = u.indexOf('\\');
1937 + if (i > 0) { su = u.substring(i + 1); }
1938 + su = EscapeHtml(su);
1939 + if (su.length > 15) { su = su.substring(0, 14) + '&#8230;'; }
1940 + return '<span title="' + EscapeHtml(u) + '">' + su + '</span>';
1941 + }
1942 +
1943 + function autoConnectDesktops() { if (Q('autoConnectDesktopCheckbox').checked == true) { connectAllKvmFunction(); } }
1944 + function connectAllKvmFunction(force) {
1945 + if (xxdialogMode) return false;
1946 + if (force !== true) { // We need to count how many devices will need to be connected, if it's a lot, prompt first.
1947 + var count = 0;
1948 + for (var i in nodes) {
1949 + var node = nodes[i], nodeid = nodes[i]._id;
1950 + if (multiDesktop[nodeid] == null) {
1951 + var mesh = meshes[node.meshid], meshrights = mesh.links[userinfo._id].rights;
1952 + if ((meshrights & 8) || (meshrights & 256)) { // Requires remote control rights or desktop view only rights
1953 + //var conn = 0;
1954 + //if ((node.conn & 1) != 0) { conn = 1; } else if ((node.conn & 6) != 0) { conn = 2; } // Check what type of connect we can do (Agent vs AMT)
1955 + if (node.conn & 1) { count++; }
1956 + }
1957 + }
1958 + }
1959 + if (count > 8) { setDialogMode(2, "Alles verbinden", 3, function() { connectAllKvmFunction(true); }, format("Weet u zeker dat u verbinding wilt maken met {0} -apparaten?", count)); return; }
1960 + }
1961 +
1962 + // Perform connect all
1963 + for (var i in nodes) { if (multiDesktop[nodes[i]._id] == null) { toggleKvmDevice(nodes[i]._id); } }
1964 + }
1965 + function disconnectAllKvmFunction() { if (xxdialogMode) return false; for (var nodeid in multiDesktop) { multiDesktop[nodeid].Stop(); } multiDesktop = {}; }
1966 + function onMultiDesktopStateChange(desk, state) { try { QH('skvmid_' + desk.shortid, ["Verbroken", "Verbinden...", "Setup...", '', ''][state]); } catch (ex) {} }
1967 +
1968 + function showMultiDesktopSettings() {
1969 + QV('d7amtkvm', false);
1970 + QV('d7meshkvm', true);
1971 + d7bitmapquality.value = multidesktopsettings.quality;
1972 + d7bitmapscaling.value = multidesktopsettings.scaling;
1973 + if (multidesktopsettings.framerate) { d7framelimiter.value = multidesktopsettings.framerate; } else { d7framelimiter.value = 1000; }
1974 + setDialogMode(7, "Instellingen extern bureaublad", 3, showMultiDesktopSettingsChanged);
1975 + }
1976 +
1977 + function showMultiDesktopSettingsChanged() {
1978 + multidesktopsettings.quality = d7bitmapquality.value;
1979 + multidesktopsettings.scaling = d7bitmapscaling.value;
1980 + multidesktopsettings.framerate = d7framelimiter.value;
1981 + localStorage.setItem('multidesktopsettings', JSON.stringify(multidesktopsettings));
1982 + // Make changes to all current connections
1983 + for (var i in multiDesktop) { multiDesktop[i].m.SendCompressionLevel(1, multidesktopsettings.quality, multidesktopsettings.scaling, multidesktopsettings.framerate); }
1984 + }
1985 +
1986 + function connectMultiDesktop(node, contype) {
1987 + var nodeid = node._id, shortid = nodeid.split('/')[2];
1988 + var desk = multiDesktop[nodeid];
1989 + if (desk == null) {
1990 + if (Q('kvmid_' + shortid) == null) return; // Check if this device is being displayed, if not, exit now.
1991 + if (contype == 2) {
1992 + // Setup the Intel AMT remote desktop
1993 + if ((node.intelamt.user == null) || (node.intelamt.user == '')) { return; }
1994 + desk = CreateAmtRedirect(CreateAmtRemoteDesktop('kvmid_' + shortid), authCookie);
1995 + desk.shortid = shortid;
1996 + //desk.debugmode = debugmode;
1997 + desk.onStateChanged = onMultiDesktopStateChange;
1998 + desk.m.bpp = 1;
1999 + desk.m.useZRLE = true;
2000 + desk.m.showmouse = true;
2001 + desk.m.onKvmData = function (data) { console.log('KVM Data received in multi-desktop mode, this is not supported.'); }; // KVM Data Channel not supported in multi-desktop right now.
2002 + //desk.m.onScreenSizeChange = deskAdjust;
2003 + if (debugmode > 0) { desk.m.onScreenSizeChange = mdeskAdjust; } // Multi-Desktop Adjust
2004 + desk.Start(nodeid, 16994, '*', '*', 0);
2005 + desk.contype = 2;
2006 + multiDesktop[nodeid] = desk;
2007 + } else if (contype == 1) {
2008 + // Setup the Mesh Agent remote desktop
2009 + desk = CreateAgentRedirect(meshserver, CreateAgentRemoteDesktop('kvmid_' + shortid), serverPublicNamePort, authCookie, authRelayCookie, domainUrl);
2010 + desk.shortid = shortid;
2011 + desk.attemptWebRTC = attemptWebRTC;
2012 + desk.onStateChanged = onMultiDesktopStateChange;
2013 + //desk.onConsoleMessageChange = function () { console.log('CONSOLEMSG:', desk.consoleMessage); }
2014 + desk.m.CompressionLevel = multidesktopsettings.quality;
2015 + desk.m.ScalingLevel = multidesktopsettings.scaling;
2016 + desk.m.FrameRateTimer = multidesktopsettings.framerate;
2017 + //desk.m.onDisplayinfo = deskDisplayInfo;
2018 + //desk.m.onScreenSizeChange = deskAdjust;
2019 + if (debugmode > 0) { desk.m.onScreenSizeChange = mdeskAdjust; } // Multi-Desktop Adjust
2020 + desk.Start(nodeid);
2021 + desk.contype = 1;
2022 + multiDesktop[nodeid] = desk;
2023 + }
2024 + } else {
2025 + // Disconnect and clean up the remote desktop
2026 + desk.Stop();
2027 + delete multiDesktop[nodeid];
2028 + }
2029 + }
2030 +
2031 + function getMeshActions(mesh, meshrights) {
2032 + if ((meshrights & 4) == 0) return '';
2033 + var r = '';
2034 + if ((features & 1024) == 0) { // If CIRA is allowed
2035 + r += ' <a href=# style=cursor:pointer;font-size:10px title=\"' + "Voeg een nieuwe Intel® AMT computer toe welke zich op het internet bevind." + '\" onclick=\'return addCiraDeviceToMesh(\"' + mesh._id + '\")\'>' + "Toevoegen CIRA" + '</a>';
2036 + }
2037 + if (mesh.mtype == 1) {
2038 + if ((features & 1) == 0) { // If not WAN-Only
2039 + r += ' <a href=# style=cursor:pointer;font-size:10px title=\"' + "Voeg een nieuwe Intel® AMT computer toe welke zich op het lokale netwerk bevind." + '\" onclick=\'return addDeviceToMesh(\"' + mesh._id + '\")\'>' + "Lokaal toevoegen" + '</a>';
2040 + r += ' <a href=# style=cursor:pointer;font-size:10px title=\"' + "Voeg een nieuwe Intel® AMT computer toe door het lokale netwerk te scannen." + '\" onclick=\'return addAmtScanToMesh(\"' + mesh._id + '\")\'>' + "Scan Netwerk" + '</a>';
2041 + }
2042 + if (mesh.amt && (mesh.amt.type == 2)) { // CCM activation
2043 + r += ' <a href=# style=cursor:pointer;font-size:10px title=\"' + "Voer Intel AMT client control mode (CCM) activering uit." + '\" onclick=\'return showCcmActivation(\"' + mesh._id + '\")\'>' + "Activatie" + '</a>';
2044 + } else if (mesh.amt && (mesh.amt.type == 3) && ((features & 0x00100000) != 0)) { // ACM activation
2045 + r += ' <a href=# style=cursor:pointer;font-size:10px title=\"' + "Voer Intel AMT admin control mode (ACM) activering uit." + '\" onclick=\'return showAcmActivation(\"' + mesh._id + '\")\'>' + "Activatie" + '</a>';
2046 + }
2047 + }
2048 + if (mesh.mtype == 2) {
2049 + r += ' <a href=# style=cursor:pointer;font-size:10px title=\"' + "Voeg een nieuwe computer toe aan deze mesh door de mesh-agent te installeren." + '\" onclick=\'return addAgentToMesh(\"' + mesh._id + '\")\'>' + "Toevoegen Agent" + '</a>';
2050 + if ((features & 2) == 0) { r += ' <a href=# style=cursor:pointer;font-size:10px title=\"' + "Nodig iemand uit om de mesh-agent op deze mesh te installeren." + '\" onclick=\'return inviteAgentToMesh(\"' + mesh._id + '\")\'>' + "Nodig uit" + '</a>'; }
2051 + }
2052 + return r;
2053 + }
2054 +
2055 + function addDeviceToMesh(meshid) {
2056 + if (xxdialogMode) return false;
2057 + var mesh = meshes[meshid];
2058 + var x = format("Voeg een nieuwe Intel&reg; AMT computer toe aan een apparaatgroep \"{0}\".", EscapeHtml(mesh.name)) + '<br /><br />';
2059 + x += addHtmlValue("Apparaat naam", '<input id=dp1devicename style=width:230px maxlength=32 autocomplete=off onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');
2060 + x += addHtmlValue("Hostname", '<input id=dp1hostname style=width:230px maxlength=32 autocomplete=off placeholder=\"' + "Hetzelfde als de apparaatnaam" + '\" onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');
2061 + x += addHtmlValue("Gebruikersnaam", '<input id=dp1username style=width:230px maxlength=32 autocomplete=off placeholder=\"' + "Beheerder" + '\" onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');
2062 + x += addHtmlValue("wachtwoord", '<input id=dp1password type=password style=width:230px autocomplete=off maxlength=32 onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');
2063 + x += addHtmlValue("Veiligheid", '<select id=dp1tls style=width:236px><option value=0>' + "Geen TLS beveiliging" + '</option><option value=1>' + "TLS beveiliging vereist" + '</option></select>');
2064 + setDialogMode(2, "Add Intel&reg; AMT aaparaat", 3, addDeviceToMeshEx, x, meshid);
2065 + validateDeviceToMesh();
2066 + Q('dp1devicename').focus();
2067 + return false;
2068 + }
2069 +
2070 + // Intel AMT CCM Activation
2071 + function showCcmActivation(meshid) {
2072 + if (xxdialogMode) return false;
2073 + var servername = serverinfo.name, mesh = meshes[meshid];
2074 + if ((servername.indexOf('.') == -1) || ((features & 2) != 0)) { servername = window.location.hostname; } // If the server name is not set or it's in LAN-only mode, use the URL hostname as server name.
2075 + var url, domainUrlNoSlash = domainUrl.substring(0, domainUrl.length - 1);
2076 + if (serverinfo.https == true) {
2077 + var portStr = (serverinfo.port == 443) ? '' : (':' + serverinfo.port);
2078 + url = 'wss://' + servername + portStr + domainUrl;
2079 + } else {
2080 + var portStr = (serverinfo.port == 80) ? '' : (':' + serverinfo.port);
2081 + url = 'ws://' + servername + portStr + domainUrl;
2082 + }
2083 + var x = format("Voer Intel AMT client control mode (CCM) activering uit naar groep \"{0}\" door het hulpprogramma MeshCMD te downloaden en als volgt uit te voeren:", EscapeHtml(mesh.name)) + '<br /><br />';
2084 + x += '<textarea readonly=readonly style=width:100%;resize:none;height:100px;overflow:auto;font-size:12px readonly>meshcmd amtccm --url ' + url + 'amtactivate?id=' + meshid.split('/')[2] + ' --serverhttpshash ' + serverinfo.tlshash + '</textarea>';
2085 + setDialogMode(2, "Intel&reg; AMT activatie", 9, null, x);
2086 + Q('idx_dlgOkButton').focus();
2087 + return false;
2088 + }
2089 +
2090 + // Intel AMT ACM Activation
2091 + function showAcmActivation(meshid) {
2092 + if (xxdialogMode) return false;
2093 + var servername = serverinfo.name, mesh = meshes[meshid];
2094 + if ((servername.indexOf('.') == -1) || ((features & 2) != 0)) { servername = window.location.hostname; } // If the server name is not set or it's in LAN-only mode, use the URL hostname as server name.
2095 + var url, domainUrlNoSlash = domainUrl.substring(0, domainUrl.length - 1);
2096 + if (serverinfo.https == true) {
2097 + var portStr = (serverinfo.port == 443) ? '' : (':' + serverinfo.port);
2098 + url = 'wss://' + servername + portStr + domainUrl;
2099 + } else {
2100 + var portStr = (serverinfo.port == 80) ? '' : (':' + serverinfo.port);
2101 + url = 'ws://' + servername + portStr + domainUrl;
2102 + }
2103 + var x = format("Voer Intel AMT admin control mode (ACM) activering uit naar groep \"{0}\" door het hulpprogramma MeshCMD te downloaden en als volgt uit te voeren:", EscapeHtml(mesh.name)) + '<br /><br />';
2104 + x += '<textarea readonly=readonly style=width:100%;resize:none;height:100px;overflow:auto;font-size:12px readonly>meshcmd amtacm --url ' + url + 'amtactivate?id=' + meshid.split('/')[2] + ' --serverhttpshash ' + serverinfo.tlshash + '</textarea>';
2105 + if (serverinfo.amtAcmFqdn != null) {
2106 + x += ('<div style=margin-top:8px>' + "Intel AMT moet worden ingesteld met een vertrouwd FQDN in MEBx of een bekabeld LAN op het netwerk hebben:" + ' <b>' + serverinfo.amtAcmFqdn.join(', ') + '</b></div>');
2107 + }
2108 + setDialogMode(2, "Intel&reg; AMT activatie", 9, null, x);
2109 + Q('idx_dlgOkButton').focus();
2110 + return false;
2111 + }
2112 +
2113 + // Display the Intel AMT scanning dialog box
2114 + function addAmtScanToMesh(meshid) {
2115 + if (xxdialogMode) return false;
2116 + var x = "Voer een reeks IP-adressen in om te scannen op Intel AMT-apparaten." + '<br /><br />';
2117 + x += addHtmlValue("IP-bereik", '<input id=dp1range style=width:184px value="192.168.1.0/24" onkeyup=addAmtScanToMeshKeyUp(event) /><input id=dp1rangebutton type=button value=\"' + "Scan" + '\" onclick=addAmtScanToMeshButton()></input>');
2118 + x += '<div id=dp1results style="width:100%;height:200px;background-color:white;border:1px gray solid;overflow-y:scroll"></div>';
2119 + setDialogMode(2, "Scannen naar Intel® AMT-apparaten", 3, addAmtScanToMeshEx, x, meshid);
2120 + QE('idx_dlgOkButton', false);
2121 + QH('dp1results', '<div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>Sample IP range values<br />192.168.0.100<br />192.168.1.0/24<br />192.167.0.1-192.168.0.100</div>');
2122 + focusTextBox('dp1range');
2123 + return false;
2124 + }
2125 +
2126 + function addAmtScanToMeshKeyUp(e) {
2127 + if (e.keyCode == 13) { haltEvent(e); addAmtScanToMeshButton(); }
2128 + }
2129 +
2130 + // Called when OK is pressed on the Intel AMT scanning box
2131 + function addAmtScanToMeshEx(button, meshid) {
2132 + var elements = document.getElementsByClassName('DevScanCheckbox'), checkcount = 0;
2133 + for (var i=0;i<elements.length;i++) {
2134 + if (elements[i].checked) {
2135 + var ipaddr = elements[i].getAttribute('tag');
2136 + var amtinfo = amtScanResults[ipaddr];
2137 + meshserver.send({ action: 'addamtdevice', meshid: meshid, devicename: ipaddr, hostname: amtinfo.hostname, amtusername: '', amtpassword: '', amttls: amtinfo.tls });
2138 + }
2139 + }
2140 + }
2141 +
2142 + // If the user presses the "Scan" button on the Intel AMT scanning dialog box, start a scan.
2143 + function addAmtScanToMeshButton() {
2144 + QE('dp1range', false);
2145 + QE('dp1rangebutton', false);
2146 + QH('dp1results', '<div style=width:100%;text-align:center;margin-top:12px>' + "Scannen van ..." + '</div>');
2147 + meshserver.send({ action: 'scanamtdevice', range: Q('dp1range').value });
2148 + }
2149 +
2150 + // Called when a scanned computer is checked or unchecked.
2151 + function addAmtScanToMeshCheckbox() {
2152 + var elements = document.getElementsByClassName('DevScanCheckbox'), checkcount = 0;
2153 + for (var i=0;i<elements.length;i++) { if (elements[i].checked) checkcount++; }
2154 + QE('idx_dlgOkButton', checkcount > 0);
2155 + }
2156 +
2157 + function addCiraDeviceToMesh(meshid) {
2158 + if (xxdialogMode) return false;
2159 + var mesh = meshes[meshid];
2160 +
2161 + // Replace non alphabetic characters (@ and $) with 'X' because MPS username cannot accept it.
2162 + var meshidx = meshid.split('/')[2].replace(/\@/g, 'X').replace(/\$/g, 'X');
2163 +
2164 + var y = '<select id=dlgAddCiraSel onclick=dlgAddCiraSelClick() style=width:230px><option value=0>' + "MeshCommander Script" + '</option><option value=1>' + "Handmatige gebruikersnaam / wachtwoord" + '</option>';
2165 + if ((features & 16) == 0) { y += ('<option value=2>' + "Handmatig certificaat" + '</option></select>'); } // Only display this option if Intel AMT CIRA with Mutual-Auth is allowed.
2166 +
2167 + var x = '';
2168 + x += addHtmlValue("Setup methode", y);
2169 + x += '<hr>';
2170 +
2171 + // Setup CIRA using a MeshCommander script (Pretty Simple)
2172 + x += '<div id=dlgAddCira0>' + format("Om een nieuw Intel® AMT-apparaat toe te voegen aan apparaatgroep \"{0}\" met CIRA, downloadt u de volgende scriptbestanden en gebruikt u <a href = 'http: //meshcommander.com' rel = 'noreferrer noopener' target = ' _blank '> MeshCommander </a> om het script uit te voeren om computers te configureren.", EscapeHtml(mesh.name)) + '<br /><br />';
2173 + //x += addHtmlValue('Setup CIRA', '<a href="mescript.ashx?type=1&meshid=' + meshidx.substring(0, 16) + '" download>cira_setup.mescript</a>');
2174 + x += addHtmlValue("CIRA instellen", '<a href="mescript.ashx?type=1&meshid=' + meshid + '" download>cira_setup.mescript</a>');
2175 + x += addHtmlValue("Opruimen CIRA", '<a href="mescript.ashx?type=2" download>cira_clean.mescript</a>');
2176 + x += '</div>';
2177 +
2178 + // Setup CIRA with user/pass authentication (Somewhat difficult)
2179 + x += '<div id=dlgAddCira1 style=display:none>' + format("v", EscapeHtml(mesh.name));
2180 + if (serverinfo.mpspass) { x += (" verifieer bij de server met deze gebruikersnaam en wachtwoord." + '<br /><br />'); } else { x += (" verifieer bij de server met deze gebruikersnaam en elk wachtwoord." + '<br /><br />'); }
2181 + x += addHtmlValue("Hoofd certificaat", '<a href=\"' + "MeshServerRootCert.cer" + '\" download>' + "Hoofd certificaat bestand" + '</a>');
2182 + x += addHtmlValue("Gebruikersnaam", '<input style=width:230px readonly value="' + meshidx.substring(0, 16) + '" />');
2183 + if (serverinfo.mpspass) { x += addHtmlValue("wachtwoord", '<input style=width:230px readonly value="' + EscapeHtml(serverinfo.mpspass) + '" />'); }
2184 + if (serverinfo != null) { x += addHtmlValue("MPS Server", '<input style=width:230px readonly value="' + EscapeHtml(serverinfo.mpsname) + ':' + serverinfo.mpsport + '" />'); }
2185 + x += '</div>';
2186 +
2187 + // Setup CIRA with certificate authentication (Really difficult, only if TLS offload is not used)
2188 + if ((features & 16) == 0) {
2189 + x += '<div id=dlgAddCira2 style=display:none>' + format("Om een nieuw Intel® AMT-apparaat toe te voegen aan apparaatgroep \"{0}\" met CIRA, laadt u het volgende certificaat als vertrouwde root in Intel AMT, verifieert u met een clientcertificaat met de volgende gemeenschappelijke naam en maakt u verbinding met de volgende server.", EscapeHtml(mesh.name)) + '<br /><br />';
2190 + x += addHtmlValue("Hoofd certificaat", '<a href="MeshServerRootCert.cer" download>' + "Hoofd certificaat bestand" + '</a>');
2191 + x += addHtmlValue("Organisatie", '<input style=width:230px readonly value="' + meshidx + '" />');
2192 + if (serverinfo != null) { x += addHtmlValue("MPS Server", '<input style=width:230px readonly value="' + EscapeHtml(serverinfo.mpsname) + ':' + serverinfo.mpsport + '" />'); }
2193 + x += '</div>';
2194 + }
2195 +
2196 + setDialogMode(2, "Toevoegen Intel® AMT CIRA apparaat", 2, null, x, 'fileDownload');
2197 + Q('dlgAddCiraSel').focus();
2198 + return false;
2199 + }
2200 +
2201 + function dlgAddCiraSelClick() {
2202 + var val = Q('dlgAddCiraSel').value;
2203 + QV('dlgAddCira0', val == 0);
2204 + QV('dlgAddCira1', val == 1);
2205 + QV('dlgAddCira2', val == 2);
2206 + }
2207 +
2208 + // Return true is the input string looks like an email address
2209 + function checkEmail(str) {
2210 + var x = str.split('@');
2211 + var ok = ((x.length == 2) && (x[0].length > 0) && (x[1].split('.').length > 1) && (x[1].length > 2));
2212 + if (ok == true) { var y = x[1].split('.'); for (var i in y) { if (y[i].length == 0) { ok = false; } } }
2213 + return ok;
2214 + }
2215 +
2216 + function inviteAgentToMesh(meshid) {
2217 + if (xxdialogMode) return false;
2218 + var x = '', mesh = meshes[meshid];
2219 + if (features & 64) {
2220 + x += addHtmlValue("Type uitnodiging", '<select id=d2InviteType onchange=d2ChangedInviteType() style=width:236px><option value=0>Link invitation</option><option value=1>Email invitation</option></select>') + '<hr />';
2221 + x += '<div id=emailInviteDiv style=display:none>' + format("Nodig iemand uit om de mesh-agent te installeren. Er wordt een e-mail verzonden met de link naar de installatie van de mesh-agent voor de apparaatgroep \"{0}\".", EscapeHtml(mesh.name)) + '<br /><br />';
2222 + x += addHtmlValue("Naam (Optioneel)", '<input id=agentInviteName value="" style=width:230px maxlength=64 />');
2223 + x += addHtmlValue("Email", '<input id=agentInviteEmail style=width:230px placeholder=\"' + "voorbeeld@email.nl" + '\" onkeyup=validateAgentInvite()></input>');
2224 + x += addHtmlValue("Besturingssysteem", '<select id=agentInviteNameOs onchange=d2ChangedInviteType() style=width:236px><option value=4>' + "Verzend installatie link" + '</option><option value=0 selected>' + "Alle ondersteunde" + '</option><option value=1>' + "alleen Windows" + '</option><option value=3>' + "Apple MacOS alleen" + '</option><option value=2>' + "alleen Linux" + '</option></select>');
2225 + x += '<div id=d2agentexpirediv>';
2226 + x += addHtmlValue("Link vervaldatum", '<select id=agentInviteExpire style=width:236px><option value=1>' + "1 uur" + '</option><option value=8>' + "8 uur" + '</option><option value=24>' + "1 dag" + '</option><option value=168>' + "1 week" + '</option><option value=5040>' + "1 maand" + '</option><option value=0>' + "Ongelimiteerd" + '</option></select>');
2227 + x += '</div>';
2228 + x += addHtmlValue("Installatie type", '<select id=agentInviteType style=width:236px><option value=0>' + "Achtergrond en interactief" + '</option><option value=2>' + "Achtergrond alleen" + '</option><option value=1>' + "Alleen interactief" + '</option></select>');
2229 + x += addHtmlValue("Bericht" + '<br />' + "(optioneel)", '<textarea id=agentInviteMessage value="" style=width:230px;height:100px;resize:none maxlength=1024 /></textarea>');
2230 + x += '</div>';
2231 + }
2232 + x += '<div id=urlInviteDiv>' + format("Nodig iemand uit om de mesh-agent te installeren door een uitnodigingslink te delen. Deze koppeling verwijst de gebruiker naar installatie-instructies voor de apparaatgroep \"{0}\". De link is openbaar en er is geen account voor deze server nodig.", EscapeHtml(mesh.name)) + '<br /><br />';
2233 + x += addHtmlValue("Link vervaldatum", '<select id=d2inviteExpire style=width:236px onchange=d2RequestInvitationLink()><option value=1>' + "1 uur" + '</option><option value=8>' + "8 uur" + '</option><option value=24>' + "1 dag" + '</option><option value=168>' + "1 week" + '</option><option value=5040>' + "1 maand" + '</option><option value=0>' + "Ongelimiteerd" + '</option></select>');
2234 + x += '<div id=agentInvitationLinkDiv style="text-align:center;font-size:large;margin:16px;display:none"><a href=# id=agentInvitationLink target="_blank" style=cursor:pointer></a> <img src=images/link4.png height=10 width=10 title=\"' + "Kopieer link naar het klembord" + '\" style=cursor:pointer onclick=d2CopyInviteToClip()></div></div>';
2235 + setDialogMode(2, "Nodig uit", 3, performAgentInvite, x, meshid);
2236 + if (features & 64) { Q('d2InviteType').focus(); d2ChangedInviteType(); } else { Q('d2inviteExpire').focus(); validateAgentInvite(); }
2237 + d2RequestInvitationLink();
2238 + return false;
2239 + }
2240 +
2241 + function d2RequestInvitationLink() {
2242 + meshserver.send({ action: 'createInviteLink', meshid: xxdialogTag, expire: parseInt(Q('d2inviteExpire').value), flags: 0 });
2243 + }
2244 +
2245 + function d2ChangedInviteType() {
2246 + QV('urlInviteDiv', Q('d2InviteType').value == 0);
2247 + QV('d2agentexpirediv', Q('agentInviteNameOs').value == 4);
2248 + QV('emailInviteDiv', Q('d2InviteType').value == 1);
2249 + validateAgentInvite();
2250 + }
2251 +
2252 + function d2CopyInviteToClip() { copyTextToClip(Q('agentInvitationLink').href); }
2253 +
2254 + function validateAgentInvite() {
2255 + if ((features & 64) && (Q('d2InviteType').value == 1)) {
2256 + QE('idx_dlgOkButton', checkEmail(Q('agentInviteEmail').value));
2257 + QV('idx_dlgCancelButton', true);
2258 + } else {
2259 + QE('idx_dlgOkButton', true);
2260 + QV('idx_dlgCancelButton', false);
2261 + }
2262 + }
2263 +
2264 + function performAgentInvite(button, meshid) {
2265 + if ((features & 64) && (Q('d2InviteType').value == 1)) {
2266 + meshserver.send({ action: 'inviteAgent', meshid: meshid, email: Q('agentInviteEmail').value, name: Q('agentInviteName').value, os: Q('agentInviteNameOs').value, flags: Q('agentInviteType').value, msg: Q('agentInviteMessage').value, expire: parseInt(Q('agentInviteExpire').value) });
2267 + }
2268 + }
2269 +
2270 + function addAgentToMesh(meshid) {
2271 + if (xxdialogMode) return false;
2272 + var mesh = meshes[meshid], x = '', installType = 0;
2273 + x += addHtmlValue("Besturingssysteem", '<select id=aginsSelect onchange=addAgentToMeshClick() style=width:236px><option value=0>' + "Windows" + '</option><option value=1>' + "Linux / BSD" + '</option><option value=2>' + "Apple MacOS" + '</option><option value=3>' + "Windows (deinstallatie)" + '</option><option value=4>' + "Linux / BSD (de-installeren)" + '</option></select>');
2274 + x += '<div id=aginsTypeDiv>';
2275 + x += addHtmlValue("Installatie type", '<select id=aginsType onchange=addAgentToMeshClick() style=width:236px><option value=0>' + "Achtergrond & interactief" + '</option><option value=2>' + "Achtergrond alleen" + '</option><option value=1>' + "Alleen interactief" + '</option></select>');
2276 + x += '</div><hr>';
2277 +
2278 + // \/:*?"<>|
2279 + var meshfilename = mesh.name
2280 + meshfilename = meshfilename.split('\\').join('').split('/').join('').split(':').join('').split('*').join('').split('?').join('').split('"').join('').split('<').join('').split('>').join('').split('|').join('').split(' ').join('').split('\'').join('');
2281 +
2282 + // Windows agent install
2283 + //x += "<div id=agins_windows>To add a new computer to device group \"" + EscapeHtml(mesh.name) + "\", download the mesh agent and configuration file and install the agent on the computer to manage.<br /><br />";
2284 + x += '<div id=agins_windows>' + format("Als u een nieuwe computer aan apparaatgroep \"{0}\" wilt toevoegen, downloadt u de mesh-agent en installeert u deze op de te beheren computer. Deze agent heeft server- en apparaatgroepinformatie erin ingebed.", EscapeHtml(mesh.name)) + '<br /><br />';
2285 + x += addHtmlValue("Mesh Agent", '<a id=aginsw32lnk href="meshagents?id=3&meshid=' + meshid.split('/')[2] + '&installflags=0" download onclick="setDialogMode(0)" title=\"' + "32bit versie van de MeshAgent" + '\">' + "Windows (.exe)" + '</a> <img src=images/link4.png height=10 width=10 title="Copy Windows 32bit agent URL to clipboard" style=cursor:pointer onclick=copyAgentUrl("meshagents?id=3&meshid=' + meshid.split('/')[2] + '&installflags=",1)>');
2286 + x += addHtmlValue("Mesh Agent", '<a id=aginsw64lnk href="meshagents?id=4&meshid=' + meshid.split('/')[2] + '&installflags=0" download onclick="setDialogMode(0)" title=\"' + "64bit versie van de MeshAgent" + '\">' + "Windows x64 (.exe)" + '</a> <img src=images/link4.png height=10 width=10 title="Copy Windows 64bit agent URL to clipboard" style=cursor:pointer onclick=copyAgentUrl("meshagents?id=4&meshid=' + meshid.split('/')[2] + '&installflags=",1)>');
2287 + if (debugmode > 0) { x += addHtmlValue("Instellingenbestand", '<a id=aginswmshlnk href="meshsettings?id=' + meshid.split('/')[2] + '&installflags=0" rel="noreferrer noopener" target="_blank">' + format("{0} instellingen (.msh)", EscapeHtml(mesh.name)) + '</a>'); }
2288 + x += '</div>';
2289 +
2290 + // Linux agent install
2291 + x += '<div id=agins_linux style=display:none>' + format("Voer de volgende opdracht uit om een computer toe te voegen aan {0}. Root gegevens zijn nodig.", EscapeHtml(mesh.name)) + '<br />';
2292 + x += '<textarea id=agins_linux_area rows=2 cols=20 readonly=readonly style=width:100%;resize:none;height:120px;overflow:scroll;font-size:12px readonly></textarea>';
2293 + x += '<div style=\'font-size:x-small\'>' + "* Voor BSD, start eerst \"pkg install wget sudo bash\" ." + '</div></div>';
2294 +
2295 + // MacOS agent install
2296 + x += '<div id=agins_osx style=display:none>' + format("Als u een nieuwe computer aan apparaatgroep \"{0}\" wilt toevoegen, downloadt u de mesh-agent en installeert u deze op de te beheren computer. In dit installatieprogramma van de agent zijn server- en apparaatgroepgegevens ingebed.", EscapeHtml(mesh.name)) + '<br /><br />';
2297 + x += addHtmlValue("Mesh Agent", '<a href="meshosxagent?id=16&meshid=' + meshid.split('/')[2] + '" rel="noreferrer noopener" target="_blank" title="64bit version of MacOS Mesh Agent">MacOS Agent (64bit)</a> <img src=images/link4.png height=10 width=10 title="' + "Kopieer MacOS agent link naar het klembord" + '" style=cursor:pointer onclick=copyAgentUrl("meshosxagent?id=16&meshid=' + meshid.split('/')[2] + '",0)>');
2298 + x += '</div>';
2299 +
2300 + // Windows agent uninstall
2301 + x += '<div id=agins_windows_un style=display:none>' + "Om een mesh-agent te verwijderen, download het onderstaande bestand, voer het uit en klik op \"deinstalleer\"." + '<br /><br />';
2302 + x += addHtmlValue("Mesh Agent", '<a href="meshagents?id=3" download onclick="setDialogMode(0)" title="' + "32bit versie van de MeshAgent" + '">' + "Windows (.exe)" + '</a>');
2303 + x += addHtmlValue("Mesh Agent", '<a href="meshagents?id=4" download onclick="setDialogMode(0)" title="' + "64bit versie van de MeshAgent" + '">' + "Windows x64 (.exe)" + '</a>');
2304 + x += '</div>';
2305 +
2306 + // Linux agent uninstall
2307 + x += '<div id=agins_linux_un style=display:none>' + "Voer de volgende opdracht uit om een mesh-agent te verwijderen. Root gegevens zijn nodig." + '<br />';
2308 + x += '<textarea id=agins_linux_area_un rows=2 cols=20 readonly=readonly style=width:100%;resize:none;height:120px;overflow:scroll;font-size:12px readonly></textarea>';
2309 + x += '</div>';
2310 +
2311 + setDialogMode(2, "Toevoegen Mesh agent", 2, null, x, 'fileDownload');
2312 + var servername = serverinfo.name;
2313 + if ((servername.indexOf('.') == -1) || ((features & 2) != 0)) { servername = window.location.hostname; } // If the server name is not set or it's in LAN-only mode, use the URL hostname as server name.
2314 + var domainUrlNoSlash = domainUrl.substring(0, domainUrl.length - 1);
2315 +
2316 + if (serverinfo.https == true)
2317 + {
2318 + var portStr = (serverinfo.port == 443)?'':(':' + serverinfo.port);
2319 + if ((features & 0x2000) == 0)
2320 + {
2321 + Q('agins_linux_area').value = '(wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo -E ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid.split('/')[2] + '\' || ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid.split('/')[2] + '\'\r\n';
2322 + Q('agins_linux_area_un').value = '(wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
2323 + }
2324 + else
2325 + {
2326 + // Server asked that agent be installed to preferably not use a HTTP proxy.
2327 + Q('agins_linux_area').value = 'wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid.split('/')[2] + '\' || ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid.split('/')[2] + '\'\r\n';
2328 + Q('agins_linux_area_un').value = 'wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
2329 + }
2330 + }
2331 + else
2332 + {
2333 + var portStr = (serverinfo.port == 80) ? '' : (':' + serverinfo.port);
2334 + if ((features & 0x2000) == 0)
2335 + {
2336 + Q('agins_linux_area').value = '(wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 -O ./meshinstall.sh || wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo -E ./meshinstall.sh http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid.split('/')[2] + '\'\r\n';
2337 + Q('agins_linux_area_un').value = '(wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 -O ./meshinstall.sh || wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
2338 + }
2339 + else
2340 + {
2341 + // Server asked that agent be installed to preferably not use a HTTP proxy.
2342 + Q('agins_linux_area').value = 'wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid.split('/')[2] + '\'\r\n';
2343 + Q('agins_linux_area_un').value = 'wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
2344 + }
2345 + }
2346 + Q('aginsSelect').focus();
2347 + addAgentToMeshClick();
2348 + return false;
2349 + }
2350 +
2351 + function copyAgentUrl(url,addflag) {
2352 + var servername = serverinfo.name;
2353 + if ((servername.indexOf('.') == -1) || ((features & 2) != 0)) { servername = window.location.hostname; } // If the server name is not set or it's in LAN-only mode, use the URL hostname as server name.
2354 + var domainUrlNoSlash = domainUrl.substring(0, domainUrl.length - 1);
2355 + var portStr = (serverinfo.port == 443) ? '' : (':' + serverinfo.port);
2356 + var c = 'https://' + servername + portStr + domainUrl + url;
2357 + if (addflag == 1) c += Q('aginsType').value;
2358 + copyTextToClip(c);
2359 + }
2360 +
2361 + function addAgentToMeshClick() {
2362 + var v = Q('aginsSelect').value;
2363 + QV('agins_windows', v == 0);
2364 + QV('agins_linux', v == 1);
2365 + QV('agins_osx', v == 2);
2366 + QV('agins_windows_un', v == 3);
2367 + QV('agins_linux_un', v == 4);
2368 + QV('aginsTypeDiv', v == 0);
2369 +
2370 + // Fix the links if needed
2371 + Q('aginsw32lnk').href = (Q('aginsw32lnk').href.split('installflags=')[0]) + 'installflags=' + Q('aginsType').value;
2372 + Q('aginsw64lnk').href = (Q('aginsw64lnk').href.split('installflags=')[0]) + 'installflags=' + Q('aginsType').value;
2373 + if (debugmode > 0) { Q('aginswmshlnk').href = (Q('aginswmshlnk').href.split('installflags=')[0]) + 'installflags=' + Q('aginsType').value; }
2374 + }
2375 +
2376 + function validateDeviceToMesh() {
2377 + QE('idx_dlgOkButton', (Q('dp1devicename').value.length > 0) && (passwordcheck(Q('dp1password').value)));
2378 + }
2379 +
2380 + function addDeviceToMeshEx(button, meshid) {
2381 + var amtuser = Q('dp1username').value;
2382 + if (amtuser == '') amtuser = 'admin';
2383 + var host = Q('dp1hostname').value;
2384 + if (host == '') host = Q('dp1devicename').value;
2385 + meshserver.send({ action: 'addamtdevice', meshid: meshid, devicename: Q('dp1devicename').value, hostname: host, amtusername: amtuser, amtpassword: Q('dp1password').value, amttls: Q('dp1tls').value });
2386 + }
2387 +
2388 + function deviceHeaderSet() {
2389 + if (deviceHeaderId == 0) { deviceHeaderId = 1; return; }
2390 + deviceHeaders['DevxHeader' + deviceHeaderId] = ((deviceHeaderTotal == 1) ? "1 apparaat" : format("{0} knooppunten", deviceHeaderTotal));
2391 + //var title = '';
2392 + //for (x in deviceHeaderCount) { if (title.length > 0) title += ', '; title += deviceHeaderCount[x] + ' ' + PowerStateStr2(x); }
2393 + //deviceHeadersTitles["DevxHeader" + deviceHeaderId] = title;
2394 + deviceHeaderId++;
2395 + deviceHeaderCount = {};
2396 + deviceHeaderTotal = 0;
2397 + }
2398 +
2399 + var powerStateStrings = ['', '<span title=\"' + "Apparaat is ingeschakeld." + '\">' + "ingeschakeld" + '</span>', '<span title=\"' + "Apparaat bevindt zich in slaapstand (S1)." + '\">' + "Slapen" + '</span>', '<span title=\"' + "Apparaat bevindt zich in slaapstand (S2)." + '\">' + "Slapen" + '</span>', '<span title=\"' + "Apparaat bevindt zich in diepe slaapstand (S3)." + '\">' + "Slaapstand" + '</span>', '<span title=\"' + "Apparaat bevindt zich in de slaapstand (S4)." + '\">' + "Slaapstand" + '</span>', '<span title=\"' + "Apparaat is uitgeschakeld (S5)." + '\">' + "softwarematig uit" + '</span>', '<span title=\"' + "Apparaat is gedetecteerd, maar de stroomstatus kon niet worden verkregen." + '\">' + "Aanwezig" + '</span>'];
2400 + var powerStateStrings2 = ['', "Apparaat is ingeschakeld", "Apparaat bevindt zich in slaapstand (S1)", "Apparaat bevindt zich in slaapstand (S2)", "Apparaat bevindt zich in diepe slaapstand (S3)", "Apparaat is in slaapstand (S4)", "Apparaat is uitgeschakeld (S5)", "Apparaat is aanwezig, maar de stroomstatus kan niet worden bepaald"];
2401 + var powerColorTable = ['pwsTransparent', 'pwsBlack', 'pwsBlue', 'pwsBlue2', 'pwsLightblue', 'pwsBlueviolet', 'pwsDarkgreen', 'pwsLightseagreen', 'pwsLightseagreen2'];
2402 + function NodeStateStr(node) {
2403 + var states = [];
2404 + if (node.state > 0 && node.state < powerStatetable.length) state.push(powerStatetable[node.state]);
2405 + if (node.conn) {
2406 + if ((node.conn & 1) != 0) { states.push('<span title=\"' + "Mesh-agent is verbonden en klaar voor gebruik." + '\">' + "Agent" + '</span>'); }
2407 + if ((node.conn & 2) != 0) { states.push('<span title=\"' + "Intel® AMT CIRA is verbonden en klaar voor gebruik." + '\">' + "CIRA" + '</span>'); }
2408 + else if ((node.conn & 4) != 0) { states.push('<span title=\"' + "Intel® AMT is routeerbaar." + '\">' + "AMT" + '</span>'); }
2409 + if ((node.conn & 8) != 0) { states.push('<span title=\"' + "Mesh-agent is bereikbaar met een andere agent als relay." + '\">' + "Relay" + '</span>'); }
2410 + if ((node.conn & 16) != 0) { states.push('<span title=\"' + "MQTT verbinding met het apparaat is actief." + '\">' + "MQTT" + '</span>'); }
2411 + }
2412 + if ((node.pwr != null) && (node.pwr != 0)) { states.push(powerStateStrings[node.pwr]); }
2413 + return states.join(', ');
2414 + }
2415 +
2416 + function PowerStateStr(x) {
2417 + if (x < powerStatetable.length) return powerStatetable[x];
2418 + return '';
2419 + }
2420 +
2421 + function PowerStateStr2(x) {
2422 + if ((x != 0) && (x < powerStatetable.length)) return powerStatetable[x];
2423 + return "Onbekend";
2424 + }
2425 +
2426 + function selectallButtonFunction() {
2427 + var elements = document.getElementsByClassName('DeviceCheckbox'), checkcount = 0;
2428 + for (var i=0;i<elements.length;i++) { if (elements[i].checked === true) checkcount++; }
2429 + for (var i=0;i<elements.length;i++) { elements[i].checked = (checkcount == 0); }
2430 + p1updateInfo();
2431 + }
2432 +
2433 + function p1updateInfo() {
2434 + var elements = document.getElementsByClassName('DeviceCheckbox'), checkcount = 0;
2435 + for (var i=0;i<elements.length;i++) { if (elements[i].checked === true) { checkcount++; } }
2436 + if (checkcount > 0) {
2437 + QE('GroupActionButton', true);
2438 + Q('SelectAllButton').value = "Selecteer niets";
2439 + QV('cxmgroupsplit', true);
2440 + QV('cxmdesktop', true);
2441 + } else {
2442 + QE('GroupActionButton', false);
2443 + Q('SelectAllButton').value = "Selecteer alles";
2444 + QV('cxmgroupsplit', false);
2445 + QV('cxmdesktop', false);
2446 + }
2447 + }
2448 +
2449 + function groupActionFunction() {
2450 + var addedOptions = '', nodeids = getCheckedDevices();
2451 +
2452 + // Check if any of the selected devices have a MQTT connection active
2453 + if (features & 0x00400000) {
2454 + for (var i in nodeids) { if ((getNodeFromId(nodeids[i]).conn & 16) != 0) { addedOptions += '<option value=103>' + "Verzend MQTT bericht" + '</option>'; break; } }
2455 + }
2456 +
2457 + // Display the "Uninstall Agent" option if allowed and we selected connected devices.
2458 + for (var i in nodeids) {
2459 + var node = getNodeFromId(nodeids[i]);
2460 + var mesh = meshes[node.meshid];
2461 + var meshrights = mesh.links[userinfo._id].rights;
2462 + if (((node.conn & 1) != 0) && ((meshrights & 32768) != 0)) { addedOptions += '<option value=104>' + "deinstallatie agent" + '</option>'; break; }
2463 + }
2464 +
2465 + var x = "Selecteer een bewerking die op alle geselecteerde apparaten moet worden uitgevoerd. Acties worden alleen uitgevoerd met de juiste rechten." + '<br /><br />';
2466 + x += addHtmlValue("Operatie", '<select id=d2groupop><option value=100>' + "apparaat wekken" + '</option><option value=4>' + "Slaap apparaten" + '</option><option value=3>' + "Reset apparaten" + '</option><option value=2>' + "Schakel apparaten uit" + '</option><option value=102>' + "Verplaatsen naar apparaatgroep" + '</option>' + addedOptions + '<option value=101>' + "Verwijder apparaten" + '</option></select>');
2467 + setDialogMode(2, "Groepsactie", 3, groupActionFunctionEx, x);
2468 + }
2469 +
2470 + // Get the list of checked devices, removes any duplicates.
2471 + function getCheckedDevices() {
2472 + var nodeids = [], elements = document.getElementsByClassName("Apparaat Checkbox"), checkcount = 0;
2473 + for (var i=0;i<elements.length;i++) { if (elements[i].checked) { if (elements[i].value) { var nid = elements[i].value.substring(6); if (nodeids.indexOf(nid) == -1) { nodeids.push(nid); } } } }
2474 + return nodeids;
2475 + }
2476 +
2477 + function groupActionFunctionEx() {
2478 + var op = Q('d2groupop').value;
2479 + if (op == 100) {
2480 + // Group wake
2481 + meshserver.send({ action: 'wakedevices', nodeids: getCheckedDevices() });
2482 + } else if (op == 101) {
2483 + // Group delete, ask for confirmation
2484 + var x = "Bevestig geselecteerde apparaten verwijderen?" + '<br /><br />';
2485 + x += '<label><input id=d2check type=checkbox onchange=d2groupActionFunctionDelEx() />' + "Bevestig" + '</label>';
2486 + setDialogMode(2, "Verwijder apparaten", 3, groupActionFunctionDelEx, x);
2487 + QE('idx_dlgOkButton', false);
2488 + } else if (op == 102) {
2489 + // Move computers to a different group
2490 + p10showChangeGroupDialog(getCheckedDevices());
2491 + } else if (op == 103) {
2492 + // Send MQTT Message
2493 + p10showSendMqttMsgDialog(getCheckedDevices());
2494 + } else if (op == 104) {
2495 + // Uninstall agent
2496 + p10showSendUninstallAgentDialog(getCheckedDevices());
2497 + } else {
2498 + // Power operation
2499 + meshserver.send({ action: 'poweraction', nodeids: getCheckedDevices(), actiontype: parseInt(op) });
2500 + }
2501 + }
2502 +
2503 + function d2groupActionFunctionDelEx() { QE('idx_dlgOkButton', Q('d2check').checked); }
2504 + function groupActionFunctionDelEx() { meshserver.send({ action: 'removedevices', nodeids: getCheckedDevices() }); }
2505 +
2506 + function onSortSelectChange(skipsave) {
2507 + sort = document.getElementById('sortselect').selectedIndex;
2508 + if (!skipsave) { putstore('sort', sort); }
2509 + }
2510 +
2511 + function meshSort(a, b) { if (a.meshnamel > b.meshnamel) return 1; if (a.meshnamel < b.meshnamel) return -1; if (a.meshid == b.meshid) { if (showRealNames == true) { if (a.rnamel > b.rnamel) return 1; if (a.rnamel < b.rnamel) return -1; return 0; } else { if (a.namel > b.namel) return 1; if (a.namel < b.namel) return -1; return 0; } } return 0; }
2512 + function powerSort(a, b) { var ap = a.pwr?a.pwr:0; var bp = b.pwr?b.pwr:0; if (ap > bp) return -1; if (ap < bp) return 1; if (ap == bp) { if (showRealNames == true) { if (a.rnamel > b.rnamel) return 1; if (a.rnamel < b.rnamel) return -1; return 0; } else { if (a.namel > b.namel) return 1; if (a.namel < b.namel) return -1; return 0; } } return 0; }
2513 + function deviceSort(a, b) { if (a.namel > b.namel) return 1; if (a.namel < b.namel) return -1; return 0; }
2514 + function deviceHostSort(a, b) { if (a.rnamel > b.rnamel) return 1; if (a.rnamel < b.rnamel) return -1; return 0; }
2515 + function onSearchFocus(x) { searchFocus = x; }
2516 + function onMapSearchFocus(x) { mapSearchFocus = x; }
2517 + function onUserSearchFocus(x) { userSearchFocus = x; }
2518 + function onConsoleFocus(x) { consoleFocus = x; }
2519 +
2520 + function onSearchInputChanged() {
2521 + var x = Q('SearchInput').value.toLowerCase().trim(); putstore('_search', x);
2522 + var userSearch = null, ipSearch = null, groupSearch = null;
2523 + if (x.startsWith('user:')) { userSearch = x.substring(5); }
2524 + else if (x.startsWith('u:')) { userSearch = x.substring(2); }
2525 + else if (x.startsWith('ip:')) { ipSearch = x.substring(3); }
2526 + else if (x.startsWith('group:')) { groupSearch = x.substring(6); }
2527 + else if (x.startsWith('g:')) { groupSearch = x.substring(2); }
2528 +
2529 + if (x == '') {
2530 + // No search
2531 + for (var d in nodes) { nodes[d].v = true; }
2532 + } else if (ipSearch != null) {
2533 + // IP address search
2534 + for (var d in nodes) { nodes[d].v = ((nodes[d].ip != null) && (nodes[d].ip.indexOf(ipSearch) >= 0)); }
2535 + } else if (groupSearch != null) {
2536 + // Group filter
2537 + for (var d in nodes) { nodes[d].v = (meshes[nodes[d].meshid].name.toLowerCase().indexOf(groupSearch) >= 0); }
2538 + } else if (userSearch != null) {
2539 + // User search
2540 + for (var d in nodes) {
2541 + nodes[d].v = false;
2542 + if (nodes[d].users && nodes[d].users.length > 0) { for (var i in nodes[d].users) { if (nodes[d].users[i].toLowerCase().indexOf(userSearch) >= 0) { nodes[d].v = true; } } }
2543 + }
2544 + } else {
2545 + // Device name search
2546 + try {
2547 + var rs = x.split(/\s+/).join('|'), rx = new RegExp(rs); // In some cases (like +), this can throw an exception.
2548 + for (var d in nodes) {
2549 + nodes[d].v = (rx.test(nodes[d].name.toLowerCase())) || (nodes[d].rnamel != null && rx.test(nodes[d].rnamel.toLowerCase()));
2550 + if ((nodes[d].v == false) && nodes[d].tags) {
2551 + for (var s in nodes[d].tags) {
2552 + if (rx.test(nodes[d].tags[s].toLowerCase())) {
2553 + nodes[d].v = true;
2554 + break;
2555 + } else {
2556 + nodes[d].v = false;
2557 + }
2558 + }
2559 + }
2560 + }
2561 + } catch (ex) { for (var d in nodes) { nodes[d].v = true; } }
2562 + }
2563 + }
2564 +
2565 + var contextelement = null;
2566 + function handleContextMenu(event) {
2567 + hideContextMenu();
2568 + var scrollLeft = (window.pageXOffset !== null) ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body).scrollLeft;
2569 + var scrollTop = (window.pageYOffset !== null) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
2570 + var elem = document.elementFromPoint(event.pageX - scrollLeft, event.pageY - scrollTop);
2571 + if (elem && elem != null && elem.id == 'connectbutton2' && currentNode && currentNode.agent && (currentNode.agent.id > 0) && (currentNode.agent.id < 5)) {
2572 + contextelement = elem;
2573 + var contextmenudiv = document.getElementById('termShellContextMenu');
2574 + contextmenudiv.style.left = event.pageX + 'px';
2575 + contextmenudiv.style.top = event.pageY + 'px';
2576 + contextmenudiv.style.display = 'block';
2577 + } else if (elem && elem != null && elem.id == 'connectbutton2' && currentNode && currentNode.agent && (currentNode.agent.id > 4)) {
2578 + contextelement = elem;
2579 + var contextmenudiv = document.getElementById('termShellContextMenuLinux');
2580 + contextmenudiv.style.left = event.pageX + 'px';
2581 + contextmenudiv.style.top = event.pageY + 'px';
2582 + contextmenudiv.style.display = 'block';
2583 + } else if (elem && elem != null && elem.id == 'MxMESH') {
2584 + contextelement = elem;
2585 + var contextmenudiv = document.getElementById('meshContextMenu');
2586 + contextmenudiv.style.left = event.pageX + 'px';
2587 + contextmenudiv.style.top = event.pageY + 'px';
2588 + contextmenudiv.style.display = 'block';
2589 + /*} else if (elem && elem != null && elem.classList.contains('pluginTab')) {
2590 + contextelement = elem;
2591 + var contextmenudiv = document.getElementById('pluginTabContextMenu');
2592 + contextmenudiv.style.left = event.pageX + 'px';
2593 + contextmenudiv.style.top = event.pageY + 'px';
2594 + contextmenudiv.style.display = 'block';*/
2595 + } else {
2596 + while (elem && elem != null && elem.id != 'devs') { elem = elem.parentElement; }
2597 + if (!elem || elem == null) return true;
2598 + contextelement = elem;
2599 + var contextmenudiv = document.getElementById('contextMenu');
2600 + contextmenudiv.style.left = event.pageX + 'px';
2601 + contextmenudiv.style.top = event.pageY + 'px';
2602 + contextmenudiv.style.display = 'block';
2603 +
2604 + // Get the node and set the menu options
2605 + var nodeid = contextelement.children[1].attributes.onclick.value;
2606 + var node = getNodeFromId(nodeid.substring(12, nodeid.length - 18));
2607 + var mesh = meshes[node.meshid];
2608 + var meshlinks = mesh.links[userinfo._id];
2609 + var meshrights = meshlinks.rights;
2610 + var consoleRights = ((meshrights & 16) != 0);
2611 +
2612 + // Check if we have terminal and file access
2613 + var terminalAccess = ((meshrights == 0xFFFFFFFF) || ((meshrights & 512) == 0));
2614 + var fileAccess = ((meshrights == 0xFFFFFFFF) || ((meshrights & 1024) == 0));
2615 +
2616 + QV('cxdesktop', ((mesh.mtype == 1) || (node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 1) != 0) || (node.intelamt && (node.intelamt.state == 2))) && ((meshrights & 8) || (meshrights & 256)));
2617 + QV('cxterminal', ((mesh.mtype == 1) || (node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 2) != 0) || (node.intelamt && (node.intelamt.state == 2))) && (meshrights & 8) && terminalAccess);
2618 + QV('cxfiles', ((mesh.mtype == 2) && ((node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 4) != 0))) && (meshrights & 8) && fileAccess);
2619 + QV('cxevents', (node.intelamt != null) && ((node.intelamt.state == 2) || (node.conn & 2)) && (meshrights & 8));
2620 + QV('cxconsole', (consoleRights && (mesh.mtype == 2) && ((node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 8) != 0))) && (meshrights & 8));
2621 + }
2622 +
2623 + return haltEvent(event);
2624 + }
2625 +
2626 + function cmaction(action,event) {
2627 + var nodeid = contextelement.children[1].attributes.onclick.value;
2628 + nodeid = nodeid.substring(12, nodeid.length - 18);
2629 + if (action == 7) { Q('viewselect').value = 3; Q('viewselect').onchange(); Q('autoConnectDesktopCheckbox').checked = true; Q('autoConnectDesktopCheckbox').onclick(); } // Multi-Desktop
2630 + if ((action > 0) && (action < 7)) {
2631 + var panel = [0, 10, 12, 11, 13, 16, 15][action]; // (invalid), General, Desktop, Terminal, Files, Events, Console
2632 + if (event && (event.shiftKey == true)) {
2633 + // Open the device in a different tab
2634 + window.open(window.location.origin + '?node=' + nodeid.split('/')[2] + '&viewmode=' + panel + '&hide=16', 'meshcentral:' + nodeid);
2635 + } else {
2636 + // Go to the right panel
2637 + gotoDevice(nodeid, panel);
2638 +
2639 + // If possible, connect...
2640 + var mesh = meshes[currentNode.meshid];
2641 + if ((currentNode.conn & 1) && (mesh.mtype == 2)) {
2642 + if ((panel == 11) && (desktop == null) && (currentNode.agent.caps & 1)) { connectDesktop(null, 3); } // Desktop
2643 + if ((panel == 12) && (terminal == null) && (currentNode.agent.caps & 2)) { connectTerminal(null, 1); } // Terminal
2644 + if ((panel == 13) && (files == null)) { connectFiles(null); } // files
2645 + }
2646 + }
2647 + }
2648 + }
2649 +
2650 + function cmmeshaction(action) {
2651 + var meshid = contextelement.attributes.onclick.value.substring(10, contextelement.attributes.onclick.value.length - 2);
2652 + var elements = document.getElementsByClassName('DeviceCheckbox');
2653 + if ((action == 1) || (action == 2)) {
2654 + for (var i = 0; i < elements.length; i++) {
2655 + if ((elements[i].attributes) && (elements[i].attributes['class']['value'].split(' ')[0] == meshid)) { elements[i].checked = (action == 1); }
2656 + }
2657 + }
2658 + //if (action == 3) { window.location = "multidesktop.aspx?mesh=" + meshid + "&auto=1"; }
2659 + p1updateInfo();
2660 + }
2661 +
2662 + function cmtermaction(action) {
2663 + connectTerminal(null, 1, { protocol: action });
2664 + }
2665 +
2666 + /*
2667 + function pluginTabClose() {
2668 + var pluginTab = contextelement;
2669 + var pname = pluginTab.getAttribute('x-data-plugin-sname');
2670 + var pdiv = Q('plugin-'+pname);
2671 + pdiv.parentNode.removeChild(pdiv);
2672 + pluginTab.parentNode.removeChild(pluginTab);
2673 + QV('p42', true);
2674 + goPlugin(-1);
2675 + }
2676 + */
2677 +
2678 + function hideContextMenu() {
2679 + QV('contextMenu', false);
2680 + QV('meshContextMenu', false);
2681 + QV('termShellContextMenu', false);
2682 + QV('termShellContextMenuLinux', false);
2683 + //QV('pluginTabContextMenu', false);
2684 + contextelement = null;
2685 + }
2686 +
2687 + //
2688 + // DEVICES MAP
2689 + //
2690 +
2691 + // Maps code starts from here. Initialize all the variables
2692 + var xxmap = {
2693 + map: null,
2694 + contextmenu: null,
2695 + activeInteractions: [], // Save Modified features in this list
2696 + showindex: 0,
2697 + markersSource: null, // Initialize a Source Vector
2698 + markersLayer: null,
2699 + mapLayer: null, // Create a tile and use OSM source
2700 + mapView: null, // Sets the initial view
2701 + }
2702 +
2703 + {{{StartGeoLocationJS}}}
2704 +
2705 + // Add a feature for every Node and change style if connection status changes
2706 + function updateMapMarkers(selectedMesh) {
2707 + if ((xxmap != null) && (xxmap.map == null)) { try { loadmap(); } catch (ex) { console.error('loadmap() exception', ex); } }
2708 + if (xxmap == null) return;
2709 + var boundingBox = null;
2710 + for (var i in nodes) {
2711 + try {
2712 + var loc = map_parseNodeLoc(nodes[i]), feature = xxmap.markersSource.getFeatureById(nodes[i]._id);
2713 + if ((loc != null) && ((nodes[i].meshid == selectedMesh) || (selectedMesh == null))) { // Draw markers for devices with locations
2714 + var lat = loc[0], lon = loc[1], type = loc[2];
2715 + if (boundingBox == null) { boundingBox = [ lat, lon, lat, lon, 0 ]; } else { if (lat < boundingBox[0]) { boundingBox[0] = lat; } if (lon < boundingBox[1]) { boundingBox[1] = lon; } if (lat > boundingBox[2]) { boundingBox[2] = lat; } if (lon > boundingBox[3]) { boundingBox[3] = lon; } }
2716 + if (feature == null) { addFeature(nodes[i]); boundingBox[4] = 1; } else { updateFeature(nodes[i], feature); feature.setStyle(markerStyle(nodes[i], loc[2])); } // Update Feature
2717 + } else {
2718 + if (feature) { xxmap.markersSource.removeFeature(feature); }
2719 + }
2720 + } catch (ex) { console.error('updateMapMarkers() exception', ex, JSON.stringify(nodes[i])); }
2721 + }
2722 + return boundingBox;
2723 + }
2724 +
2725 + // Show node details on hovering over a feature
2726 + var map_cm_popup = new ol.Overlay({ element: Q('xmap-info-window'), positioning: 'bottom-center', stopEvent: false });
2727 +
2728 + // Edit Marker item
2729 + var map_cm_editMarker = { text: "Wijzig knooppuntlocatie", callback: function (obj) { modifyMarkerloc(obj.data); } };
2730 +
2731 + // Clear Marker item
2732 + var map_cm_clearMarker = { text: "Verwijder knooppuntlocatie", callback: function (obj) {
2733 + meshserver.send({ action: 'changedevice', nodeid: obj.data.a, userloc: [] }); // Clear the user position marker
2734 + }};
2735 +
2736 + // Save Marker item
2737 + var map_cm_saveMarker = { text: "Knooppuntlocatie opslaan", callback: function (obj) { saveMarkerloc(obj.data); } };
2738 +
2739 + // Build a context menu for a feature
2740 + var map_cm_nodemenu_items = [
2741 + { text: "Algemene informatie", callback: function (obj) { if (obj.data !=null) { gotoDevice(obj.data, 10); } } },
2742 + { text: "bureaublad", callback: function (obj) { if (obj.data !=null) { gotoDevice(obj.data, 11); } } },
2743 + { text: "Terminal", callback: function (obj) { if (obj.data !=null) { gotoDevice(obj.data, 12); } } },
2744 + { text: "Intel&reg; AMT", callback: function (obj) { if (obj.data !=null) { gotoDevice(obj.data, 14); } } },
2745 + '-',
2746 + { text: "Inzoomen tot maat", callback: function(obj) { var coords = obj.data.getGeometry().getCoordinates(); zoomToLocation(coords, 19); } },
2747 + { text: "Uitzoomen naar maat", callback: function(obj) { var coords = obj.data.getGeometry().getCoordinates(); zoomToLocation(coords, 2); } }
2748 + ];
2749 +
2750 + // Context menu for clicks other than on feature
2751 + var contextmenu_items = [
2752 + { text: "Ververs", callback: function () { refreshMap(true, true); } },
2753 + { text: "Zoom in op maat", callback: function () { zoomToFitExtent(); } },
2754 + { text: "Centreer kaart hier", callback: function(obj) { xxmap.mapView.animate({ center: obj.coordinate } ); } },
2755 + { text: "Plaats hier een knooppunt", callback: function(obj) { placeNode(obj.coordinate); } }
2756 + ];
2757 +
2758 + function stringToIntHash(str) {
2759 + var hash = 0, i;
2760 + for (i = 0; i < str.length; i++) { hash = ((hash << 5) - hash) + str.charCodeAt(i); hash |= 0; }
2761 + return hash;
2762 + };
2763 +
2764 + // Get the lat/lon from a node
2765 + function map_parseNodeLoc(node) {
2766 + var loc = null, t = 0;
2767 + if (node.iploc) { loc = node.iploc; t = 1; }
2768 + if (node.wifiloc) { loc = node.wifiloc; t = 2; }
2769 + if (node.gpsloc) { loc = node.gpsloc; t = 3; }
2770 + if (node.userloc) { loc = node.userloc; t = 4; }
2771 + if ((loc == null) || (typeof loc != 'string')) return null;
2772 + loc = loc.split(',');
2773 + if (t == 1) {
2774 + // If this is IP location, randomize the position a little.
2775 + return [ parseFloat(loc[0]) + (stringToIntHash(node._id.substring(0, 20)) / 100000000000), parseFloat(loc[1]) + (stringToIntHash(node._id.substring(20)) / 100000000000), t ];
2776 + } else {
2777 + // Return the real position
2778 + return [ parseFloat(loc[0]), parseFloat(loc[1]), t ];
2779 + }
2780 + }
2781 +
2782 + // Load the entire map
2783 + function loadmap() {
2784 + if (xxmap == null) return;
2785 + if ((features & 0x8000) == 0) { xxmap = null; return; } // Geolocation not supported
2786 + QV('viewselectmapoption', true);
2787 + QV('devViewButton4', true);
2788 + try {
2789 + // Initialize a Source Vector
2790 + xxmap.markersSource = new ol.source.Vector();
2791 +
2792 + xxmap.markersLayer = new ol.layer.Vector({
2793 + source: xxmap.markersSource
2794 + });
2795 +
2796 + // Create a tile and use OSM source
2797 + xxmap.mapLayer = new ol.layer.Tile({ source: new ol.source.OSM() });
2798 +
2799 + xxmap.mapView = new ol.View({ // Set the initial view
2800 + center: ol.proj.transform([0, 0], 'EPSG:4326', 'EPSG:3857'),
2801 + zoom: 2,
2802 + minZoom: 2,
2803 + maxZoom: 20,
2804 + extent: ol.proj.transformExtent([-100000, -69.55, 100000, 69.55], 'EPSG:4326', 'EPSG:3857')
2805 + });
2806 +
2807 + xxmap.map = new ol.Map({
2808 + target: 'xdevicesmap',
2809 + layers: [xxmap.mapLayer, xxmap.markersLayer],
2810 + view: xxmap.mapView
2811 + });
2812 +
2813 + xxmap.map.addOverlay(map_cm_popup);
2814 +
2815 + // Goto information tab if a user clicks on a feature
2816 + xxmap.map.on('click', function(evt) {
2817 + var feature = xxmap.map.forEachFeatureAtPixel(evt.pixel, function(feat, layer) { return feat; });
2818 + if (feature) {
2819 + var nodeid = feature.getId();
2820 + if (nodeid != null) { gotoDevice(nodeid, 10); } // Goto general info tab
2821 + else { // For pointer
2822 + var nodeFeatgoto = getCorrespondingFeature(feature); gotoDevice(nodeFeatgoto.getId(), 10);
2823 + }
2824 + }
2825 + });
2826 +
2827 + // On hover feature show the name of the node. Also add pointer style
2828 + xxmap.map.on('pointermove', function(evt) {
2829 + var feature = xxmap.map.forEachFeatureAtPixel(evt.pixel, function(feat, layer) { return feat; });
2830 + if (feature) {
2831 + xxmap.map.getTargetElement().style.cursor = 'pointer';
2832 + var coord = feature.getGeometry().getCoordinates();
2833 + // map_cm_popup.setPosition(evt.coordinate);
2834 + map_cm_popup.setPosition(coord);
2835 + var featid = feature.getId();
2836 + if (featid) {
2837 + QH('xmap-info-window', feature.get('name'));
2838 + } else {
2839 + var nodeFeat = getCorrespondingFeature(feature); // Return the node feature associated to pointer.
2840 + QH('xmap-info-window', nodeFeat.get('name'));
2841 + }
2842 + } else {
2843 + xxmap.map.getTargetElement().style.cursor = '';
2844 + QH('xmap-info-window', '');
2845 + }
2846 + });
2847 +
2848 + // Initialize context menu for openlayers
2849 + var contextmenu = new ContextMenu({
2850 + width: 160,
2851 + defaultItems: false, // defaultItems are Zoom In/Zoom Out
2852 + items: contextmenu_items
2853 + });
2854 +
2855 + // On right click open the context menu
2856 + contextmenu.on("Open", function (evt) {
2857 + var feature = xxmap.map.forEachFeatureAtPixel(evt.pixel, function(ft, l){ return ft; });
2858 + xxmap.contextmenu.clear(); //Clear the context menu
2859 + if (feature) {
2860 + var featId = feature.getId();
2861 + if (featId) { addContextMenuItems(feature); } // Node feature will have an id
2862 + else { // If the feature is a pointer, Get its corresponding Node feature
2863 + var nodeFeature = getCorrespondingFeature(feature); //return the node feature associated to pointer.
2864 + if (nodeFeature) { addContextMenuItems(nodeFeature); }
2865 + else{ xxmap.contextmenu.extend(contextmenu_items); }
2866 + }
2867 + }
2868 + else { xxmap.contextmenu.extend(contextmenu_items); }
2869 + });
2870 + if (xxmap.contextmenu == null) { xxmap.contextmenu = contextmenu; }
2871 + xxmap.map.addControl(xxmap.contextmenu);
2872 + //addMeshOptions(); // Adds Mesh names to mesh dropdown
2873 + } catch (ex) {
2874 + console.log(ex);
2875 + QV('viewselectmapoption', false);
2876 + QV('devViewButton4', false);
2877 + xxmap = null;
2878 + }
2879 + }
2880 +
2881 + // Add feature on to Map for a Node
2882 + function addFeature(node, lat, lon) {
2883 + var existingfeature = getModifiedFeature(node._id); // Check if Corresponding feature was Modified ( Modifed feature are in active interactions list)
2884 + if (existingfeature) { xxmap.markersSource.addFeature(existingfeature); } // Add that existing feature
2885 + else { // Add new feature for this node
2886 + if (!lat && !lon) { var loc = map_parseNodeLoc(node); lat = loc[0]; lon = loc[1]; }
2887 +
2888 + // Fix the longiture and send an event to patch the db to correct coordinate format. It will cause second unnecessary updateFeature on this node to the map.
2889 + if (lon > 180) { lon = 180 - lon; meshserver.send({ action: 'changedevice', nodeid: node._id, userloc: [ lat, lon ] }); }
2890 +
2891 + if ((lat < 90) && (lat > -90) && (lon < 180) && (lon > -180)) { // Check valid lat/lon
2892 + var feature = new ol.Feature({ geometry: new ol.geom.Point(ol.proj.transform([lon, lat], 'EPSG:4326','EPSG:3857')), name: node.name, status: node.conn, lat: lat, lon: lon });
2893 + feature.setId(node._id); // Set id for the device as nodeid
2894 + feature.setStyle(markerStyle(node));
2895 + xxmap.markersSource.addFeature(feature); // Add the feature to Marker Source
2896 + }
2897 + }
2898 + }
2899 +
2900 + // Removing any feature from map
2901 + function removeFeature(node) {
2902 + var feature = xxmap.markersSource.getFeatureById(node._id);
2903 + if (feature) { xxmap.markersSource.removeFeature(feature); }
2904 + }
2905 +
2906 + // Update feature
2907 + function updateFeature(node, feature) {
2908 + if (node.conn != feature.get('status') ) { // Update status if changed
2909 + feature.set('status',node.conn)
2910 + feature.setStyle(markerStyle(node));
2911 + }
2912 +
2913 + // Since this is IP address location, add some fixed randomness to the location. Avoid pin pile-up.
2914 + var loc = map_parseNodeLoc(node);
2915 + if (loc != null) {
2916 + var lat = loc[0], lon = loc[1];
2917 + if ((lat != feature.get('lat')) || (lon != feature.get('lon'))) { // Update lat and lon if changed
2918 + feature.set('lat', lat); feature.set('lon', lon);
2919 + var modifiedCoordinates = ol.proj.transform([parseFloat(lon), parseFloat(lat)], 'EPSG:4326', 'EPSG:3857');
2920 + feature.getGeometry().setCoordinates(modifiedCoordinates);
2921 + }
2922 + }
2923 +
2924 + if (node.name != feature.get('name') ) { feature.set('name', node.name); } // Update name
2925 + }
2926 +
2927 + // Enable dragging of a marker after edit option is clicked in context menu
2928 + function modifyMarkerloc(ft){
2929 + var featid = ft.getId();
2930 + if (featid) {
2931 + ft.setStyle(markerStyle(getNodeFromId(ft.a), 4)); // Switch to a user marker
2932 + if ( !getActiveInteractions(ft)) {
2933 + var dragInteration = new ol.interaction.Modify({
2934 + features: new ol.Collection([ft]),
2935 + pixelTolerance: 10
2936 + });
2937 + xxmap.activeInteractions.push({ featureid: featid, feature:ft, interaction: dragInteration }); // Also keep track of Interactions
2938 + xxmap.map.addInteraction(dragInteration);
2939 + }
2940 + }
2941 + }
2942 +
2943 + // This will be called when save location option is clicked in context menu
2944 + function saveMarkerloc(ft){
2945 + var featid = ft.getId()
2946 + if (featid) {
2947 + var actInteraction = getActiveInteractions(ft);
2948 + if (actInteraction) { // Check if the interaction exists
2949 + xxmap.map.removeInteraction(actInteraction); //Clear Interaction for that node
2950 + removeInteraction(featid);
2951 + var coord = ft.getGeometry().getCoordinates();
2952 + var v = ol.proj.transform(coord, 'EPSG:3857', 'EPSG:4326');
2953 + if (v[0] > 180) { v[0] = 180 - v[0]; }
2954 + var vx = [ v[1], v[0] ]; // Flip the coordinates around, lat/long
2955 + meshserver.send({ action: 'changedevice', nodeid: featid, userloc: vx }); // Send them to server to save changes
2956 + }
2957 + }
2958 + }
2959 +
2960 + // Style the Markers
2961 + function markerStyle(node, type) {
2962 + if (type == null) {
2963 + type = 0;
2964 + if (node.iploc) { type = 1; }
2965 + if (node.wifiloc) { type = 2; }
2966 + if (node.gpsloc) { type = 3; }
2967 + if (node.userloc) { type = 4; }
2968 + }
2969 + var types = ['', '-ip','-wifi','-gps','-user'];
2970 + var color = connStateColor(node);
2971 + var style = new ol.style.Style({
2972 + image: new ol.style.Icon({ color: color, anchor: [0.5, 1], src: 'images/mapmarker' + types[type] + '.png' })
2973 + //stroke: new ol.style.Stroke({ color: '#000', width: 20 })
2974 + //text: new ol.style.Text({ text: 'bob!', textAlign: 'right', offsetX: -10, fill: new ol.style.Fill({ color: '#000' }), stroke: new ol.style.Stroke({ color: '#fff', width: 2 }) })
2975 + });
2976 +
2977 + //deviceMark.setStyle(new ol.style.Style({
2978 + // text: new ol.style.Text({
2979 + // //font: '12px helvetica,sans-serif',
2980 + // text: currentNode.name,
2981 + // textAlign: 'right',
2982 + // offsetX: -10,
2983 + // fill: new ol.style.Fill({ color: '#000' }),
2984 + // stroke: new ol.style.Stroke({ color: '#fff', width: 2 })
2985 + // }),
2986 + // image: new ol.style.Icon(({ color: [113, 140, 0], src: 'images/dot.png' })) }));
2987 +
2988 + return [ style ];
2989 + }
2990 +
2991 + // TODO: Add more connection status types. Currently we only change color if connection status changes
2992 + function connStateColor(nodeConn){
2993 + if (nodeConn.conn == 1 || nodeConn.conn == 3 || nodeConn.conn == 5) { return '#00ffdd'; } // Green for connected devices
2994 + return '#C70039'; // Red if the Agent is not connected
2995 + }
2996 +
2997 + // Add save/edit option to context menu
2998 + function addContextMenuItems(feature) {
2999 + if (getActiveInteractions(feature)) { // If this feature is modified then display save option in contextmenu
3000 + map_cm_saveMarker.data = feature;
3001 + xxmap.contextmenu.push(map_cm_saveMarker);
3002 + } else {
3003 + map_cm_editMarker.data = feature;
3004 + xxmap.contextmenu.push(map_cm_editMarker);
3005 + var node = getNodeFromId(feature.a);
3006 + if (node.userloc) {
3007 + map_cm_clearMarker.data = feature;
3008 + xxmap.contextmenu.push(map_cm_clearMarker);
3009 + }
3010 + }
3011 + map_cm_nodemenu_items.forEach(function (item){
3012 + if (item.text == "Inzoomen tot maat" || item.text == "Uitzoomen naar maat") { item.data = feature; }
3013 + else { if (item != '-') { item.data = feature.getId(); } }
3014 + });
3015 + xxmap.contextmenu.extend(map_cm_nodemenu_items);
3016 + }
3017 +
3018 + // Return a active Interaction if it exists in activeInteractions list
3019 + function getActiveInteractions(feature) {
3020 + var featid = feature.getId();
3021 + for (var i = 0; i < xxmap.activeInteractions.length; i++) {
3022 + if (xxmap.activeInteractions[i].featureid == featid) { return xxmap.activeInteractions[i].interaction; }
3023 + }
3024 + return false;
3025 + }
3026 +
3027 + // Return Modified feature based on Id
3028 + function getModifiedFeature(featid) {
3029 + if (featid) {
3030 + for (var i = 0; i < xxmap.activeInteractions.length; i++) {
3031 + if (xxmap.activeInteractions[i].featureid == featid) { return xxmap.activeInteractions[i].feature; }
3032 + }
3033 + }
3034 + return null;
3035 + }
3036 +
3037 + // Remove Interaction
3038 + function removeInteraction(ftid) {
3039 + var index = -1;
3040 + for (var i = 0; i < xxmap.activeInteractions.length; i++) {
3041 + if (xxmap.activeInteractions[i].featureid === ftid) { index = i; break; }
3042 + }
3043 + if (index >= 0) { xxmap.activeInteractions.splice(index, 1); }
3044 + }
3045 +
3046 + // Check if pointer coordinates are equal to features and return node feature
3047 + function getCorrespondingFeature(pointerFeat) {
3048 + var pointerCoord = pointerFeat.getGeometry().getCoordinates();
3049 + for (var i = 0; i < xxmap.activeInteractions.length ; i++) {
3050 + var modifiedFeatures = xxmap.activeInteractions[i].feature;
3051 + var fearCoord = modifiedFeatures.getGeometry().getCoordinates();
3052 + if (fearCoord[0].toFixed(5) == pointerCoord[0].toFixed(5) && fearCoord[1].toFixed(5) == pointerCoord[1].toFixed(5) ) { return modifiedFeatures; }
3053 + }
3054 + return null;
3055 + }
3056 +
3057 + // Refresh the map and clear list
3058 + function refreshMap(reset, rebound){
3059 + if (reset) {
3060 + xxmap.map.setTarget(null);
3061 + xxmap.map = null;
3062 + xxmap.markersSource = null;
3063 + xxmap.mapView = null;
3064 + xxmap.mapLayer = null;
3065 + xxmap.activeInteractions = []; // Clear Active Interaction list
3066 + }
3067 + //clearMeshOptions();
3068 + //onSelectMeshChange();
3069 + var box = updateMapMarkers();
3070 + if ((box != null) && (rebound || (box[4] == 1))) {
3071 + var clat = (box[0] + box[2]) / 2;
3072 + var clon = (box[1] + box[3]) / 2;
3073 + var cscale = Math.max(Math.abs(box[0] - box[2]), Math.abs(box[1] - box[3]));
3074 + var view = xxmap.map.getView();
3075 + view.setCenter(ol.proj.transform([clon, clat], 'EPSG:4326', 'EPSG:3857'));
3076 + var i = 360, j = -2;
3077 + while (i > cscale) { j++; i = i / 2; }
3078 + view.setZoom(j);
3079 + }
3080 + }
3081 +
3082 + // Called When Place a node option is clicked from context menu
3083 + function placeNode(coords) {
3084 + if (xxdialogMode) return;
3085 + var x = '<div style=margin-bottom:6px><label for=selectnode-search>' + "Zoeken" + '</label>&nbsp&nbsp<input type=text placeholder="' + "Apparaat naam" + '" id="selectnode-search" onchange=onPlaceNodeInputChange() onkeyup=onPlaceNodeInputChange() autocomplete=off style=width:120px></div><div id=placenode style="height:254px;overflow-y:auto;width:100%;margin:12px 1px 4px 1px;"><div id=noNodesMapPlace style=text-align:center;width:100%;display:none>' + "Geen apparaten gevonden." + '</div>';
3086 + for (var i in nodes) {
3087 + x += '<div class=noselect id=' + nodes[i]._id + '-rowid onclick=selectNodeToPlace(event,\''+ nodes[i]._id +'\') style=background-color:lightgray;margin-bottom:4px;border-radius:2px><input name=PlaceMapDeviceCheckbox id=' + nodes[i]._id + '-checkid type=checkbox style=width:16px;display:inline />';
3088 + x += '<div class=j' + nodes[i].icon + ' style=width:16px;height:16px;margin-top:2px;margin-right:4px;display:inline-block></div><div style=width:16px;display:inline>' + nodes[i].name + '</div></div>';
3089 + }
3090 + setDialogMode(2, "Selecteer een knooppunt om te plaatsen", 3, placeNodeEx, x + '</div>', coords);
3091 + onPlaceNodeInputChange();
3092 + }
3093 +
3094 + function placeNodeEx(button, coords) {
3095 + var elements = document.getElementsByName('PlaceMapDeviceCheckbox');
3096 + for (var i in elements) {
3097 + if (elements[i].checked) {
3098 + var node = getNodeFromId(elements[i].id.substring(0, elements[i].id.length - 8));
3099 + if (node) {
3100 + var feature = xxmap.markersSource.getFeatureById(i);
3101 + var v = ol.proj.transform(coords, 'EPSG:3857', 'EPSG:4326');
3102 + var vx = [ v[1], v[0] ]; // Flip the coordinates around, lat/long
3103 + if (feature) {
3104 + feature.getGeometry().setCoordinates(coords);
3105 + var activeInteraction = getActiveInteractions(feature);
3106 + if (activeInteraction) {
3107 + saveMarkerloc(feature);
3108 + } else { // If this feature is not saved after its location is changed, then send updated coords to server.
3109 + meshserver.send({ action: 'changedevice', nodeid: node._id, userloc: vx }); // Send them to server to save changes
3110 + }
3111 + } else {
3112 + meshserver.send({ action: 'changedevice', nodeid: node._id, userloc: vx }); // This Node is not yet added to maps.
3113 + }
3114 + }
3115 + }
3116 + }
3117 + }
3118 +
3119 + // Called when the user changes the search box
3120 + function onPlaceNodeInputChange() {
3121 + updatePlaceNodeTable(Q('selectnode-search').value.trim().toLowerCase());
3122 + }
3123 +
3124 + // Update the list of devices in the "place on map" table
3125 + function updatePlaceNodeTable(inputSearch) {
3126 + var elements = document.getElementsByName('PlaceMapDeviceCheckbox'), count = 0;
3127 + for (var i in nodes) {
3128 + var visible = ((nodes[i].namel.indexOf(inputSearch) >= 0 || inputSearch == '') || (nodes[i].rnamel != null && nodes[i].rnamel.indexOf(inputSearch) >= 0));
3129 + if (visible) { count++; }
3130 + QV(nodes[i]._id + '-rowid', visible);
3131 + }
3132 + QV('noNodesMapPlace', count == 0);
3133 + //console.log(selected);
3134 + //for (var i in nodes) {
3135 + // if ((nodes[i].name.toLowerCase().indexOf(inputSearch) >= 0 || inputSearch == '') || (nodes[i].rnamel != null && nodes[i].rnamel.toLowerCase().indexOf(inputSearch) >= 0)) {
3136 + // console.log(selected.indexOf(nodes[i]._id));
3137 + // x += '<div class=noselect id=' + nodes[i]._id + '-rowid onclick=selectNodeToPlace(event,\''+ nodes[i]._id +'\') style=background-color:lightgray;margin-bottom:4px;border-radius:2px><input name=PlaceMapDeviceCheckbox id=' + nodes[i]._id + '-checkid type=checkbox style=width:16px;display:inline ' + ((selected.indexOf(nodes[i]._id) >= 0)?'checked':'') + ' />';
3138 + // x += '<div class=j' + nodes[i].icon + ' style=width:16px;height:16px;margin-top:2px;margin-right:4px;display:inline-block></div><div style=width:16px;display:inline>' + nodes[i].name + '</div></div>';
3139 + // }
3140 + //}
3141 + //if (x == '') { x = '<div style=text-align:center;width:100%>No devices found.</div>'; }
3142 + //QH('placenode', '');
3143 + }
3144 +
3145 + // Called when a user clicks on a device to toggle selection for placement on map.
3146 + function selectNodeToPlace(e, id) {
3147 + // Toggle checkbox if needed
3148 + if (e.target.name != 'PlaceMapDeviceCheckbox') { var inputElement = Q(id + '-checkid'); inputElement.checked = !inputElement.checked; }
3149 +
3150 + // Check button state
3151 + var elements = document.getElementsByName('PlaceMapDeviceCheckbox'), checkcount = 0;
3152 + for (var i in elements) { if (elements[i].checked) checkcount++; }
3153 + QE('idx_dlgOkButton', checkcount > 0);
3154 + }
3155 +
3156 + // Add option for available meshes in mesh Dropdown
3157 + function addMeshOptions(addMeshid, meshName) {
3158 + //var meshOptions = Q('select-mesh');
3159 + //if (addMeshid && meshName) {
3160 + // var option = document.createElement('option');
3161 + // option.value =addMeshid;
3162 + // option.text = meshName;
3163 + // meshOptions.add(option); // Add specific option
3164 + //}
3165 + //else {
3166 + // for (var i in meshes) { // Add all options
3167 + // var option = document.createElement('option');
3168 + // option.value = i;
3169 + // option.text = meshes[i].name;
3170 + // meshOptions.add(option);
3171 + // }
3172 + //}
3173 + }
3174 +
3175 + // Remove/Modify options in Mesh dropdown (if modMeshname is defined then Modify else Remove)
3176 + function meshOptionRmvMod(delMeshid, modMeshname){
3177 + //var meshOptions = Q('select-mesh');
3178 + //if (delMeshid) {
3179 + // var index=-1;
3180 + // for (var i = 1; i < meshOptions.options.length; i++) {
3181 + // if (meshOptions[i].value === delMeshid) { index=i; }
3182 + // }
3183 + // if (index > 0) {
3184 + // if (modMeshname) {
3185 + // meshOptions[index].innerHTML=modMeshname; // If Mesh name is Modified
3186 + // }
3187 + // else { meshOptions.remove(index); }
3188 + // }
3189 + //}
3190 + }
3191 +
3192 + //Check if there is any mesh created
3193 + function meshExists() {
3194 + for (var i in meshes) { if (meshes[i]) { return true; } }
3195 + return false;
3196 + }
3197 +
3198 + // Reset Mesh dropdown option to 'All' when a current view mesh is deleted.
3199 + function setMeshView(emeshid) {
3200 + var selectMeshElement=Q('select-mesh');
3201 + var selectedIndex = selectMeshElement.selectedIndex;
3202 + if (selectMeshElement[selectedIndex].value == emeshid) { selectMeshElement[0].selected = true; onSelectMeshChange(); }
3203 + }
3204 +
3205 + // Clear all mesh options except 'All'
3206 + function clearMeshOptions() {
3207 + //var meshOptions=Q('select-mesh');
3208 + //for(var i = meshOptions.options.length - 1 ; i > 0 ; i--) { meshOptions.remove(i); }
3209 + }
3210 +
3211 + // Make a http get call- Replace this with AJAX get if jquery is used
3212 + function getSearchLocation() {
3213 + try {
3214 + var searchdata = Q('mapSearchLocation').value.trim();
3215 + if (searchdata.length > 0) {
3216 + var xmlhttp = new XMLHttpRequest(); // Compatible with Chrome, Opera, Safari, IE7+, Firefox.
3217 + xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { formatSearchData(xmlhttp.responseText); } }
3218 + xmlhttp.open('GET', 'https://nominatim.openstreetmap.org/search?q=' + searchdata + '&format=json', true); // Get request
3219 + xmlhttp.send();
3220 + }
3221 + } catch (e) {}
3222 + }
3223 +
3224 + // Format data recieved from nominatim API and display it on content window
3225 + function formatSearchData(data) {
3226 + try {
3227 + QH('xmapSearchResults','');
3228 + var dataInfo = JSON.parse(data), count = 0, x = '<div class="xmapItem">';
3229 + for (var i = 0; i < dataInfo.length; i++) {
3230 + if (dataInfo[i].display_name && dataInfo[i].boundingbox[0] && dataInfo[i].boundingbox[1] && dataInfo[i].boundingbox[2] && dataInfo[i].boundingbox[3]) {
3231 + count++;
3232 + var itemclass = (i % 2 == 0)?'xmapItemSel1':'xmapItemSel1';
3233 + x += '<div class="' + itemclass + '" onclick=mapGotoSelectedLocation(this)><div>' + dataInfo[i].display_name + '</div><div style=display:none>' + dataInfo[i].boundingbox[0] + '!#!' + dataInfo[i].boundingbox[1] + '!#!' + dataInfo[i].boundingbox[2] + '!#!' + dataInfo[i].boundingbox[3] + '</div></div>';
3234 + }
3235 + }
3236 + x += '</div>';
3237 + if (count == 1) {
3238 + // If only one result is returned then zoom to that location
3239 + var extent = [ parseFloat(dataInfo[0].boundingbox[2]), parseFloat(dataInfo[0].boundingbox[0]), parseFloat(dataInfo[0].boundingbox[3]), parseFloat(dataInfo[0].boundingbox[1]) ];
3240 + zoomToExtent(extent);
3241 + } else {
3242 + if (count == 0) { x = '<div style=width:200px>' + "Geen locatie gevonden." + '<div>'; }
3243 + QV('xmapSearchResultsDlg', true);
3244 + }
3245 + QH('xmapSearchResults', x);
3246 + }
3247 + catch (e) {}
3248 + }
3249 +
3250 + // Zoom into the bounding box
3251 + function mapGotoSelectedLocation(obj) {
3252 + var objchildren = obj.children;
3253 + var boundingBox = objchildren[1].innerHTML.split('!#!');
3254 + var extent = [parseFloat(boundingBox[2]), parseFloat(boundingBox[0]), parseFloat(boundingBox[3]), parseFloat(boundingBox[1])];
3255 + //Q('search-location').value = objchildren[0].innerHTML;
3256 + zoomToExtent(extent);
3257 + mapCloseSearchWindow();
3258 + }
3259 +
3260 + // Close the search window
3261 + function mapCloseSearchWindow() {
3262 + QH('xmapSearchResults', '');
3263 + QV('xmapSearchResultsDlg', false);
3264 + }
3265 +
3266 + // Zoom to specific cordinates
3267 + function zoomToLocation(coordinates, zoomVal) {
3268 + var view = xxmap.map.getView();
3269 + view.setCenter(coordinates);
3270 + view.setZoom(zoomVal);
3271 + }
3272 +
3273 + function zoomToFitExtent() {
3274 + var features = xxmap.markersSource.getFeatures();
3275 + if (features.length > 0) {
3276 + var extent = xxmap.markersSource.getExtent();
3277 + xxmap.map.getView().fit(extent, xxmap.map.getSize());
3278 + }
3279 + }
3280 +
3281 + function zoomToExtent(extent){
3282 + var boundingExtent = ol.proj.transformExtent(extent, ol.proj.get('EPSG:4326'), ol.proj.get('EPSG:3857'));
3283 + xxmap.map.getView().fit(boundingExtent, xxmap.map.getSize());
3284 + }
3285 +
3286 + {{{EndGeoLocationJS}}}
3287 +
3288 + //
3289 + // MY DEVICE
3290 + //
3291 + function refreshDevice(nodeid) {
3292 + if (!currentNode || currentNode._id != nodeid) return;
3293 + gotoDevice(nodeid, xxcurrentView, true);
3294 + }
3295 +
3296 + function getNodeRights(nodeid) {
3297 + var node = getNodeFromId(nodeid), mesh = meshes[node.meshid];
3298 + return mesh.links[userinfo._id].rights;
3299 + }
3300 +
3301 + var currentNode;
3302 + var powerTimelineNode = null;
3303 + var powerTimelineReq = null;
3304 + var powerTimelineUpdate = null;
3305 + var powerTimeline = null;
3306 + function getCurrentNode() { return currentNode; };
3307 + function gotoDevice(nodeid, panel, refresh, event) {
3308 + // Remind the user to verify the email address
3309 + if ((userinfo.emailVerified !== true) && (serverinfo.emailcheck == true) && (userinfo.siteadmin != 0xFFFFFFFF)) { setDialogMode(2, "Gebruikersaccount beveiliging", 1, null, "Geen toegang tot een apparaat totdat een e-mailadres is geverifieerd. Dit is vereist voor wachtwoordherstel. Ga naar het tabblad \"Mijn account\" om een e-mailadres te wijzigen en te verifiëren."); return; }
3310 +
3311 + // Remind the user to add two factor authentication
3312 + if ((features & 0x00040000) && !((userinfo.otpsecret == 1) || (userinfo.otphkeys > 0) || (userinfo.otpkeys > 0))) { setDialogMode(2, "Gebruikersaccount beveiliging", 1, null, "Geen toegang tot een apparaat totdat tweefactorauthenticatie is ingeschakeld. Dit is vereist voor extra beveiliging. Ga naar het tabblad \"Mijn account\" en bekijk het gedeelte \"Accountbeveiliging\"."); return; }
3313 +
3314 + if (event && (event.shiftKey == true)) {
3315 + // Open the device in a different tab
3316 + window.open(window.location.origin + '?node=' + nodeid.split('/')[2] + '&viewmode=10&hide=16', 'meshcentral:' + nodeid);
3317 + return;
3318 + }
3319 +
3320 + //disconnectAllKvmFunction();
3321 + var node = getNodeFromId(nodeid);
3322 + var mesh = meshes[node.meshid];
3323 + var meshrights = mesh.links[userinfo._id].rights;
3324 + if (!currentNode || currentNode._id != node._id || refresh == true) {
3325 + currentNode = node;
3326 +
3327 + // Add node name
3328 + var nname = EscapeHtml(node.name);
3329 + if (nname.length == 0) { nname = '<i>' + "Geen" + '</i>'; }
3330 + if (((meshrights & 4) != 0) && ((!mesh.flags) || ((mesh.flags & 2) == 0))) { nname = '<span tabindex=0 title=\"' + "Klik hier om de apparaatnaam van de server te bewerken" + '\" onclick=showEditNodeValueDialog(0) onkeyup="if (event.key == \'Enter\') showEditNodeValueDialog(0)" style=cursor:pointer>' + nname + ' <img class=hoverButton src="images/link5.png" /></span>'; }
3331 + nname += '<span style=color:#AAA;font-size:small> - ' + EscapeHtml(mesh.name) + '</span>';
3332 + QH('p10deviceName', nname);
3333 + QH('p11deviceName', nname);
3334 + QH('p12deviceName', nname);
3335 + QH('p13deviceName', nname);
3336 + QH('p14deviceName', nname);
3337 + QH('p15deviceName', "Console - " + nname);
3338 + QH('p16deviceName', nname);
3339 + QH('p17deviceName', nname);
3340 + QH('p19deviceName', nname);
3341 +
3342 + // Node attributes
3343 + var x = '<table style=width:100%>';
3344 +
3345 + // Attribute: Mesh
3346 + x += addDeviceAttribute('<span title=\"' + "De naam van de apparaatgroep waartoe deze computer behoort" + '\">' + "Groep" + '</span>', '<a href=# title=\"' + "De naam van de apparaatgroep waartoe deze computer behoort" + '\" onclick=gotoMesh("' + node.meshid + '") style=cursor:pointer>' + EscapeHtml(meshes[node.meshid].name) + '</a>');
3347 +
3348 + // Attribute: Name
3349 + if ((node.rname != null) && (node.name != node.rname)) { x += addDeviceAttribute('<span title="The name of this computer as set in the operating system">Name</span>', '<span title="The name of this computer as set in the operating system">' + EscapeHtml(node.rname) + '</span>'); }
3350 +
3351 + // Attribute: Host
3352 + if ((features & 1) == 0) { // If not WAN-only, local hostname is in use
3353 + if ((meshrights & 4) != 0) {
3354 + if (node.host) {
3355 + x += addDeviceAttribute("Hostname", '<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>' + EscapeHtml(node.host) + '</span>');
3356 + } else {
3357 + x += addDeviceAttribute("Hostname", '<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>' + "Geen" + '</i></span>');
3358 + }
3359 + } else {
3360 + x += addDeviceAttribute("Hostname", EscapeHtml(node.host));
3361 + }
3362 + }
3363 +
3364 + // Attribute: Description
3365 + var description = node.desc?EscapeHtml(node.desc):('<i>' + "Geen" + '</i>');
3366 + if ((meshrights & 4) != 0) {
3367 + x += addDeviceAttribute("Omschrijving", '<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>' + description + ' <img class=hoverButton src="images/link5.png" /></span>');
3368 + } else {
3369 + x += addDeviceAttribute("Omschrijving", description);
3370 + }
3371 +
3372 + // Attribute: Mesh Agent
3373 + var agentsStr = ["Onbekend", "Windows 32bit console", "Windows 64bit console", "Windows 32bit service", "Windows 64bit service", "Linux 32bit", "Linux 64bit", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32bit", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64bit", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64bit", "Windows MinCore console", "Windows MinCore service", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Onbekend", "Onbekend", "FreeBSD x86-64"];
3374 + if ((node.agent != null) && (node.agent.id != null) && (node.agent.ver != null)) {
3375 + var str = '';
3376 + if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; }
3377 + if (node.agent.ver != 0) { str += ' v' + node.agent.ver; }
3378 + x += addDeviceAttribute("Mesh Agent", str);
3379 + }
3380 +
3381 + // Attribute: Intel AMT
3382 + if (node.intelamt != null) {
3383 + var str = '';
3384 + var provisioningStates = { 0: nobreak("Niet geactiveerd (Pre)"), 1: nobreak("Niet geactiveerd (In)"), 2: nobreak("Geactiveerd") };
3385 + if (node.intelamt.ver != null && node.intelamt.state == null) { str += '<i>' + "Onbekende staat" + '</i>, v' + node.intelamt.ver; } else
3386 +
3387 + if ((node.intelamt.ver == null) && (node.intelamt.state == 2)) { str += '<i>' + "Geactiveerd" + '</i>'; }
3388 + else if ((node.intelamt.ver == null) || (node.intelamt.state == null)) { str += '<i>' + "Onbekende versie en staat" + '</i>'; }
3389 + else {
3390 + str += provisioningStates[node.intelamt.state];
3391 + if ((node.intelamt.state == 2) && node.intelamt.flags) { if (node.intelamt.flags & 2) { str += ' <span title=\"' + "Intel AMT wordt geactiveerd in Client Control Mode" + '\">' + "CCM" + '</span>'; } else if (node.intelamt.flags & 4) { str += ' <span title=\"' + "Intel AMT wordt geactiveerd in de beheerdersmodus" + '\">' + "ACM" + '</span>'; } }
3392 + str += (', v' + node.intelamt.ver);
3393 + }
3394 +
3395 + if (node.intelamt.tls == 1) { str += ', <span title=\"' + "Intel AMT is ingesteld met TLS-netwerkbeveiliging" + '\">' + "TLS" + '</span>'; }
3396 + if (node.intelamt.state == 2) {
3397 + if (node.intelamt.user == null || node.intelamt.user == '') {
3398 + if ((meshrights & 4) != 0) {
3399 + str += ', <i style=color:#FF0000;cursor:pointer title=\"' + "Bewerk Intel® AMT-gegevens" + '\" onclick=editDeviceAmtSettings("' + node._id + '")>' + "Geen referenties" + '</i>';
3400 + } else {
3401 + str += ', <i style=color:#FF0000>' + "Geen referenties" + '</i>';
3402 + }
3403 + }
3404 + str += ' ';
3405 + if ((meshrights & 4) != 0) {
3406 + str += '<img src=images/link4.png height=10 width=10 title=\"' + "Bewerk Intel® AMT-gegevens" + '\" style=cursor:pointer onclick=editDeviceAmtSettings("' + node._id + '")>';
3407 + }
3408 + }
3409 +
3410 + var meName = '<span title=\"Intel&reg; Manageability Engine\">' + "Intel&reg; ME" + '<span>';
3411 + if (typeof node.intelamt.sku == 'number') {
3412 + if ((node.intelamt.sku & 8) != 0) { meName = '<span title=\"' + "Intel&reg; Active Management Technology" + '\">' + "Intel&reg; AMT" + '<span>'; }
3413 + else if ((node.intelamt.sku & 16) != 0) { meName = '<span title=\"' + "Standaard beheerbaarheid van Intel®" + '\">' + "Intel&reg; SM" + '<span>'; }
3414 + }
3415 + x += addDeviceAttribute(meName, str);
3416 + }
3417 +
3418 + if (mesh.mtype == 2) {
3419 + // Attribute: Mesh Agent Tag
3420 + if ((node.agent != null) && (node.agent.tag != null)) {
3421 + var tag = EscapeHtml(node.agent.tag);
3422 + if (tag.startsWith('mailto:')) { tag = '<a href="' + tag + '">' + tag.substring(7) + '</a>'; }
3423 + x += addDeviceAttribute("Agent Tag", tag);
3424 + }
3425 + } else {
3426 + // Attribute: Intel AMT Tag
3427 + if ((node.intelamt != null) && (node.intelamt.tag != null)) {
3428 + var tag = EscapeHtml(node.intelamt.tag);
3429 + if (tag.startsWith('mailto:')) { tag = '<a href="' + tag + '">' + tag.substring(7) + '</a>'; }
3430 + x += addDeviceAttribute("Intel&reg; AMT Tag", tag);
3431 + }
3432 + }
3433 +
3434 + // Attribute: Intel AMT
3435 + //if (node.intelamt && node.intelamt.user) { x += addDeviceAttribute('Intel&reg; AMT', node.intelamt.user); }
3436 +
3437 + // Operating system description
3438 + if (node.osdesc) { x += addDeviceAttribute("Besturingssysteem", node.osdesc); }
3439 +
3440 + // Antivirus
3441 + if (node.av && node.av.length > 0) {
3442 + var y = [];
3443 + for (var i in node.av) {
3444 + if (node.av[i].product) {
3445 + var avx = EscapeHtml(node.av[i].product);
3446 + if (node.av[i].enabled !== true) { avx += ' - <span style=color:red>' + "Uitgeschakeld" + '</span>'; }
3447 + if (node.av[i].updated !== true) { avx += ' - <span style=color:red>' + "Verouderd" + '</span>'; }
3448 + if ((node.av[i].enabled == true) && (node.av[i].updated == true)) { avx += ' - <span style=color:green>' + "Oke" + '</span>'; }
3449 + y.push(avx);
3450 + }
3451 + }
3452 + x += addDeviceAttribute("Anti-virus", y.join('<br />'));
3453 + }
3454 +
3455 + // Active Users
3456 + if (node.users && node.conn && (node.users.length > 0) && (node.conn & 1)) { x += addDeviceAttribute(format("Actieve gebruiker(s){0}", ((node.users.length > 1)?'s':'')), node.users.join(', ')); }
3457 +
3458 + // Attribute: Connectivity (Only show this if more than just the agent is connected).
3459 + var connectivity = node.conn;
3460 + if (connectivity && connectivity > 1) {
3461 + var cstate = [];
3462 + if ((node.conn & 1) != 0) cstate.push('<span title=\"' + "Mesh-agent is verbonden en klaar voor gebruik." + '\">' + "Mesh Agent" + '</span>');
3463 + if ((node.conn & 2) != 0) cstate.push('<span title=\"' + "Intel® AMT CIRA is verbonden en klaar voor gebruik." + '\">' + "Intel&reg; AMT CIRA" + '</span>');
3464 + else if ((node.conn & 4) != 0) cstate.push('<span title=\"' + "Intel® AMT is routeerbaar en klaar voor gebruik." + '\">' + "Intel&reg; AMT" + '</span>');
3465 + if ((node.conn & 8) != 0) cstate.push('<span title=\"' + "Mesh-agent is bereikbaar met een andere agent als relay." + '\">' + "Mesh Relay" + '</span>');
3466 + if ((node.conn & 16) != 0) { cstate.push('<span title=\"' + "MQTT verbinding met het apparaat is actief." + '\">' + "MQTT" + '</span>'); }
3467 + x += addDeviceAttribute("connectiviteit", cstate.join(', '));
3468 + }
3469 +
3470 + // Node grouping tags
3471 + var groupingTags = '<i>' + "Geen" + '</i>';
3472 + if (node.tags != null) { groupingTags = ''; for (var i in node.tags) { groupingTags += '<span class="tagSpan">' + node.tags[i] + '</span>'; } }
3473 + if ((meshrights & 4) != 0) {
3474 + x += addDeviceAttribute('Tags', '<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>' + groupingTags + ' <img class=hoverButton src="images/link5.png" /></span>');
3475 + } else {
3476 + x += addDeviceAttribute('Tags', groupingTags);
3477 + }
3478 +
3479 + x += '</table><br />';
3480 + // Show action button, only show if we have permissions 4, 8, 64
3481 + if ((meshrights & 76) != 0) { x += '<input type=button value=\"' + "Akties" + '\" title=\"' + "Voer krachtacties uit op het apparaat" + '\" onclick=deviceActionFunction() />'; }
3482 + x += '<input type=button value=\"' + "Notities" + '\" title=\"' + "Bekijk opmerkingen over dit apparaat" + '\" onclick=showNotes(' + ((meshrights & 128) == 0) + ',"' + encodeURIComponent(node._id) + '") />';
3483 + x += '<input type=button value=\"' + "Gebeurtenissenlog" + '\" title=\"' + "Schrijf een gebeurtenis voor dit apparaat" + '\" onclick=writeDeviceEvent("' + encodeURIComponent(node._id) + '") />';
3484 + //if ((connectivity & 1) && (meshrights & 8) && (node.agent.id < 5)) { x += '<input type=button value=Toast title="Display a text message of the remote device" onclick=deviceToastFunction() />'; }
3485 + QH('p10html', x);
3486 +
3487 + // Show node last 7 days timeline
3488 + masterUpdate(256);
3489 +
3490 + // Show bottom buttons
3491 + x = '<div class="p10html3right">';
3492 + if ((meshrights & 4) != 0) {
3493 + // TODO: Show change group only if there is another mesh of the same type.
3494 + x += '&nbsp;<a href=# onclick=p10showChangeGroupDialog(["' + node._id + '"]) title=\"' + "Verplaats dit apparaat naar een andere apparaatgroep" + '\">' + "verander groep" + '</a>';
3495 + x += '&nbsp;<a href=# onclick=p10showDeleteNodeDialog("' + node._id + '") title=\"' + "Verwijder dit apparaat" + '\">' + "Verwijder apparaat" + '</a>';
3496 + }
3497 + x += '</div><div class="p10html3left">';
3498 + if (mesh.mtype == 2) x += '<a href=# onclick=p10showNodeNetInfoDialog("' + node._id + '") title=\"' + "Toon apparaat netwerk interface informatie" + '\">' + "Interfaces" + '</a>&nbsp;';
3499 + if (xxmap != null) x += '<a href=# onclick=p10showNodeLocationDialog("' + node._id + '") title=\"' + "Informatie over apparaatlocaties weergeven" + '\">' + "Lokatie" + '</a>&nbsp;';
3500 + if (((meshrights & 8) != 0) && (mesh.mtype == 2)) x += '<a href=# onclick=p10showMeshCmdDialog(1,"' + node._id + '") title=\"' + "Verkeersrouter gebruikt om verbinding te maken met een apparaat via deze server" + '.\">' + "Router" + '</a>&nbsp;';
3501 +
3502 + // RDP link, show this link only of the remote machine is Windows.
3503 + if (((connectivity & 1) != 0) && (clickOnce == true) && (mesh.mtype == 2) && ((meshrights & 8) != 0)) {
3504 + if ((node.agent.id > 0) && (node.agent.id < 5)) { x += '<a href=# onclick=p10clickOnce("' + node._id + '","RDP2",3389) title=\"' + "Vereist Microsoft ClickOnce-ondersteuning in uw browser" + '.\">' + "RDP" + '</a>&nbsp;'; }
3505 + if (node.agent.id > 4) {
3506 + x += '<a href=# onclick=p10clickOnce("' + node._id + '","PSSH",22) title=\"' + "Vereist Microsoft ClickOnce-ondersteuning in uw browser" + '\">' + "Putty" + '</a>&nbsp;';
3507 + x += '<a href=# onclick=p10clickOnce("' + node._id + '","WSCP",22) title=\"' + "Vereist Microsoft ClickOnce-ondersteuning in uw browser" + '\">' + "WinSCP" + '</a>&nbsp;';
3508 + }
3509 + }
3510 +
3511 + // MQTT options
3512 + if ((meshrights == 0xFFFFFFFF) && (features & 0x00400000)) { x += '<a href=# onclick=p10showMqttLoginDialog("' + node._id + '") title=\"' + "Ontvang MQTT-inloggegevens voor dit apparaat." + '\">' + "MQTT Login" + '</a>&nbsp;'; }
3513 + x += '</div><br>'
3514 +
3515 + QH('p10html3', x);
3516 +
3517 + // Set the node power state
3518 + var powerstate = PowerStateStr(node.state);
3519 + //if (node.state == 0) { powerstate = 'Unknown State'; }
3520 + if ((connectivity & 1) != 0) { if (powerstate.length > 0) { powerstate += '<br/>'; } powerstate += '<span style=font-size:12px title=\"' + "Agent verbonden" + '\">' + "Agent verbonden" + '</span>'; }
3521 + if ((connectivity & 2) != 0) { if (powerstate.length > 0) { powerstate += '<br/>'; } powerstate += '<span style=font-size:12px title=\"' + "Intel® AMT verbonden" + '\">' + "Intel® AMT verbonden" + '</span>'; }
3522 + else if ((connectivity & 4) != 0) { if (powerstate.length > 0) { powerstate += '<br/>'; } powerstate += '<span style=font-size:12px title=\"' + "Intel&reg; AMT gedetecteerd" + '\">' + "Intel&reg; AMT gedetecteerd" + '</span>'; }
3523 + if ((connectivity & 16) != 0) { if (powerstate.length > 0) { powerstate += '<br/>'; } powerstate += '<span style=font-size:12px title=\"' + "MQTT verbonden" + '\">' + "MQTT-kanaal verbonden" + '</span>'; }
3524 + if ((powerstate == '') && node.lastconnect) { powerstate = '<span style=font-size:12px>' + "Laatst gezien" + '<br />' + printDateTime(new Date(node.lastconnect)) + '</span>'; }
3525 + QH('MainComputerState', powerstate);
3526 +
3527 + // Set the node icon
3528 + Q('MainComputerImage').setAttribute('src', 'images/icons256-' + node.icon + '-1.png');
3529 + Q('MainComputerImage').className = ((!node.conn) || (node.conn == 0)?'gray':'');
3530 +
3531 + // Check if we have terminal and file access
3532 + var terminalAccess = ((meshrights == 0xFFFFFFFF) || ((meshrights & 512) == 0));
3533 + var fileAccess = ((meshrights == 0xFFFFFFFF) || ((meshrights & 1024) == 0));
3534 + var amtAccess = ((meshrights == 0xFFFFFFFF) || ((meshrights & 2048) == 0));
3535 +
3536 + // Setup/Refresh the desktop tab
3537 + if (terminalAccess) { setupTerminal(); }
3538 + if (fileAccess) { setupFiles(); }
3539 + var consoleRights = ((meshrights & 16) != 0);
3540 + if (consoleRights) { setupConsole(); } else { if (panel == 15) { panel = 10; } }
3541 +
3542 + // Show or hide the tabs
3543 + // mesh.mtype: 1 = Intel AMT only, 2 = Mesh Agent
3544 + // node.agent.caps (bitmask): 1 = Desktop, 2 = Terminal, 4 = Files, 8 = Console
3545 + QV('MainDevDesktop', (((mesh.mtype == 1) && ((typeof node.intelamt.sku !== 'number') || ((node.intelamt.sku & 8) != 0)))
3546 + || ((mesh.mtype == 2) && ((node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 1) != 0) || (node.intelamt && (node.intelamt.state == 2)))))
3547 + && ((meshrights & 8) || (meshrights & 256))
3548 + );
3549 + QV('MainDevTerminal', ((mesh.mtype == 1) || (node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 2) != 0) || (node.intelamt && (node.intelamt.state == 2))) && (meshrights & 8) && terminalAccess);
3550 + QV('MainDevFiles', ((mesh.mtype == 2) && ((node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 4) != 0))) && (meshrights & 8) && fileAccess);
3551 + QV('MainDevAmt', (node.intelamt != null) && ((node.intelamt.state == 2) || (node.conn & 2)) && (meshrights & 8) && amtAccess);
3552 + QV('MainDevConsole', (consoleRights && (mesh.mtype == 2) && ((node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 8) != 0))) && (meshrights & 8));
3553 + QV('MainDevPlugins', false);
3554 + QV('p15uploadCore', (node.agent != null) && (node.agent.caps != null) && ((node.agent.caps & 16) != 0));
3555 + QH('p15coreName', ((node.agent != null) && (node.agent.core != null))?node.agent.core:'');
3556 +
3557 + // Setup/Refresh Intel AMT tab
3558 + var amtFrameNode = Q('p14iframe').contentWindow.getCurrentMeshNode();
3559 + if ((amtFrameNode != null) && (amtFrameNode._id != currentNode._id)) { Q('p14iframe').contentWindow.disconnect(); }
3560 + var online = ((node.conn & 6) != 0)?true:false; // If CIRA (2) or AMT (4) connected, enable Commander
3561 + Q('p14iframe').contentWindow.setConnectionState(online);
3562 + Q('p14iframe').contentWindow.setFrameHeight('650px');
3563 + Q('p14iframe').contentWindow.setAuthCallback(updateAmtCredentials);
3564 +
3565 + // Display "action" button on desktop/terminal/files
3566 + QV('deskActionsBtn', (meshrights & 72) != 0); // 72 = Wake-up + Remote Control permissions
3567 + QV('termActionsBtn', (meshrights & 72) != 0);
3568 + QV('filesActionsBtn', (meshrights & 72) != 0);
3569 +
3570 + // Request the power timeline
3571 + if ((powerTimelineNode != currentNode._id) && (powerTimelineReq != currentNode._id)) {
3572 + QH('p10html2', '');
3573 + powerTimelineReq = currentNode._id;
3574 + meshserver.send({ action: 'powertimeline', nodeid: currentNode._id });
3575 + meshserver.send({ action: 'lastconnect', nodeid: currentNode._id });
3576 + meshserver.send({ action: 'getsysinfo', nodeid: currentNode._id });
3577 + QH('p17info', '');
3578 + }
3579 +
3580 + // Reset the desktop tools
3581 + QV('DeskTools', false);
3582 + showDeskToolsProcesses();
3583 +
3584 + // Ask for device events
3585 + refreshDeviceEvents();
3586 +
3587 + // Update the web page title
3588 + if ((currentNode) && (xxcurrentView >= 10) && (xxcurrentView < 20)) {
3589 + document.title = decodeURIComponent('{{{extitle}}}') + ' - ' + currentNode.name + ' - ' + mesh.name;
3590 + } else {
3591 + document.title = decodeURIComponent('{{{extitle}}}');
3592 + }
3593 +
3594 + // Clear user consent status if present
3595 + p11clearConsoleMsg();
3596 + p12clearConsoleMsg();
3597 + p13clearConsoleMsg();
3598 +
3599 + // Device refresh plugin handler
3600 + if (pluginHandler != null) {
3601 + QH('p19headers', ''); QH('p19pages', '');
3602 + pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event);
3603 + var lastTab = getstore('_curPluginPage', null);
3604 + if (lastTab != null && Q('p19ph-' + lastTab) != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab));
3605 + }
3606 + }
3607 + setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching.
3608 + if (!panel) panel = 10;
3609 + go(panel);
3610 + }
3611 +
3612 + function writeDeviceEvent(nodeid) {
3613 + if (xxdialogMode) return;
3614 + setDialogMode(2, "Apparaatgebeurtenis toevoegen", 3, writeDeviceEventEx, '<textarea id=d2devEvent style=background-color:#fcf3cf;width:100%;height:200px;resize:none;overflow-y:scroll></textarea><span style=font-size:10px>' + "Hiermee wordt een vermelding toegevoegd aan het gebeurtenislogboek van dit apparaat." + '<span>', nodeid);
3615 + }
3616 +
3617 + function writeDeviceEventEx(buttons, tag) { meshserver.send({ action: 'setDeviceEvent', nodeid: decodeURIComponent(tag), msg: encodeURIComponent(Q('d2devEvent').value) }); }
3618 +
3619 + function showNotes(readonly, noteid) {
3620 + if (xxdialogMode) return;
3621 + setDialogMode(2, "Notities", 2, showNotesEx, '<textarea id=d2devNotes ro=' + readonly + ' noteid=' + noteid + ' readonly style=background-color:#fcf3cf;width:100%;height:200px;resize:none;overflow-y:scroll></textarea><span style=font-size:10px>' + "Apparaatgroepnotities kunnen worden bekeken en gewijzigd door andere apparaatgroepbeheerders." + '<span>', noteid);
3622 + meshserver.send({ action: 'getNotes', id: decodeURIComponent(noteid) });
3623 + }
3624 +
3625 + function showNotesEx(buttons, tag) { meshserver.send({ action: 'setNotes', id: decodeURIComponent(tag), notes: encodeURIComponent(Q('d2devNotes').value) }); }
3626 +
3627 + function deviceChat(e) {
3628 + if (xxdialogMode) return;
3629 + var url = '/messenger?id=meshmessenger/' + encodeURIComponent(currentNode._id) + '/' + encodeURIComponent(userinfo._id) + '&title=' + currentNode.name;
3630 + if ((authCookie != null) && (authCookie != '')) { url += '&auth=' + authCookie; }
3631 + if (e && (e.shiftKey == true)) {
3632 + window.open(url, 'meshmessenger:' + currentNode._id);
3633 + } else {
3634 + window.open(url, 'meshmessenger:' + currentNode._id, 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=560');
3635 + }
3636 + meshserver.send({ action: 'meshmessenger', nodeid: decodeURIComponent(currentNode._id) });
3637 + }
3638 +
3639 + function deviceToggleBackground() {
3640 + if (xxdialogMode) return;
3641 + meshserver.send({ action: 'msg', type: 'deskBackground', nodeid: currentNode._id, op: 1 }); // Toggle desktop background image
3642 + }
3643 +
3644 + function deviceUrlFunction() {
3645 + if (xxdialogMode) return;
3646 + setDialogMode(2, "Open pagina op apparaat", 3, deviceUrlFunctionEx, '<input id=d2devurl placeholder="http://server.com" style=width:100%;overflow-y:scroll></input>');
3647 + Q('d2devurl').focus();
3648 + }
3649 +
3650 + function deviceUrlFunctionEx() {
3651 + meshserver.send({ action: 'msg', type: 'openUrl', nodeid: currentNode._id, url: Q('d2devurl').value });
3652 + }
3653 +
3654 + function deviceToastFunction() {
3655 + if (xxdialogMode) return;
3656 + setDialogMode(2, "Apparaatmelding", 3, deviceToastFunctionEx, '<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>');
3657 + Q('d2devToast').focus();
3658 + }
3659 +
3660 + function deviceToastFunctionEx() {
3661 + meshserver.send({ action: 'toast', nodeids: [ currentNode._id ], title: 'MeshCentral', msg: Q('d2devToast').value });
3662 + }
3663 +
3664 + function deviceActionFunction() {
3665 + if (xxdialogMode) return;
3666 + var meshrights = meshes[currentNode.meshid].links[userinfo._id].rights;
3667 + var x = "Selecteer een bewerking die u op dit apparaat wilt uitvoeren." + '<br /><br />';
3668 + var y = '<select id=d2deviceop style=float:right;width:250px>';
3669 + if ((meshrights & 64) != 0) { y += '<option value=100>' + "Wakker worden" + '</option>'; } // Wake-up permission
3670 + if ((meshrights & 8) != 0) { y += '<option value=4>' + "Slaap" + '</option><option value=3>' + "Reset" + '</option><option value=2>' + "Uitzetten" + '</option>'; } // Remote control permission
3671 + if ((currentNode.conn & 16) != 0) { y += '<option value=103>' + "Verzend MQTT bericht" + '</option>'; }
3672 + if (((currentNode.conn & 1) != 0) && ((meshrights & 32768) != 0)) { y += '<option value=104>' + "deinstallatie agent" + '</option>'; }
3673 + y += '</select>';
3674 + x += addHtmlValue("Operatie", y);
3675 + setDialogMode(2, "Apparaatactie", 3, deviceActionFunctionEx, x);
3676 + }
3677 +
3678 + function deviceActionFunctionEx() {
3679 + var op = Q('d2deviceop').value;
3680 + if (op == 100) {
3681 + // Device wake
3682 + meshserver.send({ action: 'wakedevices', nodeids: [currentNode._id] });
3683 + } else if (op == 103) {
3684 + // Send MQTT Message
3685 + p10showSendMqttMsgDialog([currentNode._id]);
3686 + } else if (op == 104) {
3687 + // Uninstall agent
3688 + p10showSendUninstallAgentDialog([currentNode._id]);
3689 + } else {
3690 + // Power operation
3691 + meshserver.send({ action: 'poweraction', nodeids: [ currentNode._id ], actiontype: parseInt(op) });
3692 + }
3693 + }
3694 +
3695 + // Called when MeshCommander needs new credentials or updated credentials.
3696 + function updateAmtCredentials(forceDialog) {
3697 + var node = getNodeFromId(currentNode._id);
3698 + if ((forceDialog == true) || (node.intelamt.user == null) || (node.intelamt.user == '')) {
3699 + editDeviceAmtSettings(currentNode._id, updateAmtCredentialsEx);
3700 + } else {
3701 + Q('p14iframe').contentWindow.connectButtonfunctionEx();
3702 + }
3703 + }
3704 +
3705 + function updateAmtCredentialsEx(button, tag) {
3706 + Q('p14iframe').contentWindow.connectButtonfunctionEx();
3707 + }
3708 +
3709 + // Look to see if we need to update the device timeline
3710 + function updateDeviceTimeline() {
3711 + if ((meshserver.State != 2) || (powerTimelineNode == null) || (powerTimelineUpdate == null) || (currentNode == null)) return;
3712 + if ((powerTimelineNode == powerTimelineReq) && (currentNode._id == powerTimelineNode) && (powerTimelineUpdate < Date.now())) {
3713 + powerTimelineUpdate = null;
3714 + meshserver.send({ action: 'powertimeline', nodeid: currentNode._id });
3715 + meshserver.send({ action: 'lastconnect', nodeid: currentNode._id });
3716 + }
3717 + }
3718 +
3719 + // Draw device power bars. The bars are 766px wide.
3720 + function drawDeviceTimeline() {
3721 + if ((currentNode == null) || (xxcurrentView < 10) || (xxcurrentView > 19)) return;
3722 + var timeline = null, now = Date.now();
3723 + if (currentNode._id == powerTimelineNode) { timeline = powerTimeline; }
3724 +
3725 + // Calculate when the timeline starts
3726 + var d = new Date();
3727 + d.setHours(0, 0, 0, 0);
3728 + d = new Date(d.getTime() - (1000 * 60 * 60 * 24 * 6));
3729 + var timelineStart = d.getTime();
3730 +
3731 + // De-compact the timeline
3732 + var timeline2 = [];
3733 + if (timeline != null && timeline.length > 1) {
3734 + timeline2.push([ 0, timeline[1], timeline[0] ]); // Start, End, Power
3735 + var ct = timeline[1];
3736 + for (var i = 2; i < timeline.length; i += 2) {
3737 + var power = timeline[i], dt = now;
3738 + if (timeline.length > (i + 1)) { dt = timeline[i + 1]; }
3739 + timeline2.push([ ct, ct + dt, power ]); // Start, End, Power
3740 + ct = ct + dt;
3741 + }
3742 + }
3743 +
3744 + // Draw the timeline
3745 + var x = '', count = 1, date = new Date();
3746 + var totalWidth = Q('masthead').offsetWidth - (160 + 9 + 9 + 14); // Compute the total width of the power bar
3747 + date.setHours(0, 0, 0, 0);
3748 + for (var i = 0; i < 7; i++) {
3749 + var datavalue = '', start = date.getTime(), end = start + (1000 * 60 * 60 * 24);
3750 + for (var j in timeline2) {
3751 + var block = timeline2[j];
3752 + if (isTimeBlockInside(start, end, block[0], block[1]) == true) {
3753 + var ts = Math.max(start, block[0]);
3754 + var te = Math.min(Math.min(end, block[1]), now);
3755 + var width = Math.round(((te - ts) * totalWidth) / 86400000);
3756 + if (width > 0) {
3757 + var title = format('{0} from {1} to {2}.', powerStateStrings2[block[2]], printTime(new Date(ts)), printTime(new Date(te)));
3758 + datavalue += '<div class="pwState ' + powerColor(block[2]) + '" title="' + title + '" style="width:' + width + 'px;"></div>';
3759 + }
3760 + }
3761 + }
3762 + x += '<tr class=' + (((count % 2) == 0)?'altBack':'') + '><td><div>&nbsp;' + printDate(date) + '<div></div></div></td><td><div>' + datavalue + '</div></td></tr>';
3763 + ++count;
3764 + date = new Date(date.getTime() - (1000 * 60 * 60 * 24)); // Substract one day
3765 + }
3766 + QH('p10html2', '<table cellpadding=2 cellspacing=0><thead><tr style=><th scope=col style=text-align:center;width:150px>' + "Dag" + '</th><th scope=col style=text-align:center><a download href="devicepowerevents.ashx?id=' + currentNode._id + '" onclick="setDialogMode(0)"><img title=\"' + "Downloaden Power gebeurtenissen" + '\" src="images/link4.png" /></a>' + "7 dagen stroom status" + '</th></tr></thead><tbody>' + x + '</tbody></table>');
3767 + }
3768 +
3769 + // Return a color for the given power state
3770 + function powerColor(x) { if (x < powerColorTable.length) { return powerColorTable[x]; } return 'pwsYellow'; }
3771 +
3772 + // Return true if the time block is visible within the start/end period
3773 + function isTimeBlockInside(start, end, blockStart, blockEnd) {
3774 + if ((blockStart < start) && (blockEnd > end)) return true; // Block is wider than timespan
3775 + if ((blockStart > start) && (blockStart < end)) return true;
3776 + if ((blockEnd > start) && (blockEnd < end)) return true;
3777 + return false;
3778 + }
3779 +
3780 + function addDeviceAttribute(name, value) { return '<tr><td class=style7>' + name + '</td><td class=style9>' + value + '</td></tr>'; }
3781 +
3782 + function editDeviceAmtSettings(nodeid, func, arg) {
3783 + if (xxdialogMode) return;
3784 + var x = '', node = getNodeFromId(nodeid), buttons = 3, meshrights = getNodeRights(nodeid);
3785 + if ((meshrights & 4) == 0) return;
3786 + x += addHtmlValue("Gebruikersnaam", '<input id=dp10username style=width:230px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />');
3787 + x += addHtmlValue("wachtwoord", '<input id=dp10password type=password style=width:230px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />');
3788 + x += addHtmlValue("Veiligheid", '<select id=dp10tls style=width:236px><option value=0>' + "Geen TLS beveiliging" + '</option><option value=1>' + "TLS beveiliging vereist" + '</option></select>');
3789 + if ((node.intelamt.user != null) && (node.intelamt.user != '')) { buttons = 7; }
3790 + setDialogMode(2, "Bewerk Intel® AMT-gegevens", buttons, editDeviceAmtSettingsEx, x, { node: node, func: func, arg: arg });
3791 + if ((node.intelamt.user != null) && (node.intelamt.user != '')) { Q('dp10username').value = node.intelamt.user; } else { Q('dp10username').value = 'admin'; }
3792 + Q('dp10tls').value = node.intelamt.tls;
3793 + validateDeviceAmtSettings();
3794 + }
3795 +
3796 + function validateDeviceAmtSettings() {
3797 + QE('idx_dlgOkButton', passwordcheck(Q('dp10password').value));
3798 + }
3799 +
3800 + function editDeviceAmtSettingsEx(button, tag) {
3801 + if (button == 2) {
3802 + // Delete button pressed, remove credentials
3803 + meshserver.send({ action: 'changedevice', nodeid: tag.node._id, intelamt: { user: '', pass: '' } });
3804 + } else {
3805 + // Change Intel AMT credentials
3806 + var amtuser = Q('dp10username').value;
3807 + if (amtuser == '') amtuser = 'admin';
3808 + var amtpass = Q('dp10password').value;
3809 + if (amtpass == '') amtuser = '';
3810 + meshserver.send({ action: 'changedevice', nodeid: tag.node._id, intelamt: { user: amtuser, pass: amtpass, tls: Q('dp10tls').value } });
3811 + tag.node.intelamt.user = amtuser;
3812 + tag.node.intelamt.tls = Q('dp10tls').value;
3813 + if (tag.func) { setTimeout(function () { tag.func(null, tag.arg); }, 300); }
3814 + }
3815 + }
3816 +
3817 + function p10showSendMqttMsgDialog(nodeids) {
3818 + if (xxdialogMode) return false;
3819 + var x = addHtmlValue("Onderwerp", '<input id=dp2topic style=width:230px maxlength=64 onchange=p10validateSendMqttMsgDialog() onkeyup=p10validateSendMqttMsgDialog(event,1) />');
3820 + x += addHtmlValue("Bericht", '<div style=width:230px;margin:0;padding:0><textarea id=dp2msg maxlength=4096 style=width:100%;height:150px;resize:none onchange=p10validateSendMqttMsgDialog() onkeyup=p10validateSendMqttMsgDialog(event,1)></textarea></div>');
3821 + setDialogMode(2, "Verzend MQTT bericht", 3, p10showSendMqttMsgDialogEx, x, nodeids);
3822 + p10validateSendMqttMsgDialog();
3823 + Q('dp2topic').focus();
3824 + return false;
3825 + }
3826 +
3827 + function p10validateSendMqttMsgDialog() {
3828 + QE('idx_dlgOkButton', (Q('dp2topic').value.length > 0) && (Q('dp2msg').value.length > 0));
3829 + }
3830 +
3831 + function p10showSendMqttMsgDialogEx(b, nodeids) {
3832 + meshserver.send({ action: 'sendmqttmsg', nodeids: nodeids, topic: Q('dp2topic').value, msg: Q('dp2msg').value });
3833 + }
3834 +
3835 + function p10showSendUninstallAgentDialog(nodeids) {
3836 + if (xxdialogMode) return false;
3837 + var x = '';
3838 + if (nodeids.length > 1) { x = format("Weet u zeker dat u de geselecteerde {0} agenten wilt verwijderen?", nodeids.length); } else { x = "Weet u zeker dat u de geselecteerde agent wilt verwijderen?"; }
3839 + x += '<br /><br />';
3840 + if (nodeids.length > 1) { x += "Hiermee worden de apparaten niet van de server verwijderd, maar kunnen de apparaten geen verbinding meer maken met de server. Alle externe toegang tot de apparaten gaat verloren. De apparaten moeten zijn aangesloten om deze opdracht te laten werken."; } else { x += "Hiermee wordt dit apparaat niet van de server verwijderd, maar kan het apparaat geen verbinding meer maken met de server. Alle externe toegang tot het apparaat gaat verloren. Het apparaat moet verbonden zijn om dit commando te laten werken."; }
3841 + x += '<br /><br /><label style=color:red><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />' + "Bevestig" + '</label>';
3842 + setDialogMode(2, "deinstallatie agent", 3, p10showSendUninstallAgentDialogEx, x, nodeids);
3843 + p10validateSendUninstallAgentDialog();
3844 + return false;
3845 + }
3846 +
3847 + function p10validateSendUninstallAgentDialog() { QE('idx_dlgOkButton', Q('p10check').checked); }
3848 + function p10showSendUninstallAgentDialogEx(b, nodeids) { meshserver.send({ action: 'uninstallagent', nodeids: nodeids }); }
3849 +
3850 + function p10showChangeGroupDialog(nodeids) {
3851 + if (xxdialogMode) return false;
3852 + var targetMeshId = null;
3853 + if (nodeids.length == 1) { try { targetMeshId = meshes[getNodeFromId(nodeids[0])]._id; } catch (ex) { } }
3854 +
3855 + // List all available alternative groups
3856 + var y = '<select id=p10newGroup style=width:236px>', count = 0;
3857 + for (var i in meshes) {
3858 + var meshrights = meshes[i].links[userinfo._id].rights;
3859 + if ((meshes[i]._id != targetMeshId) && (meshrights & 4)) { count++; y += '<option value=\'' + meshes[i]._id + '\'>' + meshes[i].name + '</option>'; }
3860 + }
3861 + y += '</select>';
3862 +
3863 + if (count > 0) {
3864 + var x = (nodeids.length == 1) ? ("Selecteer een nieuwe groep voor dit apparaat" + '<br /><br />') : ("Selecteer een nieuwe groep voor geselecteerde apparaten" + '<br /><br />');
3865 + x += addHtmlValue("Nieuwe apparaatgroep", y);
3866 + setDialogMode(2, "verander groep", 3, p10showChangeGroupDialogEx, x, nodeids);
3867 + } else {
3868 + setDialogMode(2, "verander groep", 1, null, "Er bestaat geen andere apparaatgroep van hetzelfde type.");
3869 + }
3870 + return false;
3871 + }
3872 +
3873 + function p10showChangeGroupDialogEx(b, nodeids) {
3874 + meshserver.send({ action: 'changeDeviceMesh', nodeids: nodeids, meshid: Q('p10newGroup').value });
3875 + }
3876 +
3877 + function p10showDeleteNodeDialog(nodeid) {
3878 + if (xxdialogMode) return false;
3879 + var x = format("Weet u zeker dat u apparaat {0} wilt verwijderen?", EscapeHtml(currentNode.name)) + '<br /><br /><label><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />' + "Bevestig" + '</label>';
3880 + setDialogMode(2, "Verwijder apparaat", 3, p10showDeleteNodeDialogEx, x, nodeid);
3881 + p10validateDeleteNodeDialog();
3882 + return false;
3883 + }
3884 +
3885 + function p10validateDeleteNodeDialog() {
3886 + QE('idx_dlgOkButton', Q('p10check').checked);
3887 + }
3888 +
3889 + function p10showDeleteNodeDialogEx(buttons, nodeid) {
3890 + meshserver.send({ action: 'removedevices', nodeids: [ nodeid ] });
3891 + }
3892 +
3893 + function p10clickOnce(nodeid, protocol, port) {
3894 + meshserver.send({ action: 'getcookie', nodeid: nodeid, tcpport: port, tag: 'clickonce', protocol: protocol });
3895 + return false;
3896 + }
3897 +
3898 + // Show current location
3899 + var d2map = null;
3900 + function p10showNodeLocationDialog() {
3901 + if ((xxdialogMode != null) && (xxdialogTag == '@xxmap')) { setDialogMode(0); } else { if (xxdialogMode) return false; }
3902 + var markers = [], types = ['iploc', 'wifiloc', 'gpsloc', 'userloc'], boundingBox = null;
3903 +
3904 + for (var loctype in types) {
3905 + if (currentNode[types[loctype]] != null) {
3906 + var loc = currentNode[types[loctype]].split(','), lat = parseFloat(loc[0]), lon = parseFloat(loc[1]);
3907 + if ((lat < 90) && (lat > -90) && (lon < 180) && (lon > -180)) { // Check valid lat/lon
3908 + var deviceMark = new ol.Feature({ geometry: new ol.geom.Point(ol.proj.fromLonLat([lon, lat])) });
3909 + deviceMark.setStyle(markerStyle(currentNode, parseInt(loctype) + 1));
3910 + markers.push(deviceMark);
3911 +
3912 + if (boundingBox == null) { boundingBox = [ lat, lon, lat, lon, 0 ]; } else { if (lat < boundingBox[0]) { boundingBox[0] = lat; } if (lon < boundingBox[1]) { boundingBox[1] = lon; } if (lat > boundingBox[2]) { boundingBox[2] = lat; } if (lon > boundingBox[3]) { boundingBox[3] = lon; } }
3913 + }
3914 + }
3915 + }
3916 +
3917 + // Setup the device mark layer
3918 + var vectorSource = new ol.source.Vector({ features: markers });
3919 + var vectorLayer = new ol.layer.Vector({ source: vectorSource });
3920 +
3921 + //var x = '<div><a href="https://www.google.com/maps/preview/@' + lat + ',' + lng + ',12z" rel="noreferrer noopener" target=_blank>Open in Google maps</a></div>';
3922 + var x = '<div id=d2map style=width:100%;height:300px></div>';
3923 + setDialogMode(2, "Apparaat locatie", 1, null, x, '@xxmap');
3924 +
3925 + var clng = 0, clat = 0, zoom = 8;
3926 + if (boundingBox != null) {
3927 + var clat = (boundingBox[0] + boundingBox[2]) / 2;
3928 + var clng = (boundingBox[1] + boundingBox[3]) / 2;
3929 + var cscale = Math.max(Math.abs(boundingBox[0] - boundingBox[2]), Math.abs(boundingBox[1] - boundingBox[3]));
3930 + var i = 360, zoom = -2;
3931 + while (i > cscale) { zoom++; i = i / 2; }
3932 + }
3933 +
3934 + if (markers.length == 1) { zoom = 8; }
3935 +
3936 + // Setup the map
3937 + d2map = new ol.Map({
3938 + target: 'd2map',
3939 + interactions: ol.interaction.defaults({dragPan:false, mouseWheelZoom:false}),
3940 + layers: [ new ol.layer.Tile({ source: new ol.source.OSM() }), vectorLayer ],
3941 + view: new ol.View({ center: ol.proj.fromLonLat([clng, clat]), zoom: zoom })
3942 + });
3943 + return false;
3944 + }
3945 +
3946 + // Show network interfaces
3947 + function p10showNodeNetInfoDialog() {
3948 + if (xxdialogMode) return false;
3949 + setDialogMode(2, "Netwerk Interfaces", 1, null, '<div id=d2netinfo>' + "Laden..." + '</div>', 'if' + currentNode._id );
3950 + meshserver.send({ action: 'getnetworkinfo', nodeid: currentNode._id });
3951 + return false;
3952 + }
3953 +
3954 + // Show MeshCentral Router dialog
3955 + function p10showMeshRouterDialog() {
3956 + if (xxdialogMode) return;
3957 + var x = '<div>' + "MeshCentral Router is een Windows tool voor het toewijzen van TCP poorten. U kunt RDP bijvoorbeeld via deze server naar een extern apparaat sturen." + '</div><br />';
3958 + x += addHtmlValue('Win32 Executable', '<a style=cursor:pointer download href="meshagents?meshaction=winrouter" onclick="setDialogMode(0)">MeshCentralRouter.exe</a>');
3959 + setDialogMode(2, "MeshCentral Router", 1, null, x, 'fileDownload');
3960 + }
3961 +
3962 + // Request MQTT login credentials
3963 + function p10showMqttLoginDialog(nodeid) { meshserver.send({ action: 'getmqttlogin', nodeid: nodeid }); }
3964 +
3965 + // Show MeshCmd dialog
3966 + function p10showMeshCmdDialog(mode, nodeid) {
3967 + if (xxdialogMode) return;
3968 + var y = '<select id=aginsSelect onclick=meshCmdOsClick() style=width:236px>';
3969 + y += '<option value=3>' + "Windows (32bit)" + '</option>';
3970 + y += '<option value=4>' + "Windows (64bit)" + '</option>';
3971 + y += '<option value=5>' + "Linux x86 (32bit)" + '</option>';
3972 + y += '<option value=6>' + "Linux x86 (64bit)" + '</option>';
3973 + y += '<option value=16>' + "MacOS (64bit)" + '</option>';
3974 + y += '<option value=25>' + "Linux ARM, Raspberry Pi (32bit)" + '</option>';
3975 + y += '</select>';
3976 +
3977 + var x = '';
3978 + if (mode == 0) { x += '<div>MeshCmd is a command line tool that performs lots of different operations. The action file can optionally be downloaded and edited to provide server information and credentials.<br /><br />'; }
3979 + if (mode == 1) { x += '<div>Download "meshcmd" with an action file to route traffic thru this server to this device. Make sure to edit meshaction.txt and add your account password or make any changes needed.<br /><br />'; }
3980 + x += addHtmlValue('Operating System', y);
3981 + x += addHtmlValue('MeshCmd', '<a id=meshcmddownloadid href="meshagents?meshcmd=3" download></a>');
3982 + if (mode == 0) { x += addHtmlValue('Action File', '<a href="meshagents?meshaction=generic" download>MeshAction (.txt)</a>'); }
3983 + if (mode == 1) { x += addHtmlValue('Action File', '<a href="meshagents?meshaction=route&nodeid=' + nodeid + '" download>MeshAction (.txt)</a>'); }
3984 + x += '</div>';
3985 + setDialogMode(2, [ "Download MeshCmd", "Netwerk Router" ][mode], 9, null, x, 'fileDownload');
3986 + meshCmdOsClick();
3987 + }
3988 +
3989 + function meshCmdOsClick() {
3990 + var os = Q('aginsSelect').value, osn = '', osurl = '';
3991 + //Q('meshcmddownloadid').href = 'meshagents?meshcmd=' + os;
3992 + if (os == 3) { osn = 'MeshCmd (Win32 executable)'; }
3993 + if (os == 4) { osn = 'MeshCmd (Win64 executable)'; }
3994 + if (os == 5) { osn = 'MeshCmd (Linux x86, 32bit)'; }
3995 + if (os == 6) { osn = 'MeshCmd (Linux x86, 64bit)'; }
3996 + if (os == 16) { osn = 'MeshCmd (MacOS, 64bit)'; }
3997 + if (os == 25) { osn = 'MeshCmd (Linux ARM, 32bit)'; }
3998 + QH('meshcmddownloadid', osn);
3999 + Q('meshcmddownloadid').setAttribute('href', 'meshagents?meshcmd=' + os);
4000 + }
4001 +
4002 + function p10showiconselector() {
4003 + if (xxdialogMode) return;
4004 + var mesh = meshes[currentNode.meshid];
4005 + var meshrights = mesh.links[userinfo._id].rights;
4006 + if ((meshrights & 4) == 0) return;
4007 +
4008 + var x = '<br><div style=display:inline-block;width:40px></div>';
4009 + x += '<div tabindex=0 style=display:inline-block class=i1 onclick=p10setIcon(1) onkeypress="if (event.key==\'Enter\') p10setIcon(1)"></div>';
4010 + x += '<div tabindex=0 style=display:inline-block class=i2 onclick=p10setIcon(2) onkeypress="if (event.key==\'Enter\') p10setIcon(2)"></div>';
4011 + x += '<div tabindex=0 style=display:inline-block class=i3 onclick=p10setIcon(3) onkeypress="if (event.key==\'Enter\') p10setIcon(3)"></div>';
4012 + x += '<div tabindex=0 style=display:inline-block class=i4 onclick=p10setIcon(4) onkeypress="if (event.key==\'Enter\') p10setIcon(4)"></div>';
4013 + x += '<div tabindex=0 style=display:inline-block class=i5 onclick=p10setIcon(5) onkeypress="if (event.key==\'Enter\') p10setIcon(5)"></div>';
4014 + x += '<div tabindex=0 style=display:inline-block class=i6 onclick=p10setIcon(6) onkeypress="if (event.key==\'Enter\') p10setIcon(6)"></div><br><br>';
4015 + setDialogMode(2, "Pictogram selectie", 0, null, x);
4016 + QV('id_dialogclose', true);
4017 + }
4018 +
4019 + function p10setIcon(icon) {
4020 + setDialogMode(0);
4021 + meshserver.send({ action: 'changedevice', nodeid: currentNode._id, icon: icon });
4022 + }
4023 +
4024 + var showEditNodeValueDialog_modes = ["Apparaat naam", "Hostname", "Omschrijving", "Tags"];
4025 + var showEditNodeValueDialog_modes2 = ['name', 'host', 'desc', 'tags'];
4026 + var showEditNodeValueDialog_modes3 = ['', '', '', "Tag1, Tag2, Tag3"];
4027 + function showEditNodeValueDialog(mode) {
4028 + if (xxdialogMode) return;
4029 + var x = addHtmlValue(showEditNodeValueDialog_modes[mode], '<input id=dp10devicevalue maxlength=64 placeholder="' + showEditNodeValueDialog_modes3[mode] + '" onchange=p10editdevicevalueValidate(' + mode + ',event) onkeyup=p10editdevicevalueValidate(' + mode + ',event) />');
4030 + setDialogMode(2, "Bewerk apparaat", 3, showEditNodeValueDialogEx, x, mode);
4031 + var v = currentNode[showEditNodeValueDialog_modes2[mode]];
4032 + if (v == null) v = '';
4033 + if (Array.isArray(v)) { v = v.join(', '); }
4034 + Q('dp10devicevalue').value = v;
4035 + p10editdevicevalueValidate();
4036 + Q('dp10devicevalue').focus();
4037 + }
4038 +
4039 + function showEditNodeValueDialogEx(button, mode) {
4040 + var x = { action: 'changedevice', nodeid: currentNode._id };
4041 + x[showEditNodeValueDialog_modes2[mode]] = Q('dp10devicevalue').value;
4042 + meshserver.send(x);
4043 + }
4044 +
4045 + function p10editdevicevalueValidate(mode, e) {
4046 + var x = ((mode > 1) || (Q('dp10devicevalue').value.length > 0));
4047 + QE('idx_dlgOkButton', x);
4048 + if ((e != null) && (x == true) && (e.keyCode == 13)) { dialogclose(1); }
4049 + }
4050 +
4051 + //
4052 + // DESKTOP
4053 + //
4054 +
4055 + var desktopNode;
4056 + function setupDesktop() {
4057 + // Setup the remote desktop
4058 + if ((desktopNode != currentNode) && (desktop != null)) { desktop.Stop(); desktopNode = null; desktop = null; }
4059 +
4060 + // If the device desktop is already connected in multi-desktop, use that.
4061 + if ((desktopNode != currentNode) || (desktop == null)) {
4062 + var xdesk = multiDesktop[currentNode._id];
4063 + if (xdesk != null) {
4064 + // This device already has a canvas, use it.
4065 + QH('DeskParent', '');
4066 + var c = xdesk.m.CanvasId;
4067 + c.setAttribute('id', 'Desk');
4068 + c.setAttribute('onmousedown', 'dmousedown(event)');
4069 + c.setAttribute('onmouseup', 'dmouseup(event)');
4070 + c.setAttribute('onmousemove', 'dmousemove(event)');
4071 + c.removeAttribute('onclick');
4072 + Q('DeskParent').appendChild(c);
4073 + desktop = xdesk;
4074 + if (desktop.m.SendCompressionLevel) { desktop.m.SendCompressionLevel(1, desktopsettings.quality, desktopsettings.scaling, desktopsettings.framerate); }
4075 + desktop.onStateChanged = onDesktopStateChange;
4076 + desktopNode = currentNode;
4077 + onDesktopStateChange(desktop, desktop.State);
4078 + delete multiDesktop[currentNode._id];
4079 + } else {
4080 + // Device is not already connected, just setup a blank canvas
4081 + QH('DeskParent', '<canvas id=Desk oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>');
4082 + desktopNode = currentNode;
4083 + }
4084 + // Setup the mouse wheel
4085 + Q('Desk').addEventListener('DOMMouseScroll', function (e) { return dmousewheel(e); });
4086 + Q('Desk').addEventListener('mousewheel', function (e) { return dmousewheel(e); });
4087 + }
4088 + desktopNode = currentNode;
4089 + updateDesktopButtons();
4090 + deskAdjust();
4091 +
4092 + // On some browsers like IE, we can't save screen shots. Hide the scheenshot/capture buttons.
4093 + if (!Q('Desk')['toBlob']) { QV('deskSaveBtn', false); }
4094 + }
4095 +
4096 + // Show and enable the right buttons
4097 + function updateDesktopButtons() {
4098 + var mesh = meshes[currentNode.meshid];
4099 + var deskState = 0;
4100 + if (desktop != null) { deskState = desktop.State; }
4101 + var meshrights = mesh.links[userinfo._id].rights;
4102 +
4103 + // Show the right buttons
4104 + QV('disconnectbutton1span', (deskState != 0));
4105 + QV('connectbutton1span', (deskState == 0) && ((meshrights & 8) || (meshrights & 256)) && (mesh.mtype == 2) && (currentNode.agent.caps & 1));
4106 + QV('connectbutton1hspan',
4107 + (deskState == 0) &&
4108 + (meshrights & 8) &&
4109 + ((mesh.mtype == 1) ||
4110 + ((currentNode.intelamt != null) &&
4111 + (currentNode.intelamt.state == 2) &&
4112 + (currentNode.intelamt.ver != null) &&
4113 + (typeof currentNode.intelamt.sku == 'number') &&
4114 + ((currentNode.intelamt.sku & 8) != 0))
4115 + )
4116 + );
4117 +
4118 + // Show the right settings
4119 + QV('d7amtkvm', (currentNode.intelamt != null && ((currentNode.intelamt.ver != null) || (mesh.mtype == 1))) && ((deskState == 0) || (desktop.contype == 2)));
4120 + QV('d7meshkvm', (webRtcDesktop) || ((mesh.mtype == 2) && (currentNode.agent.caps & 1) && ((deskState == false) || (desktop.contype == 1))));
4121 +
4122 + // Enable buttons
4123 + var inputAllowed = (meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) == 0));
4124 + var online = ((currentNode.conn & 1) != 0); // If Agent (1) connected, enable remote desktop
4125 + QE('connectbutton1', online);
4126 + var hwonline = ((currentNode.conn & 6) != 0); // If CIRA (2) or AMT (4) connected, enable hardware terminal
4127 + QE('connectbutton1h', hwonline);
4128 + QE('deskSaveBtn', deskState == 3);
4129 + QV('deskFocusBtn', (desktop != null) && (desktop.contype == 2) && (deskState != 0) && (desktopsettings.showfocus));
4130 + QV('DeskClip', (currentNode.agent) && (currentNode.agent.id != 11) && (currentNode.agent.id != 16) && ((desktop == null) || (desktop.contype != 2))); // Clipboard not supported on MacOS
4131 + QE('DeskClip', deskState == 3);
4132 + QE('DeskType', deskState == 3);
4133 + QV('DeskWD', inputAllowed);
4134 + QE('DeskWD', deskState == 3);
4135 + QV('deskkeys', inputAllowed);
4136 + QE('deskkeys', deskState == 3);
4137 +
4138 + // Display this only if we have Chat & Notify permissions
4139 + QV('DeskChatButton', ((meshrights & 16384) != 0) && (browserfullscreen == false) && (inputAllowed) && (mesh.mtype == 2) && online);
4140 + QV('DeskNotifyButton', ((meshrights & 16384) != 0) && (browserfullscreen == false) && (currentNode.agent) && (currentNode.agent.id < 5) && (inputAllowed) && (mesh.mtype == 2) && online);
4141 +
4142 + QV('DeskToolsButton', (inputAllowed) && (mesh.mtype == 2) && online);
4143 + QV('DeskOpenWebButton', (browserfullscreen == false) && (inputAllowed) && (mesh.mtype == 2) && online);
4144 + QV('DeskBackgroundButton', (deskState == 3) && (desktop.contype == 1) && (mesh.mtype == 2) && (currentNode.agent.id != 11) && (currentNode.agent.id != 16) && online);
4145 + QV('DeskControlSpan', inputAllowed)
4146 + QV('deskActionsBtn', (browserfullscreen == false));
4147 + QV('deskActionsSettings', (browserfullscreen == false));
4148 + if (meshrights & 8) { Q('DeskControl').checked = (getstore('DeskControl', 1) == 1); } else { Q('DeskControl').checked = false; }
4149 + if (online == false) QV('DeskTools', false);
4150 + }
4151 +
4152 + // Debug
4153 + var autoConnectDesktopTimer = null;
4154 + function autoConnectDesktop(e) { if (autoConnectDesktopTimer == null) { autoConnectDesktopTimer = setInterval(function() { connectDesktop(null, 1) }, 1000); } else { clearInterval(autoConnectDesktopTimer); autoConnectDesktopTimer = null; } }
4155 +
4156 + function connectDesktop(e, contype, tsid) {
4157 + if (xxdialogMode) return;
4158 + if ((e != null) && (e.shiftKey == false) && (contype == 3)) { contype = 1; } // If the shift key is not pressed, don't try to ask for session list.
4159 + QV('p11DeskSessionSelector', false);
4160 + p11clearConsoleMsg();
4161 + if (desktop == null) {
4162 + desktopNode = currentNode;
4163 + if (contype == 2) {
4164 + // Setup the Intel AMT remote desktop
4165 + if ((desktopNode.intelamt.user == null) || (desktopNode.intelamt.user == '')) { editDeviceAmtSettings(desktopNode._id, connectDesktop, 2); return; }
4166 + desktop = CreateAmtRedirect(CreateAmtRemoteDesktop('Desk'), authCookie);
4167 + desktop.debugmode = debugmode;
4168 + desktop.onStateChanged = onDesktopStateChange;
4169 + desktop.m.bpp = (desktopsettings.encoding == 1 || desktopsettings.encoding == 3) ? 1 : 2;
4170 + desktop.m.useZRLE = (desktopsettings.encoding < 3);
4171 + desktop.m.localKeyMap = desktopsettings.localkeymap;
4172 + desktop.m.showmouse = desktopsettings.showmouse;
4173 + desktop.m.onScreenSizeChange = deskAdjust;
4174 + desktop.m.onKvmData = function (x) {
4175 + //console.log('onKvmData (' + x.length + '): ' + x);
4176 + // Send the presense probe only once if needed.
4177 + if (x.length == 0) { if (!desktop.m._sentPresence) { desktop.m._sentPresence = true; desktop.m.sendKvmData(JSON.stringify({ action: 'present', ver: 1 })); } return; }
4178 + var data = null;
4179 + try { data = JSON.parse(x); } catch (e) { }
4180 + if ((data != null) && (data.action != null)) {
4181 + if (data.action == 'restart') {
4182 + // Clear WebRTC channel
4183 + webRtcDesktopReset();
4184 + desktop.m.sendKvmData(JSON.stringify({ action: 'present', ver: 1 }));
4185 + } else if ((data.action == 'present') && (webRtcDesktop == null)) {
4186 + // Setup WebRTC channel
4187 + webRtcDesktop = { platform: data.platform };
4188 + var configuration = null; //{ "iceServers": [ { 'urls': 'stun:stun.services.mozilla.com' }, { 'urls': 'stun:stun.l.google.com:19302' } ] };
4189 + if (typeof RTCPeerConnection !== 'undefined') { webRtcDesktop.webrtc = new RTCPeerConnection(configuration); }
4190 + else if (typeof webkitRTCPeerConnection !== 'undefined') { webRtcDesktop.webrtc = new webkitRTCPeerConnection(configuration); }
4191 +
4192 + webRtcDesktop.webchannel = webRtcDesktop.webrtc.createDataChannel("Data kanaal", {}); // { ordered: false, maxRetransmits: 2 }
4193 + webRtcDesktop.webchannel.onopen = function () {
4194 + // Switch to software KVM
4195 + //if (urlvars && urlvars['kvmdatatrace']) { console.log('WebRTC Data Channel Open'); }
4196 + console.log('WebRTC Data Channel Open');
4197 + Q('deskstatus').textContent = StatusStrs[desktop.State] + ", Soft-KVM";
4198 + desktop.m.hold(true);
4199 + webRtcDesktop.webRtcActive = true;
4200 + webRtcDesktop.softdesktop = CreateKvmDataChannel(webRtcDesktop.webchannel, CreateAgentRemoteDesktop('Desk', Q('id_mainarea')), desktop.m);
4201 + webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);
4202 + webRtcDesktop.softdesktop.m.onScreenSizeChange = deskAdjust;
4203 + if (desktopsettings.quality) { webRtcDesktop.softdesktop.m.CompressionLevel = desktopsettings.quality; } // Number from 1 to 100. 50 or less is best.
4204 + if (desktopsettings.scaling) { webRtcDesktop.softdesktop.m.ScalingLevel = desktopsettings.scaling; }
4205 + webRtcDesktop.softdesktop.Start();
4206 +
4207 + // Check if we can get remote file access
4208 + // ###BEGIN###{DesktopInbandFiles}
4209 + /*
4210 + QV('go24', true); // Files
4211 + downloadFile = null;
4212 + p24files = webRtcDesktop.softdesktop;
4213 + p24targetpath = '';
4214 + webRtcDesktop.softdesktop.onControlMsg = onFilesControlData;
4215 + webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({ action: 'ls', reqid: 1, path: '' })); // Ask for the root folder
4216 + */
4217 + // ###END###{DesktopInbandFiles}
4218 + }
4219 + webRtcDesktop.webchannel.onclose = function (event) {
4220 + //if (urlvars['kvmdatatrace']) { console.log('WebRTC Data Channel Closed'); }
4221 + console.log('WebRTC Data Channel Closed');
4222 + webRtcDesktopReset();
4223 + }
4224 + webRtcDesktop.webrtc.onicecandidate = function (e) {
4225 + if (e.candidate == null) {
4226 + desktop.m.sendKvmData(JSON.stringify({ action: 'offer', ver: 1, sdp: webRtcDesktop.webrtcoffer.sdp }));
4227 + } else {
4228 + webRtcDesktop.webrtcoffer.sdp += ('a=' + e.candidate.candidate + '\r\n'); // New candidate, add it to the SDP
4229 + }
4230 + }
4231 + webRtcDesktop.webrtc.oniceconnectionstatechange = function () {
4232 + if ((webRtcDesktop != null) && (webRtcDesktop.webrtc != null) && ((webRtcDesktop.webrtc.iceConnectionState == 'disconnected') || (webRtcDesktop.webrtc.iceConnectionState == 'failed'))) { /*console.log('WebRTC ICE Failed');*/ webRtcDesktopReset(); }
4233 + }
4234 + webRtcDesktop.webrtc.createOffer(function (offer) {
4235 + // Got the offer
4236 + webRtcDesktop.webrtcoffer = offer;
4237 + webRtcDesktop.webrtc.setLocalDescription(offer, function () { }, webRtcDesktopReset);
4238 + }, webRtcDesktopReset, { mandatory: { OfferToReceiveAudio: false, OfferToReceiveVideo: false } });
4239 + } else if ((data.action == 'answer') && (webRtcDesktop != null)) {
4240 + // Complete the WebRTC channel
4241 + webRtcDesktop.webrtc.setRemoteDescription(new RTCSessionDescription({ type: 'answer', sdp: data.sdp }), function () { }, webRtcDesktopReset);
4242 + }
4243 + }
4244 + };
4245 + desktop.Start(desktopNode._id, 16994, '*', '*', 0);
4246 + desktop.contype = 2;
4247 + } else if ((contype == null) || (contype == 1) || ((contype == 3) && (currentNode.agent.id > 4))) {
4248 + // Setup the Mesh Agent remote desktop
4249 + desktop = CreateAgentRedirect(meshserver, CreateAgentRemoteDesktop('Desk'), serverPublicNamePort, authCookie, authRelayCookie, domainUrl);
4250 + desktop.debugmode = debugmode;
4251 + desktop.m.debugmode = debugmode;
4252 + desktop.attemptWebRTC = attemptWebRTC;
4253 + if (tsid != null) { desktop.options = { tsid: tsid }; }
4254 + desktop.onStateChanged = onDesktopStateChange;
4255 + desktop.onConsoleMessageChange = function () {
4256 + p11clearConsoleMsg();
4257 + if (desktop.consoleMessage) {
4258 + QH('p11DeskConsoleMsg', EscapeHtml(desktop.consoleMessage).split('\n').join('<br />'));
4259 + QV('p11DeskConsoleMsg', true);
4260 + p11DeskConsoleMsgTimer = setTimeout(p11clearConsoleMsg, 8000);
4261 + }
4262 + }
4263 + desktop.m.CompressionLevel = desktopsettings.quality; // Number from 1 to 100. 50 or less is best.
4264 + desktop.m.ScalingLevel = desktopsettings.scaling;
4265 + desktop.m.FrameRateTimer = desktopsettings.framerate;
4266 + desktop.m.onDisplayinfo = deskDisplayInfo;
4267 + desktop.m.onScreenSizeChange = deskAdjust;
4268 + desktop.Start(desktopNode._id);
4269 + desktop.contype = 1;
4270 + } else if (contype == 3) {
4271 + // Ask for user sessions
4272 + meshserver.send({ action: 'msg', type: 'userSessions', nodeid: currentNode._id });
4273 + }
4274 + } else {
4275 + // Disconnect and clean up the remote desktop
4276 + desktop.Stop();
4277 + webRtcDesktopReset();
4278 + desktopNode = desktop = null;
4279 + if (pluginHandler != null) { pluginHandler.callHook('onDesktopDisconnect'); }
4280 + }
4281 + }
4282 +
4283 + function p11clearConsoleMsg() { QV('p11DeskConsoleMsg', false); if (p11DeskConsoleMsgTimer) { clearTimeout(p11DeskConsoleMsgTimer); p11DeskConsoleMsgTimer = null; } }
4284 + function p12clearConsoleMsg() { QV('p12TermConsoleMsg', false); if (p12TermConsoleMsgTimer) { clearTimeout(p12TermConsoleMsgTimer); p12TermConsoleMsgTimer = null; } }
4285 + function p13clearConsoleMsg() { QV('p13FilesConsoleMsg', false); if (p13FilesConsoleMsgTimer) { clearTimeout(p13FilesConsoleMsgTimer); p13FilesConsoleMsgTimer = null; } }
4286 +
4287 + var webRtcDesktop = null;
4288 + function webRtcDesktopReset() {
4289 + if (webRtcDesktop == null) return;
4290 + if (webRtcDesktop.softdesktop != null) { webRtcDesktop.softdesktop.Stop(); webRtcDesktop.softdesktop = null; }
4291 + if (webRtcDesktop.webchannel != null) { try { webRtcDesktop.webchannel.close(); } catch (e) { } webRtcDesktop.webchannel = null; }
4292 + if (webRtcDesktop.webrtc != null) { try { webRtcDesktop.webrtc.close(); } catch (e) { } webRtcDesktop.webrtc = null; }
4293 + webRtcDesktop = null;
4294 + // Switch back to hardware KVM
4295 + if (desktop && desktop.m) {
4296 + desktop.m.hold(false);
4297 + Q('deskstatus').textContent = StatusStrs[desktop.State];
4298 + }
4299 + // ###BEGIN###{DesktopInbandFiles}
4300 + /*
4301 + p24files = null;
4302 + p24downloadFileCancel() // If any downloads are in process, cancel them.
4303 + p24uploadFileCancel(); // If any uploads are in process, cancel them.
4304 + QV('go24', false); // Files
4305 + if (currentView == 24) { go(14); }
4306 + */
4307 + // ###END###{DesktopInbandFiles}
4308 + }
4309 +
4310 + function onDesktopStateChange(xdesktop, state) {
4311 + var xstate = state;
4312 + if ((xstate == 3) && (xdesktop.contype == 2)) { xstate++; }
4313 + var str = StatusStrs[xstate];
4314 + if ((desktop != null) && (desktop.webRtcActive == true)) { str += ", WebRTC"; }
4315 + //if (desktop.m.stopInput == true) { str += ', Loopback'; }
4316 + QH('deskstatus', str);
4317 + switch (state) {
4318 + case 0:
4319 + // Disconnect and clean up the remote desktop
4320 + desktop.Stop();
4321 + desktopNode = desktop = null;
4322 + QV('DeskFocus', false);
4323 + QV('termdisplays', false);
4324 + QV('deskRecordIcon', false);
4325 + deskFocusBtn.value = "All Focus";
4326 + if (fullscreen == true) { deskToggleFull(); }
4327 + webRtcDesktopReset();
4328 + deskPreferedStickyDisplay = 0;
4329 + break;
4330 + case 2:
4331 + break;
4332 + case 3:
4333 + if (desktop && (desktop.serverIsRecording == true)) { QV('deskRecordIcon', true); }
4334 + desktop.startTime = new Date();
4335 + if (updateSessionTimer == null) { updateSessionTimer = setInterval(updateSessionTime, 1000); }
4336 + break;
4337 + default:
4338 + //console.log('Unknown onDesktopStateChange state', state);
4339 + break;
4340 + }
4341 + updateDesktopButtons();
4342 + deskAdjust();
4343 + setTimeout(deskAdjust, 50);
4344 + }
4345 +
4346 + function updateSessionTime() {
4347 + // Desktop
4348 + var seconds = 0;
4349 + if (desktop && desktop.startTime) {
4350 + seconds = Math.floor((new Date() - desktop.startTime) / 1000);
4351 + QH('DeskTimer', zeroPad(Math.floor(seconds / 3600), 2) + ':' + zeroPad((Math.floor(seconds / 60) % 60), 2) + ':' + zeroPad((seconds % 60), 2));
4352 + } else {
4353 + QH('DeskTimer', '');
4354 + }
4355 +
4356 + // Terminal
4357 + seconds = 0;
4358 + if (terminal && terminal.startTime) {
4359 + seconds = Math.floor((new Date() - terminal.startTime) / 1000);
4360 + QH('TermTimer', zeroPad(Math.floor(seconds / 3600), 2) + ':' + zeroPad((Math.floor(seconds / 60) % 60), 2) + ':' + zeroPad((seconds % 60), 2));
4361 + } else {
4362 + QH('TermTimer', '');
4363 + }
4364 +
4365 + if ((desktop == null) && (terminal == null)) { clearInterval(updateSessionTimer); updateSessionTimer = null; }
4366 + }
4367 +
4368 + function showDesktopSettings() {
4369 + if (xxdialogMode) return;
4370 + applyDesktopSettings();
4371 + updateDesktopButtons();
4372 + setDialogMode(7, "Instellingen extern bureaublad", 3, showDesktopSettingsChanged);
4373 + }
4374 +
4375 + function showDesktopSettingsChanged() {
4376 + desktopsettings.encoding = d7desktopmode.value;
4377 + desktopsettings.showfocus = d7showfocus.checked;
4378 + desktopsettings.showmouse = d7showcursor.checked;
4379 + desktopsettings.quality = d7bitmapquality.value;
4380 + desktopsettings.scaling = d7bitmapscaling.value;
4381 + desktopsettings.framerate = d7framelimiter.value;
4382 + desktopsettings.localkeymap = d7localKeyMap.checked;
4383 + localStorage.setItem('desktopsettings', JSON.stringify(desktopsettings));
4384 + applyDesktopSettings();
4385 + if (desktop) {
4386 + if (desktop.contype == 1) {
4387 + if (desktop.State != 0) {
4388 + desktop.m.SendCompressionLevel(1, desktopsettings.quality, desktopsettings.scaling, desktopsettings.framerate);
4389 + }
4390 + }
4391 + if (desktop.contype == 2) {
4392 + if (desktopsettings.showfocus == false) { desktop.m.focusmode = 0; deskFocusBtn.value = "All Focus"; }
4393 + if (desktop.State != 0) { desktop.Stop(); setTimeout(function () { connectDesktop(null, 2); }, 50); }
4394 + }
4395 + }
4396 + }
4397 +
4398 + function applyDesktopSettings() {
4399 + var r = '', ops = (features & 512)?[90,80,70,60,50,40,30,20,10,5,1]:[60,50,40,30,20,10,5,1];
4400 + for (var i in ops) { r += '<option value=' + ops[i] + '>' + ops[i] + '%</option>'; }
4401 + QH('d7bitmapquality', r);
4402 + d7desktopmode.value = desktopsettings.encoding;
4403 + d7showfocus.checked = desktopsettings.showfocus;
4404 + d7showcursor.checked = desktopsettings.showmouse;
4405 + d7bitmapquality.value = 40; // Default value
4406 + if (ops.indexOf(parseInt(desktopsettings.quality)) >= 0) { d7bitmapquality.value = desktopsettings.quality; }
4407 + d7bitmapscaling.value = desktopsettings.scaling;
4408 + if (desktopsettings.framerate) { d7framelimiter.value = desktopsettings.framerate; }
4409 + if (desktopsettings.localkeymap) { d7localKeyMap.checked = desktopsettings.localkeymap; }
4410 + QV('deskFocusBtn', (desktop != null) && (desktop.contype == 2) && (desktop.state != 0) && (desktopsettings.showfocus));
4411 + }
4412 +
4413 + // Enter browser fullscreen
4414 + function enterBrowserFullscreen(elem) {
4415 + if (elem.requestFullscreen) { elem.requestFullscreen(); }
4416 + else if (elem.msRequestFullscreen) { elem.msRequestFullscreen(); }
4417 + else if (elem.mozRequestFullScreen) { elem.mozRequestFullScreen(); }
4418 + else if (elem.webkitRequestFullscreen) { elem.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); }
4419 + }
4420 +
4421 + // Exit browser fullscreen
4422 + function exitBrowserFullscreen() {
4423 + if (document.exitFullscreen) { document.exitFullscreen(); }
4424 + else if (document.msExitFullscreen) { document.msExitFullscreen(); }
4425 + else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); }
4426 + else if (document.webkitExitFullscreen) { document.webkitExitFullscreen(); }
4427 + }
4428 +
4429 + // Return true if the browser is fullscreen. This is a delayed method that will return true/false late. Not very useful.
4430 + function isBrowserFullscreen() {
4431 + if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) { return false; } else { return true; }
4432 + }
4433 +
4434 + var fullscreen = false;
4435 + var browserfullscreen = false;
4436 + function deskToggleFull(e) {
4437 + fullscreen = !fullscreen;
4438 + if (fullscreen) {
4439 + QC('body').add('fulldesk');
4440 + QS('deskarea3x')['height'] = '100%';
4441 + QS('deskarea3x')['max-height'] = '100%';
4442 + // If shift is pressed, enter browser full screen.
4443 + if (e.shiftKey == true) { enterBrowserFullscreen(Q('deskarea0')); browserfullscreen = true; }
4444 + } else {
4445 + QC('body').remove('fulldesk');
4446 + QS('deskarea3x')['height'] = null;
4447 + QS('deskarea3x')['max-height'] = null;
4448 + if (browserfullscreen == true) { exitBrowserFullscreen(); browserfullscreen = false; }
4449 + }
4450 + deskAdjust();
4451 + updateDesktopButtons();
4452 + }
4453 +
4454 + function deskToggleFocus() {
4455 + desktop.m.focusmode = (desktop.m.focusmode + 64) % 192;
4456 + Q('deskFocusBtn').value = ["All Focus", "Kleine focus", "Grote focus"][desktop.m.focusmode / 64];
4457 + }
4458 +
4459 + function deskAdjust() {
4460 + var parentH = Q('DeskParent').clientHeight, parentW = Q('DeskParent').clientWidth;
4461 + var deskH = Q('Desk').height, deskW = Q('Desk').width;
4462 +
4463 + if (deskAspectRatio == 2) {
4464 + // Scale mode
4465 + QS('Desk')['margin-top'] = null;
4466 + QS('Desk').height = '100%';
4467 + QS('Desk').width = '100%';
4468 + //QS('deskarea3x').height = null;
4469 + QS('DeskParent').overflow = 'hidden';
4470 + } else if (deskAspectRatio == 1) {
4471 + // Zoomed mode
4472 + QS('Desk')['margin-top'] = '0px';
4473 + QS('Desk').height = deskH + 'px';
4474 + QS('Desk').width = deskW + 'px';
4475 + QS('DeskParent').overflow = 'scroll';
4476 + } else {
4477 + // Fixed aspect ratio
4478 + if ((parentH / parentW) > (deskH / deskW)) {
4479 + var hNew = ((deskH * parentW) / deskW) + 'px';
4480 + //if (webPageFullScreen || fullscreen) {
4481 + //QS('deskarea3x').height = null;
4482 + //} else {
4483 + // QS('deskarea3x').height = hNew;
4484 + //QS('deskarea3x').height = null;
4485 + //}
4486 + QS('Desk').height = hNew;
4487 + QS('Desk').width = '100%';
4488 + } else {
4489 + var wNew = ((deskW * parentH) / deskH) + 'px';
4490 + if (webPageFullScreen || fullscreen) {
4491 + QS('Desk').height = null;
4492 + } else {
4493 + QS('Desk').height = '100%';
4494 + }
4495 + QS('Desk').width = wNew;
4496 + }
4497 + QS('Desk')['margin-top'] = null;
4498 + QS('DeskParent').overflow = 'hidden';
4499 + }
4500 + }
4501 +
4502 + function mdeskAdjust(mod, sw, sh, cv) {
4503 + if (!mod || !sw || !sh || !cv) return;
4504 +
4505 + // Check if we are in single desktop mode
4506 + if (cv.id == 'Desk') { deskAdjust(); return; }
4507 +
4508 + // Figure out and adjust the size to fill the width of the div
4509 + var vsize = [{ x: 180, y: 101 }, { x: 302, y: 169 }, { x: 454, y: 255 }][Q('sizeselect').selectedIndex];
4510 + var realw = vsize.x + 2, tw = Q('xdevices').clientWidth - 30, xw = Math.floor(tw / realw);
4511 + xw = realw + Math.floor((tw - (xw * realw)) / xw);
4512 + vsize.y = vsize.y * (xw / vsize.x);
4513 + vsize.x = xw;
4514 + var mh = vsize.y, mw = vsize.x;
4515 + if (mod.State != 0) { mh = vsize.y; mw = (sw / sh) * vsize.y; }
4516 + QS(cv.id)['max-height'] = mh + 'px';
4517 + QS(cv.id)['max-width'] = mw + 'px';
4518 + QS(cv.id)['margin-top'] = '0';
4519 + QS(cv.id)['margin-bottom'] = '0';
4520 + }
4521 +
4522 + // Remote desktop special key combos for Windows
4523 + function deskSendKeys() {
4524 + if (xxdialogMode || desktop == null || desktop.State != 3) return;
4525 + var ks = Q('deskkeys').value;
4526 + if (ks == 0) { // WIN+Down arrow
4527 + if (desktop.contype == 2) {
4528 + desktop.m.sendkey([[0xffe7,1],[0xff54,1],[0xff54,0],[0xffe7,0]]); // Intel AMT: Meta-left down, Down arrow press, Down arrow release, Meta-left release
4529 + } else {
4530 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,0x5B],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,0x5B]]); // Agent: L-Winkey press, Down arrow press, Down arrow release, L-Winkey release
4531 + }
4532 + } else if (ks == 1) { // WIN+Up arrow
4533 + if (desktop.contype == 2) {
4534 + desktop.m.sendkey([[0xffe7,1],[0xff52,1],[0xff52,0],[0xffe7,0]]); // Intel AMT: Meta-left down, Up arrow press, Up arrow release, Meta-left release
4535 + } else {
4536 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,0x5B],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,0x5B]]); // MeshAgent: L-Winkey press, Up arrow press, Up arrow release, L-Winkey release
4537 + }
4538 + } else if (ks == 2) { // WIN+L arrow
4539 + if (desktop.contype == 2) {
4540 + desktop.m.sendkey([[0xffe7,1],[0x6c,1],[0x6c,0],[0xffe7,0]]); // Intel AMT: Meta-left down, 'l' press, 'l' release, Meta-left release
4541 + } else {
4542 + desktop.sendCtrlMsg('{"action":"lock"}');
4543 + //desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,0x5B],[desktop.m.KeyAction.DOWN,76],[desktop.m.KeyAction.UP,76],[desktop.m.KeyAction.EXUP,0x5B]]); // MeshAgent: L-Winkey press, 'L' press, 'L' release, L-Winkey release
4544 + //desktop.m.SendKeyMsgKC(desktop.m.KeyAction.EXDOWN, 0x5B);
4545 + //desktop.m.SendKeyMsgKC(desktop.m.KeyAction.DOWN, 76);
4546 + //desktop.m.SendKeyMsgKC(desktop.m.KeyAction.UP, 76);
4547 + //desktop.m.SendKeyMsgKC(desktop.m.KeyAction.EXUP, 0x5B);
4548 + }
4549 + } else if (ks == 3) { // WIN+M arrow
4550 + if (desktop.contype == 2) {
4551 + desktop.m.sendkey([[0xffe7,1],[0x6d,1],[0x6d,0],[0xffe7,0]]); // Intel AMT: Meta-left down, 'm' press, 'm' release, Meta-left release
4552 + } else {
4553 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,0x5B],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,0x5B]]); // MeshAgent: L-Winkey press, 'M' press, 'M' release, L-Winkey release
4554 + }
4555 + } else if (ks == 4) { // Shift+WIN+M arrow
4556 + if (desktop.contype == 2) {
4557 + desktop.m.sendkey([[0xffe1,1],[0xffe7,1],[0x6d,1],[0x6d,0],[0xffe7,0],[0xffe1,0]]); // Intel AMT: Shift-left down, Meta-left down, 'm' press, 'm' release, Meta-left release, Shift-left release
4558 + } else {
4559 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,0x5B],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,0x5B],[desktop.m.KeyAction.UP, 16]]); // MeshAgent: L-shift press, L-Winkey press, 'M' press, 'M' release, L-Winkey release, L-shift release
4560 + }
4561 + } else if (ks == 5) { // WIN
4562 + if (desktop.contype == 2) {
4563 + desktop.m.sendkey([[0xffe7,1],[0xffe7,0]]); // Intel AMT: Meta-left down, Meta-left release
4564 + } else {
4565 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,0x5B], [desktop.m.KeyAction.EXUP,0x5B]]); // MeshAgent: L-Winkey press, L-Winkey release
4566 + }
4567 + } else if (ks == 6) { // WIN+R
4568 + if (desktop.contype == 2) {
4569 + desktop.m.sendkey([[0xffe7,1],[0x72,1],[0x72,0],[0xffe7,0]]); // Intel AMT: Meta-left down, 'r' press, 'r' release, Meta-left release
4570 + } else {
4571 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 0x5B], [desktop.m.KeyAction.DOWN, 82], [desktop.m.KeyAction.UP, 82], [desktop.m.KeyAction.EXUP, 0x5B]]); // MeshAgent: L-Winkey press, 'R' press, 'R' release, L-Winkey release
4572 + }
4573 + } else if (ks == 7) { // ALT-F4
4574 + if (desktop.contype == 2) {
4575 + desktop.m.sendkey([[0xffe9,1],[0xffc1,1],[0xffc1,0],[0xffe9,0]]); // Intel AMT: Alt down, 'F4' press, 'F4' release, Alt release
4576 + } else {
4577 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 18], [desktop.m.KeyAction.DOWN, 115], [desktop.m.KeyAction.UP, 115], [desktop.m.KeyAction.EXUP, 18]]); // MeshAgent: Alt press, 'F4' press, 'F4' release, Alt release
4578 + }
4579 + } else if (ks == 8) { // CTRL-W
4580 + if (desktop.contype == 2) {
4581 + desktop.m.sendkey([[0xffe3,1],[0x77,1],[0x77,0],[0xffe3,0]]); // Intel AMT: Ctrl down, 'w' press, 'w' release, Ctrl release
4582 + } else {
4583 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 17], [desktop.m.KeyAction.DOWN, 87], [desktop.m.KeyAction.UP, 87], [desktop.m.KeyAction.EXUP, 17]]); // MeshAgent: Ctrl press, 'W' press, 'W' release, Ctrl release
4584 + }
4585 + } else if (ks == 9) { // ALT-TAB
4586 + if (desktop.contype == 2) {
4587 + desktop.m.sendkey([[0xffe9, 1], [0xff09, 1], [0xff09, 0], [0xffe9, 0]]); // Intel AMT: Alt down, 'TAB' press, 'TAB' release, Alt release
4588 + } else {
4589 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 18], [desktop.m.KeyAction.DOWN, 9], [desktop.m.KeyAction.UP, 9], [desktop.m.KeyAction.EXUP, 18]]); // MeshAgent: Alt press, 'TAB' press, 'TAB' release, Alt release
4590 + }
4591 + } else if (ks == 10) { // CTRL-ALT-DEL
4592 + desktop.m.sendcad();
4593 + } else if (ks == 11) { // WIN-LEFT
4594 + if (desktop.contype == 2) {
4595 + desktop.m.sendkey([[0xffe7, 1], [0xff51, 1], [0xff51, 0], [0xffe7, 0]]); // Intel AMT: Meta-left down, Left arrow press, Left arrow release, Meta-left release
4596 + } else {
4597 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 0x5B], [desktop.m.KeyAction.DOWN, 37], [desktop.m.KeyAction.UP, 37], [desktop.m.KeyAction.EXUP, 0x5B]]);
4598 + }
4599 + } else if (ks == 12) { // WIN-RIGHT
4600 + if (desktop.contype == 2) {
4601 + desktop.m.sendkey([[0xffe7, 1], [0xff53, 1], [0xff53, 0], [0xffe7, 0]]); // Intel AMT: Meta-left down, Right arrow press, Right arrow release, Meta-left release
4602 + } else {
4603 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 0x5B], [desktop.m.KeyAction.DOWN, 39], [desktop.m.KeyAction.UP, 39], [desktop.m.KeyAction.EXUP, 0x5B]]);
4604 + }
4605 + }
4606 + }
4607 +
4608 + // Remote desktop typing
4609 + function showDeskType() {
4610 + if (xxdialogMode || desktop == null || desktop.State != 3) return;
4611 + Q('DeskType').blur();
4612 + var x = '<div>' + "Voer tekst in en klik op OK om deze op afstand te typen met een Amerikaans Engels toetsenbord. Zorg ervoor dat u de externe cursor op de juiste positie plaatst voordat u doorgaat." + '<div>';
4613 + x += '<textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>';
4614 + setDialogMode(2, "Toetsenbordinvoer op afstand", 3, showDeskTypeEx, x);
4615 + Q('d2typeText').focus();
4616 + }
4617 +
4618 + var AmtDeskTypeTimer = null;
4619 + var AmtDeskTypeContent = null;
4620 + var DeskTypeTranslate = { 39: 222, 42: 106, 43: 107, 44: 188, 45: 189, 46: 190, 47: 191, 59: 186, 61: 187, 91: 219, 92: 220, 93: 221, 96: 192, 191: 111 };
4621 + var DeskTypeShiftTranslate = { 33: 49, 34: 222, 35: 51, 36: 52, 37: 53, 38: 55, 40: 57, 41: 48, 58: 186, 60: 188, 62: 190, 63: 191, 64: 50, 94: 54, 95: 189, 106: 56, 107: 187, 123: 219, 124: 220, 125: 221, 126: 192 };
4622 + function showDeskTypeEx() {
4623 + var txt = Q('d2typeText').value, ltxt = Q('d2typeText').value.toUpperCase(), x = [], shift = false;
4624 + if (desktop.contype == 2) {
4625 + // Intel AMT
4626 + for (var i in txt) { var a = txt.charCodeAt(i); x.push([a, 1], [a, 0]); }
4627 + AmtDeskTypeContent = x;
4628 + AmtDeskTypeTimer = setInterval(function () {
4629 + var key = AmtDeskTypeContent.shift();
4630 + if (desktop) { desktop.m.sendkey(key[0], key[1]); }
4631 + if ((desktop == null) || (AmtDeskTypeContent.length == 0)) { clearInterval(AmtDeskTypeTimer); AmtDeskTypeContent = null; }
4632 + }, 10);
4633 + } else {
4634 + // MeshAgent
4635 + for (var i in txt) {
4636 + var a = txt.charCodeAt(i), b = ltxt.charCodeAt(i);
4637 + if (((a >= 65) && (a <= 90)) || ((a >= 97) && (a <= 122))) {
4638 + if ((a == b) && (shift == false)) { x.push([desktop.m.KeyAction.DOWN, 16]); shift = true; } // LShift down
4639 + if ((a != b) && (shift == true)) { x.push([desktop.m.KeyAction.UP, 16]); shift = false; } // LShift up
4640 + } else if ((a >= 48) && (a <= 57)) {
4641 + if (shift == true) { x.push([desktop.m.KeyAction.UP, 16]); shift = false; } // Shift up
4642 + } else if (DeskTypeTranslate[a]) {
4643 + if (shift == true) { x.push([desktop.m.KeyAction.UP, 16]); shift = false; } // Shift up
4644 + b = DeskTypeTranslate[a];
4645 + } else if (DeskTypeShiftTranslate[a]) {
4646 + if (shift == false) { x.push([desktop.m.KeyAction.DOWN, 16]); shift = true; } // LShift down
4647 + b = DeskTypeShiftTranslate[a];
4648 + }
4649 + x.push([desktop.m.KeyAction.DOWN, b], [desktop.m.KeyAction.UP, b]);
4650 + }
4651 + if (shift == true) { x.push([desktop.m.KeyAction.UP, 16]); shift = false; } // Shift up
4652 + desktop.m.SendKeyMsgKC(x);
4653 + }
4654 + }
4655 +
4656 + // Show clipboard dialog
4657 + function showDeskClip() {
4658 + if (xxdialogMode || desktop == null || desktop.State != 3) return;
4659 + Q('DeskClip').blur();
4660 + var x = '';
4661 + x += '<input id=dlgClipGet type=button value="Get Clipboard" style=width:120px onclick=showDeskClipGet()>';
4662 + x += '<input id=dlgClipSet type=button value="Set Clipboard" style=width:120px onclick=showDeskClipSet()>';
4663 + x += '<div id=dlgClipStatus style="display:inline-block;margin-left:8px" ></div>';
4664 + x += '<textarea id=d2clipText style="width:100%;height:184px;resize:none" maxlength=65535></textarea>';
4665 + x += '<input type=button value="Close" style=width:80px;float:right onclick=dialogclose(0)><div style=height:26px;margin-top:3px><span id=linuxClipWarn style=display:none>' + "Het externe klembord is 60 seconden geldig." + '</span>&nbsp;</div><div></div>';
4666 + setDialogMode(2, "extern klembord", 8, null, x, 'clipboard');
4667 + Q('d2clipText').focus();
4668 + }
4669 +
4670 + function showDeskClipGet() {
4671 + if (desktop == null || desktop.State != 3) return;
4672 + meshserver.send({ action: 'msg', type: 'getclip', nodeid: currentNode._id });
4673 + }
4674 +
4675 + function showDeskClipSet() {
4676 + if (desktop == null || desktop.State != 3) return;
4677 + meshserver.send({ action: 'msg', type: 'setclip', nodeid: currentNode._id, data: Q('d2clipText').value });
4678 + QV('linuxClipWarn', currentNode && currentNode.agent && (currentNode.agent.id > 4) && (currentNode.agent.id != 21) && (currentNode.agent.id != 22));
4679 + }
4680 +
4681 + // Send CTRL-ALT-DEL
4682 + function sendCAD() {
4683 + if (xxdialogMode || desktop == null || desktop.State != 3) return;
4684 + desktop.m.sendcad();
4685 + }
4686 +
4687 + // Show process dialogs
4688 + function toggleDeskTools() {
4689 + if (xxdialogMode) return;
4690 + if (QS('DeskTools').display == 'none') {
4691 + QV('DeskTools', true);
4692 + Q('DeskTools').nodeid = currentNode._id;
4693 + QH('DeskToolsProcesses', '');
4694 + QH('DeskToolsServices', '');
4695 + QV('deskToolsTopTabService', false);
4696 + changeDeskToolTab(0)
4697 + refreshDeskTools(0);
4698 + refreshDeskTools(1);
4699 + } else {
4700 + QV('DeskTools', false);
4701 + }
4702 + }
4703 +
4704 + var deskToolTabSelection = 0;
4705 + function changeDeskToolTab(tabnum) {
4706 + deskToolTabSelection = tabnum;
4707 + QV('DeskToolsProcessTab', tabnum == 0);
4708 + QV('DeskToolsServiceTab', tabnum == 1);
4709 + QS('deskToolsTopTabProcess')['bottom'] = (tabnum == 0) ? '0px' : '3px';
4710 + QS('deskToolsTopTabService')['bottom'] = (tabnum == 1) ? '0px' : '3px';
4711 + QS('deskToolsTopTabProcess')['color'] = (tabnum == 0) ? 'black' : 'gray';
4712 + QS('deskToolsTopTabService')['color'] = (tabnum == 1) ? 'black' : 'gray';
4713 + }
4714 +
4715 + // Refresh all of the desktop tool panels
4716 + function refreshDeskTools(x) {
4717 + var sel = (x == null) ? deskToolTabSelection : x;
4718 + QV('DeskToolsRefreshButton', false);
4719 + setTimeout(refreshDeskToolsEx, 500);
4720 + if (sel == 0) meshserver.send({ action: 'msg', type: 'ps', nodeid: currentNode._id });
4721 + if (sel == 1) meshserver.send({ action: 'msg', type: 'services', nodeid: currentNode._id });
4722 + }
4723 + function refreshDeskToolsEx() { QV('DeskToolsRefreshButton', true); }
4724 + var deskTools = { sort: 1, ssort: 1, msg: null, smsg: null };
4725 + function sortProcess(sort) { deskTools.sort = sort; showDeskToolsProcesses(deskTools.msg); }
4726 + function sortService(sort) { deskTools.ssort = sort; showDeskToolsServices(deskTools.smsg); }
4727 + function sortProcessPid(a, b) { if (a.p > b.p) return 1; if (a.p < b.p) return (-1); return sortProcessName(a, b); }
4728 + function sortProcessName(a, b) { if (a.d > b.d) return 1; if (a.d < b.d) return (-1); return 0; }
4729 + function showDeskToolsProcesses(message) {
4730 + deskTools.msg = message;
4731 + if (message == null) { QH('DeskToolsProcesses', ''); return; }
4732 + if (Q('DeskTools').nodeid != message.nodeid) return;
4733 + var p = [], processes = null;
4734 + try { processes = JSON.parse(message.value); } catch (e) { }
4735 + if (processes != null) {
4736 + for (var pid in processes) { p.push( { p:parseInt(pid), c:processes[pid].cmd, d:processes[pid].cmd.toLowerCase(), u: processes[pid].user } ); }
4737 + if (deskTools.sort == 0) { p.sort(sortProcessPid); } else if (deskTools.sort == 1) { p.sort(sortProcessName); }
4738 + var x = '';
4739 + for (var i in p) {
4740 + if (p[i].p != 0) {
4741 + var c = p[i].c;
4742 + if (c.length > 30) { c = '<span title="' + c + '">' + c.substring(0,30) + '...</span>' }
4743 + x += '<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>' + p[i].p + '</div><a href=# style=float:right;padding-right:5px;cursor:pointer title="Stop process" onclick=\'return stopProcess(' + p[i].p + ',"' + p[i].c + '")\'><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>' + (p[i].u ? p[i].u : '') + '</div><div>' + c + '</div></div>';
4744 + }
4745 + }
4746 + QH('DeskToolsProcesses', x);
4747 + }
4748 + }
4749 + function showDeskToolsServices(message) {
4750 + deskTools.smsg = message;
4751 + if (message == null) { QH('DeskToolsProcesses', ''); return; }
4752 + if (Q('DeskTools').nodeid != message.nodeid) return;
4753 + QV('deskToolsTopTabService', true);
4754 + var s = [], services = null;
4755 + try { services = JSON.parse(message.value); } catch (e) { }
4756 + deskTools.services = services;
4757 + if (services != null) {
4758 + for (var i in services) {
4759 + if (services[i].status) {
4760 + // Windows
4761 + s.push({ p: capitalizeFirstLetter(services[i].status.state.toLowerCase()), d: services[i].displayName, i: i });
4762 + } else if (services[i].serviceType) {
4763 + // Linux (TODO: This the service status is not displayed, not sure start/stop/restart will work).
4764 + s.push({ p: services[i].serviceType, d: services[i].name, i: i });
4765 + }
4766 + }
4767 + if (deskTools.ssort == 0) { s.sort(sortProcessPid); } else if (deskTools.ssort == 1) { s.sort(sortProcessName); }
4768 + var x = '';
4769 + for (var i in s) {
4770 + if (s[i].p != 0) {
4771 + var c = s[i].d;
4772 + if (c.length > 30) { c = '<span title="' + c + '">' + c.substring(0, 30) + '...</span>' }
4773 + x += '<div onclick=showServiceDetailsDialog(' + s[i].i + ') class=deskToolsBar><div style=width:70px;float:left;padding-right:5px>' + s[i].p + '</div><div>' + c + '</div></div>';
4774 + }
4775 + }
4776 + QH('DeskToolsServices', x);
4777 + }
4778 + }
4779 +
4780 + function showServiceDetailsDialog(index) {
4781 + if (xxdialogMode) return;
4782 + var service = deskTools.services[index];
4783 + if (service != null) {
4784 + var x = '';
4785 + if (service.name) { x += addHtmlValue("Naam", service.name); }
4786 + if (service.displayName) { x += addHtmlValue("Schermnaam", service.displayName); }
4787 + if (service.status) {
4788 + if (service.status.state) { x += addHtmlValue("Status", capitalizeFirstLetter(service.status.state.toLowerCase())); }
4789 + if (service.status.pid) { x += addHtmlValue("PID", service.status.pid); }
4790 + var serviceTypes = [];
4791 + if (service.status.isFileSystemDriver === true) { serviceTypes.push("Bestandssysteem stuurprogramma"); }
4792 + if (service.status.isInteractive === true) { serviceTypes.push("Interactief"); }
4793 + if (service.status.isKernelDriver === true) { serviceTypes.push("KernelDriver"); }
4794 + if (service.status.isOwnProcess === true) { serviceTypes.push("Eigen proces"); }
4795 + if (service.status.isSharedProcess === true) { serviceTypes.push("Gedeeld proces"); }
4796 + if (serviceTypes.length > 0) { x += addHtmlValue("Typen", serviceTypes.join(', ')); }
4797 + }
4798 + x += '<br/><div style=float:right;margin-bottom:12px><input type=button value=\"' + "Sluiten" + '\" onclick=showServiceDetailsDialogEx(0,' + index + ')></div><div style=margin-bottom:12px><input type=button value=\"' + "Start" + '\" onclick=showServiceDetailsDialogEx(1,' + index + ')><input type=button value=\"' + "Stop" + '\" onclick=showServiceDetailsDialogEx(2,' + index + ')><input type=button value=\"' + "Herstarten" + '\" onclick=showServiceDetailsDialogEx(3,' + index + ')></div>';
4799 + setDialogMode(2, "Servicegegevens", 8, null, x, name);
4800 + }
4801 + }
4802 +
4803 + function showServiceDetailsDialogEx(action, index) {
4804 + setDialogMode(0);
4805 + if (action == 0) return;
4806 + var service = deskTools.services[index];
4807 + if (service != null) {
4808 + if (action == 1) { meshserver.send({ action: 'msg', type: 'serviceStart', nodeid: currentNode._id, serviceName: service.name }); }
4809 + if (action == 2) { meshserver.send({ action: 'msg', type: 'serviceStop', nodeid: currentNode._id, serviceName: service.name }); }
4810 + if (action == 3) { meshserver.send({ action: 'msg', type: 'serviceRestart', nodeid: currentNode._id, serviceName: service.name }); }
4811 + setTimeout(function () { refreshDeskTools(1) }, 1000);
4812 + }
4813 + }
4814 +
4815 + // Toggle mouse and keyboard input
4816 + function toggleKvmControl() { putstore('DeskControl', (Q("Besturing").checked?1:0)); }
4817 +
4818 + // Save the desktop image to file
4819 + function deskSaveImage() {
4820 + if (xxdialogMode || desktop == null || desktop.State != 3) return;
4821 + var d = new Date(), n = 'Desktop-' + currentNode.name + '-' + d.getFullYear() + '-' + ('0' + (d.getMonth() + 1)).slice(-2) + '-' + ('0' + d.getDate()).slice(-2) + '-' + ('0' + d.getHours()).slice(-2) + '-' + ('0' + d.getMinutes()).slice(-2);
4822 + Q('Desk')['toBlob'](function (blob) { saveAs(blob, n + '.jpg'); });
4823 + }
4824 +
4825 + function deskDisplayInfo(sender, displays, selDisplay) {
4826 + var displayCount = 0, displaySelector = '';
4827 + for (var i in displays) {
4828 + displayCount++;
4829 + displaySelector += '<option' + ((selDisplay == i) ? ' selected' : '') + ' value=' + i + '>' + displays[i] + '</option>';
4830 + if ((deskPreferedStickyDisplay == i) && (selDisplay != deskPreferedStickyDisplay)) { desktop.m.SetDisplay(i); }
4831 + }
4832 + QH('termdisplays', displaySelector);
4833 + QV('termdisplays', displayCount > 1);
4834 + }
4835 +
4836 + function deskGetDisplayNumbers(e) { desktop.m.GetDisplayNumbers(); }
4837 + var deskPreferedStickyDisplay = 0;
4838 + function deskSetDisplay(e) { desktop.m.SetDisplay(deskPreferedStickyDisplay = parseInt(Q('termdisplays').value)); Q('termdisplays').blur(); }
4839 +
4840 + // Double click detection. This is important for MacOS.
4841 + var dblClickDetectArgs = { t:0, x:0, y:0 };
4842 + function dblClickDetect(e) {
4843 + if (e.buttons != 1) return;
4844 + var t = Date.now();
4845 + if (((t - dblClickDetectArgs.t) < 250) && (Math.abs(e.clientX - dblClickDetectArgs.x) < 2) && (Math.abs(e.clientY - dblClickDetectArgs.y) < 2)) {
4846 + if (!xxdialogMode && desktop != null && Q('DeskControl').checked) { if ((webRtcDesktop != null) && (webRtcDesktop.softdesktop != null)) { webRtcDesktop.softdesktop.m.mousedblclick(e); desktop.m.sendKeepAlive(); } else { desktop.m.mousedblclick(e); } }
4847 + }
4848 + dblClickDetectArgs.t = t;
4849 + dblClickDetectArgs.x = e.clientX;
4850 + dblClickDetectArgs.y = e.clientY;
4851 + }
4852 +
4853 + function dmousedown(e) { setSessionActivity(); e.addx = Q('DeskParent').scrollLeft; e.addy = Q('DeskParent').scrollTop; if (!xxdialogMode && desktop != null && Q('DeskControl').checked) { if ((webRtcDesktop != null) && (webRtcDesktop.softdesktop != null)) { webRtcDesktop.softdesktop.m.mousedown(e); desktop.m.sendKeepAlive(); } else { desktop.m.mousedown(e); } } dblClickDetect(e); }
4854 + function dmouseup(e) { setSessionActivity(); e.addx = Q('DeskParent').scrollLeft; e.addy = Q('DeskParent').scrollTop; if (!xxdialogMode && desktop != null && Q('DeskControl').checked) if ((webRtcDesktop != null) && (webRtcDesktop.softdesktop != null)) { webRtcDesktop.softdesktop.m.mouseup(e); desktop.m.sendKeepAlive(); } else { desktop.m.mouseup(e); } }
4855 + function dmousemove(e) { setSessionActivity(); e.addx = Q('DeskParent').scrollLeft; e.addy = Q('DeskParent').scrollTop; if (!xxdialogMode && desktop != null && Q('DeskControl').checked) { if ((webRtcDesktop != null) && (webRtcDesktop.softdesktop != null)) { webRtcDesktop.softdesktop.m.mousemove(e); desktop.m.sendKeepAlive(); } else { desktop.m.mousemove(e); } } }
4856 + function dmousewheel(e) { setSessionActivity(); e.addx = Q('DeskParent').scrollLeft; e.addy = Q('DeskParent').scrollTop; if (!xxdialogMode && desktop != null && Q('DeskControl').checked) { if ((webRtcDesktop != null) && (webRtcDesktop.softdesktop != null)) { webRtcDesktop.softdesktop.m.mousewheel(e); desktop.m.sendKeepAlive(); } else { if (desktop.m.mousewheel) { desktop.m.mousewheel(e); } } haltEvent(e); return true; } return false; }
4857 + function drotate(x) { if (!xxdialogMode && desktop != null) { desktop.m.setRotation(desktop.m.rotation + x); deskAdjust(); deskAdjust(); } }
4858 + function stopProcess(id, name) { setDialogMode(2, "Proces controle", 3, stopProcessEx, format("Stop process #{0} \"{1}\"?", id, name), id); return false; }
4859 + function stopProcessEx(buttons, tag) { meshserver.send({ action: 'msg', type: 'pskill', nodeid: currentNode._id, value: tag }); setTimeout(refreshDeskTools, 300); }
4860 +
4861 + //
4862 + // TERMINAL
4863 + //
4864 +
4865 + var terminalNode;
4866 + function setupTerminal() {
4867 + // Setup the terminal
4868 + if ((terminalNode != currentNode) && (terminal != null)) { terminal.Stop(); terminal = null; }
4869 + terminalNode = currentNode;
4870 + updateTerminalButtons();
4871 + }
4872 +
4873 + // Show and enable the right buttons
4874 + function updateTerminalButtons() {
4875 + var mesh = meshes[terminalNode.meshid];
4876 + var termState = ((terminal != null) && (terminal.state != 0));
4877 +
4878 + // Show the right buttons
4879 + QV('disconnectbutton2span', (termState == true));
4880 + QV('connectbutton2span', (termState == false) && (mesh.mtype == 2) && (currentNode.agent.caps & 2));
4881 + QV('connectbutton2hspan', (termState == false) && ((terminalNode.intelamt != null) && (mesh.mtype == 1 || terminalNode.intelamt.state == 2) && ((terminalNode.intelamt.ver != null) || (mesh.mtype == 1))));
4882 +
4883 + // Enable buttons
4884 + var online = ((terminalNode.conn & 1) != 0); // If Agent (1) connected, enable Terminal
4885 + QE('connectbutton2', online);
4886 + var hwonline = ((terminalNode.conn & 6) != 0); // If CIRA (2) or AMT (4) connected, enable hardware terminal
4887 + QE('connectbutton2h', hwonline);
4888 +
4889 + // Key buttons
4890 + QE('ctrlcbutton', termState);
4891 + QE('ctrlxbutton', termState);
4892 + QE('escbutton', termState);
4893 + QE('bsbutton', termState);
4894 + QE('pastebutton', termState);
4895 + QE('specialkeylist', termState);
4896 + QE('specialkeylistinput', termState);
4897 +
4898 + // Terminal settings
4899 + QV('terminalSettingsButtons', (terminal) && (terminal.contype == 2));
4900 + if (terminal) {
4901 + Q('id_ttypebutton').value = terminalEmulations[terminal.m.terminalEmulation];
4902 + Q('id_tfxkeysbutton').value = fxEmulations[terminal.m.fxEmulation];
4903 + Q('id_tcrbutton').value = (terminal.m.lineFeed == '\r\n')?"CR+LF":"LF";
4904 + }
4905 + }
4906 +
4907 + // Called when the terminal state changes
4908 + function onTerminalStateChange(xterminal, state) {
4909 + var xstate = state;
4910 + if ((xstate == 3) && (xterminal.contype == 2)) { xstate++; }
4911 + var str = StatusStrs[xstate];
4912 + if (terminal.webRtcActive == true) { str += ", WebRTC"; }
4913 + QH('termstatus', str);
4914 + switch (state) {
4915 + case 0:
4916 + // Disconnected, clear the terminal
4917 + QE('termSizeList', true);
4918 + QH('termtitle', '');
4919 + QV('termRecordIcon', false);
4920 + xterminal.m.TermResetScreen();
4921 + xterminal.m.TermDraw();
4922 + if (terminal != null) { terminal.Stop(); terminal = null; }
4923 + break;
4924 + case 3:
4925 + QE('termSizeList', false);
4926 + if (xterminal && (xterminal.serverIsRecording == true)) { QV('termRecordIcon', true); }
4927 + terminal.startTime = new Date();
4928 + if (updateSessionTimer == null) { updateSessionTimer = setInterval(updateSessionTime, 1000); }
4929 + break;
4930 + default:
4931 + QE('termSizeList', false);
4932 + //console.log('Unhandled onTerminalStateChange state', state);
4933 + break;
4934 + }
4935 + updateTerminalButtons();
4936 + }
4937 +
4938 + // DEBUG
4939 + var autoConnectTerminalTimer = null;
4940 + function autoConnectTerminal(e) { if (autoConnectTerminalTimer == null) { autoConnectTerminalTimer = setInterval(connectTerminal, 100); } else { clearInterval(autoConnectTerminalTimer); autoConnectTerminalTimer = null; } }
4941 +
4942 + function connectTerminal(e, contype, options) {
4943 + p12clearConsoleMsg();
4944 + if (!terminal) {
4945 + if (contype == 2) {
4946 + // Setup the Intel AMT terminal
4947 + if ((terminalNode.intelamt.user == null) || (terminalNode.intelamt.user == '')) { editDeviceAmtSettings(terminalNode._id, connectTerminal, 2); return; }
4948 + var termoptions = {};
4949 + if (Q('termSizeList').value == 2) { termoptions.width = 100; termoptions.height = 30; }
4950 + terminal = CreateAmtRedirect(CreateAmtRemoteTerminal('Term', termoptions), authCookie);
4951 + terminal.debugmode = debugmode;
4952 + terminal.m.debugmode = debugmode;
4953 + terminal.m.onTitleChange = function (sender, title) { QH('termtitle', ' - ' + EscapeHtml(title)); }
4954 + terminal.onStateChanged = onTerminalStateChange;
4955 + terminal.Start(terminalNode._id, 16994, '*', '*', 0);
4956 + terminal.contype = 2;
4957 + Q('id_ttypebutton').value = terminalEmulations[terminal.m.terminalEmulation];
4958 + } else {
4959 + // Setup a mesh agent terminal
4960 + var termoptions = { protocol: ((options != null) && (typeof options.protocol == 'number'))?options.protocol:1 };
4961 + if ([1, 2, 3, 4, 21, 22].indexOf(currentNode.agent.id) == -1) {
4962 + if (Q('termSizeList').value == 2) { termoptions.width = 100; termoptions.height = 30; termoptions.xterm = true; }
4963 + if (Q('termSizeList').value == 3) {
4964 + // TODO: Try to improve terminal auto-size.
4965 + termoptions.width = Math.floor((Q('column_l').clientWidth - 60) / 10);
4966 + termoptions.height = Math.floor((Q('column_l').clientHeight - 120) / 20);
4967 + termoptions.xterm = true;
4968 + }
4969 + }
4970 +
4971 + // If shift is pressed
4972 + if ((e && (e.shiftKey == true))) {
4973 + if (currentNode.agent.id > 4) {
4974 + if (termoptions.protocol == 1) { termoptions.protocol = 7; } // Switch to user shell
4975 + } else {
4976 + if (termoptions.protocol == 1) { termoptions.protocol = 6; } // Switch to Powershell
4977 + }
4978 + }
4979 +
4980 + terminal = CreateAgentRedirect(meshserver, CreateAmtRemoteTerminal('Term', termoptions), serverPublicNamePort, authCookie, authRelayCookie, domainUrl);
4981 + terminal.debugmode = debugmode;
4982 + terminal.m.debugmode = debugmode;
4983 + terminal.m.onTitleChange = function (sender, title) { QH('termtitle', ' - ' + EscapeHtml(title)); }
4984 + terminal.m.lineFeed = ([1, 2, 3, 4, 21, 22].indexOf(currentNode.agent.id) >= 0) ? '\r\n' : '\r'; // On windows, send \r\n, on Linux only \r
4985 + terminal.attemptWebRTC = false; // Never do WebRTC on terminal, because of a race condition we can't do it.
4986 + terminal.onStateChanged = onTerminalStateChange;
4987 + terminal.onConsoleMessageChange = function () {
4988 + p12clearConsoleMsg();
4989 + if (terminal.consoleMessage) {
4990 + QH('p12TermConsoleMsg', EscapeHtml(terminal.consoleMessage).split('\n').join('<br />'));
4991 + QV('p12TermConsoleMsg', true);
4992 + p12TermConsoleMsgTimer = setTimeout(p12clearConsoleMsg, 8000);
4993 + }
4994 + }
4995 + terminal.Start(terminalNode._id);
4996 + terminal.contype = 1;
4997 + terminal.m.terminalEmulation = 0;
4998 + terminal.m.fxEmulation = 0;
4999 + Q('id_ttypebutton').value = terminalEmulations[0];

This file is too large to show in full.

views/translations/default-min_pt.handlebars
+1 -1
@@ -453,7 +453,7 @@
453 else if ((passRequirements != null) && (typeof passRequirements.reset == 'number')) {
454 var seconds = (userinfo.passchange) + (passRequirements.reset * 86400) - Math.floor(Date.now() / 1000);
455 if (seconds < 0) { QH('p2nextPasswordUpdateTime', " - Redefinir no próximo login."); }
456 - else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format("- Redefinir em {0} minuto {1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
456 + else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format(" - Redefinir em {0} minuto {1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
457 else if (seconds < 86400) { QH('p2nextPasswordUpdateTime', format(" - Redefinir em {0} hora {1}.", Math.floor(seconds / 3600), addLetterS(Math.floor(seconds / 3600)))); }
458 else { QH('p2nextPasswordUpdateTime', format(" - Redefinir em {0} dia {1}."), Math.floor(seconds / 86400), addLetterS(Math.floor(seconds / 86400))); }
459 }
views/translations/default-mobile-min_fr.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script keeplink=1 src=scripts/filesaver.js></script><title>{{{title}}}</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}.i1{background:url(../images/icons50.png) 0 0;height:50px;width:50px;border:none}.i2{background:url(../images/icons50.png) -50px 0;height:50px;width:50px;border:none}.i3{background:url(../images/icons50.png) -100px 0;height:50px;width:50px;border:none}.i4{background:url(../images/icons50.png) -150px 0;height:50px;width:50px;border:none}.i5{background:url(../images/icons50.png) -200px 0;height:50px;width:50px;border:none}.i6{background:url(../images/icons50.png) -250px 0;height:50px;width:50px;border:none}.m0{background:url(../images/images16.png) -32px 0;height:16px;width:16px;border:none;float:left}.m1{background:url(../images/images16.png) -16px 0;height:16px;width:16px;border:none;float:left}.m2{background:url(../images/images16.png) -96px 0;height:16px;width:16px;border:none;float:left}.m3{background:url(../images/images16.png) -112px 0;height:16px;width:16px;border:none;float:left}.gray{filter:gray;-webkit-filter:grayscale(100%) opacity(60%)}.DevSt{padding-left:5px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#ddd}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:#fff;clear:both}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style="width:calc(100% - 50px);overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><img id=topMenuIcon class=noselect style=position:absolute;right:0;top:10px;bottom:50px;color:#c8c8c8;font-size:44px;margin-right:8px;cursor:pointer;display:none onclick=topMenu() src=/images/3bars-30.png width=30 height=30></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%><div id=column_l style=width:100%;padding:0;position:absolute;bottom:0;top:0><div id=p0 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p0message style=text-align:center;width:100%><span id=p0span>Server disconnected</span>,<href onclick=reload() style=cursor:pointer><u>click to reconnect</u></href>.</div></div></div><div id=p1 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p1message style=text-align:center;width:100%></div></div></div><div id=p2 style=display:none><div id=xdevices></div></div><div id=p3 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large><span id=p3userName></span></strong><br></div></table><div id=p3info style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div style=margin-left:8px><div id=p3AccountActions><p><strong>Account Security</strong><div style=margin-left:9px;margin-bottom:8px><div id=manageAuthApp style=margin-top:5px;display:none><a onclick=account_manageAuthApp() style=cursor:pointer>Manage authenticator app</a></div><div id=manageOtp style=margin-top:5px;display:none><a onclick=account_manageOtp(0) style=cursor:pointer>Manage backup codes</a></div></div><p><strong>Account Actions</strong><div style=margin-left:9px;margin-bottom:8px><div style=margin-top:5px><span id=verifyEmailId style=display:none><a onclick=account_showVerifyEmail() style=cursor:pointer>Vérifier le courriel</a></span></div><div style=margin-top:5px><span id=changeEmailId style=display:none><a onclick=account_showChangeEmail() style=cursor:pointer>Change email address</a></span></div><div style=margin-top:5px><a onclick=account_showChangePassword() style=cursor:pointer>Change password</a><span id=p2nextPasswordUpdateTime></span></div><div style=margin-top:5px><a onclick=account_showDeleteAccount() style=cursor:pointer>Delete account</a></div></div><br style=clear:both></div><strong>Device Groups</strong> <span id=p3createMeshLink1>( <a onclick=account_createMesh() style=cursor:pointer><img src=images/icon-addnew.png width=12 height=12 border=0> Nouveau</a> )</span><br><br><div id=p3meshes></div><div id=p3noMeshFound style=margin-left:9px;display:none>Aucun groupe d'appareils.<span id=p3createMeshLink2> <a onclick=account_createMesh() style=cursor:pointer><strong>Commencez ici!</strong></a></span></div><br style=clear:both></div></div></div><div id=p5 style=display:none><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large>Mes Dossiers</strong><br></div></table><div id=p5myfiles style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><table id=p5toolbar style=width:100%;height:78px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5FolderUp disabled onclick=p5folderup() value=Up> <input type=button style="width:calc(100%/5 - 5px)"id=p5SelectAllButton disabled onclick=p5selectallfile() value=ToutSélectionner onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RenameFileButton disabled value=Renommer onclick=p5renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5DeleteFileButton disabled value=Delete onclick=p5deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5NewFolderButton disabled value=Dossier onclick=p5createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5UploadButton disabled value=Télécharger onclick=p5uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CutButton disabled value=Cut onclick=p5copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CopyButton disabled value=Copy onclick=p5copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5PasteButton disabled value=Coller onclick=p5pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RefreshButton value=Rafraîchir onclick=p5refreshFiles() onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p5currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></table></table><div id=p5filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p5files></span></div><table id=p5toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0;background-color:#d3d9d6 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px>&nbsp;<span id=p5bottomstatus></span><td id=p5rightOfButtons style=text-align:right;padding:3px></table></div></div><div id=p10 style=display:none;position:absolute;bottom:0;top:0;width:100%;overflow:hidden><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0;position:absolute;top:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><a id=MainComputerImage style=cursor:pointer onclick=p10showiconselector()></a><td><div style=margin-left:5px><strong><span id=p10deviceName></span></strong><br><span id=MainComputerState></span></div></table><div id=p10general style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div id=p10html style=margin-left:8px;margin-right:8px></div><div id=p10html2></div><div id=p10html3></div></div><div id=p10desktop style=overflow:hidden;position:absolute;top:55px;bottom:0;width:100%;display:none><div id=deskarea1 style=position:absolute;top:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><span id=p14power></span>&nbsp; <input id=DeskSoftInput style=width:25px;display:none;opacity:.2 onblur=toggleSoftKeys(0) onkeypress="return ondeskkeypress(event)"onkeydown="return ondeskkeydown(event)"onkeyup="return ondeskkeyup(event)"></div><div style=margin-left:3px><input type=button id=connectbutton1 value=Connect onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=connectbutton1h value="Connexion AMT"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=disconnectbutton1 value=Disconnect onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1> <span id=deskstatus>Débranché</span></div></div></div><div id=deskarea3 style="position:absolute;top:25px;width:100%;height:calc(100% - 50px)"><div id=deskarea3x style=background:#000;text-align:center;height:100%;position:relative><div id=DeskParent style=height:100%><canvas id=Desk width=640 height=200 style=width:100%;-ms-touch-action:none;margin-left:0 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid #d3d3d3;display:none"><a id=DeskToolsRefreshButton style=float:right;padding:3px;cursor:pointer onclick=refreshDeskTools()>Rafraîchir</a><div id=DeskToolsBar style="position:absolute;padding:3px;border-radius:3px 3px 0 0;top:5px;left:4px;bottom:26px;background-color:#d3d3d3;cursor:pointer">Processus</div><div style=position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:#d3d3d3;text-align:left><div style="border-bottom:1px solid #a9a9a9;padding:3px"><a style=width:50px;padding-right:5px;float:left;cursor:pointer onclick=sortProcess(0)>PID</a><a style=cursor:pointer onclick=sortProcess(1)>Nom</a></div><div id=DeskToolsProcesses style=overflow-y:scroll;position:absolute;top:24px;bottom:0;width:100%></div></div></div></div></div><div id=deskarea4 style=position:absolute;bottom:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><select id=termdisplays style=display:none onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>&nbsp; <span id=DeskToastButton><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span>&nbsp;</div><div><input id=deskActionsBtn type=button style=margin-left:3px onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction()> <input type=button value=Paramètres onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings()> <input type=button onkeypress=return!1 onkeydown=return!1 value="Power Actions..."onclick=showPowerActionDlg() style=display:none> <input id=DeskSpecialKeys type=button value="Special Keys"onkeypress=return!1 onkeydown=return!1 onclick=sendSpecialKeys()> <input id=DeskSoftKeys type=button value=Clavier onkeypress=return!1 onkeydown=return!1 onclick=toggleSoftKeys(1)> <label><span id=DeskControlSpan style=display:none><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1>Input</span></label></div></div></div></div><div id=p10files style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%;display:none><table id=p13toolbar style=width:100%;height:111px cellpadding=0 cellspacing=0><tr><td style="background-color:silver;border-bottom:2px solid #000;padding:2px"><div style=float:right;text-align:right><input id=filesActionsBtn type=button onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction() style=margin-right:2px></div><div style=margin-left:2px><input id=p13AutoConnect value=AutoConnect onclick=autoConnectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button style=display:none> <input id=p13Connect value=Connect onclick=connectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button> <span id=p13Status>Débranché</span></div><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13FolderUp disabled onclick=p13folderup() value=Up> <input type=button style="width:calc(100%/5 - 5px)"id=p13SelectAllButton disabled onclick=p13selectallfile() value=ToutSélectionner onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RenameFileButton disabled value=Renommer onclick=p13renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13DeleteFileButton disabled value=Delete onclick=p13deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13NewFolderButton disabled value=Dossier onclick=p13createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13UploadButton disabled value=Télécharger onclick=p13uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CutButton disabled value=Cut onclick=p13copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CopyButton disabled value=Copy onclick=p13copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13PasteButton disabled value=Coller onclick=p13pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RefreshButton disabled value=Rafraîchir onclick=p13folderup(9999) onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p13currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></table></table><div id=p13filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p13files></span></div><table id=p13toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#d3d9d6>&nbsp;<span id=p13bottomstatus></span></table></div></div><div id=p20 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td onclick=p20editmesh(1)><img src=/images/meshicon50.png width=50 height=50><td onclick=p20editmesh(1)><div style=margin-left:5px><strong style=font-size:large><span id=p20meshName></span></strong><br></div></table><div id=p20info style=margin-left:8px;margin-right:8px></div></div></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table id=footerMenu cellpadding=0 cellspacing=0 style=height:32px;width:100%;color:#fff;cursor:pointer;table-layout:fixed></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:90px;width:300px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div><div id=dialog3 style=margin:auto;margin:3px><select id=deskkeys style=width:100%><option value=10>Ctrl+Alt+Del<option value=11>Tab<option value=5>Win<option value=0>Win+Down<option value=1>Win+Up<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab</select></div><div id=dialog7 style=margin:auto;margin:3px><div id=d7meshkvm><h4 style="width:100%;border-bottom:1px solid gray">Agent Remote Desktop</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir=rtl></select><div style=height:20px>Qualité</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Mise à l'échelle</div></div><div style="margin:3px 0 3px 0"><select id=d7framelimiter style=float:right;width:200px;height:20px dir=rtl><option selected value=50>Vite<option value=100>Moyen<option value=400>Lent<option value=1000>Très lent</select><div style=height:20px>Rate</div></div></div><div id=d7amtkvm><h4 style="width:100%;border-bottom:1px solid gray">Intel® AMT Hardware KVM</h4><div style=height:26px><select id=d7desktopmode style=float:right;width:200px><option value=1>RLE8, le plus rapide<option value=2>RLE16, recommandé<option value=3>RAW8, lent<option value=4>RAW16, très lent</select><div>Encoding</div></div><div style=height:60px><div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:#fff"><label><input type=checkbox id=d7showfocus>Show Focus Tool</label><br><label><input type=checkbox id=d7showcursor>Show Local Mouse Cursor</label><br></div><div>Autre</div></div></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Annuler style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK style=float:right;width:80px onclick=dialogclose(1)></div></div><div id=topMenu style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:0 0 5px 5px;position:fixed;top:50px;right:5px;width:170px;display:none"><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(2)>Mes Dossiers</div><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(1)>Mon Compte</div><div id=logoutMenuOption><a href=/logout><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer">Déconnexion</div></a></div></div><iframe name=fileUploadFrame style=display:none></iframe><script>"use strict";var webState="{{{webstate}}}";for(var i in""!=webState&&(webState=JSON.parse(decodeURIComponent(webState))),webState)localStorage.setItem(i,webState[i]);webState.loctag||localStorage.removeItem("loctag");var files,args=parseUriArgs(),debugLevel=parseInt("{{{debuglevel}}}"),features=parseInt("{{{features}}}"),sessionTime=parseInt("{{{sessiontime}}}"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",authCookie="{{{authCookie}}}",authRelayCookie="{{{authRelayCookie}}}",authCookieRenewTimer=null,meshserver=null,xdr=null,serverinfo=null,nodes=[],meshes={},filetree={},userinfo=null,users=(serverinfo=null,null),nodeShortIdent=0,serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}",debugmode=!1,attemptWebRTC=0!=(128&features),StatusStrs=["Débranché","Connecting...","Traitement...","Connected","Intel&reg; AMT Connected"],passRequirements="{{{passRequirements}}}";""!=passRequirements&&(passRequirements=JSON.parse(decodeURIComponent(passRequirements)));var sessionActivity=Date.now();function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(!args.locale){var t=getstore("loctag",0);null!=t&&"*"!=t&&(args.locale=t)}(window.onresize=center)(),QV("changeEmailId",0==(2097152&features)),QH("p1message","Connecting..."),go(1),(meshserver=MeshServerCreateControl(domainUrl,authCookie)).onStateChanged=onStateChanged,meshserver.onMessage=onMessage,meshserver.Start();var o=localStorage.getItem("desktopsettings");null!=o&&(desktopsettings=JSON.parse(o)),applyDesktopSettings()}function onStateChanged(e,t,o,n){if(0==t){if(setDialogMode(0),go(0),"noauth"==n)return void QH("p0span","Unable to perform authentication");2==o?setTimeout(serverPoll,5e3):QH("p0span","Unable to connect web socket"),null!=authCookieRenewTimer&&(clearInterval(authCookieRenewTimer),authCookieRenewTimer=null)}else 2==t&&(meshserver.send({action:"meshes"}),meshserver.send({action:"nodes"}),meshserver.send({action:"files"}),xxcurrentView<2&&go(2),authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},18e5));QV("topMenuIcon",2==t)}function serverPoll(){xdr=null;try{xdr=new XDomainRequest}catch(e){}(xdr=xdr||new XMLHttpRequest).open("HEAD",window.location.href),xdr.timeout=15e3,xdr.onload=function(){reload()},xdr.onerror=xdr.ontimeout=function(){setTimeout(serverPoll,1e4)},xdr.send()}function updateSelf(){if(QV("verifyEmailId",!0!==userinfo.emailVerified&&null!=userinfo.email&&1==serverinfo.emailcheck),QV("manageAuthApp",4096&features),QV("manageOtp",0!=(4096&features)&&(1==userinfo.otpsecret||0<userinfo.otphkeys)),QV("p3createMeshLink1",!1),QV("p3createMeshLink2",!1),"number"==typeof userinfo.passchange)if(-1==userinfo.passchange)QH("p2nextPasswordUpdateTime"," - Réinitialiser à la prochaine connexion.");else if(null!=passRequirements&&"number"==typeof passRequirements.reset){var e=userinfo.passchange+86400*passRequirements.reset-Math.floor(Date.now()/1e3);e<0?QH("p2nextPasswordUpdateTime"," - Réinitialiser à la prochaine connexion."):e<3600?QH("p2nextPasswordUpdateTime",format("- Réinitialisation en {0} minute {1}.",Math.floor(e/60),addLetterS(Math.floor(e/60)))):e<86400?QH("p2nextPasswordUpdateTime",format(" - Réinitialisation dans {0} heure {1}.",Math.floor(e/3600),addLetterS(Math.floor(e/3600)))):QH("p2nextPasswordUpdateTime",format(" - Réinitialiser dans le {0} jour {1}."),Math.floor(e/86400),addLetterS(Math.floor(e/86400)))}}function addLetterS(e){return 1<e?"s":""}function setSessionActivity(){sessionActivity=Date.now()}function checkIdleSessionTimeout(){Date.now()-sessionActivity>serverinfo.timeout&&(window.location.href="logout")}function onMessage(e,t){switch(t.action){case"serverinfo":(serverinfo=t.serverinfo).timeout&&(setInterval(checkIdleSessionTimeout,1e4),checkIdleSessionTimeout()),QV("p3AccountActions",0==(4&features)&&0==serverinfo.domainauth),QV("logoutMenuOption",0==(4&features)&&0==serverinfo.domainauth);break;case"authcookie":authCookie=t.cookie,authRelayCookie=t.rcookie;break;case"userinfo":userinfo=t.userinfo,QH("p3userName",userinfo.name),updateSelf();break;case"users":for(var o in users={},t.users)users[t.users[o]._id]=t.users[o];updateUsers();break;case"wssessioncount":wssessions=t.wssessions,updateUsers();break;case"meshes":for(var o in meshes={},t.meshes)meshes[t.meshes[o]._id]=t.meshes[o];updateMeshes(),updateDevices();break;case"files":filetree=setupBackPointers(t.filetree),updateFiles();break;case"nodes":for(var o in nodes=[],t.nodes)for(var n in t.nodes[o])meshes[o]?(t.nodes[o][n].namel=t.nodes[o][n].name.toLowerCase(),t.nodes[o][n].rname?t.nodes[o][n].rnamel=t.nodes[o][n].rname.toLowerCase():t.nodes[o][n].rnamel=t.nodes[o][n].namel,t.nodes[o][n].meshnamel=meshes[o].name.toLowerCase(),t.nodes[o][n].meshid=o,t.nodes[o][n].state=t.nodes[o][n].state?t.nodes[o][n].state:0,t.nodes[o][n].desc=t.nodes[o][n].desc,t.nodes[o][n].icon||(t.nodes[o][n].icon=1),t.nodes[o][n].ident=++nodeShortIdent,nodes.push(t.nodes[o][n])):console.log("Invalid mesh (1): "+o);updateDevices(),0==xxcurrentView&&go(parseInt("{{viewmode}}")),gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"));break;case"powertimeline":if(t.nodeid!=powerTimelineReq)break;powerTimelineNode=t.nodeid,powerTimeline=t.timeline,powerTimelineUpdate=Date.now()+3e5,currentNode._id==t.nodeid&&drawDeviceTimeline();break;case"otpauth-request":if(2==xxdialogMode&&"otpauth-request"==xxdialogTag){var i=t.secret;52==i.length?i=i.split(/(.............)/).filter(Boolean).join(" "):32==i.length&&(i=(i=i.split(/(....)/).filter(Boolean).join(" ")).substring(0,20)+"<br/>"+i.substring(20)),QH("d2optinfo",'Install <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank>Google Authenticator</a> or a compatible application, use <a href="\' + message.url + \'" rel="noreferrer noopener" target=_blank> this link</a> or enter the secret below. Then, enter the current 6 digit token to activate 2-Step login.<br /><br /><div style=width:100%;text-align:center><tt id=d2optsecret secret="'+t.secret+'" style=font-size:15px>'+i+'</tt><br /><br />Token: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></div>'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"Authenticator App",1,null,t.success?"<b style=color:green>2-step login activation successful</b>. You will now need a valid token to login again.":"<b style=color:red>2-step login activation failed</b>. Clear the secret from the application and try again. You only have a few minutes to enter the proper code.");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"Authenticator App",1,null,t.success?"<b style=color:green>2-step login activation removed</b>. You can reactivate this feature at any time.":"<b style=color:red>2-step login activation removal failed</b>. Try again.");break;case"otpauth-getpasswords":if(xxdialogMode)return;var a="One time tokens can be used as secondary authentication. Generate a set, print them and keep them in a safe place.";if(a+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(a+="<tr>");for(var r=""+t.passwords[l].p;r.length<8;)r="0"+r;!0===t.passwords[l].u?a+="<td>"+r.substring(0,4)+"&nbsp;"+r.substring(4):a+="<td><strike style=color:#BBB>"+r.substring(0,4)+"&nbsp;"+r.substring(4)}}else a+="<tr><td>No Active Tokens";a+="</table></div></div><br />",a+="<div><input type=button value='Close' onclick=setDialogMode(0) style=float:right></input>",a+="<input type=button value='Nouveaux Jetons' onclick='account_manageOtp(1);'></input>",null!=t.passwords&&(a+="<input type=button value='Clear' onclick='account_manageOtp(2);'></input>"),setDialogMode(2,"Manage Backup Codes",8,null,a+="</div><br />","otpauth-manage");break;case"event":if(t.event.noact)break;switch(t.event.action){case"userWebState":if(null!=localStorage){var d=JSON.parse(t.event.state);for(var l in d)localStorage.setItem(l,d[l]);null!=d.loctag&&d.loctag!=oldLoctag&&(null!=d.loctag?args.locale=d.loctag:delete args.locale,updateDevices(),updateMeshes())}break;case"accountchange":if(userinfo.name==t.event.account.name){var p=t.event.account.siteadmin?t.event.account.siteadmin:0,c=userinfo.siteadmin?userinfo.siteadmin:0;(t.event.account.quota!=userinfo.quota||0==(8&userinfo.siteadmin)&&0!=(8&t.event.account.siteadmin))&&meshserver.send({action:"files"}),userinfo=t.event.account,c!=p&&updateSiteAdmin(),updateSelf()}break;case"createmesh":null!=t.event.links[userinfo._id]&&(meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},updateMeshes(),updateDevices(),meshserver.send({action:"files"}));break;case"meshchange":if(null==meshes[t.event.meshid])meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},meshserver.send({action:"nodes"});else{if(meshes[t.event.meshid].name!=t.event.name)for(var l in meshes[t.event.meshid].name=t.event.name,nodes)nodes[l].meshid==t.event.meshid&&(nodes[l].meshnamel=t.event.name.toLowerCase());if(meshes[t.event.meshid].desc=t.event.desc,meshes[t.event.meshid].links=t.event.links,null==meshes[t.event.meshid].links[userinfo._id]){20==xxcurrentView&&currentMesh==meshes[t.event.meshid]&&go(2),delete meshes[t.event.meshid];var u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2))}}updateMeshes(),updateDevices(),meshserver.send({action:"files"}),20==xxcurrentView&&currentMesh._id==t.event.meshid&&p20updateMesh();break;case"deletemesh":meshes[t.event.meshid]&&(delete meshes[t.event.meshid],updateMeshes(),meshserver.send({action:"files"}));u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,updateDevices(),20<=xxcurrentView&&xxcurrentView<30&&currentMesh._id==t.event.meshid&&(setDialogMode(0),go(2)),10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2));break;case"addnode":var m=t.event.node;if(!meshes[m.meshid])break;if(null!=getNodeFromId(m._id))break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices();break;case"removenode":var h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1),updateDevices()}break;case"changenode":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).name=t.event.node.name,m.rname=t.event.node.rname,m.host=t.event.node.host,m.desc=t.event.node.desc,m.publicip=t.event.node.publicip,m.iploc=t.event.node.iploc,m.wifiloc=t.event.node.wifiloc,m.gpsloc=t.event.node.gpsloc,m.tags=t.event.node.tags,m.userloc=t.event.node.userloc,null!=t.event.node.agent&&(null==m.agent&&(m.agent={}),null!=t.event.node.agent.ver&&(m.agent.ver=t.event.node.agent.ver),null!=t.event.node.agent.id&&(m.agent.id=t.event.node.agent.id),null!=t.event.node.agent.caps&&(m.agent.caps=t.event.node.agent.caps),null!=t.event.node.agent.core?m.agent.core=t.event.node.agent.core:m.agent.core&&delete m.agent.core,m.agent.tag=t.event.node.agent.tag),null!=t.event.node.intelamt&&(null==m.intelamt&&(m.intelamt={}),null!=t.event.node.intelamt.state&&(m.intelamt.state=t.event.node.intelamt.state),null!=t.event.node.intelamt.host&&(m.intelamt.user=t.event.node.intelamt.host),null!=t.event.node.intelamt.user&&(m.intelamt.user=t.event.node.intelamt.user),null!=t.event.node.intelamt.tls&&(m.intelamt.tls=t.event.node.intelamt.tls),null!=t.event.node.intelamt.ver&&(m.intelamt.ver=t.event.node.intelamt.ver),null!=t.event.node.intelamt.tag&&(m.intelamt.tag=t.event.node.intelamt.tag),null!=t.event.node.intelamt.uuid&&(m.intelamt.uuid=t.event.node.intelamt.uuid),null!=t.event.node.intelamt.realm&&(m.intelamt.realm=t.event.node.intelamt.realm)),m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,t.event.node.icon&&(m.icon=t.event.node.icon),refreshDevice(m._id),updateDevices();break;case"nodemeshchange":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1)):(m.meshid=t.event.newMeshId,m.meshnamel=meshes[t.event.newMeshId].name.toLowerCase()),updateDevices(),refreshDevice(t.event.nodeid)}else{m=t.event.node;if(!meshes[m.meshid])break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices()}break;case"nodeconnect":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).conn=t.event.conn,m.pwr=t.event.pwr,updateDevices();break;case"login":null!=users&&users["user/"+domain+"/"+t.event.username.toLowerCase()]&&(users["user/"+domain+"/"+t.event.username.toLowerCase()].login=t.event.time)}}}function topMenu(e){null!=xxdialogMode&&0!=xxdialogMode&&999!=xxdialogMode||(void 0===e?1==("none"==QS("topMenu").display)?0!=xxdialogMode&&null!=xxdialogMode||(QV("topMenu",!0),xxdialogMode=999):(QV("topMenu",!1),xxdialogMode=0):(QV("topMenu",!1),xxdialogMode=0,1==e&&3!=xxcurrentView&&goForward("account"),2==e&&5!=xxcurrentView&&goForward("files")))}var filetreelinkpath,backStack=[];function goBack(){xxdialogMode||(0<backStack.length&&backStack.pop(),goStack())}function goForward(e){xxdialogMode||(backStack.push(e),goStack())}function goStack(){if(0!=backStack.length){var e=backStack[backStack.length-1],t=e.split("/")[0];"node"==t&&(setupDeviceMenu(0),gotoDevice(e)),"mesh"==t&&gotoMesh(e),"account"==t&&go(3),"devices"==t&&go(2),"files"==t&&go(5)}else go(2)}function updateFooterMenu(e){for(;null!=e&&e.length<3;)e.push({n:""});var t="",o="";if(null!=e)for(var n in e)t+='<td style="cursor:pointer'+(""==o?"":";border-left:solid 1px white")+'" onclick="'+e[n].f+'">'+e[n].n,o=e[n].n;QH("footerMenu","<tr>"+t)}function account_manageAuthApp(){xxdialogMode||0==(4096&features)||(1==userinfo.otpsecret?account_removeOtp():account_addOtp())}function account_addOtp(){xxdialogMode||1==userinfo.otpsecret||0==(4096&features)||(setDialogMode(2,"Authenticator App",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>Chargement...</div>","otpauth-request"),meshserver.send({action:"otpauth-request"}))}function account_addOtpCheck(e){var t=6==Q("d2otpauthinput").value.length;QE("idx_dlgOkButton",t),e&&13==e.keyCode&&t&&dialogclose(1)}function account_removeOtp(){xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||setDialogMode(2,"Authenticator App",3,function(){meshserver.send({action:"otpauth-clear"})},"Confirm removal of authenticator application 2-step login?")}function account_manageOtp(e){2==xxdialogMode&&"otpauth-manage"==xxdialogTag&&dialogclose(0),xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||meshserver.send({action:"otpauth-getpasswords",subaction:e})}function account_showVerifyEmail(){xxdialogMode||1==userinfo.emailVerified||1!=serverinfo.emailcheck||setDialogMode(2,"Email Verification",3,account_showVerifyEmailEx,"Click ok to send a verification mail to:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>Please wait a few minute to receive the verification.")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"Email Address Change",3,account_changeEmail,addHtmlValue("Email","<input id=dp3email style=width:170px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />")),null!=userinfo.email&&(Q("dp3email").value=userinfo.email),account_validateEmail(),Q("dp3email").focus())}function account_validateEmail(e,t){QE("idx_dlgOkButton",validateEmail(Q("dp3email").value)&&Q("dp3email").value!=userinfo.email),null!=e&&13==e.keyCode&&dialogclose(1)}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp3email").value})}function account_showDeleteAccount(){if(!xxdialogMode){var e="<form method=post><table style=margin-left:10px><input type=hidden name=action value=deleteaccount /><input type=hidden name=authcookie value="+authCookie+" /><tr>";e+="<td align=right>Mot de passe:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr><tr><td align=right>Mot de passe:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr></table><div style=padding:10px;margin-bottom:4px>",e+='<input id=account_dlgCancelButton type=button value="Annuler" style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>',e+='<input id=account_dlgOkButton type=submit value="OK" style="float:right;width:80px" onclick=dialogclose(1)>',setDialogMode(2,"Delete Account",0,null,e+="</div><br /></form>"),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="<table style=margin-left:10px>";if(e+="<tr><td align=right>"+nobreak("Ancien mot de passe:")+"</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nouveau mot de passe:")+"</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nouveau mot de passe:")+"</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>",65536&features&&(e+="<tr><td align=right>Password hint:</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"),e+="</table>",passRequirements){var t=[],o=0;for(var n in passRequirements)"reset"!=n&&"hint"!=n&&(t.push(n+":"+passRequirements[n]),o++);0<o&&(e+="<br /><span style=font-size:x-small>"+format("Exigences: {0}.",t.join(", "))+"</span>")}return setDialogMode(2,"Change Password",3,account_showChangePasswordEx,e+="<br />"),Q("apassword0").focus(),account_validateNewPassword(),!1}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var e={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};65536&features&&(e.hint=Q("apasswordhint").value),meshserver.send(e)}}function account_createMesh(){if(!xxdialogMode)if(4294967295==userinfo.siteadmin||0==(64&userinfo.siteadmin))if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var e=addHtmlValue("Nom","<input id=dp3meshname style=width:170px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");e+=addHtmlValue("Type","<div style=width:170px;margin:0;padding:0><select id=dp3meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>Groupe d'agents logiciels</option><option value=1>Intel&reg; AMT only</option></select></div>"),setDialogMode(2,"Create Device Group",3,account_createMeshEx,e+=addHtmlValue("Description","<div style=width:170px;margin:0;padding:0><textarea id=dp3meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"Account Security",1,null,'Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the "My Account" and look at the "Account Security" section.');else setDialogMode(2,"Account Security",1,null,'Unable to access a device until a email address is verified. This is required for password recovery. Go to the "My Account" to change and verify an email address.');else setDialogMode(2,"Nouveau Group",1,null,"This account does not have the rights to create a new device group.")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0<Q("dp3meshname").value.length)}function account_createMeshEx(e,t){meshserver.send({action:"createmesh",meshname:Q("dp3meshname").value,meshtype:Q("dp3meshtype").value,desc:Q("dp3meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value)}function account_validateNewPassword(){var e="",t=0<Q("apassword0").value.length&&0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value&&Q("apassword0").value!=Q("apassword1").value;if(65536&features&&Q("apasswordhint").value==Q("apassword1").value&&(t=!1),""!=Q("apassword1").value)if(null==passRequirements||""==passRequirements){var o=checkPasswordStrength(Q("apassword1").value);e=80<=o?"<span style=color:green>Strong<span>":60<=o?"<span style=color:blue>&#9679;<span>":"<span style=color:red>&#9679;<span>"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="<span style=color:red>Politique<span>")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,o={},n=0,i={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var a=0;a<e.length;a++)o[e[a]]=(o[e[a]]||0)+1,t+=5/o[e[a]];for(var s in i)n+=1==i[s]?1:0;return parseInt(t+10*(n-1))}function checkPasswordRequirements(e,t){if(null==t||""==t||"object"!=typeof t)return!0;if(t.min&&e.length<t.min)return!1;if(t.max&&e.length>t.max)return!1;for(var o=0,n=0,i=0,a=0,s=0;s<e.length;s++)/\d/.test(e[s])&&o++,/[a-z]/.test(e[s])&&n++,/[A-Z]/.test(e[s])&&i++,/\W/.test(e[s])&&a++;return!(t.num&&o<t.num)&&(!(t.lower&&n<t.lower)&&(!(t.upper&&i<t.upper)&&!(t.nonalpha&&a<t.nonalpha)))}function updateMeshes(){var e="",t=0;for(i in meshes){t++;var o=meshes[i].links[userinfo._id].rights,n="Partial Rights";4294967295==o?n="Administrateur Complet":0==o&&(n="No Rights"),e+="<div style=cursor:pointer onclick=goForward('"+i+"')>",e+='<div style="float:left;margin-left:4px"><img src="/images/meshicon50.png" width=50 height=50 /></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+EscapeHtml(meshes[i].name)+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+n+"</div></div>",e+="</div></div>"}QH("p3meshes",e),QV("p3noMeshFound",0==t)}function gotoMesh(e){null==(currentMesh=meshes[e])&&goBack(),p20updateMesh(),go(20)}var sortorder,filetreelocation=[];function p5refreshFiles(){meshserver.send({action:"files"})}function updateFiles(){if(QV("MainMenuMyFiles",0==(8&features)),0==(8&features)){for(var e,t="",o="",n="<a style=cursor:pointer onclick=p5folderup(0)>Racine</a>",i="Root",a=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),c=0;c<p.length;c++)p[c].checked&&d.push(p[c].value);for(var c in filetreelinkpath="",filetreelocation){if(null==a.f||null==a.f[filetreelocation[c]])break;if(l.push(filetreelocation[c]),i+=" / "+filetreelocation[c],1==s){var u=filetreelocation[c].split("/");e=window.location+u[0]+"files/"+u[2],filetreelinkpath+=filetreelocation[c]}else""!=filetreelinkpath&&(filetreelinkpath+="/"+filetreelocation[c],2<s&&(e+="/"+filetreelocation[c]));n+=" / <a style=cursor:pointer onclick=p5folderup("+s+")>"+(null!=(a=a.f[filetreelocation[c]]).n?a.n:filetreelocation[c])+"</a>",s++}filetreelocation=l;var m=i.toLowerCase().startsWith("root / "+userinfo._id+" / public"),h=p5sort_files(a.f);for(var c in h){var f,g=h[c],v=g.n;f=40<(f=v).length?EscapeHtml(v.substring(0,40))+"...":EscapeHtml(v),v=EscapeHtml(v);var k="";null!=g.s&&(k=getFileSizeStr(g.s));var y="";if(g.t<3||4==g.t){y="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+v+"'>&nbsp;<span style=float:right;padding-right:4px>"+(1==g.t||4==g.t?p5getQuotabar(g):"")+"</span><span><div class=fileIcon"+g.t+'></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(g.nx)+'")>'+f+"</a></span></div>"}else{var x=f,b="";m&&(b=" (<a style=cursor:pointer onclick='p5showPublicLink(\""+e+"/"+g.nx+"\")'>Lien</a>)"),0<g.s&&(x='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+g.nx)+'">'+f+"</a>"+b),y="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+g.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+k+"</span><span><div class=fileIcon"+g.t+"></div>"+x+"</span></div>"}g.t<3?t+=y:o+=y}if(QH("p5rightOfButtons",p5getQuotabar(a)),QH("p5files",t+o),QH("p5currentpath",n),QE("p5FolderUp",0!=filetreelocation.length),QV("p5PublicShare",m),r==filetreelinkpath){p=document.getElementsByName("fc");for(c=0;c<p.length;c++)p[c].checked=0<=d.indexOf(p[c].value)}p5setActions()}}function getNiceSize(e){return e<=0?"Stockage dépassent":e<2048?format("{0}b left",e):e<2097152?format("{0}k left",Math.round(e/1024)):e<2147483648?format("{0}m left",Math.round(e/1024/1024)):format("{0}g left",Math.round(e/1024/1024/1024))}function p5getQuotabar(e){for(;1<e.t&&4!=e.t;)e=e.parent;return 1!=e.t&&4!=e.t||null==e.maxbytes?"":getNiceSize(e.maxbytes-e.s)+" <progress style=height:10px;width:100px value="+e.s+" max="+e.maxbytes+" />"}function p5showPublicLink(e){setDialogMode(2,"Lien public",1,null,'<input type=text style=width:100% value="'+e+'" readonly />')}function p5sort_filename(e,t){return e.ln>t.ln?1*sortorder:e.ln<t.ln?-1*sortorder:0}function p5sort_timestamp(e,t){return e.d>t.d?1*sortorder:e.d<t.d?-1*sortorder:0}function p5sort_bysize(e,t){return e.s==t.s?p5sort_filename(e,t):(e.s-t.s)*sortorder}function p5sort_files(e){var t=[],o=Q("p5sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return sortorder=1,3<o&&(sortorder=-1,o-=3),1==o?t.sort(p5sort_filename):2==o?t.sort(p5sort_bysize):3==o&&t.sort(p5sort_timestamp),t}function p5setActions(){var e=getFileSelCount(),t=getFileCount(),o=getFileSelCount(!1);QE("p5DeleteFileButton",0<e&&0<filetreelocation.length),QE("p5NewFolderButton",0<filetreelocation.length),QE("p5UploadButton",0<filetreelocation.length),QE("p5RenameFileButton",1==e&&0<filetreelocation.length),QE("p5SelectAllButton",0<t),Q("p5SelectAllButton").value=0<e?"Aucun":"Tout",QE("p5CutButton",0<o&&e==o),QE("p5CopyButton",0<o&&e==o),QE("p5PasteButton",null!=p5clipboard&&0<p5clipboard.length&&0<filetreelocation.length)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function getFileCount(){return document.getElementsByName("fc").length}function p5selectallfile(){for(var e=0==getFileSelCount(),t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked=e;p5setActions()}function setupBackPointers(e){if(null!=e.f){var t=0,o=0;for(var n in e.f)setupBackPointers(e.f[n]),(e.f[n].parent=e).f[n].s&&(t+=e.f[n].s),e.f[n].c&&(o+=e.f[n].c),3==e.f[n].t&&o++;e.s=t,e.c=o}return e}function getFileSizeStr(e){return 1==e?"1 octet":format("{0} octets",e)}function p5folderup(e){if(null==e)filetreelocation.pop();else for(;filetreelocation.length>e;)filetreelocation.pop();return updateFiles(),!1}function p5folderset(e){return filetreelocation.push(decodeURIComponent(e)),updateFiles(),!1}function p5createfolder(){setDialogMode(2,"Nouveau Dossier",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />"),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var e=getFileSelCount(),t=0<getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p5recdeleteinput>Suppression récursive</label><br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p5deletefileEx,1<e?format("Delete {0} selected items?",e)+t:"Delete selected item?"+t)}function p5deletefileEx(){for(var e=[],t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&e.push(t[o].value);meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:e,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){for(var e,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&(e=t[o].value);setDialogMode(2,"Renommer",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:e}),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5renamefileEx(e,t){t.newname=Q("p5renameinput").value,meshserver.send(t)}function p5fileNameCheck(e){var t=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",t),1==t&&e&&13==e.keyCode&&dialogclose(1)}var isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function p5uploadFile(){setDialogMode(2,"Upload File",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=hidden name=authCookie value='+authCookie+" /><input type=submit id=p5loginSubmit style=display:none /></form>"),updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(e){var t=document.getElementsByName("fc");p5clipboard=[],p5clipboardCut=e,p5clipboardFolder=Clone(filetreelocation);for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p5clipboard.push(t[o].value);p5updateClipview()}function p5pasteFile(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Confim {0} of {1} entrie{2} to this location?",0==p5clipboardCut?"copy":"move",p5clipboard.length,1<p5clipboard.length?"s":"")),setDialogMode(2,"Coller",3,p5pasteFileEx,e)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:0==p5clipboardCut?"copy":"move",scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard}),p5folderup(999),1==p5clipboardCut&&(p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview())}function p5updateClipview(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Holding {0} entrie{1} for {2}",p5clipboard.length,1<p5clipboard.length?"s":"",0==p5clipboardCut?"copy":"move")+', <a href=# onclick="return p5clearClip()" style=cursor:pointer>Clear</a>.'),QH("p5bottomstatus",e),p5setActions()}function p5clearClip(){return p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview(),!1}function p5fileDragDrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer&&0!=e.dataTransfer.files.length&&0!=filetreelocation.length)for(var t=[],o=[],n=[],i=[],a=e.dataTransfer.files.length,s=0;s<e.dataTransfer.files.length;s++){var l=new FileReader,r=e.dataTransfer.files[s];t.push(r.name),o.push(r.size),n.push(r.type),l.onload=function(e){i.push(e.target.result),0==--a&&(Q("p5fileDragName").value=t.join("*"),Q("p5fileDragSize").value=o.join("*"),Q("p5fileDragType").value=n.join("*"),Q("p5fileDragData").value=i.join("*"),Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath),Q("p5loginSubmit2").click())},l.readAsDataURL(r)}}var p5dragtimer=null;function p5fileDragOver(e){haltEvent(e),null!=p5dragtimer&&(clearTimeout(p5dragtimer),p5dragtimer=null);var t=!0;0==filetreelocation.length&&(t=!1),QV("bigok",t),QV("bigfail",!t)}function p5fileDragLeave(e){haltEvent(e),"p5filetable"!=e.target.id?(QV("bigfail",!1),QV("bigok",!1)):p5dragtimer=setTimeout("QV('bigfail',false);QV('bigok',false);p5dragtimer=null;",200)}function ondeskkeypress(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeys(e)}}function ondeskkeydown(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyDown(e)}}function ondeskkeyup(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyUp(e)}}var updateDevicesTimer=null;function updateDevices(){null==updateDevicesTimer&&(updateDevicesTimer=setTimeout(updateDevicesEx,200))}var deviceHeaderCount,sort=0,deviceHeaderId=0,deviceHeaders={},showRealNames=!1,deviceHeaderTotal=0,deviceHeadersTitles=(deviceHeaders={},{});function updateDevicesEx(){null!=updateDevicesTimer&&(clearTimeout(updateDevicesTimer),updateDevicesTimer=null);var e="",t=0,o=null,n=0,i={};for(var a in deviceHeaderCount={},deviceHeaders={},deviceHeadersTitles={},(deviceHeaderTotal=deviceHeaderId=0)==sort?nodes.sort(meshSort):1==sort?nodes.sort(powerSort):2==sort&&(1==showRealNames?nodes.sort(deviceHostSort):nodes.sort(deviceSort)),nodes)if(0!=nodes[a].v){var s=meshes[nodes[a].meshid].links[userinfo._id];if(null!=s){s.rights;if(0==sort){if(nodes.sort(meshSort),nodes[a].meshid!=o){deviceHeaderSet();var l="";1==meshes[nodes[a].meshid].mtype&&(l="<span style=color:lightgray>, Intel&reg; AMT only</span>"),null!=o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=padding-top:4px><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+nodes[a].meshid+'")>'+EscapeHtml(meshes[nodes[a].meshid].name)+"</span>"+l+"<span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",i[o=nodes[a].meshid]=1,t=0}}else 1==sort?nodes[a].pwr!==o&&(deviceHeaderSet(),null!==o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[a].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",o=nodes[a].pwr,t=0):2==sort&&null==o&&(o="1");n++;var r=EscapeHtml(nodes[a].name);0==r.length&&(r="<i>Aucun</i>"),null!=nodes[a].rname&&0<nodes[a].rname.length&&(r+=" / "+EscapeHtml(nodes[a].rname));var d=EscapeHtml(nodes[a].name);1==showRealNames&&null!=nodes[a].rname&&(d=EscapeHtml(nodes[a].rname)),0==d.length&&(d="<i>Aucun</i>");var p=nodes[a].icon,c=NodeStateStr(nodes[a]);nodes[a].conn&&0!=nodes[a].conn||(p+=" gray"),e+="<div style=cursor:pointer onclick=goForward('"+nodes[a]._id+"')>",e+='<div class="i'+p+'" style="float:left;margin-left:4px"></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+d+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+c+"</div></div>",e+="</div></div>",deviceHeaderTotal++,void 0===deviceHeaderCount[nodes[a].state]?deviceHeaderCount[nodes[a].state]=1:deviceHeaderCount[nodes[a].state]++}}if(0==sort)for(var a in meshes){var u=meshes[a],m=u.links[userinfo._id];if(null!=m){m.rights;null==i[u._id]&&(""!=o&&""!=e&&(e+="</tr></table>"),e+="<div><div colspan=3 class=DevSt><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+u._id+'")>'+EscapeHtml(u.name)+"</span></div>",1==u.mtype&&(e+="<div style=padding:10px><i>No Intel&reg; AMT devices in this group"),2==u.mtype&&(e+="<div style=padding:10px><i>Aucun appareil dans ce groupe"),e+=".</i></div></div>",o=u._id,n++)}}for(var a in 0==n?QH("xdevices",'<div style="margin-top:50px;text-align:center"><span style="font-size:30px">Aucun appareil</span><br /><br />Utilisez la version complète de ce site pour ajouter des appareils.</div>'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(a,deviceHeaders[a]);for(var a in deviceHeadersTitles)Q(a).title=deviceHeadersTitles[a]}var powerStatetable=["","Alimenté","Endormir","Endormir","Endormir","Hibernation","Éteindre","Présent"],powerStateStrings=["","Alimenté","Dormir","Dormir","Deep Sleep","Hibernation","Soft-Off","Présent"],powerStateStrings2=["","Device is powered","Device is in sleep state (S1)","Device is in sleep state (S2)","Device is in deep sleep state (S3)","Device is hibernating (S4)","Device is in soft-off state (S5)","Device is present, but power state cannot be determined"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0<e.state&&e.state<powerStatetable.length&&state.push(powerStatetable[e.state]),e.conn&&(0!=(1&e.conn)&&t.push("<span>Agent</span>"),0!=(2&e.conn)?t.push("<span>CIRA</span>"):0!=(4&e.conn)&&t.push("<span>Intel&reg; AMT</span>"),0!=(8&e.conn)&&t.push("<span>Relay</span>"),0!=(16&e.conn)&&t.push("<span>MQTT</span>")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return e<powerStatetable.length?powerStatetable[e]:""}function PowerStateStr2(e){return 0!=e&&e<powerStatetable.length?powerStatetable[e]:"Inconnue"}function onSortSelectChange(e){sort=document.getElementById("sortselect").selectedIndex,e||putstore("sort",sort),updateDevicesEx()}function deviceHeaderSet(){if(0!=deviceHeaderId){deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+(1==deviceHeaderTotal?" nœud":" noeuds");var e="";for(var t in deviceHeaderCount)0<e.length&&(e+=", "),e+=deviceHeaderCount[t]+" "+PowerStateStr2(t);deviceHeadersTitles["DevxHeader"+deviceHeaderId]=e,deviceHeaderId++,deviceHeaderCount={},deviceHeaderTotal=0}else deviceHeaderId=1}function meshSort(e,t){return e.meshnamel>t.meshnamel?1:e.meshnamel<t.meshnamel?-1:e.meshid==t.meshid?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:0}function powerSort(e,t){var o=e.pwr?e.pwr:0,n=t.pwr?t.pwr:0;return o==n?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:n<o?1:o<n?-1:0}function deviceSort(e,t){return e.namel>t.namel?1:e.namel<t.namel?-1:0}function deviceHostSort(e,t){return e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0}function refreshDevice(e){currentNode&&currentNode._id==e&&gotoDevice(e,xxcurrentView,!0)}function getNodeRights(e){var t=getNodeFromId(e);return meshes[t.meshid].links[userinfo._id].rights}var currentNode,currentDevicePanel=0,powerTimelineNode=null,powerTimelineReq=null,powerTimelineUpdate=null,powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(e,t,o){if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var n=getNodeFromId(e);if(null!=n){var i=meshes[n.meshid];if(null!=i){var a=i.links[userinfo._id].rights;if(!currentNode||currentNode._id!=n._id||1==o){currentNode=n;var s=EscapeHtml(n.name);0==s.length&&(s="<i>Aucun</i>"),0!=(4&a)&&(s="<span onclick=showEditNodeValueDialog(0) style=cursor:pointer>"+s+"</span>"),QH("p10deviceName",s);var l="<table style=width:100%>";l+=addDeviceAttribute("<span>Groupe</span>",'<a onclick=goForward("'+n.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[n.meshid].name)+"</a>"),null!=n.rname&&(l+=addDeviceAttribute("<span>Nom</span>","<span>"+EscapeHtml(n.rname)+"</span>")),1!=i.mtype&&n.name==n.host||(0!=(4&a)?n.host?l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(n.host)+"</span>"):l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>Aucun</i></span>"):l+=addDeviceAttribute("Hostname",EscapeHtml(n.host)));var r=n.desc?EscapeHtml(n.desc):"<i>Aucun</i>";l+=addDeviceAttribute("Description",0!=(4&a)?"<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+r+"</span>":r);var d=["Inconnue","Windows 32bit console","Windows 64bit console","Windows 32bit service","Windows 64bit service","Linux 32bit","Linux 64bit","MIPS","XENx86","Android ARM","Linux ARM","MacOS 32bit","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32bit","MacOS 64bit","ChromeOS","Linux Poky x86-64bit","Linux NoKVM x86-32bit","Linux NoKVM x86-64bit","Windows MinCore console","Windows MinCore service","NodeJS","ARM-Linaro","ARMv6l / ARMv7l","ARMv8 64bit","ARMv6l / ARMv7l / NoKVM","Inconnue","Inconnue","FreeBSD x86-64"];if(null!=n.agent&&null!=n.agent.id&&null!=n.agent.ver){var p="";p=n.agent.id<=d.length?d[n.agent.id]:d[0],0!=n.agent.ver&&(p+=" v"+n.agent.ver),l+=addDeviceAttribute("Agent",p)}if(null!=n.intelamt){p="";var c={0:nobreak("Not Activated (Pre)"),1:nobreak("Not Activated (In)"),2:nobreak("Activé")};null!=n.intelamt.ver&&null==n.intelamt.state?p+="<i>"+nobreak("Etat inconnu")+"</i>, v"+n.intelamt.ver:null==n.intelamt.ver&&2==n.intelamt.state?p+="<i>Activé</i>":null==n.intelamt.ver||null==n.intelamt.state?p+="<i>Version et état inconnus</i>":(p+=c[n.intelamt.state],n.intelamt.flags&&(2&n.intelamt.flags?p=" <span>CCM</span>":4&n.intelamt.flags&&(p=" <span>ACM</span>")),p+=", v"+n.intelamt.ver),1==n.intelamt.tls&&(p+=", <span>TLS</span>"),2==n.intelamt.state&&(null!=n.intelamt.user&&""!=n.intelamt.user||(p+=0!=(4&a)?', <i style=color:#FF0000;cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'+nobreak("No Credentials")+"</i>":", <i style=color:#FF0000>No Credentials</i>"),p+=" ",0!=(4&a)&&(p+='<img src=images/link4.png height=10 width=10 style=cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'));var u="Intel&reg; ME";"number"==typeof n.intelamt.sku&&(0!=(8&n.intelamt.sku)?u="Intel&reg; AMT":0!=(16&n.intelamt.sku)&&(u="Intel&reg; SM")),l+=addDeviceAttribute(u,p)}if(null!=n.agent&&null!=n.agent.tag&&"mailto:"!=n.agent.tag){var m=EscapeHtml(n.agent.tag);m.startsWith("mailto:")&&(m='<a href="'+m+'">'+m.substring(7)+"</a>"),l+=addDeviceAttribute("Agent Tag",m)}var h=n.conn;if(h&&1<h){var f=[];0!=(1&n.conn)&&f.push("<span>Agent</span>"),0!=(2&n.conn)?f.push("<span>Intel&reg; AMT CIRA</span>"):0!=(4&n.conn)&&f.push("<span>Intel&reg; AMT</span>"),0!=(8&n.conn)&&f.push("<span>Agent Relay</span>"),0!=(16&n.conn)&&f.push("<span>MQTT</span>"),l+=addDeviceAttribute("Connectivity",f.join(", "))}var g="<i>Aucun</i>";if(null!=n.tags)for(var v in g="",n.tags)g+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+n.tags[v]+"</span>";l+=addDeviceAttribute("Tags",0!=(4&a)?"<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+g+"</span>":g),l+="</table><br />",0!=(76&a)&&(l+="<input type=button value=Actions onclick=deviceActionFunction() />"),QH("p10html",l),setupFiles(),l="<div style=float:right;font-size:x-small;margin-right:10px>",0!=(4&a)&&(l+='<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+n._id+'")>Delete Device</a>'),l+="</div><div style=font-size:x-small>",l+="</div><br>",QH("p10html3",l);var k=PowerStateStr(n.state);0!=(1&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Mesh Agent</span>"),0!=(2&h)?(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT connected</span>"):0!=(4&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT detected</span>"),0!=(16&h)&&(0<k.length&&(k+="<br/>"),k+="<span style=font-size:12px>MQTT channel connected</span>"),QH("MainComputerState",k),QH("MainComputerImage",'<div class="i'+n.icon+'"></div>'),powerTimelineNode!=currentNode._id&&powerTimelineReq!=currentNode._id&&(QH("p10html2",""),powerTimelineReq=currentNode._id,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}setupDesktop(),go(t=t||10),setupDeviceMenu()}else goBack()}else goBack()}else setDialogMode(2,"Account Security",1,null,'Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the "My Account" and look at the "Account Security" section.');else setDialogMode(2,"Account Security",1,null,'Unable to access a device until a email address is verified. This is required for password recovery. Go to the "My Account" to change and verify an email address.')}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"Device Toast",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var o=0;currentNode&&(o=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var n=[];0!=currentDevicePanel&&n.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&o||256&o)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8&currentNode.intelamt.sku))||currentNode.agent&&1&currentNode.agent.caps)&&n.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&o&&(4294967295==o||0==(1024&o))&&2==currentNode.mtype&&4&currentNode.agent.caps&&n.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(n)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="Select an operation to perform on this device.<br /><br />",o="<select id=d2deviceop style=float:right;width:170px>";0!=(64&e)&&(o+="<option value=100>Wake-up</option>"),0!=(8&e)&&(o+="<option value=4>Endormir</option><option value=3>Réinitialiser</option><option value=2>Éteindre</option>"),setDialogMode(2,"Device Action",3,deviceActionFunctionEx,t+=addHtmlValue("Opération",o+="</select>"))}}function deviceActionFunctionEx(){var e=Q("d2deviceop").value;100==e?meshserver.send({action:"wakedevices",nodeids:[currentNode._id]}):meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:e})}function updateDeviceTimeline(){2==meshserver.State&&null!=powerTimelineNode&&null!=powerTimelineUpdate&&null!=currentNode&&powerTimelineNode==powerTimelineReq&&currentNode._id==powerTimelineNode&&powerTimelineUpdate<Date.now()&&(powerTimelineUpdate=null,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}function drawDeviceTimeline(){var e=null,t=Date.now();currentNode._id==powerTimelineNode&&(e=powerTimeline);var o=new Date;o.setHours(0,0,0,0);(o=new Date(o.getTime()-5184e5)).getTime();var n=[];if(null!=e&&1<e.length){n.push([0,e[1],e[0]]);for(var i=e[1],a=2;a<e.length;a+=2){var s=e[a],l=t;e.length>a+1&&(l=e[a+1]),n.push([i,i+l,s]),i+=l}}var r="",d=1,p=new Date,c=Q("masthead").offsetWidth-122;p.setHours(0,0,0,0);for(a=0;a<7;a++){var u="",m=p.getTime(),h=m+864e5;for(var f in n){var g=n[f];if(1==isTimeBlockInside(m,h,g[0],g[1])){var v=Math.max(m,g[0]),k=Math.min(Math.min(h,g[1]),t),y=Math.round((k-v)*c/864e5);0<y&&(u+="<div style=display:table-cell;width:"+y+"px;background-color:"+powerColor(g[2])+";height:16px></div>")}}r+="<tr style="+(d%2==0?"background-color:#DDD":"")+"><td><div>&nbsp;"+printDate(p)+"<div></div></div></td><td><div>"+u+"</div></td></tr>",++d,p=new Date(p.getTime()-864e5)}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse;width:calc(100% - 18px);margin:9px" border=0 cellpadding=2 cellspacing=0><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:90px>Day</th><th scope=col style=text-align:center>Power State</th></tr>'+r+"</tbody></table>")}function powerColor(e){return e<powerColorTable.length?powerColorTable[e]:"yellow"}function isTimeBlockInside(e,t,o,n){return o<e&&t<n||(e<o&&o<t||e<n&&n<t)}function addDeviceAttribute(e,t){return"<tr><td style=width:100px;color:gray>"+e+"</td><td style=overflow:hidden>"+t+"</td></tr>"}function editDeviceAmtSettings(e,t){if(!xxdialogMode){var o="",n=getNodeFromId(e),i=3;0!=(4&getNodeRights(e))&&(o+=addHtmlValue("Nom d'utilisateur",'<input id=dp10username style=width:170px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />'),o+=addHtmlValue("Mot de passe","<input id=dp10password type=password style=width:170px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />"),o+=addHtmlValue("Sécurité","<select id=dp10tls style=width:176px><option value=0>Pas de sécurité TLS</option><option value=1>Sécurité TLS requise</option></select>"),null!=n.intelamt.user&&""!=n.intelamt.user&&(i=7),setDialogMode(2,"Edit Intel&reg; AMT credentials",i,editDeviceAmtSettingsEx,o,{node:n,func:t}),null!=n.intelamt.user&&""!=n.intelamt.user?Q("dp10username").value=n.intelamt.user:Q("dp10username").value="admin",Q("dp10tls").value=n.intelamt.tls,validateDeviceAmtSettings())}}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(e,t){if(2==e)meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:"",pass:""}});else{var o=Q("dp10username").value;""==o&&(o="admin");var n=Q("dp10password").value;""==n&&(o=""),meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:o,pass:n,tls:Q("dp10tls").value}}),t.node.intelamt.user=o,t.node.intelamt.tls=Q("dp10tls").value,t.func&&setTimeout(t.func,300)}}function p10showDeleteNodeDialog(e){xxdialogMode||(setDialogMode(2,"Delete Node",3,p10showDeleteNodeDialogEx,format("Delete {0}?",EscapeHtml(currentNode.name))+"<br /><br /><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />Confirm",e),p10validateDeleteNodeDialog())}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(e,t){meshserver.send({action:"removedevices",nodeids:[t]})}function p10showiconselector(){if(!xxdialogMode&&0!=(4&meshes[currentNode.meshid].links[userinfo._id].rights)){"<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>","<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>","<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br>","<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>","<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>","<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>",setDialogMode(2,"Sélection de l'icôn",0,null,"<table align=center><td><div style=display:inline-block class=i1 onclick=p10setIcon(1)></div><div style=display:inline-block class=i2 onclick=p10setIcon(2)></div><div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br><div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><div style=display:inline-block class=i5 onclick=p10setIcon(5)></div><div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>"),QV("id_dialogclose",!0)}}function p10setIcon(e){setDialogMode(0),meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:e})}var desktop,desktopNode,showEditNodeValueDialog_modes=["Device Name","Hostname","Description","Tags"],showEditNodeValueDialog_modes2=["name","host","desc","tags"],showEditNodeValueDialog_modes3=["","","","Groupe1, Groupe2, Groupe3"];function showEditNodeValueDialog(e){if(!xxdialogMode){setDialogMode(2,"Edit Device",3,showEditNodeValueDialogEx,addHtmlValue(showEditNodeValueDialog_modes[e],'<input id=dp10devicevalue style=width:170px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[e]+'" onchange=p10editdevicevalueValidate('+e+",event) onkeyup=p10editdevicevalueValidate("+e+",event) />"),e);var t=currentNode[showEditNodeValueDialog_modes2[e]];null==t&&(t=""),Array.isArray(t)&&(t=t.join(", ")),Q("dp10devicevalue").value=t,p10editdevicevalueValidate(),Q("dp10devicevalue").focus()}}function showEditNodeValueDialogEx(e,t){var o={action:"changedevice",nodeid:currentNode._id};o[showEditNodeValueDialog_modes2[t]]=Q("dp10devicevalue").value,meshserver.send(o)}function p10editdevicevalueValidate(e,t){var o=1<e||0<Q("dp10devicevalue").value.length;QE("idx_dlgOkButton",o),null!=t&&1==o&&13==t.keyCode&&dialogclose(1)}var desktopsettings={encoding:2,showfocus:!1,showmouse:!0,showcad:!0,quality:40,scaling:1024,framerate:50};function setupDesktop(){desktopNode!=currentNode&&null!=desktop&&(desktop.Stop(),desktop=desktopNode=null),desktopNode==currentNode&&null!=desktop||(QH("DeskParent",'<canvas id=Desk width=640 height=200 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>'),desktopNode=currentNode,Q("Desk").addEventListener("DOMMouseScroll",function(e){return dmousewheel(e)}),Q("Desk").addEventListener("mousewheel",function(e){return dmousewheel(e)})),desktopNode=currentNode,updateDesktopButtons(),Q("Desk").toBlob||QV("deskSaveBtn",!1)}function updateDesktopButtons(){var e=meshes[currentNode.meshid],t=0;null!=desktop&&(t=desktop.State);var o=e.links[userinfo._id].rights;QV("disconnectbutton1",0!=t),QV("connectbutton1",0==t&&2==e.mtype&&(8&o||256&o)),QV("connectbutton1h",0==t&&8&o&&(1==e.mtype||null!=currentNode.intelamt&&2==currentNode.intelamt.state&&null!=currentNode.intelamt.ver&&"number"==typeof currentNode.intelamt.sku&&0!=(8&currentNode.intelamt.sku))),QV("d7amtkvm",!(null==currentNode.intelamt||null==currentNode.intelamt.ver&&1!=e.mtype||0!=t&&2!=desktop.contype)),QV("d7meshkvm",2==e.mtype&&(0==t||1==desktop.contype));var n=0!=(1&currentNode.conn);QE("connectbutton1",n);var i=0!=(6&currentNode.conn);QE("connectbutton1h",i),QV("DeskToastButton",0!=(16384&o)&&currentNode.agent&&currentNode.agent.id<5&&8&o),QV("deskActionsBtn",8&o),Q("DeskControl").checked=0!=(8&o),0==n&&QV("DeskTools",!1)}function connectDesktop(e,t){if(setSessionActivity(),null==desktop)if(desktopNode=currentNode,2==t){if(null==desktopNode.intelamt.user||""==desktopNode.intelamt.user)return void editDeviceAmtSettings(desktopNode._id,connectDesktop);(desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie)).debugmode=debugmode,desktop.onStateChanged=onDesktopStateChange,desktop.m.bpp=1==desktopsettings.encoding||3==desktopsettings.encoding?1:2,desktop.m.useZRLE=desktopsettings.encoding<3,desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id,16994,"*","*",0),desktop.contype=2}else(desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).debugmode=debugmode,desktop.m.debugmode=debugmode,desktop.attemptWebRTC=attemptWebRTC,desktop.onStateChanged=onDesktopStateChange,desktop.m.CompressionLevel=desktopsettings.quality,desktop.m.ScalingLevel=desktopsettings.scaling,desktop.m.FrameRateTimer=desktopsettings.framerate,desktop.m.onDisplayinfo=deskDisplayInfo,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id),desktop.contype=1;else desktop.Stop(),desktopNode=desktop=null}function onDesktopStateChange(e,t){var o=t;3==o&&2==e.contype&&o++;var n=StatusStrs[o];switch(null!=desktop&&1==desktop.webRtcActive&&(n+=", WebRTC"),QH("deskstatus",n),t){case 0:desktop.Stop(),desktopNode=desktop=null,QV("termdisplays",!1),1==fullscreen&&deskToggleFull()}updateDesktopButtons(),deskAdjust(),setTimeout(deskAdjust,50)}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),updateDesktopButtons(),setDialogMode(7,"Paramètres du bureau à distance",3,showDesktopSettingsChanged))}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value,desktopsettings.showfocus=d7showfocus.checked,desktopsettings.showmouse=d7showcursor.checked,desktopsettings.quality=d7bitmapquality.value,desktopsettings.scaling=d7bitmapscaling.value,desktopsettings.framerate=d7framelimiter.value,localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings)),applyDesktopSettings(),desktop&&(1==desktop.contype&&0!=desktop.State&&desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate),2==desktop.contype&&0!=desktop.State&&(desktop.Stop(),setTimeout(function(){connectDesktop(null,2)},50)))}function applyDesktopSettings(){var e="",t=512&features?[90,70,50,40,30,20,10,5,1]:[50,40,30,20,10,5,1];for(var o in t)e+="<option value="+t[o]+">"+t[o]+"%</option>";QH("d7bitmapquality",e),d7desktopmode.value=desktopsettings.encoding,d7showfocus.checked=desktopsettings.showfocus,d7showcursor.checked=desktopsettings.showmouse,d7bitmapquality.value=40,0<=t.indexOf(parseInt(desktopsettings.quality))&&(d7bitmapquality.value=desktopsettings.quality),d7bitmapscaling.value=desktopsettings.scaling,desktopsettings.framerate&&(d7framelimiter.value=desktopsettings.framerate)}var fullscreen=!1;function deskAdjust(){var e=(Q("DeskParent").clientHeight-Q("Desk").clientHeight)/2;if(e<0){var t=Q("DeskParent").clientHeight,o=9999;desktop&&(o=desktop.m.width/desktop.m.height*t),QS("Desk")["max-height"]=t+"px",QS("Desk")["max-width"]=o+"px",e=0}else QS("Desk")["max-height"]=null,QS("Desk")["max-width"]=null;QS("Desk")["margin-top"]=e+"px",QS("Desk")["margin-bottom"]=e+"px"}function deskSendKeys(){if(!xxdialogMode&&null!=desktop&&3==desktop.State){var e=Q("deskkeys").value;0==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]]):1==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]]):2==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]]):desktop.sendCtrlMsg('{"action":"lock"}'):3==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]]):4==e?2==desktop.contype?desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]]):5==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]]):6==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]]):7==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65473,1],[65473,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,115],[desktop.m.KeyAction.UP,115],[desktop.m.KeyAction.EXUP,18]]):8==e?2==desktop.contype?desktop.m.sendkey([[65507,1],[119,1],[119,0],[65507,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,17],[desktop.m.KeyAction.DOWN,87],[desktop.m.KeyAction.UP,87],[desktop.m.KeyAction.EXUP,17]]):9==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65289,1],[65289,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9],[desktop.m.KeyAction.EXUP,18]]):10==e?desktop.m.sendcad():11==e&&(2==desktop.contype?desktop.m.sendkey([[65289,1],[65289,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9]]))}}function sendSpecialKeys(){xxdialogMode||null==desktop||3!=desktop.State||setDialogMode(3,"Special Keys",3,deskSendKeys)}function toggleSoftKeys(e){QV("DeskSoftInput",1==e),1==e&&Q("DeskSoftInput").focus()}function toggleDeskTools(){setSessionActivity(),xxdialogMode||("none"==QS("DeskTools").display?(QV("DeskTools",!0),Q("DeskTools").nodeid=currentNode._id,refreshDeskTools()):QV("DeskTools",!1))}function refreshDeskTools(){setSessionActivity(),QV("DeskToolsRefreshButton",!1),setTimeout(refreshDeskToolsEx,500),meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",!0)}var filesNode,deskTools={sort:1,msg:null};function sortProcess(e){deskTools.sort=e,showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(e,t){return e.p>t.p?1:e.p<t.p?-1:0}function sortProcessName(e,t){return e.d>t.d?1:e.d<t.d?-1:0}function showDeskToolsProcesses(e){if(null!=(deskTools.msg=e)){if(Q("DeskTools").nodeid==e.nodeid){var t=[],o=null;try{o=JSON.parse(e.value)}catch(e){}if(console.log(o),null!=o){for(var n in o)t.push({p:parseInt(n),c:o[n].cmd,d:o[n].cmd.toLowerCase(),u:o[n].user});0==deskTools.sort?t.sort(sortProcessPid):1==deskTools.sort&&t.sort(sortProcessName);var i="";for(var a in t)0!=t[a].p&&(i+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+t[a].p+"</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess("+t[a].p+',"'+t[a].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(t[a].u?t[a].u:"")+"</div><div>"+t[a].c+"</div></div>");QH("DeskToolsProcesses",i)}}}else QH("DeskToolsProcesses","")}function deskSaveImage(){if(setSessionActivity(),!xxdialogMode&&null!=desktop&&3==desktop.State){var e=new Date,t="Desktop-"+currentNode.name+"-"+e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)+"-"+("0"+e.getHours()).slice(-2)+"-"+("0"+e.getMinutes()).slice(-2);Q("Desk").toBlob(function(e){saveAs(e,t+".jpg")})}}function deskDisplayInfo(e,t,o,n){var i=Q("termdisplays").value;if(0<t.length){var a="";for(var s in t)a+="<option"+(i==t[s]?" selected":"")+">"+t[s]+"</option>";QH("termdisplays",a)}QV("termdisplays",0<t.length)}function deskGetDisplayNumbers(e){desktop.m.GetDisplayNumbers()}function deskSetDisplay(e){setSessionActivity();var t=0,o=Q("termdisplays").value;t="All Displays"==o?65535:parseInt(o.substring(8)),desktop.m.SetDisplay(t)}function dmousedown(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousedown(e)}function dmouseup(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mouseup(e)}function dmousemove(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousemove(e)}function dmousewheel(e){return setSessionActivity(),!(xxdialogMode||null==desktop||!desktop.m.mousewheel)&&(desktop.m.mousewheel(e),haltEvent(e),!0)}function drotate(e){xxdialogMode||null==desktop||(desktop.m.setRotation(desktop.m.rotation+e),deskAdjust(),deskAdjust())}function stopProcess(e,t){return setDialogMode(2,"Process Control",3,stopProcessEx,format('Stop process #{0} "{1}"?',e,t),e),!1}function stopProcessEx(e,t){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:t}),setTimeout(refreshDeskTools,300)}function setupFiles(){var e=filesNode==currentNode,t=0!=(1&(filesNode=currentNode).conn);QE("p13Connect",t),0!=e&&0!=t||!files||(files.Stop(),files=null)}function onFilesStateChange(e,t){setSessionActivity(),p13Connect.value=0==t?"Connect":"Disconnect";var o=StatusStrs[t];switch(1==files.webRtcActive&&(o+=", WebRTC"),Q("p13Status").textContent=o,t){case 0:QH("p13files",""),p13filetree=null,p13filetreelocation=[],QH("p13currentpath",""),QE("p13FolderUp",!1),p13setActions(),null!=files&&(files.Stop(),files=null);break;case 3:p13targetpath="",files.sendText({action:"ls",reqid:1,path:""})}}function CreateRemoteFiles(e){var t={protocol:5};return t.onFileUpdate=e,t.xxStateChange=function(e){},t.ProcessData=function(e){t.onFileUpdate(e)},t}var autoConnectFilesTimer=null;function autoConnectFiles(e){autoConnectFilesTimer=null==autoConnectFilesTimer?setInterval(connectFiles,100):(clearInterval(autoConnectFilesTimer),null)}function connectFiles(e){files?(files.Stop(),files=null):((files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).attemptWebRTC=attemptWebRTC,files.onStateChanged=onFilesStateChange,files.Start(filesNode._id)),p13clipboard=p13clipboardFolder=null,p13clipboardCut=0,p13updateClipview()}var p13sortorder,p13filetree=null,p13targetpath=null,p13filetreelocation=[];function p13gotFiles(e){if(setSessionActivity(),0<e.length&&123!=e.charCodeAt(0))p13gotDownloadBinaryData(e);else if("download"!=(e=JSON.parse(decode_utf8(e))).action)if(e.path=e.path.replace(/\//g,"\\"),null!=p13filetree&&e.path==p13filetree.path){var t=p13getCheckedNames();p13filetree=e,p13updateFiles(t)}else{for(var o=e.path.replace(/\//g,"\\"),n=p13targetpath.replace(/\//g,"\\");0<o.length&&"\\"==o[0];)o=o.substring(1);for(;0<n.length&&"\\"==n[0];)n=n.substring(1);(o==n||"\\"==e.path&&""==p13targetpath)&&(p13filetree=e,p13updateFiles())}else p13gotDownloadCommand(e)}function p13getCheckedNames(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);return e}function p13updateFiles(e){var t="",o="",n="<a style=cursor:pointer onclick=p13folderup(0)>Racine</a>",i=p13filetree.path.split("\\");for(var a in p13filetreelocation=[],i)""!=i[a]&&p13filetreelocation.push(i[a]);for(var a in p13filetreelocation)n+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(a)+1)+")>"+p13filetreelocation[a]+"</a>";var s=p13filetreelocation.join("/"),l=p13sort_files(p13filetree.dir);for(var a in l){var r,d=l[a],p=d.n;r=70<(r=p).length?EscapeHtml(p.substring(0,70))+"...":EscapeHtml(p),p=EscapeHtml(p);var c="";null!=d.s&&(c=getFileSizeStr(d.s));var u="";if(d.t<3){u="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right></span><span><div class=fileIcon"+d.t+'></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+r+"</a></span></div>"}else{var m=r;0<d.s&&(m='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+p)+"','"+encodeURIComponent(p)+"',"+d.s+')">'+r+"</a>"),u="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+c+"</span><span><div class=fileIcon"+d.t+"></div>"+m+"</span></div>"}d.t<3?t+=u:o+=u}if(QH("p13files",t+o),QH("p13currentpath",n),QE("p13FolderUp",0!=p13filetreelocation.length),null!=e){var h=document.getElementsByName("fd");for(a=0;a<h.length;a++)0<=e.indexOf(p13filetree.dir[h[a].value].n)&&(h[a].checked=!0)}p13setActions()}function p13folderset(e){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[e].n).split("\\").join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(e){if(null==e)p13filetreelocation.pop();else for(;p13filetreelocation.length>e;)p13filetreelocation.pop();p13targetpath=p13filetreelocation.join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13sort_filename(e,t){return e.ln>t.ln?1*p13sortorder:e.ln<t.ln?-1*p13sortorder:0}function p13sort_timestamp(e,t){return e.d>t.d?1*p13sortorder:e.d<t.d?-1*p13sortorder:0}function p13sort_bysize(e,t){return e.s==t.s?p13sort_filename(e,t):(e.s-t.s)*p13sortorder}function p13sort_files(e){var t=[],o=Q("p13sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].s&&(e[n].s=0),null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return p13sortorder=1,3<o&&(p13sortorder=-1,o-=3),1==o?t.sort(p13sort_filename):2==o?t.sort(p13sort_bysize):3==o&&t.sort(p13sort_timestamp),t}function p13setActions(){if(null==p13filetree)QE("p13DeleteFileButton",!1),QE("p13NewFolderButton",!1),QE("p13UploadButton",!1),QE("p13RenameFileButton",!1),QE("p13SelectAllButton",!1),Q("p13SelectAllButton").value="Tout",QE("p13RefreshButton",!1),QE("p13CutButton",!1),QE("p13CopyButton",!1),QE("p13PasteButton",!1);else{var e=p13getFileSelCount(),t=p13getFileCount(),o=p13getFileSelCount(!1),n=0<currentNode.agent.id&&currentNode.agent.id<5;QE("p13DeleteFileButton",0<e&&(0<p13filetreelocation.length||0==n)),QE("p13NewFolderButton",0<p13filetreelocation.length||0==n),QE("p13UploadButton",0<p13filetreelocation.length||0==n),QE("p13RenameFileButton",1==e&&(0<p13filetreelocation.length||0==n)),QE("p13SelectAllButton",0<t),Q("p13SelectAllButton").value=0<e?"Aucun":"Tout",QE("p13RefreshButton",!0),QE("p13CutButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13CopyButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13PasteButton",(0<p13filetreelocation.length||0==n)&&null!=p13clipboard&&0<p13clipboard.length)}}function p13getFileSelCount(e){for(var t=0,o=document.getElementsByName("fd"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function p13getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function p13getFileCount(){return document.getElementsByName("fd").length}function p13selectallfile(){for(var e=0==p13getFileSelCount(),t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked=e;p13setActions()}function p13createfolder(){setDialogMode(2,"Nouveau Dossier",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />"),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value}),p13folderup(999)}function p13deletefile(){var e=p13getFileSelCount(),t=0<p13getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p13recdeleteinput>Suppression récursive</label><br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p13deletefileEx,1<e?format("Delete {0} selected items?",e)+t:"Delete selected item?"+t)}function p13deletefileEx(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:e,rec:Q("p13recdeleteinput").checked}),p13folderup(999)}function p13renamefile(){for(var e,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&(e=p13filetree.dir[t[o].value].n);setDialogMode(2,"Renommer",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:e}),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13renamefileEx(e,t){t.newname=Q("p13renameinput").value,files.sendText(t),p13folderup(999)}function p13fileNameCheck(e){var t=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",t),1==t&&null!=e&&13==e.keyCode&&dialogclose(1)}function p13uploadFile(){setDialogMode(2,"Upload File",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />"),updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}function p13viewfile(){for(var e=document.getElementsByName("fd"),t=0;t<e.length;t++)if(e[t].checked){p13filetree.dir[e[t].value].s<=204800?p13downloadfile(encodeURIComponent(p13filetreelocation.join("/")+"/"+p13filetree.dir[e[t].value].n),encodeURIComponent(p13filetree.dir[e[t].value].n),p13filetree.dir[e[t].value].s,"viewer"):messagebox("Éditeur de fichier","Only files less than 200k can be edited.");break}}var downloadFile,uploadFile,currentMesh,p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(e){var t=document.getElementsByName("fd");p13clipboard=[],p13clipboardCut=e,p13clipboardFolder=p13targetpath;for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p13clipboard.push(p13filetree.dir[t[o].value].n);p13updateClipview()}function p13pasteFile(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format("Confirm copy of {0} entries's to this location?",p13clipboard.length):format("Confirm copy of 1 entrie to this location?"):1<p13clipboard.length?format("Confirm move of {0} entries's to this location?",p13clipboard.length):format("Confirm move of 1 entrie to this location?")),setDialogMode(2,"Coller",3,p13pasteFileEx,e)}function p13pasteFileEx(){files.sendText({action:0==p13clipboardCut?"copy":"move",reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard}),p13folderup(999),1==p13clipboardCut&&(p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview())}function p13updateClipview(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format('Holding {0} entries for copy, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.',p13clipboard.length):format('Holding 1 entrie for copy, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.'):1<p13clipboard.length?format('Holding {0} entries for move, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.',p13clipboard.length):format('Holding 1 entrie for move, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.')),QH("p13bottomstatus",e),p13setActions()}function p13clearClip(){return p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview(),!1}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileCount(){return document.getElementsByName("fc").length}function p13downloadfile(e,t,o){xxdialogMode||downloadFile||!files||(downloadFile={path:decodeURIComponent(e),file:decodeURIComponent(t),size:o,tsize:0,data:"",state:0,id:Math.random()},files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path}),setDialogMode(2,"Download File",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+o+" />"))}function p13downloadFileCancel(){setDialogMode(0),files.sendText({action:"download",sub:"cancel",id:downloadFile.id}),downloadFile=null}function p13gotDownloadCommand(e){null!=downloadFile&&e.id==downloadFile.id&&("start"==e.sub?(downloadFile.state=1,files.sendText({action:"download",sub:"startack",id:downloadFile.id})):"cancel"==e.sub&&(downloadFile=null,setDialogMode(0)))}function p13gotDownloadBinaryData(e){downloadFile&&0!=downloadFile.state&&(4<e.length&&(downloadFile.tsize+=e.length-4,downloadFile.data+=e.substring(4),Q("d2progressBar").value=downloadFile.tsize),0!=(1&ReadInt(e,0))?(saveAs(data2blob(downloadFile.data),downloadFile.file),downloadFile=null,setDialogMode(0)):files.sendText({action:"download",sub:"ack",id:downloadFile.id}))}function p13doUploadFiles(e){xxdialogMode||((uploadFile={}).xpath=p13filetreelocation.join("/"),uploadFile.xfiles=e,uploadFile.xfilePtr=-1,setDialogMode(2,"Upload File",10,p13uploadFileCancel,"<div id=p13dfileName>Connecting...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />"),p13uploadReconnect())}function onFileUploadStateChange(e,t){switch(t){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",t)}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie,authRelayCookie,domainUrl),uploadFile.ws.attemptWebRTC=!1,uploadFile.ws.ctrlMsgAllowed=!1,uploadFile.ws.onStateChanged=onFileUploadStateChange,uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){if(uploadFile.xfilePtr++,uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var e=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",e.name),Q("d2progressBar").max=e.size,Q("d2progressBar").value=0,uploadFile.xreader=new FileReader,uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result,uploadFile.ws.sendText({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:e.name,size:uploadFile.xdata.byteLength})},uploadFile.xreader.readAsArrayBuffer(e)}else p13uploadFileCancel()}function p13uploadFileCancel(e,t){null!=uploadFile&&(null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile=null),setDialogMode(0)}function p13gotUploadData(e){var t=JSON.parse(e);if(null!=uploadFile&&parseInt(uploadFile.xfilePtr)==parseInt(t.reqid))if("uploadstart"==t.action){p13uploadNextPart(!1);for(var o=0;o<8;o++)p13uploadNextPart(!0)}else"uploadack"==t.action?p13uploadNextPart(!1):"uploaderror"==t.action&&p13uploadFileCancel()}function p13uploadNextPart(e){var t=uploadFile.xdata,o=uploadFile.xptr,n=uploadFile.xptr+4096;if(n>t.byteLength){if(1==e)return;n=t.byteLength}if(o==t.byteLength)null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile.xfiles.length>uploadFile.xfilePtr+1?p13uploadReconnect():p13uploadFileCancel();else{var i=t.slice(o,n);uploadFile.ws.send(i),uploadFile.xptr=n,Q("d2progressBar").value=n}}function p20updateMesh(){if(null!=currentMesh){QH("p20meshName",EscapeHtml(currentMesh.name));var e=format(" #{0} Inconnue",currentMesh.mtype),t=currentMesh.links[userinfo._id].rights;1==currentMesh.mtype&&(e="Intel&reg; AMT only, no agent"),2==currentMesh.mtype&&(e="Géré à l'aide d'un agent logiciel");var o="";o+=addHtmlValue("Nom",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",0!=(1&t))),o+=addHtmlValue("Description",addLinkConditional(currentMesh.desc&&""!=currentMesh.desc?EscapeHtml(currentMesh.desc):"<i>Aucun</i>","p20editmesh(2)",0!=(1&t))),o+=addHtmlValue("Type",e),o+="<br style=clear:both><br>";var n=currentMesh.links[userinfo._id];n&&0!=(2&n.rights)&&(o+="<div style=margin-bottom:6px><a onclick=p20showAddMeshUserDialog() style=cursor:pointer><img src=images/icon-addnew.png border=0 height=12 width=12> Ajouter un utilisateur</a></div>"),o+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>User Authorizations</th></tr>';var i=1,a=[];for(var s in currentMesh.links)a.push({id:s,name:s.split("/")[2],rights:currentMesh.links[s].rights});for(var s in a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),a){var l="",r="Partial Rights",d=a[s].rights;4294967295==d?r="Administrateur Complet":0==d&&(r="No Rights"),s==userinfo._id||4294967295!=t&&0==(2&t)||(l='<a onclick=p20deleteUser(event,"'+encodeURIComponent(a[s].id)+'") style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'),o+='<tr onclick=p20viewuser("'+encodeURIComponent(a[s].id)+'") style=height:32px;cursor:pointer'+(i%2==0?";background-color:#DDD":"")+"><td>",o+="<div style=float:right>"+l+"</div><div style=float:right;padding-right:4px>"+r+"</div><div class=m2></div><div>&nbsp;"+EscapeHtml(decodeURIComponent(a[s].name))+"<div></div></div>",o+="</td></tr>",++i}o+="</tbody></table>",4294967295==t&&(o+="<div style=font-size:small;text-align:right;margin-top:6px><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>Delete Group</a></span></div>"),QH("p20info",o)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("Êtes-vous sûr de vouloir supprimer le groupe {0}? La suppression du groupe de périphériques supprimera également toutes les informations relatives aux périphériques de ce groupe.",EscapeHtml(currentMesh.name))+"<br /><br />";return setDialogMode(2,"Delete Group",3,p20showDeleteMeshDialogEx,e+="<label><input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />Confirm</label>"),p20validateDeleteMeshDialog(),!1}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(e,t){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(e){if(!xxdialogMode){var t=addHtmlValue("Nom","<input id=dp20meshname style=width:170px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");setDialogMode(2,"Edit Device Group",3,p20editmeshEx,t+=addHtmlValue("Description","<input id=dp20meshdesc style=width:170px maxlength=1024 onkeyup=p20editmeshValidate() />")),Q("dp20meshname").value=currentMesh.name,currentMesh.desc&&(Q("dp20meshdesc").value=currentMesh.desc),p20editmeshValidate(),2==e?Q("dp20meshdesc").focus():Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",0<Q("dp20meshname").value.length)}function p20showAddMeshUserDialog(){if(!xxdialogMode){var e=addHtmlValue("User","<input id=dp20username style=width:170px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");e+='<div style="border:2px groove gray;background-color:white;max-height:120px;overflow-y:scroll">',e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>Administrateur Complet</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>Edit Device Group</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>Manage Device Group Users</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>Manage Device Group Computers</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>Télécommande</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>Remote View Only</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotelimitedinput style=margin-left:12px>Limited Input Only</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>No Terminal Access</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>Pas d'accès au fichier</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>No Intel&reg; AMT</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>Mesh Agent Console</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>Server Files</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>Wake Devices</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>Edit Device Notes</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20limitevents>Show Only Own Events</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20chatnotify>Chat & Notify</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20uninstall>Uninstall Agent</label><br>",setDialogMode(2,"Ajouter un utilisateur au groupe",3,p20showAddMeshUserDialogEx,e+="</div>"),p20validateAddMeshUserDialog(),Q("dp20username").focus()}}function p20validateAddMeshUserDialog(){var e=currentMesh.links[userinfo._id].rights,t=!Q("p20fulladmin").checked;QE("p20fulladmin",4294967295==e),QE("p20editmesh",t&&4294967295==e),QE("p20manageusers",t),QE("p20managecomputers",t),QE("p20remotecontrol",t),QE("p20meshagentconsole",t),QE("p20meshserverfiles",t),QE("p20wakedevices",t),QE("p20editnotes",t),QE("p20limitevents",t),QE("p20remoteview",t&&Q("p20remotecontrol").checked),QE("p20remotelimitedinput",t&&Q("p20remotecontrol").checked&&!Q("p20remoteview").checked),QE("p20noterminal",t&&Q("p20remotecontrol").checked),QE("p20nofiles",t&&Q("p20remotecontrol").checked),QE("p20noamt",t&&Q("p20remotecontrol").checked),QE("p20chatnotify",t),QE("p20uninstall",t)}function p20showAddMeshUserDialogEx(){var e=0;1==Q("p20fulladmin").checked?e=4294967295:(1==Q("p20editmesh").checked&&(e+=1),1==Q("p20manageusers").checked&&(e+=2),1==Q("p20managecomputers").checked&&(e+=4),1==Q("p20remotecontrol").checked&&(e+=8),1==Q("p20meshagentconsole").checked&&(e+=16),1==Q("p20meshserverfiles").checked&&(e+=32),1==Q("p20wakedevices").checked&&(e+=64),1==Q("p20editnotes").checked&&(e+=128),1==Q("p20remoteview").checked&&(e+=256),1==Q("p20noterminal").checked&&(e+=512),1==Q("p20nofiles").checked&&(e+=1024),1==Q("p20noamt").checked&&(e+=2048),1==Q("p20remotelimitedinput").checked&&(e+=4096),1==Q("p20limitevents").checked&&(e+=8192),1==Q("p20chatnotify").checked&&(e+=16384),1==Q("p20uninstall").checked&&(e+=32768));var t=Q("dp20username").value.split(","),o=[];for(var n in t)o.push(t[n].trim());meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,usernames:o,meshadmin:e})}function p20viewuser(e){if(!xxdialogMode){e=decodeURIComponent(e);var t=[],o=currentMesh.links[userinfo._id].rights,n=currentMesh.links[e].rights;4294967295==n?t.push("Administrateur Complet"):(0!=(1&n)&&t.push("Edit Device Group"),0!=(2&n)&&t.push("Manage Device Group Users"),0!=(4&n)&&t.push("Manage Device Group Computers"),0!=(8&n)&&t.push("Télécommande"),0!=(16&n)&&t.push("Agent Console"),0!=(32&n)&&t.push("Server Files"),0!=(64&n)&&t.push("Wake Devices"),0!=(128&n)&&t.push("Modifier les notes"),0!=(256&n)&&t.push("Remote View Only"),0!=(512&n)&&t.push("No Terminal"),0!=(1024&n)&&t.push("Aucun fichier"),0!=(2048&n)&&t.push("No Intel&reg; AMT"),0!=(8&n)&&0!=(4096&n)&&0==(256&n)&&t.push("Limited Input"),0!=(8192&n)&&t.push("Self Events Only"),0!=(16384&n)&&t.push("Chat & Notify"),0!=(32768&n)&&t.push("Uninstall")),0==t.length&&t.push("No Rights");var i=1,a=addHtmlValue("Utilisateur",EscapeHtml(decodeURIComponent(e.split("/")[2])));a+=addHtmlValue("Permissions",t.join(", ")),userinfo._id!=e&&(4294967295==o||0!=(2&o)&&4294967295!=n)&&(i+=4),setDialogMode(2,"Device Group User",i,p20viewuserEx,a,e)}}function p20viewuserEx(e,t){2==e&&setDialogMode(2,"Remote Mesh User",3,p20viewuserEx2,format("Confirm removal of user {0}?",t.split("/")[2]),t)}function p20deleteUser(e,t){haltEvent(e),p20viewuserEx(2,decodeURIComponent(t))}function p20viewuserEx2(e,t){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:t})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xxcurrentView=-1;function go(e){if(setSessionActivity(),!xxdialogMode&&xxcurrentView!=e){updateFooterMenu(),setDialogMode(0);for(var t=0;t<32;t++)QV("p"+t,t==e);xxcurrentView=e}}function setDialogMode(e,t,o,n,i,a){setSessionActivity(),xxdialogMode=e,xxdialogFunc=n,xxdialogButtons=o,xxdialogTag=a,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&o),QV("idx_dlgCancelButton",2&o),QV("id_dialogclose",2&o||8&o),QV("idx_dlgButtonBar",7&o),t&&QH("id_dialogtitle",t);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){setSessionActivity();var t=xxdialogFunc,o=xxdialogButtons,n=xxdialogTag;setDialogMode(),(8&o||e)&&t&&t(e,n)}function putstore(e,t){try{if("undefined"==typeof localStorage||localStorage.getItem(e)==t)return;null==t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}if("_"!=e[0]){for(var o={},n=0,i=localStorage.length;n<i;++n){var a=localStorage.key(n);"_"!=a[0]&&(o[a]=localStorage.getItem(a))}meshserver.send({action:"userWebState",state:JSON.stringify(o)})}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}function center(){QS("dialog").left=(getDocWidth()-300)/2+"px",deskAdjust(),deskAdjust()}function messagebox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function reload(){window.location.href=window.location.href}function getNodeFromId(e){for(var t in nodes)if(nodes[t]._id==e)return nodes[t];return null}function addHtmlValue(e,t){return"<table><td style=width:120px>"+e+"<td><b>"+t+"</b></table>"}function addHtmlValue2(e,t){return"<div><div style=display:inline-block;float:right>"+t+"</div><div style=display:inline-block>"+e+"</div></div>"}function addLink(e,t){return"<a style=cursor:pointer;color:darkblue;text-decoration:none onclick='"+t+"'>&diams; "+e+"</a>"}function addLinkConditional(e,t,o){return o?addLink(e,t):e}function passwordcheck(e){return/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/.test(e)}function getFileSizeStr(e){return 1==e?"1 octet":format("{0} bytes",e)}function joinPaths(){var e=[];for(var t in arguments){var o=arguments[t];if(null!=o&&""!=o){for(;o.endsWith("/")||o.endsWith("\\");)o=o.substring(0,o.length-1);for(;o.startsWith("/")||o.startsWith("\\");)o=o.substring(1);e.push(o)}}return e.join("/")}function focusTextBox(e){setTimeout(function(){Q(e).selectionStart=Q(e).selectionEnd=65535,Q(e).focus()},0)}isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function parseUriArgs(){var e,t={},o=window.document.location.href.split(/[\?&|\=]/);for(n in o.splice(0,1),o)switch(n%2){case 0:e=decodeURIComponent(o[n]);break;case 1:t[e]=decodeURIComponent(o[n]);var n=parseInt(t[e]);n==t[e]&&(t[e]=n)}return t}function printDate(e){return e.toLocaleDateString(args.locale)}function printTime(e){return e.toLocaleTimeString(args.locale)}function printDateTime(e){return e.toLocaleString(args.locale)}function format(e){var o=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==o[t]?o[t]:e})}function nobreak(e){return e.split(" ").join("&nbsp;")}</script>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script keeplink=1 src=scripts/filesaver.js></script><title>{{{title}}}</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}.i1{background:url(../images/icons50.png) 0 0;height:50px;width:50px;border:none}.i2{background:url(../images/icons50.png) -50px 0;height:50px;width:50px;border:none}.i3{background:url(../images/icons50.png) -100px 0;height:50px;width:50px;border:none}.i4{background:url(../images/icons50.png) -150px 0;height:50px;width:50px;border:none}.i5{background:url(../images/icons50.png) -200px 0;height:50px;width:50px;border:none}.i6{background:url(../images/icons50.png) -250px 0;height:50px;width:50px;border:none}.m0{background:url(../images/images16.png) -32px 0;height:16px;width:16px;border:none;float:left}.m1{background:url(../images/images16.png) -16px 0;height:16px;width:16px;border:none;float:left}.m2{background:url(../images/images16.png) -96px 0;height:16px;width:16px;border:none;float:left}.m3{background:url(../images/images16.png) -112px 0;height:16px;width:16px;border:none;float:left}.gray{filter:gray;-webkit-filter:grayscale(100%) opacity(60%)}.DevSt{padding-left:5px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#ddd}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:#fff;clear:both}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style="width:calc(100% - 50px);overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><img id=topMenuIcon class=noselect style=position:absolute;right:0;top:10px;bottom:50px;color:#c8c8c8;font-size:44px;margin-right:8px;cursor:pointer;display:none onclick=topMenu() src=/images/3bars-30.png width=30 height=30></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%><div id=column_l style=width:100%;padding:0;position:absolute;bottom:0;top:0><div id=p0 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p0message style=text-align:center;width:100%><span id=p0span>Server disconnected</span>,<href onclick=reload() style=cursor:pointer><u>click to reconnect</u></href>.</div></div></div><div id=p1 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p1message style=text-align:center;width:100%></div></div></div><div id=p2 style=display:none><div id=xdevices></div></div><div id=p3 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large><span id=p3userName></span></strong><br></div></table><div id=p3info style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div style=margin-left:8px><div id=p3AccountActions><p><strong>Account Security</strong><div style=margin-left:9px;margin-bottom:8px><div id=manageAuthApp style=margin-top:5px;display:none><a onclick=account_manageAuthApp() style=cursor:pointer>Manage authenticator app</a></div><div id=manageOtp style=margin-top:5px;display:none><a onclick=account_manageOtp(0) style=cursor:pointer>Manage backup codes</a></div></div><p><strong>Account Actions</strong><div style=margin-left:9px;margin-bottom:8px><div style=margin-top:5px><span id=verifyEmailId style=display:none><a onclick=account_showVerifyEmail() style=cursor:pointer>Vérifier le courriel</a></span></div><div style=margin-top:5px><span id=changeEmailId style=display:none><a onclick=account_showChangeEmail() style=cursor:pointer>Change email address</a></span></div><div style=margin-top:5px><a onclick=account_showChangePassword() style=cursor:pointer>Change password</a><span id=p2nextPasswordUpdateTime></span></div><div style=margin-top:5px><a onclick=account_showDeleteAccount() style=cursor:pointer>Delete account</a></div></div><br style=clear:both></div><strong>Device Groups</strong> <span id=p3createMeshLink1>( <a onclick=account_createMesh() style=cursor:pointer><img src=images/icon-addnew.png width=12 height=12 border=0> Nouveau</a> )</span><br><br><div id=p3meshes></div><div id=p3noMeshFound style=margin-left:9px;display:none>Aucun groupe d'appareils.<span id=p3createMeshLink2> <a onclick=account_createMesh() style=cursor:pointer><strong>Commencez ici!</strong></a></span></div><br style=clear:both></div></div></div><div id=p5 style=display:none><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large>Mes Dossiers</strong><br></div></table><div id=p5myfiles style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><table id=p5toolbar style=width:100%;height:78px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5FolderUp disabled onclick=p5folderup() value=Up> <input type=button style="width:calc(100%/5 - 5px)"id=p5SelectAllButton disabled onclick=p5selectallfile() value=ToutSélectionner onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RenameFileButton disabled value=Renommer onclick=p5renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5DeleteFileButton disabled value=Delete onclick=p5deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5NewFolderButton disabled value=Dossier onclick=p5createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5UploadButton disabled value=Télécharger onclick=p5uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CutButton disabled value=Cut onclick=p5copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CopyButton disabled value=Copy onclick=p5copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5PasteButton disabled value=Coller onclick=p5pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RefreshButton value=Rafraîchir onclick=p5refreshFiles() onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p5currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></table></table><div id=p5filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p5files></span></div><table id=p5toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0;background-color:#d3d9d6 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px>&nbsp;<span id=p5bottomstatus></span><td id=p5rightOfButtons style=text-align:right;padding:3px></table></div></div><div id=p10 style=display:none;position:absolute;bottom:0;top:0;width:100%;overflow:hidden><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0;position:absolute;top:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><a id=MainComputerImage style=cursor:pointer onclick=p10showiconselector()></a><td><div style=margin-left:5px><strong><span id=p10deviceName></span></strong><br><span id=MainComputerState></span></div></table><div id=p10general style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div id=p10html style=margin-left:8px;margin-right:8px></div><div id=p10html2></div><div id=p10html3></div></div><div id=p10desktop style=overflow:hidden;position:absolute;top:55px;bottom:0;width:100%;display:none><div id=deskarea1 style=position:absolute;top:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><span id=p14power></span>&nbsp; <input id=DeskSoftInput style=width:25px;display:none;opacity:.2 onblur=toggleSoftKeys(0) onkeypress="return ondeskkeypress(event)"onkeydown="return ondeskkeydown(event)"onkeyup="return ondeskkeyup(event)"></div><div style=margin-left:3px><input type=button id=connectbutton1 value=Connect onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=connectbutton1h value="Connexion AMT"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=disconnectbutton1 value=Disconnect onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1> <span id=deskstatus>Débranché</span></div></div></div><div id=deskarea3 style="position:absolute;top:25px;width:100%;height:calc(100% - 50px)"><div id=deskarea3x style=background:#000;text-align:center;height:100%;position:relative><div id=DeskParent style=height:100%><canvas id=Desk width=640 height=200 style=width:100%;-ms-touch-action:none;margin-left:0 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid #d3d3d3;display:none"><a id=DeskToolsRefreshButton style=float:right;padding:3px;cursor:pointer onclick=refreshDeskTools()>Rafraîchir</a><div id=DeskToolsBar style="position:absolute;padding:3px;border-radius:3px 3px 0 0;top:5px;left:4px;bottom:26px;background-color:#d3d3d3;cursor:pointer">Processus</div><div style=position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:#d3d3d3;text-align:left><div style="border-bottom:1px solid #a9a9a9;padding:3px"><a style=width:50px;padding-right:5px;float:left;cursor:pointer onclick=sortProcess(0)>PID</a><a style=cursor:pointer onclick=sortProcess(1)>Nom</a></div><div id=DeskToolsProcesses style=overflow-y:scroll;position:absolute;top:24px;bottom:0;width:100%></div></div></div></div></div><div id=deskarea4 style=position:absolute;bottom:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><select id=termdisplays style=display:none onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>&nbsp; <span id=DeskToastButton><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span>&nbsp;</div><div><input id=deskActionsBtn type=button style=margin-left:3px onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction()> <input type=button value=Paramètres onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings()> <input type=button onkeypress=return!1 onkeydown=return!1 value="Power Actions..."onclick=showPowerActionDlg() style=display:none> <input id=DeskSpecialKeys type=button value="Special Keys"onkeypress=return!1 onkeydown=return!1 onclick=sendSpecialKeys()> <input id=DeskSoftKeys type=button value=Clavier onkeypress=return!1 onkeydown=return!1 onclick=toggleSoftKeys(1)> <label><span id=DeskControlSpan style=display:none><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1>Input</span></label></div></div></div></div><div id=p10files style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%;display:none><table id=p13toolbar style=width:100%;height:111px cellpadding=0 cellspacing=0><tr><td style="background-color:silver;border-bottom:2px solid #000;padding:2px"><div style=float:right;text-align:right><input id=filesActionsBtn type=button onkeypress=return!1 onkeydown=return!1 value=Actions onclick=deviceActionFunction() style=margin-right:2px></div><div style=margin-left:2px><input id=p13AutoConnect value=AutoConnect onclick=autoConnectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button style=display:none> <input id=p13Connect value=Connect onclick=connectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button> <span id=p13Status>Débranché</span></div><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13FolderUp disabled onclick=p13folderup() value=Up> <input type=button style="width:calc(100%/5 - 5px)"id=p13SelectAllButton disabled onclick=p13selectallfile() value=ToutSélectionner onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RenameFileButton disabled value=Renommer onclick=p13renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13DeleteFileButton disabled value=Delete onclick=p13deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13NewFolderButton disabled value=Dossier onclick=p13createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13UploadButton disabled value=Télécharger onclick=p13uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CutButton disabled value=Cut onclick=p13copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CopyButton disabled value=Copy onclick=p13copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13PasteButton disabled value=Coller onclick=p13pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RefreshButton disabled value=Rafraîchir onclick=p13folderup(9999) onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p13currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></table></table><div id=p13filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p13files></span></div><table id=p13toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#d3d9d6>&nbsp;<span id=p13bottomstatus></span></table></div></div><div id=p20 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td onclick=p20editmesh(1)><img src=/images/meshicon50.png width=50 height=50><td onclick=p20editmesh(1)><div style=margin-left:5px><strong style=font-size:large><span id=p20meshName></span></strong><br></div></table><div id=p20info style=margin-left:8px;margin-right:8px></div></div></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table id=footerMenu cellpadding=0 cellspacing=0 style=height:32px;width:100%;color:#fff;cursor:pointer;table-layout:fixed></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:90px;width:300px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div><div id=dialog3 style=margin:auto;margin:3px><select id=deskkeys style=width:100%><option value=10>Ctrl+Alt+Del<option value=11>Tab<option value=5>Win<option value=0>Win+Down<option value=1>Win+Up<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab</select></div><div id=dialog7 style=margin:auto;margin:3px><div id=d7meshkvm><h4 style="width:100%;border-bottom:1px solid gray">Agent Remote Desktop</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir=rtl></select><div style=height:20px>Qualité</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Mise à l'échelle</div></div><div style="margin:3px 0 3px 0"><select id=d7framelimiter style=float:right;width:200px;height:20px dir=rtl><option selected value=50>Vite<option value=100>Moyen<option value=400>Lent<option value=1000>Très lent</select><div style=height:20px>Rate</div></div></div><div id=d7amtkvm><h4 style="width:100%;border-bottom:1px solid gray">Intel® AMT Hardware KVM</h4><div style=height:26px><select id=d7desktopmode style=float:right;width:200px><option value=1>RLE8, le plus rapide<option value=2>RLE16, recommandé<option value=3>RAW8, lent<option value=4>RAW16, très lent</select><div>Encoding</div></div><div style=height:60px><div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:#fff"><label><input type=checkbox id=d7showfocus>Show Focus Tool</label><br><label><input type=checkbox id=d7showcursor>Show Local Mouse Cursor</label><br></div><div>Autre</div></div></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Annuler style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK style=float:right;width:80px onclick=dialogclose(1)></div></div><div id=topMenu style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:0 0 5px 5px;position:fixed;top:50px;right:5px;width:170px;display:none"><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(2)>Mes Dossiers</div><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(1)>Mon Compte</div><div id=logoutMenuOption><a href=/logout><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer">Déconnexion</div></a></div></div><iframe name=fileUploadFrame style=display:none></iframe><script>"use strict";var webState="{{{webstate}}}";for(var i in""!=webState&&(webState=JSON.parse(decodeURIComponent(webState))),webState)localStorage.setItem(i,webState[i]);webState.loctag||localStorage.removeItem("loctag");var files,args=parseUriArgs(),debugLevel=parseInt("{{{debuglevel}}}"),features=parseInt("{{{features}}}"),sessionTime=parseInt("{{{sessiontime}}}"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",authCookie="{{{authCookie}}}",authRelayCookie="{{{authRelayCookie}}}",authCookieRenewTimer=null,meshserver=null,xdr=null,serverinfo=null,nodes=[],meshes={},filetree={},userinfo=null,users=(serverinfo=null,null),nodeShortIdent=0,serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}",debugmode=!1,attemptWebRTC=0!=(128&features),StatusStrs=["Débranché","Connecting...","Traitement...","Connected","Intel&reg; AMT Connected"],passRequirements="{{{passRequirements}}}";""!=passRequirements&&(passRequirements=JSON.parse(decodeURIComponent(passRequirements)));var sessionActivity=Date.now();function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(!args.locale){var t=getstore("loctag",0);null!=t&&"*"!=t&&(args.locale=t)}(window.onresize=center)(),QV("changeEmailId",0==(2097152&features)),QH("p1message","Connecting..."),go(1),(meshserver=MeshServerCreateControl(domainUrl,authCookie)).onStateChanged=onStateChanged,meshserver.onMessage=onMessage,meshserver.Start();var o=localStorage.getItem("desktopsettings");null!=o&&(desktopsettings=JSON.parse(o)),applyDesktopSettings()}function onStateChanged(e,t,o,n){if(0==t){if(setDialogMode(0),go(0),"noauth"==n)return void QH("p0span","Unable to perform authentication");2==o?setTimeout(serverPoll,5e3):QH("p0span","Unable to connect web socket"),null!=authCookieRenewTimer&&(clearInterval(authCookieRenewTimer),authCookieRenewTimer=null)}else 2==t&&(meshserver.send({action:"meshes"}),meshserver.send({action:"nodes"}),meshserver.send({action:"files"}),xxcurrentView<2&&go(2),authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},18e5));QV("topMenuIcon",2==t)}function serverPoll(){xdr=null;try{xdr=new XDomainRequest}catch(e){}(xdr=xdr||new XMLHttpRequest).open("HEAD",window.location.href),xdr.timeout=15e3,xdr.onload=function(){reload()},xdr.onerror=xdr.ontimeout=function(){setTimeout(serverPoll,1e4)},xdr.send()}function updateSelf(){if(QV("verifyEmailId",!0!==userinfo.emailVerified&&null!=userinfo.email&&1==serverinfo.emailcheck),QV("manageAuthApp",4096&features),QV("manageOtp",0!=(4096&features)&&(1==userinfo.otpsecret||0<userinfo.otphkeys)),QV("p3createMeshLink1",!1),QV("p3createMeshLink2",!1),"number"==typeof userinfo.passchange)if(-1==userinfo.passchange)QH("p2nextPasswordUpdateTime"," - Réinitialiser à la prochaine connexion.");else if(null!=passRequirements&&"number"==typeof passRequirements.reset){var e=userinfo.passchange+86400*passRequirements.reset-Math.floor(Date.now()/1e3);e<0?QH("p2nextPasswordUpdateTime"," - Réinitialiser à la prochaine connexion."):e<3600?QH("p2nextPasswordUpdateTime",format(" - Réinitialisation en {0} minute {1}.",Math.floor(e/60),addLetterS(Math.floor(e/60)))):e<86400?QH("p2nextPasswordUpdateTime",format(" - Réinitialisation dans {0} heure {1}.",Math.floor(e/3600),addLetterS(Math.floor(e/3600)))):QH("p2nextPasswordUpdateTime",format(" - Réinitialiser dans le {0} jour {1}."),Math.floor(e/86400),addLetterS(Math.floor(e/86400)))}}function addLetterS(e){return 1<e?"s":""}function setSessionActivity(){sessionActivity=Date.now()}function checkIdleSessionTimeout(){Date.now()-sessionActivity>serverinfo.timeout&&(window.location.href="logout")}function onMessage(e,t){switch(t.action){case"serverinfo":(serverinfo=t.serverinfo).timeout&&(setInterval(checkIdleSessionTimeout,1e4),checkIdleSessionTimeout()),QV("p3AccountActions",0==(4&features)&&0==serverinfo.domainauth),QV("logoutMenuOption",0==(4&features)&&0==serverinfo.domainauth);break;case"authcookie":authCookie=t.cookie,authRelayCookie=t.rcookie;break;case"userinfo":userinfo=t.userinfo,QH("p3userName",userinfo.name),updateSelf();break;case"users":for(var o in users={},t.users)users[t.users[o]._id]=t.users[o];updateUsers();break;case"wssessioncount":wssessions=t.wssessions,updateUsers();break;case"meshes":for(var o in meshes={},t.meshes)meshes[t.meshes[o]._id]=t.meshes[o];updateMeshes(),updateDevices();break;case"files":filetree=setupBackPointers(t.filetree),updateFiles();break;case"nodes":for(var o in nodes=[],t.nodes)for(var n in t.nodes[o])meshes[o]?(t.nodes[o][n].namel=t.nodes[o][n].name.toLowerCase(),t.nodes[o][n].rname?t.nodes[o][n].rnamel=t.nodes[o][n].rname.toLowerCase():t.nodes[o][n].rnamel=t.nodes[o][n].namel,t.nodes[o][n].meshnamel=meshes[o].name.toLowerCase(),t.nodes[o][n].meshid=o,t.nodes[o][n].state=t.nodes[o][n].state?t.nodes[o][n].state:0,t.nodes[o][n].desc=t.nodes[o][n].desc,t.nodes[o][n].icon||(t.nodes[o][n].icon=1),t.nodes[o][n].ident=++nodeShortIdent,nodes.push(t.nodes[o][n])):console.log("Invalid mesh (1): "+o);updateDevices(),0==xxcurrentView&&go(parseInt("{{viewmode}}")),gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"));break;case"powertimeline":if(t.nodeid!=powerTimelineReq)break;powerTimelineNode=t.nodeid,powerTimeline=t.timeline,powerTimelineUpdate=Date.now()+3e5,currentNode._id==t.nodeid&&drawDeviceTimeline();break;case"otpauth-request":if(2==xxdialogMode&&"otpauth-request"==xxdialogTag){var i=t.secret;52==i.length?i=i.split(/(.............)/).filter(Boolean).join(" "):32==i.length&&(i=(i=i.split(/(....)/).filter(Boolean).join(" ")).substring(0,20)+"<br/>"+i.substring(20)),QH("d2optinfo",'Install <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank>Google Authenticator</a> or a compatible application, use <a href="\' + message.url + \'" rel="noreferrer noopener" target=_blank> this link</a> or enter the secret below. Then, enter the current 6 digit token to activate 2-Step login.<br /><br /><div style=width:100%;text-align:center><tt id=d2optsecret secret="'+t.secret+'" style=font-size:15px>'+i+'</tt><br /><br />Token: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></div>'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"Authenticator App",1,null,t.success?"<b style=color:green>2-step login activation successful</b>. You will now need a valid token to login again.":"<b style=color:red>2-step login activation failed</b>. Clear the secret from the application and try again. You only have a few minutes to enter the proper code.");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"Authenticator App",1,null,t.success?"<b style=color:green>2-step login activation removed</b>. You can reactivate this feature at any time.":"<b style=color:red>2-step login activation removal failed</b>. Try again.");break;case"otpauth-getpasswords":if(xxdialogMode)return;var a="One time tokens can be used as secondary authentication. Generate a set, print them and keep them in a safe place.";if(a+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(a+="<tr>");for(var r=""+t.passwords[l].p;r.length<8;)r="0"+r;!0===t.passwords[l].u?a+="<td>"+r.substring(0,4)+"&nbsp;"+r.substring(4):a+="<td><strike style=color:#BBB>"+r.substring(0,4)+"&nbsp;"+r.substring(4)}}else a+="<tr><td>No Active Tokens";a+="</table></div></div><br />",a+="<div><input type=button value='Close' onclick=setDialogMode(0) style=float:right></input>",a+="<input type=button value='Nouveaux Jetons' onclick='account_manageOtp(1);'></input>",null!=t.passwords&&(a+="<input type=button value='Clear' onclick='account_manageOtp(2);'></input>"),setDialogMode(2,"Manage Backup Codes",8,null,a+="</div><br />","otpauth-manage");break;case"event":if(t.event.noact)break;switch(t.event.action){case"userWebState":if(null!=localStorage){var d=JSON.parse(t.event.state);for(var l in d)localStorage.setItem(l,d[l]);null!=d.loctag&&d.loctag!=oldLoctag&&(null!=d.loctag?args.locale=d.loctag:delete args.locale,updateDevices(),updateMeshes())}break;case"accountchange":if(userinfo.name==t.event.account.name){var p=t.event.account.siteadmin?t.event.account.siteadmin:0,c=userinfo.siteadmin?userinfo.siteadmin:0;(t.event.account.quota!=userinfo.quota||0==(8&userinfo.siteadmin)&&0!=(8&t.event.account.siteadmin))&&meshserver.send({action:"files"}),userinfo=t.event.account,c!=p&&updateSiteAdmin(),updateSelf()}break;case"createmesh":null!=t.event.links[userinfo._id]&&(meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},updateMeshes(),updateDevices(),meshserver.send({action:"files"}));break;case"meshchange":if(null==meshes[t.event.meshid])meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},meshserver.send({action:"nodes"});else{if(meshes[t.event.meshid].name!=t.event.name)for(var l in meshes[t.event.meshid].name=t.event.name,nodes)nodes[l].meshid==t.event.meshid&&(nodes[l].meshnamel=t.event.name.toLowerCase());if(meshes[t.event.meshid].desc=t.event.desc,meshes[t.event.meshid].links=t.event.links,null==meshes[t.event.meshid].links[userinfo._id]){20==xxcurrentView&&currentMesh==meshes[t.event.meshid]&&go(2),delete meshes[t.event.meshid];var u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2))}}updateMeshes(),updateDevices(),meshserver.send({action:"files"}),20==xxcurrentView&&currentMesh._id==t.event.meshid&&p20updateMesh();break;case"deletemesh":meshes[t.event.meshid]&&(delete meshes[t.event.meshid],updateMeshes(),meshserver.send({action:"files"}));u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,updateDevices(),20<=xxcurrentView&&xxcurrentView<30&&currentMesh._id==t.event.meshid&&(setDialogMode(0),go(2)),10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2));break;case"addnode":var m=t.event.node;if(!meshes[m.meshid])break;if(null!=getNodeFromId(m._id))break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices();break;case"removenode":var h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1),updateDevices()}break;case"changenode":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).name=t.event.node.name,m.rname=t.event.node.rname,m.host=t.event.node.host,m.desc=t.event.node.desc,m.publicip=t.event.node.publicip,m.iploc=t.event.node.iploc,m.wifiloc=t.event.node.wifiloc,m.gpsloc=t.event.node.gpsloc,m.tags=t.event.node.tags,m.userloc=t.event.node.userloc,null!=t.event.node.agent&&(null==m.agent&&(m.agent={}),null!=t.event.node.agent.ver&&(m.agent.ver=t.event.node.agent.ver),null!=t.event.node.agent.id&&(m.agent.id=t.event.node.agent.id),null!=t.event.node.agent.caps&&(m.agent.caps=t.event.node.agent.caps),null!=t.event.node.agent.core?m.agent.core=t.event.node.agent.core:m.agent.core&&delete m.agent.core,m.agent.tag=t.event.node.agent.tag),null!=t.event.node.intelamt&&(null==m.intelamt&&(m.intelamt={}),null!=t.event.node.intelamt.state&&(m.intelamt.state=t.event.node.intelamt.state),null!=t.event.node.intelamt.host&&(m.intelamt.user=t.event.node.intelamt.host),null!=t.event.node.intelamt.user&&(m.intelamt.user=t.event.node.intelamt.user),null!=t.event.node.intelamt.tls&&(m.intelamt.tls=t.event.node.intelamt.tls),null!=t.event.node.intelamt.ver&&(m.intelamt.ver=t.event.node.intelamt.ver),null!=t.event.node.intelamt.tag&&(m.intelamt.tag=t.event.node.intelamt.tag),null!=t.event.node.intelamt.uuid&&(m.intelamt.uuid=t.event.node.intelamt.uuid),null!=t.event.node.intelamt.realm&&(m.intelamt.realm=t.event.node.intelamt.realm)),m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,t.event.node.icon&&(m.icon=t.event.node.icon),refreshDevice(m._id),updateDevices();break;case"nodemeshchange":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1)):(m.meshid=t.event.newMeshId,m.meshnamel=meshes[t.event.newMeshId].name.toLowerCase()),updateDevices(),refreshDevice(t.event.nodeid)}else{m=t.event.node;if(!meshes[m.meshid])break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices()}break;case"nodeconnect":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).conn=t.event.conn,m.pwr=t.event.pwr,updateDevices();break;case"login":null!=users&&users["user/"+domain+"/"+t.event.username.toLowerCase()]&&(users["user/"+domain+"/"+t.event.username.toLowerCase()].login=t.event.time)}}}function topMenu(e){null!=xxdialogMode&&0!=xxdialogMode&&999!=xxdialogMode||(void 0===e?1==("none"==QS("topMenu").display)?0!=xxdialogMode&&null!=xxdialogMode||(QV("topMenu",!0),xxdialogMode=999):(QV("topMenu",!1),xxdialogMode=0):(QV("topMenu",!1),xxdialogMode=0,1==e&&3!=xxcurrentView&&goForward("account"),2==e&&5!=xxcurrentView&&goForward("files")))}var filetreelinkpath,backStack=[];function goBack(){xxdialogMode||(0<backStack.length&&backStack.pop(),goStack())}function goForward(e){xxdialogMode||(backStack.push(e),goStack())}function goStack(){if(0!=backStack.length){var e=backStack[backStack.length-1],t=e.split("/")[0];"node"==t&&(setupDeviceMenu(0),gotoDevice(e)),"mesh"==t&&gotoMesh(e),"account"==t&&go(3),"devices"==t&&go(2),"files"==t&&go(5)}else go(2)}function updateFooterMenu(e){for(;null!=e&&e.length<3;)e.push({n:""});var t="",o="";if(null!=e)for(var n in e)t+='<td style="cursor:pointer'+(""==o?"":";border-left:solid 1px white")+'" onclick="'+e[n].f+'">'+e[n].n,o=e[n].n;QH("footerMenu","<tr>"+t)}function account_manageAuthApp(){xxdialogMode||0==(4096&features)||(1==userinfo.otpsecret?account_removeOtp():account_addOtp())}function account_addOtp(){xxdialogMode||1==userinfo.otpsecret||0==(4096&features)||(setDialogMode(2,"Authenticator App",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>Chargement...</div>","otpauth-request"),meshserver.send({action:"otpauth-request"}))}function account_addOtpCheck(e){var t=6==Q("d2otpauthinput").value.length;QE("idx_dlgOkButton",t),e&&13==e.keyCode&&t&&dialogclose(1)}function account_removeOtp(){xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||setDialogMode(2,"Authenticator App",3,function(){meshserver.send({action:"otpauth-clear"})},"Confirm removal of authenticator application 2-step login?")}function account_manageOtp(e){2==xxdialogMode&&"otpauth-manage"==xxdialogTag&&dialogclose(0),xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||meshserver.send({action:"otpauth-getpasswords",subaction:e})}function account_showVerifyEmail(){xxdialogMode||1==userinfo.emailVerified||1!=serverinfo.emailcheck||setDialogMode(2,"Email Verification",3,account_showVerifyEmailEx,"Click ok to send a verification mail to:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>Please wait a few minute to receive the verification.")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"Email Address Change",3,account_changeEmail,addHtmlValue("Email","<input id=dp3email style=width:170px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />")),null!=userinfo.email&&(Q("dp3email").value=userinfo.email),account_validateEmail(),Q("dp3email").focus())}function account_validateEmail(e,t){QE("idx_dlgOkButton",validateEmail(Q("dp3email").value)&&Q("dp3email").value!=userinfo.email),null!=e&&13==e.keyCode&&dialogclose(1)}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp3email").value})}function account_showDeleteAccount(){if(!xxdialogMode){var e="<form method=post><table style=margin-left:10px><input type=hidden name=action value=deleteaccount /><input type=hidden name=authcookie value="+authCookie+" /><tr>";e+="<td align=right>Mot de passe:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr><tr><td align=right>Mot de passe:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr></table><div style=padding:10px;margin-bottom:4px>",e+='<input id=account_dlgCancelButton type=button value="Annuler" style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>',e+='<input id=account_dlgOkButton type=submit value="OK" style="float:right;width:80px" onclick=dialogclose(1)>',setDialogMode(2,"Delete Account",0,null,e+="</div><br /></form>"),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="<table style=margin-left:10px>";if(e+="<tr><td align=right>"+nobreak("Ancien mot de passe:")+"</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nouveau mot de passe:")+"</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nouveau mot de passe:")+"</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>",65536&features&&(e+="<tr><td align=right>Password hint:</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"),e+="</table>",passRequirements){var t=[],o=0;for(var n in passRequirements)"reset"!=n&&"hint"!=n&&(t.push(n+":"+passRequirements[n]),o++);0<o&&(e+="<br /><span style=font-size:x-small>"+format("Exigences: {0}.",t.join(", "))+"</span>")}return setDialogMode(2,"Change Password",3,account_showChangePasswordEx,e+="<br />"),Q("apassword0").focus(),account_validateNewPassword(),!1}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var e={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};65536&features&&(e.hint=Q("apasswordhint").value),meshserver.send(e)}}function account_createMesh(){if(!xxdialogMode)if(4294967295==userinfo.siteadmin||0==(64&userinfo.siteadmin))if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var e=addHtmlValue("Nom","<input id=dp3meshname style=width:170px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");e+=addHtmlValue("Type","<div style=width:170px;margin:0;padding:0><select id=dp3meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>Groupe d'agents logiciels</option><option value=1>Intel&reg; AMT only</option></select></div>"),setDialogMode(2,"Create Device Group",3,account_createMeshEx,e+=addHtmlValue("Description","<div style=width:170px;margin:0;padding:0><textarea id=dp3meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"Account Security",1,null,'Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the "My Account" and look at the "Account Security" section.');else setDialogMode(2,"Account Security",1,null,'Unable to access a device until a email address is verified. This is required for password recovery. Go to the "My Account" to change and verify an email address.');else setDialogMode(2,"Nouveau Group",1,null,"This account does not have the rights to create a new device group.")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0<Q("dp3meshname").value.length)}function account_createMeshEx(e,t){meshserver.send({action:"createmesh",meshname:Q("dp3meshname").value,meshtype:Q("dp3meshtype").value,desc:Q("dp3meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value)}function account_validateNewPassword(){var e="",t=0<Q("apassword0").value.length&&0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value&&Q("apassword0").value!=Q("apassword1").value;if(65536&features&&Q("apasswordhint").value==Q("apassword1").value&&(t=!1),""!=Q("apassword1").value)if(null==passRequirements||""==passRequirements){var o=checkPasswordStrength(Q("apassword1").value);e=80<=o?"<span style=color:green>Strong<span>":60<=o?"<span style=color:blue>&#9679;<span>":"<span style=color:red>&#9679;<span>"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="<span style=color:red>Politique<span>")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,o={},n=0,i={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var a=0;a<e.length;a++)o[e[a]]=(o[e[a]]||0)+1,t+=5/o[e[a]];for(var s in i)n+=1==i[s]?1:0;return parseInt(t+10*(n-1))}function checkPasswordRequirements(e,t){if(null==t||""==t||"object"!=typeof t)return!0;if(t.min&&e.length<t.min)return!1;if(t.max&&e.length>t.max)return!1;for(var o=0,n=0,i=0,a=0,s=0;s<e.length;s++)/\d/.test(e[s])&&o++,/[a-z]/.test(e[s])&&n++,/[A-Z]/.test(e[s])&&i++,/\W/.test(e[s])&&a++;return!(t.num&&o<t.num)&&(!(t.lower&&n<t.lower)&&(!(t.upper&&i<t.upper)&&!(t.nonalpha&&a<t.nonalpha)))}function updateMeshes(){var e="",t=0;for(i in meshes){t++;var o=meshes[i].links[userinfo._id].rights,n="Partial Rights";4294967295==o?n="Administrateur Complet":0==o&&(n="No Rights"),e+="<div style=cursor:pointer onclick=goForward('"+i+"')>",e+='<div style="float:left;margin-left:4px"><img src="/images/meshicon50.png" width=50 height=50 /></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+EscapeHtml(meshes[i].name)+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+n+"</div></div>",e+="</div></div>"}QH("p3meshes",e),QV("p3noMeshFound",0==t)}function gotoMesh(e){null==(currentMesh=meshes[e])&&goBack(),p20updateMesh(),go(20)}var sortorder,filetreelocation=[];function p5refreshFiles(){meshserver.send({action:"files"})}function updateFiles(){if(QV("MainMenuMyFiles",0==(8&features)),0==(8&features)){for(var e,t="",o="",n="<a style=cursor:pointer onclick=p5folderup(0)>Racine</a>",i="Root",a=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),c=0;c<p.length;c++)p[c].checked&&d.push(p[c].value);for(var c in filetreelinkpath="",filetreelocation){if(null==a.f||null==a.f[filetreelocation[c]])break;if(l.push(filetreelocation[c]),i+=" / "+filetreelocation[c],1==s){var u=filetreelocation[c].split("/");e=window.location+u[0]+"files/"+u[2],filetreelinkpath+=filetreelocation[c]}else""!=filetreelinkpath&&(filetreelinkpath+="/"+filetreelocation[c],2<s&&(e+="/"+filetreelocation[c]));n+=" / <a style=cursor:pointer onclick=p5folderup("+s+")>"+(null!=(a=a.f[filetreelocation[c]]).n?a.n:filetreelocation[c])+"</a>",s++}filetreelocation=l;var m=i.toLowerCase().startsWith("root / "+userinfo._id+" / public"),h=p5sort_files(a.f);for(var c in h){var f,g=h[c],v=g.n;f=40<(f=v).length?EscapeHtml(v.substring(0,40))+"...":EscapeHtml(v),v=EscapeHtml(v);var k="";null!=g.s&&(k=getFileSizeStr(g.s));var y="";if(g.t<3||4==g.t){y="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+v+"'>&nbsp;<span style=float:right;padding-right:4px>"+(1==g.t||4==g.t?p5getQuotabar(g):"")+"</span><span><div class=fileIcon"+g.t+'></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(g.nx)+'")>'+f+"</a></span></div>"}else{var x=f,b="";m&&(b=" (<a style=cursor:pointer onclick='p5showPublicLink(\""+e+"/"+g.nx+"\")'>Lien</a>)"),0<g.s&&(x='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+g.nx)+'">'+f+"</a>"+b),y="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+g.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+k+"</span><span><div class=fileIcon"+g.t+"></div>"+x+"</span></div>"}g.t<3?t+=y:o+=y}if(QH("p5rightOfButtons",p5getQuotabar(a)),QH("p5files",t+o),QH("p5currentpath",n),QE("p5FolderUp",0!=filetreelocation.length),QV("p5PublicShare",m),r==filetreelinkpath){p=document.getElementsByName("fc");for(c=0;c<p.length;c++)p[c].checked=0<=d.indexOf(p[c].value)}p5setActions()}}function getNiceSize(e){return e<=0?"Stockage dépassent":e<2048?format("{0}b left",e):e<2097152?format("{0}k left",Math.round(e/1024)):e<2147483648?format("{0}m left",Math.round(e/1024/1024)):format("{0}g left",Math.round(e/1024/1024/1024))}function p5getQuotabar(e){for(;1<e.t&&4!=e.t;)e=e.parent;return 1!=e.t&&4!=e.t||null==e.maxbytes?"":getNiceSize(e.maxbytes-e.s)+" <progress style=height:10px;width:100px value="+e.s+" max="+e.maxbytes+" />"}function p5showPublicLink(e){setDialogMode(2,"Lien public",1,null,'<input type=text style=width:100% value="'+e+'" readonly />')}function p5sort_filename(e,t){return e.ln>t.ln?1*sortorder:e.ln<t.ln?-1*sortorder:0}function p5sort_timestamp(e,t){return e.d>t.d?1*sortorder:e.d<t.d?-1*sortorder:0}function p5sort_bysize(e,t){return e.s==t.s?p5sort_filename(e,t):(e.s-t.s)*sortorder}function p5sort_files(e){var t=[],o=Q("p5sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return sortorder=1,3<o&&(sortorder=-1,o-=3),1==o?t.sort(p5sort_filename):2==o?t.sort(p5sort_bysize):3==o&&t.sort(p5sort_timestamp),t}function p5setActions(){var e=getFileSelCount(),t=getFileCount(),o=getFileSelCount(!1);QE("p5DeleteFileButton",0<e&&0<filetreelocation.length),QE("p5NewFolderButton",0<filetreelocation.length),QE("p5UploadButton",0<filetreelocation.length),QE("p5RenameFileButton",1==e&&0<filetreelocation.length),QE("p5SelectAllButton",0<t),Q("p5SelectAllButton").value=0<e?"Aucun":"Tout",QE("p5CutButton",0<o&&e==o),QE("p5CopyButton",0<o&&e==o),QE("p5PasteButton",null!=p5clipboard&&0<p5clipboard.length&&0<filetreelocation.length)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function getFileCount(){return document.getElementsByName("fc").length}function p5selectallfile(){for(var e=0==getFileSelCount(),t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked=e;p5setActions()}function setupBackPointers(e){if(null!=e.f){var t=0,o=0;for(var n in e.f)setupBackPointers(e.f[n]),(e.f[n].parent=e).f[n].s&&(t+=e.f[n].s),e.f[n].c&&(o+=e.f[n].c),3==e.f[n].t&&o++;e.s=t,e.c=o}return e}function getFileSizeStr(e){return 1==e?"1 octet":format("{0} octets",e)}function p5folderup(e){if(null==e)filetreelocation.pop();else for(;filetreelocation.length>e;)filetreelocation.pop();return updateFiles(),!1}function p5folderset(e){return filetreelocation.push(decodeURIComponent(e)),updateFiles(),!1}function p5createfolder(){setDialogMode(2,"Nouveau Dossier",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />"),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var e=getFileSelCount(),t=0<getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p5recdeleteinput>Suppression récursive</label><br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p5deletefileEx,1<e?format("Delete {0} selected items?",e)+t:"Delete selected item?"+t)}function p5deletefileEx(){for(var e=[],t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&e.push(t[o].value);meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:e,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){for(var e,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&(e=t[o].value);setDialogMode(2,"Renommer",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:e}),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5renamefileEx(e,t){t.newname=Q("p5renameinput").value,meshserver.send(t)}function p5fileNameCheck(e){var t=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",t),1==t&&e&&13==e.keyCode&&dialogclose(1)}var isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function p5uploadFile(){setDialogMode(2,"Upload File",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=hidden name=authCookie value='+authCookie+" /><input type=submit id=p5loginSubmit style=display:none /></form>"),updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(e){var t=document.getElementsByName("fc");p5clipboard=[],p5clipboardCut=e,p5clipboardFolder=Clone(filetreelocation);for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p5clipboard.push(t[o].value);p5updateClipview()}function p5pasteFile(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Confim {0} of {1} entrie{2} to this location?",0==p5clipboardCut?"copy":"move",p5clipboard.length,1<p5clipboard.length?"s":"")),setDialogMode(2,"Coller",3,p5pasteFileEx,e)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:0==p5clipboardCut?"copy":"move",scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard}),p5folderup(999),1==p5clipboardCut&&(p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview())}function p5updateClipview(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Holding {0} entrie{1} for {2}",p5clipboard.length,1<p5clipboard.length?"s":"",0==p5clipboardCut?"copy":"move")+', <a href=# onclick="return p5clearClip()" style=cursor:pointer>Clear</a>.'),QH("p5bottomstatus",e),p5setActions()}function p5clearClip(){return p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview(),!1}function p5fileDragDrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer&&0!=e.dataTransfer.files.length&&0!=filetreelocation.length)for(var t=[],o=[],n=[],i=[],a=e.dataTransfer.files.length,s=0;s<e.dataTransfer.files.length;s++){var l=new FileReader,r=e.dataTransfer.files[s];t.push(r.name),o.push(r.size),n.push(r.type),l.onload=function(e){i.push(e.target.result),0==--a&&(Q("p5fileDragName").value=t.join("*"),Q("p5fileDragSize").value=o.join("*"),Q("p5fileDragType").value=n.join("*"),Q("p5fileDragData").value=i.join("*"),Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath),Q("p5loginSubmit2").click())},l.readAsDataURL(r)}}var p5dragtimer=null;function p5fileDragOver(e){haltEvent(e),null!=p5dragtimer&&(clearTimeout(p5dragtimer),p5dragtimer=null);var t=!0;0==filetreelocation.length&&(t=!1),QV("bigok",t),QV("bigfail",!t)}function p5fileDragLeave(e){haltEvent(e),"p5filetable"!=e.target.id?(QV("bigfail",!1),QV("bigok",!1)):p5dragtimer=setTimeout("QV('bigfail',false);QV('bigok',false);p5dragtimer=null;",200)}function ondeskkeypress(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeys(e)}}function ondeskkeydown(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyDown(e)}}function ondeskkeyup(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyUp(e)}}var updateDevicesTimer=null;function updateDevices(){null==updateDevicesTimer&&(updateDevicesTimer=setTimeout(updateDevicesEx,200))}var deviceHeaderCount,sort=0,deviceHeaderId=0,deviceHeaders={},showRealNames=!1,deviceHeaderTotal=0,deviceHeadersTitles=(deviceHeaders={},{});function updateDevicesEx(){null!=updateDevicesTimer&&(clearTimeout(updateDevicesTimer),updateDevicesTimer=null);var e="",t=0,o=null,n=0,i={};for(var a in deviceHeaderCount={},deviceHeaders={},deviceHeadersTitles={},(deviceHeaderTotal=deviceHeaderId=0)==sort?nodes.sort(meshSort):1==sort?nodes.sort(powerSort):2==sort&&(1==showRealNames?nodes.sort(deviceHostSort):nodes.sort(deviceSort)),nodes)if(0!=nodes[a].v){var s=meshes[nodes[a].meshid].links[userinfo._id];if(null!=s){s.rights;if(0==sort){if(nodes.sort(meshSort),nodes[a].meshid!=o){deviceHeaderSet();var l="";1==meshes[nodes[a].meshid].mtype&&(l="<span style=color:lightgray>, Intel&reg; AMT only</span>"),null!=o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=padding-top:4px><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+nodes[a].meshid+'")>'+EscapeHtml(meshes[nodes[a].meshid].name)+"</span>"+l+"<span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",i[o=nodes[a].meshid]=1,t=0}}else 1==sort?nodes[a].pwr!==o&&(deviceHeaderSet(),null!==o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[a].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",o=nodes[a].pwr,t=0):2==sort&&null==o&&(o="1");n++;var r=EscapeHtml(nodes[a].name);0==r.length&&(r="<i>Aucun</i>"),null!=nodes[a].rname&&0<nodes[a].rname.length&&(r+=" / "+EscapeHtml(nodes[a].rname));var d=EscapeHtml(nodes[a].name);1==showRealNames&&null!=nodes[a].rname&&(d=EscapeHtml(nodes[a].rname)),0==d.length&&(d="<i>Aucun</i>");var p=nodes[a].icon,c=NodeStateStr(nodes[a]);nodes[a].conn&&0!=nodes[a].conn||(p+=" gray"),e+="<div style=cursor:pointer onclick=goForward('"+nodes[a]._id+"')>",e+='<div class="i'+p+'" style="float:left;margin-left:4px"></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+d+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+c+"</div></div>",e+="</div></div>",deviceHeaderTotal++,void 0===deviceHeaderCount[nodes[a].state]?deviceHeaderCount[nodes[a].state]=1:deviceHeaderCount[nodes[a].state]++}}if(0==sort)for(var a in meshes){var u=meshes[a],m=u.links[userinfo._id];if(null!=m){m.rights;null==i[u._id]&&(""!=o&&""!=e&&(e+="</tr></table>"),e+="<div><div colspan=3 class=DevSt><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+u._id+'")>'+EscapeHtml(u.name)+"</span></div>",1==u.mtype&&(e+="<div style=padding:10px><i>No Intel&reg; AMT devices in this group"),2==u.mtype&&(e+="<div style=padding:10px><i>Aucun appareil dans ce groupe"),e+=".</i></div></div>",o=u._id,n++)}}for(var a in 0==n?QH("xdevices",'<div style="margin-top:50px;text-align:center"><span style="font-size:30px">Aucun appareil</span><br /><br />Utilisez la version complète de ce site pour ajouter des appareils.</div>'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(a,deviceHeaders[a]);for(var a in deviceHeadersTitles)Q(a).title=deviceHeadersTitles[a]}var powerStatetable=["","Alimenté","Endormir","Endormir","Endormir","Hibernation","Éteindre","Présent"],powerStateStrings=["","Alimenté","Dormir","Dormir","Deep Sleep","Hibernation","Soft-Off","Présent"],powerStateStrings2=["","Device is powered","Device is in sleep state (S1)","Device is in sleep state (S2)","Device is in deep sleep state (S3)","Device is hibernating (S4)","Device is in soft-off state (S5)","Device is present, but power state cannot be determined"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0<e.state&&e.state<powerStatetable.length&&state.push(powerStatetable[e.state]),e.conn&&(0!=(1&e.conn)&&t.push("<span>Agent</span>"),0!=(2&e.conn)?t.push("<span>CIRA</span>"):0!=(4&e.conn)&&t.push("<span>Intel&reg; AMT</span>"),0!=(8&e.conn)&&t.push("<span>Relay</span>"),0!=(16&e.conn)&&t.push("<span>MQTT</span>")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return e<powerStatetable.length?powerStatetable[e]:""}function PowerStateStr2(e){return 0!=e&&e<powerStatetable.length?powerStatetable[e]:"Inconnue"}function onSortSelectChange(e){sort=document.getElementById("sortselect").selectedIndex,e||putstore("sort",sort),updateDevicesEx()}function deviceHeaderSet(){if(0!=deviceHeaderId){deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+(1==deviceHeaderTotal?" nœud":" noeuds");var e="";for(var t in deviceHeaderCount)0<e.length&&(e+=", "),e+=deviceHeaderCount[t]+" "+PowerStateStr2(t);deviceHeadersTitles["DevxHeader"+deviceHeaderId]=e,deviceHeaderId++,deviceHeaderCount={},deviceHeaderTotal=0}else deviceHeaderId=1}function meshSort(e,t){return e.meshnamel>t.meshnamel?1:e.meshnamel<t.meshnamel?-1:e.meshid==t.meshid?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:0}function powerSort(e,t){var o=e.pwr?e.pwr:0,n=t.pwr?t.pwr:0;return o==n?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:n<o?1:o<n?-1:0}function deviceSort(e,t){return e.namel>t.namel?1:e.namel<t.namel?-1:0}function deviceHostSort(e,t){return e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0}function refreshDevice(e){currentNode&&currentNode._id==e&&gotoDevice(e,xxcurrentView,!0)}function getNodeRights(e){var t=getNodeFromId(e);return meshes[t.meshid].links[userinfo._id].rights}var currentNode,currentDevicePanel=0,powerTimelineNode=null,powerTimelineReq=null,powerTimelineUpdate=null,powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(e,t,o){if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var n=getNodeFromId(e);if(null!=n){var i=meshes[n.meshid];if(null!=i){var a=i.links[userinfo._id].rights;if(!currentNode||currentNode._id!=n._id||1==o){currentNode=n;var s=EscapeHtml(n.name);0==s.length&&(s="<i>Aucun</i>"),0!=(4&a)&&(s="<span onclick=showEditNodeValueDialog(0) style=cursor:pointer>"+s+"</span>"),QH("p10deviceName",s);var l="<table style=width:100%>";l+=addDeviceAttribute("<span>Groupe</span>",'<a onclick=goForward("'+n.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[n.meshid].name)+"</a>"),null!=n.rname&&(l+=addDeviceAttribute("<span>Nom</span>","<span>"+EscapeHtml(n.rname)+"</span>")),1!=i.mtype&&n.name==n.host||(0!=(4&a)?n.host?l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(n.host)+"</span>"):l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>Aucun</i></span>"):l+=addDeviceAttribute("Hostname",EscapeHtml(n.host)));var r=n.desc?EscapeHtml(n.desc):"<i>Aucun</i>";l+=addDeviceAttribute("Description",0!=(4&a)?"<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+r+"</span>":r);var d=["Inconnue","Windows 32bit console","Windows 64bit console","Windows 32bit service","Windows 64bit service","Linux 32bit","Linux 64bit","MIPS","XENx86","Android ARM","Linux ARM","MacOS 32bit","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32bit","MacOS 64bit","ChromeOS","Linux Poky x86-64bit","Linux NoKVM x86-32bit","Linux NoKVM x86-64bit","Windows MinCore console","Windows MinCore service","NodeJS","ARM-Linaro","ARMv6l / ARMv7l","ARMv8 64bit","ARMv6l / ARMv7l / NoKVM","Inconnue","Inconnue","FreeBSD x86-64"];if(null!=n.agent&&null!=n.agent.id&&null!=n.agent.ver){var p="";p=n.agent.id<=d.length?d[n.agent.id]:d[0],0!=n.agent.ver&&(p+=" v"+n.agent.ver),l+=addDeviceAttribute("Agent",p)}if(null!=n.intelamt){p="";var c={0:nobreak("Not Activated (Pre)"),1:nobreak("Not Activated (In)"),2:nobreak("Activé")};null!=n.intelamt.ver&&null==n.intelamt.state?p+="<i>"+nobreak("Etat inconnu")+"</i>, v"+n.intelamt.ver:null==n.intelamt.ver&&2==n.intelamt.state?p+="<i>Activé</i>":null==n.intelamt.ver||null==n.intelamt.state?p+="<i>Version et état inconnus</i>":(p+=c[n.intelamt.state],n.intelamt.flags&&(2&n.intelamt.flags?p=" <span>CCM</span>":4&n.intelamt.flags&&(p=" <span>ACM</span>")),p+=", v"+n.intelamt.ver),1==n.intelamt.tls&&(p+=", <span>TLS</span>"),2==n.intelamt.state&&(null!=n.intelamt.user&&""!=n.intelamt.user||(p+=0!=(4&a)?', <i style=color:#FF0000;cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'+nobreak("No Credentials")+"</i>":", <i style=color:#FF0000>No Credentials</i>"),p+=" ",0!=(4&a)&&(p+='<img src=images/link4.png height=10 width=10 style=cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'));var u="Intel&reg; ME";"number"==typeof n.intelamt.sku&&(0!=(8&n.intelamt.sku)?u="Intel&reg; AMT":0!=(16&n.intelamt.sku)&&(u="Intel&reg; SM")),l+=addDeviceAttribute(u,p)}if(null!=n.agent&&null!=n.agent.tag&&"mailto:"!=n.agent.tag){var m=EscapeHtml(n.agent.tag);m.startsWith("mailto:")&&(m='<a href="'+m+'">'+m.substring(7)+"</a>"),l+=addDeviceAttribute("Agent Tag",m)}var h=n.conn;if(h&&1<h){var f=[];0!=(1&n.conn)&&f.push("<span>Agent</span>"),0!=(2&n.conn)?f.push("<span>Intel&reg; AMT CIRA</span>"):0!=(4&n.conn)&&f.push("<span>Intel&reg; AMT</span>"),0!=(8&n.conn)&&f.push("<span>Agent Relay</span>"),0!=(16&n.conn)&&f.push("<span>MQTT</span>"),l+=addDeviceAttribute("Connectivity",f.join(", "))}var g="<i>Aucun</i>";if(null!=n.tags)for(var v in g="",n.tags)g+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+n.tags[v]+"</span>";l+=addDeviceAttribute("Tags",0!=(4&a)?"<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+g+"</span>":g),l+="</table><br />",0!=(76&a)&&(l+="<input type=button value=Actions onclick=deviceActionFunction() />"),QH("p10html",l),setupFiles(),l="<div style=float:right;font-size:x-small;margin-right:10px>",0!=(4&a)&&(l+='<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+n._id+'")>Delete Device</a>'),l+="</div><div style=font-size:x-small>",l+="</div><br>",QH("p10html3",l);var k=PowerStateStr(n.state);0!=(1&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Mesh Agent</span>"),0!=(2&h)?(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT connected</span>"):0!=(4&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT detected</span>"),0!=(16&h)&&(0<k.length&&(k+="<br/>"),k+="<span style=font-size:12px>MQTT channel connected</span>"),QH("MainComputerState",k),QH("MainComputerImage",'<div class="i'+n.icon+'"></div>'),powerTimelineNode!=currentNode._id&&powerTimelineReq!=currentNode._id&&(QH("p10html2",""),powerTimelineReq=currentNode._id,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}setupDesktop(),go(t=t||10),setupDeviceMenu()}else goBack()}else goBack()}else setDialogMode(2,"Account Security",1,null,'Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the "My Account" and look at the "Account Security" section.');else setDialogMode(2,"Account Security",1,null,'Unable to access a device until a email address is verified. This is required for password recovery. Go to the "My Account" to change and verify an email address.')}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"Device Toast",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var o=0;currentNode&&(o=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var n=[];0!=currentDevicePanel&&n.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&o||256&o)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8&currentNode.intelamt.sku))||currentNode.agent&&1&currentNode.agent.caps)&&n.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&o&&(4294967295==o||0==(1024&o))&&2==currentNode.mtype&&4&currentNode.agent.caps&&n.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(n)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="Select an operation to perform on this device.<br /><br />",o="<select id=d2deviceop style=float:right;width:170px>";0!=(64&e)&&(o+="<option value=100>Wake-up</option>"),0!=(8&e)&&(o+="<option value=4>Endormir</option><option value=3>Réinitialiser</option><option value=2>Éteindre</option>"),setDialogMode(2,"Device Action",3,deviceActionFunctionEx,t+=addHtmlValue("Opération",o+="</select>"))}}function deviceActionFunctionEx(){var e=Q("d2deviceop").value;100==e?meshserver.send({action:"wakedevices",nodeids:[currentNode._id]}):meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:e})}function updateDeviceTimeline(){2==meshserver.State&&null!=powerTimelineNode&&null!=powerTimelineUpdate&&null!=currentNode&&powerTimelineNode==powerTimelineReq&&currentNode._id==powerTimelineNode&&powerTimelineUpdate<Date.now()&&(powerTimelineUpdate=null,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}function drawDeviceTimeline(){var e=null,t=Date.now();currentNode._id==powerTimelineNode&&(e=powerTimeline);var o=new Date;o.setHours(0,0,0,0);(o=new Date(o.getTime()-5184e5)).getTime();var n=[];if(null!=e&&1<e.length){n.push([0,e[1],e[0]]);for(var i=e[1],a=2;a<e.length;a+=2){var s=e[a],l=t;e.length>a+1&&(l=e[a+1]),n.push([i,i+l,s]),i+=l}}var r="",d=1,p=new Date,c=Q("masthead").offsetWidth-122;p.setHours(0,0,0,0);for(a=0;a<7;a++){var u="",m=p.getTime(),h=m+864e5;for(var f in n){var g=n[f];if(1==isTimeBlockInside(m,h,g[0],g[1])){var v=Math.max(m,g[0]),k=Math.min(Math.min(h,g[1]),t),y=Math.round((k-v)*c/864e5);0<y&&(u+="<div style=display:table-cell;width:"+y+"px;background-color:"+powerColor(g[2])+";height:16px></div>")}}r+="<tr style="+(d%2==0?"background-color:#DDD":"")+"><td><div>&nbsp;"+printDate(p)+"<div></div></div></td><td><div>"+u+"</div></td></tr>",++d,p=new Date(p.getTime()-864e5)}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse;width:calc(100% - 18px);margin:9px" border=0 cellpadding=2 cellspacing=0><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:90px>Day</th><th scope=col style=text-align:center>Power State</th></tr>'+r+"</tbody></table>")}function powerColor(e){return e<powerColorTable.length?powerColorTable[e]:"yellow"}function isTimeBlockInside(e,t,o,n){return o<e&&t<n||(e<o&&o<t||e<n&&n<t)}function addDeviceAttribute(e,t){return"<tr><td style=width:100px;color:gray>"+e+"</td><td style=overflow:hidden>"+t+"</td></tr>"}function editDeviceAmtSettings(e,t){if(!xxdialogMode){var o="",n=getNodeFromId(e),i=3;0!=(4&getNodeRights(e))&&(o+=addHtmlValue("Nom d'utilisateur",'<input id=dp10username style=width:170px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />'),o+=addHtmlValue("Mot de passe","<input id=dp10password type=password style=width:170px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />"),o+=addHtmlValue("Sécurité","<select id=dp10tls style=width:176px><option value=0>Pas de sécurité TLS</option><option value=1>Sécurité TLS requise</option></select>"),null!=n.intelamt.user&&""!=n.intelamt.user&&(i=7),setDialogMode(2,"Edit Intel&reg; AMT credentials",i,editDeviceAmtSettingsEx,o,{node:n,func:t}),null!=n.intelamt.user&&""!=n.intelamt.user?Q("dp10username").value=n.intelamt.user:Q("dp10username").value="admin",Q("dp10tls").value=n.intelamt.tls,validateDeviceAmtSettings())}}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(e,t){if(2==e)meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:"",pass:""}});else{var o=Q("dp10username").value;""==o&&(o="admin");var n=Q("dp10password").value;""==n&&(o=""),meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:o,pass:n,tls:Q("dp10tls").value}}),t.node.intelamt.user=o,t.node.intelamt.tls=Q("dp10tls").value,t.func&&setTimeout(t.func,300)}}function p10showDeleteNodeDialog(e){xxdialogMode||(setDialogMode(2,"Delete Node",3,p10showDeleteNodeDialogEx,format("Delete {0}?",EscapeHtml(currentNode.name))+"<br /><br /><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />Confirm",e),p10validateDeleteNodeDialog())}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(e,t){meshserver.send({action:"removedevices",nodeids:[t]})}function p10showiconselector(){if(!xxdialogMode&&0!=(4&meshes[currentNode.meshid].links[userinfo._id].rights)){"<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>","<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>","<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br>","<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>","<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>","<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>",setDialogMode(2,"Sélection de l'icôn",0,null,"<table align=center><td><div style=display:inline-block class=i1 onclick=p10setIcon(1)></div><div style=display:inline-block class=i2 onclick=p10setIcon(2)></div><div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br><div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><div style=display:inline-block class=i5 onclick=p10setIcon(5)></div><div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>"),QV("id_dialogclose",!0)}}function p10setIcon(e){setDialogMode(0),meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:e})}var desktop,desktopNode,showEditNodeValueDialog_modes=["Device Name","Hostname","Description","Tags"],showEditNodeValueDialog_modes2=["name","host","desc","tags"],showEditNodeValueDialog_modes3=["","","","Groupe1, Groupe2, Groupe3"];function showEditNodeValueDialog(e){if(!xxdialogMode){setDialogMode(2,"Edit Device",3,showEditNodeValueDialogEx,addHtmlValue(showEditNodeValueDialog_modes[e],'<input id=dp10devicevalue style=width:170px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[e]+'" onchange=p10editdevicevalueValidate('+e+",event) onkeyup=p10editdevicevalueValidate("+e+",event) />"),e);var t=currentNode[showEditNodeValueDialog_modes2[e]];null==t&&(t=""),Array.isArray(t)&&(t=t.join(", ")),Q("dp10devicevalue").value=t,p10editdevicevalueValidate(),Q("dp10devicevalue").focus()}}function showEditNodeValueDialogEx(e,t){var o={action:"changedevice",nodeid:currentNode._id};o[showEditNodeValueDialog_modes2[t]]=Q("dp10devicevalue").value,meshserver.send(o)}function p10editdevicevalueValidate(e,t){var o=1<e||0<Q("dp10devicevalue").value.length;QE("idx_dlgOkButton",o),null!=t&&1==o&&13==t.keyCode&&dialogclose(1)}var desktopsettings={encoding:2,showfocus:!1,showmouse:!0,showcad:!0,quality:40,scaling:1024,framerate:50};function setupDesktop(){desktopNode!=currentNode&&null!=desktop&&(desktop.Stop(),desktop=desktopNode=null),desktopNode==currentNode&&null!=desktop||(QH("DeskParent",'<canvas id=Desk width=640 height=200 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>'),desktopNode=currentNode,Q("Desk").addEventListener("DOMMouseScroll",function(e){return dmousewheel(e)}),Q("Desk").addEventListener("mousewheel",function(e){return dmousewheel(e)})),desktopNode=currentNode,updateDesktopButtons(),Q("Desk").toBlob||QV("deskSaveBtn",!1)}function updateDesktopButtons(){var e=meshes[currentNode.meshid],t=0;null!=desktop&&(t=desktop.State);var o=e.links[userinfo._id].rights;QV("disconnectbutton1",0!=t),QV("connectbutton1",0==t&&2==e.mtype&&(8&o||256&o)),QV("connectbutton1h",0==t&&8&o&&(1==e.mtype||null!=currentNode.intelamt&&2==currentNode.intelamt.state&&null!=currentNode.intelamt.ver&&"number"==typeof currentNode.intelamt.sku&&0!=(8&currentNode.intelamt.sku))),QV("d7amtkvm",!(null==currentNode.intelamt||null==currentNode.intelamt.ver&&1!=e.mtype||0!=t&&2!=desktop.contype)),QV("d7meshkvm",2==e.mtype&&(0==t||1==desktop.contype));var n=0!=(1&currentNode.conn);QE("connectbutton1",n);var i=0!=(6&currentNode.conn);QE("connectbutton1h",i),QV("DeskToastButton",0!=(16384&o)&&currentNode.agent&&currentNode.agent.id<5&&8&o),QV("deskActionsBtn",8&o),Q("DeskControl").checked=0!=(8&o),0==n&&QV("DeskTools",!1)}function connectDesktop(e,t){if(setSessionActivity(),null==desktop)if(desktopNode=currentNode,2==t){if(null==desktopNode.intelamt.user||""==desktopNode.intelamt.user)return void editDeviceAmtSettings(desktopNode._id,connectDesktop);(desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie)).debugmode=debugmode,desktop.onStateChanged=onDesktopStateChange,desktop.m.bpp=1==desktopsettings.encoding||3==desktopsettings.encoding?1:2,desktop.m.useZRLE=desktopsettings.encoding<3,desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id,16994,"*","*",0),desktop.contype=2}else(desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).debugmode=debugmode,desktop.m.debugmode=debugmode,desktop.attemptWebRTC=attemptWebRTC,desktop.onStateChanged=onDesktopStateChange,desktop.m.CompressionLevel=desktopsettings.quality,desktop.m.ScalingLevel=desktopsettings.scaling,desktop.m.FrameRateTimer=desktopsettings.framerate,desktop.m.onDisplayinfo=deskDisplayInfo,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id),desktop.contype=1;else desktop.Stop(),desktopNode=desktop=null}function onDesktopStateChange(e,t){var o=t;3==o&&2==e.contype&&o++;var n=StatusStrs[o];switch(null!=desktop&&1==desktop.webRtcActive&&(n+=", WebRTC"),QH("deskstatus",n),t){case 0:desktop.Stop(),desktopNode=desktop=null,QV("termdisplays",!1),1==fullscreen&&deskToggleFull()}updateDesktopButtons(),deskAdjust(),setTimeout(deskAdjust,50)}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),updateDesktopButtons(),setDialogMode(7,"Paramètres du bureau à distance",3,showDesktopSettingsChanged))}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value,desktopsettings.showfocus=d7showfocus.checked,desktopsettings.showmouse=d7showcursor.checked,desktopsettings.quality=d7bitmapquality.value,desktopsettings.scaling=d7bitmapscaling.value,desktopsettings.framerate=d7framelimiter.value,localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings)),applyDesktopSettings(),desktop&&(1==desktop.contype&&0!=desktop.State&&desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate),2==desktop.contype&&0!=desktop.State&&(desktop.Stop(),setTimeout(function(){connectDesktop(null,2)},50)))}function applyDesktopSettings(){var e="",t=512&features?[90,70,50,40,30,20,10,5,1]:[50,40,30,20,10,5,1];for(var o in t)e+="<option value="+t[o]+">"+t[o]+"%</option>";QH("d7bitmapquality",e),d7desktopmode.value=desktopsettings.encoding,d7showfocus.checked=desktopsettings.showfocus,d7showcursor.checked=desktopsettings.showmouse,d7bitmapquality.value=40,0<=t.indexOf(parseInt(desktopsettings.quality))&&(d7bitmapquality.value=desktopsettings.quality),d7bitmapscaling.value=desktopsettings.scaling,desktopsettings.framerate&&(d7framelimiter.value=desktopsettings.framerate)}var fullscreen=!1;function deskAdjust(){var e=(Q("DeskParent").clientHeight-Q("Desk").clientHeight)/2;if(e<0){var t=Q("DeskParent").clientHeight,o=9999;desktop&&(o=desktop.m.width/desktop.m.height*t),QS("Desk")["max-height"]=t+"px",QS("Desk")["max-width"]=o+"px",e=0}else QS("Desk")["max-height"]=null,QS("Desk")["max-width"]=null;QS("Desk")["margin-top"]=e+"px",QS("Desk")["margin-bottom"]=e+"px"}function deskSendKeys(){if(!xxdialogMode&&null!=desktop&&3==desktop.State){var e=Q("deskkeys").value;0==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]]):1==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]]):2==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]]):desktop.sendCtrlMsg('{"action":"lock"}'):3==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]]):4==e?2==desktop.contype?desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]]):5==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]]):6==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]]):7==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65473,1],[65473,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,115],[desktop.m.KeyAction.UP,115],[desktop.m.KeyAction.EXUP,18]]):8==e?2==desktop.contype?desktop.m.sendkey([[65507,1],[119,1],[119,0],[65507,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,17],[desktop.m.KeyAction.DOWN,87],[desktop.m.KeyAction.UP,87],[desktop.m.KeyAction.EXUP,17]]):9==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65289,1],[65289,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9],[desktop.m.KeyAction.EXUP,18]]):10==e?desktop.m.sendcad():11==e&&(2==desktop.contype?desktop.m.sendkey([[65289,1],[65289,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9]]))}}function sendSpecialKeys(){xxdialogMode||null==desktop||3!=desktop.State||setDialogMode(3,"Special Keys",3,deskSendKeys)}function toggleSoftKeys(e){QV("DeskSoftInput",1==e),1==e&&Q("DeskSoftInput").focus()}function toggleDeskTools(){setSessionActivity(),xxdialogMode||("none"==QS("DeskTools").display?(QV("DeskTools",!0),Q("DeskTools").nodeid=currentNode._id,refreshDeskTools()):QV("DeskTools",!1))}function refreshDeskTools(){setSessionActivity(),QV("DeskToolsRefreshButton",!1),setTimeout(refreshDeskToolsEx,500),meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",!0)}var filesNode,deskTools={sort:1,msg:null};function sortProcess(e){deskTools.sort=e,showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(e,t){return e.p>t.p?1:e.p<t.p?-1:0}function sortProcessName(e,t){return e.d>t.d?1:e.d<t.d?-1:0}function showDeskToolsProcesses(e){if(null!=(deskTools.msg=e)){if(Q("DeskTools").nodeid==e.nodeid){var t=[],o=null;try{o=JSON.parse(e.value)}catch(e){}if(console.log(o),null!=o){for(var n in o)t.push({p:parseInt(n),c:o[n].cmd,d:o[n].cmd.toLowerCase(),u:o[n].user});0==deskTools.sort?t.sort(sortProcessPid):1==deskTools.sort&&t.sort(sortProcessName);var i="";for(var a in t)0!=t[a].p&&(i+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+t[a].p+"</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess("+t[a].p+',"'+t[a].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(t[a].u?t[a].u:"")+"</div><div>"+t[a].c+"</div></div>");QH("DeskToolsProcesses",i)}}}else QH("DeskToolsProcesses","")}function deskSaveImage(){if(setSessionActivity(),!xxdialogMode&&null!=desktop&&3==desktop.State){var e=new Date,t="Desktop-"+currentNode.name+"-"+e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)+"-"+("0"+e.getHours()).slice(-2)+"-"+("0"+e.getMinutes()).slice(-2);Q("Desk").toBlob(function(e){saveAs(e,t+".jpg")})}}function deskDisplayInfo(e,t,o,n){var i=Q("termdisplays").value;if(0<t.length){var a="";for(var s in t)a+="<option"+(i==t[s]?" selected":"")+">"+t[s]+"</option>";QH("termdisplays",a)}QV("termdisplays",0<t.length)}function deskGetDisplayNumbers(e){desktop.m.GetDisplayNumbers()}function deskSetDisplay(e){setSessionActivity();var t=0,o=Q("termdisplays").value;t="All Displays"==o?65535:parseInt(o.substring(8)),desktop.m.SetDisplay(t)}function dmousedown(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousedown(e)}function dmouseup(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mouseup(e)}function dmousemove(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousemove(e)}function dmousewheel(e){return setSessionActivity(),!(xxdialogMode||null==desktop||!desktop.m.mousewheel)&&(desktop.m.mousewheel(e),haltEvent(e),!0)}function drotate(e){xxdialogMode||null==desktop||(desktop.m.setRotation(desktop.m.rotation+e),deskAdjust(),deskAdjust())}function stopProcess(e,t){return setDialogMode(2,"Process Control",3,stopProcessEx,format('Stop process #{0} "{1}"?',e,t),e),!1}function stopProcessEx(e,t){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:t}),setTimeout(refreshDeskTools,300)}function setupFiles(){var e=filesNode==currentNode,t=0!=(1&(filesNode=currentNode).conn);QE("p13Connect",t),0!=e&&0!=t||!files||(files.Stop(),files=null)}function onFilesStateChange(e,t){setSessionActivity(),p13Connect.value=0==t?"Connect":"Disconnect";var o=StatusStrs[t];switch(1==files.webRtcActive&&(o+=", WebRTC"),Q("p13Status").textContent=o,t){case 0:QH("p13files",""),p13filetree=null,p13filetreelocation=[],QH("p13currentpath",""),QE("p13FolderUp",!1),p13setActions(),null!=files&&(files.Stop(),files=null);break;case 3:p13targetpath="",files.sendText({action:"ls",reqid:1,path:""})}}function CreateRemoteFiles(e){var t={protocol:5};return t.onFileUpdate=e,t.xxStateChange=function(e){},t.ProcessData=function(e){t.onFileUpdate(e)},t}var autoConnectFilesTimer=null;function autoConnectFiles(e){autoConnectFilesTimer=null==autoConnectFilesTimer?setInterval(connectFiles,100):(clearInterval(autoConnectFilesTimer),null)}function connectFiles(e){files?(files.Stop(),files=null):((files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).attemptWebRTC=attemptWebRTC,files.onStateChanged=onFilesStateChange,files.Start(filesNode._id)),p13clipboard=p13clipboardFolder=null,p13clipboardCut=0,p13updateClipview()}var p13sortorder,p13filetree=null,p13targetpath=null,p13filetreelocation=[];function p13gotFiles(e){if(setSessionActivity(),0<e.length&&123!=e.charCodeAt(0))p13gotDownloadBinaryData(e);else if("download"!=(e=JSON.parse(decode_utf8(e))).action)if(e.path=e.path.replace(/\//g,"\\"),null!=p13filetree&&e.path==p13filetree.path){var t=p13getCheckedNames();p13filetree=e,p13updateFiles(t)}else{for(var o=e.path.replace(/\//g,"\\"),n=p13targetpath.replace(/\//g,"\\");0<o.length&&"\\"==o[0];)o=o.substring(1);for(;0<n.length&&"\\"==n[0];)n=n.substring(1);(o==n||"\\"==e.path&&""==p13targetpath)&&(p13filetree=e,p13updateFiles())}else p13gotDownloadCommand(e)}function p13getCheckedNames(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);return e}function p13updateFiles(e){var t="",o="",n="<a style=cursor:pointer onclick=p13folderup(0)>Racine</a>",i=p13filetree.path.split("\\");for(var a in p13filetreelocation=[],i)""!=i[a]&&p13filetreelocation.push(i[a]);for(var a in p13filetreelocation)n+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(a)+1)+")>"+p13filetreelocation[a]+"</a>";var s=p13filetreelocation.join("/"),l=p13sort_files(p13filetree.dir);for(var a in l){var r,d=l[a],p=d.n;r=70<(r=p).length?EscapeHtml(p.substring(0,70))+"...":EscapeHtml(p),p=EscapeHtml(p);var c="";null!=d.s&&(c=getFileSizeStr(d.s));var u="";if(d.t<3){u="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right></span><span><div class=fileIcon"+d.t+'></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+r+"</a></span></div>"}else{var m=r;0<d.s&&(m='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+p)+"','"+encodeURIComponent(p)+"',"+d.s+')">'+r+"</a>"),u="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+c+"</span><span><div class=fileIcon"+d.t+"></div>"+m+"</span></div>"}d.t<3?t+=u:o+=u}if(QH("p13files",t+o),QH("p13currentpath",n),QE("p13FolderUp",0!=p13filetreelocation.length),null!=e){var h=document.getElementsByName("fd");for(a=0;a<h.length;a++)0<=e.indexOf(p13filetree.dir[h[a].value].n)&&(h[a].checked=!0)}p13setActions()}function p13folderset(e){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[e].n).split("\\").join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(e){if(null==e)p13filetreelocation.pop();else for(;p13filetreelocation.length>e;)p13filetreelocation.pop();p13targetpath=p13filetreelocation.join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13sort_filename(e,t){return e.ln>t.ln?1*p13sortorder:e.ln<t.ln?-1*p13sortorder:0}function p13sort_timestamp(e,t){return e.d>t.d?1*p13sortorder:e.d<t.d?-1*p13sortorder:0}function p13sort_bysize(e,t){return e.s==t.s?p13sort_filename(e,t):(e.s-t.s)*p13sortorder}function p13sort_files(e){var t=[],o=Q("p13sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].s&&(e[n].s=0),null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return p13sortorder=1,3<o&&(p13sortorder=-1,o-=3),1==o?t.sort(p13sort_filename):2==o?t.sort(p13sort_bysize):3==o&&t.sort(p13sort_timestamp),t}function p13setActions(){if(null==p13filetree)QE("p13DeleteFileButton",!1),QE("p13NewFolderButton",!1),QE("p13UploadButton",!1),QE("p13RenameFileButton",!1),QE("p13SelectAllButton",!1),Q("p13SelectAllButton").value="Tout",QE("p13RefreshButton",!1),QE("p13CutButton",!1),QE("p13CopyButton",!1),QE("p13PasteButton",!1);else{var e=p13getFileSelCount(),t=p13getFileCount(),o=p13getFileSelCount(!1),n=0<currentNode.agent.id&&currentNode.agent.id<5;QE("p13DeleteFileButton",0<e&&(0<p13filetreelocation.length||0==n)),QE("p13NewFolderButton",0<p13filetreelocation.length||0==n),QE("p13UploadButton",0<p13filetreelocation.length||0==n),QE("p13RenameFileButton",1==e&&(0<p13filetreelocation.length||0==n)),QE("p13SelectAllButton",0<t),Q("p13SelectAllButton").value=0<e?"Aucun":"Tout",QE("p13RefreshButton",!0),QE("p13CutButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13CopyButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13PasteButton",(0<p13filetreelocation.length||0==n)&&null!=p13clipboard&&0<p13clipboard.length)}}function p13getFileSelCount(e){for(var t=0,o=document.getElementsByName("fd"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function p13getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function p13getFileCount(){return document.getElementsByName("fd").length}function p13selectallfile(){for(var e=0==p13getFileSelCount(),t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked=e;p13setActions()}function p13createfolder(){setDialogMode(2,"Nouveau Dossier",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />"),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value}),p13folderup(999)}function p13deletefile(){var e=p13getFileSelCount(),t=0<p13getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p13recdeleteinput>Suppression récursive</label><br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"Delete",3,p13deletefileEx,1<e?format("Delete {0} selected items?",e)+t:"Delete selected item?"+t)}function p13deletefileEx(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:e,rec:Q("p13recdeleteinput").checked}),p13folderup(999)}function p13renamefile(){for(var e,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&(e=p13filetree.dir[t[o].value].n);setDialogMode(2,"Renommer",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:e}),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13renamefileEx(e,t){t.newname=Q("p13renameinput").value,files.sendText(t),p13folderup(999)}function p13fileNameCheck(e){var t=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",t),1==t&&null!=e&&13==e.keyCode&&dialogclose(1)}function p13uploadFile(){setDialogMode(2,"Upload File",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />"),updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}function p13viewfile(){for(var e=document.getElementsByName("fd"),t=0;t<e.length;t++)if(e[t].checked){p13filetree.dir[e[t].value].s<=204800?p13downloadfile(encodeURIComponent(p13filetreelocation.join("/")+"/"+p13filetree.dir[e[t].value].n),encodeURIComponent(p13filetree.dir[e[t].value].n),p13filetree.dir[e[t].value].s,"viewer"):messagebox("Éditeur de fichier","Only files less than 200k can be edited.");break}}var downloadFile,uploadFile,currentMesh,p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(e){var t=document.getElementsByName("fd");p13clipboard=[],p13clipboardCut=e,p13clipboardFolder=p13targetpath;for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p13clipboard.push(p13filetree.dir[t[o].value].n);p13updateClipview()}function p13pasteFile(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format("Confirm copy of {0} entries's to this location?",p13clipboard.length):format("Confirm copy of 1 entrie to this location?"):1<p13clipboard.length?format("Confirm move of {0} entries's to this location?",p13clipboard.length):format("Confirm move of 1 entrie to this location?")),setDialogMode(2,"Coller",3,p13pasteFileEx,e)}function p13pasteFileEx(){files.sendText({action:0==p13clipboardCut?"copy":"move",reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard}),p13folderup(999),1==p13clipboardCut&&(p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview())}function p13updateClipview(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format('Holding {0} entries for copy, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.',p13clipboard.length):format('Holding 1 entrie for copy, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.'):1<p13clipboard.length?format('Holding {0} entries for move, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.',p13clipboard.length):format('Holding 1 entrie for move, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Clear</a>.')),QH("p13bottomstatus",e),p13setActions()}function p13clearClip(){return p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview(),!1}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileCount(){return document.getElementsByName("fc").length}function p13downloadfile(e,t,o){xxdialogMode||downloadFile||!files||(downloadFile={path:decodeURIComponent(e),file:decodeURIComponent(t),size:o,tsize:0,data:"",state:0,id:Math.random()},files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path}),setDialogMode(2,"Download File",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+o+" />"))}function p13downloadFileCancel(){setDialogMode(0),files.sendText({action:"download",sub:"cancel",id:downloadFile.id}),downloadFile=null}function p13gotDownloadCommand(e){null!=downloadFile&&e.id==downloadFile.id&&("start"==e.sub?(downloadFile.state=1,files.sendText({action:"download",sub:"startack",id:downloadFile.id})):"cancel"==e.sub&&(downloadFile=null,setDialogMode(0)))}function p13gotDownloadBinaryData(e){downloadFile&&0!=downloadFile.state&&(4<e.length&&(downloadFile.tsize+=e.length-4,downloadFile.data+=e.substring(4),Q("d2progressBar").value=downloadFile.tsize),0!=(1&ReadInt(e,0))?(saveAs(data2blob(downloadFile.data),downloadFile.file),downloadFile=null,setDialogMode(0)):files.sendText({action:"download",sub:"ack",id:downloadFile.id}))}function p13doUploadFiles(e){xxdialogMode||((uploadFile={}).xpath=p13filetreelocation.join("/"),uploadFile.xfiles=e,uploadFile.xfilePtr=-1,setDialogMode(2,"Upload File",10,p13uploadFileCancel,"<div id=p13dfileName>Connecting...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />"),p13uploadReconnect())}function onFileUploadStateChange(e,t){switch(t){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",t)}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie,authRelayCookie,domainUrl),uploadFile.ws.attemptWebRTC=!1,uploadFile.ws.ctrlMsgAllowed=!1,uploadFile.ws.onStateChanged=onFileUploadStateChange,uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){if(uploadFile.xfilePtr++,uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var e=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",e.name),Q("d2progressBar").max=e.size,Q("d2progressBar").value=0,uploadFile.xreader=new FileReader,uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result,uploadFile.ws.sendText({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:e.name,size:uploadFile.xdata.byteLength})},uploadFile.xreader.readAsArrayBuffer(e)}else p13uploadFileCancel()}function p13uploadFileCancel(e,t){null!=uploadFile&&(null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile=null),setDialogMode(0)}function p13gotUploadData(e){var t=JSON.parse(e);if(null!=uploadFile&&parseInt(uploadFile.xfilePtr)==parseInt(t.reqid))if("uploadstart"==t.action){p13uploadNextPart(!1);for(var o=0;o<8;o++)p13uploadNextPart(!0)}else"uploadack"==t.action?p13uploadNextPart(!1):"uploaderror"==t.action&&p13uploadFileCancel()}function p13uploadNextPart(e){var t=uploadFile.xdata,o=uploadFile.xptr,n=uploadFile.xptr+4096;if(n>t.byteLength){if(1==e)return;n=t.byteLength}if(o==t.byteLength)null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile.xfiles.length>uploadFile.xfilePtr+1?p13uploadReconnect():p13uploadFileCancel();else{var i=t.slice(o,n);uploadFile.ws.send(i),uploadFile.xptr=n,Q("d2progressBar").value=n}}function p20updateMesh(){if(null!=currentMesh){QH("p20meshName",EscapeHtml(currentMesh.name));var e=format(" #{0} Inconnue",currentMesh.mtype),t=currentMesh.links[userinfo._id].rights;1==currentMesh.mtype&&(e="Intel&reg; AMT only, no agent"),2==currentMesh.mtype&&(e="Géré à l'aide d'un agent logiciel");var o="";o+=addHtmlValue("Nom",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",0!=(1&t))),o+=addHtmlValue("Description",addLinkConditional(currentMesh.desc&&""!=currentMesh.desc?EscapeHtml(currentMesh.desc):"<i>Aucun</i>","p20editmesh(2)",0!=(1&t))),o+=addHtmlValue("Type",e),o+="<br style=clear:both><br>";var n=currentMesh.links[userinfo._id];n&&0!=(2&n.rights)&&(o+="<div style=margin-bottom:6px><a onclick=p20showAddMeshUserDialog() style=cursor:pointer><img src=images/icon-addnew.png border=0 height=12 width=12> Ajouter un utilisateur</a></div>"),o+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>User Authorizations</th></tr>';var i=1,a=[];for(var s in currentMesh.links)a.push({id:s,name:s.split("/")[2],rights:currentMesh.links[s].rights});for(var s in a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),a){var l="",r="Partial Rights",d=a[s].rights;4294967295==d?r="Administrateur Complet":0==d&&(r="No Rights"),s==userinfo._id||4294967295!=t&&0==(2&t)||(l='<a onclick=p20deleteUser(event,"'+encodeURIComponent(a[s].id)+'") style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'),o+='<tr onclick=p20viewuser("'+encodeURIComponent(a[s].id)+'") style=height:32px;cursor:pointer'+(i%2==0?";background-color:#DDD":"")+"><td>",o+="<div style=float:right>"+l+"</div><div style=float:right;padding-right:4px>"+r+"</div><div class=m2></div><div>&nbsp;"+EscapeHtml(decodeURIComponent(a[s].name))+"<div></div></div>",o+="</td></tr>",++i}o+="</tbody></table>",4294967295==t&&(o+="<div style=font-size:small;text-align:right;margin-top:6px><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>Delete Group</a></span></div>"),QH("p20info",o)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("Êtes-vous sûr de vouloir supprimer le groupe {0}? La suppression du groupe de périphériques supprimera également toutes les informations relatives aux périphériques de ce groupe.",EscapeHtml(currentMesh.name))+"<br /><br />";return setDialogMode(2,"Delete Group",3,p20showDeleteMeshDialogEx,e+="<label><input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />Confirm</label>"),p20validateDeleteMeshDialog(),!1}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(e,t){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(e){if(!xxdialogMode){var t=addHtmlValue("Nom","<input id=dp20meshname style=width:170px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");setDialogMode(2,"Edit Device Group",3,p20editmeshEx,t+=addHtmlValue("Description","<input id=dp20meshdesc style=width:170px maxlength=1024 onkeyup=p20editmeshValidate() />")),Q("dp20meshname").value=currentMesh.name,currentMesh.desc&&(Q("dp20meshdesc").value=currentMesh.desc),p20editmeshValidate(),2==e?Q("dp20meshdesc").focus():Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",0<Q("dp20meshname").value.length)}function p20showAddMeshUserDialog(){if(!xxdialogMode){var e=addHtmlValue("User","<input id=dp20username style=width:170px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");e+='<div style="border:2px groove gray;background-color:white;max-height:120px;overflow-y:scroll">',e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>Administrateur Complet</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>Edit Device Group</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>Manage Device Group Users</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>Manage Device Group Computers</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>Télécommande</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>Remote View Only</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotelimitedinput style=margin-left:12px>Limited Input Only</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>No Terminal Access</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>Pas d'accès au fichier</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>No Intel&reg; AMT</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>Mesh Agent Console</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>Server Files</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>Wake Devices</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>Edit Device Notes</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20limitevents>Show Only Own Events</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20chatnotify>Chat & Notify</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20uninstall>Uninstall Agent</label><br>",setDialogMode(2,"Ajouter un utilisateur au groupe",3,p20showAddMeshUserDialogEx,e+="</div>"),p20validateAddMeshUserDialog(),Q("dp20username").focus()}}function p20validateAddMeshUserDialog(){var e=currentMesh.links[userinfo._id].rights,t=!Q("p20fulladmin").checked;QE("p20fulladmin",4294967295==e),QE("p20editmesh",t&&4294967295==e),QE("p20manageusers",t),QE("p20managecomputers",t),QE("p20remotecontrol",t),QE("p20meshagentconsole",t),QE("p20meshserverfiles",t),QE("p20wakedevices",t),QE("p20editnotes",t),QE("p20limitevents",t),QE("p20remoteview",t&&Q("p20remotecontrol").checked),QE("p20remotelimitedinput",t&&Q("p20remotecontrol").checked&&!Q("p20remoteview").checked),QE("p20noterminal",t&&Q("p20remotecontrol").checked),QE("p20nofiles",t&&Q("p20remotecontrol").checked),QE("p20noamt",t&&Q("p20remotecontrol").checked),QE("p20chatnotify",t),QE("p20uninstall",t)}function p20showAddMeshUserDialogEx(){var e=0;1==Q("p20fulladmin").checked?e=4294967295:(1==Q("p20editmesh").checked&&(e+=1),1==Q("p20manageusers").checked&&(e+=2),1==Q("p20managecomputers").checked&&(e+=4),1==Q("p20remotecontrol").checked&&(e+=8),1==Q("p20meshagentconsole").checked&&(e+=16),1==Q("p20meshserverfiles").checked&&(e+=32),1==Q("p20wakedevices").checked&&(e+=64),1==Q("p20editnotes").checked&&(e+=128),1==Q("p20remoteview").checked&&(e+=256),1==Q("p20noterminal").checked&&(e+=512),1==Q("p20nofiles").checked&&(e+=1024),1==Q("p20noamt").checked&&(e+=2048),1==Q("p20remotelimitedinput").checked&&(e+=4096),1==Q("p20limitevents").checked&&(e+=8192),1==Q("p20chatnotify").checked&&(e+=16384),1==Q("p20uninstall").checked&&(e+=32768));var t=Q("dp20username").value.split(","),o=[];for(var n in t)o.push(t[n].trim());meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,usernames:o,meshadmin:e})}function p20viewuser(e){if(!xxdialogMode){e=decodeURIComponent(e);var t=[],o=currentMesh.links[userinfo._id].rights,n=currentMesh.links[e].rights;4294967295==n?t.push("Administrateur Complet"):(0!=(1&n)&&t.push("Edit Device Group"),0!=(2&n)&&t.push("Manage Device Group Users"),0!=(4&n)&&t.push("Manage Device Group Computers"),0!=(8&n)&&t.push("Télécommande"),0!=(16&n)&&t.push("Agent Console"),0!=(32&n)&&t.push("Server Files"),0!=(64&n)&&t.push("Wake Devices"),0!=(128&n)&&t.push("Modifier les notes"),0!=(256&n)&&t.push("Remote View Only"),0!=(512&n)&&t.push("No Terminal"),0!=(1024&n)&&t.push("Aucun fichier"),0!=(2048&n)&&t.push("No Intel&reg; AMT"),0!=(8&n)&&0!=(4096&n)&&0==(256&n)&&t.push("Limited Input"),0!=(8192&n)&&t.push("Self Events Only"),0!=(16384&n)&&t.push("Chat & Notify"),0!=(32768&n)&&t.push("Uninstall")),0==t.length&&t.push("No Rights");var i=1,a=addHtmlValue("Utilisateur",EscapeHtml(decodeURIComponent(e.split("/")[2])));a+=addHtmlValue("Permissions",t.join(", ")),userinfo._id!=e&&(4294967295==o||0!=(2&o)&&4294967295!=n)&&(i+=4),setDialogMode(2,"Device Group User",i,p20viewuserEx,a,e)}}function p20viewuserEx(e,t){2==e&&setDialogMode(2,"Remote Mesh User",3,p20viewuserEx2,format("Confirm removal of user {0}?",t.split("/")[2]),t)}function p20deleteUser(e,t){haltEvent(e),p20viewuserEx(2,decodeURIComponent(t))}function p20viewuserEx2(e,t){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:t})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xxcurrentView=-1;function go(e){if(setSessionActivity(),!xxdialogMode&&xxcurrentView!=e){updateFooterMenu(),setDialogMode(0);for(var t=0;t<32;t++)QV("p"+t,t==e);xxcurrentView=e}}function setDialogMode(e,t,o,n,i,a){setSessionActivity(),xxdialogMode=e,xxdialogFunc=n,xxdialogButtons=o,xxdialogTag=a,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&o),QV("idx_dlgCancelButton",2&o),QV("id_dialogclose",2&o||8&o),QV("idx_dlgButtonBar",7&o),t&&QH("id_dialogtitle",t);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){setSessionActivity();var t=xxdialogFunc,o=xxdialogButtons,n=xxdialogTag;setDialogMode(),(8&o||e)&&t&&t(e,n)}function putstore(e,t){try{if("undefined"==typeof localStorage||localStorage.getItem(e)==t)return;null==t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}if("_"!=e[0]){for(var o={},n=0,i=localStorage.length;n<i;++n){var a=localStorage.key(n);"_"!=a[0]&&(o[a]=localStorage.getItem(a))}meshserver.send({action:"userWebState",state:JSON.stringify(o)})}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}function center(){QS("dialog").left=(getDocWidth()-300)/2+"px",deskAdjust(),deskAdjust()}function messagebox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function reload(){window.location.href=window.location.href}function getNodeFromId(e){for(var t in nodes)if(nodes[t]._id==e)return nodes[t];return null}function addHtmlValue(e,t){return"<table><td style=width:120px>"+e+"<td><b>"+t+"</b></table>"}function addHtmlValue2(e,t){return"<div><div style=display:inline-block;float:right>"+t+"</div><div style=display:inline-block>"+e+"</div></div>"}function addLink(e,t){return"<a style=cursor:pointer;color:darkblue;text-decoration:none onclick='"+t+"'>&diams; "+e+"</a>"}function addLinkConditional(e,t,o){return o?addLink(e,t):e}function passwordcheck(e){return/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/.test(e)}function getFileSizeStr(e){return 1==e?"1 octet":format("{0} bytes",e)}function joinPaths(){var e=[];for(var t in arguments){var o=arguments[t];if(null!=o&&""!=o){for(;o.endsWith("/")||o.endsWith("\\");)o=o.substring(0,o.length-1);for(;o.startsWith("/")||o.startsWith("\\");)o=o.substring(1);e.push(o)}}return e.join("/")}function focusTextBox(e){setTimeout(function(){Q(e).selectionStart=Q(e).selectionEnd=65535,Q(e).focus()},0)}isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function parseUriArgs(){var e,t={},o=window.document.location.href.split(/[\?&|\=]/);for(n in o.splice(0,1),o)switch(n%2){case 0:e=decodeURIComponent(o[n]);break;case 1:t[e]=decodeURIComponent(o[n]);var n=parseInt(t[e]);n==t[e]&&(t[e]=n)}return t}function printDate(e){return e.toLocaleDateString(args.locale)}function printTime(e){return e.toLocaleTimeString(args.locale)}function printDateTime(e){return e.toLocaleString(args.locale)}function format(e){var o=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==o[t]?o[t]:e})}function nobreak(e){return e.split(" ").join("&nbsp;")}</script>
\ No newline at end of file
views/translations/default-mobile-min_ja.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script keeplink=1 src=scripts/filesaver.js></script><title>{{{title}}}</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}.i1{background:url(../images/icons50.png) 0 0;height:50px;width:50px;border:none}.i2{background:url(../images/icons50.png) -50px 0;height:50px;width:50px;border:none}.i3{background:url(../images/icons50.png) -100px 0;height:50px;width:50px;border:none}.i4{background:url(../images/icons50.png) -150px 0;height:50px;width:50px;border:none}.i5{background:url(../images/icons50.png) -200px 0;height:50px;width:50px;border:none}.i6{background:url(../images/icons50.png) -250px 0;height:50px;width:50px;border:none}.m0{background:url(../images/images16.png) -32px 0;height:16px;width:16px;border:none;float:left}.m1{background:url(../images/images16.png) -16px 0;height:16px;width:16px;border:none;float:left}.m2{background:url(../images/images16.png) -96px 0;height:16px;width:16px;border:none;float:left}.m3{background:url(../images/images16.png) -112px 0;height:16px;width:16px;border:none;float:left}.gray{filter:gray;-webkit-filter:grayscale(100%) opacity(60%)}.DevSt{padding-left:5px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#ddd}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:#fff;clear:both}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style="width:calc(100% - 50px);overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><img id=topMenuIcon class=noselect style=position:absolute;right:0;top:10px;bottom:50px;color:#c8c8c8;font-size:44px;margin-right:8px;cursor:pointer;display:none onclick=topMenu() src=/images/3bars-30.png width=30 height=30></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%><div id=column_l style=width:100%;padding:0;position:absolute;bottom:0;top:0><div id=p0 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p0message style=text-align:center;width:100%><span id=p0span>サーバーが切断されました</span>、<href onclick=reload() style=cursor:pointer><u>クリックして再接続</u></href>。</div></div></div><div id=p1 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p1message style=text-align:center;width:100%></div></div></div><div id=p2 style=display:none><div id=xdevices></div></div><div id=p3 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large><span id=p3userName></span></strong><br></div></table><div id=p3info style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div style=margin-left:8px><div id=p3AccountActions><p><strong>アカウントのセキュリティ</strong><div style=margin-left:9px;margin-bottom:8px><div id=manageAuthApp style=margin-top:5px;display:none><a onclick=account_manageAuthApp() style=cursor:pointer>認証アプリを管理する</a></div><div id=manageOtp style=margin-top:5px;display:none><a onclick=account_manageOtp(0) style=cursor:pointer>バックアップコードを管理する</a></div></div><p><strong>アカウントアクション</strong><div style=margin-left:9px;margin-bottom:8px><div style=margin-top:5px><span id=verifyEmailId style=display:none><a onclick=account_showVerifyEmail() style=cursor:pointer>Eメールを確認します</a></span></div><div style=margin-top:5px><span id=changeEmailId style=display:none><a onclick=account_showChangeEmail() style=cursor:pointer>メールアドレスを変更する</a></span></div><div style=margin-top:5px><a onclick=account_showChangePassword() style=cursor:pointer>パスワードを変更する</a><span id=p2nextPasswordUpdateTime></span></div><div style=margin-top:5px><a onclick=account_showDeleteAccount() style=cursor:pointer>アカウントを削除する</a></div></div><br style=clear:both></div><strong>デバイスグループ</strong> <span id=p3createMeshLink1>( <a onclick=account_createMesh() style=cursor:pointer><img src=images/icon-addnew.png width=12 height=12 border=0> 新しい</a> )</span><br><br><div id=p3meshes></div><div id=p3noMeshFound style=margin-left:9px;display:none>デバイスグループはありません。<span id=p3createMeshLink2> <a onclick=account_createMesh() style=cursor:pointer><strong>ここから始めましょう!</strong></a></span></div><br style=clear:both></div></div></div><div id=p5 style=display:none><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large>私のファイル</strong><br></div></table><div id=p5myfiles style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><table id=p5toolbar style=width:100%;height:78px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5FolderUp disabled onclick=p5folderup() value=アップ> <input type=button style="width:calc(100%/5 - 5px)"id=p5SelectAllButton disabled onclick=p5selectallfile() value=すべて選択 onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RenameFileButton disabled value=リネーム onclick=p5renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5DeleteFileButton disabled value=削除する onclick=p5deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5NewFolderButton disabled value=フォルダ onclick=p5createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5UploadButton disabled value=アップロードする onclick=p5uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CutButton disabled value=カット onclick=p5copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CopyButton disabled value=コピー onclick=p5copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5PasteButton disabled value=ペースト onclick=p5pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RefreshButton value=リフレッシュ onclick=p5refreshFiles() onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p5currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>名前順<option value=2>サイズで並べ替え<option value=3>日付けで並び替え<option value=4>名前で降順<option value=5>サイズで降順<option value=6>日付で降順</select></table></table><div id=p5filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p5files></span></div><table id=p5toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0;background-color:#d3d9d6 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px>&nbsp;<span id=p5bottomstatus></span><td id=p5rightOfButtons style=text-align:right;padding:3px></table></div></div><div id=p10 style=display:none;position:absolute;bottom:0;top:0;width:100%;overflow:hidden><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0;position:absolute;top:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><a id=MainComputerImage style=cursor:pointer onclick=p10showiconselector()></a><td><div style=margin-left:5px><strong><span id=p10deviceName></span></strong><br><span id=MainComputerState></span></div></table><div id=p10general style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div id=p10html style=margin-left:8px;margin-right:8px></div><div id=p10html2></div><div id=p10html3></div></div><div id=p10desktop style=overflow:hidden;position:absolute;top:55px;bottom:0;width:100%;display:none><div id=deskarea1 style=position:absolute;top:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><span id=p14power></span>&nbsp; <input id=DeskSoftInput style=width:25px;display:none;opacity:.2 onblur=toggleSoftKeys(0) onkeypress="return ondeskkeypress(event)"onkeydown="return ondeskkeydown(event)"onkeyup="return ondeskkeyup(event)"></div><div style=margin-left:3px><input type=button id=connectbutton1 value=つなぐ onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=connectbutton1h value="HW Connect"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=disconnectbutton1 value=切断する onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1> <span id=deskstatus>切断されました</span></div></div></div><div id=deskarea3 style="position:absolute;top:25px;width:100%;height:calc(100% - 50px)"><div id=deskarea3x style=background:#000;text-align:center;height:100%;position:relative><div id=DeskParent style=height:100%><canvas id=Desk width=640 height=200 style=width:100%;-ms-touch-action:none;margin-left:0 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid #d3d3d3;display:none"><a id=DeskToolsRefreshButton style=float:right;padding:3px;cursor:pointer onclick=refreshDeskTools()>リフレッシュ</a><div id=DeskToolsBar style="position:absolute;padding:3px;border-radius:3px 3px 0 0;top:5px;left:4px;bottom:26px;background-color:#d3d3d3;cursor:pointer">プロセス</div><div style=position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:#d3d3d3;text-align:left><div style="border-bottom:1px solid #a9a9a9;padding:3px"><a style=width:50px;padding-right:5px;float:left;cursor:pointer onclick=sortProcess(0)>PID</a><a style=cursor:pointer onclick=sortProcess(1)>名</a></div><div id=DeskToolsProcesses style=overflow-y:scroll;position:absolute;top:24px;bottom:0;width:100%></div></div></div></div></div><div id=deskarea4 style=position:absolute;bottom:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><select id=termdisplays style=display:none onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>&nbsp; <span id=DeskToastButton><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span>&nbsp;</div><div><input id=deskActionsBtn type=button style=margin-left:3px onkeypress=return!1 onkeydown=return!1 value=行動 onclick=deviceActionFunction()> <input type=button value=設定 onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings()> <input type=button onkeypress=return!1 onkeydown=return!1 value=電源アクション... onclick=showPowerActionDlg() style=display:none> <input id=DeskSpecialKeys type=button value=特別なキー onkeypress=return!1 onkeydown=return!1 onclick=sendSpecialKeys()> <input id=DeskSoftKeys type=button value=キーボード onkeypress=return!1 onkeydown=return!1 onclick=toggleSoftKeys(1)> <label><span id=DeskControlSpan style=display:none><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1>入力</span></label></div></div></div></div><div id=p10files style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%;display:none><table id=p13toolbar style=width:100%;height:111px cellpadding=0 cellspacing=0><tr><td style="background-color:silver;border-bottom:2px solid #000;padding:2px"><div style=float:right;text-align:right><input id=filesActionsBtn type=button onkeypress=return!1 onkeydown=return!1 value=行動 onclick=deviceActionFunction() style=margin-right:2px></div><div style=margin-left:2px><input id=p13AutoConnect value=自動接続 onclick=autoConnectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button style=display:none> <input id=p13Connect value=つなぐ onclick=connectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button> <span id=p13Status>切断されました</span></div><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13FolderUp disabled onclick=p13folderup() value=アップ> <input type=button style="width:calc(100%/5 - 5px)"id=p13SelectAllButton disabled onclick=p13selectallfile() value=すべて選択 onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RenameFileButton disabled value=リネーム onclick=p13renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13DeleteFileButton disabled value=削除する onclick=p13deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13NewFolderButton disabled value=フォルダ onclick=p13createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13UploadButton disabled value=アップロードする onclick=p13uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CutButton disabled value=カット onclick=p13copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CopyButton disabled value=コピー onclick=p13copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13PasteButton disabled value=ペースト onclick=p13pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RefreshButton disabled value=リフレッシュ onclick=p13folderup(9999) onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p13currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>名前順<option value=2>サイズで並べ替え<option value=3>日付けで並び替え<option value=4>名前で降順<option value=5>サイズで降順<option value=6>日付で降順</select></table></table><div id=p13filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p13files></span></div><table id=p13toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#d3d9d6>&nbsp;<span id=p13bottomstatus></span></table></div></div><div id=p20 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td onclick=p20editmesh(1)><img src=/images/meshicon50.png width=50 height=50><td onclick=p20editmesh(1)><div style=margin-left:5px><strong style=font-size:large><span id=p20meshName></span></strong><br></div></table><div id=p20info style=margin-left:8px;margin-right:8px></div></div></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table id=footerMenu cellpadding=0 cellspacing=0 style=height:32px;width:100%;color:#fff;cursor:pointer;table-layout:fixed></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:90px;width:300px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>バツ</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div><div id=dialog3 style=margin:auto;margin:3px><select id=deskkeys style=width:100%><option value=10>Ctrl + Alt + Del<option value=11>タブ<option value=5>勝つ<option value=0>Win + Down<option value=1>Win + Up<option value=2>Win + L<option value=3>Win + M<option value=4>Shift + Win + M<option value=6>Win + R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab</select></div><div id=dialog7 style=margin:auto;margin:3px><div id=d7meshkvm><h4 style="width:100%;border-bottom:1px solid gray">エージェントリモートデスクトップ</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir=rtl></select><div style=height:20px>品質</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>スケーリング</div></div><div style="margin:3px 0 3px 0"><select id=d7framelimiter style=float:right;width:200px;height:20px dir=rtl><option selected value=50>速い<option value=100>中<option value=400>スロー<option value=1000>非常に遅い</select><div style=height:20px>レート</div></div></div><div id=d7amtkvm><h4 style="width:100%;border-bottom:1px solid gray">インテル®AMTハードウェアKVM</h4><div style=height:26px><select id=d7desktopmode style=float:right;width:200px><option value=1>RLE8、最速<option value=2>RLE16、推奨<option value=3>RAW8、遅い<option value=4>RAW16、非常に遅い</select><div>エンコーディング</div></div><div style=height:60px><div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:#fff"><label><input type=checkbox id=d7showfocus>フォーカスツールを表示</label><br><label><input type=checkbox id=d7showcursor>ローカルマウスカーソルを表示</label><br></div><div>その他</div></div></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=キャンセル style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK style=float:right;width:80px onclick=dialogclose(1)></div></div><div id=topMenu style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:0 0 5px 5px;position:fixed;top:50px;right:5px;width:170px;display:none"><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(2)>私のファイル</div><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(1)>マイアカウント</div><div id=logoutMenuOption><a href=/logout><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer">ログアウト</div></a></div></div><iframe name=fileUploadFrame style=display:none></iframe><script>"use strict";var webState="{{{webstate}}}";for(var i in""!=webState&&(webState=JSON.parse(decodeURIComponent(webState))),webState)localStorage.setItem(i,webState[i]);webState.loctag||localStorage.removeItem("loctag");var files,args=parseUriArgs(),debugLevel=parseInt("{{{debuglevel}}}"),features=parseInt("{{{features}}}"),sessionTime=parseInt("{{{sessiontime}}}"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",authCookie="{{{authCookie}}}",authRelayCookie="{{{authRelayCookie}}}",authCookieRenewTimer=null,meshserver=null,xdr=null,serverinfo=null,nodes=[],meshes={},filetree={},userinfo=null,users=(serverinfo=null,null),nodeShortIdent=0,serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}",debugmode=!1,attemptWebRTC=0!=(128&features),StatusStrs=["切断されました","接続しています...","セットアップ...","接続済み","Intel&reg;接続されたAMT"],passRequirements="{{{passRequirements}}}";""!=passRequirements&&(passRequirements=JSON.parse(decodeURIComponent(passRequirements)));var sessionActivity=Date.now();function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(!args.locale){var t=getstore("loctag",0);null!=t&&"*"!=t&&(args.locale=t)}(window.onresize=center)(),QV("changeEmailId",0==(2097152&features)),QH("p1message","接続しています..."),go(1),(meshserver=MeshServerCreateControl(domainUrl,authCookie)).onStateChanged=onStateChanged,meshserver.onMessage=onMessage,meshserver.Start();var o=localStorage.getItem("desktopsettings");null!=o&&(desktopsettings=JSON.parse(o)),applyDesktopSettings()}function onStateChanged(e,t,o,n){if(0==t){if(setDialogMode(0),go(0),"noauth"==n)return void QH("p0span","認証を実行できません");2==o?setTimeout(serverPoll,5e3):QH("p0span","Webソケットに接続できません"),null!=authCookieRenewTimer&&(clearInterval(authCookieRenewTimer),authCookieRenewTimer=null)}else 2==t&&(meshserver.send({action:"meshes"}),meshserver.send({action:"nodes"}),meshserver.send({action:"files"}),xxcurrentView<2&&go(2),authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},18e5));QV("topMenuIcon",2==t)}function serverPoll(){xdr=null;try{xdr=new XDomainRequest}catch(e){}(xdr=xdr||new XMLHttpRequest).open("HEAD",window.location.href),xdr.timeout=15e3,xdr.onload=function(){reload()},xdr.onerror=xdr.ontimeout=function(){setTimeout(serverPoll,1e4)},xdr.send()}function updateSelf(){if(QV("verifyEmailId",!0!==userinfo.emailVerified&&null!=userinfo.email&&1==serverinfo.emailcheck),QV("manageAuthApp",4096&features),QV("manageOtp",0!=(4096&features)&&(1==userinfo.otpsecret||0<userinfo.otphkeys)),QV("p3createMeshLink1",!1),QV("p3createMeshLink2",!1),"number"==typeof userinfo.passchange)if(-1==userinfo.passchange)QH("p2nextPasswordUpdateTime"," -次回ログイン時にリセット。");else if(null!=passRequirements&&"number"==typeof passRequirements.reset){var e=userinfo.passchange+86400*passRequirements.reset-Math.floor(Date.now()/1e3);e<0?QH("p2nextPasswordUpdateTime"," -次回ログイン時にリセット。"):e<3600?QH("p2nextPasswordUpdateTime",format(" -{0}分でリセット{1}。",Math.floor(e/60),addLetterS(Math.floor(e/60)))):e<86400?QH("p2nextPasswordUpdateTime",format(" -{0}時間でリセット{1}。",Math.floor(e/3600),addLetterS(Math.floor(e/3600)))):QH("p2nextPasswordUpdateTime",format(" -{0}日でリセット{1}。"),Math.floor(e/86400),addLetterS(Math.floor(e/86400)))}}function addLetterS(e){return 1<e?"s":""}function setSessionActivity(){sessionActivity=Date.now()}function checkIdleSessionTimeout(){Date.now()-sessionActivity>serverinfo.timeout&&(window.location.href="logout")}function onMessage(e,t){switch(t.action){case"serverinfo":(serverinfo=t.serverinfo).timeout&&(setInterval(checkIdleSessionTimeout,1e4),checkIdleSessionTimeout()),QV("p3AccountActions",0==(4&features)&&0==serverinfo.domainauth),QV("logoutMenuOption",0==(4&features)&&0==serverinfo.domainauth);break;case"authcookie":authCookie=t.cookie,authRelayCookie=t.rcookie;break;case"userinfo":userinfo=t.userinfo,QH("p3userName",userinfo.name),updateSelf();break;case"users":for(var o in users={},t.users)users[t.users[o]._id]=t.users[o];updateUsers();break;case"wssessioncount":wssessions=t.wssessions,updateUsers();break;case"meshes":for(var o in meshes={},t.meshes)meshes[t.meshes[o]._id]=t.meshes[o];updateMeshes(),updateDevices();break;case"files":filetree=setupBackPointers(t.filetree),updateFiles();break;case"nodes":for(var o in nodes=[],t.nodes)for(var n in t.nodes[o])meshes[o]?(t.nodes[o][n].namel=t.nodes[o][n].name.toLowerCase(),t.nodes[o][n].rname?t.nodes[o][n].rnamel=t.nodes[o][n].rname.toLowerCase():t.nodes[o][n].rnamel=t.nodes[o][n].namel,t.nodes[o][n].meshnamel=meshes[o].name.toLowerCase(),t.nodes[o][n].meshid=o,t.nodes[o][n].state=t.nodes[o][n].state?t.nodes[o][n].state:0,t.nodes[o][n].desc=t.nodes[o][n].desc,t.nodes[o][n].icon||(t.nodes[o][n].icon=1),t.nodes[o][n].ident=++nodeShortIdent,nodes.push(t.nodes[o][n])):console.log("Invalid mesh (1): "+o);updateDevices(),0==xxcurrentView&&go(parseInt("{{viewmode}}")),gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"));break;case"powertimeline":if(t.nodeid!=powerTimelineReq)break;powerTimelineNode=t.nodeid,powerTimeline=t.timeline,powerTimelineUpdate=Date.now()+3e5,currentNode._id==t.nodeid&&drawDeviceTimeline();break;case"otpauth-request":if(2==xxdialogMode&&"otpauth-request"==xxdialogTag){var i=t.secret;52==i.length?i=i.split(/(.............)/).filter(Boolean).join(" "):32==i.length&&(i=(i=i.split(/(....)/).filter(Boolean).join(" ")).substring(0,20)+"<br/>"+i.substring(20)),QH("d2optinfo",'インストール<a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank> Google Authenticator </a>または互換性のあるアプリケーションの場合、<a href="\' + message.url +\'" rel="noreferrer noopener" target=_blank>このリンク</a>を使用するか、下に秘密を入力します。次に、現在の6桁のトークンを入力して、2段階ログインを有効にします。<br /><br /><div style=width:100%;text-align:center><tt id=d2optsecret secret="'+t.secret+'" style=font-size:15px>'+i+'</tt><br /><br />Token: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></div>'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"認証アプリ",1,null,t.success?"<b style = color:green> 2段階ログインの有効化に成功</ b>。再度ログインするには、有効なトークンが必要になります。":"<b style = color:red> 2段階ログインの有効化に失敗しました</ b>。アプリケーションから秘密をクリアして、再試行してください。適切なコードを入力するのに数分しかかかりません。");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"認証アプリ",1,null,t.success?"<b style = color:green> 2段階のログインアクティベーションが削除されました</ b>。この機能はいつでも再アクティブ化できます。":"<b style = color:red> 2段階のログインアクティベーションの削除に失敗しました</ b>。再試行する。");break;case"otpauth-getpasswords":if(xxdialogMode)return;var a="ワンタイムトークンは、セカンダリ認証として使用できます。セットを生成して印刷し、安全な場所に保管してください。";if(a+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(a+="<tr>");for(var r=""+t.passwords[l].p;r.length<8;)r="0"+r;!0===t.passwords[l].u?a+="<td>"+r.substring(0,4)+"&nbsp;"+r.substring(4):a+="<td><strike style=color:#BBB>"+r.substring(0,4)+"&nbsp;"+r.substring(4)}}else a+="<tr><td>アクティブなトークンがありません";a+="</table></div></div><br />",a+="<div><input type=button value='閉じる' onclick=setDialogMode(0) style=float:right></input>",a+="<input type=button value='新しいトークン' onclick='account_manageOtp(1);'></input>",null!=t.passwords&&(a+="<input type=button value='クリア' onclick='account_manageOtp(2);'></input>"),setDialogMode(2,"バックアップコードの管理",8,null,a+="</div><br />","otpauth-manage");break;case"event":if(t.event.noact)break;switch(t.event.action){case"userWebState":if(null!=localStorage){var d=JSON.parse(t.event.state);for(var l in d)localStorage.setItem(l,d[l]);null!=d.loctag&&d.loctag!=oldLoctag&&(null!=d.loctag?args.locale=d.loctag:delete args.locale,updateDevices(),updateMeshes())}break;case"accountchange":if(userinfo.name==t.event.account.name){var p=t.event.account.siteadmin?t.event.account.siteadmin:0,c=userinfo.siteadmin?userinfo.siteadmin:0;(t.event.account.quota!=userinfo.quota||0==(8&userinfo.siteadmin)&&0!=(8&t.event.account.siteadmin))&&meshserver.send({action:"files"}),userinfo=t.event.account,c!=p&&updateSiteAdmin(),updateSelf()}break;case"createmesh":null!=t.event.links[userinfo._id]&&(meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},updateMeshes(),updateDevices(),meshserver.send({action:"files"}));break;case"meshchange":if(null==meshes[t.event.meshid])meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},meshserver.send({action:"nodes"});else{if(meshes[t.event.meshid].name!=t.event.name)for(var l in meshes[t.event.meshid].name=t.event.name,nodes)nodes[l].meshid==t.event.meshid&&(nodes[l].meshnamel=t.event.name.toLowerCase());if(meshes[t.event.meshid].desc=t.event.desc,meshes[t.event.meshid].links=t.event.links,null==meshes[t.event.meshid].links[userinfo._id]){20==xxcurrentView&&currentMesh==meshes[t.event.meshid]&&go(2),delete meshes[t.event.meshid];var u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2))}}updateMeshes(),updateDevices(),meshserver.send({action:"files"}),20==xxcurrentView&&currentMesh._id==t.event.meshid&&p20updateMesh();break;case"deletemesh":meshes[t.event.meshid]&&(delete meshes[t.event.meshid],updateMeshes(),meshserver.send({action:"files"}));u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,updateDevices(),20<=xxcurrentView&&xxcurrentView<30&&currentMesh._id==t.event.meshid&&(setDialogMode(0),go(2)),10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2));break;case"addnode":var m=t.event.node;if(!meshes[m.meshid])break;if(null!=getNodeFromId(m._id))break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices();break;case"removenode":var h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1),updateDevices()}break;case"changenode":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).name=t.event.node.name,m.rname=t.event.node.rname,m.host=t.event.node.host,m.desc=t.event.node.desc,m.publicip=t.event.node.publicip,m.iploc=t.event.node.iploc,m.wifiloc=t.event.node.wifiloc,m.gpsloc=t.event.node.gpsloc,m.tags=t.event.node.tags,m.userloc=t.event.node.userloc,null!=t.event.node.agent&&(null==m.agent&&(m.agent={}),null!=t.event.node.agent.ver&&(m.agent.ver=t.event.node.agent.ver),null!=t.event.node.agent.id&&(m.agent.id=t.event.node.agent.id),null!=t.event.node.agent.caps&&(m.agent.caps=t.event.node.agent.caps),null!=t.event.node.agent.core?m.agent.core=t.event.node.agent.core:m.agent.core&&delete m.agent.core,m.agent.tag=t.event.node.agent.tag),null!=t.event.node.intelamt&&(null==m.intelamt&&(m.intelamt={}),null!=t.event.node.intelamt.state&&(m.intelamt.state=t.event.node.intelamt.state),null!=t.event.node.intelamt.host&&(m.intelamt.user=t.event.node.intelamt.host),null!=t.event.node.intelamt.user&&(m.intelamt.user=t.event.node.intelamt.user),null!=t.event.node.intelamt.tls&&(m.intelamt.tls=t.event.node.intelamt.tls),null!=t.event.node.intelamt.ver&&(m.intelamt.ver=t.event.node.intelamt.ver),null!=t.event.node.intelamt.tag&&(m.intelamt.tag=t.event.node.intelamt.tag),null!=t.event.node.intelamt.uuid&&(m.intelamt.uuid=t.event.node.intelamt.uuid),null!=t.event.node.intelamt.realm&&(m.intelamt.realm=t.event.node.intelamt.realm)),m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,t.event.node.icon&&(m.icon=t.event.node.icon),refreshDevice(m._id),updateDevices();break;case"nodemeshchange":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1)):(m.meshid=t.event.newMeshId,m.meshnamel=meshes[t.event.newMeshId].name.toLowerCase()),updateDevices(),refreshDevice(t.event.nodeid)}else{m=t.event.node;if(!meshes[m.meshid])break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices()}break;case"nodeconnect":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).conn=t.event.conn,m.pwr=t.event.pwr,updateDevices();break;case"login":null!=users&&users["user/"+domain+"/"+t.event.username.toLowerCase()]&&(users["user/"+domain+"/"+t.event.username.toLowerCase()].login=t.event.time)}}}function topMenu(e){null!=xxdialogMode&&0!=xxdialogMode&&999!=xxdialogMode||(void 0===e?1==("none"==QS("topMenu").display)?0!=xxdialogMode&&null!=xxdialogMode||(QV("topMenu",!0),xxdialogMode=999):(QV("topMenu",!1),xxdialogMode=0):(QV("topMenu",!1),xxdialogMode=0,1==e&&3!=xxcurrentView&&goForward("account"),2==e&&5!=xxcurrentView&&goForward("files")))}var filetreelinkpath,backStack=[];function goBack(){xxdialogMode||(0<backStack.length&&backStack.pop(),goStack())}function goForward(e){xxdialogMode||(backStack.push(e),goStack())}function goStack(){if(0!=backStack.length){var e=backStack[backStack.length-1],t=e.split("/")[0];"node"==t&&(setupDeviceMenu(0),gotoDevice(e)),"mesh"==t&&gotoMesh(e),"account"==t&&go(3),"devices"==t&&go(2),"files"==t&&go(5)}else go(2)}function updateFooterMenu(e){for(;null!=e&&e.length<3;)e.push({n:""});var t="",o="";if(null!=e)for(var n in e)t+='<td style="cursor:pointer'+(""==o?"":";border-left:solid 1px white")+'" onclick="'+e[n].f+'">'+e[n].n,o=e[n].n;QH("footerMenu","<tr>"+t)}function account_manageAuthApp(){xxdialogMode||0==(4096&features)||(1==userinfo.otpsecret?account_removeOtp():account_addOtp())}function account_addOtp(){xxdialogMode||1==userinfo.otpsecret||0==(4096&features)||(setDialogMode(2,"認証アプリ",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>読み込み中...</div>","otpauth-request"),meshserver.send({action:"otpauth-request"}))}function account_addOtpCheck(e){var t=6==Q("d2otpauthinput").value.length;QE("idx_dlgOkButton",t),e&&13==e.keyCode&&t&&dialogclose(1)}function account_removeOtp(){xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||setDialogMode(2,"認証アプリ",3,function(){meshserver.send({action:"otpauth-clear"})},"認証アプリケーションの削除2段階ログインを確認しますか?")}function account_manageOtp(e){2==xxdialogMode&&"otpauth-manage"==xxdialogTag&&dialogclose(0),xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||meshserver.send({action:"otpauth-getpasswords",subaction:e})}function account_showVerifyEmail(){xxdialogMode||1==userinfo.emailVerified||1!=serverinfo.emailcheck||setDialogMode(2,"メール確認",3,account_showVerifyEmailEx,"[OK]をクリックして確認メールを送信します:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>確認を受けるまで数分お待ちください。")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"メールアドレスの変更",3,account_changeEmail,addHtmlValue("Eメール","<input id=dp3email style=width:170px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />")),null!=userinfo.email&&(Q("dp3email").value=userinfo.email),account_validateEmail(),Q("dp3email").focus())}function account_validateEmail(e,t){QE("idx_dlgOkButton",validateEmail(Q("dp3email").value)&&Q("dp3email").value!=userinfo.email),null!=e&&13==e.keyCode&&dialogclose(1)}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp3email").value})}function account_showDeleteAccount(){if(!xxdialogMode){var e="<form method=post><table style=margin-left:10px><input type=hidden name=action value=deleteaccount /><input type=hidden name=authcookie value="+authCookie+" /><tr>";e+="<td align=right>パスワード:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr><tr><td align=right>パスワード:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr></table><div style=padding:10px;margin-bottom:4px>",e+='<input id=account_dlgCancelButton type=button value="キャンセル" style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>',e+='<input id=account_dlgOkButton type=submit value="OK" style="float:right;width:80px" onclick=dialogclose(1)>',setDialogMode(2,"アカウントを削除する",0,null,e+="</div><br /></form>"),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="<table style=margin-left:10px>";if(e+="<tr><td align=right>"+nobreak("以前のパスワード:")+"</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>",e+="<tr><td align=right>"+nobreak("新しいパスワード:")+"</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>",e+="<tr><td align=right>"+nobreak("新しいパスワード:")+"</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>",65536&features&&(e+="<tr><td align=right>パスワードのヒント:</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"),e+="</table>",passRequirements){var t=[],o=0;for(var n in passRequirements)"reset"!=n&&"hint"!=n&&(t.push(n+":"+passRequirements[n]),o++);0<o&&(e+="<br /><span style=font-size:x-small>"+format("要件:{0}。",t.join(", "))+"</span>")}return setDialogMode(2,"パスワードを変更する",3,account_showChangePasswordEx,e+="<br />"),Q("apassword0").focus(),account_validateNewPassword(),!1}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var e={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};65536&features&&(e.hint=Q("apasswordhint").value),meshserver.send(e)}}function account_createMesh(){if(!xxdialogMode)if(4294967295==userinfo.siteadmin||0==(64&userinfo.siteadmin))if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var e=addHtmlValue("名","<input id=dp3meshname style=width:170px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");e+=addHtmlValue("タイプ","<div style=width:170px;margin:0;padding:0><select id=dp3meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>ソフトウェアエージェントグループ</option><option value=1>Intel&reg; AMTのみ</option></select></div>"),setDialogMode(2,"デバイスグループを作成する",3,account_createMeshEx,e+=addHtmlValue("説明","<div style=width:170px;margin:0;padding:0><textarea id=dp3meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"アカウントのセキュリティ",1,null,"二要素認証が有効になるまでデバイスにアクセスできません。これは、追加のセキュリティのために必要です。 「マイアカウント」に移動して、「アカウントセキュリティ」セクションを確認します。");else setDialogMode(2,"アカウントのセキュリティ",1,null,"メールアドレスが確認されるまでデバイスにアクセスできません。これはパスワードの回復に必要です。 「マイアカウント」に移動して、メールアドレスを変更および確認します。");else setDialogMode(2,"新しいデバイスグループ",1,null,"このアカウントには、新しいデバイスグループを作成する権限がありません。")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0<Q("dp3meshname").value.length)}function account_createMeshEx(e,t){meshserver.send({action:"createmesh",meshname:Q("dp3meshname").value,meshtype:Q("dp3meshtype").value,desc:Q("dp3meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value)}function account_validateNewPassword(){var e="",t=0<Q("apassword0").value.length&&0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value&&Q("apassword0").value!=Q("apassword1").value;if(65536&features&&Q("apasswordhint").value==Q("apassword1").value&&(t=!1),""!=Q("apassword1").value)if(null==passRequirements||""==passRequirements){var o=checkPasswordStrength(Q("apassword1").value);e=80<=o?"<span style=color:green>Strong<span>":60<=o?"<span style=color:blue>&#9679;<span>":"<span style=color:red>&#9679;<span>"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="<span style=color:red>方針<span>")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,o={},n=0,i={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var a=0;a<e.length;a++)o[e[a]]=(o[e[a]]||0)+1,t+=5/o[e[a]];for(var s in i)n+=1==i[s]?1:0;return parseInt(t+10*(n-1))}function checkPasswordRequirements(e,t){if(null==t||""==t||"object"!=typeof t)return!0;if(t.min&&e.length<t.min)return!1;if(t.max&&e.length>t.max)return!1;for(var o=0,n=0,i=0,a=0,s=0;s<e.length;s++)/\d/.test(e[s])&&o++,/[a-z]/.test(e[s])&&n++,/[A-Z]/.test(e[s])&&i++,/\W/.test(e[s])&&a++;return!(t.num&&o<t.num)&&(!(t.lower&&n<t.lower)&&(!(t.upper&&i<t.upper)&&!(t.nonalpha&&a<t.nonalpha)))}function updateMeshes(){var e="",t=0;for(i in meshes){t++;var o=meshes[i].links[userinfo._id].rights,n="部分的権利";4294967295==o?n="完全な管理者":0==o&&(n="権利なし"),e+="<div style=cursor:pointer onclick=goForward('"+i+"')>",e+='<div style="float:left;margin-left:4px"><img src="/images/meshicon50.png" width=50 height=50 /></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+EscapeHtml(meshes[i].name)+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+n+"</div></div>",e+="</div></div>"}QH("p3meshes",e),QV("p3noMeshFound",0==t)}function gotoMesh(e){null==(currentMesh=meshes[e])&&goBack(),p20updateMesh(),go(20)}var sortorder,filetreelocation=[];function p5refreshFiles(){meshserver.send({action:"files"})}function updateFiles(){if(QV("MainMenuMyFiles",0==(8&features)),0==(8&features)){for(var e,t="",o="",n="<a style=cursor:pointer onclick=p5folderup(0)>ルート</a>",i="Root",a=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),c=0;c<p.length;c++)p[c].checked&&d.push(p[c].value);for(var c in filetreelinkpath="",filetreelocation){if(null==a.f||null==a.f[filetreelocation[c]])break;if(l.push(filetreelocation[c]),i+=" / "+filetreelocation[c],1==s){var u=filetreelocation[c].split("/");e=window.location+u[0]+"files/"+u[2],filetreelinkpath+=filetreelocation[c]}else""!=filetreelinkpath&&(filetreelinkpath+="/"+filetreelocation[c],2<s&&(e+="/"+filetreelocation[c]));n+=" / <a style=cursor:pointer onclick=p5folderup("+s+")>"+(null!=(a=a.f[filetreelocation[c]]).n?a.n:filetreelocation[c])+"</a>",s++}filetreelocation=l;var m=i.toLowerCase().startsWith("root / "+userinfo._id+" / public"),h=p5sort_files(a.f);for(var c in h){var f,g=h[c],v=g.n;f=40<(f=v).length?EscapeHtml(v.substring(0,40))+"...":EscapeHtml(v),v=EscapeHtml(v);var k="";null!=g.s&&(k=getFileSizeStr(g.s));var y="";if(g.t<3||4==g.t){y="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+v+"'>&nbsp;<span style=float:right;padding-right:4px>"+(1==g.t||4==g.t?p5getQuotabar(g):"")+"</span><span><div class=fileIcon"+g.t+'></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(g.nx)+'")>'+f+"</a></span></div>"}else{var x=f,b="";m&&(b=" (<a style=cursor:pointer onclick='p5showPublicLink(\""+e+"/"+g.nx+"\")'>リンク</a>)"),0<g.s&&(x='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+g.nx)+'">'+f+"</a>"+b),y="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+g.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+k+"</span><span><div class=fileIcon"+g.t+"></div>"+x+"</span></div>"}g.t<3?t+=y:o+=y}if(QH("p5rightOfButtons",p5getQuotabar(a)),QH("p5files",t+o),QH("p5currentpath",n),QE("p5FolderUp",0!=filetreelocation.length),QV("p5PublicShare",m),r==filetreelinkpath){p=document.getElementsByName("fc");for(c=0;c<p.length;c++)p[c].checked=0<=d.indexOf(p[c].value)}p5setActions()}}function getNiceSize(e){return e<=0?"ストレージを超えています":e<2048?format("{0} b残り",e):e<2097152?format("{0} k残り",Math.round(e/1024)):e<2147483648?format("残り{0} m",Math.round(e/1024/1024)):format("{0} g残り",Math.round(e/1024/1024/1024))}function p5getQuotabar(e){for(;1<e.t&&4!=e.t;)e=e.parent;return 1!=e.t&&4!=e.t||null==e.maxbytes?"":getNiceSize(e.maxbytes-e.s)+" <progress style=height:10px;width:100px value="+e.s+" max="+e.maxbytes+" />"}function p5showPublicLink(e){setDialogMode(2,"公開リンク",1,null,'<input type=text style=width:100% value="'+e+'" readonly />')}function p5sort_filename(e,t){return e.ln>t.ln?1*sortorder:e.ln<t.ln?-1*sortorder:0}function p5sort_timestamp(e,t){return e.d>t.d?1*sortorder:e.d<t.d?-1*sortorder:0}function p5sort_bysize(e,t){return e.s==t.s?p5sort_filename(e,t):(e.s-t.s)*sortorder}function p5sort_files(e){var t=[],o=Q("p5sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return sortorder=1,3<o&&(sortorder=-1,o-=3),1==o?t.sort(p5sort_filename):2==o?t.sort(p5sort_bysize):3==o&&t.sort(p5sort_timestamp),t}function p5setActions(){var e=getFileSelCount(),t=getFileCount(),o=getFileSelCount(!1);QE("p5DeleteFileButton",0<e&&0<filetreelocation.length),QE("p5NewFolderButton",0<filetreelocation.length),QE("p5UploadButton",0<filetreelocation.length),QE("p5RenameFileButton",1==e&&0<filetreelocation.length),QE("p5SelectAllButton",0<t),Q("p5SelectAllButton").value=0<e?"なし":"すべて",QE("p5CutButton",0<o&&e==o),QE("p5CopyButton",0<o&&e==o),QE("p5PasteButton",null!=p5clipboard&&0<p5clipboard.length&&0<filetreelocation.length)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function getFileCount(){return document.getElementsByName("fc").length}function p5selectallfile(){for(var e=0==getFileSelCount(),t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked=e;p5setActions()}function setupBackPointers(e){if(null!=e.f){var t=0,o=0;for(var n in e.f)setupBackPointers(e.f[n]),(e.f[n].parent=e).f[n].s&&(t+=e.f[n].s),e.f[n].c&&(o+=e.f[n].c),3==e.f[n].t&&o++;e.s=t,e.c=o}return e}function getFileSizeStr(e){return 1==e?"1バイト":format("{0}バイト",e)}function p5folderup(e){if(null==e)filetreelocation.pop();else for(;filetreelocation.length>e;)filetreelocation.pop();return updateFiles(),!1}function p5folderset(e){return filetreelocation.push(decodeURIComponent(e)),updateFiles(),!1}function p5createfolder(){setDialogMode(2,"新しいフォルダ",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />"),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var e=getFileSelCount(),t=0<getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p5recdeleteinput>再帰削除</label><br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"削除する",3,p5deletefileEx,1<e?format("選択したアイテム{0}を削除しますか?",e)+t:"選択したアイテムを削除しますか?"+t)}function p5deletefileEx(){for(var e=[],t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&e.push(t[o].value);meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:e,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){for(var e,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&(e=t[o].value);setDialogMode(2,"リネーム",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:e}),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5renamefileEx(e,t){t.newname=Q("p5renameinput").value,meshserver.send(t)}function p5fileNameCheck(e){var t=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",t),1==t&&e&&13==e.keyCode&&dialogclose(1)}var isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function p5uploadFile(){setDialogMode(2,"ファイルをアップロードする",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=hidden name=authCookie value='+authCookie+" /><input type=submit id=p5loginSubmit style=display:none /></form>"),updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(e){var t=document.getElementsByName("fc");p5clipboard=[],p5clipboardCut=e,p5clipboardFolder=Clone(filetreelocation);for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p5clipboard.push(t[o].value);p5updateClipview()}function p5pasteFile(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("{1}エントリ{2}のうち{0}をこの場所に拘束しますか?",0==p5clipboardCut?"copy":"move",p5clipboard.length,1<p5clipboard.length?"s":"")),setDialogMode(2,"ペースト",3,p5pasteFileEx,e)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:0==p5clipboardCut?"copy":"move",scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard}),p5folderup(999),1==p5clipboardCut&&(p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview())}function p5updateClipview(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("{2}の{0}エントリを保持しています{1}",p5clipboard.length,1<p5clipboard.length?"s":"",0==p5clipboardCut?"コピー":"動く")+', <a href=# onclick="return p5clearClip()" style=cursor:pointer>クリア</a>.'),QH("p5bottomstatus",e),p5setActions()}function p5clearClip(){return p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview(),!1}function p5fileDragDrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer&&0!=e.dataTransfer.files.length&&0!=filetreelocation.length)for(var t=[],o=[],n=[],i=[],a=e.dataTransfer.files.length,s=0;s<e.dataTransfer.files.length;s++){var l=new FileReader,r=e.dataTransfer.files[s];t.push(r.name),o.push(r.size),n.push(r.type),l.onload=function(e){i.push(e.target.result),0==--a&&(Q("p5fileDragName").value=t.join("*"),Q("p5fileDragSize").value=o.join("*"),Q("p5fileDragType").value=n.join("*"),Q("p5fileDragData").value=i.join("*"),Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath),Q("p5loginSubmit2").click())},l.readAsDataURL(r)}}var p5dragtimer=null;function p5fileDragOver(e){haltEvent(e),null!=p5dragtimer&&(clearTimeout(p5dragtimer),p5dragtimer=null);var t=!0;0==filetreelocation.length&&(t=!1),QV("bigok",t),QV("bigfail",!t)}function p5fileDragLeave(e){haltEvent(e),"p5filetable"!=e.target.id?(QV("bigfail",!1),QV("bigok",!1)):p5dragtimer=setTimeout("QV('bigfail',false);QV('bigok',false);p5dragtimer=null;",200)}function ondeskkeypress(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeys(e)}}function ondeskkeydown(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyDown(e)}}function ondeskkeyup(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyUp(e)}}var updateDevicesTimer=null;function updateDevices(){null==updateDevicesTimer&&(updateDevicesTimer=setTimeout(updateDevicesEx,200))}var deviceHeaderCount,sort=0,deviceHeaderId=0,deviceHeaders={},showRealNames=!1,deviceHeaderTotal=0,deviceHeadersTitles=(deviceHeaders={},{});function updateDevicesEx(){null!=updateDevicesTimer&&(clearTimeout(updateDevicesTimer),updateDevicesTimer=null);var e="",t=0,o=null,n=0,i={};for(var a in deviceHeaderCount={},deviceHeaders={},deviceHeadersTitles={},(deviceHeaderTotal=deviceHeaderId=0)==sort?nodes.sort(meshSort):1==sort?nodes.sort(powerSort):2==sort&&(1==showRealNames?nodes.sort(deviceHostSort):nodes.sort(deviceSort)),nodes)if(0!=nodes[a].v){var s=meshes[nodes[a].meshid].links[userinfo._id];if(null!=s){s.rights;if(0==sort){if(nodes.sort(meshSort),nodes[a].meshid!=o){deviceHeaderSet();var l="";1==meshes[nodes[a].meshid].mtype&&(l="<span style=color:lightgray>、Intel&reg; AMTのみ</span>"),null!=o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=padding-top:4px><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+nodes[a].meshid+'")>'+EscapeHtml(meshes[nodes[a].meshid].name)+"</span>"+l+"<span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",i[o=nodes[a].meshid]=1,t=0}}else 1==sort?nodes[a].pwr!==o&&(deviceHeaderSet(),null!==o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[a].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",o=nodes[a].pwr,t=0):2==sort&&null==o&&(o="1");n++;var r=EscapeHtml(nodes[a].name);0==r.length&&(r="<i>なし</i>"),null!=nodes[a].rname&&0<nodes[a].rname.length&&(r+=" /"+EscapeHtml(nodes[a].rname));var d=EscapeHtml(nodes[a].name);1==showRealNames&&null!=nodes[a].rname&&(d=EscapeHtml(nodes[a].rname)),0==d.length&&(d="<i>なし</i>");var p=nodes[a].icon,c=NodeStateStr(nodes[a]);nodes[a].conn&&0!=nodes[a].conn||(p+=" gray"),e+="<div style=cursor:pointer onclick=goForward('"+nodes[a]._id+"')>",e+='<div class="i'+p+'" style="float:left;margin-left:4px"></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+d+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+c+"</div></div>",e+="</div></div>",deviceHeaderTotal++,void 0===deviceHeaderCount[nodes[a].state]?deviceHeaderCount[nodes[a].state]=1:deviceHeaderCount[nodes[a].state]++}}if(0==sort)for(var a in meshes){var u=meshes[a],m=u.links[userinfo._id];if(null!=m){m.rights;null==i[u._id]&&(""!=o&&""!=e&&(e+="</tr></table>"),e+="<div><div colspan=3 class=DevSt><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+u._id+'")>'+EscapeHtml(u.name)+"</span></div>",1==u.mtype&&(e+="<div style=padding:10px><i>Intel&reg;なしこのグループのAMTデバイス"),2==u.mtype&&(e+="<div style=padding:10px><i>このグループにデバイスはありません"),e+=".</i></div></div>",o=u._id,n++)}}for(var a in 0==n?QH("xdevices",'<div style="margin-top:50px;text-align:center"><span style="font-size:30px">デバイスなし</span><br /><br />このWebサイトのデスクトップバージョンを使用して、デバイスを追加します。</div>'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(a,deviceHeaders[a]);for(var a in deviceHeadersTitles)Q(a).title=deviceHeadersTitles[a]}var powerStatetable=["","パワード","睡眠","睡眠","睡眠","冬眠","電源を切る","プレゼント"],powerStateStrings=["","パワード","睡眠","睡眠","深い眠り","冬眠","ソフトオフ","プレゼント"],powerStateStrings2=["","デバイスに電源が入っています","デバイスはスリープ状態です(S1)","デバイスはスリープ状態です(S2)","デバイスはディープスリープ状態です(S3)","デバイスは休止状態です(S4)","デバイスはソフトオフ状態です(S5)","デバイスは存在しますが、電源状態を判別できません"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0<e.state&&e.state<powerStatetable.length&&state.push(powerStatetable[e.state]),e.conn&&(0!=(1&e.conn)&&t.push("<span>エージェント</span>"),0!=(2&e.conn)?t.push("<span>CIRA</span>"):0!=(4&e.conn)&&t.push("<span>Intel&reg; AMT</span>"),0!=(8&e.conn)&&t.push("<span>リレー</span>"),0!=(16&e.conn)&&t.push("<span>MQTT</span>")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return e<powerStatetable.length?powerStatetable[e]:""}function PowerStateStr2(e){return 0!=e&&e<powerStatetable.length?powerStatetable[e]:"未知の"}function onSortSelectChange(e){sort=document.getElementById("sortselect").selectedIndex,e||putstore("sort",sort),updateDevicesEx()}function deviceHeaderSet(){if(0!=deviceHeaderId){deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+" ノード";var e="";for(var t in deviceHeaderCount)0<e.length&&(e+=", "),e+=deviceHeaderCount[t]+" "+PowerStateStr2(t);deviceHeadersTitles["DevxHeader"+deviceHeaderId]=e,deviceHeaderId++,deviceHeaderCount={},deviceHeaderTotal=0}else deviceHeaderId=1}function meshSort(e,t){return e.meshnamel>t.meshnamel?1:e.meshnamel<t.meshnamel?-1:e.meshid==t.meshid?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:0}function powerSort(e,t){var o=e.pwr?e.pwr:0,n=t.pwr?t.pwr:0;return o==n?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:n<o?1:o<n?-1:0}function deviceSort(e,t){return e.namel>t.namel?1:e.namel<t.namel?-1:0}function deviceHostSort(e,t){return e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0}function refreshDevice(e){currentNode&&currentNode._id==e&&gotoDevice(e,xxcurrentView,!0)}function getNodeRights(e){var t=getNodeFromId(e);return meshes[t.meshid].links[userinfo._id].rights}var currentNode,currentDevicePanel=0,powerTimelineNode=null,powerTimelineReq=null,powerTimelineUpdate=null,powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(e,t,o){if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var n=getNodeFromId(e);if(null!=n){var i=meshes[n.meshid];if(null!=i){var a=i.links[userinfo._id].rights;if(!currentNode||currentNode._id!=n._id||1==o){currentNode=n;var s=EscapeHtml(n.name);0==s.length&&(s="<i>なし</i>"),0!=(4&a)&&(s="<span onclick=showEditNodeValueDialog(0) style=cursor:pointer>"+s+"</span>"),QH("p10deviceName",s);var l="<table style=width:100%>";l+=addDeviceAttribute("<span>グループ</span>",'<a onclick=goForward("'+n.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[n.meshid].name)+"</a>"),null!=n.rname&&(l+=addDeviceAttribute("<span>名</span>","<span>"+EscapeHtml(n.rname)+"</span>")),1!=i.mtype&&n.name==n.host||(0!=(4&a)?n.host?l+=addDeviceAttribute("ホスト名","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(n.host)+"</span>"):l+=addDeviceAttribute("ホスト名","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>なし</i></span>"):l+=addDeviceAttribute("ホスト名",EscapeHtml(n.host)));var r=n.desc?EscapeHtml(n.desc):"<i>なし</i>";l+=addDeviceAttribute("説明",0!=(4&a)?"<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+r+"</span>":r);var d=["未知の","Windows 32ビットコンソール","Windows 64ビットコンソール","Windows 32ビットサービス","Windows 64ビットサービス","Linux 32ビット","Linux 64ビット","MIPS","XENx86","Android ARM","Linux ARM","MacOS 32ビット","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32bit","MacOS 64ビット","ChromeOS","Linux Poky x86-64bit","Linux NoKVM x86-32bit","Linux NoKVM x86-64ビット","Windows MinCoreコンソール","Windows MinCoreサービス","NodeJS","ARM-リナロ","ARMv6l / ARMv7l","ARMv8 64ビット","ARMv6l / ARMv7l / NoKVM","未知の","未知の","FreeBSD x86-64"];if(null!=n.agent&&null!=n.agent.id&&null!=n.agent.ver){var p="";p=n.agent.id<=d.length?d[n.agent.id]:d[0],0!=n.agent.ver&&(p+=" v"+n.agent.ver),l+=addDeviceAttribute("エージェント",p)}if(null!=n.intelamt){p="";var c={0:nobreak("アクティブ化されていない(前)"),1:nobreak("アクティブ化されていない(イン)"),2:nobreak("有効化")};null!=n.intelamt.ver&&null==n.intelamt.state?p+="<i>"+nobreak("不明な状態")+"</i>, v"+n.intelamt.ver:null==n.intelamt.ver&&2==n.intelamt.state?p+="<i>有効化</i>":null==n.intelamt.ver||null==n.intelamt.state?p+="<i>不明なバージョンと状態</i>":(p+=c[n.intelamt.state],n.intelamt.flags&&(2&n.intelamt.flags?p=" <span>CCM</span>":4&n.intelamt.flags&&(p=" <span>ACM</span>")),p+=", v"+n.intelamt.ver),1==n.intelamt.tls&&(p+=", <span>TLS</span>"),2==n.intelamt.state&&(null!=n.intelamt.user&&""!=n.intelamt.user||(p+=0!=(4&a)?', <i style=color:#FF0000;cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'+nobreak("資格情報なし")+"</i>":", <i style=color:#FF0000>資格情報なし</i>"),p+=" ",0!=(4&a)&&(p+='<img src=images/link4.png height=10 width=10 style=cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'));var u="Intel&reg;私";"number"==typeof n.intelamt.sku&&(0!=(8&n.intelamt.sku)?u="Intel&reg; AMT":0!=(16&n.intelamt.sku)&&(u="Intel&reg; SM")),l+=addDeviceAttribute(u,p)}if(null!=n.agent&&null!=n.agent.tag&&"mailto:"!=n.agent.tag){var m=EscapeHtml(n.agent.tag);m.startsWith("mailto:")&&(m='<a href="'+m+'">'+m.substring(7)+"</a>"),l+=addDeviceAttribute("エージェントタグ",m)}var h=n.conn;if(h&&1<h){var f=[];0!=(1&n.conn)&&f.push("<span>エージェント</span>"),0!=(2&n.conn)?f.push("<span>Intel&reg; AMT CIRA</span>"):0!=(4&n.conn)&&f.push("<span>Intel&reg; AMT</span>"),0!=(8&n.conn)&&f.push("<span>エージェントリレー</span>"),0!=(16&n.conn)&&f.push("<span>MQTT</span>"),l+=addDeviceAttribute("接続性",f.join(", "))}var g="<i>なし</i>";if(null!=n.tags)for(var v in g="",n.tags)g+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+n.tags[v]+"</span>";l+=addDeviceAttribute("タグ",0!=(4&a)?"<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+g+"</span>":g),l+="</table><br />",0!=(76&a)&&(l+="<input type=button value=Actions onclick=deviceActionFunction() />"),QH("p10html",l),setupFiles(),l="<div style=float:right;font-size:x-small;margin-right:10px>",0!=(4&a)&&(l+='<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+n._id+'")>デバイスを削除</a>'),l+="</div><div style=font-size:x-small>",l+="</div><br>",QH("p10html3",l);var k=PowerStateStr(n.state);0!=(1&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>メッシュエージェント</span>"),0!=(2&h)?(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg;接続されたAMT</span>"):0!=(4&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMTが検出されました</span>"),0!=(16&h)&&(0<k.length&&(k+="<br/>"),k+="<span style=font-size:12px>MQTTチャネルが接続されました</span>"),QH("MainComputerState",k),QH("MainComputerImage",'<div class="i'+n.icon+'"></div>'),powerTimelineNode!=currentNode._id&&powerTimelineReq!=currentNode._id&&(QH("p10html2",""),powerTimelineReq=currentNode._id,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}setupDesktop(),go(t=t||10),setupDeviceMenu()}else goBack()}else goBack()}else setDialogMode(2,"アカウントのセキュリティ",1,null,"二要素認証が有効になるまでデバイスにアクセスできません。これは、追加のセキュリティのために必要です。 「マイアカウント」に移動して、「アカウントセキュリティ」セクションを確認します。");else setDialogMode(2,"アカウントのセキュリティ",1,null,"メールアドレスが確認されるまでデバイスにアクセスできません。これはパスワードの回復に必要です。 「マイアカウント」に移動して、メールアドレスを変更および確認します。")}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"デバイストースト",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var o=0;currentNode&&(o=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var n=[];0!=currentDevicePanel&&n.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&o||256&o)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8&currentNode.intelamt.sku))||currentNode.agent&&1&currentNode.agent.caps)&&n.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&o&&(4294967295==o||0==(1024&o))&&2==currentNode.mtype&&4&currentNode.agent.caps&&n.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(n)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="このデバイスで実行する操作を選択します。<br /><br />",o="<select id=d2deviceop style=float:right;width:170px>";0!=(64&e)&&(o+="<option value=100>目を覚ます</option>"),0!=(8&e)&&(o+="<option value=4>睡眠</option><option value=3>リセットする</option><option value=2>電源を切る</option>"),setDialogMode(2,"デバイスアクション",3,deviceActionFunctionEx,t+=addHtmlValue("操作",o+="</select>"))}}function deviceActionFunctionEx(){var e=Q("d2deviceop").value;100==e?meshserver.send({action:"wakedevices",nodeids:[currentNode._id]}):meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:e})}function updateDeviceTimeline(){2==meshserver.State&&null!=powerTimelineNode&&null!=powerTimelineUpdate&&null!=currentNode&&powerTimelineNode==powerTimelineReq&&currentNode._id==powerTimelineNode&&powerTimelineUpdate<Date.now()&&(powerTimelineUpdate=null,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}function drawDeviceTimeline(){var e=null,t=Date.now();currentNode._id==powerTimelineNode&&(e=powerTimeline);var o=new Date;o.setHours(0,0,0,0);(o=new Date(o.getTime()-5184e5)).getTime();var n=[];if(null!=e&&1<e.length){n.push([0,e[1],e[0]]);for(var i=e[1],a=2;a<e.length;a+=2){var s=e[a],l=t;e.length>a+1&&(l=e[a+1]),n.push([i,i+l,s]),i+=l}}var r="",d=1,p=new Date,c=Q("masthead").offsetWidth-122;p.setHours(0,0,0,0);for(a=0;a<7;a++){var u="",m=p.getTime(),h=m+864e5;for(var f in n){var g=n[f];if(1==isTimeBlockInside(m,h,g[0],g[1])){var v=Math.max(m,g[0]),k=Math.min(Math.min(h,g[1]),t),y=Math.round((k-v)*c/864e5);0<y&&(u+="<div style=display:table-cell;width:"+y+"px;background-color:"+powerColor(g[2])+";height:16px></div>")}}r+="<tr style="+(d%2==0?"background-color:#DDD":"")+"><td><div>&nbsp;"+printDate(p)+"<div></div></div></td><td><div>"+u+"</div></td></tr>",++d,p=new Date(p.getTime()-864e5)}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse;width:calc(100% - 18px);margin:9px" border=0 cellpadding=2 cellspacing=0><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:90px>Day</th><th scope=col style=text-align:center>Power State</th></tr>'+r+"</tbody></table>")}function powerColor(e){return e<powerColorTable.length?powerColorTable[e]:"yellow"}function isTimeBlockInside(e,t,o,n){return o<e&&t<n||(e<o&&o<t||e<n&&n<t)}function addDeviceAttribute(e,t){return"<tr><td style=width:100px;color:gray>"+e+"</td><td style=overflow:hidden>"+t+"</td></tr>"}function editDeviceAmtSettings(e,t){if(!xxdialogMode){var o="",n=getNodeFromId(e),i=3;0!=(4&getNodeRights(e))&&(o+=addHtmlValue("ユーザー名",'<input id=dp10username style=width:170px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />'),o+=addHtmlValue("パスワード","<input id=dp10password type=password style=width:170px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />"),o+=addHtmlValue("セキュリティ","<select id=dp10tls style=width:176px><option value=0>TLSセキュリティなし</option><option value=1>TLSセキュリティが必要</option></select>"),null!=n.intelamt.user&&""!=n.intelamt.user&&(i=7),setDialogMode(2,"Intelを編集&reg; AMTクレデンシャル",i,editDeviceAmtSettingsEx,o,{node:n,func:t}),null!=n.intelamt.user&&""!=n.intelamt.user?Q("dp10username").value=n.intelamt.user:Q("dp10username").value="admin",Q("dp10tls").value=n.intelamt.tls,validateDeviceAmtSettings())}}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(e,t){if(2==e)meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:"",pass:""}});else{var o=Q("dp10username").value;""==o&&(o="admin");var n=Q("dp10password").value;""==n&&(o=""),meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:o,pass:n,tls:Q("dp10tls").value}}),t.node.intelamt.user=o,t.node.intelamt.tls=Q("dp10tls").value,t.func&&setTimeout(t.func,300)}}function p10showDeleteNodeDialog(e){xxdialogMode||(setDialogMode(2,"ノードを削除",3,p10showDeleteNodeDialogEx,format("{0}を削除しますか?",EscapeHtml(currentNode.name))+"<br /><br /><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />確認する",e),p10validateDeleteNodeDialog())}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(e,t){meshserver.send({action:"removedevices",nodeids:[t]})}function p10showiconselector(){if(!xxdialogMode&&0!=(4&meshes[currentNode.meshid].links[userinfo._id].rights)){"<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>","<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>","<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br>","<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>","<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>","<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>",setDialogMode(2,"アイコンの選択",0,null,"<table align=center><td><div style=display:inline-block class=i1 onclick=p10setIcon(1)></div><div style=display:inline-block class=i2 onclick=p10setIcon(2)></div><div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br><div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><div style=display:inline-block class=i5 onclick=p10setIcon(5)></div><div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>"),QV("id_dialogclose",!0)}}function p10setIcon(e){setDialogMode(0),meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:e})}var desktop,desktopNode,showEditNodeValueDialog_modes=["装置名","ホスト名","説明","タグ"],showEditNodeValueDialog_modes2=["name","host","desc","tags"],showEditNodeValueDialog_modes3=["","","","Group1、Group2、Group3"];function showEditNodeValueDialog(e){if(!xxdialogMode){setDialogMode(2,"デバイスを編集",3,showEditNodeValueDialogEx,addHtmlValue(showEditNodeValueDialog_modes[e],'<input id=dp10devicevalue style=width:170px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[e]+'" onchange=p10editdevicevalueValidate('+e+",event) onkeyup=p10editdevicevalueValidate("+e+",event) />"),e);var t=currentNode[showEditNodeValueDialog_modes2[e]];null==t&&(t=""),Array.isArray(t)&&(t=t.join(", ")),Q("dp10devicevalue").value=t,p10editdevicevalueValidate(),Q("dp10devicevalue").focus()}}function showEditNodeValueDialogEx(e,t){var o={action:"changedevice",nodeid:currentNode._id};o[showEditNodeValueDialog_modes2[t]]=Q("dp10devicevalue").value,meshserver.send(o)}function p10editdevicevalueValidate(e,t){var o=1<e||0<Q("dp10devicevalue").value.length;QE("idx_dlgOkButton",o),null!=t&&1==o&&13==t.keyCode&&dialogclose(1)}var desktopsettings={encoding:2,showfocus:!1,showmouse:!0,showcad:!0,quality:40,scaling:1024,framerate:50};function setupDesktop(){desktopNode!=currentNode&&null!=desktop&&(desktop.Stop(),desktop=desktopNode=null),desktopNode==currentNode&&null!=desktop||(QH("DeskParent",'<canvas id=Desk width=640 height=200 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>'),desktopNode=currentNode,Q("Desk").addEventListener("DOMMouseScroll",function(e){return dmousewheel(e)}),Q("Desk").addEventListener("mousewheel",function(e){return dmousewheel(e)})),desktopNode=currentNode,updateDesktopButtons(),Q("Desk").toBlob||QV("deskSaveBtn",!1)}function updateDesktopButtons(){var e=meshes[currentNode.meshid],t=0;null!=desktop&&(t=desktop.State);var o=e.links[userinfo._id].rights;QV("disconnectbutton1",0!=t),QV("connectbutton1",0==t&&2==e.mtype&&(8&o||256&o)),QV("connectbutton1h",0==t&&8&o&&(1==e.mtype||null!=currentNode.intelamt&&2==currentNode.intelamt.state&&null!=currentNode.intelamt.ver&&"number"==typeof currentNode.intelamt.sku&&0!=(8&currentNode.intelamt.sku))),QV("d7amtkvm",!(null==currentNode.intelamt||null==currentNode.intelamt.ver&&1!=e.mtype||0!=t&&2!=desktop.contype)),QV("d7meshkvm",2==e.mtype&&(0==t||1==desktop.contype));var n=0!=(1&currentNode.conn);QE("connectbutton1",n);var i=0!=(6&currentNode.conn);QE("connectbutton1h",i),QV("DeskToastButton",0!=(16384&o)&&currentNode.agent&&currentNode.agent.id<5&&8&o),QV("deskActionsBtn",8&o),Q("DeskControl").checked=0!=(8&o),0==n&&QV("DeskTools",!1)}function connectDesktop(e,t){if(setSessionActivity(),null==desktop)if(desktopNode=currentNode,2==t){if(null==desktopNode.intelamt.user||""==desktopNode.intelamt.user)return void editDeviceAmtSettings(desktopNode._id,connectDesktop);(desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie)).debugmode=debugmode,desktop.onStateChanged=onDesktopStateChange,desktop.m.bpp=1==desktopsettings.encoding||3==desktopsettings.encoding?1:2,desktop.m.useZRLE=desktopsettings.encoding<3,desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id,16994,"*","*",0),desktop.contype=2}else(desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).debugmode=debugmode,desktop.m.debugmode=debugmode,desktop.attemptWebRTC=attemptWebRTC,desktop.onStateChanged=onDesktopStateChange,desktop.m.CompressionLevel=desktopsettings.quality,desktop.m.ScalingLevel=desktopsettings.scaling,desktop.m.FrameRateTimer=desktopsettings.framerate,desktop.m.onDisplayinfo=deskDisplayInfo,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id),desktop.contype=1;else desktop.Stop(),desktopNode=desktop=null}function onDesktopStateChange(e,t){var o=t;3==o&&2==e.contype&&o++;var n=StatusStrs[o];switch(null!=desktop&&1==desktop.webRtcActive&&(n+="、WebRTC"),QH("deskstatus",n),t){case 0:desktop.Stop(),desktopNode=desktop=null,QV("termdisplays",!1),1==fullscreen&&deskToggleFull()}updateDesktopButtons(),deskAdjust(),setTimeout(deskAdjust,50)}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),updateDesktopButtons(),setDialogMode(7,"リモートデスクトップ設定",3,showDesktopSettingsChanged))}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value,desktopsettings.showfocus=d7showfocus.checked,desktopsettings.showmouse=d7showcursor.checked,desktopsettings.quality=d7bitmapquality.value,desktopsettings.scaling=d7bitmapscaling.value,desktopsettings.framerate=d7framelimiter.value,localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings)),applyDesktopSettings(),desktop&&(1==desktop.contype&&0!=desktop.State&&desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate),2==desktop.contype&&0!=desktop.State&&(desktop.Stop(),setTimeout(function(){connectDesktop(null,2)},50)))}function applyDesktopSettings(){var e="",t=512&features?[90,70,50,40,30,20,10,5,1]:[50,40,30,20,10,5,1];for(var o in t)e+="<option value="+t[o]+">"+t[o]+"%</option>";QH("d7bitmapquality",e),d7desktopmode.value=desktopsettings.encoding,d7showfocus.checked=desktopsettings.showfocus,d7showcursor.checked=desktopsettings.showmouse,d7bitmapquality.value=40,0<=t.indexOf(parseInt(desktopsettings.quality))&&(d7bitmapquality.value=desktopsettings.quality),d7bitmapscaling.value=desktopsettings.scaling,desktopsettings.framerate&&(d7framelimiter.value=desktopsettings.framerate)}var fullscreen=!1;function deskAdjust(){var e=(Q("DeskParent").clientHeight-Q("Desk").clientHeight)/2;if(e<0){var t=Q("DeskParent").clientHeight,o=9999;desktop&&(o=desktop.m.width/desktop.m.height*t),QS("Desk")["max-height"]=t+"px",QS("Desk")["max-width"]=o+"px",e=0}else QS("Desk")["max-height"]=null,QS("Desk")["max-width"]=null;QS("Desk")["margin-top"]=e+"px",QS("Desk")["margin-bottom"]=e+"px"}function deskSendKeys(){if(!xxdialogMode&&null!=desktop&&3==desktop.State){var e=Q("deskkeys").value;0==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]]):1==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]]):2==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]]):desktop.sendCtrlMsg('{"action":"lock"}'):3==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]]):4==e?2==desktop.contype?desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]]):5==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]]):6==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]]):7==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65473,1],[65473,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,115],[desktop.m.KeyAction.UP,115],[desktop.m.KeyAction.EXUP,18]]):8==e?2==desktop.contype?desktop.m.sendkey([[65507,1],[119,1],[119,0],[65507,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,17],[desktop.m.KeyAction.DOWN,87],[desktop.m.KeyAction.UP,87],[desktop.m.KeyAction.EXUP,17]]):9==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65289,1],[65289,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9],[desktop.m.KeyAction.EXUP,18]]):10==e?desktop.m.sendcad():11==e&&(2==desktop.contype?desktop.m.sendkey([[65289,1],[65289,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9]]))}}function sendSpecialKeys(){xxdialogMode||null==desktop||3!=desktop.State||setDialogMode(3,"特別なキー",3,deskSendKeys)}function toggleSoftKeys(e){QV("DeskSoftInput",1==e),1==e&&Q("DeskSoftInput").focus()}function toggleDeskTools(){setSessionActivity(),xxdialogMode||("none"==QS("DeskTools").display?(QV("DeskTools",!0),Q("DeskTools").nodeid=currentNode._id,refreshDeskTools()):QV("DeskTools",!1))}function refreshDeskTools(){setSessionActivity(),QV("DeskToolsRefreshButton",!1),setTimeout(refreshDeskToolsEx,500),meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",!0)}var filesNode,deskTools={sort:1,msg:null};function sortProcess(e){deskTools.sort=e,showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(e,t){return e.p>t.p?1:e.p<t.p?-1:0}function sortProcessName(e,t){return e.d>t.d?1:e.d<t.d?-1:0}function showDeskToolsProcesses(e){if(null!=(deskTools.msg=e)){if(Q("DeskTools").nodeid==e.nodeid){var t=[],o=null;try{o=JSON.parse(e.value)}catch(e){}if(console.log(o),null!=o){for(var n in o)t.push({p:parseInt(n),c:o[n].cmd,d:o[n].cmd.toLowerCase(),u:o[n].user});0==deskTools.sort?t.sort(sortProcessPid):1==deskTools.sort&&t.sort(sortProcessName);var i="";for(var a in t)0!=t[a].p&&(i+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+t[a].p+"</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess("+t[a].p+',"'+t[a].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(t[a].u?t[a].u:"")+"</div><div>"+t[a].c+"</div></div>");QH("DeskToolsProcesses",i)}}}else QH("DeskToolsProcesses","")}function deskSaveImage(){if(setSessionActivity(),!xxdialogMode&&null!=desktop&&3==desktop.State){var e=new Date,t="Desktop-"+currentNode.name+"-"+e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)+"-"+("0"+e.getHours()).slice(-2)+"-"+("0"+e.getMinutes()).slice(-2);Q("Desk").toBlob(function(e){saveAs(e,t+".jpg")})}}function deskDisplayInfo(e,t,o,n){var i=Q("termdisplays").value;if(0<t.length){var a="";for(var s in t)a+="<option"+(i==t[s]?" selected":"")+">"+t[s]+"</option>";QH("termdisplays",a)}QV("termdisplays",0<t.length)}function deskGetDisplayNumbers(e){desktop.m.GetDisplayNumbers()}function deskSetDisplay(e){setSessionActivity();var t=0,o=Q("termdisplays").value;t="すべてのディスプレイ"==o?65535:parseInt(o.substring(8)),desktop.m.SetDisplay(t)}function dmousedown(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousedown(e)}function dmouseup(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mouseup(e)}function dmousemove(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousemove(e)}function dmousewheel(e){return setSessionActivity(),!(xxdialogMode||null==desktop||!desktop.m.mousewheel)&&(desktop.m.mousewheel(e),haltEvent(e),!0)}function drotate(e){xxdialogMode||null==desktop||(desktop.m.setRotation(desktop.m.rotation+e),deskAdjust(),deskAdjust())}function stopProcess(e,t){return setDialogMode(2,"プロセス制御",3,stopProcessEx,format('プロセス#{0} "{1} "を停止しますか?',e,t),e),!1}function stopProcessEx(e,t){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:t}),setTimeout(refreshDeskTools,300)}function setupFiles(){var e=filesNode==currentNode,t=0!=(1&(filesNode=currentNode).conn);QE("p13Connect",t),0!=e&&0!=t||!files||(files.Stop(),files=null)}function onFilesStateChange(e,t){setSessionActivity(),p13Connect.value=0==t?"つなぐ":"切断する";var o=StatusStrs[t];switch(1==files.webRtcActive&&(o+="、WebRTC"),Q("p13Status").textContent=o,t){case 0:QH("p13files",""),p13filetree=null,p13filetreelocation=[],QH("p13currentpath",""),QE("p13FolderUp",!1),p13setActions(),null!=files&&(files.Stop(),files=null);break;case 3:p13targetpath="",files.sendText({action:"ls",reqid:1,path:""})}}function CreateRemoteFiles(e){var t={protocol:5};return t.onFileUpdate=e,t.xxStateChange=function(e){},t.ProcessData=function(e){t.onFileUpdate(e)},t}var autoConnectFilesTimer=null;function autoConnectFiles(e){autoConnectFilesTimer=null==autoConnectFilesTimer?setInterval(connectFiles,100):(clearInterval(autoConnectFilesTimer),null)}function connectFiles(e){files?(files.Stop(),files=null):((files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).attemptWebRTC=attemptWebRTC,files.onStateChanged=onFilesStateChange,files.Start(filesNode._id)),p13clipboard=p13clipboardFolder=null,p13clipboardCut=0,p13updateClipview()}var p13sortorder,p13filetree=null,p13targetpath=null,p13filetreelocation=[];function p13gotFiles(e){if(setSessionActivity(),0<e.length&&123!=e.charCodeAt(0))p13gotDownloadBinaryData(e);else if("download"!=(e=JSON.parse(decode_utf8(e))).action)if(e.path=e.path.replace(/\//g,"\\"),null!=p13filetree&&e.path==p13filetree.path){var t=p13getCheckedNames();p13filetree=e,p13updateFiles(t)}else{for(var o=e.path.replace(/\//g,"\\"),n=p13targetpath.replace(/\//g,"\\");0<o.length&&"\\"==o[0];)o=o.substring(1);for(;0<n.length&&"\\"==n[0];)n=n.substring(1);(o==n||"\\"==e.path&&""==p13targetpath)&&(p13filetree=e,p13updateFiles())}else p13gotDownloadCommand(e)}function p13getCheckedNames(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);return e}function p13updateFiles(e){var t="",o="",n="<a style=cursor:pointer onclick=p13folderup(0)>ルート</a>",i=p13filetree.path.split("\\");for(var a in p13filetreelocation=[],i)""!=i[a]&&p13filetreelocation.push(i[a]);for(var a in p13filetreelocation)n+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(a)+1)+")>"+p13filetreelocation[a]+"</a>";var s=p13filetreelocation.join("/"),l=p13sort_files(p13filetree.dir);for(var a in l){var r,d=l[a],p=d.n;r=70<(r=p).length?EscapeHtml(p.substring(0,70))+"...":EscapeHtml(p),p=EscapeHtml(p);var c="";null!=d.s&&(c=getFileSizeStr(d.s));var u="";if(d.t<3){u="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right></span><span><div class=fileIcon"+d.t+'></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+r+"</a></span></div>"}else{var m=r;0<d.s&&(m='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+p)+"','"+encodeURIComponent(p)+"',"+d.s+')">'+r+"</a>"),u="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+c+"</span><span><div class=fileIcon"+d.t+"></div>"+m+"</span></div>"}d.t<3?t+=u:o+=u}if(QH("p13files",t+o),QH("p13currentpath",n),QE("p13FolderUp",0!=p13filetreelocation.length),null!=e){var h=document.getElementsByName("fd");for(a=0;a<h.length;a++)0<=e.indexOf(p13filetree.dir[h[a].value].n)&&(h[a].checked=!0)}p13setActions()}function p13folderset(e){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[e].n).split("\\").join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(e){if(null==e)p13filetreelocation.pop();else for(;p13filetreelocation.length>e;)p13filetreelocation.pop();p13targetpath=p13filetreelocation.join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13sort_filename(e,t){return e.ln>t.ln?1*p13sortorder:e.ln<t.ln?-1*p13sortorder:0}function p13sort_timestamp(e,t){return e.d>t.d?1*p13sortorder:e.d<t.d?-1*p13sortorder:0}function p13sort_bysize(e,t){return e.s==t.s?p13sort_filename(e,t):(e.s-t.s)*p13sortorder}function p13sort_files(e){var t=[],o=Q("p13sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].s&&(e[n].s=0),null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return p13sortorder=1,3<o&&(p13sortorder=-1,o-=3),1==o?t.sort(p13sort_filename):2==o?t.sort(p13sort_bysize):3==o&&t.sort(p13sort_timestamp),t}function p13setActions(){if(null==p13filetree)QE("p13DeleteFileButton",!1),QE("p13NewFolderButton",!1),QE("p13UploadButton",!1),QE("p13RenameFileButton",!1),QE("p13SelectAllButton",!1),Q("p13SelectAllButton").value="すべて",QE("p13RefreshButton",!1),QE("p13CutButton",!1),QE("p13CopyButton",!1),QE("p13PasteButton",!1);else{var e=p13getFileSelCount(),t=p13getFileCount(),o=p13getFileSelCount(!1),n=0<currentNode.agent.id&&currentNode.agent.id<5;QE("p13DeleteFileButton",0<e&&(0<p13filetreelocation.length||0==n)),QE("p13NewFolderButton",0<p13filetreelocation.length||0==n),QE("p13UploadButton",0<p13filetreelocation.length||0==n),QE("p13RenameFileButton",1==e&&(0<p13filetreelocation.length||0==n)),QE("p13SelectAllButton",0<t),Q("p13SelectAllButton").value=0<e?"なし":"すべて",QE("p13RefreshButton",!0),QE("p13CutButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13CopyButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13PasteButton",(0<p13filetreelocation.length||0==n)&&null!=p13clipboard&&0<p13clipboard.length)}}function p13getFileSelCount(e){for(var t=0,o=document.getElementsByName("fd"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function p13getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function p13getFileCount(){return document.getElementsByName("fd").length}function p13selectallfile(){for(var e=0==p13getFileSelCount(),t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked=e;p13setActions()}function p13createfolder(){setDialogMode(2,"新しいフォルダ",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />"),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value}),p13folderup(999)}function p13deletefile(){var e=p13getFileSelCount(),t=0<p13getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p13recdeleteinput>再帰削除</label><br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"削除する",3,p13deletefileEx,1<e?format("選択したアイテム{0}を削除しますか?",e)+t:"選択したアイテムを削除しますか?"+t)}function p13deletefileEx(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:e,rec:Q("p13recdeleteinput").checked}),p13folderup(999)}function p13renamefile(){for(var e,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&(e=p13filetree.dir[t[o].value].n);setDialogMode(2,"リネーム",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:e}),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13renamefileEx(e,t){t.newname=Q("p13renameinput").value,files.sendText(t),p13folderup(999)}function p13fileNameCheck(e){var t=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",t),1==t&&null!=e&&13==e.keyCode&&dialogclose(1)}function p13uploadFile(){setDialogMode(2,"ファイルをアップロードする",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />"),updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}function p13viewfile(){for(var e=document.getElementsByName("fd"),t=0;t<e.length;t++)if(e[t].checked){p13filetree.dir[e[t].value].s<=204800?p13downloadfile(encodeURIComponent(p13filetreelocation.join("/")+"/"+p13filetree.dir[e[t].value].n),encodeURIComponent(p13filetree.dir[e[t].value].n),p13filetree.dir[e[t].value].s,"viewer"):messagebox("ファイルエディター","編集できるのは200k未満のファイルのみです。");break}}var downloadFile,uploadFile,currentMesh,p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(e){var t=document.getElementsByName("fd");p13clipboard=[],p13clipboardCut=e,p13clipboardFolder=p13targetpath;for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p13clipboard.push(p13filetree.dir[t[o].value].n);p13updateClipview()}function p13pasteFile(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format("{0}エントリのコピーをこの場所に確認しますか?",p13clipboard.length):format("この場所への1つのエントリのコピーを確認しますか?"):1<p13clipboard.length?format("{0}エントリのこの場所への移動を確認しますか?",p13clipboard.length):format("1エントリのこの場所への移動を確認しますか?")),setDialogMode(2,"ペースト",3,p13pasteFileEx,e)}function p13pasteFileEx(){files.sendText({action:0==p13clipboardCut?"copy":"move",reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard}),p13folderup(999),1==p13clipboardCut&&(p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview())}function p13updateClipview(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format('コピー用に{0}エントリを保持しています, <a href=# onclick="return p13clearClip()" style=cursor:pointer>クリア</a>.',p13clipboard.length):format('コピー用に1つのエントリを保持, <a href=# onclick="return p13clearClip()" style=cursor:pointer>クリア</a>.'):1<p13clipboard.length?format('移動のために{0}エントリを保持しています, <a href=# onclick="return p13clearClip()" style=cursor:pointer>クリア</a>.',p13clipboard.length):format('移動のために1つのエントリを保持, <a href=# onclick="return p13clearClip()" style=cursor:pointer>クリア</a>.')),QH("p13bottomstatus",e),p13setActions()}function p13clearClip(){return p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview(),!1}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileCount(){return document.getElementsByName("fc").length}function p13downloadfile(e,t,o){xxdialogMode||downloadFile||!files||(downloadFile={path:decodeURIComponent(e),file:decodeURIComponent(t),size:o,tsize:0,data:"",state:0,id:Math.random()},files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path}),setDialogMode(2,"ダウンロードファイル",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+o+" />"))}function p13downloadFileCancel(){setDialogMode(0),files.sendText({action:"download",sub:"cancel",id:downloadFile.id}),downloadFile=null}function p13gotDownloadCommand(e){null!=downloadFile&&e.id==downloadFile.id&&("start"==e.sub?(downloadFile.state=1,files.sendText({action:"download",sub:"startack",id:downloadFile.id})):"cancel"==e.sub&&(downloadFile=null,setDialogMode(0)))}function p13gotDownloadBinaryData(e){downloadFile&&0!=downloadFile.state&&(4<e.length&&(downloadFile.tsize+=e.length-4,downloadFile.data+=e.substring(4),Q("d2progressBar").value=downloadFile.tsize),0!=(1&ReadInt(e,0))?(saveAs(data2blob(downloadFile.data),downloadFile.file),downloadFile=null,setDialogMode(0)):files.sendText({action:"download",sub:"ack",id:downloadFile.id}))}function p13doUploadFiles(e){xxdialogMode||((uploadFile={}).xpath=p13filetreelocation.join("/"),uploadFile.xfiles=e,uploadFile.xfilePtr=-1,setDialogMode(2,"ファイルをアップロードする",10,p13uploadFileCancel,"<div id=p13dfileName>接続しています...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />"),p13uploadReconnect())}function onFileUploadStateChange(e,t){switch(t){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",t)}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie,authRelayCookie,domainUrl),uploadFile.ws.attemptWebRTC=!1,uploadFile.ws.ctrlMsgAllowed=!1,uploadFile.ws.onStateChanged=onFileUploadStateChange,uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){if(uploadFile.xfilePtr++,uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var e=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",e.name),Q("d2progressBar").max=e.size,Q("d2progressBar").value=0,uploadFile.xreader=new FileReader,uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result,uploadFile.ws.sendText({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:e.name,size:uploadFile.xdata.byteLength})},uploadFile.xreader.readAsArrayBuffer(e)}else p13uploadFileCancel()}function p13uploadFileCancel(e,t){null!=uploadFile&&(null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile=null),setDialogMode(0)}function p13gotUploadData(e){var t=JSON.parse(e);if(null!=uploadFile&&parseInt(uploadFile.xfilePtr)==parseInt(t.reqid))if("uploadstart"==t.action){p13uploadNextPart(!1);for(var o=0;o<8;o++)p13uploadNextPart(!0)}else"uploadack"==t.action?p13uploadNextPart(!1):"uploaderror"==t.action&&p13uploadFileCancel()}function p13uploadNextPart(e){var t=uploadFile.xdata,o=uploadFile.xptr,n=uploadFile.xptr+4096;if(n>t.byteLength){if(1==e)return;n=t.byteLength}if(o==t.byteLength)null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile.xfiles.length>uploadFile.xfilePtr+1?p13uploadReconnect():p13uploadFileCancel();else{var i=t.slice(o,n);uploadFile.ws.send(i),uploadFile.xptr=n,Q("d2progressBar").value=n}}function p20updateMesh(){if(null!=currentMesh){QH("p20meshName",EscapeHtml(currentMesh.name));var e=format("不明な#{0}",currentMesh.mtype),t=currentMesh.links[userinfo._id].rights;1==currentMesh.mtype&&(e="Intel&reg; AMTのみ、エージェントなし"),2==currentMesh.mtype&&(e="ソフトウェアエージェントを使用して管理");var o="";o+=addHtmlValue("名",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",0!=(1&t))),o+=addHtmlValue("説明",addLinkConditional(currentMesh.desc&&""!=currentMesh.desc?EscapeHtml(currentMesh.desc):"<i>なし</i>","p20editmesh(2)",0!=(1&t))),o+=addHtmlValue("タイプ",e),o+="<br style=clear:both><br>";var n=currentMesh.links[userinfo._id];n&&0!=(2&n.rights)&&(o+="<div style=margin-bottom:6px><a onclick=p20showAddMeshUserDialog() style=cursor:pointer><img src=images/icon-addnew.png border=0 height=12 width=12> ユーザーを追加する</a></div>"),o+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>ユーザー認証</th></tr>';var i=1,a=[];for(var s in currentMesh.links)a.push({id:s,name:s.split("/")[2],rights:currentMesh.links[s].rights});for(var s in a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),a){var l="",r="部分的権利",d=a[s].rights;4294967295==d?r="完全な管理者":0==d&&(r="権利なし"),s==userinfo._id||4294967295!=t&&0==(2&t)||(l='<a onclick=p20deleteUser(event,"'+encodeURIComponent(a[s].id)+'") style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'),o+='<tr onclick=p20viewuser("'+encodeURIComponent(a[s].id)+'") style=height:32px;cursor:pointer'+(i%2==0?";background-color:#DDD":"")+"><td>",o+="<div style=float:right>"+l+"</div><div style=float:right;padding-right:4px>"+r+"</div><div class=m2></div><div>&nbsp;"+EscapeHtml(decodeURIComponent(a[s].name))+"<div></div></div>",o+="</td></tr>",++i}o+="</tbody></table>",4294967295==t&&(o+="<div style=font-size:small;text-align:right;margin-top:6px><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>グループを削除</a></span></div>"),QH("p20info",o)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("グループ{0}を削除してもよろしいですか?デバイスグループを削除すると、このグループ内のデバイスに関するすべての情報も削除されます。",EscapeHtml(currentMesh.name))+"<br /><br />";return setDialogMode(2,"グループを削除",3,p20showDeleteMeshDialogEx,e+="<label><input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />確認する</label>"),p20validateDeleteMeshDialog(),!1}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(e,t){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(e){if(!xxdialogMode){var t=addHtmlValue("名","<input id=dp20meshname style=width:170px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");setDialogMode(2,"デバイスグループの編集",3,p20editmeshEx,t+=addHtmlValue("説明","<input id=dp20meshdesc style=width:170px maxlength=1024 onkeyup=p20editmeshValidate() />")),Q("dp20meshname").value=currentMesh.name,currentMesh.desc&&(Q("dp20meshdesc").value=currentMesh.desc),p20editmeshValidate(),2==e?Q("dp20meshdesc").focus():Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",0<Q("dp20meshname").value.length)}function p20showAddMeshUserDialog(){if(!xxdialogMode){var e=addHtmlValue("User","<input id=dp20username style=width:170px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");e+='<div style="border:2px groove gray;background-color:white;max-height:120px;overflow-y:scroll">',e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>完全な管理者</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>デバイスグループの編集</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>デバイスグループユーザーの管理</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>デバイスグループコンピューターの管理</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>リモコン</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>リモートビューのみ</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotelimitedinput style=margin-left:12px>限定入力のみ</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>ターミナルアクセスなし</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>ファイルアクセスなし</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>Intel&reg;なしAMT</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>メッシュエージェントコンソール</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>サーバーファイル</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>ウェイクデバイス</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>デバイスノートの編集</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20limitevents>自分のイベントのみを表示</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20chatnotify>チャットと通知</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20uninstall>エージェントのアンインストール</label><br>",setDialogMode(2,"メッシュにユーザーを追加",3,p20showAddMeshUserDialogEx,e+="</div>"),p20validateAddMeshUserDialog(),Q("dp20username").focus()}}function p20validateAddMeshUserDialog(){var e=currentMesh.links[userinfo._id].rights,t=!Q("p20fulladmin").checked;QE("p20fulladmin",4294967295==e),QE("p20editmesh",t&&4294967295==e),QE("p20manageusers",t),QE("p20managecomputers",t),QE("p20remotecontrol",t),QE("p20meshagentconsole",t),QE("p20meshserverfiles",t),QE("p20wakedevices",t),QE("p20editnotes",t),QE("p20limitevents",t),QE("p20remoteview",t&&Q("p20remotecontrol").checked),QE("p20remotelimitedinput",t&&Q("p20remotecontrol").checked&&!Q("p20remoteview").checked),QE("p20noterminal",t&&Q("p20remotecontrol").checked),QE("p20nofiles",t&&Q("p20remotecontrol").checked),QE("p20noamt",t&&Q("p20remotecontrol").checked),QE("p20chatnotify",t),QE("p20uninstall",t)}function p20showAddMeshUserDialogEx(){var e=0;1==Q("p20fulladmin").checked?e=4294967295:(1==Q("p20editmesh").checked&&(e+=1),1==Q("p20manageusers").checked&&(e+=2),1==Q("p20managecomputers").checked&&(e+=4),1==Q("p20remotecontrol").checked&&(e+=8),1==Q("p20meshagentconsole").checked&&(e+=16),1==Q("p20meshserverfiles").checked&&(e+=32),1==Q("p20wakedevices").checked&&(e+=64),1==Q("p20editnotes").checked&&(e+=128),1==Q("p20remoteview").checked&&(e+=256),1==Q("p20noterminal").checked&&(e+=512),1==Q("p20nofiles").checked&&(e+=1024),1==Q("p20noamt").checked&&(e+=2048),1==Q("p20remotelimitedinput").checked&&(e+=4096),1==Q("p20limitevents").checked&&(e+=8192),1==Q("p20chatnotify").checked&&(e+=16384),1==Q("p20uninstall").checked&&(e+=32768));var t=Q("dp20username").value.split(","),o=[];for(var n in t)o.push(t[n].trim());meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,usernames:o,meshadmin:e})}function p20viewuser(e){if(!xxdialogMode){e=decodeURIComponent(e);var t=[],o=currentMesh.links[userinfo._id].rights,n=currentMesh.links[e].rights;4294967295==n?t.push("完全な管理者"):(0!=(1&n)&&t.push("デバイスグループの編集"),0!=(2&n)&&t.push("デバイスグループユーザーの管理"),0!=(4&n)&&t.push("デバイスグループコンピューターの管理"),0!=(8&n)&&t.push("リモコン"),0!=(16&n)&&t.push("エージェントコンソール"),0!=(32&n)&&t.push("サーバーファイル"),0!=(64&n)&&t.push("ウェイクデバイス"),0!=(128&n)&&t.push("メモを編集"),0!=(256&n)&&t.push("リモートビューのみ"),0!=(512&n)&&t.push("ターミナルなし"),0!=(1024&n)&&t.push("ファイルなし"),0!=(2048&n)&&t.push("Intel&reg;なしAMT"),0!=(8&n)&&0!=(4096&n)&&0==(256&n)&&t.push("制限された入力"),0!=(8192&n)&&t.push("自己イベントのみ"),0!=(16384&n)&&t.push("チャットと通知"),0!=(32768&n)&&t.push("アンインストール")),0==t.length&&t.push("権利なし");var i=1,a=addHtmlValue("ユーザー",EscapeHtml(decodeURIComponent(e.split("/")[2])));a+=addHtmlValue("許可",t.join("、")),userinfo._id!=e&&(4294967295==o||0!=(2&o)&&4294967295!=n)&&(i+=4),setDialogMode(2,"デバイスグループユーザー",i,p20viewuserEx,a,e)}}function p20viewuserEx(e,t){2==e&&setDialogMode(2,"リモートメッシュユーザー",3,p20viewuserEx2,format("ユーザー{0}の削除を確認しますか?",t.split("/")[2]),t)}function p20deleteUser(e,t){haltEvent(e),p20viewuserEx(2,decodeURIComponent(t))}function p20viewuserEx2(e,t){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:t})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xxcurrentView=-1;function go(e){if(setSessionActivity(),!xxdialogMode&&xxcurrentView!=e){updateFooterMenu(),setDialogMode(0);for(var t=0;t<32;t++)QV("p"+t,t==e);xxcurrentView=e}}function setDialogMode(e,t,o,n,i,a){setSessionActivity(),xxdialogMode=e,xxdialogFunc=n,xxdialogButtons=o,xxdialogTag=a,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&o),QV("idx_dlgCancelButton",2&o),QV("id_dialogclose",2&o||8&o),QV("idx_dlgButtonBar",7&o),t&&QH("id_dialogtitle",t);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){setSessionActivity();var t=xxdialogFunc,o=xxdialogButtons,n=xxdialogTag;setDialogMode(),(8&o||e)&&t&&t(e,n)}function putstore(e,t){try{if("undefined"==typeof localStorage||localStorage.getItem(e)==t)return;null==t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}if("_"!=e[0]){for(var o={},n=0,i=localStorage.length;n<i;++n){var a=localStorage.key(n);"_"!=a[0]&&(o[a]=localStorage.getItem(a))}meshserver.send({action:"userWebState",state:JSON.stringify(o)})}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}function center(){QS("dialog").left=(getDocWidth()-300)/2+"px",deskAdjust(),deskAdjust()}function messagebox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function reload(){window.location.href=window.location.href}function getNodeFromId(e){for(var t in nodes)if(nodes[t]._id==e)return nodes[t];return null}function addHtmlValue(e,t){return"<table><td style=width:120px>"+e+"<td><b>"+t+"</b></table>"}function addHtmlValue2(e,t){return"<div><div style=display:inline-block;float:right>"+t+"</div><div style=display:inline-block>"+e+"</div></div>"}function addLink(e,t){return"<a style=cursor:pointer;color:darkblue;text-decoration:none onclick='"+t+"'>&diams; "+e+"</a>"}function addLinkConditional(e,t,o){return o?addLink(e,t):e}function passwordcheck(e){return/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/.test(e)}function getFileSizeStr(e){return 1==e?"1バイト":format("{0} bytes",e)}function joinPaths(){var e=[];for(var t in arguments){var o=arguments[t];if(null!=o&&""!=o){for(;o.endsWith("/")||o.endsWith("\\");)o=o.substring(0,o.length-1);for(;o.startsWith("/")||o.startsWith("\\");)o=o.substring(1);e.push(o)}}return e.join("/")}function focusTextBox(e){setTimeout(function(){Q(e).selectionStart=Q(e).selectionEnd=65535,Q(e).focus()},0)}isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function parseUriArgs(){var e,t={},o=window.document.location.href.split(/[\?&|\=]/);for(n in o.splice(0,1),o)switch(n%2){case 0:e=decodeURIComponent(o[n]);break;case 1:t[e]=decodeURIComponent(o[n]);var n=parseInt(t[e]);n==t[e]&&(t[e]=n)}return t}function printDate(e){return e.toLocaleDateString(args.locale)}function printTime(e){return e.toLocaleTimeString(args.locale)}function printDateTime(e){return e.toLocaleString(args.locale)}function format(e){var o=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==o[t]?o[t]:e})}function nobreak(e){return e.split(" ").join("&nbsp;")}</script>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script keeplink=1 src=scripts/filesaver.js></script><title>{{{title}}}</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}.i1{background:url(../images/icons50.png) 0 0;height:50px;width:50px;border:none}.i2{background:url(../images/icons50.png) -50px 0;height:50px;width:50px;border:none}.i3{background:url(../images/icons50.png) -100px 0;height:50px;width:50px;border:none}.i4{background:url(../images/icons50.png) -150px 0;height:50px;width:50px;border:none}.i5{background:url(../images/icons50.png) -200px 0;height:50px;width:50px;border:none}.i6{background:url(../images/icons50.png) -250px 0;height:50px;width:50px;border:none}.m0{background:url(../images/images16.png) -32px 0;height:16px;width:16px;border:none;float:left}.m1{background:url(../images/images16.png) -16px 0;height:16px;width:16px;border:none;float:left}.m2{background:url(../images/images16.png) -96px 0;height:16px;width:16px;border:none;float:left}.m3{background:url(../images/images16.png) -112px 0;height:16px;width:16px;border:none;float:left}.gray{filter:gray;-webkit-filter:grayscale(100%) opacity(60%)}.DevSt{padding-left:5px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#ddd}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:#fff;clear:both}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style="width:calc(100% - 50px);overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><img id=topMenuIcon class=noselect style=position:absolute;right:0;top:10px;bottom:50px;color:#c8c8c8;font-size:44px;margin-right:8px;cursor:pointer;display:none onclick=topMenu() src=/images/3bars-30.png width=30 height=30></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%><div id=column_l style=width:100%;padding:0;position:absolute;bottom:0;top:0><div id=p0 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p0message style=text-align:center;width:100%><span id=p0span>サーバーが切断されました</span>、<href onclick=reload() style=cursor:pointer><u>クリックして再接続</u></href>。</div></div></div><div id=p1 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p1message style=text-align:center;width:100%></div></div></div><div id=p2 style=display:none><div id=xdevices></div></div><div id=p3 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large><span id=p3userName></span></strong><br></div></table><div id=p3info style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div style=margin-left:8px><div id=p3AccountActions><p><strong>アカウントのセキュリティ</strong><div style=margin-left:9px;margin-bottom:8px><div id=manageAuthApp style=margin-top:5px;display:none><a onclick=account_manageAuthApp() style=cursor:pointer>認証アプリを管理する</a></div><div id=manageOtp style=margin-top:5px;display:none><a onclick=account_manageOtp(0) style=cursor:pointer>バックアップコードを管理する</a></div></div><p><strong>アカウントアクション</strong><div style=margin-left:9px;margin-bottom:8px><div style=margin-top:5px><span id=verifyEmailId style=display:none><a onclick=account_showVerifyEmail() style=cursor:pointer>Eメールを確認します</a></span></div><div style=margin-top:5px><span id=changeEmailId style=display:none><a onclick=account_showChangeEmail() style=cursor:pointer>メールアドレスを変更する</a></span></div><div style=margin-top:5px><a onclick=account_showChangePassword() style=cursor:pointer>パスワードを変更する</a><span id=p2nextPasswordUpdateTime></span></div><div style=margin-top:5px><a onclick=account_showDeleteAccount() style=cursor:pointer>アカウントを削除する</a></div></div><br style=clear:both></div><strong>デバイスグループ</strong> <span id=p3createMeshLink1>( <a onclick=account_createMesh() style=cursor:pointer><img src=images/icon-addnew.png width=12 height=12 border=0> 新しい</a> )</span><br><br><div id=p3meshes></div><div id=p3noMeshFound style=margin-left:9px;display:none>デバイスグループはありません。<span id=p3createMeshLink2> <a onclick=account_createMesh() style=cursor:pointer><strong>ここから始めましょう!</strong></a></span></div><br style=clear:both></div></div></div><div id=p5 style=display:none><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large>私のファイル</strong><br></div></table><div id=p5myfiles style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><table id=p5toolbar style=width:100%;height:78px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5FolderUp disabled onclick=p5folderup() value=アップ> <input type=button style="width:calc(100%/5 - 5px)"id=p5SelectAllButton disabled onclick=p5selectallfile() value=すべて選択 onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RenameFileButton disabled value=リネーム onclick=p5renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5DeleteFileButton disabled value=削除する onclick=p5deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5NewFolderButton disabled value=フォルダ onclick=p5createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5UploadButton disabled value=アップロードする onclick=p5uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CutButton disabled value=カット onclick=p5copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CopyButton disabled value=コピー onclick=p5copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5PasteButton disabled value=ペースト onclick=p5pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RefreshButton value=リフレッシュ onclick=p5refreshFiles() onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p5currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>名前順<option value=2>サイズで並べ替え<option value=3>日付けで並び替え<option value=4>名前で降順<option value=5>サイズで降順<option value=6>日付で降順</select></table></table><div id=p5filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p5files></span></div><table id=p5toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0;background-color:#d3d9d6 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px>&nbsp;<span id=p5bottomstatus></span><td id=p5rightOfButtons style=text-align:right;padding:3px></table></div></div><div id=p10 style=display:none;position:absolute;bottom:0;top:0;width:100%;overflow:hidden><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0;position:absolute;top:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><a id=MainComputerImage style=cursor:pointer onclick=p10showiconselector()></a><td><div style=margin-left:5px><strong><span id=p10deviceName></span></strong><br><span id=MainComputerState></span></div></table><div id=p10general style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div id=p10html style=margin-left:8px;margin-right:8px></div><div id=p10html2></div><div id=p10html3></div></div><div id=p10desktop style=overflow:hidden;position:absolute;top:55px;bottom:0;width:100%;display:none><div id=deskarea1 style=position:absolute;top:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><span id=p14power></span>&nbsp; <input id=DeskSoftInput style=width:25px;display:none;opacity:.2 onblur=toggleSoftKeys(0) onkeypress="return ondeskkeypress(event)"onkeydown="return ondeskkeydown(event)"onkeyup="return ondeskkeyup(event)"></div><div style=margin-left:3px><input type=button id=connectbutton1 value=つなぐ onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=connectbutton1h value="HW Connect"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=disconnectbutton1 value=切断する onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1> <span id=deskstatus>切断されました</span></div></div></div><div id=deskarea3 style="position:absolute;top:25px;width:100%;height:calc(100% - 50px)"><div id=deskarea3x style=background:#000;text-align:center;height:100%;position:relative><div id=DeskParent style=height:100%><canvas id=Desk width=640 height=200 style=width:100%;-ms-touch-action:none;margin-left:0 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid #d3d3d3;display:none"><a id=DeskToolsRefreshButton style=float:right;padding:3px;cursor:pointer onclick=refreshDeskTools()>リフレッシュ</a><div id=DeskToolsBar style="position:absolute;padding:3px;border-radius:3px 3px 0 0;top:5px;left:4px;bottom:26px;background-color:#d3d3d3;cursor:pointer">プロセス</div><div style=position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:#d3d3d3;text-align:left><div style="border-bottom:1px solid #a9a9a9;padding:3px"><a style=width:50px;padding-right:5px;float:left;cursor:pointer onclick=sortProcess(0)>PID</a><a style=cursor:pointer onclick=sortProcess(1)>名</a></div><div id=DeskToolsProcesses style=overflow-y:scroll;position:absolute;top:24px;bottom:0;width:100%></div></div></div></div></div><div id=deskarea4 style=position:absolute;bottom:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><select id=termdisplays style=display:none onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>&nbsp; <span id=DeskToastButton><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span>&nbsp;</div><div><input id=deskActionsBtn type=button style=margin-left:3px onkeypress=return!1 onkeydown=return!1 value=行動 onclick=deviceActionFunction()> <input type=button value=設定 onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings()> <input type=button onkeypress=return!1 onkeydown=return!1 value=電源アクション... onclick=showPowerActionDlg() style=display:none> <input id=DeskSpecialKeys type=button value=特別なキー onkeypress=return!1 onkeydown=return!1 onclick=sendSpecialKeys()> <input id=DeskSoftKeys type=button value=キーボード onkeypress=return!1 onkeydown=return!1 onclick=toggleSoftKeys(1)> <label><span id=DeskControlSpan style=display:none><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1>入力</span></label></div></div></div></div><div id=p10files style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%;display:none><table id=p13toolbar style=width:100%;height:111px cellpadding=0 cellspacing=0><tr><td style="background-color:silver;border-bottom:2px solid #000;padding:2px"><div style=float:right;text-align:right><input id=filesActionsBtn type=button onkeypress=return!1 onkeydown=return!1 value=行動 onclick=deviceActionFunction() style=margin-right:2px></div><div style=margin-left:2px><input id=p13AutoConnect value=自動接続 onclick=autoConnectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button style=display:none> <input id=p13Connect value=つなぐ onclick=connectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button> <span id=p13Status>切断されました</span></div><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13FolderUp disabled onclick=p13folderup() value=アップ> <input type=button style="width:calc(100%/5 - 5px)"id=p13SelectAllButton disabled onclick=p13selectallfile() value=すべて選択 onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RenameFileButton disabled value=リネーム onclick=p13renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13DeleteFileButton disabled value=削除する onclick=p13deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13NewFolderButton disabled value=フォルダ onclick=p13createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13UploadButton disabled value=アップロードする onclick=p13uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CutButton disabled value=カット onclick=p13copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CopyButton disabled value=コピー onclick=p13copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13PasteButton disabled value=ペースト onclick=p13pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RefreshButton disabled value=リフレッシュ onclick=p13folderup(9999) onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p13currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>名前順<option value=2>サイズで並べ替え<option value=3>日付けで並び替え<option value=4>名前で降順<option value=5>サイズで降順<option value=6>日付で降順</select></table></table><div id=p13filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p13files></span></div><table id=p13toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#d3d9d6>&nbsp;<span id=p13bottomstatus></span></table></div></div><div id=p20 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td onclick=p20editmesh(1)><img src=/images/meshicon50.png width=50 height=50><td onclick=p20editmesh(1)><div style=margin-left:5px><strong style=font-size:large><span id=p20meshName></span></strong><br></div></table><div id=p20info style=margin-left:8px;margin-right:8px></div></div></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table id=footerMenu cellpadding=0 cellspacing=0 style=height:32px;width:100%;color:#fff;cursor:pointer;table-layout:fixed></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:90px;width:300px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>バツ</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div><div id=dialog3 style=margin:auto;margin:3px><select id=deskkeys style=width:100%><option value=10>Ctrl + Alt + Del<option value=11>タブ<option value=5>勝つ<option value=0>Win + Down<option value=1>Win + Up<option value=2>Win + L<option value=3>Win + M<option value=4>Shift + Win + M<option value=6>Win + R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab</select></div><div id=dialog7 style=margin:auto;margin:3px><div id=d7meshkvm><h4 style="width:100%;border-bottom:1px solid gray">エージェントリモートデスクトップ</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir=rtl></select><div style=height:20px>品質</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>スケーリング</div></div><div style="margin:3px 0 3px 0"><select id=d7framelimiter style=float:right;width:200px;height:20px dir=rtl><option selected value=50>速い<option value=100>中<option value=400>スロー<option value=1000>非常に遅い</select><div style=height:20px>レート</div></div></div><div id=d7amtkvm><h4 style="width:100%;border-bottom:1px solid gray">インテル®AMTハードウェアKVM</h4><div style=height:26px><select id=d7desktopmode style=float:right;width:200px><option value=1>RLE8、最速<option value=2>RLE16、推奨<option value=3>RAW8、遅い<option value=4>RAW16、非常に遅い</select><div>エンコーディング</div></div><div style=height:60px><div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:#fff"><label><input type=checkbox id=d7showfocus>フォーカスツールを表示</label><br><label><input type=checkbox id=d7showcursor>ローカルマウスカーソルを表示</label><br></div><div>その他</div></div></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=キャンセル style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK style=float:right;width:80px onclick=dialogclose(1)></div></div><div id=topMenu style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:0 0 5px 5px;position:fixed;top:50px;right:5px;width:170px;display:none"><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(2)>私のファイル</div><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(1)>マイアカウント</div><div id=logoutMenuOption><a href=/logout><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer">ログアウト</div></a></div></div><iframe name=fileUploadFrame style=display:none></iframe><script>"use strict";var webState="{{{webstate}}}";for(var i in""!=webState&&(webState=JSON.parse(decodeURIComponent(webState))),webState)localStorage.setItem(i,webState[i]);webState.loctag||localStorage.removeItem("loctag");var files,args=parseUriArgs(),debugLevel=parseInt("{{{debuglevel}}}"),features=parseInt("{{{features}}}"),sessionTime=parseInt("{{{sessiontime}}}"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",authCookie="{{{authCookie}}}",authRelayCookie="{{{authRelayCookie}}}",authCookieRenewTimer=null,meshserver=null,xdr=null,serverinfo=null,nodes=[],meshes={},filetree={},userinfo=null,users=(serverinfo=null,null),nodeShortIdent=0,serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}",debugmode=!1,attemptWebRTC=0!=(128&features),StatusStrs=["切断されました","接続しています...","セットアップ...","接続済み","Intel&reg;接続されたAMT"],passRequirements="{{{passRequirements}}}";""!=passRequirements&&(passRequirements=JSON.parse(decodeURIComponent(passRequirements)));var sessionActivity=Date.now();function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(!args.locale){var t=getstore("loctag",0);null!=t&&"*"!=t&&(args.locale=t)}(window.onresize=center)(),QV("changeEmailId",0==(2097152&features)),QH("p1message","接続しています..."),go(1),(meshserver=MeshServerCreateControl(domainUrl,authCookie)).onStateChanged=onStateChanged,meshserver.onMessage=onMessage,meshserver.Start();var o=localStorage.getItem("desktopsettings");null!=o&&(desktopsettings=JSON.parse(o)),applyDesktopSettings()}function onStateChanged(e,t,o,n){if(0==t){if(setDialogMode(0),go(0),"noauth"==n)return void QH("p0span","認証を実行できません");2==o?setTimeout(serverPoll,5e3):QH("p0span","Webソケットに接続できません"),null!=authCookieRenewTimer&&(clearInterval(authCookieRenewTimer),authCookieRenewTimer=null)}else 2==t&&(meshserver.send({action:"meshes"}),meshserver.send({action:"nodes"}),meshserver.send({action:"files"}),xxcurrentView<2&&go(2),authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},18e5));QV("topMenuIcon",2==t)}function serverPoll(){xdr=null;try{xdr=new XDomainRequest}catch(e){}(xdr=xdr||new XMLHttpRequest).open("HEAD",window.location.href),xdr.timeout=15e3,xdr.onload=function(){reload()},xdr.onerror=xdr.ontimeout=function(){setTimeout(serverPoll,1e4)},xdr.send()}function updateSelf(){if(QV("verifyEmailId",!0!==userinfo.emailVerified&&null!=userinfo.email&&1==serverinfo.emailcheck),QV("manageAuthApp",4096&features),QV("manageOtp",0!=(4096&features)&&(1==userinfo.otpsecret||0<userinfo.otphkeys)),QV("p3createMeshLink1",!1),QV("p3createMeshLink2",!1),"number"==typeof userinfo.passchange)if(-1==userinfo.passchange)QH("p2nextPasswordUpdateTime"," -次回ログイン時にリセット。");else if(null!=passRequirements&&"number"==typeof passRequirements.reset){var e=userinfo.passchange+86400*passRequirements.reset-Math.floor(Date.now()/1e3);e<0?QH("p2nextPasswordUpdateTime"," -次回ログイン時にリセット。"):e<3600?QH("p2nextPasswordUpdateTime",format(" -{0}分でリセット{1}。",Math.floor(e/60),addLetterS(Math.floor(e/60)))):e<86400?QH("p2nextPasswordUpdateTime",format(" -{0}時間でリセット{1}。",Math.floor(e/3600),addLetterS(Math.floor(e/3600)))):QH("p2nextPasswordUpdateTime",format(" -{0}日でリセット{1}。"),Math.floor(e/86400),addLetterS(Math.floor(e/86400)))}}function addLetterS(e){return 1<e?"s":""}function setSessionActivity(){sessionActivity=Date.now()}function checkIdleSessionTimeout(){Date.now()-sessionActivity>serverinfo.timeout&&(window.location.href="logout")}function onMessage(e,t){switch(t.action){case"serverinfo":(serverinfo=t.serverinfo).timeout&&(setInterval(checkIdleSessionTimeout,1e4),checkIdleSessionTimeout()),QV("p3AccountActions",0==(4&features)&&0==serverinfo.domainauth),QV("logoutMenuOption",0==(4&features)&&0==serverinfo.domainauth);break;case"authcookie":authCookie=t.cookie,authRelayCookie=t.rcookie;break;case"userinfo":userinfo=t.userinfo,QH("p3userName",userinfo.name),updateSelf();break;case"users":for(var o in users={},t.users)users[t.users[o]._id]=t.users[o];updateUsers();break;case"wssessioncount":wssessions=t.wssessions,updateUsers();break;case"meshes":for(var o in meshes={},t.meshes)meshes[t.meshes[o]._id]=t.meshes[o];updateMeshes(),updateDevices();break;case"files":filetree=setupBackPointers(t.filetree),updateFiles();break;case"nodes":for(var o in nodes=[],t.nodes)for(var n in t.nodes[o])meshes[o]?(t.nodes[o][n].namel=t.nodes[o][n].name.toLowerCase(),t.nodes[o][n].rname?t.nodes[o][n].rnamel=t.nodes[o][n].rname.toLowerCase():t.nodes[o][n].rnamel=t.nodes[o][n].namel,t.nodes[o][n].meshnamel=meshes[o].name.toLowerCase(),t.nodes[o][n].meshid=o,t.nodes[o][n].state=t.nodes[o][n].state?t.nodes[o][n].state:0,t.nodes[o][n].desc=t.nodes[o][n].desc,t.nodes[o][n].icon||(t.nodes[o][n].icon=1),t.nodes[o][n].ident=++nodeShortIdent,nodes.push(t.nodes[o][n])):console.log("Invalid mesh (1): "+o);updateDevices(),0==xxcurrentView&&go(parseInt("{{viewmode}}")),gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"));break;case"powertimeline":if(t.nodeid!=powerTimelineReq)break;powerTimelineNode=t.nodeid,powerTimeline=t.timeline,powerTimelineUpdate=Date.now()+3e5,currentNode._id==t.nodeid&&drawDeviceTimeline();break;case"otpauth-request":if(2==xxdialogMode&&"otpauth-request"==xxdialogTag){var i=t.secret;52==i.length?i=i.split(/(.............)/).filter(Boolean).join(" "):32==i.length&&(i=(i=i.split(/(....)/).filter(Boolean).join(" ")).substring(0,20)+"<br/>"+i.substring(20)),QH("d2optinfo",'インストール<a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank> Google Authenticator </a>または互換性のあるアプリケーションの場合、<a href="\' + message.url +\'" rel="noreferrer noopener" target=_blank>このリンク</a>を使用するか、下に秘密を入力します。次に、現在の6桁のトークンを入力して、2段階ログインを有効にします。<br /><br /><div style=width:100%;text-align:center><tt id=d2optsecret secret="'+t.secret+'" style=font-size:15px>'+i+'</tt><br /><br />Token: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></div>'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"認証アプリ",1,null,t.success?"<b style = color:green> 2段階ログインの有効化に成功</ b>。再度ログインするには、有効なトークンが必要になります。":"<b style = color:red> 2段階ログインの有効化に失敗しました</ b>。アプリケーションから秘密をクリアして、再試行してください。適切なコードを入力するのに数分しかかかりません。");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"認証アプリ",1,null,t.success?"<b style = color:green> 2段階のログインアクティベーションが削除されました</ b>。この機能はいつでも再アクティブ化できます。":"<b style = color:red> 2段階のログインアクティベーションの削除に失敗しました</ b>。再試行する。");break;case"otpauth-getpasswords":if(xxdialogMode)return;var a="ワンタイムトークンは、セカンダリ認証として使用できます。セットを生成して印刷し、安全な場所に保管してください。";if(a+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(a+="<tr>");for(var r=""+t.passwords[l].p;r.length<8;)r="0"+r;!0===t.passwords[l].u?a+="<td>"+r.substring(0,4)+"&nbsp;"+r.substring(4):a+="<td><strike style=color:#BBB>"+r.substring(0,4)+"&nbsp;"+r.substring(4)}}else a+="<tr><td>アクティブなトークンがありません";a+="</table></div></div><br />",a+="<div><input type=button value='閉じる' onclick=setDialogMode(0) style=float:right></input>",a+="<input type=button value='新しいトークン' onclick='account_manageOtp(1);'></input>",null!=t.passwords&&(a+="<input type=button value='クリア' onclick='account_manageOtp(2);'></input>"),setDialogMode(2,"バックアップコードの管理",8,null,a+="</div><br />","otpauth-manage");break;case"event":if(t.event.noact)break;switch(t.event.action){case"userWebState":if(null!=localStorage){var d=JSON.parse(t.event.state);for(var l in d)localStorage.setItem(l,d[l]);null!=d.loctag&&d.loctag!=oldLoctag&&(null!=d.loctag?args.locale=d.loctag:delete args.locale,updateDevices(),updateMeshes())}break;case"accountchange":if(userinfo.name==t.event.account.name){var p=t.event.account.siteadmin?t.event.account.siteadmin:0,c=userinfo.siteadmin?userinfo.siteadmin:0;(t.event.account.quota!=userinfo.quota||0==(8&userinfo.siteadmin)&&0!=(8&t.event.account.siteadmin))&&meshserver.send({action:"files"}),userinfo=t.event.account,c!=p&&updateSiteAdmin(),updateSelf()}break;case"createmesh":null!=t.event.links[userinfo._id]&&(meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},updateMeshes(),updateDevices(),meshserver.send({action:"files"}));break;case"meshchange":if(null==meshes[t.event.meshid])meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},meshserver.send({action:"nodes"});else{if(meshes[t.event.meshid].name!=t.event.name)for(var l in meshes[t.event.meshid].name=t.event.name,nodes)nodes[l].meshid==t.event.meshid&&(nodes[l].meshnamel=t.event.name.toLowerCase());if(meshes[t.event.meshid].desc=t.event.desc,meshes[t.event.meshid].links=t.event.links,null==meshes[t.event.meshid].links[userinfo._id]){20==xxcurrentView&&currentMesh==meshes[t.event.meshid]&&go(2),delete meshes[t.event.meshid];var u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2))}}updateMeshes(),updateDevices(),meshserver.send({action:"files"}),20==xxcurrentView&&currentMesh._id==t.event.meshid&&p20updateMesh();break;case"deletemesh":meshes[t.event.meshid]&&(delete meshes[t.event.meshid],updateMeshes(),meshserver.send({action:"files"}));u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,updateDevices(),20<=xxcurrentView&&xxcurrentView<30&&currentMesh._id==t.event.meshid&&(setDialogMode(0),go(2)),10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2));break;case"addnode":var m=t.event.node;if(!meshes[m.meshid])break;if(null!=getNodeFromId(m._id))break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices();break;case"removenode":var h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1),updateDevices()}break;case"changenode":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).name=t.event.node.name,m.rname=t.event.node.rname,m.host=t.event.node.host,m.desc=t.event.node.desc,m.publicip=t.event.node.publicip,m.iploc=t.event.node.iploc,m.wifiloc=t.event.node.wifiloc,m.gpsloc=t.event.node.gpsloc,m.tags=t.event.node.tags,m.userloc=t.event.node.userloc,null!=t.event.node.agent&&(null==m.agent&&(m.agent={}),null!=t.event.node.agent.ver&&(m.agent.ver=t.event.node.agent.ver),null!=t.event.node.agent.id&&(m.agent.id=t.event.node.agent.id),null!=t.event.node.agent.caps&&(m.agent.caps=t.event.node.agent.caps),null!=t.event.node.agent.core?m.agent.core=t.event.node.agent.core:m.agent.core&&delete m.agent.core,m.agent.tag=t.event.node.agent.tag),null!=t.event.node.intelamt&&(null==m.intelamt&&(m.intelamt={}),null!=t.event.node.intelamt.state&&(m.intelamt.state=t.event.node.intelamt.state),null!=t.event.node.intelamt.host&&(m.intelamt.user=t.event.node.intelamt.host),null!=t.event.node.intelamt.user&&(m.intelamt.user=t.event.node.intelamt.user),null!=t.event.node.intelamt.tls&&(m.intelamt.tls=t.event.node.intelamt.tls),null!=t.event.node.intelamt.ver&&(m.intelamt.ver=t.event.node.intelamt.ver),null!=t.event.node.intelamt.tag&&(m.intelamt.tag=t.event.node.intelamt.tag),null!=t.event.node.intelamt.uuid&&(m.intelamt.uuid=t.event.node.intelamt.uuid),null!=t.event.node.intelamt.realm&&(m.intelamt.realm=t.event.node.intelamt.realm)),m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,t.event.node.icon&&(m.icon=t.event.node.icon),refreshDevice(m._id),updateDevices();break;case"nodemeshchange":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1)):(m.meshid=t.event.newMeshId,m.meshnamel=meshes[t.event.newMeshId].name.toLowerCase()),updateDevices(),refreshDevice(t.event.nodeid)}else{m=t.event.node;if(!meshes[m.meshid])break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices()}break;case"nodeconnect":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).conn=t.event.conn,m.pwr=t.event.pwr,updateDevices();break;case"login":null!=users&&users["user/"+domain+"/"+t.event.username.toLowerCase()]&&(users["user/"+domain+"/"+t.event.username.toLowerCase()].login=t.event.time)}}}function topMenu(e){null!=xxdialogMode&&0!=xxdialogMode&&999!=xxdialogMode||(void 0===e?1==("none"==QS("topMenu").display)?0!=xxdialogMode&&null!=xxdialogMode||(QV("topMenu",!0),xxdialogMode=999):(QV("topMenu",!1),xxdialogMode=0):(QV("topMenu",!1),xxdialogMode=0,1==e&&3!=xxcurrentView&&goForward("account"),2==e&&5!=xxcurrentView&&goForward("files")))}var filetreelinkpath,backStack=[];function goBack(){xxdialogMode||(0<backStack.length&&backStack.pop(),goStack())}function goForward(e){xxdialogMode||(backStack.push(e),goStack())}function goStack(){if(0!=backStack.length){var e=backStack[backStack.length-1],t=e.split("/")[0];"node"==t&&(setupDeviceMenu(0),gotoDevice(e)),"mesh"==t&&gotoMesh(e),"account"==t&&go(3),"devices"==t&&go(2),"files"==t&&go(5)}else go(2)}function updateFooterMenu(e){for(;null!=e&&e.length<3;)e.push({n:""});var t="",o="";if(null!=e)for(var n in e)t+='<td style="cursor:pointer'+(""==o?"":";border-left:solid 1px white")+'" onclick="'+e[n].f+'">'+e[n].n,o=e[n].n;QH("footerMenu","<tr>"+t)}function account_manageAuthApp(){xxdialogMode||0==(4096&features)||(1==userinfo.otpsecret?account_removeOtp():account_addOtp())}function account_addOtp(){xxdialogMode||1==userinfo.otpsecret||0==(4096&features)||(setDialogMode(2,"認証アプリ",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>読み込み中...</div>","otpauth-request"),meshserver.send({action:"otpauth-request"}))}function account_addOtpCheck(e){var t=6==Q("d2otpauthinput").value.length;QE("idx_dlgOkButton",t),e&&13==e.keyCode&&t&&dialogclose(1)}function account_removeOtp(){xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||setDialogMode(2,"認証アプリ",3,function(){meshserver.send({action:"otpauth-clear"})},"認証アプリケーションの削除2段階ログインを確認しますか?")}function account_manageOtp(e){2==xxdialogMode&&"otpauth-manage"==xxdialogTag&&dialogclose(0),xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||meshserver.send({action:"otpauth-getpasswords",subaction:e})}function account_showVerifyEmail(){xxdialogMode||1==userinfo.emailVerified||1!=serverinfo.emailcheck||setDialogMode(2,"メール確認",3,account_showVerifyEmailEx,"[OK]をクリックして確認メールを送信します:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>確認を受けるまで数分お待ちください。")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"メールアドレスの変更",3,account_changeEmail,addHtmlValue("Eメール","<input id=dp3email style=width:170px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />")),null!=userinfo.email&&(Q("dp3email").value=userinfo.email),account_validateEmail(),Q("dp3email").focus())}function account_validateEmail(e,t){QE("idx_dlgOkButton",validateEmail(Q("dp3email").value)&&Q("dp3email").value!=userinfo.email),null!=e&&13==e.keyCode&&dialogclose(1)}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp3email").value})}function account_showDeleteAccount(){if(!xxdialogMode){var e="<form method=post><table style=margin-left:10px><input type=hidden name=action value=deleteaccount /><input type=hidden name=authcookie value="+authCookie+" /><tr>";e+="<td align=right>パスワード:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr><tr><td align=right>パスワード:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr></table><div style=padding:10px;margin-bottom:4px>",e+='<input id=account_dlgCancelButton type=button value="キャンセル" style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>',e+='<input id=account_dlgOkButton type=submit value="OK" style="float:right;width:80px" onclick=dialogclose(1)>',setDialogMode(2,"アカウントを削除する",0,null,e+="</div><br /></form>"),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="<table style=margin-left:10px>";if(e+="<tr><td align=right>"+nobreak("以前のパスワード:")+"</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>",e+="<tr><td align=right>"+nobreak("新しいパスワード:")+"</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>",e+="<tr><td align=right>"+nobreak("新しいパスワード:")+"</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>",65536&features&&(e+="<tr><td align=right>パスワードのヒント:</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"),e+="</table>",passRequirements){var t=[],o=0;for(var n in passRequirements)"reset"!=n&&"hint"!=n&&(t.push(n+":"+passRequirements[n]),o++);0<o&&(e+="<br /><span style=font-size:x-small>"+format("要件:{0}。",t.join(", "))+"</span>")}return setDialogMode(2,"パスワードを変更する",3,account_showChangePasswordEx,e+="<br />"),Q("apassword0").focus(),account_validateNewPassword(),!1}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var e={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};65536&features&&(e.hint=Q("apasswordhint").value),meshserver.send(e)}}function account_createMesh(){if(!xxdialogMode)if(4294967295==userinfo.siteadmin||0==(64&userinfo.siteadmin))if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var e=addHtmlValue("名","<input id=dp3meshname style=width:170px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");e+=addHtmlValue("タイプ","<div style=width:170px;margin:0;padding:0><select id=dp3meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>ソフトウェアエージェントグループ</option><option value=1>Intel&reg; AMTのみ</option></select></div>"),setDialogMode(2,"デバイスグループを作成する",3,account_createMeshEx,e+=addHtmlValue("説明","<div style=width:170px;margin:0;padding:0><textarea id=dp3meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"アカウントのセキュリティ",1,null,"二要素認証が有効になるまでデバイスにアクセスできません。これは、追加のセキュリティのために必要です。 「マイアカウント」に移動して、「アカウントセキュリティ」セクションを確認します。");else setDialogMode(2,"アカウントのセキュリティ",1,null,"メールアドレスが確認されるまでデバイスにアクセスできません。これはパスワードの回復に必要です。 「マイアカウント」に移動して、メールアドレスを変更および確認します。");else setDialogMode(2,"新しいデバイスグループ",1,null,"このアカウントには、新しいデバイスグループを作成する権限がありません。")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0<Q("dp3meshname").value.length)}function account_createMeshEx(e,t){meshserver.send({action:"createmesh",meshname:Q("dp3meshname").value,meshtype:Q("dp3meshtype").value,desc:Q("dp3meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value)}function account_validateNewPassword(){var e="",t=0<Q("apassword0").value.length&&0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value&&Q("apassword0").value!=Q("apassword1").value;if(65536&features&&Q("apasswordhint").value==Q("apassword1").value&&(t=!1),""!=Q("apassword1").value)if(null==passRequirements||""==passRequirements){var o=checkPasswordStrength(Q("apassword1").value);e=80<=o?"<span style=color:green>Strong<span>":60<=o?"<span style=color:blue>&#9679;<span>":"<span style=color:red>&#9679;<span>"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="<span style=color:red>方針<span>")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,o={},n=0,i={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var a=0;a<e.length;a++)o[e[a]]=(o[e[a]]||0)+1,t+=5/o[e[a]];for(var s in i)n+=1==i[s]?1:0;return parseInt(t+10*(n-1))}function checkPasswordRequirements(e,t){if(null==t||""==t||"object"!=typeof t)return!0;if(t.min&&e.length<t.min)return!1;if(t.max&&e.length>t.max)return!1;for(var o=0,n=0,i=0,a=0,s=0;s<e.length;s++)/\d/.test(e[s])&&o++,/[a-z]/.test(e[s])&&n++,/[A-Z]/.test(e[s])&&i++,/\W/.test(e[s])&&a++;return!(t.num&&o<t.num)&&(!(t.lower&&n<t.lower)&&(!(t.upper&&i<t.upper)&&!(t.nonalpha&&a<t.nonalpha)))}function updateMeshes(){var e="",t=0;for(i in meshes){t++;var o=meshes[i].links[userinfo._id].rights,n="部分的権利";4294967295==o?n="完全な管理者":0==o&&(n="権利なし"),e+="<div style=cursor:pointer onclick=goForward('"+i+"')>",e+='<div style="float:left;margin-left:4px"><img src="/images/meshicon50.png" width=50 height=50 /></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+EscapeHtml(meshes[i].name)+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+n+"</div></div>",e+="</div></div>"}QH("p3meshes",e),QV("p3noMeshFound",0==t)}function gotoMesh(e){null==(currentMesh=meshes[e])&&goBack(),p20updateMesh(),go(20)}var sortorder,filetreelocation=[];function p5refreshFiles(){meshserver.send({action:"files"})}function updateFiles(){if(QV("MainMenuMyFiles",0==(8&features)),0==(8&features)){for(var e,t="",o="",n="<a style=cursor:pointer onclick=p5folderup(0)>ルート</a>",i="Root",a=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),c=0;c<p.length;c++)p[c].checked&&d.push(p[c].value);for(var c in filetreelinkpath="",filetreelocation){if(null==a.f||null==a.f[filetreelocation[c]])break;if(l.push(filetreelocation[c]),i+=" / "+filetreelocation[c],1==s){var u=filetreelocation[c].split("/");e=window.location+u[0]+"files/"+u[2],filetreelinkpath+=filetreelocation[c]}else""!=filetreelinkpath&&(filetreelinkpath+="/"+filetreelocation[c],2<s&&(e+="/"+filetreelocation[c]));n+=" / <a style=cursor:pointer onclick=p5folderup("+s+")>"+(null!=(a=a.f[filetreelocation[c]]).n?a.n:filetreelocation[c])+"</a>",s++}filetreelocation=l;var m=i.toLowerCase().startsWith("root / "+userinfo._id+" / public"),h=p5sort_files(a.f);for(var c in h){var f,g=h[c],v=g.n;f=40<(f=v).length?EscapeHtml(v.substring(0,40))+"...":EscapeHtml(v),v=EscapeHtml(v);var k="";null!=g.s&&(k=getFileSizeStr(g.s));var y="";if(g.t<3||4==g.t){y="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+v+"'>&nbsp;<span style=float:right;padding-right:4px>"+(1==g.t||4==g.t?p5getQuotabar(g):"")+"</span><span><div class=fileIcon"+g.t+'></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(g.nx)+'")>'+f+"</a></span></div>"}else{var x=f,b="";m&&(b=" (<a style=cursor:pointer onclick='p5showPublicLink(\""+e+"/"+g.nx+"\")'>リンク</a>)"),0<g.s&&(x='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+g.nx)+'">'+f+"</a>"+b),y="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+g.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+k+"</span><span><div class=fileIcon"+g.t+"></div>"+x+"</span></div>"}g.t<3?t+=y:o+=y}if(QH("p5rightOfButtons",p5getQuotabar(a)),QH("p5files",t+o),QH("p5currentpath",n),QE("p5FolderUp",0!=filetreelocation.length),QV("p5PublicShare",m),r==filetreelinkpath){p=document.getElementsByName("fc");for(c=0;c<p.length;c++)p[c].checked=0<=d.indexOf(p[c].value)}p5setActions()}}function getNiceSize(e){return e<=0?"ストレージを超えています":e<2048?format("{0} b残り",e):e<2097152?format("{0} k残り",Math.round(e/1024)):e<2147483648?format("残り{0} m",Math.round(e/1024/1024)):format("{0} g残り",Math.round(e/1024/1024/1024))}function p5getQuotabar(e){for(;1<e.t&&4!=e.t;)e=e.parent;return 1!=e.t&&4!=e.t||null==e.maxbytes?"":getNiceSize(e.maxbytes-e.s)+" <progress style=height:10px;width:100px value="+e.s+" max="+e.maxbytes+" />"}function p5showPublicLink(e){setDialogMode(2,"公開リンク",1,null,'<input type=text style=width:100% value="'+e+'" readonly />')}function p5sort_filename(e,t){return e.ln>t.ln?1*sortorder:e.ln<t.ln?-1*sortorder:0}function p5sort_timestamp(e,t){return e.d>t.d?1*sortorder:e.d<t.d?-1*sortorder:0}function p5sort_bysize(e,t){return e.s==t.s?p5sort_filename(e,t):(e.s-t.s)*sortorder}function p5sort_files(e){var t=[],o=Q("p5sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return sortorder=1,3<o&&(sortorder=-1,o-=3),1==o?t.sort(p5sort_filename):2==o?t.sort(p5sort_bysize):3==o&&t.sort(p5sort_timestamp),t}function p5setActions(){var e=getFileSelCount(),t=getFileCount(),o=getFileSelCount(!1);QE("p5DeleteFileButton",0<e&&0<filetreelocation.length),QE("p5NewFolderButton",0<filetreelocation.length),QE("p5UploadButton",0<filetreelocation.length),QE("p5RenameFileButton",1==e&&0<filetreelocation.length),QE("p5SelectAllButton",0<t),Q("p5SelectAllButton").value=0<e?"なし":"すべて",QE("p5CutButton",0<o&&e==o),QE("p5CopyButton",0<o&&e==o),QE("p5PasteButton",null!=p5clipboard&&0<p5clipboard.length&&0<filetreelocation.length)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function getFileCount(){return document.getElementsByName("fc").length}function p5selectallfile(){for(var e=0==getFileSelCount(),t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked=e;p5setActions()}function setupBackPointers(e){if(null!=e.f){var t=0,o=0;for(var n in e.f)setupBackPointers(e.f[n]),(e.f[n].parent=e).f[n].s&&(t+=e.f[n].s),e.f[n].c&&(o+=e.f[n].c),3==e.f[n].t&&o++;e.s=t,e.c=o}return e}function getFileSizeStr(e){return 1==e?"1バイト":format("{0}バイト",e)}function p5folderup(e){if(null==e)filetreelocation.pop();else for(;filetreelocation.length>e;)filetreelocation.pop();return updateFiles(),!1}function p5folderset(e){return filetreelocation.push(decodeURIComponent(e)),updateFiles(),!1}function p5createfolder(){setDialogMode(2,"新しいフォルダ",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />"),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var e=getFileSelCount(),t=0<getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p5recdeleteinput>再帰削除</label><br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"削除する",3,p5deletefileEx,1<e?format("選択したアイテム{0}を削除しますか?",e)+t:"選択したアイテムを削除しますか?"+t)}function p5deletefileEx(){for(var e=[],t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&e.push(t[o].value);meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:e,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){for(var e,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&(e=t[o].value);setDialogMode(2,"リネーム",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:e}),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5renamefileEx(e,t){t.newname=Q("p5renameinput").value,meshserver.send(t)}function p5fileNameCheck(e){var t=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",t),1==t&&e&&13==e.keyCode&&dialogclose(1)}var isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function p5uploadFile(){setDialogMode(2,"ファイルをアップロードする",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=hidden name=authCookie value='+authCookie+" /><input type=submit id=p5loginSubmit style=display:none /></form>"),updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(e){var t=document.getElementsByName("fc");p5clipboard=[],p5clipboardCut=e,p5clipboardFolder=Clone(filetreelocation);for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p5clipboard.push(t[o].value);p5updateClipview()}function p5pasteFile(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("{1}エントリ{2}のうち{0}をこの場所に拘束しますか?",0==p5clipboardCut?"copy":"move",p5clipboard.length,1<p5clipboard.length?"s":"")),setDialogMode(2,"ペースト",3,p5pasteFileEx,e)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:0==p5clipboardCut?"copy":"move",scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard}),p5folderup(999),1==p5clipboardCut&&(p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview())}function p5updateClipview(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("{2}の{0}エントリを保持しています{1}",p5clipboard.length,1<p5clipboard.length?"s":"",0==p5clipboardCut?"コピー":"動く")+', <a href=# onclick="return p5clearClip()" style=cursor:pointer>クリア</a>.'),QH("p5bottomstatus",e),p5setActions()}function p5clearClip(){return p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview(),!1}function p5fileDragDrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer&&0!=e.dataTransfer.files.length&&0!=filetreelocation.length)for(var t=[],o=[],n=[],i=[],a=e.dataTransfer.files.length,s=0;s<e.dataTransfer.files.length;s++){var l=new FileReader,r=e.dataTransfer.files[s];t.push(r.name),o.push(r.size),n.push(r.type),l.onload=function(e){i.push(e.target.result),0==--a&&(Q("p5fileDragName").value=t.join("*"),Q("p5fileDragSize").value=o.join("*"),Q("p5fileDragType").value=n.join("*"),Q("p5fileDragData").value=i.join("*"),Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath),Q("p5loginSubmit2").click())},l.readAsDataURL(r)}}var p5dragtimer=null;function p5fileDragOver(e){haltEvent(e),null!=p5dragtimer&&(clearTimeout(p5dragtimer),p5dragtimer=null);var t=!0;0==filetreelocation.length&&(t=!1),QV("bigok",t),QV("bigfail",!t)}function p5fileDragLeave(e){haltEvent(e),"p5filetable"!=e.target.id?(QV("bigfail",!1),QV("bigok",!1)):p5dragtimer=setTimeout("QV('bigfail',false);QV('bigok',false);p5dragtimer=null;",200)}function ondeskkeypress(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeys(e)}}function ondeskkeydown(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyDown(e)}}function ondeskkeyup(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyUp(e)}}var updateDevicesTimer=null;function updateDevices(){null==updateDevicesTimer&&(updateDevicesTimer=setTimeout(updateDevicesEx,200))}var deviceHeaderCount,sort=0,deviceHeaderId=0,deviceHeaders={},showRealNames=!1,deviceHeaderTotal=0,deviceHeadersTitles=(deviceHeaders={},{});function updateDevicesEx(){null!=updateDevicesTimer&&(clearTimeout(updateDevicesTimer),updateDevicesTimer=null);var e="",t=0,o=null,n=0,i={};for(var a in deviceHeaderCount={},deviceHeaders={},deviceHeadersTitles={},(deviceHeaderTotal=deviceHeaderId=0)==sort?nodes.sort(meshSort):1==sort?nodes.sort(powerSort):2==sort&&(1==showRealNames?nodes.sort(deviceHostSort):nodes.sort(deviceSort)),nodes)if(0!=nodes[a].v){var s=meshes[nodes[a].meshid].links[userinfo._id];if(null!=s){s.rights;if(0==sort){if(nodes.sort(meshSort),nodes[a].meshid!=o){deviceHeaderSet();var l="";1==meshes[nodes[a].meshid].mtype&&(l="<span style=color:lightgray>、Intel&reg; AMTのみ</span>"),null!=o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=padding-top:4px><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+nodes[a].meshid+'")>'+EscapeHtml(meshes[nodes[a].meshid].name)+"</span>"+l+"<span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",i[o=nodes[a].meshid]=1,t=0}}else 1==sort?nodes[a].pwr!==o&&(deviceHeaderSet(),null!==o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[a].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",o=nodes[a].pwr,t=0):2==sort&&null==o&&(o="1");n++;var r=EscapeHtml(nodes[a].name);0==r.length&&(r="<i>なし</i>"),null!=nodes[a].rname&&0<nodes[a].rname.length&&(r+=" /"+EscapeHtml(nodes[a].rname));var d=EscapeHtml(nodes[a].name);1==showRealNames&&null!=nodes[a].rname&&(d=EscapeHtml(nodes[a].rname)),0==d.length&&(d="<i>なし</i>");var p=nodes[a].icon,c=NodeStateStr(nodes[a]);nodes[a].conn&&0!=nodes[a].conn||(p+=" gray"),e+="<div style=cursor:pointer onclick=goForward('"+nodes[a]._id+"')>",e+='<div class="i'+p+'" style="float:left;margin-left:4px"></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+d+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+c+"</div></div>",e+="</div></div>",deviceHeaderTotal++,void 0===deviceHeaderCount[nodes[a].state]?deviceHeaderCount[nodes[a].state]=1:deviceHeaderCount[nodes[a].state]++}}if(0==sort)for(var a in meshes){var u=meshes[a],m=u.links[userinfo._id];if(null!=m){m.rights;null==i[u._id]&&(""!=o&&""!=e&&(e+="</tr></table>"),e+="<div><div colspan=3 class=DevSt><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+u._id+'")>'+EscapeHtml(u.name)+"</span></div>",1==u.mtype&&(e+="<div style=padding:10px><i>Intel&reg;なしこのグループのAMTデバイス"),2==u.mtype&&(e+="<div style=padding:10px><i>このグループにデバイスはありません"),e+=".</i></div></div>",o=u._id,n++)}}for(var a in 0==n?QH("xdevices",'<div style="margin-top:50px;text-align:center"><span style="font-size:30px">デバイスなし</span><br /><br />このWebサイトのデスクトップバージョンを使用して、デバイスを追加します。</div>'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(a,deviceHeaders[a]);for(var a in deviceHeadersTitles)Q(a).title=deviceHeadersTitles[a]}var powerStatetable=["","パワード","睡眠","睡眠","睡眠","冬眠","電源を切る","プレゼント"],powerStateStrings=["","パワード","睡眠","睡眠","深い眠り","冬眠","ソフトオフ","プレゼント"],powerStateStrings2=["","デバイスに電源が入っています","デバイスはスリープ状態です(S1)","デバイスはスリープ状態です(S2)","デバイスはディープスリープ状態です(S3)","デバイスは休止状態です(S4)","デバイスはソフトオフ状態です(S5)","デバイスは存在しますが、電源状態を判別できません"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0<e.state&&e.state<powerStatetable.length&&state.push(powerStatetable[e.state]),e.conn&&(0!=(1&e.conn)&&t.push("<span>エージェント</span>"),0!=(2&e.conn)?t.push("<span>CIRA</span>"):0!=(4&e.conn)&&t.push("<span>Intel&reg; AMT</span>"),0!=(8&e.conn)&&t.push("<span>リレー</span>"),0!=(16&e.conn)&&t.push("<span>MQTT</span>")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return e<powerStatetable.length?powerStatetable[e]:""}function PowerStateStr2(e){return 0!=e&&e<powerStatetable.length?powerStatetable[e]:"未知の"}function onSortSelectChange(e){sort=document.getElementById("sortselect").selectedIndex,e||putstore("sort",sort),updateDevicesEx()}function deviceHeaderSet(){if(0!=deviceHeaderId){deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+" ノード";var e="";for(var t in deviceHeaderCount)0<e.length&&(e+=", "),e+=deviceHeaderCount[t]+" "+PowerStateStr2(t);deviceHeadersTitles["DevxHeader"+deviceHeaderId]=e,deviceHeaderId++,deviceHeaderCount={},deviceHeaderTotal=0}else deviceHeaderId=1}function meshSort(e,t){return e.meshnamel>t.meshnamel?1:e.meshnamel<t.meshnamel?-1:e.meshid==t.meshid?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:0}function powerSort(e,t){var o=e.pwr?e.pwr:0,n=t.pwr?t.pwr:0;return o==n?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:n<o?1:o<n?-1:0}function deviceSort(e,t){return e.namel>t.namel?1:e.namel<t.namel?-1:0}function deviceHostSort(e,t){return e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0}function refreshDevice(e){currentNode&&currentNode._id==e&&gotoDevice(e,xxcurrentView,!0)}function getNodeRights(e){var t=getNodeFromId(e);return meshes[t.meshid].links[userinfo._id].rights}var currentNode,currentDevicePanel=0,powerTimelineNode=null,powerTimelineReq=null,powerTimelineUpdate=null,powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(e,t,o){if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var n=getNodeFromId(e);if(null!=n){var i=meshes[n.meshid];if(null!=i){var a=i.links[userinfo._id].rights;if(!currentNode||currentNode._id!=n._id||1==o){currentNode=n;var s=EscapeHtml(n.name);0==s.length&&(s="<i>なし</i>"),0!=(4&a)&&(s="<span onclick=showEditNodeValueDialog(0) style=cursor:pointer>"+s+"</span>"),QH("p10deviceName",s);var l="<table style=width:100%>";l+=addDeviceAttribute("<span>グループ</span>",'<a onclick=goForward("'+n.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[n.meshid].name)+"</a>"),null!=n.rname&&(l+=addDeviceAttribute("<span>名</span>","<span>"+EscapeHtml(n.rname)+"</span>")),1!=i.mtype&&n.name==n.host||(0!=(4&a)?n.host?l+=addDeviceAttribute("ホスト名","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(n.host)+"</span>"):l+=addDeviceAttribute("ホスト名","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>なし</i></span>"):l+=addDeviceAttribute("ホスト名",EscapeHtml(n.host)));var r=n.desc?EscapeHtml(n.desc):"<i>なし</i>";l+=addDeviceAttribute("説明",0!=(4&a)?"<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+r+"</span>":r);var d=["未知の","Windows 32ビットコンソール","Windows 64ビットコンソール","Windows 32ビットサービス","Windows 64ビットサービス","Linux 32ビット","Linux 64ビット","MIPS","XENx86","Android ARM","Linux ARM","MacOS 32ビット","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32bit","MacOS 64ビット","ChromeOS","Linux Poky x86-64bit","Linux NoKVM x86-32bit","Linux NoKVM x86-64ビット","Windows MinCoreコンソール","Windows MinCoreサービス","NodeJS","ARM-リナロ","ARMv6l / ARMv7l","ARMv8 64ビット","ARMv6l / ARMv7l / NoKVM","未知の","未知の","FreeBSD x86-64"];if(null!=n.agent&&null!=n.agent.id&&null!=n.agent.ver){var p="";p=n.agent.id<=d.length?d[n.agent.id]:d[0],0!=n.agent.ver&&(p+=" v"+n.agent.ver),l+=addDeviceAttribute("エージェント",p)}if(null!=n.intelamt){p="";var c={0:nobreak("アクティブ化されていない(前)"),1:nobreak("アクティブ化されていない(イン)"),2:nobreak("有効化")};null!=n.intelamt.ver&&null==n.intelamt.state?p+="<i>"+nobreak("不明な状態")+"</i>, v"+n.intelamt.ver:null==n.intelamt.ver&&2==n.intelamt.state?p+="<i>有効化</i>":null==n.intelamt.ver||null==n.intelamt.state?p+="<i>不明なバージョンと状態</i>":(p+=c[n.intelamt.state],n.intelamt.flags&&(2&n.intelamt.flags?p=" <span>CCM</span>":4&n.intelamt.flags&&(p=" <span>ACM</span>")),p+=", v"+n.intelamt.ver),1==n.intelamt.tls&&(p+=", <span>TLS</span>"),2==n.intelamt.state&&(null!=n.intelamt.user&&""!=n.intelamt.user||(p+=0!=(4&a)?', <i style=color:#FF0000;cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'+nobreak("資格情報なし")+"</i>":", <i style=color:#FF0000>資格情報なし</i>"),p+=" ",0!=(4&a)&&(p+='<img src=images/link4.png height=10 width=10 style=cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'));var u="Intel&reg;私";"number"==typeof n.intelamt.sku&&(0!=(8&n.intelamt.sku)?u="Intel&reg; AMT":0!=(16&n.intelamt.sku)&&(u="Intel&reg; SM")),l+=addDeviceAttribute(u,p)}if(null!=n.agent&&null!=n.agent.tag&&"mailto:"!=n.agent.tag){var m=EscapeHtml(n.agent.tag);m.startsWith("mailto:")&&(m='<a href="'+m+'">'+m.substring(7)+"</a>"),l+=addDeviceAttribute("エージェントタグ",m)}var h=n.conn;if(h&&1<h){var f=[];0!=(1&n.conn)&&f.push("<span>エージェント</span>"),0!=(2&n.conn)?f.push("<span>Intel&reg; AMT CIRA</span>"):0!=(4&n.conn)&&f.push("<span>Intel&reg; AMT</span>"),0!=(8&n.conn)&&f.push("<span>エージェントリレー</span>"),0!=(16&n.conn)&&f.push("<span>MQTT</span>"),l+=addDeviceAttribute("接続性",f.join(", "))}var g="<i>なし</i>";if(null!=n.tags)for(var v in g="",n.tags)g+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+n.tags[v]+"</span>";l+=addDeviceAttribute("タグ",0!=(4&a)?"<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+g+"</span>":g),l+="</table><br />",0!=(76&a)&&(l+="<input type=button value=Actions onclick=deviceActionFunction() />"),QH("p10html",l),setupFiles(),l="<div style=float:right;font-size:x-small;margin-right:10px>",0!=(4&a)&&(l+='<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+n._id+'")>デバイスを削除</a>'),l+="</div><div style=font-size:x-small>",l+="</div><br>",QH("p10html3",l);var k=PowerStateStr(n.state);0!=(1&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>メッシュエージェント</span>"),0!=(2&h)?(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg;接続されたAMT</span>"):0!=(4&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMTが検出されました</span>"),0!=(16&h)&&(0<k.length&&(k+="<br/>"),k+="<span style=font-size:12px>MQTTチャネルが接続されました</span>"),QH("MainComputerState",k),QH("MainComputerImage",'<div class="i'+n.icon+'"></div>'),powerTimelineNode!=currentNode._id&&powerTimelineReq!=currentNode._id&&(QH("p10html2",""),powerTimelineReq=currentNode._id,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}setupDesktop(),go(t=t||10),setupDeviceMenu()}else goBack()}else goBack()}else setDialogMode(2,"アカウントのセキュリティ",1,null,"二要素認証が有効になるまでデバイスにアクセスできません。これは、追加のセキュリティのために必要です。 「マイアカウント」に移動して、「アカウントセキュリティ」セクションを確認します。");else setDialogMode(2,"アカウントのセキュリティ",1,null,"メールアドレスが確認されるまでデバイスにアクセスできません。これはパスワードの回復に必要です。 「マイアカウント」に移動して、メールアドレスを変更および確認します。")}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"デバイストースト",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var o=0;currentNode&&(o=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var n=[];0!=currentDevicePanel&&n.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&o||256&o)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8&currentNode.intelamt.sku))||currentNode.agent&&1&currentNode.agent.caps)&&n.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&o&&(4294967295==o||0==(1024&o))&&2==currentNode.mtype&&4&currentNode.agent.caps&&n.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(n)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="このデバイスで実行する操作を選択します。<br /><br />",o="<select id=d2deviceop style=float:right;width:170px>";0!=(64&e)&&(o+="<option value=100>目を覚ます</option>"),0!=(8&e)&&(o+="<option value=4>睡眠</option><option value=3>リセットする</option><option value=2>電源を切る</option>"),setDialogMode(2,"デバイスアクション",3,deviceActionFunctionEx,t+=addHtmlValue("操作",o+="</select>"))}}function deviceActionFunctionEx(){var e=Q("d2deviceop").value;100==e?meshserver.send({action:"wakedevices",nodeids:[currentNode._id]}):meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:e})}function updateDeviceTimeline(){2==meshserver.State&&null!=powerTimelineNode&&null!=powerTimelineUpdate&&null!=currentNode&&powerTimelineNode==powerTimelineReq&&currentNode._id==powerTimelineNode&&powerTimelineUpdate<Date.now()&&(powerTimelineUpdate=null,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}function drawDeviceTimeline(){var e=null,t=Date.now();currentNode._id==powerTimelineNode&&(e=powerTimeline);var o=new Date;o.setHours(0,0,0,0);(o=new Date(o.getTime()-5184e5)).getTime();var n=[];if(null!=e&&1<e.length){n.push([0,e[1],e[0]]);for(var i=e[1],a=2;a<e.length;a+=2){var s=e[a],l=t;e.length>a+1&&(l=e[a+1]),n.push([i,i+l,s]),i+=l}}var r="",d=1,p=new Date,c=Q("masthead").offsetWidth-122;p.setHours(0,0,0,0);for(a=0;a<7;a++){var u="",m=p.getTime(),h=m+864e5;for(var f in n){var g=n[f];if(1==isTimeBlockInside(m,h,g[0],g[1])){var v=Math.max(m,g[0]),k=Math.min(Math.min(h,g[1]),t),y=Math.round((k-v)*c/864e5);0<y&&(u+="<div style=display:table-cell;width:"+y+"px;background-color:"+powerColor(g[2])+";height:16px></div>")}}r+="<tr style="+(d%2==0?"background-color:#DDD":"")+"><td><div>&nbsp;"+printDate(p)+"<div></div></div></td><td><div>"+u+"</div></td></tr>",++d,p=new Date(p.getTime()-864e5)}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse;width:calc(100% - 18px);margin:9px" border=0 cellpadding=2 cellspacing=0><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:90px>Day</th><th scope=col style=text-align:center>Power State</th></tr>'+r+"</tbody></table>")}function powerColor(e){return e<powerColorTable.length?powerColorTable[e]:"yellow"}function isTimeBlockInside(e,t,o,n){return o<e&&t<n||(e<o&&o<t||e<n&&n<t)}function addDeviceAttribute(e,t){return"<tr><td style=width:100px;color:gray>"+e+"</td><td style=overflow:hidden>"+t+"</td></tr>"}function editDeviceAmtSettings(e,t){if(!xxdialogMode){var o="",n=getNodeFromId(e),i=3;0!=(4&getNodeRights(e))&&(o+=addHtmlValue("ユーザー名",'<input id=dp10username style=width:170px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />'),o+=addHtmlValue("パスワード","<input id=dp10password type=password style=width:170px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />"),o+=addHtmlValue("セキュリティ","<select id=dp10tls style=width:176px><option value=0>TLSセキュリティなし</option><option value=1>TLSセキュリティが必要</option></select>"),null!=n.intelamt.user&&""!=n.intelamt.user&&(i=7),setDialogMode(2,"Intelを編集&reg; AMTクレデンシャル",i,editDeviceAmtSettingsEx,o,{node:n,func:t}),null!=n.intelamt.user&&""!=n.intelamt.user?Q("dp10username").value=n.intelamt.user:Q("dp10username").value="admin",Q("dp10tls").value=n.intelamt.tls,validateDeviceAmtSettings())}}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(e,t){if(2==e)meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:"",pass:""}});else{var o=Q("dp10username").value;""==o&&(o="admin");var n=Q("dp10password").value;""==n&&(o=""),meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:o,pass:n,tls:Q("dp10tls").value}}),t.node.intelamt.user=o,t.node.intelamt.tls=Q("dp10tls").value,t.func&&setTimeout(t.func,300)}}function p10showDeleteNodeDialog(e){xxdialogMode||(setDialogMode(2,"ノードを削除",3,p10showDeleteNodeDialogEx,format("{0}を削除しますか?",EscapeHtml(currentNode.name))+"<br /><br /><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />確認する",e),p10validateDeleteNodeDialog())}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(e,t){meshserver.send({action:"removedevices",nodeids:[t]})}function p10showiconselector(){if(!xxdialogMode&&0!=(4&meshes[currentNode.meshid].links[userinfo._id].rights)){"<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>","<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>","<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br>","<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>","<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>","<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>",setDialogMode(2,"アイコンの選択",0,null,"<table align=center><td><div style=display:inline-block class=i1 onclick=p10setIcon(1)></div><div style=display:inline-block class=i2 onclick=p10setIcon(2)></div><div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br><div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><div style=display:inline-block class=i5 onclick=p10setIcon(5)></div><div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>"),QV("id_dialogclose",!0)}}function p10setIcon(e){setDialogMode(0),meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:e})}var desktop,desktopNode,showEditNodeValueDialog_modes=["装置名","ホスト名","説明","タグ"],showEditNodeValueDialog_modes2=["name","host","desc","tags"],showEditNodeValueDialog_modes3=["","","","Group1、Group2、Group3"];function showEditNodeValueDialog(e){if(!xxdialogMode){setDialogMode(2,"デバイスを編集",3,showEditNodeValueDialogEx,addHtmlValue(showEditNodeValueDialog_modes[e],'<input id=dp10devicevalue style=width:170px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[e]+'" onchange=p10editdevicevalueValidate('+e+",event) onkeyup=p10editdevicevalueValidate("+e+",event) />"),e);var t=currentNode[showEditNodeValueDialog_modes2[e]];null==t&&(t=""),Array.isArray(t)&&(t=t.join(", ")),Q("dp10devicevalue").value=t,p10editdevicevalueValidate(),Q("dp10devicevalue").focus()}}function showEditNodeValueDialogEx(e,t){var o={action:"changedevice",nodeid:currentNode._id};o[showEditNodeValueDialog_modes2[t]]=Q("dp10devicevalue").value,meshserver.send(o)}function p10editdevicevalueValidate(e,t){var o=1<e||0<Q("dp10devicevalue").value.length;QE("idx_dlgOkButton",o),null!=t&&1==o&&13==t.keyCode&&dialogclose(1)}var desktopsettings={encoding:2,showfocus:!1,showmouse:!0,showcad:!0,quality:40,scaling:1024,framerate:50};function setupDesktop(){desktopNode!=currentNode&&null!=desktop&&(desktop.Stop(),desktop=desktopNode=null),desktopNode==currentNode&&null!=desktop||(QH("DeskParent",'<canvas id=Desk width=640 height=200 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>'),desktopNode=currentNode,Q("Desk").addEventListener("DOMMouseScroll",function(e){return dmousewheel(e)}),Q("Desk").addEventListener("mousewheel",function(e){return dmousewheel(e)})),desktopNode=currentNode,updateDesktopButtons(),Q("Desk").toBlob||QV("deskSaveBtn",!1)}function updateDesktopButtons(){var e=meshes[currentNode.meshid],t=0;null!=desktop&&(t=desktop.State);var o=e.links[userinfo._id].rights;QV("disconnectbutton1",0!=t),QV("connectbutton1",0==t&&2==e.mtype&&(8&o||256&o)),QV("connectbutton1h",0==t&&8&o&&(1==e.mtype||null!=currentNode.intelamt&&2==currentNode.intelamt.state&&null!=currentNode.intelamt.ver&&"number"==typeof currentNode.intelamt.sku&&0!=(8&currentNode.intelamt.sku))),QV("d7amtkvm",!(null==currentNode.intelamt||null==currentNode.intelamt.ver&&1!=e.mtype||0!=t&&2!=desktop.contype)),QV("d7meshkvm",2==e.mtype&&(0==t||1==desktop.contype));var n=0!=(1&currentNode.conn);QE("connectbutton1",n);var i=0!=(6&currentNode.conn);QE("connectbutton1h",i),QV("DeskToastButton",0!=(16384&o)&&currentNode.agent&&currentNode.agent.id<5&&8&o),QV("deskActionsBtn",8&o),Q("DeskControl").checked=0!=(8&o),0==n&&QV("DeskTools",!1)}function connectDesktop(e,t){if(setSessionActivity(),null==desktop)if(desktopNode=currentNode,2==t){if(null==desktopNode.intelamt.user||""==desktopNode.intelamt.user)return void editDeviceAmtSettings(desktopNode._id,connectDesktop);(desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie)).debugmode=debugmode,desktop.onStateChanged=onDesktopStateChange,desktop.m.bpp=1==desktopsettings.encoding||3==desktopsettings.encoding?1:2,desktop.m.useZRLE=desktopsettings.encoding<3,desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id,16994,"*","*",0),desktop.contype=2}else(desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).debugmode=debugmode,desktop.m.debugmode=debugmode,desktop.attemptWebRTC=attemptWebRTC,desktop.onStateChanged=onDesktopStateChange,desktop.m.CompressionLevel=desktopsettings.quality,desktop.m.ScalingLevel=desktopsettings.scaling,desktop.m.FrameRateTimer=desktopsettings.framerate,desktop.m.onDisplayinfo=deskDisplayInfo,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id),desktop.contype=1;else desktop.Stop(),desktopNode=desktop=null}function onDesktopStateChange(e,t){var o=t;3==o&&2==e.contype&&o++;var n=StatusStrs[o];switch(null!=desktop&&1==desktop.webRtcActive&&(n+="、WebRTC"),QH("deskstatus",n),t){case 0:desktop.Stop(),desktopNode=desktop=null,QV("termdisplays",!1),1==fullscreen&&deskToggleFull()}updateDesktopButtons(),deskAdjust(),setTimeout(deskAdjust,50)}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),updateDesktopButtons(),setDialogMode(7,"リモートデスクトップ設定",3,showDesktopSettingsChanged))}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value,desktopsettings.showfocus=d7showfocus.checked,desktopsettings.showmouse=d7showcursor.checked,desktopsettings.quality=d7bitmapquality.value,desktopsettings.scaling=d7bitmapscaling.value,desktopsettings.framerate=d7framelimiter.value,localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings)),applyDesktopSettings(),desktop&&(1==desktop.contype&&0!=desktop.State&&desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate),2==desktop.contype&&0!=desktop.State&&(desktop.Stop(),setTimeout(function(){connectDesktop(null,2)},50)))}function applyDesktopSettings(){var e="",t=512&features?[90,70,50,40,30,20,10,5,1]:[50,40,30,20,10,5,1];for(var o in t)e+="<option value="+t[o]+">"+t[o]+"%</option>";QH("d7bitmapquality",e),d7desktopmode.value=desktopsettings.encoding,d7showfocus.checked=desktopsettings.showfocus,d7showcursor.checked=desktopsettings.showmouse,d7bitmapquality.value=40,0<=t.indexOf(parseInt(desktopsettings.quality))&&(d7bitmapquality.value=desktopsettings.quality),d7bitmapscaling.value=desktopsettings.scaling,desktopsettings.framerate&&(d7framelimiter.value=desktopsettings.framerate)}var fullscreen=!1;function deskAdjust(){var e=(Q("DeskParent").clientHeight-Q("Desk").clientHeight)/2;if(e<0){var t=Q("DeskParent").clientHeight,o=9999;desktop&&(o=desktop.m.width/desktop.m.height*t),QS("Desk")["max-height"]=t+"px",QS("Desk")["max-width"]=o+"px",e=0}else QS("Desk")["max-height"]=null,QS("Desk")["max-width"]=null;QS("Desk")["margin-top"]=e+"px",QS("Desk")["margin-bottom"]=e+"px"}function deskSendKeys(){if(!xxdialogMode&&null!=desktop&&3==desktop.State){var e=Q("deskkeys").value;0==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]]):1==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]]):2==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]]):desktop.sendCtrlMsg('{"action":"lock"}'):3==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]]):4==e?2==desktop.contype?desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]]):5==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]]):6==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]]):7==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65473,1],[65473,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,115],[desktop.m.KeyAction.UP,115],[desktop.m.KeyAction.EXUP,18]]):8==e?2==desktop.contype?desktop.m.sendkey([[65507,1],[119,1],[119,0],[65507,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,17],[desktop.m.KeyAction.DOWN,87],[desktop.m.KeyAction.UP,87],[desktop.m.KeyAction.EXUP,17]]):9==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65289,1],[65289,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9],[desktop.m.KeyAction.EXUP,18]]):10==e?desktop.m.sendcad():11==e&&(2==desktop.contype?desktop.m.sendkey([[65289,1],[65289,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9]]))}}function sendSpecialKeys(){xxdialogMode||null==desktop||3!=desktop.State||setDialogMode(3,"特別なキー",3,deskSendKeys)}function toggleSoftKeys(e){QV("DeskSoftInput",1==e),1==e&&Q("DeskSoftInput").focus()}function toggleDeskTools(){setSessionActivity(),xxdialogMode||("none"==QS("DeskTools").display?(QV("DeskTools",!0),Q("DeskTools").nodeid=currentNode._id,refreshDeskTools()):QV("DeskTools",!1))}function refreshDeskTools(){setSessionActivity(),QV("DeskToolsRefreshButton",!1),setTimeout(refreshDeskToolsEx,500),meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",!0)}var filesNode,deskTools={sort:1,msg:null};function sortProcess(e){deskTools.sort=e,showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(e,t){return e.p>t.p?1:e.p<t.p?-1:0}function sortProcessName(e,t){return e.d>t.d?1:e.d<t.d?-1:0}function showDeskToolsProcesses(e){if(null!=(deskTools.msg=e)){if(Q("DeskTools").nodeid==e.nodeid){var t=[],o=null;try{o=JSON.parse(e.value)}catch(e){}if(console.log(o),null!=o){for(var n in o)t.push({p:parseInt(n),c:o[n].cmd,d:o[n].cmd.toLowerCase(),u:o[n].user});0==deskTools.sort?t.sort(sortProcessPid):1==deskTools.sort&&t.sort(sortProcessName);var i="";for(var a in t)0!=t[a].p&&(i+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+t[a].p+"</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess("+t[a].p+',"'+t[a].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(t[a].u?t[a].u:"")+"</div><div>"+t[a].c+"</div></div>");QH("DeskToolsProcesses",i)}}}else QH("DeskToolsProcesses","")}function deskSaveImage(){if(setSessionActivity(),!xxdialogMode&&null!=desktop&&3==desktop.State){var e=new Date,t="Desktop-"+currentNode.name+"-"+e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)+"-"+("0"+e.getHours()).slice(-2)+"-"+("0"+e.getMinutes()).slice(-2);Q("Desk").toBlob(function(e){saveAs(e,t+".jpg")})}}function deskDisplayInfo(e,t,o,n){var i=Q("termdisplays").value;if(0<t.length){var a="";for(var s in t)a+="<option"+(i==t[s]?" selected":"")+">"+t[s]+"</option>";QH("termdisplays",a)}QV("termdisplays",0<t.length)}function deskGetDisplayNumbers(e){desktop.m.GetDisplayNumbers()}function deskSetDisplay(e){setSessionActivity();var t=0,o=Q("termdisplays").value;t="すべてのディスプレイ"==o?65535:parseInt(o.substring(8)),desktop.m.SetDisplay(t)}function dmousedown(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousedown(e)}function dmouseup(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mouseup(e)}function dmousemove(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousemove(e)}function dmousewheel(e){return setSessionActivity(),!(xxdialogMode||null==desktop||!desktop.m.mousewheel)&&(desktop.m.mousewheel(e),haltEvent(e),!0)}function drotate(e){xxdialogMode||null==desktop||(desktop.m.setRotation(desktop.m.rotation+e),deskAdjust(),deskAdjust())}function stopProcess(e,t){return setDialogMode(2,"プロセス制御",3,stopProcessEx,format('プロセス#{0} "{1}"を停止しますか?',e,t),e),!1}function stopProcessEx(e,t){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:t}),setTimeout(refreshDeskTools,300)}function setupFiles(){var e=filesNode==currentNode,t=0!=(1&(filesNode=currentNode).conn);QE("p13Connect",t),0!=e&&0!=t||!files||(files.Stop(),files=null)}function onFilesStateChange(e,t){setSessionActivity(),p13Connect.value=0==t?"つなぐ":"切断する";var o=StatusStrs[t];switch(1==files.webRtcActive&&(o+="、WebRTC"),Q("p13Status").textContent=o,t){case 0:QH("p13files",""),p13filetree=null,p13filetreelocation=[],QH("p13currentpath",""),QE("p13FolderUp",!1),p13setActions(),null!=files&&(files.Stop(),files=null);break;case 3:p13targetpath="",files.sendText({action:"ls",reqid:1,path:""})}}function CreateRemoteFiles(e){var t={protocol:5};return t.onFileUpdate=e,t.xxStateChange=function(e){},t.ProcessData=function(e){t.onFileUpdate(e)},t}var autoConnectFilesTimer=null;function autoConnectFiles(e){autoConnectFilesTimer=null==autoConnectFilesTimer?setInterval(connectFiles,100):(clearInterval(autoConnectFilesTimer),null)}function connectFiles(e){files?(files.Stop(),files=null):((files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).attemptWebRTC=attemptWebRTC,files.onStateChanged=onFilesStateChange,files.Start(filesNode._id)),p13clipboard=p13clipboardFolder=null,p13clipboardCut=0,p13updateClipview()}var p13sortorder,p13filetree=null,p13targetpath=null,p13filetreelocation=[];function p13gotFiles(e){if(setSessionActivity(),0<e.length&&123!=e.charCodeAt(0))p13gotDownloadBinaryData(e);else if("download"!=(e=JSON.parse(decode_utf8(e))).action)if(e.path=e.path.replace(/\//g,"\\"),null!=p13filetree&&e.path==p13filetree.path){var t=p13getCheckedNames();p13filetree=e,p13updateFiles(t)}else{for(var o=e.path.replace(/\//g,"\\"),n=p13targetpath.replace(/\//g,"\\");0<o.length&&"\\"==o[0];)o=o.substring(1);for(;0<n.length&&"\\"==n[0];)n=n.substring(1);(o==n||"\\"==e.path&&""==p13targetpath)&&(p13filetree=e,p13updateFiles())}else p13gotDownloadCommand(e)}function p13getCheckedNames(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);return e}function p13updateFiles(e){var t="",o="",n="<a style=cursor:pointer onclick=p13folderup(0)>ルート</a>",i=p13filetree.path.split("\\");for(var a in p13filetreelocation=[],i)""!=i[a]&&p13filetreelocation.push(i[a]);for(var a in p13filetreelocation)n+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(a)+1)+")>"+p13filetreelocation[a]+"</a>";var s=p13filetreelocation.join("/"),l=p13sort_files(p13filetree.dir);for(var a in l){var r,d=l[a],p=d.n;r=70<(r=p).length?EscapeHtml(p.substring(0,70))+"...":EscapeHtml(p),p=EscapeHtml(p);var c="";null!=d.s&&(c=getFileSizeStr(d.s));var u="";if(d.t<3){u="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right></span><span><div class=fileIcon"+d.t+'></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+r+"</a></span></div>"}else{var m=r;0<d.s&&(m='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+p)+"','"+encodeURIComponent(p)+"',"+d.s+')">'+r+"</a>"),u="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+c+"</span><span><div class=fileIcon"+d.t+"></div>"+m+"</span></div>"}d.t<3?t+=u:o+=u}if(QH("p13files",t+o),QH("p13currentpath",n),QE("p13FolderUp",0!=p13filetreelocation.length),null!=e){var h=document.getElementsByName("fd");for(a=0;a<h.length;a++)0<=e.indexOf(p13filetree.dir[h[a].value].n)&&(h[a].checked=!0)}p13setActions()}function p13folderset(e){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[e].n).split("\\").join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(e){if(null==e)p13filetreelocation.pop();else for(;p13filetreelocation.length>e;)p13filetreelocation.pop();p13targetpath=p13filetreelocation.join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13sort_filename(e,t){return e.ln>t.ln?1*p13sortorder:e.ln<t.ln?-1*p13sortorder:0}function p13sort_timestamp(e,t){return e.d>t.d?1*p13sortorder:e.d<t.d?-1*p13sortorder:0}function p13sort_bysize(e,t){return e.s==t.s?p13sort_filename(e,t):(e.s-t.s)*p13sortorder}function p13sort_files(e){var t=[],o=Q("p13sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].s&&(e[n].s=0),null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return p13sortorder=1,3<o&&(p13sortorder=-1,o-=3),1==o?t.sort(p13sort_filename):2==o?t.sort(p13sort_bysize):3==o&&t.sort(p13sort_timestamp),t}function p13setActions(){if(null==p13filetree)QE("p13DeleteFileButton",!1),QE("p13NewFolderButton",!1),QE("p13UploadButton",!1),QE("p13RenameFileButton",!1),QE("p13SelectAllButton",!1),Q("p13SelectAllButton").value="すべて",QE("p13RefreshButton",!1),QE("p13CutButton",!1),QE("p13CopyButton",!1),QE("p13PasteButton",!1);else{var e=p13getFileSelCount(),t=p13getFileCount(),o=p13getFileSelCount(!1),n=0<currentNode.agent.id&&currentNode.agent.id<5;QE("p13DeleteFileButton",0<e&&(0<p13filetreelocation.length||0==n)),QE("p13NewFolderButton",0<p13filetreelocation.length||0==n),QE("p13UploadButton",0<p13filetreelocation.length||0==n),QE("p13RenameFileButton",1==e&&(0<p13filetreelocation.length||0==n)),QE("p13SelectAllButton",0<t),Q("p13SelectAllButton").value=0<e?"なし":"すべて",QE("p13RefreshButton",!0),QE("p13CutButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13CopyButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13PasteButton",(0<p13filetreelocation.length||0==n)&&null!=p13clipboard&&0<p13clipboard.length)}}function p13getFileSelCount(e){for(var t=0,o=document.getElementsByName("fd"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function p13getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function p13getFileCount(){return document.getElementsByName("fd").length}function p13selectallfile(){for(var e=0==p13getFileSelCount(),t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked=e;p13setActions()}function p13createfolder(){setDialogMode(2,"新しいフォルダ",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />"),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value}),p13folderup(999)}function p13deletefile(){var e=p13getFileSelCount(),t=0<p13getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p13recdeleteinput>再帰削除</label><br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"削除する",3,p13deletefileEx,1<e?format("選択したアイテム{0}を削除しますか?",e)+t:"選択したアイテムを削除しますか?"+t)}function p13deletefileEx(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:e,rec:Q("p13recdeleteinput").checked}),p13folderup(999)}function p13renamefile(){for(var e,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&(e=p13filetree.dir[t[o].value].n);setDialogMode(2,"リネーム",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:e}),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13renamefileEx(e,t){t.newname=Q("p13renameinput").value,files.sendText(t),p13folderup(999)}function p13fileNameCheck(e){var t=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",t),1==t&&null!=e&&13==e.keyCode&&dialogclose(1)}function p13uploadFile(){setDialogMode(2,"ファイルをアップロードする",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />"),updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}function p13viewfile(){for(var e=document.getElementsByName("fd"),t=0;t<e.length;t++)if(e[t].checked){p13filetree.dir[e[t].value].s<=204800?p13downloadfile(encodeURIComponent(p13filetreelocation.join("/")+"/"+p13filetree.dir[e[t].value].n),encodeURIComponent(p13filetree.dir[e[t].value].n),p13filetree.dir[e[t].value].s,"viewer"):messagebox("ファイルエディター","編集できるのは200k未満のファイルのみです。");break}}var downloadFile,uploadFile,currentMesh,p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(e){var t=document.getElementsByName("fd");p13clipboard=[],p13clipboardCut=e,p13clipboardFolder=p13targetpath;for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p13clipboard.push(p13filetree.dir[t[o].value].n);p13updateClipview()}function p13pasteFile(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format("{0}エントリのコピーをこの場所に確認しますか?",p13clipboard.length):format("この場所への1つのエントリのコピーを確認しますか?"):1<p13clipboard.length?format("{0}エントリのこの場所への移動を確認しますか?",p13clipboard.length):format("1エントリのこの場所への移動を確認しますか?")),setDialogMode(2,"ペースト",3,p13pasteFileEx,e)}function p13pasteFileEx(){files.sendText({action:0==p13clipboardCut?"copy":"move",reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard}),p13folderup(999),1==p13clipboardCut&&(p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview())}function p13updateClipview(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format('コピー用に{0}エントリを保持しています, <a href=# onclick="return p13clearClip()" style=cursor:pointer>クリア</a>.',p13clipboard.length):format('コピー用に1つのエントリを保持, <a href=# onclick="return p13clearClip()" style=cursor:pointer>クリア</a>.'):1<p13clipboard.length?format('移動のために{0}エントリを保持しています, <a href=# onclick="return p13clearClip()" style=cursor:pointer>クリア</a>.',p13clipboard.length):format('移動のために1つのエントリを保持, <a href=# onclick="return p13clearClip()" style=cursor:pointer>クリア</a>.')),QH("p13bottomstatus",e),p13setActions()}function p13clearClip(){return p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview(),!1}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileCount(){return document.getElementsByName("fc").length}function p13downloadfile(e,t,o){xxdialogMode||downloadFile||!files||(downloadFile={path:decodeURIComponent(e),file:decodeURIComponent(t),size:o,tsize:0,data:"",state:0,id:Math.random()},files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path}),setDialogMode(2,"ダウンロードファイル",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+o+" />"))}function p13downloadFileCancel(){setDialogMode(0),files.sendText({action:"download",sub:"cancel",id:downloadFile.id}),downloadFile=null}function p13gotDownloadCommand(e){null!=downloadFile&&e.id==downloadFile.id&&("start"==e.sub?(downloadFile.state=1,files.sendText({action:"download",sub:"startack",id:downloadFile.id})):"cancel"==e.sub&&(downloadFile=null,setDialogMode(0)))}function p13gotDownloadBinaryData(e){downloadFile&&0!=downloadFile.state&&(4<e.length&&(downloadFile.tsize+=e.length-4,downloadFile.data+=e.substring(4),Q("d2progressBar").value=downloadFile.tsize),0!=(1&ReadInt(e,0))?(saveAs(data2blob(downloadFile.data),downloadFile.file),downloadFile=null,setDialogMode(0)):files.sendText({action:"download",sub:"ack",id:downloadFile.id}))}function p13doUploadFiles(e){xxdialogMode||((uploadFile={}).xpath=p13filetreelocation.join("/"),uploadFile.xfiles=e,uploadFile.xfilePtr=-1,setDialogMode(2,"ファイルをアップロードする",10,p13uploadFileCancel,"<div id=p13dfileName>接続しています...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />"),p13uploadReconnect())}function onFileUploadStateChange(e,t){switch(t){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",t)}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie,authRelayCookie,domainUrl),uploadFile.ws.attemptWebRTC=!1,uploadFile.ws.ctrlMsgAllowed=!1,uploadFile.ws.onStateChanged=onFileUploadStateChange,uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){if(uploadFile.xfilePtr++,uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var e=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",e.name),Q("d2progressBar").max=e.size,Q("d2progressBar").value=0,uploadFile.xreader=new FileReader,uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result,uploadFile.ws.sendText({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:e.name,size:uploadFile.xdata.byteLength})},uploadFile.xreader.readAsArrayBuffer(e)}else p13uploadFileCancel()}function p13uploadFileCancel(e,t){null!=uploadFile&&(null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile=null),setDialogMode(0)}function p13gotUploadData(e){var t=JSON.parse(e);if(null!=uploadFile&&parseInt(uploadFile.xfilePtr)==parseInt(t.reqid))if("uploadstart"==t.action){p13uploadNextPart(!1);for(var o=0;o<8;o++)p13uploadNextPart(!0)}else"uploadack"==t.action?p13uploadNextPart(!1):"uploaderror"==t.action&&p13uploadFileCancel()}function p13uploadNextPart(e){var t=uploadFile.xdata,o=uploadFile.xptr,n=uploadFile.xptr+4096;if(n>t.byteLength){if(1==e)return;n=t.byteLength}if(o==t.byteLength)null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile.xfiles.length>uploadFile.xfilePtr+1?p13uploadReconnect():p13uploadFileCancel();else{var i=t.slice(o,n);uploadFile.ws.send(i),uploadFile.xptr=n,Q("d2progressBar").value=n}}function p20updateMesh(){if(null!=currentMesh){QH("p20meshName",EscapeHtml(currentMesh.name));var e=format("不明な#{0}",currentMesh.mtype),t=currentMesh.links[userinfo._id].rights;1==currentMesh.mtype&&(e="Intel&reg; AMTのみ、エージェントなし"),2==currentMesh.mtype&&(e="ソフトウェアエージェントを使用して管理");var o="";o+=addHtmlValue("名",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",0!=(1&t))),o+=addHtmlValue("説明",addLinkConditional(currentMesh.desc&&""!=currentMesh.desc?EscapeHtml(currentMesh.desc):"<i>なし</i>","p20editmesh(2)",0!=(1&t))),o+=addHtmlValue("タイプ",e),o+="<br style=clear:both><br>";var n=currentMesh.links[userinfo._id];n&&0!=(2&n.rights)&&(o+="<div style=margin-bottom:6px><a onclick=p20showAddMeshUserDialog() style=cursor:pointer><img src=images/icon-addnew.png border=0 height=12 width=12> ユーザーを追加する</a></div>"),o+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>ユーザー認証</th></tr>';var i=1,a=[];for(var s in currentMesh.links)a.push({id:s,name:s.split("/")[2],rights:currentMesh.links[s].rights});for(var s in a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),a){var l="",r="部分的権利",d=a[s].rights;4294967295==d?r="完全な管理者":0==d&&(r="権利なし"),s==userinfo._id||4294967295!=t&&0==(2&t)||(l='<a onclick=p20deleteUser(event,"'+encodeURIComponent(a[s].id)+'") style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'),o+='<tr onclick=p20viewuser("'+encodeURIComponent(a[s].id)+'") style=height:32px;cursor:pointer'+(i%2==0?";background-color:#DDD":"")+"><td>",o+="<div style=float:right>"+l+"</div><div style=float:right;padding-right:4px>"+r+"</div><div class=m2></div><div>&nbsp;"+EscapeHtml(decodeURIComponent(a[s].name))+"<div></div></div>",o+="</td></tr>",++i}o+="</tbody></table>",4294967295==t&&(o+="<div style=font-size:small;text-align:right;margin-top:6px><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>グループを削除</a></span></div>"),QH("p20info",o)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("グループ{0}を削除してもよろしいですか?デバイスグループを削除すると、このグループ内のデバイスに関するすべての情報も削除されます。",EscapeHtml(currentMesh.name))+"<br /><br />";return setDialogMode(2,"グループを削除",3,p20showDeleteMeshDialogEx,e+="<label><input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />確認する</label>"),p20validateDeleteMeshDialog(),!1}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(e,t){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(e){if(!xxdialogMode){var t=addHtmlValue("名","<input id=dp20meshname style=width:170px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");setDialogMode(2,"デバイスグループの編集",3,p20editmeshEx,t+=addHtmlValue("説明","<input id=dp20meshdesc style=width:170px maxlength=1024 onkeyup=p20editmeshValidate() />")),Q("dp20meshname").value=currentMesh.name,currentMesh.desc&&(Q("dp20meshdesc").value=currentMesh.desc),p20editmeshValidate(),2==e?Q("dp20meshdesc").focus():Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",0<Q("dp20meshname").value.length)}function p20showAddMeshUserDialog(){if(!xxdialogMode){var e=addHtmlValue("User","<input id=dp20username style=width:170px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");e+='<div style="border:2px groove gray;background-color:white;max-height:120px;overflow-y:scroll">',e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>完全な管理者</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>デバイスグループの編集</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>デバイスグループユーザーの管理</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>デバイスグループコンピューターの管理</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>リモコン</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>リモートビューのみ</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotelimitedinput style=margin-left:12px>限定入力のみ</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>ターミナルアクセスなし</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>ファイルアクセスなし</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>Intel&reg;なしAMT</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>メッシュエージェントコンソール</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>サーバーファイル</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>ウェイクデバイス</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>デバイスノートの編集</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20limitevents>自分のイベントのみを表示</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20chatnotify>チャットと通知</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20uninstall>エージェントのアンインストール</label><br>",setDialogMode(2,"メッシュにユーザーを追加",3,p20showAddMeshUserDialogEx,e+="</div>"),p20validateAddMeshUserDialog(),Q("dp20username").focus()}}function p20validateAddMeshUserDialog(){var e=currentMesh.links[userinfo._id].rights,t=!Q("p20fulladmin").checked;QE("p20fulladmin",4294967295==e),QE("p20editmesh",t&&4294967295==e),QE("p20manageusers",t),QE("p20managecomputers",t),QE("p20remotecontrol",t),QE("p20meshagentconsole",t),QE("p20meshserverfiles",t),QE("p20wakedevices",t),QE("p20editnotes",t),QE("p20limitevents",t),QE("p20remoteview",t&&Q("p20remotecontrol").checked),QE("p20remotelimitedinput",t&&Q("p20remotecontrol").checked&&!Q("p20remoteview").checked),QE("p20noterminal",t&&Q("p20remotecontrol").checked),QE("p20nofiles",t&&Q("p20remotecontrol").checked),QE("p20noamt",t&&Q("p20remotecontrol").checked),QE("p20chatnotify",t),QE("p20uninstall",t)}function p20showAddMeshUserDialogEx(){var e=0;1==Q("p20fulladmin").checked?e=4294967295:(1==Q("p20editmesh").checked&&(e+=1),1==Q("p20manageusers").checked&&(e+=2),1==Q("p20managecomputers").checked&&(e+=4),1==Q("p20remotecontrol").checked&&(e+=8),1==Q("p20meshagentconsole").checked&&(e+=16),1==Q("p20meshserverfiles").checked&&(e+=32),1==Q("p20wakedevices").checked&&(e+=64),1==Q("p20editnotes").checked&&(e+=128),1==Q("p20remoteview").checked&&(e+=256),1==Q("p20noterminal").checked&&(e+=512),1==Q("p20nofiles").checked&&(e+=1024),1==Q("p20noamt").checked&&(e+=2048),1==Q("p20remotelimitedinput").checked&&(e+=4096),1==Q("p20limitevents").checked&&(e+=8192),1==Q("p20chatnotify").checked&&(e+=16384),1==Q("p20uninstall").checked&&(e+=32768));var t=Q("dp20username").value.split(","),o=[];for(var n in t)o.push(t[n].trim());meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,usernames:o,meshadmin:e})}function p20viewuser(e){if(!xxdialogMode){e=decodeURIComponent(e);var t=[],o=currentMesh.links[userinfo._id].rights,n=currentMesh.links[e].rights;4294967295==n?t.push("完全な管理者"):(0!=(1&n)&&t.push("デバイスグループの編集"),0!=(2&n)&&t.push("デバイスグループユーザーの管理"),0!=(4&n)&&t.push("デバイスグループコンピューターの管理"),0!=(8&n)&&t.push("リモコン"),0!=(16&n)&&t.push("エージェントコンソール"),0!=(32&n)&&t.push("サーバーファイル"),0!=(64&n)&&t.push("ウェイクデバイス"),0!=(128&n)&&t.push("メモを編集"),0!=(256&n)&&t.push("リモートビューのみ"),0!=(512&n)&&t.push("ターミナルなし"),0!=(1024&n)&&t.push("ファイルなし"),0!=(2048&n)&&t.push("Intel&reg;なしAMT"),0!=(8&n)&&0!=(4096&n)&&0==(256&n)&&t.push("制限された入力"),0!=(8192&n)&&t.push("自己イベントのみ"),0!=(16384&n)&&t.push("チャットと通知"),0!=(32768&n)&&t.push("アンインストール")),0==t.length&&t.push("権利なし");var i=1,a=addHtmlValue("ユーザー",EscapeHtml(decodeURIComponent(e.split("/")[2])));a+=addHtmlValue("許可",t.join("、")),userinfo._id!=e&&(4294967295==o||0!=(2&o)&&4294967295!=n)&&(i+=4),setDialogMode(2,"デバイスグループユーザー",i,p20viewuserEx,a,e)}}function p20viewuserEx(e,t){2==e&&setDialogMode(2,"リモートメッシュユーザー",3,p20viewuserEx2,format("ユーザー{0}の削除を確認しますか?",t.split("/")[2]),t)}function p20deleteUser(e,t){haltEvent(e),p20viewuserEx(2,decodeURIComponent(t))}function p20viewuserEx2(e,t){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:t})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xxcurrentView=-1;function go(e){if(setSessionActivity(),!xxdialogMode&&xxcurrentView!=e){updateFooterMenu(),setDialogMode(0);for(var t=0;t<32;t++)QV("p"+t,t==e);xxcurrentView=e}}function setDialogMode(e,t,o,n,i,a){setSessionActivity(),xxdialogMode=e,xxdialogFunc=n,xxdialogButtons=o,xxdialogTag=a,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&o),QV("idx_dlgCancelButton",2&o),QV("id_dialogclose",2&o||8&o),QV("idx_dlgButtonBar",7&o),t&&QH("id_dialogtitle",t);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){setSessionActivity();var t=xxdialogFunc,o=xxdialogButtons,n=xxdialogTag;setDialogMode(),(8&o||e)&&t&&t(e,n)}function putstore(e,t){try{if("undefined"==typeof localStorage||localStorage.getItem(e)==t)return;null==t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}if("_"!=e[0]){for(var o={},n=0,i=localStorage.length;n<i;++n){var a=localStorage.key(n);"_"!=a[0]&&(o[a]=localStorage.getItem(a))}meshserver.send({action:"userWebState",state:JSON.stringify(o)})}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}function center(){QS("dialog").left=(getDocWidth()-300)/2+"px",deskAdjust(),deskAdjust()}function messagebox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function reload(){window.location.href=window.location.href}function getNodeFromId(e){for(var t in nodes)if(nodes[t]._id==e)return nodes[t];return null}function addHtmlValue(e,t){return"<table><td style=width:120px>"+e+"<td><b>"+t+"</b></table>"}function addHtmlValue2(e,t){return"<div><div style=display:inline-block;float:right>"+t+"</div><div style=display:inline-block>"+e+"</div></div>"}function addLink(e,t){return"<a style=cursor:pointer;color:darkblue;text-decoration:none onclick='"+t+"'>&diams; "+e+"</a>"}function addLinkConditional(e,t,o){return o?addLink(e,t):e}function passwordcheck(e){return/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/.test(e)}function getFileSizeStr(e){return 1==e?"1バイト":format("{0} bytes",e)}function joinPaths(){var e=[];for(var t in arguments){var o=arguments[t];if(null!=o&&""!=o){for(;o.endsWith("/")||o.endsWith("\\");)o=o.substring(0,o.length-1);for(;o.startsWith("/")||o.startsWith("\\");)o=o.substring(1);e.push(o)}}return e.join("/")}function focusTextBox(e){setTimeout(function(){Q(e).selectionStart=Q(e).selectionEnd=65535,Q(e).focus()},0)}isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function parseUriArgs(){var e,t={},o=window.document.location.href.split(/[\?&|\=]/);for(n in o.splice(0,1),o)switch(n%2){case 0:e=decodeURIComponent(o[n]);break;case 1:t[e]=decodeURIComponent(o[n]);var n=parseInt(t[e]);n==t[e]&&(t[e]=n)}return t}function printDate(e){return e.toLocaleDateString(args.locale)}function printTime(e){return e.toLocaleTimeString(args.locale)}function printDateTime(e){return e.toLocaleString(args.locale)}function format(e){var o=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==o[t]?o[t]:e})}function nobreak(e){return e.split(" ").join("&nbsp;")}</script>
\ No newline at end of file
views/translations/default-mobile-min_nl.handlebars new
+1
@@ -0,0 +1 @@
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script keeplink=1 src=scripts/filesaver.js></script><title>{{{title}}}</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}.i1{background:url(../images/icons50.png) 0 0;height:50px;width:50px;border:none}.i2{background:url(../images/icons50.png) -50px 0;height:50px;width:50px;border:none}.i3{background:url(../images/icons50.png) -100px 0;height:50px;width:50px;border:none}.i4{background:url(../images/icons50.png) -150px 0;height:50px;width:50px;border:none}.i5{background:url(../images/icons50.png) -200px 0;height:50px;width:50px;border:none}.i6{background:url(../images/icons50.png) -250px 0;height:50px;width:50px;border:none}.m0{background:url(../images/images16.png) -32px 0;height:16px;width:16px;border:none;float:left}.m1{background:url(../images/images16.png) -16px 0;height:16px;width:16px;border:none;float:left}.m2{background:url(../images/images16.png) -96px 0;height:16px;width:16px;border:none;float:left}.m3{background:url(../images/images16.png) -112px 0;height:16px;width:16px;border:none;float:left}.gray{filter:gray;-webkit-filter:grayscale(100%) opacity(60%)}.DevSt{padding-left:5px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#ddd}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:#fff;clear:both}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style="width:calc(100% - 50px);overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><img id=topMenuIcon class=noselect style=position:absolute;right:0;top:10px;bottom:50px;color:#c8c8c8;font-size:44px;margin-right:8px;cursor:pointer;display:none onclick=topMenu() src=/images/3bars-30.png width=30 height=30></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%><div id=column_l style=width:100%;padding:0;position:absolute;bottom:0;top:0><div id=p0 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p0message style=text-align:center;width:100%><span id=p0span>Server verbroken</span>,<href onclick=reload() style=cursor:pointer><u>klik om opnieuw verbinding te maken</u></href>.</div></div></div><div id=p1 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p1message style=text-align:center;width:100%></div></div></div><div id=p2 style=display:none><div id=xdevices></div></div><div id=p3 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large><span id=p3userName></span></strong><br></div></table><div id=p3info style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div style=margin-left:8px><div id=p3AccountActions><p><strong>Gebruikersaccount beveiliging</strong><div style=margin-left:9px;margin-bottom:8px><div id=manageAuthApp style=margin-top:5px;display:none><a onclick=account_manageAuthApp() style=cursor:pointer>Beheer authenticator-app</a></div><div id=manageOtp style=margin-top:5px;display:none><a onclick=account_manageOtp(0) style=cursor:pointer>Beheer back-up codes</a></div></div><p><strong>gebruikersacties</strong><div style=margin-left:9px;margin-bottom:8px><div style=margin-top:5px><span id=verifyEmailId style=display:none><a onclick=account_showVerifyEmail() style=cursor:pointer>Verifieer Email</a></span></div><div style=margin-top:5px><span id=changeEmailId style=display:none><a onclick=account_showChangeEmail() style=cursor:pointer>Verander e-mailadres</a></span></div><div style=margin-top:5px><a onclick=account_showChangePassword() style=cursor:pointer>Verander wachtwoord</a><span id=p2nextPasswordUpdateTime></span></div><div style=margin-top:5px><a onclick=account_showDeleteAccount() style=cursor:pointer>Verwijder account</a></div></div><br style=clear:both></div><strong>Apparaatgroepen</strong> <span id=p3createMeshLink1>( <a onclick=account_createMesh() style=cursor:pointer><img src=images/icon-addnew.png width=12 height=12 border=0> Nieuw</a> )</span><br><br><div id=p3meshes></div><div id=p3noMeshFound style=margin-left:9px;display:none>Geen apparaatgroepen.<span id=p3createMeshLink2> <a onclick=account_createMesh() style=cursor:pointer><strong>Begin hier!</strong></a></span></div><br style=clear:both></div></div></div><div id=p5 style=display:none><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large>Mijn bestanden</strong><br></div></table><div id=p5myfiles style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><table id=p5toolbar style=width:100%;height:78px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5FolderUp disabled onclick=p5folderup() value=Omhoog> <input type=button style="width:calc(100%/5 - 5px)"id=p5SelectAllButton disabled onclick=p5selectallfile() value="Selecteer alles"onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RenameFileButton disabled value=Hernoemen onclick=p5renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5DeleteFileButton disabled value=Verwijderen onclick=p5deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5NewFolderButton disabled value=Map onclick=p5createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5UploadButton disabled value=Uploaden onclick=p5uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CutButton disabled value=Knippen onclick=p5copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CopyButton disabled value=Kopie onclick=p5copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5PasteButton disabled value=Plakken onclick=p5pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RefreshButton value=Ververs onclick=p5refreshFiles() onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p5currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Sorteren op naam<option value=2>Sorteren op grootte<option value=3>Sorteren op datum<option value=4>Aflopend op naam<option value=5>Aflopend op grootte<option value=6>Aflopend op datum</select></table></table><div id=p5filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p5files></span></div><table id=p5toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0;background-color:#d3d9d6 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px>&nbsp;<span id=p5bottomstatus></span><td id=p5rightOfButtons style=text-align:right;padding:3px></table></div></div><div id=p10 style=display:none;position:absolute;bottom:0;top:0;width:100%;overflow:hidden><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0;position:absolute;top:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><a id=MainComputerImage style=cursor:pointer onclick=p10showiconselector()></a><td><div style=margin-left:5px><strong><span id=p10deviceName></span></strong><br><span id=MainComputerState></span></div></table><div id=p10general style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div id=p10html style=margin-left:8px;margin-right:8px></div><div id=p10html2></div><div id=p10html3></div></div><div id=p10desktop style=overflow:hidden;position:absolute;top:55px;bottom:0;width:100%;display:none><div id=deskarea1 style=position:absolute;top:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><span id=p14power></span>&nbsp; <input id=DeskSoftInput style=width:25px;display:none;opacity:.2 onblur=toggleSoftKeys(0) onkeypress="return ondeskkeypress(event)"onkeydown="return ondeskkeydown(event)"onkeyup="return ondeskkeyup(event)"></div><div style=margin-left:3px><input type=button id=connectbutton1 value=Verbinden onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=connectbutton1h value="HW verbinden"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=disconnectbutton1 value=Verbreken onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1> <span id=deskstatus>Verbroken</span></div></div></div><div id=deskarea3 style="position:absolute;top:25px;width:100%;height:calc(100% - 50px)"><div id=deskarea3x style=background:#000;text-align:center;height:100%;position:relative><div id=DeskParent style=height:100%><canvas id=Desk width=640 height=200 style=width:100%;-ms-touch-action:none;margin-left:0 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid #d3d3d3;display:none"><a id=DeskToolsRefreshButton style=float:right;padding:3px;cursor:pointer onclick=refreshDeskTools()>Ververs</a><div id=DeskToolsBar style="position:absolute;padding:3px;border-radius:3px 3px 0 0;top:5px;left:4px;bottom:26px;background-color:#d3d3d3;cursor:pointer">Processen</div><div style=position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:#d3d3d3;text-align:left><div style="border-bottom:1px solid #a9a9a9;padding:3px"><a style=width:50px;padding-right:5px;float:left;cursor:pointer onclick=sortProcess(0)>PID</a><a style=cursor:pointer onclick=sortProcess(1)>Naam</a></div><div id=DeskToolsProcesses style=overflow-y:scroll;position:absolute;top:24px;bottom:0;width:100%></div></div></div></div></div><div id=deskarea4 style=position:absolute;bottom:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><select id=termdisplays style=display:none onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>&nbsp; <span id=DeskToastButton><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span>&nbsp;</div><div><input id=deskActionsBtn type=button style=margin-left:3px onkeypress=return!1 onkeydown=return!1 value=Akties onclick=deviceActionFunction()> <input type=button value=Instellingen onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings()> <input type=button onkeypress=return!1 onkeydown=return!1 value="Power Actie's..."onclick=showPowerActionDlg() style=display:none> <input id=DeskSpecialKeys type=button value="Speciale toetsen"onkeypress=return!1 onkeydown=return!1 onclick=sendSpecialKeys()> <input id=DeskSoftKeys type=button value=Toetsenbord onkeypress=return!1 onkeydown=return!1 onclick=toggleSoftKeys(1)> <label><span id=DeskControlSpan style=display:none><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1>Invoer</span></label></div></div></div></div><div id=p10files style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%;display:none><table id=p13toolbar style=width:100%;height:111px cellpadding=0 cellspacing=0><tr><td style="background-color:silver;border-bottom:2px solid #000;padding:2px"><div style=float:right;text-align:right><input id=filesActionsBtn type=button onkeypress=return!1 onkeydown=return!1 value=Akties onclick=deviceActionFunction() style=margin-right:2px></div><div style=margin-left:2px><input id=p13AutoConnect value="Automatisch verbinden"onclick=autoConnectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button style=display:none> <input id=p13Connect value=Verbinden onclick=connectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button> <span id=p13Status>Verbroken</span></div><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13FolderUp disabled onclick=p13folderup() value=Omhoog> <input type=button style="width:calc(100%/5 - 5px)"id=p13SelectAllButton disabled onclick=p13selectallfile() value="Selecteer alles"onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RenameFileButton disabled value=Hernoemen onclick=p13renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13DeleteFileButton disabled value=Verwijderen onclick=p13deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13NewFolderButton disabled value=Map onclick=p13createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13UploadButton disabled value=Uploaden onclick=p13uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CutButton disabled value=Knippen onclick=p13copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CopyButton disabled value=Kopie onclick=p13copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13PasteButton disabled value=Plakken onclick=p13pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RefreshButton disabled value=Ververs onclick=p13folderup(9999) onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p13currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Sorteren op naam<option value=2>Sorteren op grootte<option value=3>Sorteren op datum<option value=4>Aflopend op naam<option value=5>Aflopend op grootte<option value=6>Aflopend op datum</select></table></table><div id=p13filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p13files></span></div><table id=p13toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#d3d9d6>&nbsp;<span id=p13bottomstatus></span></table></div></div><div id=p20 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td onclick=p20editmesh(1)><img src=/images/meshicon50.png width=50 height=50><td onclick=p20editmesh(1)><div style=margin-left:5px><strong style=font-size:large><span id=p20meshName></span></strong><br></div></table><div id=p20info style=margin-left:8px;margin-right:8px></div></div></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table id=footerMenu cellpadding=0 cellspacing=0 style=height:32px;width:100%;color:#fff;cursor:pointer;table-layout:fixed></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:90px;width:300px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div><div id=dialog3 style=margin:auto;margin:3px><select id=deskkeys style=width:100%><option value=10>Ctrl+Alt+Del<option value=11>Tab<option value=5>Win<option value=0>Win+pijl naar omlaag<option value=1>Win+ pijl omhoog<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab</select></div><div id=dialog7 style=margin:auto;margin:3px><div id=d7meshkvm><h4 style="width:100%;border-bottom:1px solid gray">Agent Extern bureaublad</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir=rtl></select><div style=height:20px>Kwaliteit</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Schalen</div></div><div style="margin:3px 0 3px 0"><select id=d7framelimiter style=float:right;width:200px;height:20px dir=rtl><option selected value=50>Snel<option value=100>Gemiddeld<option value=400>Traag<option value=1000>erg traag</select><div style=height:20px>Beoordeel</div></div></div><div id=d7amtkvm><h4 style="width:100%;border-bottom:1px solid gray">Intel® AMT Hardware KVM</h4><div style=height:26px><select id=d7desktopmode style=float:right;width:200px><option value=1>RLE8, snelste<option value=2>RLE16, Aanbevolen<option value=3>RAW8, langzaam<option value=4>RAW16, Zeer langzaam</select><div>codering</div></div><div style=height:60px><div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:#fff"><label><input type=checkbox id=d7showfocus>Toon focus tool</label><br><label><input type=checkbox id=d7showcursor>Lokale muiscursor weergeven</label><br></div><div>anders</div></div></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Afbreken style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=Oke style=float:right;width:80px onclick=dialogclose(1)></div></div><div id=topMenu style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:0 0 5px 5px;position:fixed;top:50px;right:5px;width:170px;display:none"><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(2)>Mijn bestanden</div><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(1)>Mijn Account</div><div id=logoutMenuOption><a href=/logout><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer">Uitloggen</div></a></div></div><iframe name=fileUploadFrame style=display:none></iframe><script>"use strict";var webState="{{{webstate}}}";for(var i in""!=webState&&(webState=JSON.parse(decodeURIComponent(webState))),webState)localStorage.setItem(i,webState[i]);webState.loctag||localStorage.removeItem("loctag");var files,args=parseUriArgs(),debugLevel=parseInt("{{{debuglevel}}}"),features=parseInt("{{{features}}}"),sessionTime=parseInt("{{{sessiontime}}}"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",authCookie="{{{authCookie}}}",authRelayCookie="{{{authRelayCookie}}}",authCookieRenewTimer=null,meshserver=null,xdr=null,serverinfo=null,nodes=[],meshes={},filetree={},userinfo=null,users=(serverinfo=null,null),nodeShortIdent=0,serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}",debugmode=!1,attemptWebRTC=0!=(128&features),StatusStrs=["Verbroken","Verbinden...","Setup...","Verbonden","Intel® AMT verbonden"],passRequirements="{{{passRequirements}}}";""!=passRequirements&&(passRequirements=JSON.parse(decodeURIComponent(passRequirements)));var sessionActivity=Date.now();function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(!args.locale){var t=getstore("loctag",0);null!=t&&"*"!=t&&(args.locale=t)}(window.onresize=center)(),QV("changeEmailId",0==(2097152&features)),QH("p1message","Verbinden..."),go(1),(meshserver=MeshServerCreateControl(domainUrl,authCookie)).onStateChanged=onStateChanged,meshserver.onMessage=onMessage,meshserver.Start();var n=localStorage.getItem("desktopsettings");null!=n&&(desktopsettings=JSON.parse(n)),applyDesktopSettings()}function onStateChanged(e,t,n,o){if(0==t){if(setDialogMode(0),go(0),"noauth"==o)return void QH("p0span","Kan authenticatie niet uitvoeren");2==n?setTimeout(serverPoll,5e3):QH("p0span","Kan geen websocket aansluiten"),null!=authCookieRenewTimer&&(clearInterval(authCookieRenewTimer),authCookieRenewTimer=null)}else 2==t&&(meshserver.send({action:"meshes"}),meshserver.send({action:"nodes"}),meshserver.send({action:"files"}),xxcurrentView<2&&go(2),authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},18e5));QV("topMenuIcon",2==t)}function serverPoll(){xdr=null;try{xdr=new XDomainRequest}catch(e){}(xdr=xdr||new XMLHttpRequest).open("HEAD",window.location.href),xdr.timeout=15e3,xdr.onload=function(){reload()},xdr.onerror=xdr.ontimeout=function(){setTimeout(serverPoll,1e4)},xdr.send()}function updateSelf(){if(QV("verifyEmailId",!0!==userinfo.emailVerified&&null!=userinfo.email&&1==serverinfo.emailcheck),QV("manageAuthApp",4096&features),QV("manageOtp",0!=(4096&features)&&(1==userinfo.otpsecret||0<userinfo.otphkeys)),QV("p3createMeshLink1",!1),QV("p3createMeshLink2",!1),"number"==typeof userinfo.passchange)if(-1==userinfo.passchange)QH("p2nextPasswordUpdateTime"," - Reset bij volgende inlog.");else if(null!=passRequirements&&"number"==typeof passRequirements.reset){var e=userinfo.passchange+86400*passRequirements.reset-Math.floor(Date.now()/1e3);e<0?QH("p2nextPasswordUpdateTime"," - Reset bij volgende inlog."):e<3600?QH("p2nextPasswordUpdateTime",format(" - Reset in {0} minuten{1}.",Math.floor(e/60),addLetterS(Math.floor(e/60)))):e<86400?QH("p2nextPasswordUpdateTime",format(" - Reset in {0} uur{1}.",Math.floor(e/3600),addLetterS(Math.floor(e/3600)))):QH("p2nextPasswordUpdateTime",format(" - Reset in {0} dag(en){1}."),Math.floor(e/86400),addLetterS(Math.floor(e/86400)))}}function addLetterS(e){return 1<e?"s":""}function setSessionActivity(){sessionActivity=Date.now()}function checkIdleSessionTimeout(){Date.now()-sessionActivity>serverinfo.timeout&&(window.location.href="logout")}function onMessage(e,t){switch(t.action){case"serverinfo":(serverinfo=t.serverinfo).timeout&&(setInterval(checkIdleSessionTimeout,1e4),checkIdleSessionTimeout()),QV("p3AccountActions",0==(4&features)&&0==serverinfo.domainauth),QV("logoutMenuOption",0==(4&features)&&0==serverinfo.domainauth);break;case"authcookie":authCookie=t.cookie,authRelayCookie=t.rcookie;break;case"userinfo":userinfo=t.userinfo,QH("p3userName",userinfo.name),updateSelf();break;case"users":for(var n in users={},t.users)users[t.users[n]._id]=t.users[n];updateUsers();break;case"wssessioncount":wssessions=t.wssessions,updateUsers();break;case"meshes":for(var n in meshes={},t.meshes)meshes[t.meshes[n]._id]=t.meshes[n];updateMeshes(),updateDevices();break;case"files":filetree=setupBackPointers(t.filetree),updateFiles();break;case"nodes":for(var n in nodes=[],t.nodes)for(var o in t.nodes[n])meshes[n]?(t.nodes[n][o].namel=t.nodes[n][o].name.toLowerCase(),t.nodes[n][o].rname?t.nodes[n][o].rnamel=t.nodes[n][o].rname.toLowerCase():t.nodes[n][o].rnamel=t.nodes[n][o].namel,t.nodes[n][o].meshnamel=meshes[n].name.toLowerCase(),t.nodes[n][o].meshid=n,t.nodes[n][o].state=t.nodes[n][o].state?t.nodes[n][o].state:0,t.nodes[n][o].desc=t.nodes[n][o].desc,t.nodes[n][o].icon||(t.nodes[n][o].icon=1),t.nodes[n][o].ident=++nodeShortIdent,nodes.push(t.nodes[n][o])):console.log("Invalid mesh (1): "+n);updateDevices(),0==xxcurrentView&&go(parseInt("{{viewmode}}")),gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"));break;case"powertimeline":if(t.nodeid!=powerTimelineReq)break;powerTimelineNode=t.nodeid,powerTimeline=t.timeline,powerTimelineUpdate=Date.now()+3e5,currentNode._id==t.nodeid&&drawDeviceTimeline();break;case"otpauth-request":if(2==xxdialogMode&&"otpauth-request"==xxdialogTag){var i=t.secret;52==i.length?i=i.split(/(.............)/).filter(Boolean).join(" "):32==i.length&&(i=(i=i.split(/(....)/).filter(Boolean).join(" ")).substring(0,20)+"<br/>"+i.substring(20)),QH("d2optinfo",'Installeer <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank> Google Authenticator </a> of een compatibele toepassing, gebruik <a href="\' + message.url +\'" rel="noreferrer noopener" target=_blank> deze link </a> of voer hieronder het geheim in. Voer vervolgens het huidige 6-cijferige token in om 2-staps aanmelding te activeren.<br /><br /><div style=width:100%;text-align:center><tt id=d2optsecret secret="'+t.secret+'" style=font-size:15px>'+i+'</tt><br /><br />Token: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></div>'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"Verificatie-app",1,null,t.success?"<b style=color:green>Tweestapsverificatie successvol</b>. U hebt nu een geldig token nodig om opnieuw in te loggen.":"<b style=color:red>Tweestapsverificatie mislukt</b>. Wis het geheim van de applicatie en probeer het opnieuw. Je hebt maar een paar minuten om de juiste code in te voeren.");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"Verificatie-app",1,null,t.success?"<b style=color:green> Tweestapsverificatie verwijderd</b>. Je kan deze functie ten allen tijde weer inschakelen.":"<b style=color:red>Tweestapsverificatie verwijdering mislukt</b>. Probeer het opnieuw.");break;case"otpauth-getpasswords":if(xxdialogMode)return;var a="Eenmalige tokens kunnen worden gebruikt als secundaire authenticatie. Genereer een set, druk ze af en bewaar ze op een veilige plaats.";if(a+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(a+="<tr>");for(var r=""+t.passwords[l].p;r.length<8;)r="0"+r;!0===t.passwords[l].u?a+="<td>"+r.substring(0,4)+"&nbsp;"+r.substring(4):a+="<td><strike style=color:#BBB>"+r.substring(0,4)+"&nbsp;"+r.substring(4)}}else a+="<tr><td>geen actieve tokens";a+="</table></div></div><br />",a+="<div><input type=button value='Sluiten' onclick=setDialogMode(0) style=float:right></input>",a+="<input type=button value='Nieuw token' onclick='account_manageOtp(1);'></input>",null!=t.passwords&&(a+="<input type=button value='Wissen' onclick='account_manageOtp(2);'></input>"),setDialogMode(2,"Beheer back-up codes",8,null,a+="</div><br />","otpauth-manage");break;case"event":if(t.event.noact)break;switch(t.event.action){case"userWebState":if(null!=localStorage){var d=JSON.parse(t.event.state);for(var l in d)localStorage.setItem(l,d[l]);null!=d.loctag&&d.loctag!=oldLoctag&&(null!=d.loctag?args.locale=d.loctag:delete args.locale,updateDevices(),updateMeshes())}break;case"accountchange":if(userinfo.name==t.event.account.name){var p=t.event.account.siteadmin?t.event.account.siteadmin:0,c=userinfo.siteadmin?userinfo.siteadmin:0;(t.event.account.quota!=userinfo.quota||0==(8&userinfo.siteadmin)&&0!=(8&t.event.account.siteadmin))&&meshserver.send({action:"files"}),userinfo=t.event.account,c!=p&&updateSiteAdmin(),updateSelf()}break;case"createmesh":null!=t.event.links[userinfo._id]&&(meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},updateMeshes(),updateDevices(),meshserver.send({action:"files"}));break;case"meshchange":if(null==meshes[t.event.meshid])meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},meshserver.send({action:"nodes"});else{if(meshes[t.event.meshid].name!=t.event.name)for(var l in meshes[t.event.meshid].name=t.event.name,nodes)nodes[l].meshid==t.event.meshid&&(nodes[l].meshnamel=t.event.name.toLowerCase());if(meshes[t.event.meshid].desc=t.event.desc,meshes[t.event.meshid].links=t.event.links,null==meshes[t.event.meshid].links[userinfo._id]){20==xxcurrentView&&currentMesh==meshes[t.event.meshid]&&go(2),delete meshes[t.event.meshid];var u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2))}}updateMeshes(),updateDevices(),meshserver.send({action:"files"}),20==xxcurrentView&&currentMesh._id==t.event.meshid&&p20updateMesh();break;case"deletemesh":meshes[t.event.meshid]&&(delete meshes[t.event.meshid],updateMeshes(),meshserver.send({action:"files"}));u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,updateDevices(),20<=xxcurrentView&&xxcurrentView<30&&currentMesh._id==t.event.meshid&&(setDialogMode(0),go(2)),10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2));break;case"addnode":var m=t.event.node;if(!meshes[m.meshid])break;if(null!=getNodeFromId(m._id))break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices();break;case"removenode":var g=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){g=l;break}if(-1!=g){m=nodes[g];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(g,1),updateDevices()}break;case"changenode":g=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){g=l;break}if(-1!=g)(m=nodes[g]).name=t.event.node.name,m.rname=t.event.node.rname,m.host=t.event.node.host,m.desc=t.event.node.desc,m.publicip=t.event.node.publicip,m.iploc=t.event.node.iploc,m.wifiloc=t.event.node.wifiloc,m.gpsloc=t.event.node.gpsloc,m.tags=t.event.node.tags,m.userloc=t.event.node.userloc,null!=t.event.node.agent&&(null==m.agent&&(m.agent={}),null!=t.event.node.agent.ver&&(m.agent.ver=t.event.node.agent.ver),null!=t.event.node.agent.id&&(m.agent.id=t.event.node.agent.id),null!=t.event.node.agent.caps&&(m.agent.caps=t.event.node.agent.caps),null!=t.event.node.agent.core?m.agent.core=t.event.node.agent.core:m.agent.core&&delete m.agent.core,m.agent.tag=t.event.node.agent.tag),null!=t.event.node.intelamt&&(null==m.intelamt&&(m.intelamt={}),null!=t.event.node.intelamt.state&&(m.intelamt.state=t.event.node.intelamt.state),null!=t.event.node.intelamt.host&&(m.intelamt.user=t.event.node.intelamt.host),null!=t.event.node.intelamt.user&&(m.intelamt.user=t.event.node.intelamt.user),null!=t.event.node.intelamt.tls&&(m.intelamt.tls=t.event.node.intelamt.tls),null!=t.event.node.intelamt.ver&&(m.intelamt.ver=t.event.node.intelamt.ver),null!=t.event.node.intelamt.tag&&(m.intelamt.tag=t.event.node.intelamt.tag),null!=t.event.node.intelamt.uuid&&(m.intelamt.uuid=t.event.node.intelamt.uuid),null!=t.event.node.intelamt.realm&&(m.intelamt.realm=t.event.node.intelamt.realm)),m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,t.event.node.icon&&(m.icon=t.event.node.icon),refreshDevice(m._id),updateDevices();break;case"nodemeshchange":g=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){g=l;break}if(-1!=g){m=nodes[g];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(g,1)):(m.meshid=t.event.newMeshId,m.meshnamel=meshes[t.event.newMeshId].name.toLowerCase()),updateDevices(),refreshDevice(t.event.nodeid)}else{m=t.event.node;if(!meshes[m.meshid])break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices()}break;case"nodeconnect":g=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){g=l;break}if(-1!=g)(m=nodes[g]).conn=t.event.conn,m.pwr=t.event.pwr,updateDevices();break;case"login":null!=users&&users["user/"+domain+"/"+t.event.username.toLowerCase()]&&(users["user/"+domain+"/"+t.event.username.toLowerCase()].login=t.event.time)}}}function topMenu(e){null!=xxdialogMode&&0!=xxdialogMode&&999!=xxdialogMode||(void 0===e?1==("none"==QS("topMenu").display)?0!=xxdialogMode&&null!=xxdialogMode||(QV("topMenu",!0),xxdialogMode=999):(QV("topMenu",!1),xxdialogMode=0):(QV("topMenu",!1),xxdialogMode=0,1==e&&3!=xxcurrentView&&goForward("account"),2==e&&5!=xxcurrentView&&goForward("files")))}var filetreelinkpath,backStack=[];function goBack(){xxdialogMode||(0<backStack.length&&backStack.pop(),goStack())}function goForward(e){xxdialogMode||(backStack.push(e),goStack())}function goStack(){if(0!=backStack.length){var e=backStack[backStack.length-1],t=e.split("/")[0];"node"==t&&(setupDeviceMenu(0),gotoDevice(e)),"mesh"==t&&gotoMesh(e),"account"==t&&go(3),"devices"==t&&go(2),"files"==t&&go(5)}else go(2)}function updateFooterMenu(e){for(;null!=e&&e.length<3;)e.push({n:""});var t="",n="";if(null!=e)for(var o in e)t+='<td style="cursor:pointer'+(""==n?"":";border-left:solid 1px white")+'" onclick="'+e[o].f+'">'+e[o].n,n=e[o].n;QH("footerMenu","<tr>"+t)}function account_manageAuthApp(){xxdialogMode||0==(4096&features)||(1==userinfo.otpsecret?account_removeOtp():account_addOtp())}function account_addOtp(){xxdialogMode||1==userinfo.otpsecret||0==(4096&features)||(setDialogMode(2,"Verificatie-app",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>Laden...</div>","otpauth-request"),meshserver.send({action:"otpauth-request"}))}function account_addOtpCheck(e){var t=6==Q("d2otpauthinput").value.length;QE("idx_dlgOkButton",t),e&&13==e.keyCode&&t&&dialogclose(1)}function account_removeOtp(){xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||setDialogMode(2,"Verificatie-app",3,function(){meshserver.send({action:"otpauth-clear"})},"Bevestig de verwijdering van de Tweestapsverificatie applicatie?")}function account_manageOtp(e){2==xxdialogMode&&"otpauth-manage"==xxdialogTag&&dialogclose(0),xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||meshserver.send({action:"otpauth-getpasswords",subaction:e})}function account_showVerifyEmail(){xxdialogMode||1==userinfo.emailVerified||1!=serverinfo.emailcheck||setDialogMode(2,"email verificatie",3,account_showVerifyEmailEx,"Klik op OK om een verificatiebericht te sturen naar:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>Wacht enkele minuten om de verificatie te ontvangen.")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"Email Adres wijzigen",3,account_changeEmail,addHtmlValue("Email","<input id=dp3email style=width:170px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />")),null!=userinfo.email&&(Q("dp3email").value=userinfo.email),account_validateEmail(),Q("dp3email").focus())}function account_validateEmail(e,t){QE("idx_dlgOkButton",validateEmail(Q("dp3email").value)&&Q("dp3email").value!=userinfo.email),null!=e&&13==e.keyCode&&dialogclose(1)}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp3email").value})}function account_showDeleteAccount(){if(!xxdialogMode){var e="<form method=post><table style=margin-left:10px><input type=hidden name=action value=deleteaccount /><input type=hidden name=authcookie value="+authCookie+" /><tr>";e+="<td align=right>Wachtwoord:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr><tr><td align=right>Wachtwoord:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr></table><div style=padding:10px;margin-bottom:4px>",e+='<input id=account_dlgCancelButton type=button value="Afbreken" style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>',e+='<input id=account_dlgOkButton type=submit value="Oke" style="float:right;width:80px" onclick=dialogclose(1)>',setDialogMode(2,"Verwijder account",0,null,e+="</div><br /></form>"),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="<table style=margin-left:10px>";if(e+="<tr><td align=right>"+nobreak("Oud wachtwoord:")+"</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nieuw wachtwoord:")+"</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nieuw wachtwoord:")+"</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>",65536&features&&(e+="<tr><td align=right>wachtwoord hint:</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"),e+="</table>",passRequirements){var t=[],n=0;for(var o in passRequirements)"reset"!=o&&"hint"!=o&&(t.push(o+":"+passRequirements[o]),n++);0<n&&(e+="<br /><span style=font-size:x-small>"+format("Vereisten: {0}.",t.join(", "))+"</span>")}return setDialogMode(2,"Verander wachtwoord",3,account_showChangePasswordEx,e+="<br />"),Q("apassword0").focus(),account_validateNewPassword(),!1}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var e={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};65536&features&&(e.hint=Q("apasswordhint").value),meshserver.send(e)}}function account_createMesh(){if(!xxdialogMode)if(4294967295==userinfo.siteadmin||0==(64&userinfo.siteadmin))if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var e=addHtmlValue("Naam","<input id=dp3meshname style=width:170px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");e+=addHtmlValue("Typen","<div style=width:170px;margin:0;padding:0><select id=dp3meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>Software Agent Groep</option><option value=1>Intel&reg; AMT alleen</option></select></div>"),setDialogMode(2,"Apparaatgroep aanmaken",3,account_createMeshEx,e+=addHtmlValue("Omschrijving","<div style=width:170px;margin:0;padding:0><textarea id=dp3meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"Gebruikersaccount beveiliging",1,null,'Geen toegang tot een apparaat totdat tweefactorauthenticatie is ingeschakeld. Dit is vereist voor extra beveiliging. Ga naar de "Mijn account" en bekijk het gedeelte "Accountbeveiliging".');else setDialogMode(2,"Gebruikersaccount beveiliging",1,null,'Geen toegang tot een apparaat totdat een e-mailadres is geverifieerd. Dit is vereist voor wachtwoordherstel. Ga naar de "Mijn account" om een e-mailadres te wijzigen en te verifiëren.');else setDialogMode(2,"Nieuwe apparaatgroep",1,null,"Dit account heeft niet de rechten om een nieuwe apparaatgroep te maken.")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0<Q("dp3meshname").value.length)}function account_createMeshEx(e,t){meshserver.send({action:"createmesh",meshname:Q("dp3meshname").value,meshtype:Q("dp3meshtype").value,desc:Q("dp3meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value)}function account_validateNewPassword(){var e="",t=0<Q("apassword0").value.length&&0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value&&Q("apassword0").value!=Q("apassword1").value;if(65536&features&&Q("apasswordhint").value==Q("apassword1").value&&(t=!1),""!=Q("apassword1").value)if(null==passRequirements||""==passRequirements){var n=checkPasswordStrength(Q("apassword1").value);e=80<=n?"<span style=color:green>Strong<span>":60<=n?"<span style=color:blue>&#9679;<span>":"<span style=color:red>&#9679;<span>"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="<span style=color:red>Beleid<span>")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,n={},o=0,i={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var a=0;a<e.length;a++)n[e[a]]=(n[e[a]]||0)+1,t+=5/n[e[a]];for(var s in i)o+=1==i[s]?1:0;return parseInt(t+10*(o-1))}function checkPasswordRequirements(e,t){if(null==t||""==t||"object"!=typeof t)return!0;if(t.min&&e.length<t.min)return!1;if(t.max&&e.length>t.max)return!1;for(var n=0,o=0,i=0,a=0,s=0;s<e.length;s++)/\d/.test(e[s])&&n++,/[a-z]/.test(e[s])&&o++,/[A-Z]/.test(e[s])&&i++,/\W/.test(e[s])&&a++;return!(t.num&&n<t.num)&&(!(t.lower&&o<t.lower)&&(!(t.upper&&i<t.upper)&&!(t.nonalpha&&a<t.nonalpha)))}function updateMeshes(){var e="",t=0;for(i in meshes){t++;var n=meshes[i].links[userinfo._id].rights,o="Gedeeltelijke rechten";4294967295==n?o="Volledige beheerder":0==n&&(o="Geen rechten"),e+="<div style=cursor:pointer onclick=goForward('"+i+"')>",e+='<div style="float:left;margin-left:4px"><img src="/images/meshicon50.png" width=50 height=50 /></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+EscapeHtml(meshes[i].name)+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+o+"</div></div>",e+="</div></div>"}QH("p3meshes",e),QV("p3noMeshFound",0==t)}function gotoMesh(e){null==(currentMesh=meshes[e])&&goBack(),p20updateMesh(),go(20)}var sortorder,filetreelocation=[];function p5refreshFiles(){meshserver.send({action:"files"})}function updateFiles(){if(QV("MainMenuMyFiles",0==(8&features)),0==(8&features)){for(var e,t="",n="",o="<a style=cursor:pointer onclick=p5folderup(0)>Root</a>",i="Root",a=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),c=0;c<p.length;c++)p[c].checked&&d.push(p[c].value);for(var c in filetreelinkpath="",filetreelocation){if(null==a.f||null==a.f[filetreelocation[c]])break;if(l.push(filetreelocation[c]),i+=" / "+filetreelocation[c],1==s){var u=filetreelocation[c].split("/");e=window.location+u[0]+"files/"+u[2],filetreelinkpath+=filetreelocation[c]}else""!=filetreelinkpath&&(filetreelinkpath+="/"+filetreelocation[c],2<s&&(e+="/"+filetreelocation[c]));o+=" / <a style=cursor:pointer onclick=p5folderup("+s+")>"+(null!=(a=a.f[filetreelocation[c]]).n?a.n:filetreelocation[c])+"</a>",s++}filetreelocation=l;var m=i.toLowerCase().startsWith("root / "+userinfo._id+" / public"),g=p5sort_files(a.f);for(var c in g){var h,v=g[c],f=v.n;h=40<(h=f).length?EscapeHtml(f.substring(0,40))+"...":EscapeHtml(f),f=EscapeHtml(f);var k="";null!=v.s&&(k=getFileSizeStr(v.s));var b="";if(v.t<3||4==v.t){b="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+f+"'>&nbsp;<span style=float:right;padding-right:4px>"+(1==v.t||4==v.t?p5getQuotabar(v):"")+"</span><span><div class=fileIcon"+v.t+'></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(v.nx)+'")>'+h+"</a></span></div>"}else{var w=h,y="";m&&(y=" (<a style=cursor:pointer onclick='p5showPublicLink(\""+e+"/"+v.nx+"\")'>Link</a>)"),0<v.s&&(w='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+v.nx)+'">'+h+"</a>"+y),b="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+v.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+k+"</span><span><div class=fileIcon"+v.t+"></div>"+w+"</span></div>"}v.t<3?t+=b:n+=b}if(QH("p5rightOfButtons",p5getQuotabar(a)),QH("p5files",t+n),QH("p5currentpath",o),QE("p5FolderUp",0!=filetreelocation.length),QV("p5PublicShare",m),r==filetreelinkpath){p=document.getElementsByName("fc");for(c=0;c<p.length;c++)p[c].checked=0<=d.indexOf(p[c].value)}p5setActions()}}function getNiceSize(e){return e<=0?"Opslag overschrijden":e<2048?format("{0}b over",e):e<2097152?format("{0}k over",Math.round(e/1024)):e<2147483648?format("{0}m over",Math.round(e/1024/1024)):format("{0}g over",Math.round(e/1024/1024/1024))}function p5getQuotabar(e){for(;1<e.t&&4!=e.t;)e=e.parent;return 1!=e.t&&4!=e.t||null==e.maxbytes?"":getNiceSize(e.maxbytes-e.s)+" <progress style=height:10px;width:100px value="+e.s+" max="+e.maxbytes+" />"}function p5showPublicLink(e){setDialogMode(2,"Publieke link",1,null,'<input type=text style=width:100% value="'+e+'" readonly />')}function p5sort_filename(e,t){return e.ln>t.ln?1*sortorder:e.ln<t.ln?-1*sortorder:0}function p5sort_timestamp(e,t){return e.d>t.d?1*sortorder:e.d<t.d?-1*sortorder:0}function p5sort_bysize(e,t){return e.s==t.s?p5sort_filename(e,t):(e.s-t.s)*sortorder}function p5sort_files(e){var t=[],n=Q("p5sortdropdown").value;for(var o in e)e[o].nx=o,null==e[o].n&&(e[o].n=o),e[o].ln=e[o].n.toLowerCase(),t.push(e[o]);return sortorder=1,3<n&&(sortorder=-1,n-=3),1==n?t.sort(p5sort_filename):2==n?t.sort(p5sort_bysize):3==n&&t.sort(p5sort_timestamp),t}function p5setActions(){var e=getFileSelCount(),t=getFileCount(),n=getFileSelCount(!1);QE("p5DeleteFileButton",0<e&&0<filetreelocation.length),QE("p5NewFolderButton",0<filetreelocation.length),QE("p5UploadButton",0<filetreelocation.length),QE("p5RenameFileButton",1==e&&0<filetreelocation.length),QE("p5SelectAllButton",0<t),Q("p5SelectAllButton").value=0<e?"Geen":"alles",QE("p5CutButton",0<n&&e==n),QE("p5CopyButton",0<n&&e==n),QE("p5PasteButton",null!=p5clipboard&&0<p5clipboard.length&&0<filetreelocation.length)}function getFileSelCount(e){for(var t=0,n=document.getElementsByName("fc"),o=0;o<n.length;o++)!n[o].checked||0==e&&"3"!=n[o].attributes.file.value||t++;return t}function getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fc"),n=0;n<t.length;n++)t[n].checked&&"999"==t[n].attributes.file.value&&e++;return e}function getFileCount(){return document.getElementsByName("fc").length}function p5selectallfile(){for(var e=0==getFileSelCount(),t=document.getElementsByName("fc"),n=0;n<t.length;n++)t[n].checked=e;p5setActions()}function setupBackPointers(e){if(null!=e.f){var t=0,n=0;for(var o in e.f)setupBackPointers(e.f[o]),(e.f[o].parent=e).f[o].s&&(t+=e.f[o].s),e.f[o].c&&(n+=e.f[o].c),3==e.f[o].t&&n++;e.s=t,e.c=n}return e}function getFileSizeStr(e){return 1==e?"1 byte":format("{0} bytes",e)}function p5folderup(e){if(null==e)filetreelocation.pop();else for(;filetreelocation.length>e;)filetreelocation.pop();return updateFiles(),!1}function p5folderset(e){return filetreelocation.push(decodeURIComponent(e)),updateFiles(),!1}function p5createfolder(){setDialogMode(2,"Nieuwe map",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />"),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var e=getFileSelCount(),t=0<getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p5recdeleteinput>Recursieve verwijdering</label><br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"Verwijderen",3,p5deletefileEx,1<e?format("Verwijder {0} gelecteerde items?",e)+t:"Verwijder geselecteerde item?"+t)}function p5deletefileEx(){for(var e=[],t=document.getElementsByName("fc"),n=0;n<t.length;n++)t[n].checked&&e.push(t[n].value);meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:e,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){for(var e,t=document.getElementsByName("fc"),n=0;n<t.length;n++)t[n].checked&&(e=t[n].value);setDialogMode(2,"Hernoemen",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:e}),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5renamefileEx(e,t){t.newname=Q("p5renameinput").value,meshserver.send(t)}function p5fileNameCheck(e){var t=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",t),1==t&&e&&13==e.keyCode&&dialogclose(1)}var isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,n=/^\./,o=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!n.test(e)&&!o.test(e)&&"."!=e[0]}}();function p5uploadFile(){setDialogMode(2,"Upload bestand",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=hidden name=authCookie value='+authCookie+" /><input type=submit id=p5loginSubmit style=display:none /></form>"),updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(e){var t=document.getElementsByName("fc");p5clipboard=[],p5clipboardCut=e,p5clipboardFolder=Clone(filetreelocation);for(var n=0;n<t.length;n++)t[n].checked&&"3"==t[n].attributes.file.value&&p5clipboard.push(t[n].value);p5updateClipview()}function p5pasteFile(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Bevestig {0} van {1} vermelding {2} voor deze locatie?",0==p5clipboardCut?"copy":"move",p5clipboard.length,1<p5clipboard.length?"s":"")),setDialogMode(2,"Plakken",3,p5pasteFileEx,e)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:0==p5clipboardCut?"copy":"move",scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard}),p5folderup(999),1==p5clipboardCut&&(p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview())}function p5updateClipview(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Houd {0} item {1} vast voor {2}",p5clipboard.length,1<p5clipboard.length?"s":"",0==p5clipboardCut?"kopie":"verplaatsen")+', <a href=# onclick="return p5clearClip()" style=cursor:pointer>Wissen</a>.'),QH("p5bottomstatus",e),p5setActions()}function p5clearClip(){return p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview(),!1}function p5fileDragDrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer&&0!=e.dataTransfer.files.length&&0!=filetreelocation.length)for(var t=[],n=[],o=[],i=[],a=e.dataTransfer.files.length,s=0;s<e.dataTransfer.files.length;s++){var l=new FileReader,r=e.dataTransfer.files[s];t.push(r.name),n.push(r.size),o.push(r.type),l.onload=function(e){i.push(e.target.result),0==--a&&(Q("p5fileDragName").value=t.join("*"),Q("p5fileDragSize").value=n.join("*"),Q("p5fileDragType").value=o.join("*"),Q("p5fileDragData").value=i.join("*"),Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath),Q("p5loginSubmit2").click())},l.readAsDataURL(r)}}var p5dragtimer=null;function p5fileDragOver(e){haltEvent(e),null!=p5dragtimer&&(clearTimeout(p5dragtimer),p5dragtimer=null);var t=!0;0==filetreelocation.length&&(t=!1),QV("bigok",t),QV("bigfail",!t)}function p5fileDragLeave(e){haltEvent(e),"p5filetable"!=e.target.id?(QV("bigfail",!1),QV("bigok",!1)):p5dragtimer=setTimeout("QV('bigfail',false);QV('bigok',false);p5dragtimer=null;",200)}function ondeskkeypress(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeys(e)}}function ondeskkeydown(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyDown(e)}}function ondeskkeyup(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyUp(e)}}var updateDevicesTimer=null;function updateDevices(){null==updateDevicesTimer&&(updateDevicesTimer=setTimeout(updateDevicesEx,200))}var deviceHeaderCount,sort=0,deviceHeaderId=0,deviceHeaders={},showRealNames=!1,deviceHeaderTotal=0,deviceHeadersTitles=(deviceHeaders={},{});function updateDevicesEx(){null!=updateDevicesTimer&&(clearTimeout(updateDevicesTimer),updateDevicesTimer=null);var e="",t=0,n=null,o=0,i={};for(var a in deviceHeaderCount={},deviceHeaders={},deviceHeadersTitles={},(deviceHeaderTotal=deviceHeaderId=0)==sort?nodes.sort(meshSort):1==sort?nodes.sort(powerSort):2==sort&&(1==showRealNames?nodes.sort(deviceHostSort):nodes.sort(deviceSort)),nodes)if(0!=nodes[a].v){var s=meshes[nodes[a].meshid].links[userinfo._id];if(null!=s){s.rights;if(0==sort){if(nodes.sort(meshSort),nodes[a].meshid!=n){deviceHeaderSet();var l="";1==meshes[nodes[a].meshid].mtype&&(l="<span style=color:lightgray>, Intel&reg; AMT alleen</span>"),null!=n&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=padding-top:4px><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+nodes[a].meshid+'")>'+EscapeHtml(meshes[nodes[a].meshid].name)+"</span>"+l+"<span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",i[n=nodes[a].meshid]=1,t=0}}else 1==sort?nodes[a].pwr!==n&&(deviceHeaderSet(),null!==n&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[a].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",n=nodes[a].pwr,t=0):2==sort&&null==n&&(n="1");o++;var r=EscapeHtml(nodes[a].name);0==r.length&&(r="<i>Geen</i>"),null!=nodes[a].rname&&0<nodes[a].rname.length&&(r+=" / "+EscapeHtml(nodes[a].rname));var d=EscapeHtml(nodes[a].name);1==showRealNames&&null!=nodes[a].rname&&(d=EscapeHtml(nodes[a].rname)),0==d.length&&(d="<i>Geen</i>");var p=nodes[a].icon,c=NodeStateStr(nodes[a]);nodes[a].conn&&0!=nodes[a].conn||(p+=" gray"),e+="<div style=cursor:pointer onclick=goForward('"+nodes[a]._id+"')>",e+='<div class="i'+p+'" style="float:left;margin-left:4px"></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+d+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+c+"</div></div>",e+="</div></div>",deviceHeaderTotal++,void 0===deviceHeaderCount[nodes[a].state]?deviceHeaderCount[nodes[a].state]=1:deviceHeaderCount[nodes[a].state]++}}if(0==sort)for(var a in meshes){var u=meshes[a],m=u.links[userinfo._id];if(null!=m){m.rights;null==i[u._id]&&(""!=n&&""!=e&&(e+="</tr></table>"),e+="<div><div colspan=3 class=DevSt><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+u._id+'")>'+EscapeHtml(u.name)+"</span></div>",1==u.mtype&&(e+="<div style=padding:10px><i>Geen Intel&reg; AMT-apparaten in deze groep"),2==u.mtype&&(e+="<div style=padding:10px><i>Geen apparaten in deze groep"),e+=".</i></div></div>",n=u._id,o++)}}for(var a in 0==o?QH("xdevices",'<div style="margin-top:50px;text-align:center"><span style="font-size:30px">Geen apparaten</span><br /><br />Gebruik de desktopversie van deze website om apparaten toe te voegen.</div>'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(a,deviceHeaders[a]);for(var a in deviceHeadersTitles)Q(a).title=deviceHeadersTitles[a]}var powerStatetable=["","ingeschakeld","Slaap","Slaap","Slaap","Slaapstand","Uitzetten","Aanwezig"],powerStateStrings=["","ingeschakeld","Slapen","Slapen","Slaapstand","Slaapstand","softwarematig uit","Aanwezig"],powerStateStrings2=["","Apparaat is ingeschakeld","Apparaat bevindt zich in slaapstand (S1)","Apparaat bevindt zich in slaapstand (S2)","Apparaat bevindt zich in diepe slaapstand (S3)","Apparaat is in slaapstand (S4)","Apparaat is uitgeschakeld (S5)","Apparaat is aanwezig, maar de stroomstatus kan niet worden bepaald"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0<e.state&&e.state<powerStatetable.length&&state.push(powerStatetable[e.state]),e.conn&&(0!=(1&e.conn)&&t.push("<span>Agent</span>"),0!=(2&e.conn)?t.push("<span>CIRA</span>"):0!=(4&e.conn)&&t.push("<span>Intel&reg; AMT</span>"),0!=(8&e.conn)&&t.push("<span>Relay</span>"),0!=(16&e.conn)&&t.push("<span>MQTT</span>")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return e<powerStatetable.length?powerStatetable[e]:""}function PowerStateStr2(e){return 0!=e&&e<powerStatetable.length?powerStatetable[e]:"Onbekend"}function onSortSelectChange(e){sort=document.getElementById("sortselect").selectedIndex,e||putstore("sort",sort),updateDevicesEx()}function deviceHeaderSet(){if(0!=deviceHeaderId){deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+(1==deviceHeaderTotal?" apparaat":" apparaten");var e="";for(var t in deviceHeaderCount)0<e.length&&(e+=", "),e+=deviceHeaderCount[t]+" "+PowerStateStr2(t);deviceHeadersTitles["DevxHeader"+deviceHeaderId]=e,deviceHeaderId++,deviceHeaderCount={},deviceHeaderTotal=0}else deviceHeaderId=1}function meshSort(e,t){return e.meshnamel>t.meshnamel?1:e.meshnamel<t.meshnamel?-1:e.meshid==t.meshid?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:0}function powerSort(e,t){var n=e.pwr?e.pwr:0,o=t.pwr?t.pwr:0;return n==o?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:o<n?1:n<o?-1:0}function deviceSort(e,t){return e.namel>t.namel?1:e.namel<t.namel?-1:0}function deviceHostSort(e,t){return e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0}function refreshDevice(e){currentNode&&currentNode._id==e&&gotoDevice(e,xxcurrentView,!0)}function getNodeRights(e){var t=getNodeFromId(e);return meshes[t.meshid].links[userinfo._id].rights}var currentNode,currentDevicePanel=0,powerTimelineNode=null,powerTimelineReq=null,powerTimelineUpdate=null,powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(e,t,n){if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var o=getNodeFromId(e);if(null!=o){var i=meshes[o.meshid];if(null!=i){var a=i.links[userinfo._id].rights;if(!currentNode||currentNode._id!=o._id||1==n){currentNode=o;var s=EscapeHtml(o.name);0==s.length&&(s="<i>Geen</i>"),0!=(4&a)&&(s="<span onclick=showEditNodeValueDialog(0) style=cursor:pointer>"+s+"</span>"),QH("p10deviceName",s);var l="<table style=width:100%>";l+=addDeviceAttribute("<span>Groep</span>",'<a onclick=goForward("'+o.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[o.meshid].name)+"</a>"),null!=o.rname&&(l+=addDeviceAttribute("<span>Naam</span>","<span>"+EscapeHtml(o.rname)+"</span>")),1!=i.mtype&&o.name==o.host||(0!=(4&a)?o.host?l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(o.host)+"</span>"):l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>Geen</i></span>"):l+=addDeviceAttribute("Hostname",EscapeHtml(o.host)));var r=o.desc?EscapeHtml(o.desc):"<i>Geen</i>";l+=addDeviceAttribute("Omschrijving",0!=(4&a)?"<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+r+"</span>":r);var d=["Onbekend","Windows 32bit console","Windows 64bit console","Windows 32bit service","Windows 64bit service","Linux 32bit","Linux 64bit","MIPS","XENx86","Android ARM","Linux ARM","MacOS 32bit","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32bit","MacOS 64bit","ChromeOS","Linux Poky x86-64bit","Linux NoKVM x86-32bit","Linux NoKVM x86-64bit","Windows MinCore console","Windows MinCore service","NodeJS","ARM-Linaro","ARMv6l / ARMv7l","ARMv8 64bit","ARMv6l / ARMv7l / NoKVM","Onbekend","Onbekend","FreeBSD x86-64"];if(null!=o.agent&&null!=o.agent.id&&null!=o.agent.ver){var p="";p=o.agent.id<=d.length?d[o.agent.id]:d[0],0!=o.agent.ver&&(p+=" v"+o.agent.ver),l+=addDeviceAttribute("Agent",p)}if(null!=o.intelamt){p="";var c={0:nobreak("Niet geactiveerd (Pre)"),1:nobreak("Niet geactiveerd (In)"),2:nobreak("Geactiveerd")};null!=o.intelamt.ver&&null==o.intelamt.state?p+="<i>"+nobreak("Onbekende staat")+"</i>, v"+o.intelamt.ver:null==o.intelamt.ver&&2==o.intelamt.state?p+="<i>Geactiveerd</i>":null==o.intelamt.ver||null==o.intelamt.state?p+="<i>Onbekende versie en staat</i>":(p+=c[o.intelamt.state],o.intelamt.flags&&(2&o.intelamt.flags?p=" <span>CCM</span>":4&o.intelamt.flags&&(p=" <span>ACM</span>")),p+=", v"+o.intelamt.ver),1==o.intelamt.tls&&(p+=", <span>TLS</span>"),2==o.intelamt.state&&(null!=o.intelamt.user&&""!=o.intelamt.user||(p+=0!=(4&a)?', <i style=color:#FF0000;cursor:pointer onclick=editDeviceAmtSettings("'+o._id+'")>'+nobreak("Geen referenties")+"</i>":", <i style=color:#FF0000>Geen referenties</i>"),p+=" ",0!=(4&a)&&(p+='<img src=images/link4.png height=10 width=10 style=cursor:pointer onclick=editDeviceAmtSettings("'+o._id+'")>'));var u="Intel&reg; ME";"number"==typeof o.intelamt.sku&&(0!=(8&o.intelamt.sku)?u="Intel&reg; AMT":0!=(16&o.intelamt.sku)&&(u="Intel&reg; SM")),l+=addDeviceAttribute(u,p)}if(null!=o.agent&&null!=o.agent.tag&&"mailto:"!=o.agent.tag){var m=EscapeHtml(o.agent.tag);m.startsWith("mailto:")&&(m='<a href="'+m+'">'+m.substring(7)+"</a>"),l+=addDeviceAttribute("Agent Tag",m)}var g=o.conn;if(g&&1<g){var h=[];0!=(1&o.conn)&&h.push("<span>Agent</span>"),0!=(2&o.conn)?h.push("<span>Intel&reg; AMT CIRA</span>"):0!=(4&o.conn)&&h.push("<span>Intel&reg; AMT</span>"),0!=(8&o.conn)&&h.push("<span>Agent Relay</span>"),0!=(16&o.conn)&&h.push("<span>MQTT</span>"),l+=addDeviceAttribute("connectiviteit",h.join(", "))}var v="<i>Geen</i>";if(null!=o.tags)for(var f in v="",o.tags)v+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+o.tags[f]+"</span>";l+=addDeviceAttribute("Tags",0!=(4&a)?"<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+v+"</span>":v),l+="</table><br />",0!=(76&a)&&(l+="<input type=button value=Actions onclick=deviceActionFunction() />"),QH("p10html",l),setupFiles(),l="<div style=float:right;font-size:x-small;margin-right:10px>",0!=(4&a)&&(l+='<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+o._id+'")>Verwijder apparaat</a>'),l+="</div><div style=font-size:x-small>",l+="</div><br>",QH("p10html3",l);var k=PowerStateStr(o.state);0!=(1&g)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Mesh Agent</span>"),0!=(2&g)?(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel® AMT verbonden</span>"):0!=(4&g)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT gedetecteerd</span>"),0!=(16&g)&&(0<k.length&&(k+="<br/>"),k+="<span style=font-size:12px>MQTT-kanaal verbonden</span>"),QH("MainComputerState",k),QH("MainComputerImage",'<div class="i'+o.icon+'"></div>'),powerTimelineNode!=currentNode._id&&powerTimelineReq!=currentNode._id&&(QH("p10html2",""),powerTimelineReq=currentNode._id,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}setupDesktop(),go(t=t||10),setupDeviceMenu()}else goBack()}else goBack()}else setDialogMode(2,"Gebruikersaccount beveiliging",1,null,'Geen toegang tot een apparaat totdat tweefactorauthenticatie is ingeschakeld. Dit is vereist voor extra beveiliging. Ga naar de "Mijn account" en bekijk het gedeelte "Accountbeveiliging".');else setDialogMode(2,"Gebruikersaccount beveiliging",1,null,'Geen toegang tot een apparaat totdat een e-mailadres is geverifieerd. Dit is vereist voor wachtwoordherstel. Ga naar de "Mijn account" om een e-mailadres te wijzigen en te verifiëren.')}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"undefined",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var n=0;currentNode&&(n=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var o=[];0!=currentDevicePanel&&o.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&n||256&n)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8&currentNode.intelamt.sku))||currentNode.agent&&1&currentNode.agent.caps)&&o.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&n&&(4294967295==n||0==(1024&n))&&2==currentNode.mtype&&4&currentNode.agent.caps&&o.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(o)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="Selecteer een bewerking die u op dit apparaat wilt uitvoeren.<br /><br />",n="<select id=d2deviceop style=float:right;width:170px>";0!=(64&e)&&(n+="<option value=100>Wakker worden</option>"),0!=(8&e)&&(n+="<option value=4>Slaap</option><option value=3>Reset</option><option value=2>Uitzetten</option>"),setDialogMode(2,"Apparaatactie",3,deviceActionFunctionEx,t+=addHtmlValue("Operatie",n+="</select>"))}}function deviceActionFunctionEx(){var e=Q("d2deviceop").value;100==e?meshserver.send({action:"wakedevices",nodeids:[currentNode._id]}):meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:e})}function updateDeviceTimeline(){2==meshserver.State&&null!=powerTimelineNode&&null!=powerTimelineUpdate&&null!=currentNode&&powerTimelineNode==powerTimelineReq&&currentNode._id==powerTimelineNode&&powerTimelineUpdate<Date.now()&&(powerTimelineUpdate=null,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}function drawDeviceTimeline(){var e=null,t=Date.now();currentNode._id==powerTimelineNode&&(e=powerTimeline);var n=new Date;n.setHours(0,0,0,0);(n=new Date(n.getTime()-5184e5)).getTime();var o=[];if(null!=e&&1<e.length){o.push([0,e[1],e[0]]);for(var i=e[1],a=2;a<e.length;a+=2){var s=e[a],l=t;e.length>a+1&&(l=e[a+1]),o.push([i,i+l,s]),i+=l}}var r="",d=1,p=new Date,c=Q("masthead").offsetWidth-122;p.setHours(0,0,0,0);for(a=0;a<7;a++){var u="",m=p.getTime(),g=m+864e5;for(var h in o){var v=o[h];if(1==isTimeBlockInside(m,g,v[0],v[1])){var f=Math.max(m,v[0]),k=Math.min(Math.min(g,v[1]),t),b=Math.round((k-f)*c/864e5);0<b&&(u+="<div style=display:table-cell;width:"+b+"px;background-color:"+powerColor(v[2])+";height:16px></div>")}}r+="<tr style="+(d%2==0?"background-color:#DDD":"")+"><td><div>&nbsp;"+printDate(p)+"<div></div></div></td><td><div>"+u+"</div></td></tr>",++d,p=new Date(p.getTime()-864e5)}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse;width:calc(100% - 18px);margin:9px" border=0 cellpadding=2 cellspacing=0><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:90px>Day</th><th scope=col style=text-align:center>Power State</th></tr>'+r+"</tbody></table>")}function powerColor(e){return e<powerColorTable.length?powerColorTable[e]:"yellow"}function isTimeBlockInside(e,t,n,o){return n<e&&t<o||(e<n&&n<t||e<o&&o<t)}function addDeviceAttribute(e,t){return"<tr><td style=width:100px;color:gray>"+e+"</td><td style=overflow:hidden>"+t+"</td></tr>"}function editDeviceAmtSettings(e,t){if(!xxdialogMode){var n="",o=getNodeFromId(e),i=3;0!=(4&getNodeRights(e))&&(n+=addHtmlValue("Gebruikersnaam",'<input id=dp10username style=width:170px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />'),n+=addHtmlValue("wachtwoord","<input id=dp10password type=password style=width:170px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />"),n+=addHtmlValue("Veiligheid","<select id=dp10tls style=width:176px><option value=0>Geen TLS beveiliging</option><option value=1>TLS beveiliging vereist</option></select>"),null!=o.intelamt.user&&""!=o.intelamt.user&&(i=7),setDialogMode(2,"Bewerk Intel® AMT-gegevens",i,editDeviceAmtSettingsEx,n,{node:o,func:t}),null!=o.intelamt.user&&""!=o.intelamt.user?Q("dp10username").value=o.intelamt.user:Q("dp10username").value="admin",Q("dp10tls").value=o.intelamt.tls,validateDeviceAmtSettings())}}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(e,t){if(2==e)meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:"",pass:""}});else{var n=Q("dp10username").value;""==n&&(n="admin");var o=Q("dp10password").value;""==o&&(n=""),meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:n,pass:o,tls:Q("dp10tls").value}}),t.node.intelamt.user=n,t.node.intelamt.tls=Q("dp10tls").value,t.func&&setTimeout(t.func,300)}}function p10showDeleteNodeDialog(e){xxdialogMode||(setDialogMode(2,"Verwijder apparaat",3,p10showDeleteNodeDialogEx,format("Verwijder {0}?",EscapeHtml(currentNode.name))+"<br /><br /><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />Bevestig",e),p10validateDeleteNodeDialog())}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(e,t){meshserver.send({action:"removedevices",nodeids:[t]})}function p10showiconselector(){if(!xxdialogMode&&0!=(4&meshes[currentNode.meshid].links[userinfo._id].rights)){"<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>","<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>","<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br>","<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>","<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>","<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>",setDialogMode(2,"Pictogram selectie",0,null,"<table align=center><td><div style=display:inline-block class=i1 onclick=p10setIcon(1)></div><div style=display:inline-block class=i2 onclick=p10setIcon(2)></div><div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br><div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><div style=display:inline-block class=i5 onclick=p10setIcon(5)></div><div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>"),QV("id_dialogclose",!0)}}function p10setIcon(e){setDialogMode(0),meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:e})}var desktop,desktopNode,showEditNodeValueDialog_modes=["Apparaat naam","Hostname","Omschrijving","Tags"],showEditNodeValueDialog_modes2=["name","host","desc","tags"],showEditNodeValueDialog_modes3=["","","","Groep1, Groep2, Groep3"];function showEditNodeValueDialog(e){if(!xxdialogMode){setDialogMode(2,"Bewerk apparaat",3,showEditNodeValueDialogEx,addHtmlValue(showEditNodeValueDialog_modes[e],'<input id=dp10devicevalue style=width:170px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[e]+'" onchange=p10editdevicevalueValidate('+e+",event) onkeyup=p10editdevicevalueValidate("+e+",event) />"),e);var t=currentNode[showEditNodeValueDialog_modes2[e]];null==t&&(t=""),Array.isArray(t)&&(t=t.join(", ")),Q("dp10devicevalue").value=t,p10editdevicevalueValidate(),Q("dp10devicevalue").focus()}}function showEditNodeValueDialogEx(e,t){var n={action:"changedevice",nodeid:currentNode._id};n[showEditNodeValueDialog_modes2[t]]=Q("dp10devicevalue").value,meshserver.send(n)}function p10editdevicevalueValidate(e,t){var n=1<e||0<Q("dp10devicevalue").value.length;QE("idx_dlgOkButton",n),null!=t&&1==n&&13==t.keyCode&&dialogclose(1)}var desktopsettings={encoding:2,showfocus:!1,showmouse:!0,showcad:!0,quality:40,scaling:1024,framerate:50};function setupDesktop(){desktopNode!=currentNode&&null!=desktop&&(desktop.Stop(),desktop=desktopNode=null),desktopNode==currentNode&&null!=desktop||(QH("DeskParent",'<canvas id=Desk width=640 height=200 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>'),desktopNode=currentNode,Q("Desk").addEventListener("DOMMouseScroll",function(e){return dmousewheel(e)}),Q("Desk").addEventListener("mousewheel",function(e){return dmousewheel(e)})),desktopNode=currentNode,updateDesktopButtons(),Q("Desk").toBlob||QV("deskSaveBtn",!1)}function updateDesktopButtons(){var e=meshes[currentNode.meshid],t=0;null!=desktop&&(t=desktop.State);var n=e.links[userinfo._id].rights;QV("disconnectbutton1",0!=t),QV("connectbutton1",0==t&&2==e.mtype&&(8&n||256&n)),QV("connectbutton1h",0==t&&8&n&&(1==e.mtype||null!=currentNode.intelamt&&2==currentNode.intelamt.state&&null!=currentNode.intelamt.ver&&"number"==typeof currentNode.intelamt.sku&&0!=(8&currentNode.intelamt.sku))),QV("d7amtkvm",!(null==currentNode.intelamt||null==currentNode.intelamt.ver&&1!=e.mtype||0!=t&&2!=desktop.contype)),QV("d7meshkvm",2==e.mtype&&(0==t||1==desktop.contype));var o=0!=(1&currentNode.conn);QE("connectbutton1",o);var i=0!=(6&currentNode.conn);QE("connectbutton1h",i),QV("DeskToastButton",0!=(16384&n)&&currentNode.agent&&currentNode.agent.id<5&&8&n),QV("deskActionsBtn",8&n),Q("DeskControl").checked=0!=(8&n),0==o&&QV("DeskTools",!1)}function connectDesktop(e,t){if(setSessionActivity(),null==desktop)if(desktopNode=currentNode,2==t){if(null==desktopNode.intelamt.user||""==desktopNode.intelamt.user)return void editDeviceAmtSettings(desktopNode._id,connectDesktop);(desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie)).debugmode=debugmode,desktop.onStateChanged=onDesktopStateChange,desktop.m.bpp=1==desktopsettings.encoding||3==desktopsettings.encoding?1:2,desktop.m.useZRLE=desktopsettings.encoding<3,desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id,16994,"*","*",0),desktop.contype=2}else(desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).debugmode=debugmode,desktop.m.debugmode=debugmode,desktop.attemptWebRTC=attemptWebRTC,desktop.onStateChanged=onDesktopStateChange,desktop.m.CompressionLevel=desktopsettings.quality,desktop.m.ScalingLevel=desktopsettings.scaling,desktop.m.FrameRateTimer=desktopsettings.framerate,desktop.m.onDisplayinfo=deskDisplayInfo,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id),desktop.contype=1;else desktop.Stop(),desktopNode=desktop=null}function onDesktopStateChange(e,t){var n=t;3==n&&2==e.contype&&n++;var o=StatusStrs[n];switch(null!=desktop&&1==desktop.webRtcActive&&(o+=", WebRTC"),QH("deskstatus",o),t){case 0:desktop.Stop(),desktopNode=desktop=null,QV("termdisplays",!1),1==fullscreen&&deskToggleFull()}updateDesktopButtons(),deskAdjust(),setTimeout(deskAdjust,50)}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),updateDesktopButtons(),setDialogMode(7,"Instellingen extern bureaublad",3,showDesktopSettingsChanged))}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value,desktopsettings.showfocus=d7showfocus.checked,desktopsettings.showmouse=d7showcursor.checked,desktopsettings.quality=d7bitmapquality.value,desktopsettings.scaling=d7bitmapscaling.value,desktopsettings.framerate=d7framelimiter.value,localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings)),applyDesktopSettings(),desktop&&(1==desktop.contype&&0!=desktop.State&&desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate),2==desktop.contype&&0!=desktop.State&&(desktop.Stop(),setTimeout(function(){connectDesktop(null,2)},50)))}function applyDesktopSettings(){var e="",t=512&features?[90,70,50,40,30,20,10,5,1]:[50,40,30,20,10,5,1];for(var n in t)e+="<option value="+t[n]+">"+t[n]+"%</option>";QH("d7bitmapquality",e),d7desktopmode.value=desktopsettings.encoding,d7showfocus.checked=desktopsettings.showfocus,d7showcursor.checked=desktopsettings.showmouse,d7bitmapquality.value=40,0<=t.indexOf(parseInt(desktopsettings.quality))&&(d7bitmapquality.value=desktopsettings.quality),d7bitmapscaling.value=desktopsettings.scaling,desktopsettings.framerate&&(d7framelimiter.value=desktopsettings.framerate)}var fullscreen=!1;function deskAdjust(){var e=(Q("DeskParent").clientHeight-Q("Desk").clientHeight)/2;if(e<0){var t=Q("DeskParent").clientHeight,n=9999;desktop&&(n=desktop.m.width/desktop.m.height*t),QS("Desk")["max-height"]=t+"px",QS("Desk")["max-width"]=n+"px",e=0}else QS("Desk")["max-height"]=null,QS("Desk")["max-width"]=null;QS("Desk")["margin-top"]=e+"px",QS("Desk")["margin-bottom"]=e+"px"}function deskSendKeys(){if(!xxdialogMode&&null!=desktop&&3==desktop.State){var e=Q("deskkeys").value;0==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]]):1==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]]):2==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]]):desktop.sendCtrlMsg('{"action":"lock"}'):3==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]]):4==e?2==desktop.contype?desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]]):5==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]]):6==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]]):7==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65473,1],[65473,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,115],[desktop.m.KeyAction.UP,115],[desktop.m.KeyAction.EXUP,18]]):8==e?2==desktop.contype?desktop.m.sendkey([[65507,1],[119,1],[119,0],[65507,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,17],[desktop.m.KeyAction.DOWN,87],[desktop.m.KeyAction.UP,87],[desktop.m.KeyAction.EXUP,17]]):9==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65289,1],[65289,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9],[desktop.m.KeyAction.EXUP,18]]):10==e?desktop.m.sendcad():11==e&&(2==desktop.contype?desktop.m.sendkey([[65289,1],[65289,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9]]))}}function sendSpecialKeys(){xxdialogMode||null==desktop||3!=desktop.State||setDialogMode(3,"Speciale toetsen",3,deskSendKeys)}function toggleSoftKeys(e){QV("DeskSoftInput",1==e),1==e&&Q("DeskSoftInput").focus()}function toggleDeskTools(){setSessionActivity(),xxdialogMode||("none"==QS("DeskTools").display?(QV("DeskTools",!0),Q("DeskTools").nodeid=currentNode._id,refreshDeskTools()):QV("DeskTools",!1))}function refreshDeskTools(){setSessionActivity(),QV("DeskToolsRefreshButton",!1),setTimeout(refreshDeskToolsEx,500),meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",!0)}var filesNode,deskTools={sort:1,msg:null};function sortProcess(e){deskTools.sort=e,showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(e,t){return e.p>t.p?1:e.p<t.p?-1:0}function sortProcessName(e,t){return e.d>t.d?1:e.d<t.d?-1:0}function showDeskToolsProcesses(e){if(null!=(deskTools.msg=e)){if(Q("DeskTools").nodeid==e.nodeid){var t=[],n=null;try{n=JSON.parse(e.value)}catch(e){}if(console.log(n),null!=n){for(var o in n)t.push({p:parseInt(o),c:n[o].cmd,d:n[o].cmd.toLowerCase(),u:n[o].user});0==deskTools.sort?t.sort(sortProcessPid):1==deskTools.sort&&t.sort(sortProcessName);var i="";for(var a in t)0!=t[a].p&&(i+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+t[a].p+"</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess("+t[a].p+',"'+t[a].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(t[a].u?t[a].u:"")+"</div><div>"+t[a].c+"</div></div>");QH("DeskToolsProcesses",i)}}}else QH("DeskToolsProcesses","")}function deskSaveImage(){if(setSessionActivity(),!xxdialogMode&&null!=desktop&&3==desktop.State){var e=new Date,t="Desktop-"+currentNode.name+"-"+e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)+"-"+("0"+e.getHours()).slice(-2)+"-"+("0"+e.getMinutes()).slice(-2);Q("Desk").toBlob(function(e){saveAs(e,t+".jpg")})}}function deskDisplayInfo(e,t,n,o){var i=Q("termdisplays").value;if(0<t.length){var a="";for(var s in t)a+="<option"+(i==t[s]?" selected":"")+">"+t[s]+"</option>";QH("termdisplays",a)}QV("termdisplays",0<t.length)}function deskGetDisplayNumbers(e){desktop.m.GetDisplayNumbers()}function deskSetDisplay(e){setSessionActivity();var t=0,n=Q("termdisplays").value;t="alle schermen"==n?65535:parseInt(n.substring(8)),desktop.m.SetDisplay(t)}function dmousedown(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousedown(e)}function dmouseup(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mouseup(e)}function dmousemove(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousemove(e)}function dmousewheel(e){return setSessionActivity(),!(xxdialogMode||null==desktop||!desktop.m.mousewheel)&&(desktop.m.mousewheel(e),haltEvent(e),!0)}function drotate(e){xxdialogMode||null==desktop||(desktop.m.setRotation(desktop.m.rotation+e),deskAdjust(),deskAdjust())}function stopProcess(e,t){return setDialogMode(2,"Proces controle",3,stopProcessEx,format('Stop process #{0} "{1}"?',e,t),e),!1}function stopProcessEx(e,t){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:t}),setTimeout(refreshDeskTools,300)}function setupFiles(){var e=filesNode==currentNode,t=0!=(1&(filesNode=currentNode).conn);QE("p13Connect",t),0!=e&&0!=t||!files||(files.Stop(),files=null)}function onFilesStateChange(e,t){setSessionActivity(),p13Connect.value=0==t?"Verbinden":"Verbreken";var n=StatusStrs[t];switch(1==files.webRtcActive&&(n+=", WebRTC"),Q("p13Status").textContent=n,t){case 0:QH("p13files",""),p13filetree=null,p13filetreelocation=[],QH("p13currentpath",""),QE("p13FolderUp",!1),p13setActions(),null!=files&&(files.Stop(),files=null);break;case 3:p13targetpath="",files.sendText({action:"ls",reqid:1,path:""})}}function CreateRemoteFiles(e){var t={protocol:5};return t.onFileUpdate=e,t.xxStateChange=function(e){},t.ProcessData=function(e){t.onFileUpdate(e)},t}var autoConnectFilesTimer=null;function autoConnectFiles(e){autoConnectFilesTimer=null==autoConnectFilesTimer?setInterval(connectFiles,100):(clearInterval(autoConnectFilesTimer),null)}function connectFiles(e){files?(files.Stop(),files=null):((files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).attemptWebRTC=attemptWebRTC,files.onStateChanged=onFilesStateChange,files.Start(filesNode._id)),p13clipboard=p13clipboardFolder=null,p13clipboardCut=0,p13updateClipview()}var p13sortorder,p13filetree=null,p13targetpath=null,p13filetreelocation=[];function p13gotFiles(e){if(setSessionActivity(),0<e.length&&123!=e.charCodeAt(0))p13gotDownloadBinaryData(e);else if("download"!=(e=JSON.parse(decode_utf8(e))).action)if(e.path=e.path.replace(/\//g,"\\"),null!=p13filetree&&e.path==p13filetree.path){var t=p13getCheckedNames();p13filetree=e,p13updateFiles(t)}else{for(var n=e.path.replace(/\//g,"\\"),o=p13targetpath.replace(/\//g,"\\");0<n.length&&"\\"==n[0];)n=n.substring(1);for(;0<o.length&&"\\"==o[0];)o=o.substring(1);(n==o||"\\"==e.path&&""==p13targetpath)&&(p13filetree=e,p13updateFiles())}else p13gotDownloadCommand(e)}function p13getCheckedNames(){for(var e=[],t=document.getElementsByName("fd"),n=0;n<t.length;n++)t[n].checked&&e.push(p13filetree.dir[t[n].value].n);return e}function p13updateFiles(e){var t="",n="",o="<a style=cursor:pointer onclick=p13folderup(0)>Root</a>",i=p13filetree.path.split("\\");for(var a in p13filetreelocation=[],i)""!=i[a]&&p13filetreelocation.push(i[a]);for(var a in p13filetreelocation)o+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(a)+1)+")>"+p13filetreelocation[a]+"</a>";var s=p13filetreelocation.join("/"),l=p13sort_files(p13filetree.dir);for(var a in l){var r,d=l[a],p=d.n;r=70<(r=p).length?EscapeHtml(p.substring(0,70))+"...":EscapeHtml(p),p=EscapeHtml(p);var c="";null!=d.s&&(c=getFileSizeStr(d.s));var u="";if(d.t<3){u="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right></span><span><div class=fileIcon"+d.t+'></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+r+"</a></span></div>"}else{var m=r;0<d.s&&(m='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+p)+"','"+encodeURIComponent(p)+"',"+d.s+')">'+r+"</a>"),u="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+c+"</span><span><div class=fileIcon"+d.t+"></div>"+m+"</span></div>"}d.t<3?t+=u:n+=u}if(QH("p13files",t+n),QH("p13currentpath",o),QE("p13FolderUp",0!=p13filetreelocation.length),null!=e){var g=document.getElementsByName("fd");for(a=0;a<g.length;a++)0<=e.indexOf(p13filetree.dir[g[a].value].n)&&(g[a].checked=!0)}p13setActions()}function p13folderset(e){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[e].n).split("\\").join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(e){if(null==e)p13filetreelocation.pop();else for(;p13filetreelocation.length>e;)p13filetreelocation.pop();p13targetpath=p13filetreelocation.join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13sort_filename(e,t){return e.ln>t.ln?1*p13sortorder:e.ln<t.ln?-1*p13sortorder:0}function p13sort_timestamp(e,t){return e.d>t.d?1*p13sortorder:e.d<t.d?-1*p13sortorder:0}function p13sort_bysize(e,t){return e.s==t.s?p13sort_filename(e,t):(e.s-t.s)*p13sortorder}function p13sort_files(e){var t=[],n=Q("p13sortdropdown").value;for(var o in e)e[o].nx=o,null==e[o].s&&(e[o].s=0),null==e[o].n&&(e[o].n=o),e[o].ln=e[o].n.toLowerCase(),t.push(e[o]);return p13sortorder=1,3<n&&(p13sortorder=-1,n-=3),1==n?t.sort(p13sort_filename):2==n?t.sort(p13sort_bysize):3==n&&t.sort(p13sort_timestamp),t}function p13setActions(){if(null==p13filetree)QE("p13DeleteFileButton",!1),QE("p13NewFolderButton",!1),QE("p13UploadButton",!1),QE("p13RenameFileButton",!1),QE("p13SelectAllButton",!1),Q("p13SelectAllButton").value="alles",QE("p13RefreshButton",!1),QE("p13CutButton",!1),QE("p13CopyButton",!1),QE("p13PasteButton",!1);else{var e=p13getFileSelCount(),t=p13getFileCount(),n=p13getFileSelCount(!1),o=0<currentNode.agent.id&&currentNode.agent.id<5;QE("p13DeleteFileButton",0<e&&(0<p13filetreelocation.length||0==o)),QE("p13NewFolderButton",0<p13filetreelocation.length||0==o),QE("p13UploadButton",0<p13filetreelocation.length||0==o),QE("p13RenameFileButton",1==e&&(0<p13filetreelocation.length||0==o)),QE("p13SelectAllButton",0<t),Q("p13SelectAllButton").value=0<e?"Geen":"alles",QE("p13RefreshButton",!0),QE("p13CutButton",0<e&&e==n&&(0<p13filetreelocation.length||0==o)),QE("p13CopyButton",0<e&&e==n&&(0<p13filetreelocation.length||0==o)),QE("p13PasteButton",(0<p13filetreelocation.length||0==o)&&null!=p13clipboard&&0<p13clipboard.length)}}function p13getFileSelCount(e){for(var t=0,n=document.getElementsByName("fd"),o=0;o<n.length;o++)!n[o].checked||0==e&&"3"!=n[o].attributes.file.value||t++;return t}function p13getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fd"),n=0;n<t.length;n++)t[n].checked&&"999"==t[n].attributes.file.value&&e++;return e}function p13getFileCount(){return document.getElementsByName("fd").length}function p13selectallfile(){for(var e=0==p13getFileSelCount(),t=document.getElementsByName("fd"),n=0;n<t.length;n++)t[n].checked=e;p13setActions()}function p13createfolder(){setDialogMode(2,"Nieuwe map",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />"),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value}),p13folderup(999)}function p13deletefile(){var e=p13getFileSelCount(),t=0<p13getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p13recdeleteinput>Recursieve verwijdering</label><br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"Verwijderen",3,p13deletefileEx,1<e?format("Verwijder {0} gelecteerde items?",e)+t:"Verwijder geselecteerde item?"+t)}function p13deletefileEx(){for(var e=[],t=document.getElementsByName("fd"),n=0;n<t.length;n++)t[n].checked&&e.push(p13filetree.dir[t[n].value].n);files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:e,rec:Q("p13recdeleteinput").checked}),p13folderup(999)}function p13renamefile(){for(var e,t=document.getElementsByName("fd"),n=0;n<t.length;n++)t[n].checked&&(e=p13filetree.dir[t[n].value].n);setDialogMode(2,"Hernoemen",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:e}),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13renamefileEx(e,t){t.newname=Q("p13renameinput").value,files.sendText(t),p13folderup(999)}function p13fileNameCheck(e){var t=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",t),1==t&&null!=e&&13==e.keyCode&&dialogclose(1)}function p13uploadFile(){setDialogMode(2,"Upload bestand",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />"),updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}function p13viewfile(){for(var e=document.getElementsByName("fd"),t=0;t<e.length;t++)if(e[t].checked){p13filetree.dir[e[t].value].s<=204800?p13downloadfile(encodeURIComponent(p13filetreelocation.join("/")+"/"+p13filetree.dir[e[t].value].n),encodeURIComponent(p13filetree.dir[e[t].value].n),p13filetree.dir[e[t].value].s,"viewer"):messagebox("Bestandsberwerker","Alleen bestanden kleiner dan 200k kunnen worden bewerkt.");break}}var downloadFile,uploadFile,currentMesh,p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(e){var t=document.getElementsByName("fd");p13clipboard=[],p13clipboardCut=e,p13clipboardFolder=p13targetpath;for(var n=0;n<t.length;n++)t[n].checked&&"3"==t[n].attributes.file.value&&p13clipboard.push(p13filetree.dir[t[n].value].n);p13updateClipview()}function p13pasteFile(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format("Bevestig kopieën van {0} vermeldingen tot deze locatie?",p13clipboard.length):format("Bevestig kopie van 1 vermelding tot deze locatie?"):1<p13clipboard.length?format("Verplaatsing van {0} vermeldingen naar deze locatie bevestigen?",p13clipboard.length):format("Verplaatsing van 1 vermelding naar deze locatie bevestigen?")),setDialogMode(2,"Plakken",3,p13pasteFileEx,e)}function p13pasteFileEx(){files.sendText({action:0==p13clipboardCut?"copy":"move",reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard}),p13folderup(999),1==p13clipboardCut&&(p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview())}function p13updateClipview(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format('{0} items vasthouden voor kopiëren, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Wissen</a>.',p13clipboard.length):format('1 item vasthouden voor kopiëren, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Wissen</a>.'):1<p13clipboard.length?format('{0} items vasthouden voor verplaatsen, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Wissen</a>.',p13clipboard.length):format('1 item vasthouden voor verplaatsen, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Wissen</a>.')),QH("p13bottomstatus",e),p13setActions()}function p13clearClip(){return p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview(),!1}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}function getFileSelCount(e){for(var t=0,n=document.getElementsByName("fc"),o=0;o<n.length;o++)!n[o].checked||0==e&&"3"!=n[o].attributes.file.value||t++;return t}function getFileCount(){return document.getElementsByName("fc").length}function p13downloadfile(e,t,n){xxdialogMode||downloadFile||!files||(downloadFile={path:decodeURIComponent(e),file:decodeURIComponent(t),size:n,tsize:0,data:"",state:0,id:Math.random()},files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path}),setDialogMode(2,"Download Bestand",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+n+" />"))}function p13downloadFileCancel(){setDialogMode(0),files.sendText({action:"download",sub:"cancel",id:downloadFile.id}),downloadFile=null}function p13gotDownloadCommand(e){null!=downloadFile&&e.id==downloadFile.id&&("start"==e.sub?(downloadFile.state=1,files.sendText({action:"download",sub:"startack",id:downloadFile.id})):"cancel"==e.sub&&(downloadFile=null,setDialogMode(0)))}function p13gotDownloadBinaryData(e){downloadFile&&0!=downloadFile.state&&(4<e.length&&(downloadFile.tsize+=e.length-4,downloadFile.data+=e.substring(4),Q("d2progressBar").value=downloadFile.tsize),0!=(1&ReadInt(e,0))?(saveAs(data2blob(downloadFile.data),downloadFile.file),downloadFile=null,setDialogMode(0)):files.sendText({action:"download",sub:"ack",id:downloadFile.id}))}function p13doUploadFiles(e){xxdialogMode||((uploadFile={}).xpath=p13filetreelocation.join("/"),uploadFile.xfiles=e,uploadFile.xfilePtr=-1,setDialogMode(2,"Upload bestand",10,p13uploadFileCancel,"<div id=p13dfileName>Verbinden...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />"),p13uploadReconnect())}function onFileUploadStateChange(e,t){switch(t){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",t)}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie,authRelayCookie,domainUrl),uploadFile.ws.attemptWebRTC=!1,uploadFile.ws.ctrlMsgAllowed=!1,uploadFile.ws.onStateChanged=onFileUploadStateChange,uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){if(uploadFile.xfilePtr++,uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var e=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",e.name),Q("d2progressBar").max=e.size,Q("d2progressBar").value=0,uploadFile.xreader=new FileReader,uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result,uploadFile.ws.sendText({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:e.name,size:uploadFile.xdata.byteLength})},uploadFile.xreader.readAsArrayBuffer(e)}else p13uploadFileCancel()}function p13uploadFileCancel(e,t){null!=uploadFile&&(null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile=null),setDialogMode(0)}function p13gotUploadData(e){var t=JSON.parse(e);if(null!=uploadFile&&parseInt(uploadFile.xfilePtr)==parseInt(t.reqid))if("uploadstart"==t.action){p13uploadNextPart(!1);for(var n=0;n<8;n++)p13uploadNextPart(!0)}else"uploadack"==t.action?p13uploadNextPart(!1):"uploaderror"==t.action&&p13uploadFileCancel()}function p13uploadNextPart(e){var t=uploadFile.xdata,n=uploadFile.xptr,o=uploadFile.xptr+4096;if(o>t.byteLength){if(1==e)return;o=t.byteLength}if(n==t.byteLength)null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile.xfiles.length>uploadFile.xfilePtr+1?p13uploadReconnect():p13uploadFileCancel();else{var i=t.slice(n,o);uploadFile.ws.send(i),uploadFile.xptr=o,Q("d2progressBar").value=o}}function p20updateMesh(){if(null!=currentMesh){QH("p20meshName",EscapeHtml(currentMesh.name));var e=format("Onbekend #{0}",currentMesh.mtype),t=currentMesh.links[userinfo._id].rights;1==currentMesh.mtype&&(e="Intel&reg; AMT alleen, geen agent"),2==currentMesh.mtype&&(e="Beheerd met behulp van een software-agent");var n="";n+=addHtmlValue("Naam",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",0!=(1&t))),n+=addHtmlValue("Omschrijving",addLinkConditional(currentMesh.desc&&""!=currentMesh.desc?EscapeHtml(currentMesh.desc):"<i>Geen</i>","p20editmesh(2)",0!=(1&t))),n+=addHtmlValue("Typen",e),n+="<br style=clear:both><br>";var o=currentMesh.links[userinfo._id];o&&0!=(2&o.rights)&&(n+="<div style=margin-bottom:6px><a onclick=p20showAddMeshUserDialog() style=cursor:pointer><img src=images/icon-addnew.png border=0 height=12 width=12> gebruiker toevoegen</a></div>"),n+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>Gebruikersautorisaties</th></tr>';var i=1,a=[];for(var s in currentMesh.links)a.push({id:s,name:s.split("/")[2],rights:currentMesh.links[s].rights});for(var s in a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),a){var l="",r="Gedeeltelijke rechten",d=a[s].rights;4294967295==d?r="Volledige beheerder":0==d&&(r="Geen rechten"),s==userinfo._id||4294967295!=t&&0==(2&t)||(l='<a onclick=p20deleteUser(event,"'+encodeURIComponent(a[s].id)+'") style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'),n+='<tr onclick=p20viewuser("'+encodeURIComponent(a[s].id)+'") style=height:32px;cursor:pointer'+(i%2==0?";background-color:#DDD":"")+"><td>",n+="<div style=float:right>"+l+"</div><div style=float:right;padding-right:4px>"+r+"</div><div class=m2></div><div>&nbsp;"+EscapeHtml(decodeURIComponent(a[s].name))+"<div></div></div>",n+="</td></tr>",++i}n+="</tbody></table>",4294967295==t&&(n+="<div style=font-size:small;text-align:right;margin-top:6px><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>Verwijder groep</a></span></div>"),QH("p20info",n)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("Weet je zeker dat je groep {0} wilt verwijderen? Als u de apparaatgroep verwijdert, wordt ook alle informatie over apparaten binnen deze groep verwijderd.",EscapeHtml(currentMesh.name))+"<br /><br />";return setDialogMode(2,"Verwijder groep",3,p20showDeleteMeshDialogEx,e+="<label><input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />Bevestig</label>"),p20validateDeleteMeshDialog(),!1}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(e,t){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(e){if(!xxdialogMode){var t=addHtmlValue("Naam","<input id=dp20meshname style=width:170px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");setDialogMode(2,"Bewerk apparaatgroep",3,p20editmeshEx,t+=addHtmlValue("Omschrijving","<input id=dp20meshdesc style=width:170px maxlength=1024 onkeyup=p20editmeshValidate() />")),Q("dp20meshname").value=currentMesh.name,currentMesh.desc&&(Q("dp20meshdesc").value=currentMesh.desc),p20editmeshValidate(),2==e?Q("dp20meshdesc").focus():Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",0<Q("dp20meshname").value.length)}function p20showAddMeshUserDialog(){if(!xxdialogMode){var e=addHtmlValue("User","<input id=dp20username style=width:170px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");e+='<div style="border:2px groove gray;background-color:white;max-height:120px;overflow-y:scroll">',e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>Volledige beheerder</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>Bewerk apparaatgroep</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>Beheer apparaatgroep gebruikers</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>Beheer apparaatgroep computers</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>Extern beheer</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>Alleen extern meekijken</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotelimitedinput style=margin-left:12px>Alleen beperkte invoer</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>Geen terminal toegang</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>Geen bestandstoegang</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>Geen Intel&reg; AMT</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>Mesh Agent Console</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>Serverbestanden</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>apparaat wekken</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>Apparaatnotities bewerken</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20limitevents>Toon alleen eigen gebeurtenissen</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20chatnotify>Chat & Melden</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20uninstall>deinstallatie agent</label><br>",setDialogMode(2,"Gebruiker toevoegen aan Mesh",3,p20showAddMeshUserDialogEx,e+="</div>"),p20validateAddMeshUserDialog(),Q("dp20username").focus()}}function p20validateAddMeshUserDialog(){var e=currentMesh.links[userinfo._id].rights,t=!Q("p20fulladmin").checked;QE("p20fulladmin",4294967295==e),QE("p20editmesh",t&&4294967295==e),QE("p20manageusers",t),QE("p20managecomputers",t),QE("p20remotecontrol",t),QE("p20meshagentconsole",t),QE("p20meshserverfiles",t),QE("p20wakedevices",t),QE("p20editnotes",t),QE("p20limitevents",t),QE("p20remoteview",t&&Q("p20remotecontrol").checked),QE("p20remotelimitedinput",t&&Q("p20remotecontrol").checked&&!Q("p20remoteview").checked),QE("p20noterminal",t&&Q("p20remotecontrol").checked),QE("p20nofiles",t&&Q("p20remotecontrol").checked),QE("p20noamt",t&&Q("p20remotecontrol").checked),QE("p20chatnotify",t),QE("p20uninstall",t)}function p20showAddMeshUserDialogEx(){var e=0;1==Q("p20fulladmin").checked?e=4294967295:(1==Q("p20editmesh").checked&&(e+=1),1==Q("p20manageusers").checked&&(e+=2),1==Q("p20managecomputers").checked&&(e+=4),1==Q("p20remotecontrol").checked&&(e+=8),1==Q("p20meshagentconsole").checked&&(e+=16),1==Q("p20meshserverfiles").checked&&(e+=32),1==Q("p20wakedevices").checked&&(e+=64),1==Q("p20editnotes").checked&&(e+=128),1==Q("p20remoteview").checked&&(e+=256),1==Q("p20noterminal").checked&&(e+=512),1==Q("p20nofiles").checked&&(e+=1024),1==Q("p20noamt").checked&&(e+=2048),1==Q("p20remotelimitedinput").checked&&(e+=4096),1==Q("p20limitevents").checked&&(e+=8192),1==Q("p20chatnotify").checked&&(e+=16384),1==Q("p20uninstall").checked&&(e+=32768));var t=Q("dp20username").value.split(","),n=[];for(var o in t)n.push(t[o].trim());meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,usernames:n,meshadmin:e})}function p20viewuser(e){if(!xxdialogMode){e=decodeURIComponent(e);var t=[],n=currentMesh.links[userinfo._id].rights,o=currentMesh.links[e].rights;4294967295==o?t.push("Volledige beheerder"):(0!=(1&o)&&t.push("Bewerk apparaatgroep"),0!=(2&o)&&t.push("Beheer apparaatgroep gebruikers"),0!=(4&o)&&t.push("Beheer apparaatgroep computers"),0!=(8&o)&&t.push("Extern beheer"),0!=(16&o)&&t.push("Agentconsole"),0!=(32&o)&&t.push("Serverbestanden"),0!=(64&o)&&t.push("apparaat wekken"),0!=(128&o)&&t.push("Notities bewerken"),0!=(256&o)&&t.push("Alleen extern meekijken"),0!=(512&o)&&t.push("Geen terminal"),0!=(1024&o)&&t.push("Geen bestanden"),0!=(2048&o)&&t.push("Geen Intel&reg; AMT"),0!=(8&o)&&0!=(4096&o)&&0==(256&o)&&t.push("Beperkte invoer"),0!=(8192&o)&&t.push("Alleen eigen gebeurtenissen"),0!=(16384&o)&&t.push("Chat & Melden"),0!=(32768&o)&&t.push("deinstallatie")),0==t.length&&t.push("Geen rechten");var i=1,a=addHtmlValue("Gebruiker",EscapeHtml(decodeURIComponent(e.split("/")[2])));a+=addHtmlValue("machtigingen",t.join(",")),userinfo._id!=e&&(4294967295==n||0!=(2&n)&&4294967295!=o)&&(i+=4),setDialogMode(2,"Apparaatgroep gebruiker",i,p20viewuserEx,a,e)}}function p20viewuserEx(e,t){2==e&&setDialogMode(2,"externe Mesh gebruiker",3,p20viewuserEx2,format("Bevestig de verwijdering van gebruiker {0}?",t.split("/")[2]),t)}function p20deleteUser(e,t){haltEvent(e),p20viewuserEx(2,decodeURIComponent(t))}function p20viewuserEx2(e,t){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:t})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xxcurrentView=-1;function go(e){if(setSessionActivity(),!xxdialogMode&&xxcurrentView!=e){updateFooterMenu(),setDialogMode(0);for(var t=0;t<32;t++)QV("p"+t,t==e);xxcurrentView=e}}function setDialogMode(e,t,n,o,i,a){setSessionActivity(),xxdialogMode=e,xxdialogFunc=o,xxdialogButtons=n,xxdialogTag=a,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&n),QV("idx_dlgCancelButton",2&n),QV("id_dialogclose",2&n||8&n),QV("idx_dlgButtonBar",7&n),t&&QH("id_dialogtitle",t);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){setSessionActivity();var t=xxdialogFunc,n=xxdialogButtons,o=xxdialogTag;setDialogMode(),(8&n||e)&&t&&t(e,o)}function putstore(e,t){try{if("undefined"==typeof localStorage||localStorage.getItem(e)==t)return;null==t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}if("_"!=e[0]){for(var n={},o=0,i=localStorage.length;o<i;++o){var a=localStorage.key(o);"_"!=a[0]&&(n[a]=localStorage.getItem(a))}meshserver.send({action:"userWebState",state:JSON.stringify(n)})}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function center(){QS("dialog").left=(getDocWidth()-300)/2+"px",deskAdjust(),deskAdjust()}function messagebox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function reload(){window.location.href=window.location.href}function getNodeFromId(e){for(var t in nodes)if(nodes[t]._id==e)return nodes[t];return null}function addHtmlValue(e,t){return"<table><td style=width:120px>"+e+"<td><b>"+t+"</b></table>"}function addHtmlValue2(e,t){return"<div><div style=display:inline-block;float:right>"+t+"</div><div style=display:inline-block>"+e+"</div></div>"}function addLink(e,t){return"<a style=cursor:pointer;color:darkblue;text-decoration:none onclick='"+t+"'>&diams; "+e+"</a>"}function addLinkConditional(e,t,n){return n?addLink(e,t):e}function passwordcheck(e){return/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/.test(e)}function getFileSizeStr(e){return 1==e?"1 byte":format("{0} bytes",e)}function joinPaths(){var e=[];for(var t in arguments){var n=arguments[t];if(null!=n&&""!=n){for(;n.endsWith("/")||n.endsWith("\\");)n=n.substring(0,n.length-1);for(;n.startsWith("/")||n.startsWith("\\");)n=n.substring(1);e.push(n)}}return e.join("/")}function focusTextBox(e){setTimeout(function(){Q(e).selectionStart=Q(e).selectionEnd=65535,Q(e).focus()},0)}isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,n=/^\./,o=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!n.test(e)&&!o.test(e)&&"."!=e[0]}}();function parseUriArgs(){var e,t={},n=window.document.location.href.split(/[\?&|\=]/);for(o in n.splice(0,1),n)switch(o%2){case 0:e=decodeURIComponent(n[o]);break;case 1:t[e]=decodeURIComponent(n[o]);var o=parseInt(t[e]);o==t[e]&&(t[e]=o)}return t}function printDate(e){return e.toLocaleDateString(args.locale)}function printTime(e){return e.toLocaleTimeString(args.locale)}function printDateTime(e){return e.toLocaleString(args.locale)}function format(e){var n=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==n[t]?n[t]:e})}function nobreak(e){return e.split(" ").join("&nbsp;")}</script>
\ No newline at end of file
views/translations/default-mobile-min_pt.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script keeplink=1 src=scripts/filesaver.js></script><title>{{{title}}}</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}.i1{background:url(../images/icons50.png) 0 0;height:50px;width:50px;border:none}.i2{background:url(../images/icons50.png) -50px 0;height:50px;width:50px;border:none}.i3{background:url(../images/icons50.png) -100px 0;height:50px;width:50px;border:none}.i4{background:url(../images/icons50.png) -150px 0;height:50px;width:50px;border:none}.i5{background:url(../images/icons50.png) -200px 0;height:50px;width:50px;border:none}.i6{background:url(../images/icons50.png) -250px 0;height:50px;width:50px;border:none}.m0{background:url(../images/images16.png) -32px 0;height:16px;width:16px;border:none;float:left}.m1{background:url(../images/images16.png) -16px 0;height:16px;width:16px;border:none;float:left}.m2{background:url(../images/images16.png) -96px 0;height:16px;width:16px;border:none;float:left}.m3{background:url(../images/images16.png) -112px 0;height:16px;width:16px;border:none;float:left}.gray{filter:gray;-webkit-filter:grayscale(100%) opacity(60%)}.DevSt{padding-left:5px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#ddd}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:#fff;clear:both}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style="width:calc(100% - 50px);overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><img id=topMenuIcon class=noselect style=position:absolute;right:0;top:10px;bottom:50px;color:#c8c8c8;font-size:44px;margin-right:8px;cursor:pointer;display:none onclick=topMenu() src=/images/3bars-30.png width=30 height=30></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%><div id=column_l style=width:100%;padding:0;position:absolute;bottom:0;top:0><div id=p0 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p0message style=text-align:center;width:100%><span id=p0span>Servidor desconectado</span>,<href onclick=reload() style=cursor:pointer><u>clique para reconectar</u></href>.</div></div></div><div id=p1 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p1message style=text-align:center;width:100%></div></div></div><div id=p2 style=display:none><div id=xdevices></div></div><div id=p3 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large><span id=p3userName></span></strong><br></div></table><div id=p3info style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div style=margin-left:8px><div id=p3AccountActions><p><strong>Segurança da Conta</strong><div style=margin-left:9px;margin-bottom:8px><div id=manageAuthApp style=margin-top:5px;display:none><a onclick=account_manageAuthApp() style=cursor:pointer>Gerenciar aplicativo autenticador</a></div><div id=manageOtp style=margin-top:5px;display:none><a onclick=account_manageOtp(0) style=cursor:pointer>Gerenciar códigos de backup</a></div></div><p><strong>Ações da Conta</strong><div style=margin-left:9px;margin-bottom:8px><div style=margin-top:5px><span id=verifyEmailId style=display:none><a onclick=account_showVerifyEmail() style=cursor:pointer>Verificar email</a></span></div><div style=margin-top:5px><span id=changeEmailId style=display:none><a onclick=account_showChangeEmail() style=cursor:pointer>Mude o endereço de email</a></span></div><div style=margin-top:5px><a onclick=account_showChangePassword() style=cursor:pointer>Mudar senha</a><span id=p2nextPasswordUpdateTime></span></div><div style=margin-top:5px><a onclick=account_showDeleteAccount() style=cursor:pointer>Deletar conta</a></div></div><br style=clear:both></div><strong>Grupos de dispositivos</strong> <span id=p3createMeshLink1>( <a onclick=account_createMesh() style=cursor:pointer><img src=images/icon-addnew.png width=12 height=12 border=0> Novo</a> )</span><br><br><div id=p3meshes></div><div id=p3noMeshFound style=margin-left:9px;display:none>Nenhum grupo de dispositivos.<span id=p3createMeshLink2> <a onclick=account_createMesh() style=cursor:pointer><strong>Comece aqui!</strong></a></span></div><br style=clear:both></div></div></div><div id=p5 style=display:none><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large>Meus arquivos</strong><br></div></table><div id=p5myfiles style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><table id=p5toolbar style=width:100%;height:78px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5FolderUp disabled onclick=p5folderup() value=Acima> <input type=button style="width:calc(100%/5 - 5px)"id=p5SelectAllButton disabled onclick=p5selectallfile() value="Selecionar tudo"onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RenameFileButton disabled value=Renomear onclick=p5renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5DeleteFileButton disabled value=Deletar onclick=p5deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5NewFolderButton disabled value=Pasta onclick=p5createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5UploadButton disabled value=Envio onclick=p5uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CutButton disabled value=Cortar onclick=p5copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CopyButton disabled value=Copiar onclick=p5copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5PasteButton disabled value=Colar onclick=p5pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RefreshButton value=Atualizar onclick=p5refreshFiles() onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p5currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Classificar por nome<option value=2>Classificar por tamanho<option value=3>Classificar por data<option value=4>Decrescente por nome<option value=5>Decrescente por tamanho<option value=6>Descrescente por data</select></table></table><div id=p5filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p5files></span></div><table id=p5toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0;background-color:#d3d9d6 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px>&nbsp;<span id=p5bottomstatus></span><td id=p5rightOfButtons style=text-align:right;padding:3px></table></div></div><div id=p10 style=display:none;position:absolute;bottom:0;top:0;width:100%;overflow:hidden><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0;position:absolute;top:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><a id=MainComputerImage style=cursor:pointer onclick=p10showiconselector()></a><td><div style=margin-left:5px><strong><span id=p10deviceName></span></strong><br><span id=MainComputerState></span></div></table><div id=p10general style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div id=p10html style=margin-left:8px;margin-right:8px></div><div id=p10html2></div><div id=p10html3></div></div><div id=p10desktop style=overflow:hidden;position:absolute;top:55px;bottom:0;width:100%;display:none><div id=deskarea1 style=position:absolute;top:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><span id=p14power></span>&nbsp; <input id=DeskSoftInput style=width:25px;display:none;opacity:.2 onblur=toggleSoftKeys(0) onkeypress="return ondeskkeypress(event)"onkeydown="return ondeskkeydown(event)"onkeyup="return ondeskkeyup(event)"></div><div style=margin-left:3px><input type=button id=connectbutton1 value=Conectar onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=connectbutton1h value="Conectar HW"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=disconnectbutton1 value=Desconectar onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1> <span id=deskstatus>Desconectado</span></div></div></div><div id=deskarea3 style="position:absolute;top:25px;width:100%;height:calc(100% - 50px)"><div id=deskarea3x style=background:#000;text-align:center;height:100%;position:relative><div id=DeskParent style=height:100%><canvas id=Desk width=640 height=200 style=width:100%;-ms-touch-action:none;margin-left:0 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid #d3d3d3;display:none"><a id=DeskToolsRefreshButton style=float:right;padding:3px;cursor:pointer onclick=refreshDeskTools()>Atualizar</a><div id=DeskToolsBar style="position:absolute;padding:3px;border-radius:3px 3px 0 0;top:5px;left:4px;bottom:26px;background-color:#d3d3d3;cursor:pointer">Processos</div><div style=position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:#d3d3d3;text-align:left><div style="border-bottom:1px solid #a9a9a9;padding:3px"><a style=width:50px;padding-right:5px;float:left;cursor:pointer onclick=sortProcess(0)>PID</a><a style=cursor:pointer onclick=sortProcess(1)>Nome</a></div><div id=DeskToolsProcesses style=overflow-y:scroll;position:absolute;top:24px;bottom:0;width:100%></div></div></div></div></div><div id=deskarea4 style=position:absolute;bottom:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><select id=termdisplays style=display:none onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>&nbsp; <span id=DeskToastButton><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span>&nbsp;</div><div><input id=deskActionsBtn type=button style=margin-left:3px onkeypress=return!1 onkeydown=return!1 value=Ações onclick=deviceActionFunction()> <input type=button value=Configurações onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings()> <input type=button onkeypress=return!1 onkeydown=return!1 value="Ações de energia (Ligar/Desligar)"onclick=showPowerActionDlg() style=display:none> <input id=DeskSpecialKeys type=button value="Chaves especiais"onkeypress=return!1 onkeydown=return!1 onclick=sendSpecialKeys()> <input id=DeskSoftKeys type=button value=Teclado onkeypress=return!1 onkeydown=return!1 onclick=toggleSoftKeys(1)> <label><span id=DeskControlSpan style=display:none><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1>Entrada</span></label></div></div></div></div><div id=p10files style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%;display:none><table id=p13toolbar style=width:100%;height:111px cellpadding=0 cellspacing=0><tr><td style="background-color:silver;border-bottom:2px solid #000;padding:2px"><div style=float:right;text-align:right><input id=filesActionsBtn type=button onkeypress=return!1 onkeydown=return!1 value=Ações onclick=deviceActionFunction() style=margin-right:2px></div><div style=margin-left:2px><input id=p13AutoConnect value="Conexão automática"onclick=autoConnectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button style=display:none> <input id=p13Connect value=Conectar onclick=connectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button> <span id=p13Status>Desconectado</span></div><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13FolderUp disabled onclick=p13folderup() value=Acima> <input type=button style="width:calc(100%/5 - 5px)"id=p13SelectAllButton disabled onclick=p13selectallfile() value="Selecionar tudo"onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RenameFileButton disabled value=Renomear onclick=p13renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13DeleteFileButton disabled value=Deletar onclick=p13deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13NewFolderButton disabled value=Pasta onclick=p13createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13UploadButton disabled value=Envio onclick=p13uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CutButton disabled value=Cortar onclick=p13copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CopyButton disabled value=Copiar onclick=p13copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13PasteButton disabled value=Colar onclick=p13pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RefreshButton disabled value=Atualizar onclick=p13folderup(9999) onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p13currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Classificar por nome<option value=2>Classificar por tamanho<option value=3>Classificar por data<option value=4>Decrescente por nome<option value=5>Decrescente por tamanho<option value=6>Descrescente por data</select></table></table><div id=p13filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p13files></span></div><table id=p13toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#d3d9d6>&nbsp;<span id=p13bottomstatus></span></table></div></div><div id=p20 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td onclick=p20editmesh(1)><img src=/images/meshicon50.png width=50 height=50><td onclick=p20editmesh(1)><div style=margin-left:5px><strong style=font-size:large><span id=p20meshName></span></strong><br></div></table><div id=p20info style=margin-left:8px;margin-right:8px></div></div></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table id=footerMenu cellpadding=0 cellspacing=0 style=height:32px;width:100%;color:#fff;cursor:pointer;table-layout:fixed></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:90px;width:300px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div><div id=dialog3 style=margin:auto;margin:3px><select id=deskkeys style=width:100%><option value=10>CTRL+ALT+DEL<option value=11>Tab<option value=5>Win<option value=0>Win+Down<option value=1>Win+Up<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>CTRL-W<option value=9>Alt-Tab</select></div><div id=dialog7 style=margin:auto;margin:3px><div id=d7meshkvm><h4 style="width:100%;border-bottom:1px solid gray">Área de trabalho remota do agente</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir=rtl></select><div style=height:20px>Qualidade</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37..5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Dimensionamento</div></div><div style="margin:3px 0 3px 0"><select id=d7framelimiter style=float:right;width:200px;height:20px dir=rtl><option selected value=50>Rápido<option value=100>Médio<option value=400>Lento<option value=1000>Muito devagar</select><div style=height:20px>Taxa</div></div></div><div id=d7amtkvm><h4 style="width:100%;border-bottom:1px solid gray">Intel® AMT Hardware KVM</h4><div style=height:26px><select id=d7desktopmode style=float:right;width:200px><option value=1>RLE8, mais rápido<option value=2>RLE16, Recomendado<option value=3>RAW8, lento<option value=4>RAW16, muito lento</select><div>Codificação</div></div><div style=height:60px><div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:#fff"><label><input type=checkbox id=d7showfocus>Mostrar ferramenta de foco</label><br><label><input type=checkbox id=d7showcursor>Mostrar Cursor do Mouse Local</label><br></div><div>Outro</div></div></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Cancelar style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=Ok style=float:right;width:80px onclick=dialogclose(1)></div></div><div id=topMenu style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:0 0 5px 5px;position:fixed;top:50px;right:5px;width:170px;display:none"><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(2)>Meus arquivos</div><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(1)>Minha conta</div><div id=logoutMenuOption><a href=/logout><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer">Sair</div></a></div></div><iframe name=fileUploadFrame style=display:none></iframe><script>"use strict";var webState="{{{webstate}}}";for(var i in""!=webState&&(webState=JSON.parse(decodeURIComponent(webState))),webState)localStorage.setItem(i,webState[i]);webState.loctag||localStorage.removeItem("loctag");var files,args=parseUriArgs(),debugLevel=parseInt("{{{debuglevel}}}"),features=parseInt("{{{features}}}"),sessionTime=parseInt("{{{sessiontime}}}"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",authCookie="{{{authCookie}}}",authRelayCookie="{{{authRelayCookie}}}",authCookieRenewTimer=null,meshserver=null,xdr=null,serverinfo=null,nodes=[],meshes={},filetree={},userinfo=null,users=(serverinfo=null,null),nodeShortIdent=0,serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}",debugmode=!1,attemptWebRTC=0!=(128&features),StatusStrs=["Desconectado","Conectando...","Configurando...","Conectado","Intel&reg; AMT conectado"],passRequirements="{{{passRequirements}}}";""!=passRequirements&&(passRequirements=JSON.parse(decodeURIComponent(passRequirements)));var sessionActivity=Date.now();function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(!args.locale){var t=getstore("loctag",0);null!=t&&"*"!=t&&(args.locale=t)}(window.onresize=center)(),QV("changeEmailId",0==(2097152&features)),QH("p1message","Conectando..."),go(1),(meshserver=MeshServerCreateControl(domainUrl,authCookie)).onStateChanged=onStateChanged,meshserver.onMessage=onMessage,meshserver.Start();var o=localStorage.getItem("desktopsettings");null!=o&&(desktopsettings=JSON.parse(o)),applyDesktopSettings()}function onStateChanged(e,t,o,n){if(0==t){if(setDialogMode(0),go(0),"noauth"==n)return void QH("p0span","Não foi possível executar a autenticação");2==o?setTimeout(serverPoll,5e3):QH("p0span","Não foi possível conectar o soquete da web"),null!=authCookieRenewTimer&&(clearInterval(authCookieRenewTimer),authCookieRenewTimer=null)}else 2==t&&(meshserver.send({action:"meshes"}),meshserver.send({action:"nodes"}),meshserver.send({action:"files"}),xxcurrentView<2&&go(2),authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},18e5));QV("topMenuIcon",2==t)}function serverPoll(){xdr=null;try{xdr=new XDomainRequest}catch(e){}(xdr=xdr||new XMLHttpRequest).open("HEAD",window.location.href),xdr.timeout=15e3,xdr.onload=function(){reload()},xdr.onerror=xdr.ontimeout=function(){setTimeout(serverPoll,1e4)},xdr.send()}function updateSelf(){if(QV("verifyEmailId",!0!==userinfo.emailVerified&&null!=userinfo.email&&1==serverinfo.emailcheck),QV("manageAuthApp",4096&features),QV("manageOtp",0!=(4096&features)&&(1==userinfo.otpsecret||0<userinfo.otphkeys)),QV("p3createMeshLink1",!1),QV("p3createMeshLink2",!1),"number"==typeof userinfo.passchange)if(-1==userinfo.passchange)QH("p2nextPasswordUpdateTime"," - Redefinir no próximo login.");else if(null!=passRequirements&&"number"==typeof passRequirements.reset){var e=userinfo.passchange+86400*passRequirements.reset-Math.floor(Date.now()/1e3);e<0?QH("p2nextPasswordUpdateTime"," - Redefinir no próximo login."):e<3600?QH("p2nextPasswordUpdateTime",format("- Redefinir em {0} minuto {1}.",Math.floor(e/60),addLetterS(Math.floor(e/60)))):e<86400?QH("p2nextPasswordUpdateTime",format(" - Redefinir em {0} hora {1}.",Math.floor(e/3600),addLetterS(Math.floor(e/3600)))):QH("p2nextPasswordUpdateTime",format(" - Redefinir em {0} dia {1}."),Math.floor(e/86400),addLetterS(Math.floor(e/86400)))}}function addLetterS(e){return 1<e?"s":""}function setSessionActivity(){sessionActivity=Date.now()}function checkIdleSessionTimeout(){Date.now()-sessionActivity>serverinfo.timeout&&(window.location.href="logout")}function onMessage(e,t){switch(t.action){case"serverinfo":(serverinfo=t.serverinfo).timeout&&(setInterval(checkIdleSessionTimeout,1e4),checkIdleSessionTimeout()),QV("p3AccountActions",0==(4&features)&&0==serverinfo.domainauth),QV("logoutMenuOption",0==(4&features)&&0==serverinfo.domainauth);break;case"authcookie":authCookie=t.cookie,authRelayCookie=t.rcookie;break;case"userinfo":userinfo=t.userinfo,QH("p3userName",userinfo.name),updateSelf();break;case"users":for(var o in users={},t.users)users[t.users[o]._id]=t.users[o];updateUsers();break;case"wssessioncount":wssessions=t.wssessions,updateUsers();break;case"meshes":for(var o in meshes={},t.meshes)meshes[t.meshes[o]._id]=t.meshes[o];updateMeshes(),updateDevices();break;case"files":filetree=setupBackPointers(t.filetree),updateFiles();break;case"nodes":for(var o in nodes=[],t.nodes)for(var n in t.nodes[o])meshes[o]?(t.nodes[o][n].namel=t.nodes[o][n].name.toLowerCase(),t.nodes[o][n].rname?t.nodes[o][n].rnamel=t.nodes[o][n].rname.toLowerCase():t.nodes[o][n].rnamel=t.nodes[o][n].namel,t.nodes[o][n].meshnamel=meshes[o].name.toLowerCase(),t.nodes[o][n].meshid=o,t.nodes[o][n].state=t.nodes[o][n].state?t.nodes[o][n].state:0,t.nodes[o][n].desc=t.nodes[o][n].desc,t.nodes[o][n].icon||(t.nodes[o][n].icon=1),t.nodes[o][n].ident=++nodeShortIdent,nodes.push(t.nodes[o][n])):console.log("Invalid mesh (1): "+o);updateDevices(),0==xxcurrentView&&go(parseInt("{{viewmode}}")),gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"));break;case"powertimeline":if(t.nodeid!=powerTimelineReq)break;powerTimelineNode=t.nodeid,powerTimeline=t.timeline,powerTimelineUpdate=Date.now()+3e5,currentNode._id==t.nodeid&&drawDeviceTimeline();break;case"otpauth-request":if(2==xxdialogMode&&"otpauth-request"==xxdialogTag){var i=t.secret;52==i.length?i=i.split(/(.............)/).filter(Boolean).join(" "):32==i.length&&(i=(i=i.split(/(....)/).filter(Boolean).join(" ")).substring(0,20)+"<br/>"+i.substring(20)),QH("d2optinfo",'Install <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank>Google Authenticator</a> or a compatible application, use <a href="\' + message.url + \'" rel="noreferrer noopener" target=_blank> this link</a> or enter the secret below. Then, enter the current 6 digit token to activate 2-Step login.<br /><br /><div style=width:100%;text-align:center><tt id=d2optsecret secret="'+t.secret+'" style=font-size:15px>'+i+'</tt><br /><br />Token: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></div>'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"Autenticador de aplicativo",1,null,t.success?"<b style=color:green> ativação de login em duas etapas </b>. Agora você precisará de um token válido para fazer login novamente.":"<b style=color:red> falha na ativação do login em duas etapas </b>. Limpe o segredo do aplicativo e tente novamente. Você tem apenas alguns minutos para inserir o código correto.");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"Autenticador de aplicativo",1,null,t.success?"<b style=color:green>Ativação de login em duas etapas removida</b>. Você pode reativar esse recurso a qualquer momento.":"<b style=color:red> falha na remoção da ativação do login em duas etapas </b>. Tente novamente.");break;case"otpauth-getpasswords":if(xxdialogMode)return;var a="Os tokens únicos podem ser usados como autenticação secundária. Gere um conjunto, imprima-os e mantenha-os em um local seguro.";if(a+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(a+="<tr>");for(var r=""+t.passwords[l].p;r.length<8;)r="0"+r;!0===t.passwords[l].u?a+="<td>"+r.substring(0,4)+"&nbsp;"+r.substring(4):a+="<td><strike style=color:#BBB>"+r.substring(0,4)+"&nbsp;"+r.substring(4)}}else a+="<tr><td>Nenhum token ativo";a+="</table></div></div><br />",a+="<div><input type=button value='Fechar' onclick=setDialogMode(0) style=float:right></input>",a+="<input type=button value='Novos tokens' onclick='account_manageOtp(1);'></input>",null!=t.passwords&&(a+="<input type=button value='Limpo' onclick='account_manageOtp(2);'></input>"),setDialogMode(2,"Gerenciar códigos de backup",8,null,a+="</div><br />","otpauth-manage");break;case"event":if(t.event.noact)break;switch(t.event.action){case"userWebState":if(null!=localStorage){var d=JSON.parse(t.event.state);for(var l in d)localStorage.setItem(l,d[l]);null!=d.loctag&&d.loctag!=oldLoctag&&(null!=d.loctag?args.locale=d.loctag:delete args.locale,updateDevices(),updateMeshes())}break;case"accountchange":if(userinfo.name==t.event.account.name){var p=t.event.account.siteadmin?t.event.account.siteadmin:0,c=userinfo.siteadmin?userinfo.siteadmin:0;(t.event.account.quota!=userinfo.quota||0==(8&userinfo.siteadmin)&&0!=(8&t.event.account.siteadmin))&&meshserver.send({action:"files"}),userinfo=t.event.account,c!=p&&updateSiteAdmin(),updateSelf()}break;case"createmesh":null!=t.event.links[userinfo._id]&&(meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},updateMeshes(),updateDevices(),meshserver.send({action:"files"}));break;case"meshchange":if(null==meshes[t.event.meshid])meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},meshserver.send({action:"nodes"});else{if(meshes[t.event.meshid].name!=t.event.name)for(var l in meshes[t.event.meshid].name=t.event.name,nodes)nodes[l].meshid==t.event.meshid&&(nodes[l].meshnamel=t.event.name.toLowerCase());if(meshes[t.event.meshid].desc=t.event.desc,meshes[t.event.meshid].links=t.event.links,null==meshes[t.event.meshid].links[userinfo._id]){20==xxcurrentView&&currentMesh==meshes[t.event.meshid]&&go(2),delete meshes[t.event.meshid];var u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2))}}updateMeshes(),updateDevices(),meshserver.send({action:"files"}),20==xxcurrentView&&currentMesh._id==t.event.meshid&&p20updateMesh();break;case"deletemesh":meshes[t.event.meshid]&&(delete meshes[t.event.meshid],updateMeshes(),meshserver.send({action:"files"}));u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,updateDevices(),20<=xxcurrentView&&xxcurrentView<30&&currentMesh._id==t.event.meshid&&(setDialogMode(0),go(2)),10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2));break;case"addnode":var m=t.event.node;if(!meshes[m.meshid])break;if(null!=getNodeFromId(m._id))break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices();break;case"removenode":var h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1),updateDevices()}break;case"changenode":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).name=t.event.node.name,m.rname=t.event.node.rname,m.host=t.event.node.host,m.desc=t.event.node.desc,m.publicip=t.event.node.publicip,m.iploc=t.event.node.iploc,m.wifiloc=t.event.node.wifiloc,m.gpsloc=t.event.node.gpsloc,m.tags=t.event.node.tags,m.userloc=t.event.node.userloc,null!=t.event.node.agent&&(null==m.agent&&(m.agent={}),null!=t.event.node.agent.ver&&(m.agent.ver=t.event.node.agent.ver),null!=t.event.node.agent.id&&(m.agent.id=t.event.node.agent.id),null!=t.event.node.agent.caps&&(m.agent.caps=t.event.node.agent.caps),null!=t.event.node.agent.core?m.agent.core=t.event.node.agent.core:m.agent.core&&delete m.agent.core,m.agent.tag=t.event.node.agent.tag),null!=t.event.node.intelamt&&(null==m.intelamt&&(m.intelamt={}),null!=t.event.node.intelamt.state&&(m.intelamt.state=t.event.node.intelamt.state),null!=t.event.node.intelamt.host&&(m.intelamt.user=t.event.node.intelamt.host),null!=t.event.node.intelamt.user&&(m.intelamt.user=t.event.node.intelamt.user),null!=t.event.node.intelamt.tls&&(m.intelamt.tls=t.event.node.intelamt.tls),null!=t.event.node.intelamt.ver&&(m.intelamt.ver=t.event.node.intelamt.ver),null!=t.event.node.intelamt.tag&&(m.intelamt.tag=t.event.node.intelamt.tag),null!=t.event.node.intelamt.uuid&&(m.intelamt.uuid=t.event.node.intelamt.uuid),null!=t.event.node.intelamt.realm&&(m.intelamt.realm=t.event.node.intelamt.realm)),m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,t.event.node.icon&&(m.icon=t.event.node.icon),refreshDevice(m._id),updateDevices();break;case"nodemeshchange":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1)):(m.meshid=t.event.newMeshId,m.meshnamel=meshes[t.event.newMeshId].name.toLowerCase()),updateDevices(),refreshDevice(t.event.nodeid)}else{m=t.event.node;if(!meshes[m.meshid])break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices()}break;case"nodeconnect":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).conn=t.event.conn,m.pwr=t.event.pwr,updateDevices();break;case"login":null!=users&&users["user/"+domain+"/"+t.event.username.toLowerCase()]&&(users["user/"+domain+"/"+t.event.username.toLowerCase()].login=t.event.time)}}}function topMenu(e){null!=xxdialogMode&&0!=xxdialogMode&&999!=xxdialogMode||(void 0===e?1==("none"==QS("topMenu").display)?0!=xxdialogMode&&null!=xxdialogMode||(QV("topMenu",!0),xxdialogMode=999):(QV("topMenu",!1),xxdialogMode=0):(QV("topMenu",!1),xxdialogMode=0,1==e&&3!=xxcurrentView&&goForward("account"),2==e&&5!=xxcurrentView&&goForward("files")))}var filetreelinkpath,backStack=[];function goBack(){xxdialogMode||(0<backStack.length&&backStack.pop(),goStack())}function goForward(e){xxdialogMode||(backStack.push(e),goStack())}function goStack(){if(0!=backStack.length){var e=backStack[backStack.length-1],t=e.split("/")[0];"node"==t&&(setupDeviceMenu(0),gotoDevice(e)),"mesh"==t&&gotoMesh(e),"account"==t&&go(3),"devices"==t&&go(2),"files"==t&&go(5)}else go(2)}function updateFooterMenu(e){for(;null!=e&&e.length<3;)e.push({n:""});var t="",o="";if(null!=e)for(var n in e)t+='<td style="cursor:pointer'+(""==o?"":";border-left:solid 1px white")+'" onclick="'+e[n].f+'">'+e[n].n,o=e[n].n;QH("footerMenu","<tr>"+t)}function account_manageAuthApp(){xxdialogMode||0==(4096&features)||(1==userinfo.otpsecret?account_removeOtp():account_addOtp())}function account_addOtp(){xxdialogMode||1==userinfo.otpsecret||0==(4096&features)||(setDialogMode(2,"Autenticador de aplicativo",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>Carregando...</div>","otpauth-request"),meshserver.send({action:"otpauth-request"}))}function account_addOtpCheck(e){var t=6==Q("d2otpauthinput").value.length;QE("idx_dlgOkButton",t),e&&13==e.keyCode&&t&&dialogclose(1)}function account_removeOtp(){xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||setDialogMode(2,"Autenticador de aplicativo",3,function(){meshserver.send({action:"otpauth-clear"})},"Confirmar remoção do login do aplicativo autenticador em duas etapas?")}function account_manageOtp(e){2==xxdialogMode&&"otpauth-manage"==xxdialogTag&&dialogclose(0),xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||meshserver.send({action:"otpauth-getpasswords",subaction:e})}function account_showVerifyEmail(){xxdialogMode||1==userinfo.emailVerified||1!=serverinfo.emailcheck||setDialogMode(2,"verificação de e-mail",3,account_showVerifyEmailEx,"Clique em ok para enviar um email de verificação para:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>Aguarde alguns minutos para receber a verificação.")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"Alteração de endereço de email",3,account_changeEmail,addHtmlValue("Email","<input id=dp3email style=width:170px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />")),null!=userinfo.email&&(Q("dp3email").value=userinfo.email),account_validateEmail(),Q("dp3email").focus())}function account_validateEmail(e,t){QE("idx_dlgOkButton",validateEmail(Q("dp3email").value)&&Q("dp3email").value!=userinfo.email),null!=e&&13==e.keyCode&&dialogclose(1)}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp3email").value})}function account_showDeleteAccount(){if(!xxdialogMode){var e="<form method=post><table style=margin-left:10px><input type=hidden name=action value=deleteaccount /><input type=hidden name=authcookie value="+authCookie+" /><tr>";e+="<td align=right>Senha:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr><tr><td align=right>Senha:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr></table><div style=padding:10px;margin-bottom:4px>",e+='<input id=account_dlgCancelButton type=button value="Cancelar" style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>',e+='<input id=account_dlgOkButton type=submit value="Ok" style="float:right;width:80px" onclick=dialogclose(1)>',setDialogMode(2,"Deletar Conta",0,null,e+="</div><br /></form>"),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="<table style=margin-left:10px>";if(e+="<tr><td align=right>"+nobreak("Senha Antiga:")+"</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nova senha:")+"</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nova senha:")+"</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>",65536&features&&(e+="<tr><td align=right>Dica de senha</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"),e+="</table>",passRequirements){var t=[],o=0;for(var n in passRequirements)"reset"!=n&&"hint"!=n&&(t.push(n+":"+passRequirements[n]),o++);0<o&&(e+="<br /><span style=font-size:x-small>"+format("Requisitos: {0}.",t.join(", "))+"</span>")}return setDialogMode(2,"Mudar senha",3,account_showChangePasswordEx,e+="<br />"),Q("apassword0").focus(),account_validateNewPassword(),!1}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var e={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};65536&features&&(e.hint=Q("apasswordhint").value),meshserver.send(e)}}function account_createMesh(){if(!xxdialogMode)if(4294967295==userinfo.siteadmin||0==(64&userinfo.siteadmin))if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var e=addHtmlValue("Nome","<input id=dp3meshname style=width:170px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");e+=addHtmlValue("Tipo","<div style=width:170px;margin:0;padding:0><select id=dp3meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>Grupo de agentes de software</option><option value=1>Intel&reg; Apenas AMT</option></select></div>"),setDialogMode(2,"Criar grupo de dispositivo",3,account_createMeshEx,e+=addHtmlValue("Descrição","<div style=width:170px;margin:0;padding:0><textarea id=dp3meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"Segurança da Conta",1,null,'Não foi possível acessar um dispositivo até que a autenticação de dois fatores esteja ativada. Isso é necessário para segurança extra. Vá para "Minha conta" e veja a seção "Segurança da conta".');else setDialogMode(2,"Segurança da Conta",1,null,'Não foi possível acessar um dispositivo até que um endereço de email seja verificado. Isso é necessário para a recuperação de senha. Vá para "Minha conta" para alterar e verificar um endereço de email.');else setDialogMode(2,"Novo grupo de dispositivos",1,null,"Esta conta não tem direitos para criar um novo grupo de dispositivos.")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0<Q("dp3meshname").value.length)}function account_createMeshEx(e,t){meshserver.send({action:"createmesh",meshname:Q("dp3meshname").value,meshtype:Q("dp3meshtype").value,desc:Q("dp3meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value)}function account_validateNewPassword(){var e="",t=0<Q("apassword0").value.length&&0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value&&Q("apassword0").value!=Q("apassword1").value;if(65536&features&&Q("apasswordhint").value==Q("apassword1").value&&(t=!1),""!=Q("apassword1").value)if(null==passRequirements||""==passRequirements){var o=checkPasswordStrength(Q("apassword1").value);e=80<=o?"<span style=color:green>Strong<span>":60<=o?"<span style=color:blue>&#9679;<span>":"<span style=color:red>&#9679;<span>"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="<span style=color:red>Política<span>")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,o={},n=0,i={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var a=0;a<e.length;a++)o[e[a]]=(o[e[a]]||0)+1,t+=5/o[e[a]];for(var s in i)n+=1==i[s]?1:0;return parseInt(t+10*(n-1))}function checkPasswordRequirements(e,t){if(null==t||""==t||"object"!=typeof t)return!0;if(t.min&&e.length<t.min)return!1;if(t.max&&e.length>t.max)return!1;for(var o=0,n=0,i=0,a=0,s=0;s<e.length;s++)/\d/.test(e[s])&&o++,/[a-z]/.test(e[s])&&n++,/[A-Z]/.test(e[s])&&i++,/\W/.test(e[s])&&a++;return!(t.num&&o<t.num)&&(!(t.lower&&n<t.lower)&&(!(t.upper&&i<t.upper)&&!(t.nonalpha&&a<t.nonalpha)))}function updateMeshes(){var e="",t=0;for(i in meshes){t++;var o=meshes[i].links[userinfo._id].rights,n="Direitos parciais";4294967295==o?n="Administrador completo":0==o&&(n="Sem direitos"),e+="<div style=cursor:pointer onclick=goForward('"+i+"')>",e+='<div style="float:left;margin-left:4px"><img src="/images/meshicon50.png" width=50 height=50 /></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+EscapeHtml(meshes[i].name)+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+n+"</div></div>",e+="</div></div>"}QH("p3meshes",e),QV("p3noMeshFound",0==t)}function gotoMesh(e){null==(currentMesh=meshes[e])&&goBack(),p20updateMesh(),go(20)}var sortorder,filetreelocation=[];function p5refreshFiles(){meshserver.send({action:"files"})}function updateFiles(){if(QV("MainMenuMyFiles",0==(8&features)),0==(8&features)){for(var e,t="",o="",n="<a style=cursor:pointer onclick=p5folderup(0)>Raiz</a>",i="Root",a=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),c=0;c<p.length;c++)p[c].checked&&d.push(p[c].value);for(var c in filetreelinkpath="",filetreelocation){if(null==a.f||null==a.f[filetreelocation[c]])break;if(l.push(filetreelocation[c]),i+=" / "+filetreelocation[c],1==s){var u=filetreelocation[c].split("/");e=window.location+u[0]+"files/"+u[2],filetreelinkpath+=filetreelocation[c]}else""!=filetreelinkpath&&(filetreelinkpath+="/"+filetreelocation[c],2<s&&(e+="/"+filetreelocation[c]));n+=" / <a style=cursor:pointer onclick=p5folderup("+s+")>"+(null!=(a=a.f[filetreelocation[c]]).n?a.n:filetreelocation[c])+"</a>",s++}filetreelocation=l;var m=i.toLowerCase().startsWith("root / "+userinfo._id+" / public"),h=p5sort_files(a.f);for(var c in h){var g,v=h[c],f=v.n;g=40<(g=f).length?EscapeHtml(f.substring(0,40))+"...":EscapeHtml(f),f=EscapeHtml(f);var k="";null!=v.s&&(k=getFileSizeStr(v.s));var x="";if(v.t<3||4==v.t){x="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+f+"'>&nbsp;<span style=float:right;padding-right:4px>"+(1==v.t||4==v.t?p5getQuotabar(v):"")+"</span><span><div class=fileIcon"+v.t+'></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(v.nx)+'")>'+g+"</a></span></div>"}else{var y=g,b="";m&&(b=" (<a style=cursor:pointer onclick='p5showPublicLink(\""+e+"/"+v.nx+"\")'>Ligação</a>)"),0<v.s&&(y='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+v.nx)+'">'+g+"</a>"+b),x="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+v.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+k+"</span><span><div class=fileIcon"+v.t+"></div>"+y+"</span></div>"}v.t<3?t+=x:o+=x}if(QH("p5rightOfButtons",p5getQuotabar(a)),QH("p5files",t+o),QH("p5currentpath",n),QE("p5FolderUp",0!=filetreelocation.length),QV("p5PublicShare",m),r==filetreelinkpath){p=document.getElementsByName("fc");for(c=0;c<p.length;c++)p[c].checked=0<=d.indexOf(p[c].value)}p5setActions()}}function getNiceSize(e){return e<=0?"Armazenamento excedido":e<2048?format("{0}b restante",e):e<2097152?format("{0}k restante",Math.round(e/1024)):e<2147483648?format("{0}m restante",Math.round(e/1024/1024)):format("{0}g restante",Math.round(e/1024/1024/1024))}function p5getQuotabar(e){for(;1<e.t&&4!=e.t;)e=e.parent;return 1!=e.t&&4!=e.t||null==e.maxbytes?"":getNiceSize(e.maxbytes-e.s)+" <progress style=height:10px;width:100px value="+e.s+" max="+e.maxbytes+" />"}function p5showPublicLink(e){setDialogMode(2,"Link Público",1,null,'<input type=text style=width:100% value="'+e+'" readonly />')}function p5sort_filename(e,t){return e.ln>t.ln?1*sortorder:e.ln<t.ln?-1*sortorder:0}function p5sort_timestamp(e,t){return e.d>t.d?1*sortorder:e.d<t.d?-1*sortorder:0}function p5sort_bysize(e,t){return e.s==t.s?p5sort_filename(e,t):(e.s-t.s)*sortorder}function p5sort_files(e){var t=[],o=Q("p5sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return sortorder=1,3<o&&(sortorder=-1,o-=3),1==o?t.sort(p5sort_filename):2==o?t.sort(p5sort_bysize):3==o&&t.sort(p5sort_timestamp),t}function p5setActions(){var e=getFileSelCount(),t=getFileCount(),o=getFileSelCount(!1);QE("p5DeleteFileButton",0<e&&0<filetreelocation.length),QE("p5NewFolderButton",0<filetreelocation.length),QE("p5UploadButton",0<filetreelocation.length),QE("p5RenameFileButton",1==e&&0<filetreelocation.length),QE("p5SelectAllButton",0<t),Q("p5SelectAllButton").value=0<e?"Nenhum":"Todos",QE("p5CutButton",0<o&&e==o),QE("p5CopyButton",0<o&&e==o),QE("p5PasteButton",null!=p5clipboard&&0<p5clipboard.length&&0<filetreelocation.length)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function getFileCount(){return document.getElementsByName("fc").length}function p5selectallfile(){for(var e=0==getFileSelCount(),t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked=e;p5setActions()}function setupBackPointers(e){if(null!=e.f){var t=0,o=0;for(var n in e.f)setupBackPointers(e.f[n]),(e.f[n].parent=e).f[n].s&&(t+=e.f[n].s),e.f[n].c&&(o+=e.f[n].c),3==e.f[n].t&&o++;e.s=t,e.c=o}return e}function getFileSizeStr(e){return 1==e?"1 byte":format("{0} bytes",e)}function p5folderup(e){if(null==e)filetreelocation.pop();else for(;filetreelocation.length>e;)filetreelocation.pop();return updateFiles(),!1}function p5folderset(e){return filetreelocation.push(decodeURIComponent(e)),updateFiles(),!1}function p5createfolder(){setDialogMode(2,"Nova pasta",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />"),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var e=getFileSelCount(),t=0<getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p5recdeleteinput>Exclusão recursiva</label><br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"Deletar",3,p5deletefileEx,1<e?format("Excluir {0} itens selecionados?",e)+t:"Excluir item selecionado?"+t)}function p5deletefileEx(){for(var e=[],t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&e.push(t[o].value);meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:e,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){for(var e,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&(e=t[o].value);setDialogMode(2,"Renomear",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:e}),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5renamefileEx(e,t){t.newname=Q("p5renameinput").value,meshserver.send(t)}function p5fileNameCheck(e){var t=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",t),1==t&&e&&13==e.keyCode&&dialogclose(1)}var isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function p5uploadFile(){setDialogMode(2,"Subir arquivo",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=hidden name=authCookie value='+authCookie+" /><input type=submit id=p5loginSubmit style=display:none /></form>"),updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(e){var t=document.getElementsByName("fc");p5clipboard=[],p5clipboardCut=e,p5clipboardFolder=Clone(filetreelocation);for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p5clipboard.push(t[o].value);p5updateClipview()}function p5pasteFile(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Confirme {0} da {1} entrada {2} para este local?",0==p5clipboardCut?"copy":"move",p5clipboard.length,1<p5clipboard.length?"s":"")),setDialogMode(2,"Colar",3,p5pasteFileEx,e)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:0==p5clipboardCut?"copy":"move",scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard}),p5folderup(999),1==p5clipboardCut&&(p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview())}function p5updateClipview(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Mantendo {0} entrada {1} para {2}",p5clipboard.length,1<p5clipboard.length?"s":"",0==p5clipboardCut?"Copiar":"Mover")+', <a href=# onclick="return p5clearClip()" style=cursor:pointer>Limpo</a>.'),QH("p5bottomstatus",e),p5setActions()}function p5clearClip(){return p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview(),!1}function p5fileDragDrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer&&0!=e.dataTransfer.files.length&&0!=filetreelocation.length)for(var t=[],o=[],n=[],i=[],a=e.dataTransfer.files.length,s=0;s<e.dataTransfer.files.length;s++){var l=new FileReader,r=e.dataTransfer.files[s];t.push(r.name),o.push(r.size),n.push(r.type),l.onload=function(e){i.push(e.target.result),0==--a&&(Q("p5fileDragName").value=t.join("*"),Q("p5fileDragSize").value=o.join("*"),Q("p5fileDragType").value=n.join("*"),Q("p5fileDragData").value=i.join("*"),Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath),Q("p5loginSubmit2").click())},l.readAsDataURL(r)}}var p5dragtimer=null;function p5fileDragOver(e){haltEvent(e),null!=p5dragtimer&&(clearTimeout(p5dragtimer),p5dragtimer=null);var t=!0;0==filetreelocation.length&&(t=!1),QV("bigok",t),QV("bigfail",!t)}function p5fileDragLeave(e){haltEvent(e),"p5filetable"!=e.target.id?(QV("bigfail",!1),QV("bigok",!1)):p5dragtimer=setTimeout("QV('bigfail',false);QV('bigok',false);p5dragtimer=null;",200)}function ondeskkeypress(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeys(e)}}function ondeskkeydown(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyDown(e)}}function ondeskkeyup(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyUp(e)}}var updateDevicesTimer=null;function updateDevices(){null==updateDevicesTimer&&(updateDevicesTimer=setTimeout(updateDevicesEx,200))}var deviceHeaderCount,sort=0,deviceHeaderId=0,deviceHeaders={},showRealNames=!1,deviceHeaderTotal=0,deviceHeadersTitles=(deviceHeaders={},{});function updateDevicesEx(){null!=updateDevicesTimer&&(clearTimeout(updateDevicesTimer),updateDevicesTimer=null);var e="",t=0,o=null,n=0,i={};for(var a in deviceHeaderCount={},deviceHeaders={},deviceHeadersTitles={},(deviceHeaderTotal=deviceHeaderId=0)==sort?nodes.sort(meshSort):1==sort?nodes.sort(powerSort):2==sort&&(1==showRealNames?nodes.sort(deviceHostSort):nodes.sort(deviceSort)),nodes)if(0!=nodes[a].v){var s=meshes[nodes[a].meshid].links[userinfo._id];if(null!=s){s.rights;if(0==sort){if(nodes.sort(meshSort),nodes[a].meshid!=o){deviceHeaderSet();var l="";1==meshes[nodes[a].meshid].mtype&&(l="<span style=color:lightgray>Intelreg; </span>"),null!=o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=padding-top:4px><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+nodes[a].meshid+'")>'+EscapeHtml(meshes[nodes[a].meshid].name)+"</span>"+l+"<span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",i[o=nodes[a].meshid]=1,t=0}}else 1==sort?nodes[a].pwr!==o&&(deviceHeaderSet(),null!==o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[a].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",o=nodes[a].pwr,t=0):2==sort&&null==o&&(o="1");n++;var r=EscapeHtml(nodes[a].name);0==r.length&&(r="<i>Nenhum</i>"),null!=nodes[a].rname&&0<nodes[a].rname.length&&(r+=" / "+EscapeHtml(nodes[a].rname));var d=EscapeHtml(nodes[a].name);1==showRealNames&&null!=nodes[a].rname&&(d=EscapeHtml(nodes[a].rname)),0==d.length&&(d="<i>Nenhum</i>");var p=nodes[a].icon,c=NodeStateStr(nodes[a]);nodes[a].conn&&0!=nodes[a].conn||(p+=" gray"),e+="<div style=cursor:pointer onclick=goForward('"+nodes[a]._id+"')>",e+='<div class="i'+p+'" style="float:left;margin-left:4px"></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+d+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+c+"</div></div>",e+="</div></div>",deviceHeaderTotal++,void 0===deviceHeaderCount[nodes[a].state]?deviceHeaderCount[nodes[a].state]=1:deviceHeaderCount[nodes[a].state]++}}if(0==sort)for(var a in meshes){var u=meshes[a],m=u.links[userinfo._id];if(null!=m){m.rights;null==i[u._id]&&(""!=o&&""!=e&&(e+="</tr></table>"),e+="<div><div colspan=3 class=DevSt><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+u._id+'")>'+EscapeHtml(u.name)+"</span></div>",1==u.mtype&&(e+="<div style=padding:10px><i>Nenhum Intel&reg; AMT devices in this group"),2==u.mtype&&(e+="<div style=padding:10px><i>Nenhum dispositivo neste grupo"),e+=".</i></div></div>",o=u._id,n++)}}for(var a in 0==n?QH("xdevices",'<div style="margin-top:50px;text-align:center"><span style="font-size:30px">Nenhum dispositivo</span><br /><br />Use a versão desktop deste site para adicionar dispositivos.</div>'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(a,deviceHeaders[a]);for(var a in deviceHeadersTitles)Q(a).title=deviceHeadersTitles[a]}var powerStatetable=["","Ligado","Hibernar","Hibernar","Hibernar","Hibernando","Desligar","Presente"],powerStateStrings=["","Ligado","Hibernando","Hibernando","Deep Sleep","Hibernando","Soft-Off","Presente"],powerStateStrings2=["","O dispositivo está ligado","O dispositivo está no estado de suspensão (S1)","O dispositivo está no estado de suspensão (S2)","O dispositivo está no estado de sono profundo (S3)","O dispositivo está hibernando (S4)","O dispositivo está no estado soft-off (S5)","O dispositivo está presente, mas o estado de energia não pode ser determinado"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0<e.state&&e.state<powerStatetable.length&&state.push(powerStatetable[e.state]),e.conn&&(0!=(1&e.conn)&&t.push("<span>Agente</span>"),0!=(2&e.conn)?t.push("<span>CIRA</span>"):0!=(4&e.conn)&&t.push("<span>Intel&reg; AMT</span>"),0!=(8&e.conn)&&t.push("<span>Retransmissão</span>"),0!=(16&e.conn)&&t.push("<span>MQTT</span>")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return e<powerStatetable.length?powerStatetable[e]:""}function PowerStateStr2(e){return 0!=e&&e<powerStatetable.length?powerStatetable[e]:"Desconhecido"}function onSortSelectChange(e){sort=document.getElementById("sortselect").selectedIndex,e||putstore("sort",sort),updateDevicesEx()}function deviceHeaderSet(){if(0!=deviceHeaderId){deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+(1==deviceHeaderTotal?" nó":" nós");var e="";for(var t in deviceHeaderCount)0<e.length&&(e+=", "),e+=deviceHeaderCount[t]+" "+PowerStateStr2(t);deviceHeadersTitles["DevxHeader"+deviceHeaderId]=e,deviceHeaderId++,deviceHeaderCount={},deviceHeaderTotal=0}else deviceHeaderId=1}function meshSort(e,t){return e.meshnamel>t.meshnamel?1:e.meshnamel<t.meshnamel?-1:e.meshid==t.meshid?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:0}function powerSort(e,t){var o=e.pwr?e.pwr:0,n=t.pwr?t.pwr:0;return o==n?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:n<o?1:o<n?-1:0}function deviceSort(e,t){return e.namel>t.namel?1:e.namel<t.namel?-1:0}function deviceHostSort(e,t){return e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0}function refreshDevice(e){currentNode&&currentNode._id==e&&gotoDevice(e,xxcurrentView,!0)}function getNodeRights(e){var t=getNodeFromId(e);return meshes[t.meshid].links[userinfo._id].rights}var currentNode,currentDevicePanel=0,powerTimelineNode=null,powerTimelineReq=null,powerTimelineUpdate=null,powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(e,t,o){if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var n=getNodeFromId(e);if(null!=n){var i=meshes[n.meshid];if(null!=i){var a=i.links[userinfo._id].rights;if(!currentNode||currentNode._id!=n._id||1==o){currentNode=n;var s=EscapeHtml(n.name);0==s.length&&(s="<i>Nenhum</i>"),0!=(4&a)&&(s="<span onclick=showEditNodeValueDialog(0) style=cursor:pointer>"+s+"</span>"),QH("p10deviceName",s);var l="<table style=width:100%>";l+=addDeviceAttribute("<span>Grupo</span>",'<a onclick=goForward("'+n.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[n.meshid].name)+"</a>"),null!=n.rname&&(l+=addDeviceAttribute("<span>Nome</span>","<span>"+EscapeHtml(n.rname)+"</span>")),1!=i.mtype&&n.name==n.host||(0!=(4&a)?n.host?l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(n.host)+"</span>"):l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>Nenhum</i></span>"):l+=addDeviceAttribute("Hostname",EscapeHtml(n.host)));var r=n.desc?EscapeHtml(n.desc):"<i>Nenhum</i>";l+=addDeviceAttribute("Descrição",0!=(4&a)?"<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+r+"</span>":r);var d=["Desconhecido","Windows 32 Bits console","Windows 64 Bits console","Serviço Windows 32 Bits","Serviço Windows 64 Bits","Linux 32 bits","Linux 64 bits","MIPS","XENx86","Android ARM","Linux ARM","MacOS 32 bits","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32 bits","MacOS 64 bits","ChromeOS","Linux Poky x86-64 bits","Linux NoKVM x86-32 bits","Linux NoKVM x86-64 bits","Windows MinCore console","Windows MinCore service","NodeJS","ARM-Linaro","ARMv6l / ARMv7l","ARMv8 64bit","ARMv6l / ARMv7l / NoKVM","Desconhecido","Desconhecido","FreeBSD x86-64"];if(null!=n.agent&&null!=n.agent.id&&null!=n.agent.ver){var p="";p=n.agent.id<=d.length?d[n.agent.id]:d[0],0!=n.agent.ver&&(p+=" v"+n.agent.ver),l+=addDeviceAttribute("Agente",p)}if(null!=n.intelamt){p="";var c={0:nobreak("Não ativado (pré)"),1:nobreak("Não ativado (entrada)"),2:nobreak("ativado")};null!=n.intelamt.ver&&null==n.intelamt.state?p+="<i>"+nobreak("Estado desconhecido")+"</i>, v"+n.intelamt.ver:null==n.intelamt.ver&&2==n.intelamt.state?p+="<i>ativado</i>":null==n.intelamt.ver||null==n.intelamt.state?p+="<i>Estado da versão desconhecida</i>":(p+=c[n.intelamt.state],n.intelamt.flags&&(2&n.intelamt.flags?p=" <span>CCM</span>":4&n.intelamt.flags&&(p=" <span>ACM</span>")),p+=", v"+n.intelamt.ver),1==n.intelamt.tls&&(p+=", <span>TLS</span>"),2==n.intelamt.state&&(null!=n.intelamt.user&&""!=n.intelamt.user||(p+=0!=(4&a)?', <i style=color:#FF0000;cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'+nobreak("Sem credenciais")+"</i>":", <i style=color:#FF0000>Sem credenciais</i>"),p+=" ",0!=(4&a)&&(p+='<img src=images/link4.png height=10 width=10 style=cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'));var u="Intel&reg; ME";"number"==typeof n.intelamt.sku&&(0!=(8&n.intelamt.sku)?u="Intel&reg; AMT":0!=(16&n.intelamt.sku)&&(u="Intel&reg; SM")),l+=addDeviceAttribute(u,p)}if(null!=n.agent&&null!=n.agent.tag&&"mailto:"!=n.agent.tag){var m=EscapeHtml(n.agent.tag);m.startsWith("mailto:")&&(m='<a href="'+m+'">'+m.substring(7)+"</a>"),l+=addDeviceAttribute("Etiqueta do agente",m)}var h=n.conn;if(h&&1<h){var g=[];0!=(1&n.conn)&&g.push("<span>Agente</span>"),0!=(2&n.conn)?g.push("<span>Intel&reg; AMT CIRA</span>"):0!=(4&n.conn)&&g.push("<span>Intel&reg; AMT</span>"),0!=(8&n.conn)&&g.push("<span>Retransmissão do agente</span>"),0!=(16&n.conn)&&g.push("<span>MQTT</span>"),l+=addDeviceAttribute("Conectividade",g.join(", "))}var v="<i>Nenhum</i>";if(null!=n.tags)for(var f in v="",n.tags)v+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+n.tags[f]+"</span>";l+=addDeviceAttribute("Tags",0!=(4&a)?"<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+v+"</span>":v),l+="</table><br />",0!=(76&a)&&(l+="<input type=button value=Actions onclick=deviceActionFunction() />"),QH("p10html",l),setupFiles(),l="<div style=float:right;font-size:x-small;margin-right:10px>",0!=(4&a)&&(l+='<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+n._id+'")>Excluir dispositivo</a>'),l+="</div><div style=font-size:x-small>",l+="</div><br>",QH("p10html3",l);var k=PowerStateStr(n.state);0!=(1&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Mesh Agent</span>"),0!=(2&h)?(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT conectado</span>"):0!=(4&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT detectado</span>"),0!=(16&h)&&(0<k.length&&(k+="<br/>"),k+="<span style=font-size:12px>Canal MQTT conectado</span>"),QH("MainComputerState",k),QH("MainComputerImage",'<div class="i'+n.icon+'"></div>'),powerTimelineNode!=currentNode._id&&powerTimelineReq!=currentNode._id&&(QH("p10html2",""),powerTimelineReq=currentNode._id,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}setupDesktop(),go(t=t||10),setupDeviceMenu()}else goBack()}else goBack()}else setDialogMode(2,"Segurança da Conta",1,null,'Não foi possível acessar um dispositivo até que a autenticação de dois fatores esteja ativada. Isso é necessário para segurança extra. Vá para "Minha conta" e veja a seção "Segurança da conta".');else setDialogMode(2,"Segurança da Conta",1,null,'Não foi possível acessar um dispositivo até que um endereço de email seja verificado. Isso é necessário para a recuperação de senha. Vá para "Minha conta" para alterar e verificar um endereço de email.')}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"Brinde do dispositivo",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var o=0;currentNode&&(o=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var n=[];0!=currentDevicePanel&&n.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&o||256&o)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8&currentNode.intelamt.sku))||currentNode.agent&&1&currentNode.agent.caps)&&n.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&o&&(4294967295==o||0==(1024&o))&&2==currentNode.mtype&&4&currentNode.agent.caps&&n.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(n)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="Selecione uma operação para executar neste dispositivo.<br /><br />",o="<select id=d2deviceop style=float:right;width:170px>";0!=(64&e)&&(o+="<option value=100>Ligar</option>"),0!=(8&e)&&(o+="<option value=4>Hibernar</option><option value=3>Redefinir</option><option value=2>Desligar</option>"),setDialogMode(2,"Ação do dispositivo",3,deviceActionFunctionEx,t+=addHtmlValue("Operação",o+="</select>"))}}function deviceActionFunctionEx(){var e=Q("d2deviceop").value;100==e?meshserver.send({action:"wakedevices",nodeids:[currentNode._id]}):meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:e})}function updateDeviceTimeline(){2==meshserver.State&&null!=powerTimelineNode&&null!=powerTimelineUpdate&&null!=currentNode&&powerTimelineNode==powerTimelineReq&&currentNode._id==powerTimelineNode&&powerTimelineUpdate<Date.now()&&(powerTimelineUpdate=null,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}function drawDeviceTimeline(){var e=null,t=Date.now();currentNode._id==powerTimelineNode&&(e=powerTimeline);var o=new Date;o.setHours(0,0,0,0);(o=new Date(o.getTime()-5184e5)).getTime();var n=[];if(null!=e&&1<e.length){n.push([0,e[1],e[0]]);for(var i=e[1],a=2;a<e.length;a+=2){var s=e[a],l=t;e.length>a+1&&(l=e[a+1]),n.push([i,i+l,s]),i+=l}}var r="",d=1,p=new Date,c=Q("masthead").offsetWidth-122;p.setHours(0,0,0,0);for(a=0;a<7;a++){var u="",m=p.getTime(),h=m+864e5;for(var g in n){var v=n[g];if(1==isTimeBlockInside(m,h,v[0],v[1])){var f=Math.max(m,v[0]),k=Math.min(Math.min(h,v[1]),t),x=Math.round((k-f)*c/864e5);0<x&&(u+="<div style=display:table-cell;width:"+x+"px;background-color:"+powerColor(v[2])+";height:16px></div>")}}r+="<tr style="+(d%2==0?"background-color:#DDD":"")+"><td><div>&nbsp;"+printDate(p)+"<div></div></div></td><td><div>"+u+"</div></td></tr>",++d,p=new Date(p.getTime()-864e5)}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse;width:calc(100% - 18px);margin:9px" border=0 cellpadding=2 cellspacing=0><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:90px>Day</th><th scope=col style=text-align:center>Power State</th></tr>'+r+"</tbody></table>")}function powerColor(e){return e<powerColorTable.length?powerColorTable[e]:"yellow"}function isTimeBlockInside(e,t,o,n){return o<e&&t<n||(e<o&&o<t||e<n&&n<t)}function addDeviceAttribute(e,t){return"<tr><td style=width:100px;color:gray>"+e+"</td><td style=overflow:hidden>"+t+"</td></tr>"}function editDeviceAmtSettings(e,t){if(!xxdialogMode){var o="",n=getNodeFromId(e),i=3;0!=(4&getNodeRights(e))&&(o+=addHtmlValue("Nome de usuário",'<input id=dp10username style=width:170px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />'),o+=addHtmlValue("Senha","<input id=dp10password type=password style=width:170px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />"),o+=addHtmlValue("Segurança","<select id=dp10tls style=width:176px><option value=0>Sem segurança TLS</option><option value=1>Segurança TLS necessária</option></select>"),null!=n.intelamt.user&&""!=n.intelamt.user&&(i=7),setDialogMode(2,"Editar Intel & reg; Credenciais AMT",i,editDeviceAmtSettingsEx,o,{node:n,func:t}),null!=n.intelamt.user&&""!=n.intelamt.user?Q("dp10username").value=n.intelamt.user:Q("dp10username").value="admin",Q("dp10tls").value=n.intelamt.tls,validateDeviceAmtSettings())}}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(e,t){if(2==e)meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:"",pass:""}});else{var o=Q("dp10username").value;""==o&&(o="admin");var n=Q("dp10password").value;""==n&&(o=""),meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:o,pass:n,tls:Q("dp10tls").value}}),t.node.intelamt.user=o,t.node.intelamt.tls=Q("dp10tls").value,t.func&&setTimeout(t.func,300)}}function p10showDeleteNodeDialog(e){xxdialogMode||(setDialogMode(2,"Excluir nó",3,p10showDeleteNodeDialogEx,format("Excluir {0}?",EscapeHtml(currentNode.name))+"<br /><br /><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />Confirme",e),p10validateDeleteNodeDialog())}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(e,t){meshserver.send({action:"removedevices",nodeids:[t]})}function p10showiconselector(){if(!xxdialogMode&&0!=(4&meshes[currentNode.meshid].links[userinfo._id].rights)){"<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>","<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>","<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br>","<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>","<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>","<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>",setDialogMode(2,"Seleção de ícone",0,null,"<table align=center><td><div style=display:inline-block class=i1 onclick=p10setIcon(1)></div><div style=display:inline-block class=i2 onclick=p10setIcon(2)></div><div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br><div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><div style=display:inline-block class=i5 onclick=p10setIcon(5)></div><div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>"),QV("id_dialogclose",!0)}}function p10setIcon(e){setDialogMode(0),meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:e})}var desktop,desktopNode,showEditNodeValueDialog_modes=["Nome do Dispositivo","Hostname","Descrição","Tags"],showEditNodeValueDialog_modes2=["name","host","desc","tags"],showEditNodeValueDialog_modes3=["","","","Grupo1, Grupo2, Grupo3"];function showEditNodeValueDialog(e){if(!xxdialogMode){setDialogMode(2,"Editar dispositivo",3,showEditNodeValueDialogEx,addHtmlValue(showEditNodeValueDialog_modes[e],'<input id=dp10devicevalue style=width:170px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[e]+'" onchange=p10editdevicevalueValidate('+e+",event) onkeyup=p10editdevicevalueValidate("+e+",event) />"),e);var t=currentNode[showEditNodeValueDialog_modes2[e]];null==t&&(t=""),Array.isArray(t)&&(t=t.join(", ")),Q("dp10devicevalue").value=t,p10editdevicevalueValidate(),Q("dp10devicevalue").focus()}}function showEditNodeValueDialogEx(e,t){var o={action:"changedevice",nodeid:currentNode._id};o[showEditNodeValueDialog_modes2[t]]=Q("dp10devicevalue").value,meshserver.send(o)}function p10editdevicevalueValidate(e,t){var o=1<e||0<Q("dp10devicevalue").value.length;QE("idx_dlgOkButton",o),null!=t&&1==o&&13==t.keyCode&&dialogclose(1)}var desktopsettings={encoding:2,showfocus:!1,showmouse:!0,showcad:!0,quality:40,scaling:1024,framerate:50};function setupDesktop(){desktopNode!=currentNode&&null!=desktop&&(desktop.Stop(),desktop=desktopNode=null),desktopNode==currentNode&&null!=desktop||(QH("DeskParent",'<canvas id=Desk width=640 height=200 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>'),desktopNode=currentNode,Q("Desk").addEventListener("DOMMouseScroll",function(e){return dmousewheel(e)}),Q("Desk").addEventListener("mousewheel",function(e){return dmousewheel(e)})),desktopNode=currentNode,updateDesktopButtons(),Q("Desk").toBlob||QV("deskSaveBtn",!1)}function updateDesktopButtons(){var e=meshes[currentNode.meshid],t=0;null!=desktop&&(t=desktop.State);var o=e.links[userinfo._id].rights;QV("disconnectbutton1",0!=t),QV("connectbutton1",0==t&&2==e.mtype&&(8&o||256&o)),QV("connectbutton1h",0==t&&8&o&&(1==e.mtype||null!=currentNode.intelamt&&2==currentNode.intelamt.state&&null!=currentNode.intelamt.ver&&"number"==typeof currentNode.intelamt.sku&&0!=(8&currentNode.intelamt.sku))),QV("d7amtkvm",!(null==currentNode.intelamt||null==currentNode.intelamt.ver&&1!=e.mtype||0!=t&&2!=desktop.contype)),QV("d7meshkvm",2==e.mtype&&(0==t||1==desktop.contype));var n=0!=(1&currentNode.conn);QE("connectbutton1",n);var i=0!=(6&currentNode.conn);QE("connectbutton1h",i),QV("DeskToastButton",0!=(16384&o)&&currentNode.agent&&currentNode.agent.id<5&&8&o),QV("deskActionsBtn",8&o),Q("DeskControl").checked=0!=(8&o),0==n&&QV("DeskTools",!1)}function connectDesktop(e,t){if(setSessionActivity(),null==desktop)if(desktopNode=currentNode,2==t){if(null==desktopNode.intelamt.user||""==desktopNode.intelamt.user)return void editDeviceAmtSettings(desktopNode._id,connectDesktop);(desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie)).debugmode=debugmode,desktop.onStateChanged=onDesktopStateChange,desktop.m.bpp=1==desktopsettings.encoding||3==desktopsettings.encoding?1:2,desktop.m.useZRLE=desktopsettings.encoding<3,desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id,16994,"*","*",0),desktop.contype=2}else(desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).debugmode=debugmode,desktop.m.debugmode=debugmode,desktop.attemptWebRTC=attemptWebRTC,desktop.onStateChanged=onDesktopStateChange,desktop.m.CompressionLevel=desktopsettings.quality,desktop.m.ScalingLevel=desktopsettings.scaling,desktop.m.FrameRateTimer=desktopsettings.framerate,desktop.m.onDisplayinfo=deskDisplayInfo,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id),desktop.contype=1;else desktop.Stop(),desktopNode=desktop=null}function onDesktopStateChange(e,t){var o=t;3==o&&2==e.contype&&o++;var n=StatusStrs[o];switch(null!=desktop&&1==desktop.webRtcActive&&(n+=", WebRTC"),QH("deskstatus",n),t){case 0:desktop.Stop(),desktopNode=desktop=null,QV("termdisplays",!1),1==fullscreen&&deskToggleFull()}updateDesktopButtons(),deskAdjust(),setTimeout(deskAdjust,50)}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),updateDesktopButtons(),setDialogMode(7,"Configurações da área de trabalho remota",3,showDesktopSettingsChanged))}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value,desktopsettings.showfocus=d7showfocus.checked,desktopsettings.showmouse=d7showcursor.checked,desktopsettings.quality=d7bitmapquality.value,desktopsettings.scaling=d7bitmapscaling.value,desktopsettings.framerate=d7framelimiter.value,localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings)),applyDesktopSettings(),desktop&&(1==desktop.contype&&0!=desktop.State&&desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate),2==desktop.contype&&0!=desktop.State&&(desktop.Stop(),setTimeout(function(){connectDesktop(null,2)},50)))}function applyDesktopSettings(){var e="",t=512&features?[90,70,50,40,30,20,10,5,1]:[50,40,30,20,10,5,1];for(var o in t)e+="<option value="+t[o]+">"+t[o]+"%</option>";QH("d7bitmapquality",e),d7desktopmode.value=desktopsettings.encoding,d7showfocus.checked=desktopsettings.showfocus,d7showcursor.checked=desktopsettings.showmouse,d7bitmapquality.value=40,0<=t.indexOf(parseInt(desktopsettings.quality))&&(d7bitmapquality.value=desktopsettings.quality),d7bitmapscaling.value=desktopsettings.scaling,desktopsettings.framerate&&(d7framelimiter.value=desktopsettings.framerate)}var fullscreen=!1;function deskAdjust(){var e=(Q("DeskParent").clientHeight-Q("Desk").clientHeight)/2;if(e<0){var t=Q("DeskParent").clientHeight,o=9999;desktop&&(o=desktop.m.width/desktop.m.height*t),QS("Desk")["max-height"]=t+"px",QS("Desk")["max-width"]=o+"px",e=0}else QS("Desk")["max-height"]=null,QS("Desk")["max-width"]=null;QS("Desk")["margin-top"]=e+"px",QS("Desk")["margin-bottom"]=e+"px"}function deskSendKeys(){if(!xxdialogMode&&null!=desktop&&3==desktop.State){var e=Q("deskkeys").value;0==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]]):1==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]]):2==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]]):desktop.sendCtrlMsg('{"action":"lock"}'):3==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]]):4==e?2==desktop.contype?desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]]):5==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]]):6==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]]):7==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65473,1],[65473,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,115],[desktop.m.KeyAction.UP,115],[desktop.m.KeyAction.EXUP,18]]):8==e?2==desktop.contype?desktop.m.sendkey([[65507,1],[119,1],[119,0],[65507,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,17],[desktop.m.KeyAction.DOWN,87],[desktop.m.KeyAction.UP,87],[desktop.m.KeyAction.EXUP,17]]):9==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65289,1],[65289,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9],[desktop.m.KeyAction.EXUP,18]]):10==e?desktop.m.sendcad():11==e&&(2==desktop.contype?desktop.m.sendkey([[65289,1],[65289,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9]]))}}function sendSpecialKeys(){xxdialogMode||null==desktop||3!=desktop.State||setDialogMode(3,"Chaves especiais",3,deskSendKeys)}function toggleSoftKeys(e){QV("DeskSoftInput",1==e),1==e&&Q("DeskSoftInput").focus()}function toggleDeskTools(){setSessionActivity(),xxdialogMode||("none"==QS("DeskTools").display?(QV("DeskTools",!0),Q("DeskTools").nodeid=currentNode._id,refreshDeskTools()):QV("DeskTools",!1))}function refreshDeskTools(){setSessionActivity(),QV("DeskToolsRefreshButton",!1),setTimeout(refreshDeskToolsEx,500),meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",!0)}var filesNode,deskTools={sort:1,msg:null};function sortProcess(e){deskTools.sort=e,showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(e,t){return e.p>t.p?1:e.p<t.p?-1:0}function sortProcessName(e,t){return e.d>t.d?1:e.d<t.d?-1:0}function showDeskToolsProcesses(e){if(null!=(deskTools.msg=e)){if(Q("DeskTools").nodeid==e.nodeid){var t=[],o=null;try{o=JSON.parse(e.value)}catch(e){}if(console.log(o),null!=o){for(var n in o)t.push({p:parseInt(n),c:o[n].cmd,d:o[n].cmd.toLowerCase(),u:o[n].user});0==deskTools.sort?t.sort(sortProcessPid):1==deskTools.sort&&t.sort(sortProcessName);var i="";for(var a in t)0!=t[a].p&&(i+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+t[a].p+"</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess("+t[a].p+',"'+t[a].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(t[a].u?t[a].u:"")+"</div><div>"+t[a].c+"</div></div>");QH("DeskToolsProcesses",i)}}}else QH("DeskToolsProcesses","")}function deskSaveImage(){if(setSessionActivity(),!xxdialogMode&&null!=desktop&&3==desktop.State){var e=new Date,t="Desktop-"+currentNode.name+"-"+e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)+"-"+("0"+e.getHours()).slice(-2)+"-"+("0"+e.getMinutes()).slice(-2);Q("Desk").toBlob(function(e){saveAs(e,t+".jpg")})}}function deskDisplayInfo(e,t,o,n){var i=Q("termdisplays").value;if(0<t.length){var a="";for(var s in t)a+="<option"+(i==t[s]?" selected":"")+">"+t[s]+"</option>";QH("termdisplays",a)}QV("termdisplays",0<t.length)}function deskGetDisplayNumbers(e){desktop.m.GetDisplayNumbers()}function deskSetDisplay(e){setSessionActivity();var t=0,o=Q("termdisplays").value;t="Todas as telas"==o?65535:parseInt(o.substring(8)),desktop.m.SetDisplay(t)}function dmousedown(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousedown(e)}function dmouseup(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mouseup(e)}function dmousemove(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousemove(e)}function dmousewheel(e){return setSessionActivity(),!(xxdialogMode||null==desktop||!desktop.m.mousewheel)&&(desktop.m.mousewheel(e),haltEvent(e),!0)}function drotate(e){xxdialogMode||null==desktop||(desktop.m.setRotation(desktop.m.rotation+e),deskAdjust(),deskAdjust())}function stopProcess(e,t){return setDialogMode(2,"Controle do processo",3,stopProcessEx,format('Parar processo #{0} "{1}"?',e,t),e),!1}function stopProcessEx(e,t){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:t}),setTimeout(refreshDeskTools,300)}function setupFiles(){var e=filesNode==currentNode,t=0!=(1&(filesNode=currentNode).conn);QE("p13Connect",t),0!=e&&0!=t||!files||(files.Stop(),files=null)}function onFilesStateChange(e,t){setSessionActivity(),p13Connect.value=0==t?"Conectar":"Desconectar";var o=StatusStrs[t];switch(1==files.webRtcActive&&(o+=", WebRTC"),Q("p13Status").textContent=o,t){case 0:QH("p13files",""),p13filetree=null,p13filetreelocation=[],QH("p13currentpath",""),QE("p13FolderUp",!1),p13setActions(),null!=files&&(files.Stop(),files=null);break;case 3:p13targetpath="",files.sendText({action:"ls",reqid:1,path:""})}}function CreateRemoteFiles(e){var t={protocol:5};return t.onFileUpdate=e,t.xxStateChange=function(e){},t.ProcessData=function(e){t.onFileUpdate(e)},t}var autoConnectFilesTimer=null;function autoConnectFiles(e){autoConnectFilesTimer=null==autoConnectFilesTimer?setInterval(connectFiles,100):(clearInterval(autoConnectFilesTimer),null)}function connectFiles(e){files?(files.Stop(),files=null):((files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).attemptWebRTC=attemptWebRTC,files.onStateChanged=onFilesStateChange,files.Start(filesNode._id)),p13clipboard=p13clipboardFolder=null,p13clipboardCut=0,p13updateClipview()}var p13sortorder,p13filetree=null,p13targetpath=null,p13filetreelocation=[];function p13gotFiles(e){if(setSessionActivity(),0<e.length&&123!=e.charCodeAt(0))p13gotDownloadBinaryData(e);else if("download"!=(e=JSON.parse(decode_utf8(e))).action)if(e.path=e.path.replace(/\//g,"\\"),null!=p13filetree&&e.path==p13filetree.path){var t=p13getCheckedNames();p13filetree=e,p13updateFiles(t)}else{for(var o=e.path.replace(/\//g,"\\"),n=p13targetpath.replace(/\//g,"\\");0<o.length&&"\\"==o[0];)o=o.substring(1);for(;0<n.length&&"\\"==n[0];)n=n.substring(1);(o==n||"\\"==e.path&&""==p13targetpath)&&(p13filetree=e,p13updateFiles())}else p13gotDownloadCommand(e)}function p13getCheckedNames(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);return e}function p13updateFiles(e){var t="",o="",n="<a style=cursor:pointer onclick=p13folderup(0)>Raiz</a>",i=p13filetree.path.split("\\");for(var a in p13filetreelocation=[],i)""!=i[a]&&p13filetreelocation.push(i[a]);for(var a in p13filetreelocation)n+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(a)+1)+")>"+p13filetreelocation[a]+"</a>";var s=p13filetreelocation.join("/"),l=p13sort_files(p13filetree.dir);for(var a in l){var r,d=l[a],p=d.n;r=70<(r=p).length?EscapeHtml(p.substring(0,70))+"...":EscapeHtml(p),p=EscapeHtml(p);var c="";null!=d.s&&(c=getFileSizeStr(d.s));var u="";if(d.t<3){u="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right></span><span><div class=fileIcon"+d.t+'></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+r+"</a></span></div>"}else{var m=r;0<d.s&&(m='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+p)+"','"+encodeURIComponent(p)+"',"+d.s+')">'+r+"</a>"),u="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+c+"</span><span><div class=fileIcon"+d.t+"></div>"+m+"</span></div>"}d.t<3?t+=u:o+=u}if(QH("p13files",t+o),QH("p13currentpath",n),QE("p13FolderUp",0!=p13filetreelocation.length),null!=e){var h=document.getElementsByName("fd");for(a=0;a<h.length;a++)0<=e.indexOf(p13filetree.dir[h[a].value].n)&&(h[a].checked=!0)}p13setActions()}function p13folderset(e){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[e].n).split("\\").join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(e){if(null==e)p13filetreelocation.pop();else for(;p13filetreelocation.length>e;)p13filetreelocation.pop();p13targetpath=p13filetreelocation.join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13sort_filename(e,t){return e.ln>t.ln?1*p13sortorder:e.ln<t.ln?-1*p13sortorder:0}function p13sort_timestamp(e,t){return e.d>t.d?1*p13sortorder:e.d<t.d?-1*p13sortorder:0}function p13sort_bysize(e,t){return e.s==t.s?p13sort_filename(e,t):(e.s-t.s)*p13sortorder}function p13sort_files(e){var t=[],o=Q("p13sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].s&&(e[n].s=0),null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return p13sortorder=1,3<o&&(p13sortorder=-1,o-=3),1==o?t.sort(p13sort_filename):2==o?t.sort(p13sort_bysize):3==o&&t.sort(p13sort_timestamp),t}function p13setActions(){if(null==p13filetree)QE("p13DeleteFileButton",!1),QE("p13NewFolderButton",!1),QE("p13UploadButton",!1),QE("p13RenameFileButton",!1),QE("p13SelectAllButton",!1),Q("p13SelectAllButton").value="Todos",QE("p13RefreshButton",!1),QE("p13CutButton",!1),QE("p13CopyButton",!1),QE("p13PasteButton",!1);else{var e=p13getFileSelCount(),t=p13getFileCount(),o=p13getFileSelCount(!1),n=0<currentNode.agent.id&&currentNode.agent.id<5;QE("p13DeleteFileButton",0<e&&(0<p13filetreelocation.length||0==n)),QE("p13NewFolderButton",0<p13filetreelocation.length||0==n),QE("p13UploadButton",0<p13filetreelocation.length||0==n),QE("p13RenameFileButton",1==e&&(0<p13filetreelocation.length||0==n)),QE("p13SelectAllButton",0<t),Q("p13SelectAllButton").value=0<e?"Nenhum":"Todos",QE("p13RefreshButton",!0),QE("p13CutButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13CopyButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13PasteButton",(0<p13filetreelocation.length||0==n)&&null!=p13clipboard&&0<p13clipboard.length)}}function p13getFileSelCount(e){for(var t=0,o=document.getElementsByName("fd"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function p13getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function p13getFileCount(){return document.getElementsByName("fd").length}function p13selectallfile(){for(var e=0==p13getFileSelCount(),t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked=e;p13setActions()}function p13createfolder(){setDialogMode(2,"Nova pasta",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />"),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value}),p13folderup(999)}function p13deletefile(){var e=p13getFileSelCount(),t=0<p13getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p13recdeleteinput>Exclusão recursiva</label><br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"Deletar",3,p13deletefileEx,1<e?format("Excluir {0} itens selecionados?",e)+t:"Excluir item selecionado?"+t)}function p13deletefileEx(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:e,rec:Q("p13recdeleteinput").checked}),p13folderup(999)}function p13renamefile(){for(var e,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&(e=p13filetree.dir[t[o].value].n);setDialogMode(2,"Renomear",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:e}),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13renamefileEx(e,t){t.newname=Q("p13renameinput").value,files.sendText(t),p13folderup(999)}function p13fileNameCheck(e){var t=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",t),1==t&&null!=e&&13==e.keyCode&&dialogclose(1)}function p13uploadFile(){setDialogMode(2,"Subir arquivo",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />"),updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}function p13viewfile(){for(var e=document.getElementsByName("fd"),t=0;t<e.length;t++)if(e[t].checked){p13filetree.dir[e[t].value].s<=204800?p13downloadfile(encodeURIComponent(p13filetreelocation.join("/")+"/"+p13filetree.dir[e[t].value].n),encodeURIComponent(p13filetree.dir[e[t].value].n),p13filetree.dir[e[t].value].s,"viewer"):messagebox("Editor de Arquivos","Somente arquivos com menos de 200k podem ser editados.");break}}var downloadFile,uploadFile,currentMesh,p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(e){var t=document.getElementsByName("fd");p13clipboard=[],p13clipboardCut=e,p13clipboardFolder=p13targetpath;for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p13clipboard.push(p13filetree.dir[t[o].value].n);p13updateClipview()}function p13pasteFile(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format("Confirmar cópia de {0} entradas para este local?",p13clipboard.length):format("Confirmar cópia de 1 entrada para este local?"):1<p13clipboard.length?format("Confirmar a movimentação de {0} entradas para este local?",p13clipboard.length):format("Confirmar a movimentação de 1 entrada para este local?")),setDialogMode(2,"Colar",3,p13pasteFileEx,e)}function p13pasteFileEx(){files.sendText({action:0==p13clipboardCut?"copy":"move",reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard}),p13folderup(999),1==p13clipboardCut&&(p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview())}function p13updateClipview(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format('Mantendo {0} entradas para cópia, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Limpo</a>.',p13clipboard.length):format('Mantendo 1 entrada para cópia, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Limpo</a>.'):1<p13clipboard.length?format('Manter {0} entradas para mover, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Limpo</a>.',p13clipboard.length):format('Segurando 1 entrada para mover, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Limpo</a>.')),QH("p13bottomstatus",e),p13setActions()}function p13clearClip(){return p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview(),!1}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileCount(){return document.getElementsByName("fc").length}function p13downloadfile(e,t,o){xxdialogMode||downloadFile||!files||(downloadFile={path:decodeURIComponent(e),file:decodeURIComponent(t),size:o,tsize:0,data:"",state:0,id:Math.random()},files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path}),setDialogMode(2,"⇬ Fazer download do arquivo",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+o+" />"))}function p13downloadFileCancel(){setDialogMode(0),files.sendText({action:"download",sub:"cancel",id:downloadFile.id}),downloadFile=null}function p13gotDownloadCommand(e){null!=downloadFile&&e.id==downloadFile.id&&("start"==e.sub?(downloadFile.state=1,files.sendText({action:"download",sub:"startack",id:downloadFile.id})):"cancel"==e.sub&&(downloadFile=null,setDialogMode(0)))}function p13gotDownloadBinaryData(e){downloadFile&&0!=downloadFile.state&&(4<e.length&&(downloadFile.tsize+=e.length-4,downloadFile.data+=e.substring(4),Q("d2progressBar").value=downloadFile.tsize),0!=(1&ReadInt(e,0))?(saveAs(data2blob(downloadFile.data),downloadFile.file),downloadFile=null,setDialogMode(0)):files.sendText({action:"download",sub:"ack",id:downloadFile.id}))}function p13doUploadFiles(e){xxdialogMode||((uploadFile={}).xpath=p13filetreelocation.join("/"),uploadFile.xfiles=e,uploadFile.xfilePtr=-1,setDialogMode(2,"Subir arquivo",10,p13uploadFileCancel,"<div id=p13dfileName>Conectando...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />"),p13uploadReconnect())}function onFileUploadStateChange(e,t){switch(t){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",t)}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie,authRelayCookie,domainUrl),uploadFile.ws.attemptWebRTC=!1,uploadFile.ws.ctrlMsgAllowed=!1,uploadFile.ws.onStateChanged=onFileUploadStateChange,uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){if(uploadFile.xfilePtr++,uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var e=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",e.name),Q("d2progressBar").max=e.size,Q("d2progressBar").value=0,uploadFile.xreader=new FileReader,uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result,uploadFile.ws.sendText({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:e.name,size:uploadFile.xdata.byteLength})},uploadFile.xreader.readAsArrayBuffer(e)}else p13uploadFileCancel()}function p13uploadFileCancel(e,t){null!=uploadFile&&(null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile=null),setDialogMode(0)}function p13gotUploadData(e){var t=JSON.parse(e);if(null!=uploadFile&&parseInt(uploadFile.xfilePtr)==parseInt(t.reqid))if("uploadstart"==t.action){p13uploadNextPart(!1);for(var o=0;o<8;o++)p13uploadNextPart(!0)}else"uploadack"==t.action?p13uploadNextPart(!1):"uploaderror"==t.action&&p13uploadFileCancel()}function p13uploadNextPart(e){var t=uploadFile.xdata,o=uploadFile.xptr,n=uploadFile.xptr+4096;if(n>t.byteLength){if(1==e)return;n=t.byteLength}if(o==t.byteLength)null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile.xfiles.length>uploadFile.xfilePtr+1?p13uploadReconnect():p13uploadFileCancel();else{var i=t.slice(o,n);uploadFile.ws.send(i),uploadFile.xptr=n,Q("d2progressBar").value=n}}function p20updateMesh(){if(null!=currentMesh){QH("p20meshName",EscapeHtml(currentMesh.name));var e=format("Desconhecido # {0}",currentMesh.mtype),t=currentMesh.links[userinfo._id].rights;1==currentMesh.mtype&&(e="Intel&reg; Apenas AMT, nenhum agente"),2==currentMesh.mtype&&(e="Gerenciado usando um agente de software");var o="";o+=addHtmlValue("Nome",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",0!=(1&t))),o+=addHtmlValue("Descrição",addLinkConditional(currentMesh.desc&&""!=currentMesh.desc?EscapeHtml(currentMesh.desc):"<i>Nenhum</i>","p20editmesh(2)",0!=(1&t))),o+=addHtmlValue("Tipo",e),o+="<br style=clear:both><br>";var n=currentMesh.links[userinfo._id];n&&0!=(2&n.rights)&&(o+="<div style=margin-bottom:6px><a onclick=p20showAddMeshUserDialog() style=cursor:pointer><img src=images/icon-addnew.png border=0 height=12 width=12> Adicionar usuário</a></div>"),o+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>Autorizações de usuário</th></tr>';var i=1,a=[];for(var s in currentMesh.links)a.push({id:s,name:s.split("/")[2],rights:currentMesh.links[s].rights});for(var s in a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),a){var l="",r="Direitos parciais",d=a[s].rights;4294967295==d?r="Administrador completo":0==d&&(r="Sem direitos"),s==userinfo._id||4294967295!=t&&0==(2&t)||(l='<a onclick=p20deleteUser(event,"'+encodeURIComponent(a[s].id)+'") style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'),o+='<tr onclick=p20viewuser("'+encodeURIComponent(a[s].id)+'") style=height:32px;cursor:pointer'+(i%2==0?";background-color:#DDD":"")+"><td>",o+="<div style=float:right>"+l+"</div><div style=float:right;padding-right:4px>"+r+"</div><div class=m2></div><div>&nbsp;"+EscapeHtml(decodeURIComponent(a[s].name))+"<div></div></div>",o+="</td></tr>",++i}o+="</tbody></table>",4294967295==t&&(o+="<div style=font-size:small;text-align:right;margin-top:6px><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>Excluir grupo</a></span></div>"),QH("p20info",o)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("Tem certeza de que deseja excluir o grupo {0}? A exclusão do grupo de dispositivos também excluirá todas as informações sobre os dispositivos desse grupo.",EscapeHtml(currentMesh.name))+"<br /><br />";return setDialogMode(2,"Excluir grupo",3,p20showDeleteMeshDialogEx,e+="<label><input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />Confirme</label>"),p20validateDeleteMeshDialog(),!1}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(e,t){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(e){if(!xxdialogMode){var t=addHtmlValue("Nome","<input id=dp20meshname style=width:170px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");setDialogMode(2,"Editar grupo de dispositivos",3,p20editmeshEx,t+=addHtmlValue("Descrição","<input id=dp20meshdesc style=width:170px maxlength=1024 onkeyup=p20editmeshValidate() />")),Q("dp20meshname").value=currentMesh.name,currentMesh.desc&&(Q("dp20meshdesc").value=currentMesh.desc),p20editmeshValidate(),2==e?Q("dp20meshdesc").focus():Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",0<Q("dp20meshname").value.length)}function p20showAddMeshUserDialog(){if(!xxdialogMode){var e=addHtmlValue("User","<input id=dp20username style=width:170px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");e+='<div style="border:2px groove gray;background-color:white;max-height:120px;overflow-y:scroll">',e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>Administrador completo</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>Editar grupo de dispositivos</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>Gerenciar usuários do grupo de dispositivos</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>Gerenciar computadores do grupo de dispositivos</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>Controle remoto</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>Somente visualização remota</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotelimitedinput style=margin-left:12px>Somente entrada limitada</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>Sem acesso ao terminal</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>Sem acesso a arquivos</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>Nenhum Intel&reg; AMT</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>Mesh Agent Console</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>Arquivos do servidor</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>Reativar dispositivo</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>Editar notas do dispositivo</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20limitevents>Mostrar apenas eventos próprios</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20chatnotify>Chat & Notificação</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20uninstall>Uninstall Agent</label><br>",setDialogMode(2,"Adicionar usuário à malha",3,p20showAddMeshUserDialogEx,e+="</div>"),p20validateAddMeshUserDialog(),Q("dp20username").focus()}}function p20validateAddMeshUserDialog(){var e=currentMesh.links[userinfo._id].rights,t=!Q("p20fulladmin").checked;QE("p20fulladmin",4294967295==e),QE("p20editmesh",t&&4294967295==e),QE("p20manageusers",t),QE("p20managecomputers",t),QE("p20remotecontrol",t),QE("p20meshagentconsole",t),QE("p20meshserverfiles",t),QE("p20wakedevices",t),QE("p20editnotes",t),QE("p20limitevents",t),QE("p20remoteview",t&&Q("p20remotecontrol").checked),QE("p20remotelimitedinput",t&&Q("p20remotecontrol").checked&&!Q("p20remoteview").checked),QE("p20noterminal",t&&Q("p20remotecontrol").checked),QE("p20nofiles",t&&Q("p20remotecontrol").checked),QE("p20noamt",t&&Q("p20remotecontrol").checked),QE("p20chatnotify",t),QE("p20uninstall",t)}function p20showAddMeshUserDialogEx(){var e=0;1==Q("p20fulladmin").checked?e=4294967295:(1==Q("p20editmesh").checked&&(e+=1),1==Q("p20manageusers").checked&&(e+=2),1==Q("p20managecomputers").checked&&(e+=4),1==Q("p20remotecontrol").checked&&(e+=8),1==Q("p20meshagentconsole").checked&&(e+=16),1==Q("p20meshserverfiles").checked&&(e+=32),1==Q("p20wakedevices").checked&&(e+=64),1==Q("p20editnotes").checked&&(e+=128),1==Q("p20remoteview").checked&&(e+=256),1==Q("p20noterminal").checked&&(e+=512),1==Q("p20nofiles").checked&&(e+=1024),1==Q("p20noamt").checked&&(e+=2048),1==Q("p20remotelimitedinput").checked&&(e+=4096),1==Q("p20limitevents").checked&&(e+=8192),1==Q("p20chatnotify").checked&&(e+=16384),1==Q("p20uninstall").checked&&(e+=32768));var t=Q("dp20username").value.split(","),o=[];for(var n in t)o.push(t[n].trim());meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,usernames:o,meshadmin:e})}function p20viewuser(e){if(!xxdialogMode){e=decodeURIComponent(e);var t=[],o=currentMesh.links[userinfo._id].rights,n=currentMesh.links[e].rights;4294967295==n?t.push("Administrador completo"):(0!=(1&n)&&t.push("Editar grupo de dispositivos"),0!=(2&n)&&t.push("Gerenciar usuários do grupo de dispositivos"),0!=(4&n)&&t.push("Gerenciar computadores do grupo de dispositivos"),0!=(8&n)&&t.push("Controle remoto"),0!=(16&n)&&t.push("Console do agente"),0!=(32&n)&&t.push("Arquivos do servidor"),0!=(64&n)&&t.push("Reativar dispositivo"),0!=(128&n)&&t.push("Editar notas"),0!=(256&n)&&t.push("Somente visualização remota"),0!=(512&n)&&t.push("Sem terminal"),0!=(1024&n)&&t.push("Sem arquivos"),0!=(2048&n)&&t.push("Nenhum Intel&reg; AMT"),0!=(8&n)&&0!=(4096&n)&&0==(256&n)&&t.push("Entrada limitada"),0!=(8192&n)&&t.push("Somente Eventos Próprios"),0!=(16384&n)&&t.push("Chat & Notificação"),0!=(32768&n)&&t.push("Uninstall")),0==t.length&&t.push("Sem direitos");var i=1,a=addHtmlValue("Do utilizador",EscapeHtml(decodeURIComponent(e.split("/")[2])));a+=addHtmlValue("Permissões",t.join(",")),userinfo._id!=e&&(4294967295==o||0!=(2&o)&&4294967295!=n)&&(i+=4),setDialogMode(2,"Usuário do grupo de dispositivos",i,p20viewuserEx,a,e)}}function p20viewuserEx(e,t){2==e&&setDialogMode(2,"Usuário de malha remota",3,p20viewuserEx2,format("Confirmar remoção do usuário {0}?",t.split("/")[2]),t)}function p20deleteUser(e,t){haltEvent(e),p20viewuserEx(2,decodeURIComponent(t))}function p20viewuserEx2(e,t){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:t})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xxcurrentView=-1;function go(e){if(setSessionActivity(),!xxdialogMode&&xxcurrentView!=e){updateFooterMenu(),setDialogMode(0);for(var t=0;t<32;t++)QV("p"+t,t==e);xxcurrentView=e}}function setDialogMode(e,t,o,n,i,a){setSessionActivity(),xxdialogMode=e,xxdialogFunc=n,xxdialogButtons=o,xxdialogTag=a,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&o),QV("idx_dlgCancelButton",2&o),QV("id_dialogclose",2&o||8&o),QV("idx_dlgButtonBar",7&o),t&&QH("id_dialogtitle",t);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){setSessionActivity();var t=xxdialogFunc,o=xxdialogButtons,n=xxdialogTag;setDialogMode(),(8&o||e)&&t&&t(e,n)}function putstore(e,t){try{if("undefined"==typeof localStorage||localStorage.getItem(e)==t)return;null==t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}if("_"!=e[0]){for(var o={},n=0,i=localStorage.length;n<i;++n){var a=localStorage.key(n);"_"!=a[0]&&(o[a]=localStorage.getItem(a))}meshserver.send({action:"userWebState",state:JSON.stringify(o)})}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}function center(){QS("dialog").left=(getDocWidth()-300)/2+"px",deskAdjust(),deskAdjust()}function messagebox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function reload(){window.location.href=window.location.href}function getNodeFromId(e){for(var t in nodes)if(nodes[t]._id==e)return nodes[t];return null}function addHtmlValue(e,t){return"<table><td style=width:120px>"+e+"<td><b>"+t+"</b></table>"}function addHtmlValue2(e,t){return"<div><div style=display:inline-block;float:right>"+t+"</div><div style=display:inline-block>"+e+"</div></div>"}function addLink(e,t){return"<a style=cursor:pointer;color:darkblue;text-decoration:none onclick='"+t+"'>&diams; "+e+"</a>"}function addLinkConditional(e,t,o){return o?addLink(e,t):e}function passwordcheck(e){return/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/.test(e)}function getFileSizeStr(e){return 1==e?"1 byte":format("{0} bytes",e)}function joinPaths(){var e=[];for(var t in arguments){var o=arguments[t];if(null!=o&&""!=o){for(;o.endsWith("/")||o.endsWith("\\");)o=o.substring(0,o.length-1);for(;o.startsWith("/")||o.startsWith("\\");)o=o.substring(1);e.push(o)}}return e.join("/")}function focusTextBox(e){setTimeout(function(){Q(e).selectionStart=Q(e).selectionEnd=65535,Q(e).focus()},0)}isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function parseUriArgs(){var e,t={},o=window.document.location.href.split(/[\?&|\=]/);for(n in o.splice(0,1),o)switch(n%2){case 0:e=decodeURIComponent(o[n]);break;case 1:t[e]=decodeURIComponent(o[n]);var n=parseInt(t[e]);n==t[e]&&(t[e]=n)}return t}function printDate(e){return e.toLocaleDateString(args.locale)}function printTime(e){return e.toLocaleTimeString(args.locale)}function printDateTime(e){return e.toLocaleString(args.locale)}function format(e){var o=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==o[t]?o[t]:e})}function nobreak(e){return e.split(" ").join("&nbsp;")}</script>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script keeplink=1 src=scripts/filesaver.js></script><title>{{{title}}}</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}.i1{background:url(../images/icons50.png) 0 0;height:50px;width:50px;border:none}.i2{background:url(../images/icons50.png) -50px 0;height:50px;width:50px;border:none}.i3{background:url(../images/icons50.png) -100px 0;height:50px;width:50px;border:none}.i4{background:url(../images/icons50.png) -150px 0;height:50px;width:50px;border:none}.i5{background:url(../images/icons50.png) -200px 0;height:50px;width:50px;border:none}.i6{background:url(../images/icons50.png) -250px 0;height:50px;width:50px;border:none}.m0{background:url(../images/images16.png) -32px 0;height:16px;width:16px;border:none;float:left}.m1{background:url(../images/images16.png) -16px 0;height:16px;width:16px;border:none;float:left}.m2{background:url(../images/images16.png) -96px 0;height:16px;width:16px;border:none;float:left}.m3{background:url(../images/images16.png) -112px 0;height:16px;width:16px;border:none;float:left}.gray{filter:gray;-webkit-filter:grayscale(100%) opacity(60%)}.DevSt{padding-left:5px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#ddd}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:#fff;clear:both}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style="width:calc(100% - 50px);overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><img id=topMenuIcon class=noselect style=position:absolute;right:0;top:10px;bottom:50px;color:#c8c8c8;font-size:44px;margin-right:8px;cursor:pointer;display:none onclick=topMenu() src=/images/3bars-30.png width=30 height=30></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%><div id=column_l style=width:100%;padding:0;position:absolute;bottom:0;top:0><div id=p0 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p0message style=text-align:center;width:100%><span id=p0span>Servidor desconectado</span>,<href onclick=reload() style=cursor:pointer><u>clique para reconectar</u></href>.</div></div></div><div id=p1 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p1message style=text-align:center;width:100%></div></div></div><div id=p2 style=display:none><div id=xdevices></div></div><div id=p3 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large><span id=p3userName></span></strong><br></div></table><div id=p3info style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div style=margin-left:8px><div id=p3AccountActions><p><strong>Segurança da Conta</strong><div style=margin-left:9px;margin-bottom:8px><div id=manageAuthApp style=margin-top:5px;display:none><a onclick=account_manageAuthApp() style=cursor:pointer>Gerenciar aplicativo autenticador</a></div><div id=manageOtp style=margin-top:5px;display:none><a onclick=account_manageOtp(0) style=cursor:pointer>Gerenciar códigos de backup</a></div></div><p><strong>Ações da Conta</strong><div style=margin-left:9px;margin-bottom:8px><div style=margin-top:5px><span id=verifyEmailId style=display:none><a onclick=account_showVerifyEmail() style=cursor:pointer>Verificar email</a></span></div><div style=margin-top:5px><span id=changeEmailId style=display:none><a onclick=account_showChangeEmail() style=cursor:pointer>Mude o endereço de email</a></span></div><div style=margin-top:5px><a onclick=account_showChangePassword() style=cursor:pointer>Mudar senha</a><span id=p2nextPasswordUpdateTime></span></div><div style=margin-top:5px><a onclick=account_showDeleteAccount() style=cursor:pointer>Deletar conta</a></div></div><br style=clear:both></div><strong>Grupos de dispositivos</strong> <span id=p3createMeshLink1>( <a onclick=account_createMesh() style=cursor:pointer><img src=images/icon-addnew.png width=12 height=12 border=0> Novo</a> )</span><br><br><div id=p3meshes></div><div id=p3noMeshFound style=margin-left:9px;display:none>Nenhum grupo de dispositivos.<span id=p3createMeshLink2> <a onclick=account_createMesh() style=cursor:pointer><strong>Comece aqui!</strong></a></span></div><br style=clear:both></div></div></div><div id=p5 style=display:none><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large>Meus arquivos</strong><br></div></table><div id=p5myfiles style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><table id=p5toolbar style=width:100%;height:78px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5FolderUp disabled onclick=p5folderup() value=Acima> <input type=button style="width:calc(100%/5 - 5px)"id=p5SelectAllButton disabled onclick=p5selectallfile() value="Selecionar tudo"onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RenameFileButton disabled value=Renomear onclick=p5renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5DeleteFileButton disabled value=Deletar onclick=p5deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5NewFolderButton disabled value=Pasta onclick=p5createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5UploadButton disabled value=Envio onclick=p5uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CutButton disabled value=Cortar onclick=p5copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CopyButton disabled value=Copiar onclick=p5copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5PasteButton disabled value=Colar onclick=p5pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RefreshButton value=Atualizar onclick=p5refreshFiles() onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p5currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Classificar por nome<option value=2>Classificar por tamanho<option value=3>Classificar por data<option value=4>Decrescente por nome<option value=5>Decrescente por tamanho<option value=6>Descrescente por data</select></table></table><div id=p5filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p5files></span></div><table id=p5toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0;background-color:#d3d9d6 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px>&nbsp;<span id=p5bottomstatus></span><td id=p5rightOfButtons style=text-align:right;padding:3px></table></div></div><div id=p10 style=display:none;position:absolute;bottom:0;top:0;width:100%;overflow:hidden><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0;position:absolute;top:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><a id=MainComputerImage style=cursor:pointer onclick=p10showiconselector()></a><td><div style=margin-left:5px><strong><span id=p10deviceName></span></strong><br><span id=MainComputerState></span></div></table><div id=p10general style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div id=p10html style=margin-left:8px;margin-right:8px></div><div id=p10html2></div><div id=p10html3></div></div><div id=p10desktop style=overflow:hidden;position:absolute;top:55px;bottom:0;width:100%;display:none><div id=deskarea1 style=position:absolute;top:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><span id=p14power></span>&nbsp; <input id=DeskSoftInput style=width:25px;display:none;opacity:.2 onblur=toggleSoftKeys(0) onkeypress="return ondeskkeypress(event)"onkeydown="return ondeskkeydown(event)"onkeyup="return ondeskkeyup(event)"></div><div style=margin-left:3px><input type=button id=connectbutton1 value=Conectar onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=connectbutton1h value="Conectar HW"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=disconnectbutton1 value=Desconectar onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1> <span id=deskstatus>Desconectado</span></div></div></div><div id=deskarea3 style="position:absolute;top:25px;width:100%;height:calc(100% - 50px)"><div id=deskarea3x style=background:#000;text-align:center;height:100%;position:relative><div id=DeskParent style=height:100%><canvas id=Desk width=640 height=200 style=width:100%;-ms-touch-action:none;margin-left:0 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid #d3d3d3;display:none"><a id=DeskToolsRefreshButton style=float:right;padding:3px;cursor:pointer onclick=refreshDeskTools()>Atualizar</a><div id=DeskToolsBar style="position:absolute;padding:3px;border-radius:3px 3px 0 0;top:5px;left:4px;bottom:26px;background-color:#d3d3d3;cursor:pointer">Processos</div><div style=position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:#d3d3d3;text-align:left><div style="border-bottom:1px solid #a9a9a9;padding:3px"><a style=width:50px;padding-right:5px;float:left;cursor:pointer onclick=sortProcess(0)>PID</a><a style=cursor:pointer onclick=sortProcess(1)>Nome</a></div><div id=DeskToolsProcesses style=overflow-y:scroll;position:absolute;top:24px;bottom:0;width:100%></div></div></div></div></div><div id=deskarea4 style=position:absolute;bottom:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><select id=termdisplays style=display:none onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>&nbsp; <span id=DeskToastButton><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span>&nbsp;</div><div><input id=deskActionsBtn type=button style=margin-left:3px onkeypress=return!1 onkeydown=return!1 value=Ações onclick=deviceActionFunction()> <input type=button value=Configurações onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings()> <input type=button onkeypress=return!1 onkeydown=return!1 value="Ações de energia (Ligar/Desligar)"onclick=showPowerActionDlg() style=display:none> <input id=DeskSpecialKeys type=button value="Chaves especiais"onkeypress=return!1 onkeydown=return!1 onclick=sendSpecialKeys()> <input id=DeskSoftKeys type=button value=Teclado onkeypress=return!1 onkeydown=return!1 onclick=toggleSoftKeys(1)> <label><span id=DeskControlSpan style=display:none><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1>Entrada</span></label></div></div></div></div><div id=p10files style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%;display:none><table id=p13toolbar style=width:100%;height:111px cellpadding=0 cellspacing=0><tr><td style="background-color:silver;border-bottom:2px solid #000;padding:2px"><div style=float:right;text-align:right><input id=filesActionsBtn type=button onkeypress=return!1 onkeydown=return!1 value=Ações onclick=deviceActionFunction() style=margin-right:2px></div><div style=margin-left:2px><input id=p13AutoConnect value="Conexão automática"onclick=autoConnectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button style=display:none> <input id=p13Connect value=Conectar onclick=connectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button> <span id=p13Status>Desconectado</span></div><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13FolderUp disabled onclick=p13folderup() value=Acima> <input type=button style="width:calc(100%/5 - 5px)"id=p13SelectAllButton disabled onclick=p13selectallfile() value="Selecionar tudo"onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RenameFileButton disabled value=Renomear onclick=p13renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13DeleteFileButton disabled value=Deletar onclick=p13deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13NewFolderButton disabled value=Pasta onclick=p13createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13UploadButton disabled value=Envio onclick=p13uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CutButton disabled value=Cortar onclick=p13copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CopyButton disabled value=Copiar onclick=p13copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13PasteButton disabled value=Colar onclick=p13pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RefreshButton disabled value=Atualizar onclick=p13folderup(9999) onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p13currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Classificar por nome<option value=2>Classificar por tamanho<option value=3>Classificar por data<option value=4>Decrescente por nome<option value=5>Decrescente por tamanho<option value=6>Descrescente por data</select></table></table><div id=p13filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p13files></span></div><table id=p13toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#d3d9d6>&nbsp;<span id=p13bottomstatus></span></table></div></div><div id=p20 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td onclick=p20editmesh(1)><img src=/images/meshicon50.png width=50 height=50><td onclick=p20editmesh(1)><div style=margin-left:5px><strong style=font-size:large><span id=p20meshName></span></strong><br></div></table><div id=p20info style=margin-left:8px;margin-right:8px></div></div></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table id=footerMenu cellpadding=0 cellspacing=0 style=height:32px;width:100%;color:#fff;cursor:pointer;table-layout:fixed></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:90px;width:300px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div><div id=dialog3 style=margin:auto;margin:3px><select id=deskkeys style=width:100%><option value=10>CTRL+ALT+DEL<option value=11>Tab<option value=5>Win<option value=0>Win+Down<option value=1>Win+Up<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>CTRL-W<option value=9>Alt-Tab</select></div><div id=dialog7 style=margin:auto;margin:3px><div id=d7meshkvm><h4 style="width:100%;border-bottom:1px solid gray">Área de trabalho remota do agente</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir=rtl></select><div style=height:20px>Qualidade</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37..5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Dimensionamento</div></div><div style="margin:3px 0 3px 0"><select id=d7framelimiter style=float:right;width:200px;height:20px dir=rtl><option selected value=50>Rápido<option value=100>Médio<option value=400>Lento<option value=1000>Muito devagar</select><div style=height:20px>Taxa</div></div></div><div id=d7amtkvm><h4 style="width:100%;border-bottom:1px solid gray">Intel® AMT Hardware KVM</h4><div style=height:26px><select id=d7desktopmode style=float:right;width:200px><option value=1>RLE8, mais rápido<option value=2>RLE16, Recomendado<option value=3>RAW8, lento<option value=4>RAW16, muito lento</select><div>Codificação</div></div><div style=height:60px><div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:#fff"><label><input type=checkbox id=d7showfocus>Mostrar ferramenta de foco</label><br><label><input type=checkbox id=d7showcursor>Mostrar Cursor do Mouse Local</label><br></div><div>Outro</div></div></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Cancelar style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=Ok style=float:right;width:80px onclick=dialogclose(1)></div></div><div id=topMenu style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:0 0 5px 5px;position:fixed;top:50px;right:5px;width:170px;display:none"><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(2)>Meus arquivos</div><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(1)>Minha conta</div><div id=logoutMenuOption><a href=/logout><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer">Sair</div></a></div></div><iframe name=fileUploadFrame style=display:none></iframe><script>"use strict";var webState="{{{webstate}}}";for(var i in""!=webState&&(webState=JSON.parse(decodeURIComponent(webState))),webState)localStorage.setItem(i,webState[i]);webState.loctag||localStorage.removeItem("loctag");var files,args=parseUriArgs(),debugLevel=parseInt("{{{debuglevel}}}"),features=parseInt("{{{features}}}"),sessionTime=parseInt("{{{sessiontime}}}"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",authCookie="{{{authCookie}}}",authRelayCookie="{{{authRelayCookie}}}",authCookieRenewTimer=null,meshserver=null,xdr=null,serverinfo=null,nodes=[],meshes={},filetree={},userinfo=null,users=(serverinfo=null,null),nodeShortIdent=0,serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}",debugmode=!1,attemptWebRTC=0!=(128&features),StatusStrs=["Desconectado","Conectando...","Configurando...","Conectado","Intel&reg; AMT conectado"],passRequirements="{{{passRequirements}}}";""!=passRequirements&&(passRequirements=JSON.parse(decodeURIComponent(passRequirements)));var sessionActivity=Date.now();function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(!args.locale){var t=getstore("loctag",0);null!=t&&"*"!=t&&(args.locale=t)}(window.onresize=center)(),QV("changeEmailId",0==(2097152&features)),QH("p1message","Conectando..."),go(1),(meshserver=MeshServerCreateControl(domainUrl,authCookie)).onStateChanged=onStateChanged,meshserver.onMessage=onMessage,meshserver.Start();var o=localStorage.getItem("desktopsettings");null!=o&&(desktopsettings=JSON.parse(o)),applyDesktopSettings()}function onStateChanged(e,t,o,n){if(0==t){if(setDialogMode(0),go(0),"noauth"==n)return void QH("p0span","Não foi possível executar a autenticação");2==o?setTimeout(serverPoll,5e3):QH("p0span","Não foi possível conectar o soquete da web"),null!=authCookieRenewTimer&&(clearInterval(authCookieRenewTimer),authCookieRenewTimer=null)}else 2==t&&(meshserver.send({action:"meshes"}),meshserver.send({action:"nodes"}),meshserver.send({action:"files"}),xxcurrentView<2&&go(2),authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},18e5));QV("topMenuIcon",2==t)}function serverPoll(){xdr=null;try{xdr=new XDomainRequest}catch(e){}(xdr=xdr||new XMLHttpRequest).open("HEAD",window.location.href),xdr.timeout=15e3,xdr.onload=function(){reload()},xdr.onerror=xdr.ontimeout=function(){setTimeout(serverPoll,1e4)},xdr.send()}function updateSelf(){if(QV("verifyEmailId",!0!==userinfo.emailVerified&&null!=userinfo.email&&1==serverinfo.emailcheck),QV("manageAuthApp",4096&features),QV("manageOtp",0!=(4096&features)&&(1==userinfo.otpsecret||0<userinfo.otphkeys)),QV("p3createMeshLink1",!1),QV("p3createMeshLink2",!1),"number"==typeof userinfo.passchange)if(-1==userinfo.passchange)QH("p2nextPasswordUpdateTime"," - Redefinir no próximo login.");else if(null!=passRequirements&&"number"==typeof passRequirements.reset){var e=userinfo.passchange+86400*passRequirements.reset-Math.floor(Date.now()/1e3);e<0?QH("p2nextPasswordUpdateTime"," - Redefinir no próximo login."):e<3600?QH("p2nextPasswordUpdateTime",format(" - Redefinir em {0} minuto {1}.",Math.floor(e/60),addLetterS(Math.floor(e/60)))):e<86400?QH("p2nextPasswordUpdateTime",format(" - Redefinir em {0} hora {1}.",Math.floor(e/3600),addLetterS(Math.floor(e/3600)))):QH("p2nextPasswordUpdateTime",format(" - Redefinir em {0} dia {1}."),Math.floor(e/86400),addLetterS(Math.floor(e/86400)))}}function addLetterS(e){return 1<e?"s":""}function setSessionActivity(){sessionActivity=Date.now()}function checkIdleSessionTimeout(){Date.now()-sessionActivity>serverinfo.timeout&&(window.location.href="logout")}function onMessage(e,t){switch(t.action){case"serverinfo":(serverinfo=t.serverinfo).timeout&&(setInterval(checkIdleSessionTimeout,1e4),checkIdleSessionTimeout()),QV("p3AccountActions",0==(4&features)&&0==serverinfo.domainauth),QV("logoutMenuOption",0==(4&features)&&0==serverinfo.domainauth);break;case"authcookie":authCookie=t.cookie,authRelayCookie=t.rcookie;break;case"userinfo":userinfo=t.userinfo,QH("p3userName",userinfo.name),updateSelf();break;case"users":for(var o in users={},t.users)users[t.users[o]._id]=t.users[o];updateUsers();break;case"wssessioncount":wssessions=t.wssessions,updateUsers();break;case"meshes":for(var o in meshes={},t.meshes)meshes[t.meshes[o]._id]=t.meshes[o];updateMeshes(),updateDevices();break;case"files":filetree=setupBackPointers(t.filetree),updateFiles();break;case"nodes":for(var o in nodes=[],t.nodes)for(var n in t.nodes[o])meshes[o]?(t.nodes[o][n].namel=t.nodes[o][n].name.toLowerCase(),t.nodes[o][n].rname?t.nodes[o][n].rnamel=t.nodes[o][n].rname.toLowerCase():t.nodes[o][n].rnamel=t.nodes[o][n].namel,t.nodes[o][n].meshnamel=meshes[o].name.toLowerCase(),t.nodes[o][n].meshid=o,t.nodes[o][n].state=t.nodes[o][n].state?t.nodes[o][n].state:0,t.nodes[o][n].desc=t.nodes[o][n].desc,t.nodes[o][n].icon||(t.nodes[o][n].icon=1),t.nodes[o][n].ident=++nodeShortIdent,nodes.push(t.nodes[o][n])):console.log("Invalid mesh (1): "+o);updateDevices(),0==xxcurrentView&&go(parseInt("{{viewmode}}")),gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"));break;case"powertimeline":if(t.nodeid!=powerTimelineReq)break;powerTimelineNode=t.nodeid,powerTimeline=t.timeline,powerTimelineUpdate=Date.now()+3e5,currentNode._id==t.nodeid&&drawDeviceTimeline();break;case"otpauth-request":if(2==xxdialogMode&&"otpauth-request"==xxdialogTag){var i=t.secret;52==i.length?i=i.split(/(.............)/).filter(Boolean).join(" "):32==i.length&&(i=(i=i.split(/(....)/).filter(Boolean).join(" ")).substring(0,20)+"<br/>"+i.substring(20)),QH("d2optinfo",'Install <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank>Google Authenticator</a> or a compatible application, use <a href="\' + message.url + \'" rel="noreferrer noopener" target=_blank> this link</a> or enter the secret below. Then, enter the current 6 digit token to activate 2-Step login.<br /><br /><div style=width:100%;text-align:center><tt id=d2optsecret secret="'+t.secret+'" style=font-size:15px>'+i+'</tt><br /><br />Token: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></div>'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"Autenticador de aplicativo",1,null,t.success?"<b style=color:green> ativação de login em duas etapas </b>. Agora você precisará de um token válido para fazer login novamente.":"<b style=color:red> falha na ativação do login em duas etapas </b>. Limpe o segredo do aplicativo e tente novamente. Você tem apenas alguns minutos para inserir o código correto.");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"Autenticador de aplicativo",1,null,t.success?"<b style=color:green>Ativação de login em duas etapas removida</b>. Você pode reativar esse recurso a qualquer momento.":"<b style=color:red> falha na remoção da ativação do login em duas etapas </b>. Tente novamente.");break;case"otpauth-getpasswords":if(xxdialogMode)return;var a="Os tokens únicos podem ser usados como autenticação secundária. Gere um conjunto, imprima-os e mantenha-os em um local seguro.";if(a+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(a+="<tr>");for(var r=""+t.passwords[l].p;r.length<8;)r="0"+r;!0===t.passwords[l].u?a+="<td>"+r.substring(0,4)+"&nbsp;"+r.substring(4):a+="<td><strike style=color:#BBB>"+r.substring(0,4)+"&nbsp;"+r.substring(4)}}else a+="<tr><td>Nenhum token ativo";a+="</table></div></div><br />",a+="<div><input type=button value='Fechar' onclick=setDialogMode(0) style=float:right></input>",a+="<input type=button value='Novos tokens' onclick='account_manageOtp(1);'></input>",null!=t.passwords&&(a+="<input type=button value='Limpo' onclick='account_manageOtp(2);'></input>"),setDialogMode(2,"Gerenciar códigos de backup",8,null,a+="</div><br />","otpauth-manage");break;case"event":if(t.event.noact)break;switch(t.event.action){case"userWebState":if(null!=localStorage){var d=JSON.parse(t.event.state);for(var l in d)localStorage.setItem(l,d[l]);null!=d.loctag&&d.loctag!=oldLoctag&&(null!=d.loctag?args.locale=d.loctag:delete args.locale,updateDevices(),updateMeshes())}break;case"accountchange":if(userinfo.name==t.event.account.name){var p=t.event.account.siteadmin?t.event.account.siteadmin:0,c=userinfo.siteadmin?userinfo.siteadmin:0;(t.event.account.quota!=userinfo.quota||0==(8&userinfo.siteadmin)&&0!=(8&t.event.account.siteadmin))&&meshserver.send({action:"files"}),userinfo=t.event.account,c!=p&&updateSiteAdmin(),updateSelf()}break;case"createmesh":null!=t.event.links[userinfo._id]&&(meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},updateMeshes(),updateDevices(),meshserver.send({action:"files"}));break;case"meshchange":if(null==meshes[t.event.meshid])meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},meshserver.send({action:"nodes"});else{if(meshes[t.event.meshid].name!=t.event.name)for(var l in meshes[t.event.meshid].name=t.event.name,nodes)nodes[l].meshid==t.event.meshid&&(nodes[l].meshnamel=t.event.name.toLowerCase());if(meshes[t.event.meshid].desc=t.event.desc,meshes[t.event.meshid].links=t.event.links,null==meshes[t.event.meshid].links[userinfo._id]){20==xxcurrentView&&currentMesh==meshes[t.event.meshid]&&go(2),delete meshes[t.event.meshid];var u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2))}}updateMeshes(),updateDevices(),meshserver.send({action:"files"}),20==xxcurrentView&&currentMesh._id==t.event.meshid&&p20updateMesh();break;case"deletemesh":meshes[t.event.meshid]&&(delete meshes[t.event.meshid],updateMeshes(),meshserver.send({action:"files"}));u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,updateDevices(),20<=xxcurrentView&&xxcurrentView<30&&currentMesh._id==t.event.meshid&&(setDialogMode(0),go(2)),10<=xxcurrentView&&xxcurrentView<20&&currentNode&&currentNode.meshid==t.event.meshid&&(setDialogMode(0),go(2));break;case"addnode":var m=t.event.node;if(!meshes[m.meshid])break;if(null!=getNodeFromId(m._id))break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices();break;case"removenode":var h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1),updateDevices()}break;case"changenode":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).name=t.event.node.name,m.rname=t.event.node.rname,m.host=t.event.node.host,m.desc=t.event.node.desc,m.publicip=t.event.node.publicip,m.iploc=t.event.node.iploc,m.wifiloc=t.event.node.wifiloc,m.gpsloc=t.event.node.gpsloc,m.tags=t.event.node.tags,m.userloc=t.event.node.userloc,null!=t.event.node.agent&&(null==m.agent&&(m.agent={}),null!=t.event.node.agent.ver&&(m.agent.ver=t.event.node.agent.ver),null!=t.event.node.agent.id&&(m.agent.id=t.event.node.agent.id),null!=t.event.node.agent.caps&&(m.agent.caps=t.event.node.agent.caps),null!=t.event.node.agent.core?m.agent.core=t.event.node.agent.core:m.agent.core&&delete m.agent.core,m.agent.tag=t.event.node.agent.tag),null!=t.event.node.intelamt&&(null==m.intelamt&&(m.intelamt={}),null!=t.event.node.intelamt.state&&(m.intelamt.state=t.event.node.intelamt.state),null!=t.event.node.intelamt.host&&(m.intelamt.user=t.event.node.intelamt.host),null!=t.event.node.intelamt.user&&(m.intelamt.user=t.event.node.intelamt.user),null!=t.event.node.intelamt.tls&&(m.intelamt.tls=t.event.node.intelamt.tls),null!=t.event.node.intelamt.ver&&(m.intelamt.ver=t.event.node.intelamt.ver),null!=t.event.node.intelamt.tag&&(m.intelamt.tag=t.event.node.intelamt.tag),null!=t.event.node.intelamt.uuid&&(m.intelamt.uuid=t.event.node.intelamt.uuid),null!=t.event.node.intelamt.realm&&(m.intelamt.realm=t.event.node.intelamt.realm)),m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,t.event.node.icon&&(m.icon=t.event.node.icon),refreshDevice(m._id),updateDevices();break;case"nodemeshchange":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1)):(m.meshid=t.event.newMeshId,m.meshnamel=meshes[t.event.newMeshId].name.toLowerCase()),updateDevices(),refreshDevice(t.event.nodeid)}else{m=t.event.node;if(!meshes[m.meshid])break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices()}break;case"nodeconnect":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).conn=t.event.conn,m.pwr=t.event.pwr,updateDevices();break;case"login":null!=users&&users["user/"+domain+"/"+t.event.username.toLowerCase()]&&(users["user/"+domain+"/"+t.event.username.toLowerCase()].login=t.event.time)}}}function topMenu(e){null!=xxdialogMode&&0!=xxdialogMode&&999!=xxdialogMode||(void 0===e?1==("none"==QS("topMenu").display)?0!=xxdialogMode&&null!=xxdialogMode||(QV("topMenu",!0),xxdialogMode=999):(QV("topMenu",!1),xxdialogMode=0):(QV("topMenu",!1),xxdialogMode=0,1==e&&3!=xxcurrentView&&goForward("account"),2==e&&5!=xxcurrentView&&goForward("files")))}var filetreelinkpath,backStack=[];function goBack(){xxdialogMode||(0<backStack.length&&backStack.pop(),goStack())}function goForward(e){xxdialogMode||(backStack.push(e),goStack())}function goStack(){if(0!=backStack.length){var e=backStack[backStack.length-1],t=e.split("/")[0];"node"==t&&(setupDeviceMenu(0),gotoDevice(e)),"mesh"==t&&gotoMesh(e),"account"==t&&go(3),"devices"==t&&go(2),"files"==t&&go(5)}else go(2)}function updateFooterMenu(e){for(;null!=e&&e.length<3;)e.push({n:""});var t="",o="";if(null!=e)for(var n in e)t+='<td style="cursor:pointer'+(""==o?"":";border-left:solid 1px white")+'" onclick="'+e[n].f+'">'+e[n].n,o=e[n].n;QH("footerMenu","<tr>"+t)}function account_manageAuthApp(){xxdialogMode||0==(4096&features)||(1==userinfo.otpsecret?account_removeOtp():account_addOtp())}function account_addOtp(){xxdialogMode||1==userinfo.otpsecret||0==(4096&features)||(setDialogMode(2,"Autenticador de aplicativo",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>Carregando...</div>","otpauth-request"),meshserver.send({action:"otpauth-request"}))}function account_addOtpCheck(e){var t=6==Q("d2otpauthinput").value.length;QE("idx_dlgOkButton",t),e&&13==e.keyCode&&t&&dialogclose(1)}function account_removeOtp(){xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||setDialogMode(2,"Autenticador de aplicativo",3,function(){meshserver.send({action:"otpauth-clear"})},"Confirmar remoção do login do aplicativo autenticador em duas etapas?")}function account_manageOtp(e){2==xxdialogMode&&"otpauth-manage"==xxdialogTag&&dialogclose(0),xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||meshserver.send({action:"otpauth-getpasswords",subaction:e})}function account_showVerifyEmail(){xxdialogMode||1==userinfo.emailVerified||1!=serverinfo.emailcheck||setDialogMode(2,"verificação de e-mail",3,account_showVerifyEmailEx,"Clique em ok para enviar um email de verificação para:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>Aguarde alguns minutos para receber a verificação.")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"Alteração de endereço de email",3,account_changeEmail,addHtmlValue("Email","<input id=dp3email style=width:170px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />")),null!=userinfo.email&&(Q("dp3email").value=userinfo.email),account_validateEmail(),Q("dp3email").focus())}function account_validateEmail(e,t){QE("idx_dlgOkButton",validateEmail(Q("dp3email").value)&&Q("dp3email").value!=userinfo.email),null!=e&&13==e.keyCode&&dialogclose(1)}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp3email").value})}function account_showDeleteAccount(){if(!xxdialogMode){var e="<form method=post><table style=margin-left:10px><input type=hidden name=action value=deleteaccount /><input type=hidden name=authcookie value="+authCookie+" /><tr>";e+="<td align=right>Senha:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr><tr><td align=right>Senha:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr></table><div style=padding:10px;margin-bottom:4px>",e+='<input id=account_dlgCancelButton type=button value="Cancelar" style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>',e+='<input id=account_dlgOkButton type=submit value="Ok" style="float:right;width:80px" onclick=dialogclose(1)>',setDialogMode(2,"Deletar Conta",0,null,e+="</div><br /></form>"),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="<table style=margin-left:10px>";if(e+="<tr><td align=right>"+nobreak("Senha Antiga:")+"</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nova senha:")+"</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nova senha:")+"</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>",65536&features&&(e+="<tr><td align=right>Dica de senha</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"),e+="</table>",passRequirements){var t=[],o=0;for(var n in passRequirements)"reset"!=n&&"hint"!=n&&(t.push(n+":"+passRequirements[n]),o++);0<o&&(e+="<br /><span style=font-size:x-small>"+format("Requisitos: {0}.",t.join(", "))+"</span>")}return setDialogMode(2,"Mudar senha",3,account_showChangePasswordEx,e+="<br />"),Q("apassword0").focus(),account_validateNewPassword(),!1}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var e={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};65536&features&&(e.hint=Q("apasswordhint").value),meshserver.send(e)}}function account_createMesh(){if(!xxdialogMode)if(4294967295==userinfo.siteadmin||0==(64&userinfo.siteadmin))if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var e=addHtmlValue("Nome","<input id=dp3meshname style=width:170px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");e+=addHtmlValue("Tipo","<div style=width:170px;margin:0;padding:0><select id=dp3meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>Grupo de agentes de software</option><option value=1>Intel&reg; Apenas AMT</option></select></div>"),setDialogMode(2,"Criar grupo de dispositivo",3,account_createMeshEx,e+=addHtmlValue("Descrição","<div style=width:170px;margin:0;padding:0><textarea id=dp3meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"Segurança da Conta",1,null,'Não foi possível acessar um dispositivo até que a autenticação de dois fatores esteja ativada. Isso é necessário para segurança extra. Vá para "Minha conta" e veja a seção "Segurança da conta".');else setDialogMode(2,"Segurança da Conta",1,null,'Não foi possível acessar um dispositivo até que um endereço de email seja verificado. Isso é necessário para a recuperação de senha. Vá para "Minha conta" para alterar e verificar um endereço de email.');else setDialogMode(2,"Novo grupo de dispositivos",1,null,"Esta conta não tem direitos para criar um novo grupo de dispositivos.")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0<Q("dp3meshname").value.length)}function account_createMeshEx(e,t){meshserver.send({action:"createmesh",meshname:Q("dp3meshname").value,meshtype:Q("dp3meshtype").value,desc:Q("dp3meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value)}function account_validateNewPassword(){var e="",t=0<Q("apassword0").value.length&&0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value&&Q("apassword0").value!=Q("apassword1").value;if(65536&features&&Q("apasswordhint").value==Q("apassword1").value&&(t=!1),""!=Q("apassword1").value)if(null==passRequirements||""==passRequirements){var o=checkPasswordStrength(Q("apassword1").value);e=80<=o?"<span style=color:green>Strong<span>":60<=o?"<span style=color:blue>&#9679;<span>":"<span style=color:red>&#9679;<span>"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="<span style=color:red>Política<span>")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,o={},n=0,i={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var a=0;a<e.length;a++)o[e[a]]=(o[e[a]]||0)+1,t+=5/o[e[a]];for(var s in i)n+=1==i[s]?1:0;return parseInt(t+10*(n-1))}function checkPasswordRequirements(e,t){if(null==t||""==t||"object"!=typeof t)return!0;if(t.min&&e.length<t.min)return!1;if(t.max&&e.length>t.max)return!1;for(var o=0,n=0,i=0,a=0,s=0;s<e.length;s++)/\d/.test(e[s])&&o++,/[a-z]/.test(e[s])&&n++,/[A-Z]/.test(e[s])&&i++,/\W/.test(e[s])&&a++;return!(t.num&&o<t.num)&&(!(t.lower&&n<t.lower)&&(!(t.upper&&i<t.upper)&&!(t.nonalpha&&a<t.nonalpha)))}function updateMeshes(){var e="",t=0;for(i in meshes){t++;var o=meshes[i].links[userinfo._id].rights,n="Direitos parciais";4294967295==o?n="Administrador completo":0==o&&(n="Sem direitos"),e+="<div style=cursor:pointer onclick=goForward('"+i+"')>",e+='<div style="float:left;margin-left:4px"><img src="/images/meshicon50.png" width=50 height=50 /></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+EscapeHtml(meshes[i].name)+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+n+"</div></div>",e+="</div></div>"}QH("p3meshes",e),QV("p3noMeshFound",0==t)}function gotoMesh(e){null==(currentMesh=meshes[e])&&goBack(),p20updateMesh(),go(20)}var sortorder,filetreelocation=[];function p5refreshFiles(){meshserver.send({action:"files"})}function updateFiles(){if(QV("MainMenuMyFiles",0==(8&features)),0==(8&features)){for(var e,t="",o="",n="<a style=cursor:pointer onclick=p5folderup(0)>Raiz</a>",i="Root",a=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),c=0;c<p.length;c++)p[c].checked&&d.push(p[c].value);for(var c in filetreelinkpath="",filetreelocation){if(null==a.f||null==a.f[filetreelocation[c]])break;if(l.push(filetreelocation[c]),i+=" / "+filetreelocation[c],1==s){var u=filetreelocation[c].split("/");e=window.location+u[0]+"files/"+u[2],filetreelinkpath+=filetreelocation[c]}else""!=filetreelinkpath&&(filetreelinkpath+="/"+filetreelocation[c],2<s&&(e+="/"+filetreelocation[c]));n+=" / <a style=cursor:pointer onclick=p5folderup("+s+")>"+(null!=(a=a.f[filetreelocation[c]]).n?a.n:filetreelocation[c])+"</a>",s++}filetreelocation=l;var m=i.toLowerCase().startsWith("root / "+userinfo._id+" / public"),h=p5sort_files(a.f);for(var c in h){var g,v=h[c],f=v.n;g=40<(g=f).length?EscapeHtml(f.substring(0,40))+"...":EscapeHtml(f),f=EscapeHtml(f);var k="";null!=v.s&&(k=getFileSizeStr(v.s));var x="";if(v.t<3||4==v.t){x="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+f+"'>&nbsp;<span style=float:right;padding-right:4px>"+(1==v.t||4==v.t?p5getQuotabar(v):"")+"</span><span><div class=fileIcon"+v.t+'></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(v.nx)+'")>'+g+"</a></span></div>"}else{var y=g,b="";m&&(b=" (<a style=cursor:pointer onclick='p5showPublicLink(\""+e+"/"+v.nx+"\")'>Ligação</a>)"),0<v.s&&(y='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+v.nx)+'">'+g+"</a>"+b),x="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+v.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+k+"</span><span><div class=fileIcon"+v.t+"></div>"+y+"</span></div>"}v.t<3?t+=x:o+=x}if(QH("p5rightOfButtons",p5getQuotabar(a)),QH("p5files",t+o),QH("p5currentpath",n),QE("p5FolderUp",0!=filetreelocation.length),QV("p5PublicShare",m),r==filetreelinkpath){p=document.getElementsByName("fc");for(c=0;c<p.length;c++)p[c].checked=0<=d.indexOf(p[c].value)}p5setActions()}}function getNiceSize(e){return e<=0?"Armazenamento excedido":e<2048?format("{0}b restante",e):e<2097152?format("{0}k restante",Math.round(e/1024)):e<2147483648?format("{0}m restante",Math.round(e/1024/1024)):format("{0}g restante",Math.round(e/1024/1024/1024))}function p5getQuotabar(e){for(;1<e.t&&4!=e.t;)e=e.parent;return 1!=e.t&&4!=e.t||null==e.maxbytes?"":getNiceSize(e.maxbytes-e.s)+" <progress style=height:10px;width:100px value="+e.s+" max="+e.maxbytes+" />"}function p5showPublicLink(e){setDialogMode(2,"Link Público",1,null,'<input type=text style=width:100% value="'+e+'" readonly />')}function p5sort_filename(e,t){return e.ln>t.ln?1*sortorder:e.ln<t.ln?-1*sortorder:0}function p5sort_timestamp(e,t){return e.d>t.d?1*sortorder:e.d<t.d?-1*sortorder:0}function p5sort_bysize(e,t){return e.s==t.s?p5sort_filename(e,t):(e.s-t.s)*sortorder}function p5sort_files(e){var t=[],o=Q("p5sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return sortorder=1,3<o&&(sortorder=-1,o-=3),1==o?t.sort(p5sort_filename):2==o?t.sort(p5sort_bysize):3==o&&t.sort(p5sort_timestamp),t}function p5setActions(){var e=getFileSelCount(),t=getFileCount(),o=getFileSelCount(!1);QE("p5DeleteFileButton",0<e&&0<filetreelocation.length),QE("p5NewFolderButton",0<filetreelocation.length),QE("p5UploadButton",0<filetreelocation.length),QE("p5RenameFileButton",1==e&&0<filetreelocation.length),QE("p5SelectAllButton",0<t),Q("p5SelectAllButton").value=0<e?"Nenhum":"Todos",QE("p5CutButton",0<o&&e==o),QE("p5CopyButton",0<o&&e==o),QE("p5PasteButton",null!=p5clipboard&&0<p5clipboard.length&&0<filetreelocation.length)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function getFileCount(){return document.getElementsByName("fc").length}function p5selectallfile(){for(var e=0==getFileSelCount(),t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked=e;p5setActions()}function setupBackPointers(e){if(null!=e.f){var t=0,o=0;for(var n in e.f)setupBackPointers(e.f[n]),(e.f[n].parent=e).f[n].s&&(t+=e.f[n].s),e.f[n].c&&(o+=e.f[n].c),3==e.f[n].t&&o++;e.s=t,e.c=o}return e}function getFileSizeStr(e){return 1==e?"1 byte":format("{0} bytes",e)}function p5folderup(e){if(null==e)filetreelocation.pop();else for(;filetreelocation.length>e;)filetreelocation.pop();return updateFiles(),!1}function p5folderset(e){return filetreelocation.push(decodeURIComponent(e)),updateFiles(),!1}function p5createfolder(){setDialogMode(2,"Nova pasta",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />"),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var e=getFileSelCount(),t=0<getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p5recdeleteinput>Exclusão recursiva</label><br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"Deletar",3,p5deletefileEx,1<e?format("Excluir {0} itens selecionados?",e)+t:"Excluir item selecionado?"+t)}function p5deletefileEx(){for(var e=[],t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&e.push(t[o].value);meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:e,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){for(var e,t=document.getElementsByName("fc"),o=0;o<t.length;o++)t[o].checked&&(e=t[o].value);setDialogMode(2,"Renomear",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:e}),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5renamefileEx(e,t){t.newname=Q("p5renameinput").value,meshserver.send(t)}function p5fileNameCheck(e){var t=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",t),1==t&&e&&13==e.keyCode&&dialogclose(1)}var isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function p5uploadFile(){setDialogMode(2,"Subir arquivo",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=hidden name=authCookie value='+authCookie+" /><input type=submit id=p5loginSubmit style=display:none /></form>"),updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(e){var t=document.getElementsByName("fc");p5clipboard=[],p5clipboardCut=e,p5clipboardFolder=Clone(filetreelocation);for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p5clipboard.push(t[o].value);p5updateClipview()}function p5pasteFile(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Confirme {0} da {1} entrada {2} para este local?",0==p5clipboardCut?"copy":"move",p5clipboard.length,1<p5clipboard.length?"s":"")),setDialogMode(2,"Colar",3,p5pasteFileEx,e)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:0==p5clipboardCut?"copy":"move",scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard}),p5folderup(999),1==p5clipboardCut&&(p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview())}function p5updateClipview(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Mantendo {0} entrada {1} para {2}",p5clipboard.length,1<p5clipboard.length?"s":"",0==p5clipboardCut?"Copiar":"Mover")+', <a href=# onclick="return p5clearClip()" style=cursor:pointer>Limpo</a>.'),QH("p5bottomstatus",e),p5setActions()}function p5clearClip(){return p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview(),!1}function p5fileDragDrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer&&0!=e.dataTransfer.files.length&&0!=filetreelocation.length)for(var t=[],o=[],n=[],i=[],a=e.dataTransfer.files.length,s=0;s<e.dataTransfer.files.length;s++){var l=new FileReader,r=e.dataTransfer.files[s];t.push(r.name),o.push(r.size),n.push(r.type),l.onload=function(e){i.push(e.target.result),0==--a&&(Q("p5fileDragName").value=t.join("*"),Q("p5fileDragSize").value=o.join("*"),Q("p5fileDragType").value=n.join("*"),Q("p5fileDragData").value=i.join("*"),Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath),Q("p5loginSubmit2").click())},l.readAsDataURL(r)}}var p5dragtimer=null;function p5fileDragOver(e){haltEvent(e),null!=p5dragtimer&&(clearTimeout(p5dragtimer),p5dragtimer=null);var t=!0;0==filetreelocation.length&&(t=!1),QV("bigok",t),QV("bigfail",!t)}function p5fileDragLeave(e){haltEvent(e),"p5filetable"!=e.target.id?(QV("bigfail",!1),QV("bigok",!1)):p5dragtimer=setTimeout("QV('bigfail',false);QV('bigok',false);p5dragtimer=null;",200)}function ondeskkeypress(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeys(e)}}function ondeskkeydown(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyDown(e)}}function ondeskkeyup(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyUp(e)}}var updateDevicesTimer=null;function updateDevices(){null==updateDevicesTimer&&(updateDevicesTimer=setTimeout(updateDevicesEx,200))}var deviceHeaderCount,sort=0,deviceHeaderId=0,deviceHeaders={},showRealNames=!1,deviceHeaderTotal=0,deviceHeadersTitles=(deviceHeaders={},{});function updateDevicesEx(){null!=updateDevicesTimer&&(clearTimeout(updateDevicesTimer),updateDevicesTimer=null);var e="",t=0,o=null,n=0,i={};for(var a in deviceHeaderCount={},deviceHeaders={},deviceHeadersTitles={},(deviceHeaderTotal=deviceHeaderId=0)==sort?nodes.sort(meshSort):1==sort?nodes.sort(powerSort):2==sort&&(1==showRealNames?nodes.sort(deviceHostSort):nodes.sort(deviceSort)),nodes)if(0!=nodes[a].v){var s=meshes[nodes[a].meshid].links[userinfo._id];if(null!=s){s.rights;if(0==sort){if(nodes.sort(meshSort),nodes[a].meshid!=o){deviceHeaderSet();var l="";1==meshes[nodes[a].meshid].mtype&&(l="<span style=color:lightgray>Intelreg; </span>"),null!=o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=padding-top:4px><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+nodes[a].meshid+'")>'+EscapeHtml(meshes[nodes[a].meshid].name)+"</span>"+l+"<span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",i[o=nodes[a].meshid]=1,t=0}}else 1==sort?nodes[a].pwr!==o&&(deviceHeaderSet(),null!==o&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[a].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",o=nodes[a].pwr,t=0):2==sort&&null==o&&(o="1");n++;var r=EscapeHtml(nodes[a].name);0==r.length&&(r="<i>Nenhum</i>"),null!=nodes[a].rname&&0<nodes[a].rname.length&&(r+=" / "+EscapeHtml(nodes[a].rname));var d=EscapeHtml(nodes[a].name);1==showRealNames&&null!=nodes[a].rname&&(d=EscapeHtml(nodes[a].rname)),0==d.length&&(d="<i>Nenhum</i>");var p=nodes[a].icon,c=NodeStateStr(nodes[a]);nodes[a].conn&&0!=nodes[a].conn||(p+=" gray"),e+="<div style=cursor:pointer onclick=goForward('"+nodes[a]._id+"')>",e+='<div class="i'+p+'" style="float:left;margin-left:4px"></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+d+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+c+"</div></div>",e+="</div></div>",deviceHeaderTotal++,void 0===deviceHeaderCount[nodes[a].state]?deviceHeaderCount[nodes[a].state]=1:deviceHeaderCount[nodes[a].state]++}}if(0==sort)for(var a in meshes){var u=meshes[a],m=u.links[userinfo._id];if(null!=m){m.rights;null==i[u._id]&&(""!=o&&""!=e&&(e+="</tr></table>"),e+="<div><div colspan=3 class=DevSt><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+u._id+'")>'+EscapeHtml(u.name)+"</span></div>",1==u.mtype&&(e+="<div style=padding:10px><i>Nenhum Intel&reg; AMT devices in this group"),2==u.mtype&&(e+="<div style=padding:10px><i>Nenhum dispositivo neste grupo"),e+=".</i></div></div>",o=u._id,n++)}}for(var a in 0==n?QH("xdevices",'<div style="margin-top:50px;text-align:center"><span style="font-size:30px">Nenhum dispositivo</span><br /><br />Use a versão desktop deste site para adicionar dispositivos.</div>'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(a,deviceHeaders[a]);for(var a in deviceHeadersTitles)Q(a).title=deviceHeadersTitles[a]}var powerStatetable=["","Ligado","Hibernar","Hibernar","Hibernar","Hibernando","Desligar","Presente"],powerStateStrings=["","Ligado","Hibernando","Hibernando","Deep Sleep","Hibernando","Soft-Off","Presente"],powerStateStrings2=["","O dispositivo está ligado","O dispositivo está no estado de suspensão (S1)","O dispositivo está no estado de suspensão (S2)","O dispositivo está no estado de sono profundo (S3)","O dispositivo está hibernando (S4)","O dispositivo está no estado soft-off (S5)","O dispositivo está presente, mas o estado de energia não pode ser determinado"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0<e.state&&e.state<powerStatetable.length&&state.push(powerStatetable[e.state]),e.conn&&(0!=(1&e.conn)&&t.push("<span>Agente</span>"),0!=(2&e.conn)?t.push("<span>CIRA</span>"):0!=(4&e.conn)&&t.push("<span>Intel&reg; AMT</span>"),0!=(8&e.conn)&&t.push("<span>Retransmissão</span>"),0!=(16&e.conn)&&t.push("<span>MQTT</span>")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return e<powerStatetable.length?powerStatetable[e]:""}function PowerStateStr2(e){return 0!=e&&e<powerStatetable.length?powerStatetable[e]:"Desconhecido"}function onSortSelectChange(e){sort=document.getElementById("sortselect").selectedIndex,e||putstore("sort",sort),updateDevicesEx()}function deviceHeaderSet(){if(0!=deviceHeaderId){deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+(1==deviceHeaderTotal?" nó":" nós");var e="";for(var t in deviceHeaderCount)0<e.length&&(e+=", "),e+=deviceHeaderCount[t]+" "+PowerStateStr2(t);deviceHeadersTitles["DevxHeader"+deviceHeaderId]=e,deviceHeaderId++,deviceHeaderCount={},deviceHeaderTotal=0}else deviceHeaderId=1}function meshSort(e,t){return e.meshnamel>t.meshnamel?1:e.meshnamel<t.meshnamel?-1:e.meshid==t.meshid?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:0}function powerSort(e,t){var o=e.pwr?e.pwr:0,n=t.pwr?t.pwr:0;return o==n?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:n<o?1:o<n?-1:0}function deviceSort(e,t){return e.namel>t.namel?1:e.namel<t.namel?-1:0}function deviceHostSort(e,t){return e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0}function refreshDevice(e){currentNode&&currentNode._id==e&&gotoDevice(e,xxcurrentView,!0)}function getNodeRights(e){var t=getNodeFromId(e);return meshes[t.meshid].links[userinfo._id].rights}var currentNode,currentDevicePanel=0,powerTimelineNode=null,powerTimelineReq=null,powerTimelineUpdate=null,powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(e,t,o){if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var n=getNodeFromId(e);if(null!=n){var i=meshes[n.meshid];if(null!=i){var a=i.links[userinfo._id].rights;if(!currentNode||currentNode._id!=n._id||1==o){currentNode=n;var s=EscapeHtml(n.name);0==s.length&&(s="<i>Nenhum</i>"),0!=(4&a)&&(s="<span onclick=showEditNodeValueDialog(0) style=cursor:pointer>"+s+"</span>"),QH("p10deviceName",s);var l="<table style=width:100%>";l+=addDeviceAttribute("<span>Grupo</span>",'<a onclick=goForward("'+n.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[n.meshid].name)+"</a>"),null!=n.rname&&(l+=addDeviceAttribute("<span>Nome</span>","<span>"+EscapeHtml(n.rname)+"</span>")),1!=i.mtype&&n.name==n.host||(0!=(4&a)?n.host?l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(n.host)+"</span>"):l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>Nenhum</i></span>"):l+=addDeviceAttribute("Hostname",EscapeHtml(n.host)));var r=n.desc?EscapeHtml(n.desc):"<i>Nenhum</i>";l+=addDeviceAttribute("Descrição",0!=(4&a)?"<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+r+"</span>":r);var d=["Desconhecido","Windows 32 Bits console","Windows 64 Bits console","Serviço Windows 32 Bits","Serviço Windows 64 Bits","Linux 32 bits","Linux 64 bits","MIPS","XENx86","Android ARM","Linux ARM","MacOS 32 bits","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32 bits","MacOS 64 bits","ChromeOS","Linux Poky x86-64 bits","Linux NoKVM x86-32 bits","Linux NoKVM x86-64 bits","Windows MinCore console","Windows MinCore service","NodeJS","ARM-Linaro","ARMv6l / ARMv7l","ARMv8 64bit","ARMv6l / ARMv7l / NoKVM","Desconhecido","Desconhecido","FreeBSD x86-64"];if(null!=n.agent&&null!=n.agent.id&&null!=n.agent.ver){var p="";p=n.agent.id<=d.length?d[n.agent.id]:d[0],0!=n.agent.ver&&(p+=" v"+n.agent.ver),l+=addDeviceAttribute("Agente",p)}if(null!=n.intelamt){p="";var c={0:nobreak("Não ativado (pré)"),1:nobreak("Não ativado (entrada)"),2:nobreak("ativado")};null!=n.intelamt.ver&&null==n.intelamt.state?p+="<i>"+nobreak("Estado desconhecido")+"</i>, v"+n.intelamt.ver:null==n.intelamt.ver&&2==n.intelamt.state?p+="<i>ativado</i>":null==n.intelamt.ver||null==n.intelamt.state?p+="<i>Estado da versão desconhecida</i>":(p+=c[n.intelamt.state],n.intelamt.flags&&(2&n.intelamt.flags?p=" <span>CCM</span>":4&n.intelamt.flags&&(p=" <span>ACM</span>")),p+=", v"+n.intelamt.ver),1==n.intelamt.tls&&(p+=", <span>TLS</span>"),2==n.intelamt.state&&(null!=n.intelamt.user&&""!=n.intelamt.user||(p+=0!=(4&a)?', <i style=color:#FF0000;cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'+nobreak("Sem credenciais")+"</i>":", <i style=color:#FF0000>Sem credenciais</i>"),p+=" ",0!=(4&a)&&(p+='<img src=images/link4.png height=10 width=10 style=cursor:pointer onclick=editDeviceAmtSettings("'+n._id+'")>'));var u="Intel&reg; ME";"number"==typeof n.intelamt.sku&&(0!=(8&n.intelamt.sku)?u="Intel&reg; AMT":0!=(16&n.intelamt.sku)&&(u="Intel&reg; SM")),l+=addDeviceAttribute(u,p)}if(null!=n.agent&&null!=n.agent.tag&&"mailto:"!=n.agent.tag){var m=EscapeHtml(n.agent.tag);m.startsWith("mailto:")&&(m='<a href="'+m+'">'+m.substring(7)+"</a>"),l+=addDeviceAttribute("Etiqueta do agente",m)}var h=n.conn;if(h&&1<h){var g=[];0!=(1&n.conn)&&g.push("<span>Agente</span>"),0!=(2&n.conn)?g.push("<span>Intel&reg; AMT CIRA</span>"):0!=(4&n.conn)&&g.push("<span>Intel&reg; AMT</span>"),0!=(8&n.conn)&&g.push("<span>Retransmissão do agente</span>"),0!=(16&n.conn)&&g.push("<span>MQTT</span>"),l+=addDeviceAttribute("Conectividade",g.join(", "))}var v="<i>Nenhum</i>";if(null!=n.tags)for(var f in v="",n.tags)v+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+n.tags[f]+"</span>";l+=addDeviceAttribute("Tags",0!=(4&a)?"<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+v+"</span>":v),l+="</table><br />",0!=(76&a)&&(l+="<input type=button value=Actions onclick=deviceActionFunction() />"),QH("p10html",l),setupFiles(),l="<div style=float:right;font-size:x-small;margin-right:10px>",0!=(4&a)&&(l+='<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+n._id+'")>Excluir dispositivo</a>'),l+="</div><div style=font-size:x-small>",l+="</div><br>",QH("p10html3",l);var k=PowerStateStr(n.state);0!=(1&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Mesh Agent</span>"),0!=(2&h)?(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT conectado</span>"):0!=(4&h)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel&reg; AMT detectado</span>"),0!=(16&h)&&(0<k.length&&(k+="<br/>"),k+="<span style=font-size:12px>Canal MQTT conectado</span>"),QH("MainComputerState",k),QH("MainComputerImage",'<div class="i'+n.icon+'"></div>'),powerTimelineNode!=currentNode._id&&powerTimelineReq!=currentNode._id&&(QH("p10html2",""),powerTimelineReq=currentNode._id,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}setupDesktop(),go(t=t||10),setupDeviceMenu()}else goBack()}else goBack()}else setDialogMode(2,"Segurança da Conta",1,null,'Não foi possível acessar um dispositivo até que a autenticação de dois fatores esteja ativada. Isso é necessário para segurança extra. Vá para "Minha conta" e veja a seção "Segurança da conta".');else setDialogMode(2,"Segurança da Conta",1,null,'Não foi possível acessar um dispositivo até que um endereço de email seja verificado. Isso é necessário para a recuperação de senha. Vá para "Minha conta" para alterar e verificar um endereço de email.')}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"Brinde do dispositivo",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var o=0;currentNode&&(o=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var n=[];0!=currentDevicePanel&&n.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&o||256&o)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8&currentNode.intelamt.sku))||currentNode.agent&&1&currentNode.agent.caps)&&n.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&o&&(4294967295==o||0==(1024&o))&&2==currentNode.mtype&&4&currentNode.agent.caps&&n.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(n)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="Selecione uma operação para executar neste dispositivo.<br /><br />",o="<select id=d2deviceop style=float:right;width:170px>";0!=(64&e)&&(o+="<option value=100>Ligar</option>"),0!=(8&e)&&(o+="<option value=4>Hibernar</option><option value=3>Redefinir</option><option value=2>Desligar</option>"),setDialogMode(2,"Ação do dispositivo",3,deviceActionFunctionEx,t+=addHtmlValue("Operação",o+="</select>"))}}function deviceActionFunctionEx(){var e=Q("d2deviceop").value;100==e?meshserver.send({action:"wakedevices",nodeids:[currentNode._id]}):meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:e})}function updateDeviceTimeline(){2==meshserver.State&&null!=powerTimelineNode&&null!=powerTimelineUpdate&&null!=currentNode&&powerTimelineNode==powerTimelineReq&&currentNode._id==powerTimelineNode&&powerTimelineUpdate<Date.now()&&(powerTimelineUpdate=null,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}function drawDeviceTimeline(){var e=null,t=Date.now();currentNode._id==powerTimelineNode&&(e=powerTimeline);var o=new Date;o.setHours(0,0,0,0);(o=new Date(o.getTime()-5184e5)).getTime();var n=[];if(null!=e&&1<e.length){n.push([0,e[1],e[0]]);for(var i=e[1],a=2;a<e.length;a+=2){var s=e[a],l=t;e.length>a+1&&(l=e[a+1]),n.push([i,i+l,s]),i+=l}}var r="",d=1,p=new Date,c=Q("masthead").offsetWidth-122;p.setHours(0,0,0,0);for(a=0;a<7;a++){var u="",m=p.getTime(),h=m+864e5;for(var g in n){var v=n[g];if(1==isTimeBlockInside(m,h,v[0],v[1])){var f=Math.max(m,v[0]),k=Math.min(Math.min(h,v[1]),t),x=Math.round((k-f)*c/864e5);0<x&&(u+="<div style=display:table-cell;width:"+x+"px;background-color:"+powerColor(v[2])+";height:16px></div>")}}r+="<tr style="+(d%2==0?"background-color:#DDD":"")+"><td><div>&nbsp;"+printDate(p)+"<div></div></div></td><td><div>"+u+"</div></td></tr>",++d,p=new Date(p.getTime()-864e5)}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse;width:calc(100% - 18px);margin:9px" border=0 cellpadding=2 cellspacing=0><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:90px>Day</th><th scope=col style=text-align:center>Power State</th></tr>'+r+"</tbody></table>")}function powerColor(e){return e<powerColorTable.length?powerColorTable[e]:"yellow"}function isTimeBlockInside(e,t,o,n){return o<e&&t<n||(e<o&&o<t||e<n&&n<t)}function addDeviceAttribute(e,t){return"<tr><td style=width:100px;color:gray>"+e+"</td><td style=overflow:hidden>"+t+"</td></tr>"}function editDeviceAmtSettings(e,t){if(!xxdialogMode){var o="",n=getNodeFromId(e),i=3;0!=(4&getNodeRights(e))&&(o+=addHtmlValue("Nome de usuário",'<input id=dp10username style=width:170px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />'),o+=addHtmlValue("Senha","<input id=dp10password type=password style=width:170px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />"),o+=addHtmlValue("Segurança","<select id=dp10tls style=width:176px><option value=0>Sem segurança TLS</option><option value=1>Segurança TLS necessária</option></select>"),null!=n.intelamt.user&&""!=n.intelamt.user&&(i=7),setDialogMode(2,"Editar Intel & reg; Credenciais AMT",i,editDeviceAmtSettingsEx,o,{node:n,func:t}),null!=n.intelamt.user&&""!=n.intelamt.user?Q("dp10username").value=n.intelamt.user:Q("dp10username").value="admin",Q("dp10tls").value=n.intelamt.tls,validateDeviceAmtSettings())}}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(e,t){if(2==e)meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:"",pass:""}});else{var o=Q("dp10username").value;""==o&&(o="admin");var n=Q("dp10password").value;""==n&&(o=""),meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:o,pass:n,tls:Q("dp10tls").value}}),t.node.intelamt.user=o,t.node.intelamt.tls=Q("dp10tls").value,t.func&&setTimeout(t.func,300)}}function p10showDeleteNodeDialog(e){xxdialogMode||(setDialogMode(2,"Excluir nó",3,p10showDeleteNodeDialogEx,format("Excluir {0}?",EscapeHtml(currentNode.name))+"<br /><br /><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />Confirme",e),p10validateDeleteNodeDialog())}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(e,t){meshserver.send({action:"removedevices",nodeids:[t]})}function p10showiconselector(){if(!xxdialogMode&&0!=(4&meshes[currentNode.meshid].links[userinfo._id].rights)){"<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>","<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>","<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br>","<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>","<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>","<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>",setDialogMode(2,"Seleção de ícone",0,null,"<table align=center><td><div style=display:inline-block class=i1 onclick=p10setIcon(1)></div><div style=display:inline-block class=i2 onclick=p10setIcon(2)></div><div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br><div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><div style=display:inline-block class=i5 onclick=p10setIcon(5)></div><div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>"),QV("id_dialogclose",!0)}}function p10setIcon(e){setDialogMode(0),meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:e})}var desktop,desktopNode,showEditNodeValueDialog_modes=["Nome do Dispositivo","Hostname","Descrição","Tags"],showEditNodeValueDialog_modes2=["name","host","desc","tags"],showEditNodeValueDialog_modes3=["","","","Grupo1, Grupo2, Grupo3"];function showEditNodeValueDialog(e){if(!xxdialogMode){setDialogMode(2,"Editar dispositivo",3,showEditNodeValueDialogEx,addHtmlValue(showEditNodeValueDialog_modes[e],'<input id=dp10devicevalue style=width:170px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[e]+'" onchange=p10editdevicevalueValidate('+e+",event) onkeyup=p10editdevicevalueValidate("+e+",event) />"),e);var t=currentNode[showEditNodeValueDialog_modes2[e]];null==t&&(t=""),Array.isArray(t)&&(t=t.join(", ")),Q("dp10devicevalue").value=t,p10editdevicevalueValidate(),Q("dp10devicevalue").focus()}}function showEditNodeValueDialogEx(e,t){var o={action:"changedevice",nodeid:currentNode._id};o[showEditNodeValueDialog_modes2[t]]=Q("dp10devicevalue").value,meshserver.send(o)}function p10editdevicevalueValidate(e,t){var o=1<e||0<Q("dp10devicevalue").value.length;QE("idx_dlgOkButton",o),null!=t&&1==o&&13==t.keyCode&&dialogclose(1)}var desktopsettings={encoding:2,showfocus:!1,showmouse:!0,showcad:!0,quality:40,scaling:1024,framerate:50};function setupDesktop(){desktopNode!=currentNode&&null!=desktop&&(desktop.Stop(),desktop=desktopNode=null),desktopNode==currentNode&&null!=desktop||(QH("DeskParent",'<canvas id=Desk width=640 height=200 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>'),desktopNode=currentNode,Q("Desk").addEventListener("DOMMouseScroll",function(e){return dmousewheel(e)}),Q("Desk").addEventListener("mousewheel",function(e){return dmousewheel(e)})),desktopNode=currentNode,updateDesktopButtons(),Q("Desk").toBlob||QV("deskSaveBtn",!1)}function updateDesktopButtons(){var e=meshes[currentNode.meshid],t=0;null!=desktop&&(t=desktop.State);var o=e.links[userinfo._id].rights;QV("disconnectbutton1",0!=t),QV("connectbutton1",0==t&&2==e.mtype&&(8&o||256&o)),QV("connectbutton1h",0==t&&8&o&&(1==e.mtype||null!=currentNode.intelamt&&2==currentNode.intelamt.state&&null!=currentNode.intelamt.ver&&"number"==typeof currentNode.intelamt.sku&&0!=(8&currentNode.intelamt.sku))),QV("d7amtkvm",!(null==currentNode.intelamt||null==currentNode.intelamt.ver&&1!=e.mtype||0!=t&&2!=desktop.contype)),QV("d7meshkvm",2==e.mtype&&(0==t||1==desktop.contype));var n=0!=(1&currentNode.conn);QE("connectbutton1",n);var i=0!=(6&currentNode.conn);QE("connectbutton1h",i),QV("DeskToastButton",0!=(16384&o)&&currentNode.agent&&currentNode.agent.id<5&&8&o),QV("deskActionsBtn",8&o),Q("DeskControl").checked=0!=(8&o),0==n&&QV("DeskTools",!1)}function connectDesktop(e,t){if(setSessionActivity(),null==desktop)if(desktopNode=currentNode,2==t){if(null==desktopNode.intelamt.user||""==desktopNode.intelamt.user)return void editDeviceAmtSettings(desktopNode._id,connectDesktop);(desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie)).debugmode=debugmode,desktop.onStateChanged=onDesktopStateChange,desktop.m.bpp=1==desktopsettings.encoding||3==desktopsettings.encoding?1:2,desktop.m.useZRLE=desktopsettings.encoding<3,desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id,16994,"*","*",0),desktop.contype=2}else(desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).debugmode=debugmode,desktop.m.debugmode=debugmode,desktop.attemptWebRTC=attemptWebRTC,desktop.onStateChanged=onDesktopStateChange,desktop.m.CompressionLevel=desktopsettings.quality,desktop.m.ScalingLevel=desktopsettings.scaling,desktop.m.FrameRateTimer=desktopsettings.framerate,desktop.m.onDisplayinfo=deskDisplayInfo,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id),desktop.contype=1;else desktop.Stop(),desktopNode=desktop=null}function onDesktopStateChange(e,t){var o=t;3==o&&2==e.contype&&o++;var n=StatusStrs[o];switch(null!=desktop&&1==desktop.webRtcActive&&(n+=", WebRTC"),QH("deskstatus",n),t){case 0:desktop.Stop(),desktopNode=desktop=null,QV("termdisplays",!1),1==fullscreen&&deskToggleFull()}updateDesktopButtons(),deskAdjust(),setTimeout(deskAdjust,50)}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),updateDesktopButtons(),setDialogMode(7,"Configurações da área de trabalho remota",3,showDesktopSettingsChanged))}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value,desktopsettings.showfocus=d7showfocus.checked,desktopsettings.showmouse=d7showcursor.checked,desktopsettings.quality=d7bitmapquality.value,desktopsettings.scaling=d7bitmapscaling.value,desktopsettings.framerate=d7framelimiter.value,localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings)),applyDesktopSettings(),desktop&&(1==desktop.contype&&0!=desktop.State&&desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate),2==desktop.contype&&0!=desktop.State&&(desktop.Stop(),setTimeout(function(){connectDesktop(null,2)},50)))}function applyDesktopSettings(){var e="",t=512&features?[90,70,50,40,30,20,10,5,1]:[50,40,30,20,10,5,1];for(var o in t)e+="<option value="+t[o]+">"+t[o]+"%</option>";QH("d7bitmapquality",e),d7desktopmode.value=desktopsettings.encoding,d7showfocus.checked=desktopsettings.showfocus,d7showcursor.checked=desktopsettings.showmouse,d7bitmapquality.value=40,0<=t.indexOf(parseInt(desktopsettings.quality))&&(d7bitmapquality.value=desktopsettings.quality),d7bitmapscaling.value=desktopsettings.scaling,desktopsettings.framerate&&(d7framelimiter.value=desktopsettings.framerate)}var fullscreen=!1;function deskAdjust(){var e=(Q("DeskParent").clientHeight-Q("Desk").clientHeight)/2;if(e<0){var t=Q("DeskParent").clientHeight,o=9999;desktop&&(o=desktop.m.width/desktop.m.height*t),QS("Desk")["max-height"]=t+"px",QS("Desk")["max-width"]=o+"px",e=0}else QS("Desk")["max-height"]=null,QS("Desk")["max-width"]=null;QS("Desk")["margin-top"]=e+"px",QS("Desk")["margin-bottom"]=e+"px"}function deskSendKeys(){if(!xxdialogMode&&null!=desktop&&3==desktop.State){var e=Q("deskkeys").value;0==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]]):1==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]]):2==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]]):desktop.sendCtrlMsg('{"action":"lock"}'):3==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]]):4==e?2==desktop.contype?desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]]):5==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]]):6==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]]):7==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65473,1],[65473,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,115],[desktop.m.KeyAction.UP,115],[desktop.m.KeyAction.EXUP,18]]):8==e?2==desktop.contype?desktop.m.sendkey([[65507,1],[119,1],[119,0],[65507,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,17],[desktop.m.KeyAction.DOWN,87],[desktop.m.KeyAction.UP,87],[desktop.m.KeyAction.EXUP,17]]):9==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65289,1],[65289,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9],[desktop.m.KeyAction.EXUP,18]]):10==e?desktop.m.sendcad():11==e&&(2==desktop.contype?desktop.m.sendkey([[65289,1],[65289,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9]]))}}function sendSpecialKeys(){xxdialogMode||null==desktop||3!=desktop.State||setDialogMode(3,"Chaves especiais",3,deskSendKeys)}function toggleSoftKeys(e){QV("DeskSoftInput",1==e),1==e&&Q("DeskSoftInput").focus()}function toggleDeskTools(){setSessionActivity(),xxdialogMode||("none"==QS("DeskTools").display?(QV("DeskTools",!0),Q("DeskTools").nodeid=currentNode._id,refreshDeskTools()):QV("DeskTools",!1))}function refreshDeskTools(){setSessionActivity(),QV("DeskToolsRefreshButton",!1),setTimeout(refreshDeskToolsEx,500),meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",!0)}var filesNode,deskTools={sort:1,msg:null};function sortProcess(e){deskTools.sort=e,showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(e,t){return e.p>t.p?1:e.p<t.p?-1:0}function sortProcessName(e,t){return e.d>t.d?1:e.d<t.d?-1:0}function showDeskToolsProcesses(e){if(null!=(deskTools.msg=e)){if(Q("DeskTools").nodeid==e.nodeid){var t=[],o=null;try{o=JSON.parse(e.value)}catch(e){}if(console.log(o),null!=o){for(var n in o)t.push({p:parseInt(n),c:o[n].cmd,d:o[n].cmd.toLowerCase(),u:o[n].user});0==deskTools.sort?t.sort(sortProcessPid):1==deskTools.sort&&t.sort(sortProcessName);var i="";for(var a in t)0!=t[a].p&&(i+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+t[a].p+"</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess("+t[a].p+',"'+t[a].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(t[a].u?t[a].u:"")+"</div><div>"+t[a].c+"</div></div>");QH("DeskToolsProcesses",i)}}}else QH("DeskToolsProcesses","")}function deskSaveImage(){if(setSessionActivity(),!xxdialogMode&&null!=desktop&&3==desktop.State){var e=new Date,t="Desktop-"+currentNode.name+"-"+e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)+"-"+("0"+e.getHours()).slice(-2)+"-"+("0"+e.getMinutes()).slice(-2);Q("Desk").toBlob(function(e){saveAs(e,t+".jpg")})}}function deskDisplayInfo(e,t,o,n){var i=Q("termdisplays").value;if(0<t.length){var a="";for(var s in t)a+="<option"+(i==t[s]?" selected":"")+">"+t[s]+"</option>";QH("termdisplays",a)}QV("termdisplays",0<t.length)}function deskGetDisplayNumbers(e){desktop.m.GetDisplayNumbers()}function deskSetDisplay(e){setSessionActivity();var t=0,o=Q("termdisplays").value;t="Todas as telas"==o?65535:parseInt(o.substring(8)),desktop.m.SetDisplay(t)}function dmousedown(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousedown(e)}function dmouseup(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mouseup(e)}function dmousemove(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousemove(e)}function dmousewheel(e){return setSessionActivity(),!(xxdialogMode||null==desktop||!desktop.m.mousewheel)&&(desktop.m.mousewheel(e),haltEvent(e),!0)}function drotate(e){xxdialogMode||null==desktop||(desktop.m.setRotation(desktop.m.rotation+e),deskAdjust(),deskAdjust())}function stopProcess(e,t){return setDialogMode(2,"Controle do processo",3,stopProcessEx,format('Parar processo #{0} "{1}"?',e,t),e),!1}function stopProcessEx(e,t){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:t}),setTimeout(refreshDeskTools,300)}function setupFiles(){var e=filesNode==currentNode,t=0!=(1&(filesNode=currentNode).conn);QE("p13Connect",t),0!=e&&0!=t||!files||(files.Stop(),files=null)}function onFilesStateChange(e,t){setSessionActivity(),p13Connect.value=0==t?"Conectar":"Desconectar";var o=StatusStrs[t];switch(1==files.webRtcActive&&(o+=", WebRTC"),Q("p13Status").textContent=o,t){case 0:QH("p13files",""),p13filetree=null,p13filetreelocation=[],QH("p13currentpath",""),QE("p13FolderUp",!1),p13setActions(),null!=files&&(files.Stop(),files=null);break;case 3:p13targetpath="",files.sendText({action:"ls",reqid:1,path:""})}}function CreateRemoteFiles(e){var t={protocol:5};return t.onFileUpdate=e,t.xxStateChange=function(e){},t.ProcessData=function(e){t.onFileUpdate(e)},t}var autoConnectFilesTimer=null;function autoConnectFiles(e){autoConnectFilesTimer=null==autoConnectFilesTimer?setInterval(connectFiles,100):(clearInterval(autoConnectFilesTimer),null)}function connectFiles(e){files?(files.Stop(),files=null):((files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).attemptWebRTC=attemptWebRTC,files.onStateChanged=onFilesStateChange,files.Start(filesNode._id)),p13clipboard=p13clipboardFolder=null,p13clipboardCut=0,p13updateClipview()}var p13sortorder,p13filetree=null,p13targetpath=null,p13filetreelocation=[];function p13gotFiles(e){if(setSessionActivity(),0<e.length&&123!=e.charCodeAt(0))p13gotDownloadBinaryData(e);else if("download"!=(e=JSON.parse(decode_utf8(e))).action)if(e.path=e.path.replace(/\//g,"\\"),null!=p13filetree&&e.path==p13filetree.path){var t=p13getCheckedNames();p13filetree=e,p13updateFiles(t)}else{for(var o=e.path.replace(/\//g,"\\"),n=p13targetpath.replace(/\//g,"\\");0<o.length&&"\\"==o[0];)o=o.substring(1);for(;0<n.length&&"\\"==n[0];)n=n.substring(1);(o==n||"\\"==e.path&&""==p13targetpath)&&(p13filetree=e,p13updateFiles())}else p13gotDownloadCommand(e)}function p13getCheckedNames(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);return e}function p13updateFiles(e){var t="",o="",n="<a style=cursor:pointer onclick=p13folderup(0)>Raiz</a>",i=p13filetree.path.split("\\");for(var a in p13filetreelocation=[],i)""!=i[a]&&p13filetreelocation.push(i[a]);for(var a in p13filetreelocation)n+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(a)+1)+")>"+p13filetreelocation[a]+"</a>";var s=p13filetreelocation.join("/"),l=p13sort_files(p13filetree.dir);for(var a in l){var r,d=l[a],p=d.n;r=70<(r=p).length?EscapeHtml(p.substring(0,70))+"...":EscapeHtml(p),p=EscapeHtml(p);var c="";null!=d.s&&(c=getFileSizeStr(d.s));var u="";if(d.t<3){u="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right></span><span><div class=fileIcon"+d.t+'></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+r+"</a></span></div>"}else{var m=r;0<d.s&&(m='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+p)+"','"+encodeURIComponent(p)+"',"+d.s+')">'+r+"</a>"),u="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'>&nbsp;<span style=float:right;padding-right:4px>"+c+"</span><span><div class=fileIcon"+d.t+"></div>"+m+"</span></div>"}d.t<3?t+=u:o+=u}if(QH("p13files",t+o),QH("p13currentpath",n),QE("p13FolderUp",0!=p13filetreelocation.length),null!=e){var h=document.getElementsByName("fd");for(a=0;a<h.length;a++)0<=e.indexOf(p13filetree.dir[h[a].value].n)&&(h[a].checked=!0)}p13setActions()}function p13folderset(e){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[e].n).split("\\").join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(e){if(null==e)p13filetreelocation.pop();else for(;p13filetreelocation.length>e;)p13filetreelocation.pop();p13targetpath=p13filetreelocation.join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13sort_filename(e,t){return e.ln>t.ln?1*p13sortorder:e.ln<t.ln?-1*p13sortorder:0}function p13sort_timestamp(e,t){return e.d>t.d?1*p13sortorder:e.d<t.d?-1*p13sortorder:0}function p13sort_bysize(e,t){return e.s==t.s?p13sort_filename(e,t):(e.s-t.s)*p13sortorder}function p13sort_files(e){var t=[],o=Q("p13sortdropdown").value;for(var n in e)e[n].nx=n,null==e[n].s&&(e[n].s=0),null==e[n].n&&(e[n].n=n),e[n].ln=e[n].n.toLowerCase(),t.push(e[n]);return p13sortorder=1,3<o&&(p13sortorder=-1,o-=3),1==o?t.sort(p13sort_filename):2==o?t.sort(p13sort_bysize):3==o&&t.sort(p13sort_timestamp),t}function p13setActions(){if(null==p13filetree)QE("p13DeleteFileButton",!1),QE("p13NewFolderButton",!1),QE("p13UploadButton",!1),QE("p13RenameFileButton",!1),QE("p13SelectAllButton",!1),Q("p13SelectAllButton").value="Todos",QE("p13RefreshButton",!1),QE("p13CutButton",!1),QE("p13CopyButton",!1),QE("p13PasteButton",!1);else{var e=p13getFileSelCount(),t=p13getFileCount(),o=p13getFileSelCount(!1),n=0<currentNode.agent.id&&currentNode.agent.id<5;QE("p13DeleteFileButton",0<e&&(0<p13filetreelocation.length||0==n)),QE("p13NewFolderButton",0<p13filetreelocation.length||0==n),QE("p13UploadButton",0<p13filetreelocation.length||0==n),QE("p13RenameFileButton",1==e&&(0<p13filetreelocation.length||0==n)),QE("p13SelectAllButton",0<t),Q("p13SelectAllButton").value=0<e?"Nenhum":"Todos",QE("p13RefreshButton",!0),QE("p13CutButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13CopyButton",0<e&&e==o&&(0<p13filetreelocation.length||0==n)),QE("p13PasteButton",(0<p13filetreelocation.length||0==n)&&null!=p13clipboard&&0<p13clipboard.length)}}function p13getFileSelCount(e){for(var t=0,o=document.getElementsByName("fd"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function p13getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&"999"==t[o].attributes.file.value&&e++;return e}function p13getFileCount(){return document.getElementsByName("fd").length}function p13selectallfile(){for(var e=0==p13getFileSelCount(),t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked=e;p13setActions()}function p13createfolder(){setDialogMode(2,"Nova pasta",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />"),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value}),p13folderup(999)}function p13deletefile(){var e=p13getFileSelCount(),t=0<p13getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p13recdeleteinput>Exclusão recursiva</label><br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"Deletar",3,p13deletefileEx,1<e?format("Excluir {0} itens selecionados?",e)+t:"Excluir item selecionado?"+t)}function p13deletefileEx(){for(var e=[],t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&e.push(p13filetree.dir[t[o].value].n);files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:e,rec:Q("p13recdeleteinput").checked}),p13folderup(999)}function p13renamefile(){for(var e,t=document.getElementsByName("fd"),o=0;o<t.length;o++)t[o].checked&&(e=p13filetree.dir[t[o].value].n);setDialogMode(2,"Renomear",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:e}),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13renamefileEx(e,t){t.newname=Q("p13renameinput").value,files.sendText(t),p13folderup(999)}function p13fileNameCheck(e){var t=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",t),1==t&&null!=e&&13==e.keyCode&&dialogclose(1)}function p13uploadFile(){setDialogMode(2,"Subir arquivo",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />"),updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}function p13viewfile(){for(var e=document.getElementsByName("fd"),t=0;t<e.length;t++)if(e[t].checked){p13filetree.dir[e[t].value].s<=204800?p13downloadfile(encodeURIComponent(p13filetreelocation.join("/")+"/"+p13filetree.dir[e[t].value].n),encodeURIComponent(p13filetree.dir[e[t].value].n),p13filetree.dir[e[t].value].s,"viewer"):messagebox("Editor de Arquivos","Somente arquivos com menos de 200k podem ser editados.");break}}var downloadFile,uploadFile,currentMesh,p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(e){var t=document.getElementsByName("fd");p13clipboard=[],p13clipboardCut=e,p13clipboardFolder=p13targetpath;for(var o=0;o<t.length;o++)t[o].checked&&"3"==t[o].attributes.file.value&&p13clipboard.push(p13filetree.dir[t[o].value].n);p13updateClipview()}function p13pasteFile(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format("Confirmar cópia de {0} entradas para este local?",p13clipboard.length):format("Confirmar cópia de 1 entrada para este local?"):1<p13clipboard.length?format("Confirmar a movimentação de {0} entradas para este local?",p13clipboard.length):format("Confirmar a movimentação de 1 entrada para este local?")),setDialogMode(2,"Colar",3,p13pasteFileEx,e)}function p13pasteFileEx(){files.sendText({action:0==p13clipboardCut?"copy":"move",reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard}),p13folderup(999),1==p13clipboardCut&&(p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview())}function p13updateClipview(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format('Mantendo {0} entradas para cópia, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Limpo</a>.',p13clipboard.length):format('Mantendo 1 entrada para cópia, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Limpo</a>.'):1<p13clipboard.length?format('Manter {0} entradas para mover, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Limpo</a>.',p13clipboard.length):format('Segurando 1 entrada para mover, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Limpo</a>.')),QH("p13bottomstatus",e),p13setActions()}function p13clearClip(){return p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview(),!1}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}function getFileSelCount(e){for(var t=0,o=document.getElementsByName("fc"),n=0;n<o.length;n++)!o[n].checked||0==e&&"3"!=o[n].attributes.file.value||t++;return t}function getFileCount(){return document.getElementsByName("fc").length}function p13downloadfile(e,t,o){xxdialogMode||downloadFile||!files||(downloadFile={path:decodeURIComponent(e),file:decodeURIComponent(t),size:o,tsize:0,data:"",state:0,id:Math.random()},files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path}),setDialogMode(2,"⇬ Fazer download do arquivo",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+o+" />"))}function p13downloadFileCancel(){setDialogMode(0),files.sendText({action:"download",sub:"cancel",id:downloadFile.id}),downloadFile=null}function p13gotDownloadCommand(e){null!=downloadFile&&e.id==downloadFile.id&&("start"==e.sub?(downloadFile.state=1,files.sendText({action:"download",sub:"startack",id:downloadFile.id})):"cancel"==e.sub&&(downloadFile=null,setDialogMode(0)))}function p13gotDownloadBinaryData(e){downloadFile&&0!=downloadFile.state&&(4<e.length&&(downloadFile.tsize+=e.length-4,downloadFile.data+=e.substring(4),Q("d2progressBar").value=downloadFile.tsize),0!=(1&ReadInt(e,0))?(saveAs(data2blob(downloadFile.data),downloadFile.file),downloadFile=null,setDialogMode(0)):files.sendText({action:"download",sub:"ack",id:downloadFile.id}))}function p13doUploadFiles(e){xxdialogMode||((uploadFile={}).xpath=p13filetreelocation.join("/"),uploadFile.xfiles=e,uploadFile.xfilePtr=-1,setDialogMode(2,"Subir arquivo",10,p13uploadFileCancel,"<div id=p13dfileName>Conectando...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />"),p13uploadReconnect())}function onFileUploadStateChange(e,t){switch(t){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",t)}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie,authRelayCookie,domainUrl),uploadFile.ws.attemptWebRTC=!1,uploadFile.ws.ctrlMsgAllowed=!1,uploadFile.ws.onStateChanged=onFileUploadStateChange,uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){if(uploadFile.xfilePtr++,uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var e=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",e.name),Q("d2progressBar").max=e.size,Q("d2progressBar").value=0,uploadFile.xreader=new FileReader,uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result,uploadFile.ws.sendText({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:e.name,size:uploadFile.xdata.byteLength})},uploadFile.xreader.readAsArrayBuffer(e)}else p13uploadFileCancel()}function p13uploadFileCancel(e,t){null!=uploadFile&&(null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile=null),setDialogMode(0)}function p13gotUploadData(e){var t=JSON.parse(e);if(null!=uploadFile&&parseInt(uploadFile.xfilePtr)==parseInt(t.reqid))if("uploadstart"==t.action){p13uploadNextPart(!1);for(var o=0;o<8;o++)p13uploadNextPart(!0)}else"uploadack"==t.action?p13uploadNextPart(!1):"uploaderror"==t.action&&p13uploadFileCancel()}function p13uploadNextPart(e){var t=uploadFile.xdata,o=uploadFile.xptr,n=uploadFile.xptr+4096;if(n>t.byteLength){if(1==e)return;n=t.byteLength}if(o==t.byteLength)null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile.xfiles.length>uploadFile.xfilePtr+1?p13uploadReconnect():p13uploadFileCancel();else{var i=t.slice(o,n);uploadFile.ws.send(i),uploadFile.xptr=n,Q("d2progressBar").value=n}}function p20updateMesh(){if(null!=currentMesh){QH("p20meshName",EscapeHtml(currentMesh.name));var e=format("Desconhecido # {0}",currentMesh.mtype),t=currentMesh.links[userinfo._id].rights;1==currentMesh.mtype&&(e="Intel&reg; Apenas AMT, nenhum agente"),2==currentMesh.mtype&&(e="Gerenciado usando um agente de software");var o="";o+=addHtmlValue("Nome",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",0!=(1&t))),o+=addHtmlValue("Descrição",addLinkConditional(currentMesh.desc&&""!=currentMesh.desc?EscapeHtml(currentMesh.desc):"<i>Nenhum</i>","p20editmesh(2)",0!=(1&t))),o+=addHtmlValue("Tipo",e),o+="<br style=clear:both><br>";var n=currentMesh.links[userinfo._id];n&&0!=(2&n.rights)&&(o+="<div style=margin-bottom:6px><a onclick=p20showAddMeshUserDialog() style=cursor:pointer><img src=images/icon-addnew.png border=0 height=12 width=12> Adicionar usuário</a></div>"),o+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>Autorizações de usuário</th></tr>';var i=1,a=[];for(var s in currentMesh.links)a.push({id:s,name:s.split("/")[2],rights:currentMesh.links[s].rights});for(var s in a.sort(function(e,t){return e.name>t.name?1:e.name<t.name?-1:0}),a){var l="",r="Direitos parciais",d=a[s].rights;4294967295==d?r="Administrador completo":0==d&&(r="Sem direitos"),s==userinfo._id||4294967295!=t&&0==(2&t)||(l='<a onclick=p20deleteUser(event,"'+encodeURIComponent(a[s].id)+'") style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'),o+='<tr onclick=p20viewuser("'+encodeURIComponent(a[s].id)+'") style=height:32px;cursor:pointer'+(i%2==0?";background-color:#DDD":"")+"><td>",o+="<div style=float:right>"+l+"</div><div style=float:right;padding-right:4px>"+r+"</div><div class=m2></div><div>&nbsp;"+EscapeHtml(decodeURIComponent(a[s].name))+"<div></div></div>",o+="</td></tr>",++i}o+="</tbody></table>",4294967295==t&&(o+="<div style=font-size:small;text-align:right;margin-top:6px><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>Excluir grupo</a></span></div>"),QH("p20info",o)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("Tem certeza de que deseja excluir o grupo {0}? A exclusão do grupo de dispositivos também excluirá todas as informações sobre os dispositivos desse grupo.",EscapeHtml(currentMesh.name))+"<br /><br />";return setDialogMode(2,"Excluir grupo",3,p20showDeleteMeshDialogEx,e+="<label><input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />Confirme</label>"),p20validateDeleteMeshDialog(),!1}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(e,t){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(e){if(!xxdialogMode){var t=addHtmlValue("Nome","<input id=dp20meshname style=width:170px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");setDialogMode(2,"Editar grupo de dispositivos",3,p20editmeshEx,t+=addHtmlValue("Descrição","<input id=dp20meshdesc style=width:170px maxlength=1024 onkeyup=p20editmeshValidate() />")),Q("dp20meshname").value=currentMesh.name,currentMesh.desc&&(Q("dp20meshdesc").value=currentMesh.desc),p20editmeshValidate(),2==e?Q("dp20meshdesc").focus():Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",0<Q("dp20meshname").value.length)}function p20showAddMeshUserDialog(){if(!xxdialogMode){var e=addHtmlValue("User","<input id=dp20username style=width:170px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");e+='<div style="border:2px groove gray;background-color:white;max-height:120px;overflow-y:scroll">',e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>Administrador completo</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>Editar grupo de dispositivos</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>Gerenciar usuários do grupo de dispositivos</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>Gerenciar computadores do grupo de dispositivos</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>Controle remoto</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>Somente visualização remota</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotelimitedinput style=margin-left:12px>Somente entrada limitada</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>Sem acesso ao terminal</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>Sem acesso a arquivos</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>Nenhum Intel&reg; AMT</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>Mesh Agent Console</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>Arquivos do servidor</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>Reativar dispositivo</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>Editar notas do dispositivo</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20limitevents>Mostrar apenas eventos próprios</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20chatnotify>Chat & Notificação</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20uninstall>Uninstall Agent</label><br>",setDialogMode(2,"Adicionar usuário à malha",3,p20showAddMeshUserDialogEx,e+="</div>"),p20validateAddMeshUserDialog(),Q("dp20username").focus()}}function p20validateAddMeshUserDialog(){var e=currentMesh.links[userinfo._id].rights,t=!Q("p20fulladmin").checked;QE("p20fulladmin",4294967295==e),QE("p20editmesh",t&&4294967295==e),QE("p20manageusers",t),QE("p20managecomputers",t),QE("p20remotecontrol",t),QE("p20meshagentconsole",t),QE("p20meshserverfiles",t),QE("p20wakedevices",t),QE("p20editnotes",t),QE("p20limitevents",t),QE("p20remoteview",t&&Q("p20remotecontrol").checked),QE("p20remotelimitedinput",t&&Q("p20remotecontrol").checked&&!Q("p20remoteview").checked),QE("p20noterminal",t&&Q("p20remotecontrol").checked),QE("p20nofiles",t&&Q("p20remotecontrol").checked),QE("p20noamt",t&&Q("p20remotecontrol").checked),QE("p20chatnotify",t),QE("p20uninstall",t)}function p20showAddMeshUserDialogEx(){var e=0;1==Q("p20fulladmin").checked?e=4294967295:(1==Q("p20editmesh").checked&&(e+=1),1==Q("p20manageusers").checked&&(e+=2),1==Q("p20managecomputers").checked&&(e+=4),1==Q("p20remotecontrol").checked&&(e+=8),1==Q("p20meshagentconsole").checked&&(e+=16),1==Q("p20meshserverfiles").checked&&(e+=32),1==Q("p20wakedevices").checked&&(e+=64),1==Q("p20editnotes").checked&&(e+=128),1==Q("p20remoteview").checked&&(e+=256),1==Q("p20noterminal").checked&&(e+=512),1==Q("p20nofiles").checked&&(e+=1024),1==Q("p20noamt").checked&&(e+=2048),1==Q("p20remotelimitedinput").checked&&(e+=4096),1==Q("p20limitevents").checked&&(e+=8192),1==Q("p20chatnotify").checked&&(e+=16384),1==Q("p20uninstall").checked&&(e+=32768));var t=Q("dp20username").value.split(","),o=[];for(var n in t)o.push(t[n].trim());meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,usernames:o,meshadmin:e})}function p20viewuser(e){if(!xxdialogMode){e=decodeURIComponent(e);var t=[],o=currentMesh.links[userinfo._id].rights,n=currentMesh.links[e].rights;4294967295==n?t.push("Administrador completo"):(0!=(1&n)&&t.push("Editar grupo de dispositivos"),0!=(2&n)&&t.push("Gerenciar usuários do grupo de dispositivos"),0!=(4&n)&&t.push("Gerenciar computadores do grupo de dispositivos"),0!=(8&n)&&t.push("Controle remoto"),0!=(16&n)&&t.push("Console do agente"),0!=(32&n)&&t.push("Arquivos do servidor"),0!=(64&n)&&t.push("Reativar dispositivo"),0!=(128&n)&&t.push("Editar notas"),0!=(256&n)&&t.push("Somente visualização remota"),0!=(512&n)&&t.push("Sem terminal"),0!=(1024&n)&&t.push("Sem arquivos"),0!=(2048&n)&&t.push("Nenhum Intel&reg; AMT"),0!=(8&n)&&0!=(4096&n)&&0==(256&n)&&t.push("Entrada limitada"),0!=(8192&n)&&t.push("Somente Eventos Próprios"),0!=(16384&n)&&t.push("Chat & Notificação"),0!=(32768&n)&&t.push("Uninstall")),0==t.length&&t.push("Sem direitos");var i=1,a=addHtmlValue("Do utilizador",EscapeHtml(decodeURIComponent(e.split("/")[2])));a+=addHtmlValue("Permissões",t.join(",")),userinfo._id!=e&&(4294967295==o||0!=(2&o)&&4294967295!=n)&&(i+=4),setDialogMode(2,"Usuário do grupo de dispositivos",i,p20viewuserEx,a,e)}}function p20viewuserEx(e,t){2==e&&setDialogMode(2,"Usuário de malha remota",3,p20viewuserEx2,format("Confirmar remoção do usuário {0}?",t.split("/")[2]),t)}function p20deleteUser(e,t){haltEvent(e),p20viewuserEx(2,decodeURIComponent(t))}function p20viewuserEx2(e,t){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:t})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xxcurrentView=-1;function go(e){if(setSessionActivity(),!xxdialogMode&&xxcurrentView!=e){updateFooterMenu(),setDialogMode(0);for(var t=0;t<32;t++)QV("p"+t,t==e);xxcurrentView=e}}function setDialogMode(e,t,o,n,i,a){setSessionActivity(),xxdialogMode=e,xxdialogFunc=n,xxdialogButtons=o,xxdialogTag=a,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&o),QV("idx_dlgCancelButton",2&o),QV("id_dialogclose",2&o||8&o),QV("idx_dlgButtonBar",7&o),t&&QH("id_dialogtitle",t);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){setSessionActivity();var t=xxdialogFunc,o=xxdialogButtons,n=xxdialogTag;setDialogMode(),(8&o||e)&&t&&t(e,n)}function putstore(e,t){try{if("undefined"==typeof localStorage||localStorage.getItem(e)==t)return;null==t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}if("_"!=e[0]){for(var o={},n=0,i=localStorage.length;n<i;++n){var a=localStorage.key(n);"_"!=a[0]&&(o[a]=localStorage.getItem(a))}meshserver.send({action:"userWebState",state:JSON.stringify(o)})}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}function center(){QS("dialog").left=(getDocWidth()-300)/2+"px",deskAdjust(),deskAdjust()}function messagebox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function reload(){window.location.href=window.location.href}function getNodeFromId(e){for(var t in nodes)if(nodes[t]._id==e)return nodes[t];return null}function addHtmlValue(e,t){return"<table><td style=width:120px>"+e+"<td><b>"+t+"</b></table>"}function addHtmlValue2(e,t){return"<div><div style=display:inline-block;float:right>"+t+"</div><div style=display:inline-block>"+e+"</div></div>"}function addLink(e,t){return"<a style=cursor:pointer;color:darkblue;text-decoration:none onclick='"+t+"'>&diams; "+e+"</a>"}function addLinkConditional(e,t,o){return o?addLink(e,t):e}function passwordcheck(e){return/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/.test(e)}function getFileSizeStr(e){return 1==e?"1 byte":format("{0} bytes",e)}function joinPaths(){var e=[];for(var t in arguments){var o=arguments[t];if(null!=o&&""!=o){for(;o.endsWith("/")||o.endsWith("\\");)o=o.substring(0,o.length-1);for(;o.startsWith("/")||o.startsWith("\\");)o=o.substring(1);e.push(o)}}return e.join("/")}function focusTextBox(e){setTimeout(function(){Q(e).selectionStart=Q(e).selectionEnd=65535,Q(e).focus()},0)}isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,o=/^\./,n=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!o.test(e)&&!n.test(e)&&"."!=e[0]}}();function parseUriArgs(){var e,t={},o=window.document.location.href.split(/[\?&|\=]/);for(n in o.splice(0,1),o)switch(n%2){case 0:e=decodeURIComponent(o[n]);break;case 1:t[e]=decodeURIComponent(o[n]);var n=parseInt(t[e]);n==t[e]&&(t[e]=n)}return t}function printDate(e){return e.toLocaleDateString(args.locale)}function printTime(e){return e.toLocaleTimeString(args.locale)}function printDateTime(e){return e.toLocaleString(args.locale)}function format(e){var o=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==o[t]?o[t]:e})}function nobreak(e){return e.split(" ").join("&nbsp;")}</script>
\ No newline at end of file
views/translations/default-mobile_fr.handlebars
+1 -1
@@ -696,7 +696,7 @@
696 else if ((passRequirements != null) && (typeof passRequirements.reset == 'number')) {
697 var seconds = (userinfo.passchange) + (passRequirements.reset * 86400) - Math.floor(Date.now() / 1000);
698 if (seconds < 0) { QH('p2nextPasswordUpdateTime', " - Réinitialiser à la prochaine connexion."); }
699 - else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format("- Réinitialisation en {0} minute {1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
699 + else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format(" - Réinitialisation en {0} minute {1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
700 else if (seconds < 86400) { QH('p2nextPasswordUpdateTime', format(" - Réinitialisation dans {0} heure {1}.", Math.floor(seconds / 3600), addLetterS(Math.floor(seconds / 3600)))); }
701 else { QH('p2nextPasswordUpdateTime', format(" - Réinitialiser dans le {0} jour {1}."), Math.floor(seconds / 86400), addLetterS(Math.floor(seconds / 86400))); }
702 }
views/translations/default-mobile_ja.handlebars
+1 -1
@@ -2601,7 +2601,7 @@
2601 function dmousemove(e) { setSessionActivity(); if ((!xxdialogMode && desktop != null)) desktop.m.mousemove(e) }
2602 function dmousewheel(e) { setSessionActivity(); if ((!xxdialogMode && desktop != null) && desktop.m.mousewheel) { desktop.m.mousewheel(e); haltEvent(e); return true; } return false; }
2603 function drotate(x) { if (!xxdialogMode && desktop != null) { desktop.m.setRotation(desktop.m.rotation + x); deskAdjust(); deskAdjust(); } }
2604 - function stopProcess(id, name) { setDialogMode(2, "プロセス制御", 3, stopProcessEx, format("プロセス#{0} \"{1} \"を停止しますか?", id, name), id); return false; }
2604 + function stopProcess(id, name) { setDialogMode(2, "プロセス制御", 3, stopProcessEx, format("プロセス#{0} \"{1}\"を停止しますか?", id, name), id); return false; }
2605 function stopProcessEx(buttons, tag) { meshserver.send({ action: 'msg', type: 'pskill', nodeid: currentNode._id, value: tag }); setTimeout(refreshDeskTools, 300); }
2606
2607 //
views/translations/default-mobile_nl.handlebars new
+3391
@@ -0,0 +1,3391 @@
1 +<!DOCTYPE html><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head>
2 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 + <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
4 + <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 + <meta name="apple-mobile-web-app-capable" content="yes">
6 + <meta name="format-detection" content="telephone=no">
7 + <link rel="shortcut icon" type="image/x-icon" href="{{{domainurl}}}favicon.ico">
8 + <script type="text/javascript" src="scripts/common-0.0.1.js"></script>
9 + <script type="text/javascript" src="scripts/meshcentral.js"></script>
10 + <script type="text/javascript" src="scripts/agent-redir-ws-0.1.1.js"></script>
11 + <script type="text/javascript" src="scripts/agent-desktop-0.0.2.js"></script>
12 + <script type="text/javascript" src="scripts/amt-0.2.0.js"></script>
13 + <script type="text/javascript" src="scripts/amt-redir-ws-0.1.0.js"></script>
14 + <script type="text/javascript" src="scripts/amt-desktop-0.0.2.js"></script>
15 + <script type="text/javascript" src="scripts/zlib.js"></script>
16 + <script type="text/javascript" src="scripts/zlib-inflate.js"></script>
17 + <script type="text/javascript" src="scripts/zlib-adler32.js"></script>
18 + <script type="text/javascript" src="scripts/zlib-crc32.js"></script>
19 + <script keeplink="1" type="text/javascript" src="scripts/filesaver.js"></script>
20 + <title>{{{title}}}</title>
21 + <style>
22 + a {
23 + color: #036;
24 + text-decoration: underline;
25 + }
26 +
27 + #footer a {
28 + color: #fff;
29 + text-decoration: underline;
30 + }
31 +
32 + #footer a:hover {
33 + color: #fff;
34 + text-decoration: none;
35 + }
36 +
37 + .i1 {
38 + background: url(../images/icons50.png) 0px 0px;
39 + height: 50px;
40 + width: 50px;
41 + border: none;
42 + }
43 +
44 + .i2 {
45 + background: url(../images/icons50.png) -50px 0px;
46 + height: 50px;
47 + width: 50px;
48 + border: none;
49 + }
50 +
51 + .i3 {
52 + background: url(../images/icons50.png) -100px 0px;
53 + height: 50px;
54 + width: 50px;
55 + border: none;
56 + }
57 +
58 + .i4 {
59 + background: url(../images/icons50.png) -150px 0px;
60 + height: 50px;
61 + width: 50px;
62 + border: none;
63 + }
64 +
65 + .i5 {
66 + background: url(../images/icons50.png) -200px 0px;
67 + height: 50px;
68 + width: 50px;
69 + border: none;
70 + }
71 +
72 + .i6 {
73 + background: url(../images/icons50.png) -250px 0px;
74 + height: 50px;
75 + width: 50px;
76 + border: none;
77 + }
78 +
79 + .m0 {
80 + background: url(../images/images16.png) -32px 0px;
81 + height: 16px;
82 + width: 16px;
83 + border: none;
84 + float: left;
85 + }
86 +
87 + .m1 {
88 + background: url(../images/images16.png) -16px 0px;
89 + height: 16px;
90 + width: 16px;
91 + border: none;
92 + float: left;
93 + }
94 +
95 + .m2 {
96 + background: url(../images/images16.png) -96px 0px;
97 + height: 16px;
98 + width: 16px;
99 + border: none;
100 + float: left;
101 + }
102 +
103 + .m3 {
104 + background: url(../images/images16.png) -112px 0px;
105 + height: 16px;
106 + width: 16px;
107 + border: none;
108 + float: left;
109 + }
110 +
111 + .gray {
112 + /*filter: url("data:image/svg+xml;utf8,&lt;svg xmlns=\'http://www.w3.org/2000/svg\'&gt;&lt;filter id=\'grayscale\'&gt;&lt;feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/&gt;&lt;/filter&gt;&lt;/svg&gt;#grayscale");*/ /* Firefox 10+, Firefox on Android */
113 + filter: gray; /* IE6-9 */
114 + -webkit-filter: grayscale(100%) opacity(60%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */
115 + }
116 +
117 + .DevSt {
118 + padding-left: 5px;
119 + border-bottom-style: solid;
120 + border-bottom-width: 1px;
121 + border-bottom-color: #DDDDDD;
122 + }
123 +
124 + .noselect {
125 + -webkit-touch-callout: none;
126 + -webkit-user-select: none;
127 + -khtml-user-select: none;
128 + -moz-user-select: none;
129 + -ms-user-select: none;
130 + user-select: none;
131 + }
132 +
133 + .fileIcon1 {
134 + background: url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);
135 + height: 16px;
136 + width: 16px;
137 + cursor: pointer;
138 + border: none;
139 + float: left;
140 + margin-top: 1px;
141 + }
142 +
143 + .fileIcon2 {
144 + background: url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);
145 + height: 16px;
146 + width: 16px;
147 + cursor: pointer;
148 + border: none;
149 + float: left;
150 + margin-top: 1px;
151 + }
152 +
153 + .fileIcon3 {
154 + background: url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);
155 + height: 16px;
156 + width: 16px;
157 + cursor: pointer;
158 + border: none;
159 + float: left;
160 + margin-top: 1px;
161 + }
162 +
163 + .fileIcon4 {
164 + background: url(../images/meshicon16.png);
165 + height: 16px;
166 + width: 16px;
167 + cursor: pointer;
168 + border: none;
169 + float: left;
170 + margin-top: 1px;
171 + }
172 +
173 + .filelist {
174 + -moz-user-select: none;
175 + -khtml-user-select: none;
176 + -webkit-user-select: none;
177 + -o-user-select: none;
178 + cursor: default;
179 + -khtml-user-drag: element;
180 + background-color: white;
181 + clear: both;
182 + }
183 + </style>
184 +</head>
185 +<body onload="if (typeof(startup) !== 'undefined') startup();" style="overflow-y:hidden;margin:0;padding:0;border:0;color:black;font-size:13px;font-family:\'Trebuchet MS\', Arial, Helvetica, sans-serif">
186 + <div id="container">
187 + <div id="mastheadx"></div>
188 + <div id="masthead" style="background:url(logo.png) 0px 0px;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden">
189 + <div style="width:calc(100% - 50px);overflow:hidden">
190 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px">
191 + <strong><font style="font-size:36px;font-family:Arial,Helvetica,sans-serif">{{{title}}}</font></strong>
192 + </div>
193 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px">
194 + <strong><font style="font-size:12px;font-family:Arial,Helvetica,sans-serif">{{{title2}}}</font></strong>
195 + </div>
196 + </div>
197 + <img id="topMenuIcon" class="noselect" style="position:absolute;right:0;top:10px;bottom:50px;color:#c8c8c8;font-size:44px;margin-right:8px;cursor:pointer;display:none" onclick="topMenu()" src="/images/3bars-30.png" width="30" height="30">
198 + </div>
199 + <div id="page_content" style="overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%">
200 + <div id="column_l" style="width:100%;padding:0;position:absolute;bottom:0px;top:0px">
201 + <div id="p0" style="display:none;width:100%;height:100%">
202 + <div style="display:flex;align-items:center;width:100%;height:100%">
203 + <div id="p0message" style="text-align:center;width:100%"><span id="p0span">Server verbroken</span>, <href onclick="reload()" style="cursor:pointer"><u>klik om opnieuw verbinding te maken</u></href>.</div>
204 + </div>
205 + </div>
206 + <div id="p1" style="display:none;width:100%;height:100%">
207 + <div style="display:flex;align-items:center;width:100%;height:100%">
208 + <div id="p1message" style="text-align:center;width:100%"></div>
209 + </div>
210 + </div>
211 + <div id="p2" style="display:none">
212 + <div id="xdevices"></div>
213 + </div>
214 + <div id="p3" style="display:none;position:absolute;bottom:0;top:0;width:100%">
215 + <table cellspacing="0" style="margin:0;padding:0;border-spacing:0;border:0;">
216 + <tbody><tr style="padding:0">
217 + <td style="padding:0;color:#c8c8c8;text-align:center;cursor:pointer" width="60px" valign="top" onclick="goBack()">
218 + <div style="padding:0;background-color:#036;width:10px;height:10px;float:right;border:0">
219 + <div style="background-color:white;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid white;border-bottom:1px solid white"></div>
220 + </div>
221 + <div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div>
222 + </td>
223 + <td>
224 + <img src="/images/user-50.png" width="50" height="50">
225 + </td>
226 + <td>
227 + <div style="margin-left:5px">
228 + <strong style="font-size:large"><span id="p3userName"></span></strong><br>
229 + </div>
230 + </td>
231 + </tr>
232 + </tbody></table>
233 + <div id="p3info" style="overflow-y:scroll;position:absolute;top:55px;bottom:0px;width:100%">
234 + <div style="margin-left:8px">
235 + <div id="p3AccountActions">
236 + <p><strong>Gebruikersaccount beveiliging</strong></p>
237 + <div style="margin-left:9px;margin-bottom:8px">
238 + <div id="manageAuthApp" style="margin-top:5px;display:none"><a onclick="account_manageAuthApp()" style="cursor:pointer">Beheer authenticator-app</a></div>
239 + <div id="manageOtp" style="margin-top:5px;display:none"><a onclick="account_manageOtp(0)" style="cursor:pointer">Beheer back-up codes</a></div>
240 + </div>
241 + <p><strong>gebruikersacties</strong></p>
242 + <div style="margin-left:9px;margin-bottom:8px">
243 + <div style="margin-top:5px"><span id="verifyEmailId" style="display:none"><a onclick="account_showVerifyEmail()" style="cursor:pointer">Verifieer Email</a></span></div>
244 + <div style="margin-top:5px"><span id="changeEmailId" style="display:none"><a onclick="account_showChangeEmail()" style="cursor:pointer">Verander e-mailadres</a></span></div>
245 + <div style="margin-top:5px"><a onclick="account_showChangePassword()" style="cursor:pointer">Verander wachtwoord</a><span id="p2nextPasswordUpdateTime"></span></div>
246 + <div style="margin-top:5px"><a onclick="account_showDeleteAccount()" style="cursor:pointer">Verwijder account</a></div>
247 + </div>
248 + <br style="clear:both">
249 + </div>
250 + <strong>Apparaatgroepen</strong>
251 + <span id="p3createMeshLink1">( <a onclick="account_createMesh()" style="cursor:pointer"><img src="images/icon-addnew.png" width="12" height="12" border="0"> Nieuw</a> )</span>
252 + <br><br>
253 + <div id="p3meshes"></div>
254 + <div id="p3noMeshFound" style="margin-left:9px;display:none">Geen apparaatgroepen.<span id="p3createMeshLink2"> <a onclick="account_createMesh()" style="cursor:pointer"><strong>Begin hier!</strong></a></span></div>
255 + <br style="clear:both">
256 + </div>
257 + </div>
258 + </div>
259 + <div id="p5" style="display:none">
260 + <table cellspacing="0" style="margin:0;padding:0;border-spacing:0;border:0;">
261 + <tbody><tr style="padding:0">
262 + <td style="padding:0;color:#c8c8c8;text-align:center;cursor:pointer" width="60px" valign="top" onclick="goBack()">
263 + <div style="padding:0;background-color:#036;width:10px;height:10px;float:right;border:0">
264 + <div style="background-color:white;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid white;border-bottom:1px solid white"></div>
265 + </div>
266 + <div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div>
267 + </td>
268 + <td>
269 + <img src="/images/user-50.png" width="50" height="50">
270 + </td>
271 + <td>
272 + <div style="margin-left:5px">
273 + <strong style="font-size:large">Mijn bestanden</strong><br>
274 + </div>
275 + </td>
276 + </tr>
277 + </tbody></table>
278 + <div id="p5myfiles" style="overflow-y:scroll;position:absolute;top:55px;bottom:0px;width:100%">
279 + <table id="p5toolbar" style="width:100%;height:78px" cellpadding="0" cellspacing="0">
280 + <tbody><tr>
281 + <td style="width:100%;background-color:#d3d9d6;text-align:left;padding:4px" valign="bottom">
282 + <div style="width:100%;text-align:center">
283 + <input type="button" style="width:calc(100%/5 - 5px)" id="p5FolderUp" disabled="disabled" onclick="p5folderup()" value="Omhoog">
284 + <input type="button" style="width:calc(100%/5 - 5px)" id="p5SelectAllButton" disabled="disabled" onclick="p5selectallfile()" value="Selecteer alles" onkeypress="return false" onkeydown="return false">
285 + <input type="button" style="width:calc(100%/5 - 5px)" id="p5RenameFileButton" disabled="disabled" value="Hernoemen" onclick="p5renamefile()" onkeypress="return false" onkeydown="return false">
286 + <input type="button" style="width:calc(100%/5 - 5px)" id="p5DeleteFileButton" disabled="disabled" value="Verwijderen" onclick="p5deletefile()" onkeypress="return false" onkeydown="return false">
287 + <input type="button" style="width:calc(100%/5 - 5px)" id="p5NewFolderButton" disabled="disabled" value="Map" onclick="p5createfolder()" onkeypress="return false" onkeydown="return false">
288 + </div>
289 + <div style="width:100%;text-align:center">
290 + <input type="button" style="width:calc(100%/5 - 5px)" id="p5UploadButton" disabled="disabled" value="Uploaden" onclick="p5uploadFile()" onkeypress="return false" onkeydown="return false">
291 + <input type="button" style="width:calc(100%/5 - 5px)" id="p5CutButton" disabled="disabled" value="Knippen" onclick="p5copyFile(1)" onkeypress="return false" onkeydown="return false">
292 + <input type="button" style="width:calc(100%/5 - 5px)" id="p5CopyButton" disabled="disabled" value="Kopie" onclick="p5copyFile(0)" onkeypress="return false" onkeydown="return false">
293 + <input type="button" style="width:calc(100%/5 - 5px)" id="p5PasteButton" disabled="disabled" value="Plakken" onclick="p5pasteFile()" onkeypress="return false" onkeydown="return false">
294 + <input type="button" style="width:calc(100%/5 - 5px)" id="p5RefreshButton" value="Ververs" onclick="p5refreshFiles()" onkeypress="return false" onkeydown="return false">
295 + </div>
296 + </td>
297 + </tr>
298 + <tr>
299 + <td style="background-color:#E4E9E7;height:28px">
300 + <table style="width:100%">
301 + <tbody><tr>
302 + <td id="p5currentpath" style="overflow:hidden;padding-left:4px;padding-top:2px"></td>
303 + <td style="text-align:right;padding-right:4px">
304 + <select id="p5sortdropdown" onchange="updateFiles()">
305 + <option value="1" selected="selected">Sorteren op naam</option>
306 + <option value="2">Sorteren op grootte</option>
307 + <option value="3">Sorteren op datum</option>
308 + <option value="4">Aflopend op naam</option>
309 + <option value="5">Aflopend op grootte</option>
310 + <option value="6">Aflopend op datum</option>
311 + </select>
312 + </td>
313 + </tr>
314 + </tbody></table>
315 + </td>
316 + </tr>
317 + </tbody></table>
318 + <div id="p5filetable" style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none">
319 + <!--
320 + <div id="p5bigok" style="width:256px;overflow:hidden;position:absolute;left:337px;top:200px;text-align:center;font-size:1600%;color:#AAAAAA;display:none"><b>&checkmark;</b></div>
321 + <div id="p5bigfail" style="width:256px;overflow:hidden;position:absolute;left:337px;top:200px;text-align:center;font-size:1600%;color:#AAAAAA;display:none"><b>&#10007;</b></div>
322 + -->
323 + <span id="p5files"></span>
324 + </div>
325 + <table id="p5toolbarBottom" style="width:100%;height:22px;position:absolute;bottom:0px;background-color:#D3D9D6" cellpadding="0" cellspacing="0">
326 + <tbody><tr>
327 + <td style="text-align:left;padding:3px">&nbsp;<span id="p5bottomstatus"></span></td>
328 + <td id="p5rightOfButtons" style="text-align:right;padding:3px"></td>
329 + </tr>
330 + </tbody></table>
331 + </div>
332 + </div>
333 + <div id="p10" style="display:none;position:absolute;bottom:0;top:0;width:100%;overflow:hidden">
334 + <table cellspacing="0" style="margin:0;padding:0;border-spacing:0;border:0;position:absolute;top:0">
335 + <tbody><tr style="padding:0">
336 + <td style="padding:0;color:#c8c8c8;text-align:center;cursor:pointer" width="60px" valign="top" onclick="goBack()">
337 + <div style="padding:0;background-color:#036;width:10px;height:10px;float:right;border:0">
338 + <div style="background-color:white;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid white;border-bottom:1px solid white"></div>
339 + </div>
340 + <div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div>
341 + </td>
342 + <td>
343 + <a id="MainComputerImage" style="cursor:pointer" onclick="p10showiconselector()"></a>
344 + </td>
345 + <td>
346 + <div style="margin-left:5px">
347 + <strong><span id="p10deviceName"></span></strong><br>
348 + <span id="MainComputerState"></span>
349 + </div>
350 + </td>
351 + </tr>
352 + </tbody></table>
353 + <div id="p10general" style="overflow-y:scroll;position:absolute;top:55px;bottom:0px;width:100%">
354 + <div id="p10html" style="margin-left:8px;margin-right:8px"></div>
355 + <div id="p10html2"></div>
356 + <div id="p10html3"></div>
357 + </div>
358 + <div id="p10desktop" style="overflow:hidden;position:absolute;top:55px;bottom:0px;width:100%;display:none">
359 + <div id="deskarea1" style="position:absolute;top:0px;width:100%;height:25px">
360 + <div style="padding-top:2px;padding-bottom:2px;background:#C0C0C0">
361 + <div style="float:right;text-align:right">
362 + <span id="p14power"></span>&nbsp;
363 + <input id="DeskSoftInput" type="text" style="width:25px;display:none;opacity:.2" onblur="toggleSoftKeys(0)" onkeypress="return ondeskkeypress(event)" onkeydown="return ondeskkeydown(event)" onkeyup="return ondeskkeyup(event)">
364 + </div>
365 + <div style="margin-left:3px">
366 + <input type="button" id="connectbutton1" value="Verbinden" onclick="connectDesktop(event,1)" onkeypress="return false" onkeydown="return false" disabled="disabled">
367 + <input type="button" id="connectbutton1h" value="HW verbinden" onclick="connectDesktop(event,2)" onkeypress="return false" onkeydown="return false" disabled="disabled">
368 + <input type="button" id="disconnectbutton1" value="Verbreken" onclick="connectDesktop(event,0)" onkeypress="return false" onkeydown="return false">
369 + <span id="deskstatus">Verbroken</span>
370 + </div>
371 + </div>
372 + </div>
373 + <div id="deskarea3" style="position:absolute;top:25px;width:100%;height:calc(100% - 50px)">
374 + <div id="deskarea3x" style="background:black;text-align:center;height:100%;position:relative">
375 + <div id="DeskParent" style="height:100%">
376 + <canvas id="Desk" width="640" height="200" style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown="dmousedown(event)" onmouseup="dmouseup(event)" onmousemove="dmousemove(event)" onmousewheel="dmousewheel(event)"></canvas>
377 + </div>
378 + <div id="DeskTools" style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid lightgray;display:none">
379 + <a id="DeskToolsRefreshButton" style="float:right;padding:3px;cursor:pointer" onclick="refreshDeskTools()">Ververs</a>
380 + <div id="DeskToolsBar" style="position:absolute;padding:3px;border-radius: 3px 3px 0px 0px;top:5px;left:4px;bottom:26px;background-color:lightgray;cursor:pointer">Processen</div>
381 + <div style="position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:lightgray;text-align:left">
382 + <div style="border-bottom:1px solid darkgray;padding:3px"><a style="width:50px;padding-right:5px;float:left;cursor:pointer" onclick="sortProcess(0)">PID</a><a style="cursor:pointer" onclick="sortProcess(1)">Naam</a></div>
383 + <div id="DeskToolsProcesses" style="overflow-y:scroll;position:absolute;top:24px;bottom:0px;width:100%"></div>
384 + </div>
385 + </div>
386 + </div>
387 + </div>
388 + <div id="deskarea4" style="position:absolute;bottom:0px;width:100%;height:25px">
389 + <div style="padding-top:2px;padding-bottom:2px;background:#C0C0C0">
390 + <div style="float:right;text-align:right">
391 + <select id="termdisplays" style="display:none" onchange="deskSetDisplay(event)" onclick="deskGetDisplayNumbers(event)"></select>&nbsp;
392 + <span id="DeskToastButton"><img src="images/icon-notify.png" onclick="deviceToastFunction()" height="16" width="16" style="padding-top:2px"></span>&nbsp;
393 + <!--<input id=DeskToolsButton type=button value=Tools onkeypress="return false" onkeydown="return false" onclick="toggleDeskTools()">&nbsp;-->
394 + </div>
395 + <div>
396 + <input id="deskActionsBtn" type="button" style="margin-left:3px" onkeypress="return false" onkeydown="return false" value="Akties" onclick="deviceActionFunction()">
397 + <input type="button" value="Instellingen" onkeypress="return false" onkeydown="return false" onclick="showDesktopSettings()">
398 + <input type="button" onkeypress="return false" onkeydown="return false" value="Power Actie's..." onclick="showPowerActionDlg()" style="display:none">
399 + <input id="DeskSpecialKeys" type="button" value="Speciale toetsen" onkeypress="return false" onkeydown="return false" onclick="sendSpecialKeys()">
400 + <input id="DeskSoftKeys" type="button" value="Toetsenbord" onkeypress="return false" onkeydown="return false" onclick="toggleSoftKeys(1)">
401 + <label><span id="DeskControlSpan" style="display:none"><input id="DeskControl" type="checkbox" onkeypress="return false" onkeydown="return false">Invoer</span></label>
402 + </div>
403 + </div>
404 + </div>
405 + </div>
406 + <div id="p10files" style="overflow-y:scroll;position:absolute;top:55px;bottom:0px;width:100%;display:none">
407 + <table id="p13toolbar" style="width:100%;height:111px" cellpadding="0" cellspacing="0">
408 + <tbody><tr>
409 + <td style="background-color:#C0C0C0;border-bottom:2px solid black;padding:2px">
410 + <div style="float:right;text-align:right">
411 + <input id="filesActionsBtn" type="button" onkeypress="return false" onkeydown="return false" value="Akties" onclick="deviceActionFunction()" style="margin-right:2px">
412 + </div>
413 + <div style="margin-left:2px">
414 + <input id="p13AutoConnect" value="Automatisch verbinden" onclick="autoConnectFiles(event)" onkeypress="return false" onkeydown="return false" type="button" style="display:none">
415 + <input id="p13Connect" value="Verbinden" onclick="connectFiles(event)" onkeypress="return false" onkeydown="return false" type="button">
416 + <span id="p13Status">Verbroken</span>
417 + </div>
418 + </td>
419 + </tr>
420 + <tr>
421 + <td style="width:100%;background-color:#d3d9d6;text-align:left;padding:4px" valign="bottom">
422 + <div style="width:100%;text-align:center">
423 + <input type="button" style="width:calc(100%/5 - 5px)" id="p13FolderUp" disabled="disabled" onclick="p13folderup()" value="Omhoog">
424 + <input type="button" style="width:calc(100%/5 - 5px)" id="p13SelectAllButton" disabled="disabled" onclick="p13selectallfile()" value="Selecteer alles" onkeypress="return false" onkeydown="return false">
425 + <input type="button" style="width:calc(100%/5 - 5px)" id="p13RenameFileButton" disabled="disabled" value="Hernoemen" onclick="p13renamefile()" onkeypress="return false" onkeydown="return false">
426 + <input type="button" style="width:calc(100%/5 - 5px)" id="p13DeleteFileButton" disabled="disabled" value="Verwijderen" onclick="p13deletefile()" onkeypress="return false" onkeydown="return false">
427 + <input type="button" style="width:calc(100%/5 - 5px)" id="p13NewFolderButton" disabled="disabled" value="Map" onclick="p13createfolder()" onkeypress="return false" onkeydown="return false">
428 + </div>
429 + <div style="width:100%;text-align:center">
430 + <input type="button" style="width:calc(100%/5 - 5px)" id="p13UploadButton" disabled="disabled" value="Uploaden" onclick="p13uploadFile()" onkeypress="return false" onkeydown="return false">
431 + <input type="button" style="width:calc(100%/5 - 5px)" id="p13CutButton" disabled="disabled" value="Knippen" onclick="p13copyFile(1)" onkeypress="return false" onkeydown="return false">
432 + <input type="button" style="width:calc(100%/5 - 5px)" id="p13CopyButton" disabled="disabled" value="Kopie" onclick="p13copyFile(0)" onkeypress="return false" onkeydown="return false">
433 + <input type="button" style="width:calc(100%/5 - 5px)" id="p13PasteButton" disabled="disabled" value="Plakken" onclick="p13pasteFile()" onkeypress="return false" onkeydown="return false">
434 + <input type="button" style="width:calc(100%/5 - 5px)" id="p13RefreshButton" disabled="disabled" value="Ververs" onclick="p13folderup(9999)" onkeypress="return false" onkeydown="return false">
435 + </div>
436 + </td>
437 + </tr>
438 + <tr>
439 + <td style="background-color:#E4E9E7;height:28px">
440 + <table style="width:100%">
441 + <tbody><tr>
442 + <td id="p13currentpath" style="overflow:hidden;padding-left:4px;padding-top:2px"></td>
443 + <td style="text-align:right;padding-right:4px">
444 + <select id="p13sortdropdown" onchange="p13updateFiles()">
445 + <option value="1" selected="selected">Sorteren op naam</option>
446 + <option value="2">Sorteren op grootte</option>
447 + <option value="3">Sorteren op datum</option>
448 + <option value="4">Aflopend op naam</option>
449 + <option value="5">Aflopend op grootte</option>
450 + <option value="6">Aflopend op datum</option>
451 + </select>
452 + </td>
453 + </tr>
454 + </tbody></table>
455 + </td>
456 + </tr>
457 + </tbody></table>
458 + <div id="p13filetable" style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none">
459 + <!--
460 + <div id="p13bigok" style="width:256px;overflow:hidden;position:absolute;left:337px;top:200px;text-align:center;font-size:1600%;color:#AAAAAA;display:none"><b>&checkmark;</b></div>
461 + <div id="p13bigfail" style="width:256px;overflow:hidden;position:absolute;left:337px;top:200px;text-align:center;font-size:1600%;color:#AAAAAA;display:none"><b>&#10007;</b></div>
462 + -->
463 + <span id="p13files"></span>
464 + </div>
465 + <table id="p13toolbarBottom" style="width:100%;height:22px;position:absolute;bottom:0px" cellpadding="0" cellspacing="0">
466 + <tbody><tr><td style="text-align:left;padding:3px;text-align:center;background-color:#D3D9D6">&nbsp;<span id="p13bottomstatus"></span></td></tr>
467 + </tbody></table>
468 + </div>
469 + </div>
470 + <div id="p20" style="display:none;position:absolute;bottom:0;top:0;width:100%">
471 + <table cellspacing="0" style="margin:0;padding:0;border-spacing:0;border:0;">
472 + <tbody><tr style="padding:0">
473 + <td style="padding:0;color:#c8c8c8;text-align:center;cursor:pointer" width="60px" valign="top" onclick="goBack()">
474 + <div style="padding:0;background-color:#036;width:10px;height:10px;float:right;border:0">
475 + <div style="background-color:white;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid white;border-bottom:1px solid white"></div>
476 + </div>
477 + <div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div>
478 + </td>
479 + <td onclick="p20editmesh(1)">
480 + <img src="/images/meshicon50.png" width="50" height="50">
481 + </td>
482 + <td onclick="p20editmesh(1)">
483 + <div style="margin-left:5px">
484 + <strong style="font-size:large"><span id="p20meshName"></span></strong><br>
485 + </div>
486 + </td>
487 + </tr>
488 + </tbody></table>
489 + <div id="p20info" style="margin-left:8px;margin-right:8px"></div>
490 + </div>
491 + </div>
492 + </div>
493 + <div id="footer" style="height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0px">
494 + <table id="footerMenu" cellpadding="0" cellspacing="0" style="height:32px;width:100%;color:white;cursor:pointer;table-layout:fixed"></table>
495 + </div>
496 + </div>
497 + <div id="dialog" style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:90px;width:300px;display:none">
498 + <div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0">
499 + <div id="id_dialogclose" style="float:right;padding:5px;cursor:pointer" onclick="setDialogMode()"><b>X</b></div>
500 + <div id="id_dialogtitle" style="padding:5px"></div>
501 + <div style="width:100%;margin:6px"></div>
502 + </div>
503 + <div style="margin-right:16px;margin-left:8px">
504 + <div id="dialog1" style="margin:auto;text-align:center;margin:3px">
505 + <div id="id_dialogMessage" style="padding:10px"></div>
506 + </div>
507 + <div id="dialog2" style="margin:auto;margin:3px">
508 + <div id="id_dialogOptions"></div>
509 + </div>
510 + <div id="dialog3" style="margin:auto;margin:3px">
511 + <select id="deskkeys" style="width:100%">
512 + <option value="10">Ctrl+Alt+Del</option>
513 + <option value="11">Tab</option>
514 + <option value="5">Win</option>
515 + <option value="0">Win+pijl naar omlaag</option>
516 + <option value="1">Win+ pijl omhoog</option>
517 + <option value="2">Win+L</option>
518 + <option value="3">Win+M</option>
519 + <option value="4">Shift+Win+M</option>
520 + <option value="6">Win+R</option>
521 + <option value="7">Alt-F4</option>
522 + <option value="8">Ctrl-W</option>
523 + <option value="9">Alt-Tab</option>
524 + </select>
525 + </div>
526 + <div id="dialog7" style="margin:auto;margin:3px">
527 + <div id="d7meshkvm">
528 + <h4 style="width:100%;border-bottom:1px solid gray">Agent Extern bureaublad</h4>
529 + <div style="margin:3px 0 3px 0">
530 + <select id="d7bitmapquality" style="float:right;width:200px;height:20px" dir="rtl"></select>
531 + <div style="height:20px">Kwaliteit</div>
532 + </div>
533 + <div style="margin:3px 0 3px 0">
534 + <select id="d7bitmapscaling" style="float:right;width:200px;height:20px" dir="rtl">
535 + <option selected="selected" value="1024">100%</option>
536 + <option value="896">87.5%</option>
537 + <option value="768">75%</option>
538 + <option value="640">62.5%</option>
539 + <option value="512">50%</option>
540 + <option value="384">37.5%</option>
541 + <option value="256">25%</option>
542 + <option value="128">12.5%</option>
543 + </select>
544 + <div style="height:20px">Schalen</div>
545 + </div>
546 + <div style="margin:3px 0 3px 0">
547 + <select id="d7framelimiter" style="float:right;width:200px;height:20px" dir="rtl">
548 + <option selected="selected" value="50">Snel</option>
549 + <option value="100">Gemiddeld</option>
550 + <option value="400">Traag</option>
551 + <option value="1000">erg traag</option>
552 + </select>
553 + <div style="height:20px">Beoordeel</div>
554 + </div>
555 + </div>
556 + <div id="d7amtkvm">
557 + <h4 style="width:100%;border-bottom:1px solid gray">Intel® AMT Hardware KVM</h4>
558 + <div style="height:26px">
559 + <select id="d7desktopmode" style="float:right;width:200px">
560 + <option value="1">RLE8, snelste</option>
561 + <option value="2">RLE16, Aanbevolen</option>
562 + <option value="3">RAW8, langzaam</option>
563 + <option value="4">RAW16, Zeer langzaam</option>
564 + </select>
565 + <div>codering</div>
566 + </div>
567 + <div style="height:60px">
568 + <div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:white">
569 + <label><input type="checkbox" id="d7showfocus">Toon focus tool</label><br>
570 + <label><input type="checkbox" id="d7showcursor">Lokale muiscursor weergeven</label><br>
571 + </div>
572 + <div>anders</div>
573 + </div>
574 + </div>
575 + </div>
576 + </div>
577 + <div id="idx_dlgButtonBar" style="padding:10px;margin-bottom:20px">
578 + <input id="idx_dlgCancelButton" type="button" value="Afbreken" style="float:right;width:80px;margin-left:5px" onclick="dialogclose(0)">
579 + <input id="idx_dlgOkButton" type="button" value="Oke" style="float:right;width:80px" onclick="dialogclose(1)">
580 + </div>
581 + </div>
582 + <div id="topMenu" style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:0px 0px 5px 5px;position:fixed;top:50px;right:5px;width:170px;display:none">
583 + <div style="padding:12px;border-top:1px solid gray;color:black;cursor:pointer" onclick="topMenu(2)">Mijn bestanden</div>
584 + <div style="padding:12px;border-top:1px solid gray;color:black;cursor:pointer" onclick="topMenu(1)">Mijn Account</div>
585 + <div id="logoutMenuOption"><a href="/logout"><div style="padding:12px;border-top:1px solid gray;color:black;cursor:pointer">Uitloggen</div></a></div>
586 + </div>
587 + <iframe name="fileUploadFrame" style="display:none"></iframe>
588 + <script>
589 + 'use strict';
590 +
591 + // Process server-side web state
592 + var webState = '{{{webstate}}}';
593 + if (webState != '') { webState = JSON.parse(decodeURIComponent(webState)); }
594 + for (var i in webState) { localStorage.setItem(i, webState[i]); }
595 + if (!webState.loctag) { delete localStorage.removeItem('loctag'); }
596 +
597 + var args = parseUriArgs();
598 + var debugLevel = parseInt('{{{debuglevel}}}');
599 + var features = parseInt('{{{features}}}');
600 + var sessionTime = parseInt('{{{sessiontime}}}');
601 + var domain = '{{{domain}}}';
602 + var domainUrl = '{{{domainurl}}}';
603 + var authCookie = '{{{authCookie}}}';
604 + var authRelayCookie = '{{{authRelayCookie}}}';
605 + var authCookieRenewTimer = null;
606 + var meshserver = null;
607 + var xdr = null;
608 + var serverinfo = null;
609 + var nodes = [];
610 + var meshes = {};
611 + var filetree = {};
612 + var userinfo = null;
613 + var serverinfo = null;
614 + var users = null;
615 + var nodeShortIdent = 0;
616 + var serverPublicNamePort = '{{{serverDnsName}}}:{{{serverPublicPort}}}';
617 + var debugmode = false;
618 + var attemptWebRTC = ((features & 128) != 0);
619 + var StatusStrs = ["Verbroken", "Verbinden...", "Setup...", "Verbonden", "Intel® AMT verbonden"];
620 + var files;
621 + var passRequirements = '{{{passRequirements}}}';
622 + if (passRequirements != '') { passRequirements = JSON.parse(decodeURIComponent(passRequirements)); }
623 + var sessionActivity = Date.now();
624 +
625 + function startup() {
626 + if ((features & 32) == 0) {
627 + // Guard against other site's top frames (web bugs).
628 + var loc = null;
629 + try { loc = top.location.toString().toLowerCase(); } catch (e) { }
630 + if (top != self && (loc == null || top.active == false)) { top.location = self.location; return; }
631 + }
632 +
633 + if (!args.locale) { var x = getstore('loctag', 0); if ((x != null) && (x != '*')) { args.locale = x; } }
634 +
635 + window.onresize = center;
636 + center();
637 + QV('changeEmailId', (features & 0x200000) == 0);
638 + QH('p1message', "Verbinden...");
639 + go(1);
640 +
641 + // Connect to the mesh server
642 + meshserver = MeshServerCreateControl(domainUrl, authCookie);
643 + meshserver.onStateChanged = onStateChanged;
644 + meshserver.onMessage = onMessage;
645 + meshserver.Start();
646 +
647 + // Load desktop settings
648 + var t = localStorage.getItem('desktopsettings');
649 + if (t != null) { desktopsettings = JSON.parse(t); }
650 + applyDesktopSettings();
651 + }
652 +
653 + function onStateChanged(server, state, prevState, errorCode) {
654 + if (state == 0) {
655 + // Control web socket disconnected
656 + setDialogMode(0); // Close any dialog boxes if present
657 + go(0); // Go to disconnection panel
658 + if (errorCode == 'noauth') { QH('p0span', "Kan authenticatie niet uitvoeren"); return; }
659 + if (prevState == 2) { setTimeout(serverPoll, 5000); } else { QH('p0span', "Kan geen websocket aansluiten"); }
660 + // Clean up here
661 + if (authCookieRenewTimer != null) { clearInterval(authCookieRenewTimer); authCookieRenewTimer = null; }
662 + } else if (state == 2) {
663 + // Fetch list of meshes, nodes, files
664 + meshserver.send({ action: 'meshes' });
665 + meshserver.send({ action: 'nodes' });
666 + meshserver.send({ action: 'files' });
667 + if (xxcurrentView < 2) { go(2); }
668 + authCookieRenewTimer = setInterval(function () { meshserver.send({ action: 'authcookie' }); }, 1800000); // Request a cookie refresh every 30 minutes.
669 + }
670 + QV('topMenuIcon', state == 2);
671 + }
672 +
673 + // Poll the server, if it responds, refresh the page.
674 + function serverPoll() {
675 + xdr = null;
676 + try { xdr = new XDomainRequest(); } catch (e) { }
677 + if (!xdr) xdr = new XMLHttpRequest();
678 + xdr.open('HEAD', window.location.href);
679 + xdr.timeout = 15000;
680 + xdr.onload = function () { reload(); };
681 + xdr.onerror = xdr.ontimeout = function () { setTimeout(serverPoll, 10000); };
682 + xdr.send();
683 + }
684 +
685 + function updateSelf() {
686 + QV('verifyEmailId', (userinfo.emailVerified !== true) && (userinfo.email != null) && (serverinfo.emailcheck == true));
687 + QV('manageAuthApp', features & 4096);
688 + QV('manageOtp', ((features & 4096) != 0) && ((userinfo.otpsecret == 1) || (userinfo.otphkeys > 0)));
689 +
690 + // On the mobile app, don't allow group creation (for now).
691 + QV('p3createMeshLink1', false);
692 + QV('p3createMeshLink2', false);
693 +
694 + if (typeof userinfo.passchange == 'number') {
695 + if (userinfo.passchange == -1) { QH('p2nextPasswordUpdateTime', " - Reset bij volgende inlog."); }
696 + else if ((passRequirements != null) && (typeof passRequirements.reset == 'number')) {
697 + var seconds = (userinfo.passchange) + (passRequirements.reset * 86400) - Math.floor(Date.now() / 1000);
698 + if (seconds < 0) { QH('p2nextPasswordUpdateTime', " - Reset bij volgende inlog."); }
699 + else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format(" - Reset in {0} minuten{1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
700 + else if (seconds < 86400) { QH('p2nextPasswordUpdateTime', format(" - Reset in {0} uur{1}.", Math.floor(seconds / 3600), addLetterS(Math.floor(seconds / 3600)))); }
701 + else { QH('p2nextPasswordUpdateTime', format(" - Reset in {0} dag(en){1}."), Math.floor(seconds / 86400), addLetterS(Math.floor(seconds / 86400))); }
702 + }
703 + }
704 + }
705 +
706 + function addLetterS(x) { return (x > 1) ? 's' : ''; }
707 + function setSessionActivity() { sessionActivity = Date.now(); }
708 + function checkIdleSessionTimeout() { var delta = (Date.now() - sessionActivity); if (delta > serverinfo.timeout) { window.location.href = 'logout'; } }
709 +
710 + function onMessage(server, message) {
711 + switch (message.action) {
712 + case 'serverinfo': {
713 + serverinfo = message.serverinfo;
714 + if (serverinfo.timeout) { setInterval(checkIdleSessionTimeout, 10000); checkIdleSessionTimeout(); }
715 + QV('p3AccountActions', ((features & 4) == 0) && (serverinfo.domainauth == false)); // Hide Account Actions if in single user mode or domain authentication
716 + QV('logoutMenuOption', ((features & 4) == 0) && (serverinfo.domainauth == false)); // Hide logout if in single user mode or domain authentication
717 + break;
718 + }
719 + case 'authcookie': {
720 + // Got an authentication cookie refresh
721 + authCookie = message.cookie;
722 + authRelayCookie = message.rcookie;
723 + break;
724 + }
725 + case 'userinfo': {
726 + userinfo = message.userinfo;
727 + QH('p3userName', userinfo.name);
728 + //updateSiteAdmin();
729 + updateSelf();
730 + break;
731 + }
732 + case 'users': {
733 + users = {};
734 + for (var m in message.users) { users[message.users[m]._id] = message.users[m]; }
735 + updateUsers();
736 + break;
737 + }
738 + case 'wssessioncount': {
739 + wssessions = message.wssessions;
740 + updateUsers();
741 + break;
742 + }
743 + case 'meshes': {
744 + meshes = {};
745 + for (var m in message.meshes) { meshes[message.meshes[m]._id] = message.meshes[m]; }
746 + updateMeshes();
747 + updateDevices();
748 + break;
749 + }
750 + case 'files': {
751 + filetree = setupBackPointers(message.filetree);
752 + updateFiles();
753 + //d3updatefiles();
754 + break;
755 + }
756 + case 'nodes': {
757 + nodes = [];
758 + for (var m in message.nodes) {
759 + for (var n in message.nodes[m]) {
760 + if (!meshes[m]) { console.log('Invalid mesh (1): ' + m); continue; }
761 + message.nodes[m][n].namel = message.nodes[m][n].name.toLowerCase();
762 + if (message.nodes[m][n].rname) { message.nodes[m][n].rnamel = message.nodes[m][n].rname.toLowerCase(); } else { message.nodes[m][n].rnamel = message.nodes[m][n].namel; }
763 + message.nodes[m][n].meshnamel = meshes[m].name.toLowerCase();
764 + message.nodes[m][n].meshid = m;
765 + message.nodes[m][n].state = (message.nodes[m][n].state) ? (message.nodes[m][n].state) : 0;
766 + message.nodes[m][n].desc = message.nodes[m][n].desc;
767 + if (!message.nodes[m][n].icon) message.nodes[m][n].icon = 1;
768 + message.nodes[m][n].ident = ++nodeShortIdent;
769 + nodes.push(message.nodes[m][n]);
770 + }
771 + }
772 + //onSortSelectChange();
773 + //onSearchInputChanged();
774 + updateDevices();
775 + //refreshMap(false, true);
776 + if (xxcurrentView == 0) { if ('{{viewmode}}' != '') { go(parseInt('{{viewmode}}')); } else { setDialogMode(0); go(2); } }
777 + if ('{{currentNode}}' != '') { gotoDevice('{{currentNode}}', parseInt('{{viewmode}}')); }
778 + break;
779 + }
780 + case 'powertimeline': {
781 + if (message.nodeid != powerTimelineReq) break;
782 + powerTimelineNode = message.nodeid;
783 + powerTimeline = message.timeline;
784 + powerTimelineUpdate = Date.now() + 300000; // Update every 5 minutes
785 + if (currentNode._id == message.nodeid) { drawDeviceTimeline(); }
786 + break;
787 + }
788 + case 'otpauth-request': {
789 + if ((xxdialogMode == 2) && (xxdialogTag == 'otpauth-request')) {
790 + var secret = message.secret;
791 + if (secret.length == 52) { secret = secret.split(/(.............)/).filter(Boolean).join(' '); }
792 + else if (secret.length == 32) { secret = secret.split(/(....)/).filter(Boolean).join(' '); secret = secret.substring(0, 20) + '<br/>' + secret.substring(20) }
793 + QH('d2optinfo', "Installeer <a href=\"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2\" rel=\"noreferrer noopener\" target=_blank> Google Authenticator </a> of een compatibele toepassing, gebruik <a href=\"' + message.url +'\" rel=\"noreferrer noopener\" target=_blank> deze link </a> of voer hieronder het geheim in. Voer vervolgens het huidige 6-cijferige token in om 2-staps aanmelding te activeren." + '<br /><br /><div style=width:100%;text-align:center><tt id=d2optsecret secret=\"' + message.secret + '\" style=font-size:15px>' + secret + '</tt><br /><br />Token: <input type=text onkeypress=\"return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)\" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></div>');
794 + QV('idx_dlgOkButton', true);
795 + QE('idx_dlgOkButton', false);
796 + Q('d2otpauthinput').focus();
797 + }
798 + break;
799 + }
800 + case 'otpauth-setup': {
801 + if (xxdialogMode) return;
802 + setDialogMode(2, "Verificatie-app", 1, null, message.success ? "<b style=color:green>Tweestapsverificatie successvol</b>. U hebt nu een geldig token nodig om opnieuw in te loggen." : "<b style=color:red>Tweestapsverificatie mislukt</b>. Wis het geheim van de applicatie en probeer het opnieuw. Je hebt maar een paar minuten om de juiste code in te voeren.");
803 + break;
804 + }
805 + case 'otpauth-clear': {
806 + if (xxdialogMode) return;
807 + setDialogMode(2, "Verificatie-app", 1, null, message.success ? "<b style=color:green> Tweestapsverificatie verwijderd</b>. Je kan deze functie ten allen tijde weer inschakelen." : "<b style=color:red>Tweestapsverificatie verwijdering mislukt</b>. Probeer het opnieuw.");
808 + break;
809 + }
810 + case 'otpauth-getpasswords': {
811 + if (xxdialogMode) return;
812 + var x = "Eenmalige tokens kunnen worden gebruikt als secundaire authenticatie. Genereer een set, druk ze af en bewaar ze op een veilige plaats.";
813 + x += '<div style=\'border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px\'><div style=\'padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold\'><table style=width:100%;text-align:center>';
814 + if (message.passwords) {
815 + var j = 0;
816 + for (var i in message.passwords) {
817 + if (++j % 2) { x += '<tr>'; }
818 + var p = '' + message.passwords[i].p;
819 + while (p.length < 8) { p = '0' + p; }
820 + if (message.passwords[i].u === true) { x += '<td>' + p.substring(0, 4) + '&nbsp;' + p.substring(4); } else { x += '<td><strike style=color:#BBB>' + p.substring(0, 4) + '&nbsp;' + p.substring(4); + '</strike>'; }
821 + }
822 + } else {
823 + x += '<tr><td>' + "geen actieve tokens";
824 + }
825 + x += '</table></div></div><br />';
826 + x += '<div><input type=button value=\'' + "Sluiten" + '\' onclick=setDialogMode(0) style=float:right></input>';
827 + x += '<input type=button value=\'' + "Nieuw token" + '\' onclick=\'account_manageOtp(1);\'></input>';
828 + if (message.passwords != null) { x += '<input type=button value=\'' + "Wissen" + '\' onclick=\'account_manageOtp(2);\'></input>'; }
829 + x += '</div><br />';
830 + setDialogMode(2, "Beheer back-up codes", 8, null, x, 'otpauth-manage');
831 + break;
832 + }
833 + case 'event': {
834 + /*
835 + if (!message.event.nolog) {
836 + events.unshift(message.event);
837 + var eventLimit = parseInt(p3limitdropdown.value);
838 + while (events.length > eventLimit) { events.pop(); } // Remove element(s) at the end
839 + events_update();
840 + }
841 + */
842 + if (message.event.noact) break; // Take no action on this event
843 + switch (message.event.action) {
844 + case 'userWebState': {
845 + // New user web state, update the web page as needed
846 + if (localStorage != null) {
847 + var webstate = JSON.parse(message.event.state);
848 + for (var i in webstate) { localStorage.setItem(i, webstate[i]); }
849 +
850 + // Update the web page
851 + if ((webstate.loctag != null) && (webstate.loctag != oldLoctag)) {
852 + if (webstate.loctag != null) { args.locale = webstate.loctag; } else { delete args.locale; }
853 + updateDevices();
854 + updateMeshes();
855 + }
856 + }
857 + break;
858 + }
859 + case 'accountchange': {
860 + // An account was created or changed
861 + if (userinfo.name == message.event.account.name) {
862 + var newsiteadmin = message.event.account.siteadmin ? message.event.account.siteadmin : 0;
863 + var oldsiteadmin = userinfo.siteadmin ? userinfo.siteadmin : 0;
864 + if ((message.event.account.quota != userinfo.quota) || (((userinfo.siteadmin & 8) == 0) && ((message.event.account.siteadmin & 8) != 0))) { meshserver.send({ action: 'files' }); }
865 + userinfo = message.event.account;
866 + if (oldsiteadmin != newsiteadmin) updateSiteAdmin();
867 + updateSelf();
868 + }
869 + break;
870 + }
871 + case 'createmesh': {
872 + // A new mesh was created
873 + if (message.event.links[userinfo._id] != null) { // Check if this is a mesh create for a mesh we own. If site administrator, we get all messages so need to ignore some.
874 + meshes[message.event.meshid] = { _id: message.event.meshid, name: message.event.name, mtype: message.event.mtype, desc: message.event.desc, links: message.event.links };
875 + updateMeshes();
876 + updateDevices();
877 + meshserver.send({ action: 'files' });
878 + }
879 + break;
880 + }
881 + case 'meshchange': {
882 + // Update mesh information
883 + if (meshes[message.event.meshid] == null) {
884 + // This is a new mesh for us
885 + meshes[message.event.meshid] = { _id: message.event.meshid, name: message.event.name, mtype: message.event.mtype, desc: message.event.desc, links: message.event.links };
886 + meshserver.send({ action: 'nodes' }); // Request a refresh of all nodes (TODO: We could optimize this to only request nodes for the new mesh).
887 + } else {
888 + // This is an existing mesh
889 + if (meshes[message.event.meshid].name != message.event.name) {
890 + meshes[message.event.meshid].name = message.event.name;
891 + for (var i in nodes) { if (nodes[i].meshid == message.event.meshid) { nodes[i].meshnamel = message.event.name.toLowerCase(); } }
892 + }
893 + meshes[message.event.meshid].desc = message.event.desc;
894 + meshes[message.event.meshid].links = message.event.links;
895 +
896 + // Check if we lost rights to this mesh in this change.
897 + if (meshes[message.event.meshid].links[userinfo._id] == null) {
898 + if ((xxcurrentView == 20) && (currentMesh == meshes[message.event.meshid])) go(2);
899 + delete meshes[message.event.meshid];
900 +
901 + // Delete all nodes in that mesh
902 + var newnodes = [];
903 + for (var i in nodes) { if (nodes[i].meshid != message.event.meshid) { newnodes.push(nodes[i]); } }
904 + nodes = newnodes;
905 +
906 + // If we are looking at a node in the deleted mesh, move back to "My Devices"
907 + if (xxcurrentView >= 10 && xxcurrentView < 20 && currentNode && currentNode.meshid == message.event.meshid) { setDialogMode(0); go(2); }
908 + }
909 + }
910 + updateMeshes();
911 + updateDevices();
912 + meshserver.send({ action: 'files' });
913 +
914 + // If we are looking at a mesh that is now deleted, move back to "My Account"
915 + if (xxcurrentView == 20 && currentMesh._id == message.event.meshid) { p20updateMesh(); }
916 + break;
917 + }
918 + case 'deletemesh': {
919 + // Delete the mesh
920 + if (meshes[message.event.meshid]) {
921 + delete meshes[message.event.meshid];
922 + updateMeshes();
923 + meshserver.send({ action: 'files' });
924 + }
925 +
926 + // Delete all nodes in that mesh
927 + var newnodes = [];
928 + for (var i in nodes) { if (nodes[i].meshid != message.event.meshid) { newnodes.push(nodes[i]); } }
929 + nodes = newnodes;
930 + updateDevices();
931 +
932 + // If we are looking at a mesh that is now deleted, move back to "My Account"
933 + if (xxcurrentView >= 20 && xxcurrentView < 30 && currentMesh._id == message.event.meshid) { setDialogMode(0); go(2); }
934 + // If we are looking at a node in the deleted mesh, move back to "My Devices"
935 + if (xxcurrentView >= 10 && xxcurrentView < 20 && currentNode && currentNode.meshid == message.event.meshid) { setDialogMode(0); go(2); }
936 +
937 + break;
938 + }
939 + case 'addnode': {
940 + var node = message.event.node;
941 + if (!meshes[node.meshid]) break; // This is a node for a mesh we don't know. Happens when we are site administrator, we get all messages.
942 + if (getNodeFromId(node._id) != null) break; // This node is already known.
943 + node.namel = node.name.toLowerCase();
944 + if (node.rname) { node.rnamel = node.rname.toLowerCase(); } else { node.rnamel = node.namel; }
945 + node.meshnamel = meshes[node.meshid].name.toLowerCase();
946 + node.state = 0;
947 + if (!node.icon) node.icon = 1;
948 + node.ident = ++nodeShortIdent;
949 + nodes.push(node);
950 + //onSortSelectChange();
951 + //onSearchInputChanged();
952 + updateDevices();
953 + //updateMapMarkers();
954 + break;
955 + }
956 + case 'removenode': {
957 + var index = -1;
958 + for (var i in nodes) { if (nodes[i]._id == message.event.nodeid) { index = i; break; } }
959 + if (index != -1) {
960 + var node = nodes[index];
961 + if (currentNode == node) {
962 + if (xxcurrentView >= 10 && xxcurrentView < 20) { setDialogMode(0); go(2); }
963 + currentNode = null;
964 + // TODO: Correctly disconnect from this node (Desktop/Terminal/Files...)
965 + }
966 + nodes.splice(index, 1);
967 + updateDevices();
968 + //updateMapMarkers();
969 + }
970 + break;
971 + }
972 + case 'changenode': {
973 + var index = -1;
974 + for (var i in nodes) { if (nodes[i]._id == message.event.nodeid) { index = i; break; } }
975 + if (index != -1) {
976 + var node = nodes[index];
977 +
978 + // Change the node
979 + node.name = message.event.node.name;
980 + node.rname = message.event.node.rname;
981 + node.host = message.event.node.host;
982 + node.desc = message.event.node.desc;
983 + node.publicip = message.event.node.publicip;
984 + node.iploc = message.event.node.iploc;
985 + node.wifiloc = message.event.node.wifiloc;
986 + node.gpsloc = message.event.node.gpsloc;
987 + node.tags = message.event.node.tags;
988 + node.userloc = message.event.node.userloc;
989 + if (message.event.node.agent != null) {
990 + if (node.agent == null) node.agent = {};
991 + if (message.event.node.agent.ver != null) { node.agent.ver = message.event.node.agent.ver; }
992 + if (message.event.node.agent.id != null) { node.agent.id = message.event.node.agent.id; }
993 + if (message.event.node.agent.caps != null) { node.agent.caps = message.event.node.agent.caps; }
994 + if (message.event.node.agent.core != null) { node.agent.core = message.event.node.agent.core; } else { if (node.agent.core) { delete node.agent.core; } }
995 + node.agent.tag = message.event.node.agent.tag;
996 + }
997 + if (message.event.node.intelamt != null) {
998 + if (node.intelamt == null) node.intelamt = {};
999 + if (message.event.node.intelamt.state != null) { node.intelamt.state = message.event.node.intelamt.state; }
1000 + if (message.event.node.intelamt.host != null) { node.intelamt.user = message.event.node.intelamt.host; }
1001 + if (message.event.node.intelamt.user != null) { node.intelamt.user = message.event.node.intelamt.user; }
1002 + if (message.event.node.intelamt.tls != null) { node.intelamt.tls = message.event.node.intelamt.tls; }
1003 + if (message.event.node.intelamt.ver != null) { node.intelamt.ver = message.event.node.intelamt.ver; }
1004 + if (message.event.node.intelamt.tag != null) { node.intelamt.tag = message.event.node.intelamt.tag; }
1005 + if (message.event.node.intelamt.uuid != null) { node.intelamt.uuid = message.event.node.intelamt.uuid; }
1006 + if (message.event.node.intelamt.realm != null) { node.intelamt.realm = message.event.node.intelamt.realm; }
1007 + }
1008 + node.namel = node.name.toLowerCase();
1009 + if (node.rname) { node.rnamel = node.rname.toLowerCase(); } else { node.rnamel = node.namel; }
1010 + if (message.event.node.icon) { node.icon = message.event.node.icon; }
1011 +
1012 + //onSortSelectChange(true);
1013 + //drawNotifications();
1014 + refreshDevice(node._id);
1015 + //updateMapMarkers();
1016 + updateDevices();
1017 +
1018 + //if ((currentNode == node) && (xxdialogMode != null) && (xxdialogTag == '@xxmap')) { p10showNodeLocationDialog(); }
1019 + }
1020 + break;
1021 + }
1022 + case 'nodemeshchange': {
1023 + var index = -1;
1024 + for (var i in nodes) { if (nodes[i]._id == message.event.nodeid) { index = i; break; } }
1025 + if (index != -1) {
1026 + var node = nodes[index];
1027 + if (meshes[message.event.newMeshId] == null) {
1028 + // We don't see the new mesh, remove this device
1029 +
1030 + // TODO: Correctly disconnect from this node (Desktop/Terminal/Files...)
1031 + if (currentNode == node) { if (xxcurrentView >= 10 && xxcurrentView < 20) { setDialogMode(0); go(2); } currentNode = null; }
1032 + nodes.splice(index, 1);
1033 + } else {
1034 + // We see the new mesh, move this device
1035 + node.meshid = message.event.newMeshId;
1036 + node.meshnamel = meshes[message.event.newMeshId].name.toLowerCase();
1037 + }
1038 + updateDevices();
1039 + refreshDevice(message.event.nodeid);
1040 + } else {
1041 + // This is a new device, add it.
1042 + var node = message.event.node;
1043 + if (!meshes[node.meshid]) break; // This is a node for a mesh we don't know. Happens when we are site administrator, we get all messages.
1044 + node.namel = node.name.toLowerCase();
1045 + if (node.rname) { node.rnamel = node.rname.toLowerCase(); } else { node.rnamel = node.namel; }
1046 + node.meshnamel = meshes[node.meshid].name.toLowerCase();
1047 + node.state = 0;
1048 + if (!node.icon) node.icon = 1;
1049 + node.ident = ++nodeShortIdent;
1050 + if (nodes == null) { }
1051 + nodes.push(node);
1052 +
1053 + // Web page update
1054 + //masterUpdate(1 | 2 | 4 | 16);
1055 + updateDevices();
1056 + }
1057 + break;
1058 + }
1059 + case 'nodeconnect': {
1060 + // Indicated a node has changed connectivity state
1061 + var index = -1;
1062 + for (var i in nodes) { if (nodes[i]._id == message.event.nodeid) { index = i; break; } }
1063 + if (index != -1) {
1064 + var node = nodes[index];
1065 +
1066 + // Change the node connection state
1067 + node.conn = message.event.conn;
1068 + node.pwr = message.event.pwr;
1069 + updateDevices();
1070 + //updateMapMarkers();
1071 + //refreshDevice(node._id);
1072 + }
1073 + break;
1074 + }
1075 + case 'login': {
1076 + // Update the last login time
1077 + if (users != null && users['user/' + domain + '/' + message.event.username.toLowerCase()]) { users['user/' + domain + '/' + message.event.username.toLowerCase()].login = message.event.time; }
1078 + break;
1079 + }
1080 + case 'notify': {
1081 + //var n = { text: message.event.value };
1082 + //if (message.event.tag != null) { n.tag = message.event.tag; }
1083 + //addNotification(n);
1084 + break;
1085 + }
1086 + case 'stopped': { // Server is stopping.
1087 + // TODO: Disconnect
1088 + break;
1089 + }
1090 + default:
1091 + //console.log('Unknown message.event.action', message.event.action);
1092 + break;
1093 + }
1094 + break;
1095 + }
1096 + default:
1097 + //console.log('Unknown message.action', message.action);
1098 + break;
1099 + }
1100 + }
1101 +
1102 + //
1103 + // Menu System
1104 + //
1105 +
1106 + function topMenu(select) {
1107 + if ((xxdialogMode != null) && (xxdialogMode != 0) && (xxdialogMode != 999)) return;
1108 + if (select === undefined) {
1109 + var x = (QS('topMenu').display == 'none');
1110 + if (x == true) { if ((xxdialogMode == 0) || (xxdialogMode == null)) { QV('topMenu', true); xxdialogMode = 999; } } else { QV('topMenu', false); xxdialogMode = 0; }
1111 + } else {
1112 + QV('topMenu', false);
1113 + xxdialogMode = 0;
1114 + if ((select == 1) && (xxcurrentView != 3)) { goForward('account'); } // My Account
1115 + if ((select == 2) && (xxcurrentView != 5)) { goForward('files'); } // My Files
1116 + }
1117 + }
1118 +
1119 + var backStack = [];
1120 + function goBack() { if (xxdialogMode) return; if (backStack.length > 0) { backStack.pop(); } goStack(); }
1121 + function goForward(id) { if (xxdialogMode) return; backStack.push(id); goStack(); }
1122 + function goStack() {
1123 + if (backStack.length == 0) { go(2); return; }
1124 + var id = backStack[backStack.length - 1], idtype = id.split('/')[0];
1125 + if (idtype == 'node') { setupDeviceMenu(0); gotoDevice(id); }
1126 + if (idtype == 'mesh') { gotoMesh(id); }
1127 + if (idtype == 'account') { go(3); }
1128 + if (idtype == 'devices') { go(2); }
1129 + if (idtype == 'files') { go(5); }
1130 + }
1131 +
1132 + function updateFooterMenu(options) {
1133 + while (options != null && options.length < 3) { options.push({ n: '' }); }
1134 + var x = '', prev = '';
1135 + if (options != null) { for (var i in options) { x += '<td style="cursor:pointer' + ((prev == '') ? '' : ';border-left:solid 1px white') + '" onclick="' + options[i].f + '">' + options[i].n; prev = options[i].n; } }
1136 + QH('footerMenu', '<tr>' + x);
1137 + }
1138 +
1139 + //
1140 + // MY ACCOUNT
1141 + //
1142 +
1143 + function account_manageAuthApp() {
1144 + if (xxdialogMode || ((features & 4096) == 0)) return;
1145 + if (userinfo.otpsecret == 1) { account_removeOtp(); } else { account_addOtp(); }
1146 + }
1147 +
1148 + function account_addOtp() {
1149 + if (xxdialogMode || (userinfo.otpsecret == 1) || ((features & 4096) == 0)) return;
1150 + setDialogMode(2, "Verificatie-app", 2, function () { meshserver.send({ action: 'otpauth-setup', secret: Q('d2optsecret').attributes.secret.value, token: Q('d2otpauthinput').value }); }, '<div id=d2optinfo>' + "Laden..." + '</div>', 'otpauth-request');
1151 + meshserver.send({ action: 'otpauth-request' });
1152 + }
1153 +
1154 + function account_addOtpCheck(e) {
1155 + var tokenIsValid = (Q('d2otpauthinput').value.length == 6);
1156 + QE('idx_dlgOkButton', tokenIsValid);
1157 + if (e && (e.keyCode == 13) && tokenIsValid) { dialogclose(1); }
1158 + }
1159 +
1160 + function account_removeOtp() {
1161 + if (xxdialogMode || (userinfo.otpsecret != 1) || ((features & 4096) == 0)) return;
1162 + setDialogMode(2, "Verificatie-app", 3, function () { meshserver.send({ action: 'otpauth-clear' }); }, "Bevestig de verwijdering van de Tweestapsverificatie applicatie?");
1163 + }
1164 +
1165 + function account_manageOtp(action) {
1166 + if ((xxdialogMode == 2) && (xxdialogTag == 'otpauth-manage')) { dialogclose(0); }
1167 + if (xxdialogMode || (userinfo.otpsecret != 1) || ((features & 4096) == 0)) return;
1168 + meshserver.send({ action: 'otpauth-getpasswords', subaction: action });
1169 + }
1170 +
1171 + function account_showVerifyEmail() {
1172 + if (xxdialogMode || (userinfo.emailVerified == true) || (serverinfo.emailcheck != true)) return;
1173 + var x = "Klik op OK om een verificatiebericht te sturen naar:" + '<br /><div style=padding:8px><b>' + EscapeHtml(userinfo.email) + '</b></div>' + "Wacht enkele minuten om de verificatie te ontvangen.";
1174 + setDialogMode(2, "email verificatie", 3, account_showVerifyEmailEx, x);
1175 + }
1176 +
1177 + function account_showVerifyEmailEx() {
1178 + meshserver.send({ action: 'verifyemail', email: userinfo.email });
1179 + }
1180 +
1181 + function account_showChangeEmail() {
1182 + if (xxdialogMode) return;
1183 + var x = addHtmlValue("Email", '<input id=dp3email style=width:170px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />');
1184 + setDialogMode(2, "Email Adres wijzigen", 3, account_changeEmail, x);
1185 + if (userinfo.email != null) { Q('dp3email').value = userinfo.email; }
1186 + account_validateEmail();
1187 + Q('dp3email').focus();
1188 + }
1189 +
1190 + function account_validateEmail(e, email) {
1191 + QE('idx_dlgOkButton', validateEmail(Q('dp3email').value) && (Q('dp3email').value != userinfo.email));
1192 + if ((e != null) && (e.keyCode == 13)) { dialogclose(1); }
1193 + }
1194 +
1195 + function account_changeEmail() {
1196 + meshserver.send({ action: 'changeemail', email: Q('dp3email').value });
1197 + }
1198 +
1199 + function account_showDeleteAccount() {
1200 + if (xxdialogMode) return;
1201 + var x = '<form method=post><table style=margin-left:10px><input type=hidden name=action value=deleteaccount /><input type=hidden name=authcookie value=' + authCookie + ' /><tr>';
1202 + x += '<td align=right>' + "Wachtwoord:" + '</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>';
1203 + x += '</tr><tr><td align=right>' + "Wachtwoord:" + '</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>';
1204 + x += '</tr></table><div style=padding:10px;margin-bottom:4px>';
1205 + x += '<input id=account_dlgCancelButton type=button value=\"' + "Afbreken" + '\" style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>';
1206 + x += '<input id=account_dlgOkButton type=submit value=\"' + "Oke" + '\" style="float:right;width:80px" onclick=dialogclose(1)>';
1207 + x += '</div><br /></form>';
1208 + setDialogMode(2, "Verwijder account", 0, null, x);
1209 + account_validateDeleteAccount();
1210 + Q('apassword1').focus();
1211 + }
1212 +
1213 +
1214 + function account_showChangePassword() {
1215 + if (xxdialogMode) return false;
1216 + var x = '<table style=margin-left:10px>';
1217 + x += '<tr><td align=right>' + nobreak("Oud wachtwoord:") + '</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>';
1218 + x += '<tr><td align=right>' + nobreak("Nieuw wachtwoord:") + '</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>';
1219 + x += '<tr><td align=right>' + nobreak("Nieuw wachtwoord:") + '</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>';
1220 + if (features & 0x00010000) { x += '<tr><td align=right>' + "wachtwoord hint:" + '</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>'; }
1221 + x += '</table>'
1222 + if (passRequirements) {
1223 + var r = [], rc = 0;
1224 + for (var i in passRequirements) { if ((i != 'reset') && (i != 'hint')) { r.push(i + ':' + passRequirements[i]); rc++; } }
1225 + if (rc > 0) { x += '<br /><span style=font-size:x-small>' + format("Vereisten: {0}.", r.join(', ')) + '</span>'; }
1226 + }
1227 + x += '<br />';
1228 + setDialogMode(2, "Verander wachtwoord", 3, account_showChangePasswordEx, x);
1229 + Q('apassword0').focus();
1230 + account_validateNewPassword();
1231 + return false;
1232 + }
1233 +
1234 + function account_showChangePasswordEx() {
1235 + if (Q('apassword1').value == Q('apassword2').value) {
1236 + var r = { action: 'changepassword', oldpass: Q('apassword0').value, newpass: Q('apassword1').value };
1237 + if (features & 0x00010000) { r.hint = Q('apasswordhint').value; }
1238 + meshserver.send(r);
1239 + }
1240 + }
1241 +
1242 + function account_createMesh() {
1243 + if (xxdialogMode) return;
1244 +
1245 + // Check if we are disallowed from creating a device group
1246 + if ((userinfo.siteadmin != 0xFFFFFFFF) && ((userinfo.siteadmin & 64) != 0)) { setDialogMode(2, "Nieuwe apparaatgroep", 1, null, "Dit account heeft niet de rechten om een nieuwe apparaatgroep te maken."); return; }
1247 +
1248 + // Remind the user to verify the email address
1249 + if ((userinfo.emailVerified !== true) && (serverinfo.emailcheck == true) && (userinfo.siteadmin != 0xFFFFFFFF)) { setDialogMode(2, "Gebruikersaccount beveiliging", 1, null, "Geen toegang tot een apparaat totdat een e-mailadres is geverifieerd. Dit is vereist voor wachtwoordherstel. Ga naar de \"Mijn account\" om een e-mailadres te wijzigen en te verifiëren."); return; }
1250 +
1251 + // Remind the user to add two factor authentication
1252 + if ((features & 0x00040000) && !((userinfo.otpsecret == 1) || (userinfo.otphkeys > 0) || (userinfo.otpkeys > 0))) { setDialogMode(2, "Gebruikersaccount beveiliging", 1, null, "Geen toegang tot een apparaat totdat tweefactorauthenticatie is ingeschakeld. Dit is vereist voor extra beveiliging. Ga naar de \"Mijn account\" en bekijk het gedeelte \"Accountbeveiliging\"."); return; }
1253 +
1254 + // We are allowed, let's prompt to information
1255 + var x = addHtmlValue("Naam", '<input id=dp3meshname style=width:170px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />');
1256 + x += addHtmlValue("Typen", '<div style=width:170px;margin:0;padding:0><select id=dp3meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>' + "Software Agent Groep" + '</option><option value=1>' + "Intel&reg; AMT alleen" + '</option></select></div>');
1257 + x += addHtmlValue("Omschrijving", '<div style=width:170px;margin:0;padding:0><textarea id=dp3meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>');
1258 + setDialogMode(2, "Apparaatgroep aanmaken", 3, account_createMeshEx, x);
1259 + account_validateMeshCreate();
1260 + Q('dp3meshname').focus();
1261 + }
1262 +
1263 + function account_validateMeshCreate() {
1264 + QE('idx_dlgOkButton', Q('dp3meshname').value.length > 0);
1265 + }
1266 +
1267 + function account_createMeshEx(button, tag) {
1268 + meshserver.send({ action: 'createmesh', meshname: Q('dp3meshname').value, meshtype: Q('dp3meshtype').value, desc: Q('dp3meshdesc').value });
1269 + }
1270 +
1271 + function account_validateDeleteAccount() {
1272 + QE('account_dlgOkButton', (Q('apassword1').value.length > 0) && (Q('apassword1').value == Q('apassword2').value));
1273 + }
1274 +
1275 + function account_validateNewPassword() {
1276 + var r = '', ok = (Q('apassword0').value.length > 0) && (Q('apassword1').value.length > 0) && (Q('apassword1').value == Q('apassword2').value) && (Q('apassword0').value != Q('apassword1').value);
1277 + if ((features & 0x00010000) && (Q('apasswordhint').value == Q('apassword1').value)) { ok = false; }
1278 + if (Q('apassword1').value != '') {
1279 + if (passRequirements == null || passRequirements == '') {
1280 + // No password requirements, display password strength
1281 + var passStrength = checkPasswordStrength(Q('apassword1').value);
1282 + if (passStrength >= 80) { r = '<span style=color:green>Strong<span>'; } else if (passStrength >= 60) { r = '<span style=color:blue>&#9679;<span>'; } else { r = '<span style=color:red>&#9679;<span>'; }
1283 + } else {
1284 + // Password requirements provided, use that
1285 + var passReq = checkPasswordRequirements(Q('apassword1').value, passRequirements);
1286 + if (passReq == false) { ok = false; r = '<span style=color:red>' + "Beleid" + '<span>' }
1287 + }
1288 + }
1289 + QH('dxPassWarn', r);
1290 + //QE('account_dlgOkButton', ok);
1291 + QE('idx_dlgOkButton', ok);
1292 + }
1293 +
1294 + // Return a password strength score
1295 + function checkPasswordStrength(password) {
1296 + var r = 0, letters = {}, varCount = 0, variations = { digits: /\d/.test(password), lower: /[a-z]/.test(password), upper: /[A-Z]/.test(password), nonWords: /\W/.test(password) }
1297 + if (!password) return 0;
1298 + for (var i = 0; i < password.length; i++) { letters[password[i]] = (letters[password[i]] || 0) + 1; r += 5.0 / letters[password[i]]; }
1299 + for (var c in variations) { varCount += (variations[c] == true) ? 1 : 0; }
1300 + return parseInt(r + (varCount - 1) * 10);
1301 + }
1302 +
1303 + // Check password requirements
1304 + function checkPasswordRequirements(password, requirements) {
1305 + if ((requirements == null) || (requirements == '') || (typeof requirements != 'object')) return true;
1306 + if (requirements.min) { if (password.length < requirements.min) return false; }
1307 + if (requirements.max) { if (password.length > requirements.max) return false; }
1308 + var num = 0, lower = 0, upper = 0, nonalpha = 0;
1309 + for (var i = 0; i < password.length; i++) {
1310 + if (/\d/.test(password[i])) { num++; }
1311 + if (/[a-z]/.test(password[i])) { lower++; }
1312 + if (/[A-Z]/.test(password[i])) { upper++; }
1313 + if (/\W/.test(password[i])) { nonalpha++; }
1314 + }
1315 + if (requirements.num && (num < requirements.num)) return false;
1316 + if (requirements.lower && (lower < requirements.lower)) return false;
1317 + if (requirements.upper && (upper < requirements.upper)) return false;
1318 + if (requirements.nonalpha && (nonalpha < requirements.nonalpha)) return false;
1319 + return true;
1320 + }
1321 +
1322 + function updateMeshes() {
1323 + var r = '', count = 0;
1324 + for (i in meshes) {
1325 + count++;
1326 +
1327 + // Mesh rights
1328 + var meshrights = meshes[i].links[userinfo._id].rights;
1329 + var rights = "Gedeeltelijke rechten";
1330 + if (meshrights == 0xFFFFFFFF) rights = "Volledige beheerder"; else if (meshrights == 0) rights = "Geen rechten";
1331 +
1332 + // Print the mesh information
1333 + r += '<div style=cursor:pointer onclick=goForward(\'' + i + '\')>';
1334 + r += '<div style="float:left;margin-left:4px"><img src="/images/meshicon50.png" width=50 height=50 /></div>';
1335 + r += '<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">';
1336 + r += '<div><div style=padding-left:12px;padding-top:2px><b>' + EscapeHtml(meshes[i].name) + '</b></div><div style=padding-left:12px;padding-top:3px;color:gray>' + rights + '</div></div>';
1337 + r += '</div></div>';
1338 + }
1339 +
1340 + QH('p3meshes', r);
1341 + QV('p3noMeshFound', count == 0);
1342 + }
1343 +
1344 + function gotoMesh(meshid) {
1345 + currentMesh = meshes[meshid];
1346 + if (currentMesh == null) { goBack(); }
1347 + p20updateMesh();
1348 + go(20);
1349 + }
1350 +
1351 + //
1352 + // MY FILES
1353 + //
1354 +
1355 + var filetreelinkpath;
1356 + var filetreelocation = [];
1357 +
1358 + function p5refreshFiles() { meshserver.send({ action: 'files' }); }
1359 +
1360 + function updateFiles() {
1361 + QV('MainMenuMyFiles', ((features & 8) == 0));
1362 + if ((features & 8) != 0) return; // If running on a server without files, exit now.
1363 + var html1 = '', html2 = '', displayPath = '<a style=cursor:pointer onclick=p5folderup(0)>' + "Root" + '</a>', fullPath = 'Root', publicPath, filetreex = filetree, folderdepth = 1;
1364 +
1365 + // Navigate to path location, build the paths at the same time
1366 + var filetreelocation2 = [], oldlinkpath = filetreelinkpath, checkedBoxes = [], checkboxes = document.getElementsByName('fc');
1367 + for (var i = 0; i < checkboxes.length; i++) { if (checkboxes[i].checked) { checkedBoxes.push(checkboxes[i].value) }; } // Save all existing checked boxes
1368 +
1369 + filetreelinkpath = '';
1370 + for (var i in filetreelocation) {
1371 + if ((filetreex.f != null) && (filetreex.f[filetreelocation[i]] != null)) {
1372 + filetreelocation2.push(filetreelocation[i]);
1373 + fullPath += ' / ' + filetreelocation[i];
1374 + if ((folderdepth == 1)) {
1375 + var sp = filetreelocation[i].split('/');
1376 + publicPath = window.location + sp[0] + 'files/' + sp[2];
1377 + //if (filetreelocation[i] === userinfo._id) { filetreelinkpath += 'self'; } else { filetreelinkpath += (sp[0] + '/' + sp[2]); }
1378 + filetreelinkpath += filetreelocation[i];
1379 + } else {
1380 + if (filetreelinkpath != '') { filetreelinkpath += '/' + filetreelocation[i]; if (folderdepth > 2) { publicPath += '/' + filetreelocation[i]; } }
1381 + }
1382 + filetreex = filetreex.f[filetreelocation[i]];
1383 + displayPath += ' / <a style=cursor:pointer onclick=p5folderup(' + folderdepth + ')>' + (filetreex.n != null ? filetreex.n : filetreelocation[i]) + '</a>';
1384 + folderdepth++;
1385 + } else {
1386 + break;
1387 + }
1388 + }
1389 + filetreelocation = filetreelocation2; // In case we could not go down the full path, we set the new path location here.
1390 + var publicfolder = fullPath.toLowerCase().startsWith('root / ' + userinfo._id + ' / public');
1391 +
1392 + // Sort the files
1393 + var filetreexx = p5sort_files(filetreex.f);
1394 +
1395 + // Display all files and folders at this location
1396 + for (var i in filetreexx) {
1397 + // Figure out the name and shortname
1398 + var f = filetreexx[i], name = f.n, shortname;
1399 + shortname = name;
1400 + if (name.length > 40) { shortname = EscapeHtml(name.substring(0, 40)) + "..."; } else { shortname = EscapeHtml(name); }
1401 + name = EscapeHtml(name);
1402 +
1403 + // Figure out the date
1404 + //var fdatestr = '';
1405 + //if (f.d != null) { var fdate = new Date(f.d), fdatestr = (fdate.getMonth() + 1) + '/' + (fdate.getDate()) + '/' + fdate.getFullYear() + ' ' + printTime(fdate) + '&nbsp;'; }
1406 +
1407 + // Figure out the size
1408 + var fsize = '';
1409 + if (f.s != null) { fsize = getFileSizeStr(f.s); }
1410 +
1411 + var h = '';
1412 + if (f.t < 3 || f.t == 4) {
1413 + var right = (f.t == 1 || f.t == 4) ? p5getQuotabar(f) : '';
1414 + h = '<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value=\'' + name + '\'>&nbsp;<span style=float:right;padding-right:4px>' + right + '</span><span><div class=fileIcon' + f.t + '></div><a style=cursor:pointer onclick=p5folderset(\"' + encodeURIComponent(f.nx) + '\")>' + shortname + '</a></span></div>';
1415 + } else {
1416 + var link = shortname;
1417 + var publiclink = '';
1418 + if (publicfolder) { publiclink = ' (<a style=cursor:pointer onclick=\'p5showPublicLink(\"' + publicPath + '/' + f.nx + '\")\'>' + "Link" + '</a>)'; }
1419 + if (f.s > 0) { link = '<a rel=\"noreferrer noopener\" target=\"_blank\" href=\"downloadfile.ashx?link=' + encodeURIComponent(filetreelinkpath + '/' + f.nx) + '\">' + shortname + '</a>' + publiclink; }
1420 + h = '<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value=\'' + f.nx + '\'>&nbsp;<span style=float:right;padding-right:4px>' + fsize + '</span><span><div class=fileIcon' + f.t + '></div>' + link + '</span></div>';
1421 + }
1422 +
1423 + if (f.t < 3) { html1 += h; } else { html2 += h; }
1424 + }
1425 +
1426 + //if (f.parent == null) { }
1427 + QH('p5rightOfButtons', p5getQuotabar(filetreex));
1428 +
1429 + QH('p5files', html1 + html2);
1430 + QH('p5currentpath', displayPath);
1431 + QE('p5FolderUp', filetreelocation.length != 0);
1432 + QV('p5PublicShare', publicfolder);
1433 +
1434 + // Re-check all boxes if needed
1435 + if (oldlinkpath == filetreelinkpath) {
1436 + checkboxes = document.getElementsByName('fc');
1437 + for (var i = 0; i < checkboxes.length; i++) {
1438 + checkboxes[i].checked = (checkedBoxes.indexOf(checkboxes[i].value) >= 0);
1439 + }
1440 + }
1441 +
1442 + p5setActions();
1443 + }
1444 +
1445 + function getNiceSize(bytes) {
1446 + if (bytes <= 0) return "Opslag overschrijden";
1447 + if (bytes < 2048) return format("{0}b over", bytes);
1448 + if (bytes < 2097152) return format("{0}k over", Math.round(bytes / 1024));
1449 + if (bytes < 2147483648) return format("{0}m over", Math.round(bytes / 1024 / 1024));
1450 + return format("{0}g over", Math.round(bytes / 1024 / 1024 / 1024));
1451 + }
1452 +
1453 + function p5getQuotabar(f) {
1454 + while (f.t > 1 && f.t != 4) { f = f.parent; }
1455 + if ((f.t != 1 && f.t != 4) || (f.maxbytes == null)) return '';
1456 + return getNiceSize(f.maxbytes - f.s) + ' <progress style=height:10px;width:100px value=' + f.s + ' max=' + f.maxbytes + ' />';
1457 + }
1458 +
1459 + function p5showPublicLink(u) { setDialogMode(2, "Publieke link", 1, null, '<input type=text style=width:100% value="' + u + '" readonly />'); }
1460 +
1461 + var sortorder;
1462 + function p5sort_filename(a, b) { if (a.ln > b.ln) return (1 * sortorder); if (a.ln < b.ln) return (-1 * sortorder); return 0; }
1463 + function p5sort_timestamp(a, b) { if (a.d > b.d) return (1 * sortorder); if (a.d < b.d) return (-1 * sortorder); return 0; }
1464 + function p5sort_bysize(a, b) { if (a.s == b.s) return p5sort_filename(a, b); return (((a.s - b.s)) * sortorder); }
1465 +
1466 + function p5sort_files(files) {
1467 + var r = [], sortselection = Q('p5sortdropdown').value;
1468 + for (var i in files) { files[i].nx = i; if (files[i].n == null) { files[i].n = i; } files[i].ln = files[i].n.toLowerCase(); r.push(files[i]); }
1469 + sortorder = 1;
1470 + if (sortselection > 3) { sortorder = -1; sortselection -= 3; }
1471 + if (sortselection == 1) { r.sort(p5sort_filename); }
1472 + else if (sortselection == 2) { r.sort(p5sort_bysize); }
1473 + else if (sortselection == 3) { r.sort(p5sort_timestamp); }
1474 + return r;
1475 + }
1476 +
1477 + function p5setActions() {
1478 + var cc = getFileSelCount(), tc = getFileCount(), sfc = getFileSelCount(false); // In order: number of entires selected, number of total entries, number of selected entires that are files (not folders)
1479 + QE('p5DeleteFileButton', (cc > 0) && (filetreelocation.length > 0));
1480 + QE('p5NewFolderButton', filetreelocation.length > 0);
1481 + QE('p5UploadButton', filetreelocation.length > 0);
1482 + QE('p5RenameFileButton', (cc == 1) && (filetreelocation.length > 0));
1483 + QE('p5SelectAllButton', tc > 0);
1484 + Q('p5SelectAllButton').value = (cc > 0 ? "Geen" : "alles");
1485 + QE('p5CutButton', (sfc > 0) && (cc == sfc));
1486 + QE('p5CopyButton', (sfc > 0) && (cc == sfc));
1487 + QE('p5PasteButton', (p5clipboard != null) && (p5clipboard.length > 0) && (filetreelocation.length > 0));
1488 + }
1489 +
1490 + function getFileSelCount(includeDirs) { var cc = 0, checkboxes = document.getElementsByName('fc'); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && ((includeDirs != false) || (checkboxes[i].attributes.file.value == '3'))) cc++; } return cc; }
1491 + function getFileSelDirCount() { var cc = 0, checkboxes = document.getElementsByName('fc'); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == '999')) cc++; } return cc; }
1492 + function getFileCount() { var cc = 0; var checkboxes = document.getElementsByName('fc'); return checkboxes.length; }
1493 + function p5selectallfile() { var nv = (getFileSelCount() == 0), checkboxes = document.getElementsByName('fc'); for (var i = 0; i < checkboxes.length; i++) { checkboxes[i].checked = nv; } p5setActions(); }
1494 + function setupBackPointers(x) { if (x.f != null) { var fs = 0, fc = 0; for (var i in x.f) { setupBackPointers(x.f[i]); x.f[i].parent = x; if (x.f[i].s) { fs += x.f[i].s; } if (x.f[i].c) { fc += x.f[i].c; } if (x.f[i].t == 3) { fc++; } } x.s = fs; x.c = fc; } return x; }
1495 + function getFileSizeStr(size) { if (size == 1) return "1 byte"; return format("{0} bytes", size); }
1496 + function p5folderup(x) { if (x == null) { filetreelocation.pop(); } else { while (filetreelocation.length > x) { filetreelocation.pop(); } } updateFiles(); return false; }
1497 + function p5folderset(x) { filetreelocation.push(decodeURIComponent(x)); updateFiles(); return false; }
1498 + function p5createfolder() { setDialogMode(2, "Nieuwe map", 3, p5createfolderEx, '<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />'); focusTextBox('p5renameinput'); p5fileNameCheck(); }
1499 + function p5createfolderEx() { meshserver.send({ action: 'fileoperation', fileop: 'createfolder', path: filetreelocation, newfolder: Q('p5renameinput').value }); }
1500 + function p5deletefile() { var cc = getFileSelCount(), rec = (getFileSelDirCount() > 0) ? '<br /><br /><label><input type=checkbox id=p5recdeleteinput>' + "Recursieve verwijdering" + '</label><br>' : '<input type=checkbox id=p5recdeleteinput style=\'display:none\'>'; setDialogMode(2, "Verwijderen", 3, p5deletefileEx, (cc > 1) ? (format("Verwijder {0} gelecteerde items?", cc) + rec) : ("Verwijder geselecteerde item?" + rec)); }
1501 + function p5deletefileEx() { var delfiles = [], checkboxes = document.getElementsByName('fc'); for (var i = 0; i < checkboxes.length; i++) { if (checkboxes[i].checked) { delfiles.push(checkboxes[i].value); } } meshserver.send({ action: 'fileoperation', fileop: 'delete', path: filetreelocation, delfiles: delfiles, rec: Q('p5recdeleteinput').checked }); }
1502 + function p5renamefile() { var renamefile, checkboxes = document.getElementsByName('fc'); for (var i = 0; i < checkboxes.length; i++) { if (checkboxes[i].checked) { renamefile = checkboxes[i].value; } } setDialogMode(2, "Hernoemen", 3, p5renamefileEx, '<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="' + renamefile + '" />', { action: 'fileoperation', fileop: 'rename', path: filetreelocation, oldname: renamefile }); focusTextBox('p5renameinput'); p5fileNameCheck(); }
1503 + function p5renamefileEx(b, t) { t.newname = Q('p5renameinput').value; meshserver.send(t); }
1504 + function p5fileNameCheck(e) { var x = isFilenameValid(Q('p5renameinput').value); QE('idx_dlgOkButton', x); if ((x == true) && (e && e.keyCode == 13)) { dialogclose(1); } }
1505 + var isFilenameValid = (function () { var x1 = /^[^\\/:\*\?"<>\|]+$/, x2 = /^\./, x3 = /^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i; return function isFilenameValid(fname) { return x1.test(fname) && !x2.test(fname) && !x3.test(fname) && (fname[0] != '.'); } })();
1506 + function p5uploadFile() { setDialogMode(2, "Upload bestand", 3, p5uploadFileEx, '<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value=\"' + encodeURIComponent(filetreelinkpath) + '\" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=hidden name=authCookie value=' + authCookie + ' /><input type=submit id=p5loginSubmit style=display:none /></form>'); updateUploadDialogOk('p5uploadinput'); }
1507 + function p5uploadFileEx() { Q('p5loginSubmit').click(); }
1508 + function updateUploadDialogOk(x) { QE('idx_dlgOkButton', Q(x).value != ''); }
1509 +
1510 + var p5clipboard = null, p5clipboardFolder = null, p5clipboardCut = 0;
1511 + function p5copyFile(cut) { var checkboxes = document.getElementsByName('fc'); p5clipboard = []; p5clipboardCut = cut, p5clipboardFolder = Clone(filetreelocation); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == '3')) { p5clipboard.push(checkboxes[i].value); } } p5updateClipview(); }
1512 + function p5pasteFile() { var x = ''; if ((p5clipboard != null) && (p5clipboard.length > 0)) { x = format("Bevestig {0} van {1} vermelding {2} voor deze locatie?", (p5clipboardCut == 0 ? 'copy' : 'move'), p5clipboard.length, ((p5clipboard.length > 1) ? 's' : '')) } setDialogMode(2, "Plakken", 3, p5pasteFileEx, x); }
1513 + function p5pasteFileEx() { meshserver.send({ action: 'fileoperation', fileop: (p5clipboardCut == 0 ? 'copy' : 'move'), scpath: p5clipboardFolder, path: filetreelocation, names: p5clipboard }); p5folderup(999); if (p5clipboardCut == 1) { p5clipboard = null, p5clipboardFolder = null, p5clipboardCut = 0; p5updateClipview(); } }
1514 + function p5updateClipview() { var x = ''; if ((p5clipboard != null) && (p5clipboard.length > 0)) { x = format("Houd {0} item {1} vast voor {2}", p5clipboard.length, ((p5clipboard.length > 1) ? 's' : ''), (p5clipboardCut == 0 ? "kopie" : "verplaatsen")) + ', <a href=# onclick="return p5clearClip()" style=cursor:pointer>' + "Wissen" + '</a>.' } QH('p5bottomstatus', x); p5setActions(); }
1515 + function p5clearClip() { p5clipboard = null; p5clipboardFolder = null; p5clipboardCut = 0; p5updateClipview(); return false; }
1516 +
1517 + function p5fileDragDrop(e) {
1518 + haltEvent(e);
1519 + QV('bigfail', false);
1520 + QV('bigok', false);
1521 + //QV('p5fileCatchAllInput', false);
1522 + if (e.dataTransfer == null || e.dataTransfer.files.length == 0 || filetreelocation.length == 0) return;
1523 + var names = [], sizes = [], types = [], datas = [], readercount = e.dataTransfer.files.length;
1524 + for (var i = 0; i < e.dataTransfer.files.length; i++) {
1525 + var reader = new FileReader(), file = e.dataTransfer.files[i];
1526 + names.push(file.name);
1527 + sizes.push(file.size);
1528 + types.push(file.type);
1529 + reader.onload = function (event) {
1530 + datas.push(event.target.result);
1531 + if (--readercount == 0) {
1532 + Q('p5fileDragName').value = names.join('*');
1533 + Q('p5fileDragSize').value = sizes.join('*');
1534 + Q('p5fileDragType').value = types.join('*');
1535 + Q('p5fileDragData').value = datas.join('*');
1536 + Q('p5fileDragLink').value = encodeURIComponent(filetreelinkpath);
1537 + Q('p5loginSubmit2').click();
1538 + }
1539 + }
1540 + reader.readAsDataURL(file);
1541 + }
1542 + }
1543 +
1544 + var p5dragtimer = null;
1545 + function p5fileDragOver(e) {
1546 + haltEvent(e);
1547 + if (p5dragtimer != null) { clearTimeout(p5dragtimer); p5dragtimer = null; }
1548 + var ac = true; // TODO: Set to true if we can accept the file
1549 + if (filetreelocation.length == 0) { ac = false; }
1550 + QV('bigok', ac);
1551 + QV('bigfail', !ac);
1552 + //QV('p5fileCatchAllInput', ac);
1553 + }
1554 +
1555 + function p5fileDragLeave(e) {
1556 + haltEvent(e);
1557 + if (e.target.id != 'p5filetable') {
1558 + QV('bigfail', false);
1559 + QV('bigok', false);
1560 + //QV('p5fileCatchAllInput', false);
1561 + } else {
1562 + p5dragtimer = setTimeout('QV(\'bigfail\',false);QV(\'bigok\',false);p5dragtimer=null;', 200);
1563 + }
1564 + }
1565 +
1566 + //
1567 + // MY DEVICES
1568 + //
1569 +
1570 + function ondeskkeypress(e) {
1571 + toggleSoftKeys(0);
1572 + Q('DeskSoftInput').value = '';
1573 + setSessionActivity();
1574 + if (desktop && !xxdialogMode && xxcurrentView == 10) {
1575 + // Check what keys we are allows to send
1576 + if (currentNode != null) {
1577 + var mesh = meshes[currentNode.meshid];
1578 + var meshrights = mesh.links[userinfo._id].rights;
1579 + var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
1580 + if (inputAllowed == false) return false;
1581 + var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));
1582 + if (limitedInputAllowed == true) { if ((e.altKey == true) || (e.ctrlKey == true) || ((e.keyCode < 32) && (e.keyCode != 8) && (e.keyCode != 13)) || (e.keyCode > 90)) return false; }
1583 + }
1584 + return desktop.m.handleKeys(e);
1585 + }
1586 + }
1587 +
1588 + function ondeskkeydown(e) {
1589 + toggleSoftKeys(0);
1590 + Q('DeskSoftInput').value = '';
1591 + setSessionActivity();
1592 + if (desktop && !xxdialogMode && xxcurrentView == 10) {
1593 + // Check what keys we are allows to send
1594 + if (currentNode != null) {
1595 + var mesh = meshes[currentNode.meshid];
1596 + var meshrights = mesh.links[userinfo._id].rights;
1597 + var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
1598 + if (inputAllowed == false) return false;
1599 + var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));
1600 + if (limitedInputAllowed == true) { if ((e.altKey == true) || (e.ctrlKey == true) || ((e.keyCode < 32) && (e.keyCode != 8) && (e.keyCode != 13)) || (e.keyCode > 90)) return false; }
1601 + }
1602 + return desktop.m.handleKeyDown(e);
1603 + }
1604 + }
1605 +
1606 + function ondeskkeyup(e) {
1607 + toggleSoftKeys(0);
1608 + Q('DeskSoftInput').value = '';
1609 + setSessionActivity();
1610 + if (desktop && !xxdialogMode && xxcurrentView == 10) {
1611 + // Check what keys we are allows to send
1612 + if (currentNode != null) {
1613 + var mesh = meshes[currentNode.meshid];
1614 + var meshrights = mesh.links[userinfo._id].rights;
1615 + var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
1616 + if (inputAllowed == false) return false;
1617 + var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));
1618 + if (limitedInputAllowed == true) { if ((e.altKey == true) || (e.ctrlKey == true) || ((e.keyCode < 32) && (e.keyCode != 8) && (e.keyCode != 13)) || (e.keyCode > 90)) return false; }
1619 + }
1620 + return desktop.m.handleKeyUp(e);
1621 + }
1622 + }
1623 +
1624 + // Since the update device call can be quite frequent, we can moderate it and only call it at most 5 times a second.
1625 + var updateDevicesTimer = null;
1626 + function updateDevices() { if (updateDevicesTimer != null) return; updateDevicesTimer = setTimeout(updateDevicesEx, 200); }
1627 +
1628 + var sort = 0;
1629 + var deviceHeaderId = 0;
1630 + var deviceHeaderCount;
1631 + var deviceHeaders = {};
1632 + var showRealNames = false;
1633 + var deviceHeaderTotal = 0;
1634 + var deviceHeaders = {};
1635 + var deviceHeadersTitles = {};
1636 + function updateDevicesEx() {
1637 + if (updateDevicesTimer != null) { clearTimeout(updateDevicesTimer); updateDevicesTimer = null; }
1638 + var r = '', c = 0, current = null, count = 0, displayedMeshes = {}, groups = {}, groupCount = {};
1639 +
1640 + // 3 wide, list view or desktop view
1641 + deviceHeaderId = 0;
1642 + deviceHeaderCount = {};
1643 + deviceHeaderTotal = 0;
1644 + deviceHeaders = {};
1645 + deviceHeadersTitles = {};
1646 + var current;
1647 +
1648 + // Perform node sort
1649 + if (sort == 0) { nodes.sort(meshSort); }
1650 + else if (sort == 1) { nodes.sort(powerSort); }
1651 + else if (sort == 2) { if (showRealNames == true) { nodes.sort(deviceHostSort); } else { nodes.sort(deviceSort); } }
1652 +
1653 + // Go thru the list of nodes and display them
1654 + for (var i in nodes) {
1655 + if (nodes[i].v == false) continue;
1656 + var mesh2 = meshes[nodes[i].meshid], meshlinks = mesh2.links[userinfo._id];
1657 + if (meshlinks == null) continue;
1658 + var meshrights = meshlinks.rights;
1659 +
1660 + if (sort == 0) {
1661 + // Mesh header
1662 + nodes.sort(meshSort);
1663 + if (nodes[i].meshid != current) {
1664 + deviceHeaderSet();
1665 + var extra = '';
1666 + if (meshes[nodes[i].meshid].mtype == 1) { extra = '<span style=color:lightgray>' + ", Intel&reg; AMT alleen" + '</span>'; }
1667 + if (current != null) { if (c == 2) { r += '<td><div style=width:301px></div></td>'; } if (r != '') { r += '</tr></table>'; } }
1668 + r += '<div class=DevSt style=padding-top:4px><span style=float:right>';
1669 + //r += getMeshActions(mesh2, meshrights);
1670 + r += '</span><span id=MxMESH style=cursor:pointer onclick=goForward("' + nodes[i].meshid + '")>' + EscapeHtml(meshes[nodes[i].meshid].name) + '</span>' + extra + '<span id=DevxHeader' + deviceHeaderId + ' style=color:lightgray></span></div>';
1671 + current = nodes[i].meshid;
1672 + displayedMeshes[current] = 1;
1673 + c = 0;
1674 + }
1675 + } else if (sort == 1) {
1676 + // Power header
1677 + if (nodes[i].pwr !== current) {
1678 + deviceHeaderSet();
1679 + if (current !== null) { if (c == 2) { r += '<td><div style=width:301px></div></td>'; } if (r != '') { r += '</tr></table>'; } }
1680 + r += '<div class=DevSt style=width:100%;padding-top:4px><span>' + PowerStateStr2(nodes[i].pwr) + '</span><span id=DevxHeader' + deviceHeaderId + ' style=color:lightgray></span></div>';
1681 + current = nodes[i].pwr;
1682 + c = 0;
1683 + }
1684 + } else if (sort == 2) {
1685 + // Device header
1686 + if (current == null) { current = '1'; }
1687 + }
1688 +
1689 + count++;
1690 + var title = EscapeHtml(nodes[i].name);
1691 + if (title.length == 0) { title = '<i>' + "Geen" + '</i>'; }
1692 + if ((nodes[i].rname != null) && (nodes[i].rname.length > 0)) { title += " / " + EscapeHtml(nodes[i].rname); }
1693 + var name = EscapeHtml(nodes[i].name);
1694 + if (showRealNames == true && nodes[i].rname != null) name = EscapeHtml(nodes[i].rname);
1695 + if (name.length == 0) { name = '<i>' + "Geen" + '</i>'; }
1696 +
1697 + // Node
1698 + var icon = nodes[i].icon, nodestate = NodeStateStr(nodes[i]);
1699 + if ((!nodes[i].conn) || (nodes[i].conn == 0)) { icon += ' gray'; }
1700 + r += '<div style=cursor:pointer onclick=goForward(\'' + nodes[i]._id + '\')>';
1701 + r += '<div class="i' + icon + '" style="float:left;margin-left:4px"></div>';
1702 + r += '<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">';
1703 + r += '<div><div style=padding-left:12px;padding-top:2px><b>' + name + '</b></div><div style=padding-left:12px;padding-top:3px;color:gray>' + nodestate + '</div></div>';
1704 + r += '</div></div>';
1705 +
1706 + // If we are displaying devices by group, put the device in the right group.
1707 + /*
1708 + if ((sort == 3) && (r != '')) {
1709 + if (nodes[i].tags) {
1710 + for (var j in nodes[i].tags) {
1711 + var tag = nodes[i].tags[j];
1712 + if (groups[tag] == null) { groups[tag] = r; groupCount[tag] = 1; } else { groups[tag] += r; groupCount[tag] += 1; }
1713 + if (view == 3) break;
1714 + }
1715 + }
1716 + r = '';
1717 + }
1718 + */
1719 +
1720 + deviceHeaderTotal++;
1721 + if (typeof deviceHeaderCount[nodes[i].state] == 'undefined') { deviceHeaderCount[nodes[i].state] = 1; } else { deviceHeaderCount[nodes[i].state]++; }
1722 + }
1723 +
1724 + // Display all empty meshes, we need to do this because users can add devices to these at any time.
1725 + if (sort == 0) {
1726 + for (var i in meshes) {
1727 + var mesh = meshes[i], meshlink = mesh.links[userinfo._id];
1728 + if (meshlink != null) {
1729 + var meshrights = meshlink.rights;
1730 + if (displayedMeshes[mesh._id] == null) {
1731 + if ((current != '') && (r != '')) { r += '</tr></table>'; }
1732 + r += '<div><div colspan=3 class=DevSt><span style=float:right>';
1733 + //r += getMeshActions(mesh, meshrights);
1734 + r += '</span><span id=MxMESH style=cursor:pointer onclick=goForward("' + mesh._id + '")>' + EscapeHtml(mesh.name) + '</span></div>';
1735 + if (mesh.mtype == 1) { r += '<div style=padding:10px><i>' + "Geen Intel&reg; AMT-apparaten in deze groep"; }
1736 + if (mesh.mtype == 2) { r += '<div style=padding:10px><i>' + "Geen apparaten in deze groep"; }
1737 + r += '.</i></div></div>';
1738 + current = mesh._id;
1739 + count++;
1740 + }
1741 + }
1742 + }
1743 + }
1744 +
1745 + if (count == 0) {
1746 + QH('xdevices', '<div style="margin-top:50px;text-align:center"><span style="font-size:30px">' + "Geen apparaten" + '</span><br /><br />' + "Gebruik de desktopversie van deze website om apparaten toe te voegen." + '</div>');
1747 + } else {
1748 + QH('xdevices', r);
1749 + }
1750 + deviceHeaderSet();
1751 + for (var i in deviceHeaders) { QH(i, deviceHeaders[i]); }
1752 + for (var i in deviceHeadersTitles) { Q(i).title = deviceHeadersTitles[i]; }
1753 + }
1754 +
1755 + var powerStatetable = ['', "ingeschakeld", "Slaap", "Slaap", "Slaap", "Slaapstand", "Uitzetten", "Aanwezig"];
1756 + var powerStateStrings = ['', "ingeschakeld", "Slapen", "Slapen", "Slaapstand", "Slaapstand", "softwarematig uit", "Aanwezig"];
1757 + var powerStateStrings2 = ['', "Apparaat is ingeschakeld", "Apparaat bevindt zich in slaapstand (S1)", "Apparaat bevindt zich in slaapstand (S2)", "Apparaat bevindt zich in diepe slaapstand (S3)", "Apparaat is in slaapstand (S4)", "Apparaat is uitgeschakeld (S5)", "Apparaat is aanwezig, maar de stroomstatus kan niet worden bepaald"];
1758 + var powerColorTable = ['#00000000', 'black', 'blue', 'blue', 'lightblue', 'blueviolet', 'darkgreen', 'lightseagreen', 'lightseagreen'];
1759 + function NodeStateStr(node) {
1760 + var states = [];
1761 + if (node.state > 0 && node.state < powerStatetable.length) state.push(powerStatetable[node.state]);
1762 + if (node.conn) {
1763 + if ((node.conn & 1) != 0) { states.push('<span>' + "Agent" + '</span>'); }
1764 + if ((node.conn & 2) != 0) { states.push('<span>' + "CIRA" + '</span>'); }
1765 + else if ((node.conn & 4) != 0) { states.push('<span>' + "Intel&reg; AMT" + '</span>'); }
1766 + if ((node.conn & 8) != 0) { states.push('<span>' + "Relay" + '</span>'); }
1767 + if ((node.conn & 16) != 0) { states.push('<span>' + "MQTT" + '</span>'); }
1768 + }
1769 + if ((node.pwr != null) && (node.pwr != 0)) { states.push(powerStateStrings[node.pwr]); }
1770 + return states.join(', ');
1771 + }
1772 +
1773 + function PowerStateStr(x) {
1774 + if (x < powerStatetable.length) return powerStatetable[x];
1775 + return '';
1776 + }
1777 +
1778 + function PowerStateStr2(x) {
1779 + if ((x != 0) && (x < powerStatetable.length)) return powerStatetable[x];
1780 + return "Onbekend";
1781 + }
1782 +
1783 + function onSortSelectChange(skipsave) {
1784 + sort = document.getElementById('sortselect').selectedIndex;
1785 + if (!skipsave) { putstore('sort', sort); }
1786 + updateDevicesEx();
1787 + }
1788 +
1789 + function deviceHeaderSet() {
1790 + if (deviceHeaderId == 0) { deviceHeaderId = 1; return; }
1791 + deviceHeaders['DevxHeader' + deviceHeaderId] = ', ' + deviceHeaderTotal + ((deviceHeaderTotal == 1) ? " apparaat" : " apparaten");
1792 + var title = '';
1793 + for (var x in deviceHeaderCount) { if (title.length > 0) title += ', '; title += deviceHeaderCount[x] + ' ' + PowerStateStr2(x); }
1794 + deviceHeadersTitles['DevxHeader' + deviceHeaderId] = title;
1795 + deviceHeaderId++;
1796 + deviceHeaderCount = {};
1797 + deviceHeaderTotal = 0;
1798 + }
1799 +
1800 + function meshSort(a, b) { if (a.meshnamel > b.meshnamel) return 1; if (a.meshnamel < b.meshnamel) return -1; if (a.meshid == b.meshid) { if (showRealNames == true) { if (a.rnamel > b.rnamel) return 1; if (a.rnamel < b.rnamel) return -1; return 0; } else { if (a.namel > b.namel) return 1; if (a.namel < b.namel) return -1; return 0; } } return 0; }
1801 + function powerSort(a, b) { var ap = a.pwr ? a.pwr : 0; var bp = b.pwr ? b.pwr : 0; if (ap == bp) { if (showRealNames == true) { if (a.rnamel > b.rnamel) return 1; if (a.rnamel < b.rnamel) return -1; return 0; } else { if (a.namel > b.namel) return 1; if (a.namel < b.namel) return -1; return 0; } } if (ap > bp) return 1; if (ap < bp) return -1; return 0; }
1802 + function deviceSort(a, b) { if (a.namel > b.namel) return 1; if (a.namel < b.namel) return -1; return 0; }
1803 + function deviceHostSort(a, b) { if (a.rnamel > b.rnamel) return 1; if (a.rnamel < b.rnamel) return -1; return 0; }
1804 +
1805 + //
1806 + // MY DEVICE
1807 + //
1808 +
1809 + function refreshDevice(nodeid) {
1810 + if (!currentNode || currentNode._id != nodeid) return;
1811 + gotoDevice(nodeid, xxcurrentView, true);
1812 + }
1813 +
1814 + function getNodeRights(nodeid) {
1815 + var node = getNodeFromId(nodeid), mesh = meshes[node.meshid];
1816 + return mesh.links[userinfo._id].rights;
1817 + }
1818 +
1819 + var currentDevicePanel = 0;
1820 + var currentNode;
1821 + var powerTimelineNode = null;
1822 + var powerTimelineReq = null;
1823 + var powerTimelineUpdate = null;
1824 + var powerTimeline = null;
1825 + function getCurrentNode() { return currentNode; };
1826 + function gotoDevice(nodeid, panel, refresh) {
1827 +
1828 + // Remind the user to verify the email address
1829 + if ((userinfo.emailVerified !== true) && (serverinfo.emailcheck == true) && (userinfo.siteadmin != 0xFFFFFFFF)) { setDialogMode(2, "Gebruikersaccount beveiliging", 1, null, "Geen toegang tot een apparaat totdat een e-mailadres is geverifieerd. Dit is vereist voor wachtwoordherstel. Ga naar de \"Mijn account\" om een e-mailadres te wijzigen en te verifiëren."); return; }
1830 +
1831 + // Remind the user to add two factor authentication
1832 + if ((features & 0x00040000) && !((userinfo.otpsecret == 1) || (userinfo.otphkeys > 0) || (userinfo.otpkeys > 0))) { setDialogMode(2, "Gebruikersaccount beveiliging", 1, null, "Geen toegang tot een apparaat totdat tweefactorauthenticatie is ingeschakeld. Dit is vereist voor extra beveiliging. Ga naar de \"Mijn account\" en bekijk het gedeelte \"Accountbeveiliging\"."); return; }
1833 +
1834 + var node = getNodeFromId(nodeid);
1835 + if (node == null) { goBack(); return; }
1836 + var mesh = meshes[node.meshid];
1837 + if (mesh == null) { goBack(); return; }
1838 + var meshrights = mesh.links[userinfo._id].rights;
1839 + if (!currentNode || currentNode._id != node._id || refresh == true) {
1840 + currentNode = node;
1841 +
1842 + // Add node name
1843 + var nname = EscapeHtml(node.name);
1844 + if (nname.length == 0) { nname = '<i>' + "Geen" + '</i>'; }
1845 + if ((meshrights & 4) != 0) { nname = '<span onclick=showEditNodeValueDialog(0) style=cursor:pointer>' + nname + '</span>'; }
1846 + QH('p10deviceName', nname);
1847 +
1848 + // Node attributes
1849 + var x = '<table style=width:100%>';
1850 +
1851 + // Attribute: Mesh
1852 + x += addDeviceAttribute('<span>' + "Groep" + '</span>', '<a onclick=goForward("' + node.meshid + '") style=cursor:pointer>' + EscapeHtml(meshes[node.meshid].name) + '</a>');
1853 +
1854 + // Attribute: Name
1855 + if (node.rname != null) { x += addDeviceAttribute('<span>' + "Naam" + '</span>', '<span>' + EscapeHtml(node.rname) + '</span>'); }
1856 +
1857 + // Attribute: Host
1858 + if ((mesh.mtype == 1) || (node.name != node.host)) {
1859 + if ((meshrights & 4) != 0) {
1860 + if (node.host) {
1861 + x += addDeviceAttribute("Hostname", '<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>' + EscapeHtml(node.host) + '</span>');
1862 + } else {
1863 + x += addDeviceAttribute("Hostname", '<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>' + "Geen" + '</i></span>');
1864 + }
1865 + } else {
1866 + x += addDeviceAttribute("Hostname", EscapeHtml(node.host));
1867 + }
1868 + }
1869 +
1870 + // Attribute: Description
1871 + var description = node.desc ? EscapeHtml(node.desc) : '<i>' + "Geen" + '</i>';
1872 + if ((meshrights & 4) != 0) {
1873 + x += addDeviceAttribute("Omschrijving", '<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>' + description + '</span>');
1874 + } else {
1875 + x += addDeviceAttribute("Omschrijving", description);
1876 + }
1877 +
1878 + // Attribute: Mesh Agent
1879 + var agentsStr = ["Onbekend", "Windows 32bit console", "Windows 64bit console", "Windows 32bit service", "Windows 64bit service", "Linux 32bit", "Linux 64bit", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32bit", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64bit", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64bit", "Windows MinCore console", "Windows MinCore service", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Onbekend", "Onbekend", "FreeBSD x86-64"];
1880 + if ((node.agent != null) && (node.agent.id != null) && (node.agent.ver != null)) {
1881 + var str = '';
1882 + if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; }
1883 + if (node.agent.ver != 0) { str += ' v' + node.agent.ver; }
1884 + x += addDeviceAttribute("Agent", str);
1885 + }
1886 +
1887 + // Attribute: Intel AMT
1888 + if (node.intelamt != null) {
1889 + var str = '';
1890 + var provisioningStates = { 0: nobreak("Niet geactiveerd (Pre)"), 1: nobreak("Niet geactiveerd (In)"), 2: nobreak("Geactiveerd") };
1891 + if (node.intelamt.ver != null && node.intelamt.state == null) { str += '<i>' + nobreak("Onbekende staat") + '</i>, v' + node.intelamt.ver; } else
1892 +
1893 + if ((node.intelamt.ver == null) && (node.intelamt.state == 2)) { str += '<i>' + "Geactiveerd" + '</i>'; }
1894 + else if ((node.intelamt.ver == null) || (node.intelamt.state == null)) { str += '<i>' + "Onbekende versie en staat" + '</i>'; }
1895 + else {
1896 + str += provisioningStates[node.intelamt.state];
1897 + if (node.intelamt.flags) { if (node.intelamt.flags & 2) { str = ' <span>' + "CCM" + '</span>'; } else if (node.intelamt.flags & 4) { str = ' <span>' + "ACM" + '</span>'; } }
1898 + str += (', v' + node.intelamt.ver);
1899 + }
1900 +
1901 + if (node.intelamt.tls == 1) { str += ', <span>' + "TLS" + '</span>'; }
1902 + if (node.intelamt.state == 2) {
1903 + if (node.intelamt.user == null || node.intelamt.user == '') {
1904 + if ((meshrights & 4) != 0) {
1905 + str += ', <i style=color:#FF0000;cursor:pointer onclick=editDeviceAmtSettings("' + node._id + '")>' + nobreak("Geen referenties") + '</i>';
1906 + } else {
1907 + str += ', <i style=color:#FF0000>' + "Geen referenties" + '</i>';
1908 + }
1909 + }
1910 + str += ' ';
1911 + if ((meshrights & 4) != 0) {
1912 + str += '<img src=images/link4.png height=10 width=10 style=cursor:pointer onclick=editDeviceAmtSettings("' + node._id + '")>';
1913 + }
1914 + }
1915 +
1916 + var meName = "Intel&reg; ME";
1917 + if (typeof node.intelamt.sku == 'number') {
1918 + if ((node.intelamt.sku & 8) != 0) { meName = "Intel&reg; AMT"; }
1919 + else if ((node.intelamt.sku & 16) != 0) { meName = "Intel&reg; SM"; }
1920 + }
1921 + x += addDeviceAttribute(meName, str);
1922 + }
1923 +
1924 + // Attribute: Mesh Agent Tag
1925 + if ((node.agent != null) && (node.agent.tag != null) && (node.agent.tag != 'mailto:')) {
1926 + var tag = EscapeHtml(node.agent.tag);
1927 + if (tag.startsWith('mailto:')) { tag = '<a href="' + tag + '">' + tag.substring(7) + '</a>'; }
1928 + x += addDeviceAttribute("Agent Tag", tag);
1929 + }
1930 +
1931 + // Attribute: Intel AMT
1932 + //if (node.intelamt && node.intelamt.user) { x += addDeviceAttribute('Intel&reg; AMT', node.intelamt.user); }
1933 +
1934 + // Attribute: Connectivity (Only show this if more than just the agent is connected).
1935 + var connectivity = node.conn;
1936 + if (connectivity && connectivity > 1) {
1937 + var cstate = [];
1938 + if ((node.conn & 1) != 0) cstate.push('<span>' + "Agent" + '</span>');
1939 + if ((node.conn & 2) != 0) cstate.push('<span>' + "Intel&reg; AMT CIRA" + '</span>');
1940 + else if ((node.conn & 4) != 0) cstate.push('<span>' + "Intel&reg; AMT" + '</span>');
1941 + if ((node.conn & 8) != 0) cstate.push('<span>' + "Agent Relay" + '</span>');
1942 + if ((node.conn & 16) != 0) cstate.push('<span>' + "MQTT" + '</span>');
1943 + x += addDeviceAttribute("connectiviteit", cstate.join(', '));
1944 + }
1945 +
1946 + // Node tags
1947 + var groupingTags = '<i>' + "Geen" + '</i>';
1948 + if (node.tags != null) { groupingTags = ''; for (var i in node.tags) { groupingTags += '<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">' + node.tags[i] + '</span>'; } }
1949 + if ((meshrights & 4) != 0) {
1950 + x += addDeviceAttribute("Tags", '<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>' + groupingTags + '</span>');
1951 + } else {
1952 + x += addDeviceAttribute("Tags", groupingTags);
1953 + }
1954 +
1955 + x += '</table><br />';
1956 + // Show action button, only show if we have permissions 4, 8, 64
1957 + if ((meshrights & 76) != 0) { x += '<input type=button value=Actions onclick=deviceActionFunction() />'; }
1958 + //x += '<input type=button value=Notes onclick=showNotes(' + ((meshrights & 128) == 0) + ',"' + encodeURIComponent(node._id) + '") />';
1959 + //if ((connectivity & 1) && (meshrights & 8) && (node.agent.id < 5)) { x += '<input type=button value=Toast onclick=deviceToastFunction() />'; }
1960 + QH('p10html', x);
1961 +
1962 + // Show node last 7 days timeline
1963 + //drawDeviceTimeline();
1964 + setupFiles();
1965 +
1966 + // Show bottom buttons
1967 + x = '<div style=float:right;font-size:x-small;margin-right:10px>';
1968 + if ((meshrights & 4) != 0) x += '<a style=cursor:pointer onclick=p10showDeleteNodeDialog("' + node._id + '")>' + "Verwijder apparaat" + '</a>';
1969 + x += '</div><div style=font-size:x-small>';
1970 + //if (mesh.mtype == 2) x += '<a style=cursor:pointer onclick=p10showNodeNetInfoDialog("' + node._id + '")>Interfaces</a>&nbsp;';
1971 + //if (xxmap != null) x += '<a style=cursor:pointer onclick=p10showNodeLocationDialog("' + node._id + '")>Location</a>&nbsp;';
1972 + x += '</div><br>'
1973 +
1974 + QH('p10html3', x);
1975 +
1976 + // Set the node power state
1977 + var powerstate = PowerStateStr(node.state);
1978 + //if (node.state == 0) { powerstate = 'Unknown State'; }
1979 + if ((connectivity & 1) != 0) { if (powerstate.length > 0) { powerstate += ', '; } powerstate += '<span style=font-size:10px>' + "Mesh Agent" + '</span>'; }
1980 + if ((connectivity & 2) != 0) { if (powerstate.length > 0) { powerstate += ', '; } powerstate += '<span style=font-size:10px>' + "Intel® AMT verbonden" + '</span>'; }
1981 + else if ((connectivity & 4) != 0) { if (powerstate.length > 0) { powerstate += ', '; } powerstate += '<span style=font-size:10px>' + "Intel&reg; AMT gedetecteerd" + '</span>'; }
1982 + if ((connectivity & 16) != 0) { if (powerstate.length > 0) { powerstate += '<br/>'; } powerstate += '<span style=font-size:12px>' + "MQTT-kanaal verbonden" + '</span>'; }
1983 + QH('MainComputerState', powerstate);
1984 +
1985 + // Set the node icon
1986 + QH('MainComputerImage', '<div class="i' + node.icon + '"></div>');
1987 +
1988 + // Request the power timeline
1989 + if ((powerTimelineNode != currentNode._id) && (powerTimelineReq != currentNode._id)) { QH('p10html2', ''); powerTimelineReq = currentNode._id; meshserver.send({ action: 'powertimeline', nodeid: currentNode._id }); }
1990 + }
1991 + setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching.
1992 + if (!panel) panel = 10;
1993 + go(panel);
1994 +
1995 + // Update the footer menu
1996 + setupDeviceMenu();
1997 + }
1998 +
1999 + function deviceToastFunction() {
2000 + if (xxdialogMode) return;
2001 + setDialogMode(2, "undefined", 3, deviceToastFunctionEx, '<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>');
2002 + }
2003 +
2004 + function deviceToastFunctionEx() {
2005 + meshserver.send({ action: 'toast', nodeids: [currentNode._id], title: 'MeshCentral', msg: Q('d2devToast').value });
2006 + }
2007 +
2008 + function setupDeviceMenu(op, obj) {
2009 + var meshrights = 0;
2010 + if (currentNode) { meshrights = meshes[currentNode.meshid].links[userinfo._id].rights; }
2011 + if (op != null) { currentDevicePanel = op; }
2012 + QV('p10general', currentDevicePanel == 0);
2013 + QV('p10desktop', currentDevicePanel == 1); // Show if we have remote control rights or desktop view only rights
2014 + QV('p10files', currentDevicePanel == 2);
2015 + var menus = [];
2016 + if (currentDevicePanel != 0) { menus.push({ n: 'General', f: 'setupDeviceMenu(0)' }); }
2017 + if ((currentDevicePanel != 1) &&
2018 + (currentNode != null) &&
2019 + ((meshrights & 8) || (meshrights & 256)) &&
2020 + (((meshes[currentNode.meshid].mtype == 1) && ((typeof currentNode.intelamt.sku !== 'number') || ((currentNode.intelamt.sku & 8) != 0))) || (currentNode.agent && (currentNode.agent.caps & 1)))
2021 + ) { menus.push({ n: 'Desktop', f: 'setupDeviceMenu(1)' }); }
2022 + if ((currentDevicePanel != 2) && (currentNode != null) && (meshrights & 8) && ((meshrights == 0xFFFFFFFF) || ((meshrights & 1024) == 0)) && ((currentNode.mtype == 2) && (currentNode.agent.caps & 4))) { menus.push({ n: 'Files', f: 'setupDeviceMenu(2)' }); }
2023 + updateFooterMenu(menus);
2024 + }
2025 +
2026 + function deviceActionFunction() {
2027 + if (xxdialogMode) return;
2028 + var meshrights = meshes[currentNode.meshid].links[userinfo._id].rights;
2029 + var x = "Selecteer een bewerking die u op dit apparaat wilt uitvoeren." + '<br /><br />';
2030 + var y = '<select id=d2deviceop style=float:right;width:170px>';
2031 + if ((meshrights & 64) != 0) { y += '<option value=100>' + "Wakker worden" + '</option>'; } // Wake-up permission
2032 + if ((meshrights & 8) != 0) { y += '<option value=4>' + "Slaap" + '</option><option value=3>' + "Reset" + '</option><option value=2>' + "Uitzetten" + '</option>'; } // Remote control permission
2033 + y += '</select>';
2034 + x += addHtmlValue("Operatie", y);
2035 + setDialogMode(2, "Apparaatactie", 3, deviceActionFunctionEx, x);
2036 + }
2037 +
2038 + function deviceActionFunctionEx() {
2039 + var op = Q('d2deviceop').value;
2040 + if (op == 100) {
2041 + // Device wake
2042 + meshserver.send({ action: 'wakedevices', nodeids: [currentNode._id] });
2043 + } else {
2044 + // Power operation
2045 + meshserver.send({ action: 'poweraction', nodeids: [currentNode._id], actiontype: op });
2046 + }
2047 + }
2048 +
2049 + // Look to see if we need to update the device timeline
2050 + function updateDeviceTimeline() {
2051 + if ((meshserver.State != 2) || (powerTimelineNode == null) || (powerTimelineUpdate == null) || (currentNode == null)) return;
2052 + if ((powerTimelineNode == powerTimelineReq) && (currentNode._id == powerTimelineNode) && (powerTimelineUpdate < Date.now())) { powerTimelineUpdate = null; meshserver.send({ action: 'powertimeline', nodeid: currentNode._id }); }
2053 + }
2054 +
2055 + // Draw device power bars. The bars are 766px wide.
2056 + function drawDeviceTimeline() {
2057 + var timeline = null, now = Date.now();
2058 + if (currentNode._id == powerTimelineNode) { timeline = powerTimeline; }
2059 +
2060 + // Calculate when the timeline starts
2061 + var d = new Date();
2062 + d.setHours(0, 0, 0, 0);
2063 + d = new Date(d.getTime() - (1000 * 60 * 60 * 24 * 6));
2064 + var timelineStart = d.getTime();
2065 +
2066 + // De-compact the timeline
2067 + var timeline2 = [];
2068 + if (timeline != null && timeline.length > 1) {
2069 + timeline2.push([0, timeline[1], timeline[0]]); // Start, End, Power
2070 + var ct = timeline[1];
2071 + for (var i = 2; i < timeline.length; i += 2) {
2072 + var power = timeline[i], dt = now;
2073 + if (timeline.length > (i + 1)) { dt = timeline[i + 1]; }
2074 + timeline2.push([ct, ct + dt, power]); // Start, End, Power
2075 + ct = ct + dt;
2076 + }
2077 + }
2078 +
2079 + // Draw the timeline
2080 + var x = '', count = 1, date = new Date();
2081 + var totalWidth = Q('masthead').offsetWidth - (90 + 9 + 9 + 14); // Compute the total width of the power bar
2082 + date.setHours(0, 0, 0, 0);
2083 + for (var i = 0; i < 7; i++) {
2084 + var datavalue = '', start = date.getTime(), end = start + (1000 * 60 * 60 * 24);
2085 + for (var j in timeline2) {
2086 + var block = timeline2[j];
2087 + if (isTimeBlockInside(start, end, block[0], block[1]) == true) {
2088 + var ts = Math.max(start, block[0]);
2089 + var te = Math.min(Math.min(end, block[1]), now);
2090 + var width = Math.round(((te - ts) * totalWidth) / 86400000);
2091 + if (width > 0) { datavalue += '<div style=display:table-cell;width:' + width + 'px;background-color:' + powerColor(block[2]) + ';height:16px></div>'; }
2092 + }
2093 + }
2094 + x += '<tr style=' + (((count % 2) == 0) ? 'background-color:#DDD' : '') + '><td><div>&nbsp;' + printDate(date) + '<div></div></div></td><td><div>' + datavalue + '</div></td></tr>';
2095 + ++count;
2096 + date = new Date(date.getTime() - (1000 * 60 * 60 * 24)); // Substract one day
2097 + }
2098 + QH('p10html2', '<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse;width:calc(100% - 18px);margin:9px" border=0 cellpadding=2 cellspacing=0><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:90px>Day</th><th scope=col style=text-align:center>Power State</th></tr>' + x + '</tbody></table>');
2099 + }
2100 +
2101 + // Return a color for the given power state
2102 + function powerColor(x) { if (x < powerColorTable.length) { return powerColorTable[x]; } return 'yellow'; }
2103 +
2104 + // Return true if the time block is visible within the start/end period
2105 + function isTimeBlockInside(start, end, blockStart, blockEnd) {
2106 + if ((blockStart < start) && (blockEnd > end)) return true; // Block is wider than timespan
2107 + if ((blockStart > start) && (blockStart < end)) return true;
2108 + if ((blockEnd > start) && (blockEnd < end)) return true;
2109 + return false;
2110 + }
2111 +
2112 + function addDeviceAttribute(name, value) {
2113 + return '<tr><td style=width:100px;color:gray>' + name + '</td><td style=overflow:hidden>' + value + '</td></tr>';
2114 + }
2115 +
2116 + function editDeviceAmtSettings(nodeid, func) {
2117 + if (xxdialogMode) return;
2118 + var x = '', node = getNodeFromId(nodeid), buttons = 3, meshrights = getNodeRights(nodeid);
2119 + if ((meshrights & 4) == 0) return;
2120 + x += addHtmlValue("Gebruikersnaam", '<input id=dp10username style=width:170px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />');
2121 + x += addHtmlValue("wachtwoord", '<input id=dp10password type=password style=width:170px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />');
2122 + x += addHtmlValue("Veiligheid", '<select id=dp10tls style=width:176px><option value=0>' + "Geen TLS beveiliging" + '</option><option value=1>' + "TLS beveiliging vereist" + '</option></select>');
2123 + if ((node.intelamt.user != null) && (node.intelamt.user != '')) { buttons = 7; }
2124 + setDialogMode(2, "Bewerk Intel® AMT-gegevens", buttons, editDeviceAmtSettingsEx, x, { node: node, func: func });
2125 + if ((node.intelamt.user != null) && (node.intelamt.user != '')) { Q('dp10username').value = node.intelamt.user; } else { Q('dp10username').value = 'admin'; }
2126 + Q('dp10tls').value = node.intelamt.tls;
2127 + validateDeviceAmtSettings();
2128 + }
2129 +
2130 + function validateDeviceAmtSettings() {
2131 + QE('idx_dlgOkButton', passwordcheck(Q('dp10password').value));
2132 + }
2133 +
2134 + function editDeviceAmtSettingsEx(button, tag) {
2135 + if (button == 2) {
2136 + // Delete button pressed, remove credentials
2137 + meshserver.send({ action: 'changedevice', nodeid: tag.node._id, intelamt: { user: '', pass: '' } });
2138 + } else {
2139 + // Change Intel AMT credentials
2140 + var amtuser = Q('dp10username').value;
2141 + if (amtuser == '') amtuser = 'admin';
2142 + var amtpass = Q('dp10password').value;
2143 + if (amtpass == '') amtuser = '';
2144 + meshserver.send({ action: 'changedevice', nodeid: tag.node._id, intelamt: { user: amtuser, pass: amtpass, tls: Q('dp10tls').value } });
2145 + tag.node.intelamt.user = amtuser;
2146 + tag.node.intelamt.tls = Q('dp10tls').value;
2147 + if (tag.func) { setTimeout(tag.func, 300); }
2148 + }
2149 + }
2150 +
2151 + function p10showDeleteNodeDialog(nodeid) {
2152 + if (xxdialogMode) return;
2153 + setDialogMode(2, "Verwijder apparaat", 3, p10showDeleteNodeDialogEx, format("Verwijder {0}?", EscapeHtml(currentNode.name)) + '<br /><br /><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />' + "Bevestig", nodeid);
2154 + p10validateDeleteNodeDialog();
2155 + }
2156 +
2157 + function p10validateDeleteNodeDialog() {
2158 + QE('idx_dlgOkButton', Q('p10check').checked);
2159 + }
2160 +
2161 + function p10showDeleteNodeDialogEx(buttons, nodeid) {
2162 + meshserver.send({ action: 'removedevices', nodeids: [nodeid] });
2163 + }
2164 +
2165 + function p10showiconselector() {
2166 + if (xxdialogMode) return;
2167 + var mesh = meshes[currentNode.meshid];
2168 + var meshrights = mesh.links[userinfo._id].rights;
2169 + if ((meshrights & 4) == 0) return;
2170 +
2171 + var x = '<table align=center><td>';
2172 + x += '<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>';
2173 + x += '<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>';
2174 + x += '<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br>';
2175 + x += '<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>';
2176 + x += '<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>';
2177 + x += '<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>';
2178 + setDialogMode(2, "Pictogram selectie", 0, null, x);
2179 + QV('id_dialogclose', true);
2180 + }
2181 +
2182 + function p10setIcon(icon) {
2183 + setDialogMode(0);
2184 + meshserver.send({ action: 'changedevice', nodeid: currentNode._id, icon: icon });
2185 + }
2186 +
2187 + var showEditNodeValueDialog_modes = ["Apparaat naam", "Hostname", "Omschrijving", "Tags"];
2188 + var showEditNodeValueDialog_modes2 = ['name', 'host', 'desc', 'tags'];
2189 + var showEditNodeValueDialog_modes3 = ['', '', '', "Groep1, Groep2, Groep3"];
2190 + function showEditNodeValueDialog(mode) {
2191 + if (xxdialogMode) return;
2192 + var x = addHtmlValue(showEditNodeValueDialog_modes[mode], '<input id=dp10devicevalue style=width:170px maxlength=64 placeholder="' + showEditNodeValueDialog_modes3[mode] + '" onchange=p10editdevicevalueValidate(' + mode + ',event) onkeyup=p10editdevicevalueValidate(' + mode + ',event) />');
2193 + setDialogMode(2, "Bewerk apparaat", 3, showEditNodeValueDialogEx, x, mode);
2194 + var v = currentNode[showEditNodeValueDialog_modes2[mode]];
2195 + if (v == null) v = '';
2196 + if (Array.isArray(v)) { v = v.join(', '); }
2197 + Q('dp10devicevalue').value = v;
2198 + p10editdevicevalueValidate();
2199 + Q('dp10devicevalue').focus();
2200 + }
2201 +
2202 + function showEditNodeValueDialogEx(button, mode) {
2203 + var x = { action: 'changedevice', nodeid: currentNode._id };
2204 + x[showEditNodeValueDialog_modes2[mode]] = Q('dp10devicevalue').value;
2205 + meshserver.send(x);
2206 + }
2207 +
2208 + function p10editdevicevalueValidate(mode, e) {
2209 + var x = ((mode > 1) || (Q('dp10devicevalue').value.length > 0));
2210 + QE('idx_dlgOkButton', x);
2211 + if ((e != null) && (x == true) && (e.keyCode == 13)) { dialogclose(1); }
2212 + }
2213 +
2214 + //
2215 + // DESKTOP
2216 + //
2217 +
2218 + var desktop;
2219 + var desktopNode;
2220 + var desktopsettings = { encoding: 2, showfocus: false, showmouse: true, showcad: true, quality: 40, scaling: 1024, framerate: 50 };
2221 + function setupDesktop() {
2222 + // Setup the remote desktop
2223 + if ((desktopNode != currentNode) && (desktop != null)) { desktop.Stop(); desktopNode = null; desktop = null; }
2224 +
2225 + // If the device desktop is already connected in multi-desktop, use that.
2226 + if ((desktopNode != currentNode) || (desktop == null)) {
2227 + // Device is not already connected, just setup a blank canvas
2228 + QH('DeskParent', '<canvas id=Desk width=640 height=200 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>');
2229 + desktopNode = currentNode;
2230 + // Setup the mouse wheel
2231 + Q('Desk').addEventListener('DOMMouseScroll', function (e) { return dmousewheel(e); });
2232 + Q('Desk').addEventListener('mousewheel', function (e) { return dmousewheel(e); });
2233 + }
2234 + desktopNode = currentNode;
2235 + updateDesktopButtons();
2236 +
2237 + // On some browsers like IE, we can't save screen shots. Hide the scheenshot/capture buttons.
2238 + if (!Q('Desk')['toBlob']) { QV('deskSaveBtn', false); }
2239 + }
2240 +
2241 + // Show and enable the right buttons
2242 + function updateDesktopButtons() {
2243 + var mesh = meshes[currentNode.meshid];
2244 + var deskState = 0;
2245 + if (desktop != null) { deskState = desktop.State; }
2246 + var meshrights = mesh.links[userinfo._id].rights;
2247 +
2248 + // Show the right buttons
2249 + QV('disconnectbutton1', (deskState != 0));
2250 + QV('connectbutton1', (deskState == 0) && (mesh.mtype == 2) && ((meshrights & 8) || (meshrights & 256)));
2251 + QV('connectbutton1h',
2252 + (deskState == 0) &&
2253 + (meshrights & 8) &&
2254 + ((mesh.mtype == 1) ||
2255 + (currentNode.intelamt != null) &&
2256 + ((currentNode.intelamt.state == 2) &&
2257 + (currentNode.intelamt.ver != null) &&
2258 + (typeof currentNode.intelamt.sku == 'number') &&
2259 + ((currentNode.intelamt.sku & 8) != 0))
2260 + )
2261 + );
2262 +
2263 + // Show the right settings
2264 + QV('d7amtkvm', (currentNode.intelamt != null && ((currentNode.intelamt.ver != null) || (mesh.mtype == 1))) && ((deskState == 0) || (desktop.contype == 2)));
2265 + QV('d7meshkvm', (mesh.mtype == 2) && ((deskState == false) || (desktop.contype == 1)));
2266 +
2267 + // Enable buttons
2268 + var online = ((currentNode.conn & 1) != 0); // If Agent (1) connected, enable remote desktop
2269 + QE('connectbutton1', online);
2270 + var hwonline = ((currentNode.conn & 6) != 0); // If CIRA (2) or AMT (4) connected, enable hardware terminal
2271 + QE('connectbutton1h', hwonline);
2272 + //QE('deskSaveBtn', deskState == 3);
2273 + //QV('DeskCAD', meshrights & 8);
2274 + //QE('DeskCAD', deskState == 3);
2275 + //QV('DeskWD', (currentNode.agent) && (currentNode.agent.id < 5));
2276 + //QE('DeskWD', deskState == 3);
2277 + //QV('deskkeys', (currentNode.agent) && (currentNode.agent.id < 5));
2278 + //QE('deskkeys', deskState == 3);
2279 + //QE('DeskToolsButton', online);
2280 + QV('DeskToastButton', ((meshrights & 16384) != 0) && (currentNode.agent) && (currentNode.agent.id < 5) && (meshrights & 8));
2281 + //QE('DeskToastButton', online);
2282 + QV('deskActionsBtn', meshrights & 8);
2283 + Q('DeskControl').checked = ((meshrights & 8) != 0);
2284 + if (online == false) QV('DeskTools', false);
2285 + }
2286 +
2287 + function connectDesktop(e, contype) {
2288 + setSessionActivity();
2289 + if (desktop == null) {
2290 + desktopNode = currentNode;
2291 + if (contype == 2) {
2292 + // Setup the Intel AMT remote desktop
2293 + if ((desktopNode.intelamt.user == null) || (desktopNode.intelamt.user == '')) { editDeviceAmtSettings(desktopNode._id, connectDesktop); return; }
2294 + desktop = CreateAmtRedirect(CreateAmtRemoteDesktop('Desk'), authCookie);
2295 + desktop.debugmode = debugmode;
2296 + desktop.onStateChanged = onDesktopStateChange;
2297 + desktop.m.bpp = (desktopsettings.encoding == 1 || desktopsettings.encoding == 3) ? 1 : 2;
2298 + desktop.m.useZRLE = (desktopsettings.encoding < 3);
2299 + desktop.m.showmouse = desktopsettings.showmouse;
2300 + desktop.m.onScreenSizeChange = deskAdjust;
2301 + desktop.Start(desktopNode._id, 16994, '*', '*', 0);
2302 + desktop.contype = 2;
2303 + } else {
2304 + // Setup the Mesh Agent remote desktop
2305 + desktop = CreateAgentRedirect(meshserver, CreateAgentRemoteDesktop('Desk'), serverPublicNamePort, authCookie, authRelayCookie, domainUrl);
2306 + desktop.debugmode = debugmode;
2307 + desktop.m.debugmode = debugmode;
2308 + desktop.attemptWebRTC = attemptWebRTC;
2309 + desktop.onStateChanged = onDesktopStateChange;
2310 + desktop.m.CompressionLevel = desktopsettings.quality; // Number from 1 to 100. 50 or less is best.
2311 + desktop.m.ScalingLevel = desktopsettings.scaling;
2312 + desktop.m.FrameRateTimer = desktopsettings.framerate;
2313 + desktop.m.onDisplayinfo = deskDisplayInfo;
2314 + desktop.m.onScreenSizeChange = deskAdjust;
2315 + desktop.Start(desktopNode._id);
2316 + desktop.contype = 1;
2317 + }
2318 + } else {
2319 + // Disconnect and clean up the remote desktop
2320 + desktop.Stop();
2321 + desktopNode = desktop = null;
2322 + }
2323 + }
2324 +
2325 + function onDesktopStateChange(xdesktop, state) {
2326 + var xstate = state;
2327 + if ((xstate == 3) && (xdesktop.contype == 2)) { xstate++; }
2328 + var str = StatusStrs[xstate];
2329 + if ((desktop != null) && (desktop.webRtcActive == true)) { str += ", WebRTC"; }
2330 + //if (desktop.m.stopInput == true) { str += ', Loopback'; }
2331 + QH('deskstatus', str);
2332 + switch (state) {
2333 + case 0:
2334 + // Disconnect and clean up the remote desktop
2335 + desktop.Stop();
2336 + desktopNode = desktop = null;
2337 + QV('termdisplays', false);
2338 + if (fullscreen == true) { deskToggleFull(); }
2339 + break;
2340 + case 2:
2341 + break;
2342 + default:
2343 + //console.log('Unknown onDesktopStateChange state', state);
2344 + break;
2345 + }
2346 + updateDesktopButtons();
2347 + deskAdjust();
2348 + setTimeout(deskAdjust, 50);
2349 + }
2350 +
2351 + function showDesktopSettings() {
2352 + if (xxdialogMode) return;
2353 + applyDesktopSettings();
2354 + updateDesktopButtons();
2355 + setDialogMode(7, "Instellingen extern bureaublad", 3, showDesktopSettingsChanged);
2356 + }
2357 +
2358 + function showDesktopSettingsChanged() {
2359 + desktopsettings.encoding = d7desktopmode.value;
2360 + desktopsettings.showfocus = d7showfocus.checked;
2361 + desktopsettings.showmouse = d7showcursor.checked;
2362 + desktopsettings.quality = d7bitmapquality.value;
2363 + desktopsettings.scaling = d7bitmapscaling.value;
2364 + desktopsettings.framerate = d7framelimiter.value;
2365 + localStorage.setItem('desktopsettings', JSON.stringify(desktopsettings));
2366 + applyDesktopSettings();
2367 + if (desktop) {
2368 + if (desktop.contype == 1) {
2369 + if (desktop.State != 0) { desktop.m.SendCompressionLevel(1, desktopsettings.quality, desktopsettings.scaling, desktopsettings.framerate); }
2370 + }
2371 + if (desktop.contype == 2) {
2372 + if (desktop.State != 0) { desktop.Stop(); setTimeout(function () { connectDesktop(null, 2); }, 50); }
2373 + }
2374 + }
2375 + }
2376 +
2377 + function applyDesktopSettings() {
2378 + var r = '', ops = (features & 512) ? [90, 70, 50, 40, 30, 20, 10, 5, 1] : [50, 40, 30, 20, 10, 5, 1];
2379 + for (var i in ops) { r += '<option value=' + ops[i] + '>' + ops[i] + '%</option>'; }
2380 + QH('d7bitmapquality', r);
2381 + d7desktopmode.value = desktopsettings.encoding;
2382 + d7showfocus.checked = desktopsettings.showfocus;
2383 + d7showcursor.checked = desktopsettings.showmouse;
2384 + d7bitmapquality.value = 40; // Default value
2385 + if (ops.indexOf(parseInt(desktopsettings.quality)) >= 0) { d7bitmapquality.value = desktopsettings.quality; }
2386 + d7bitmapscaling.value = desktopsettings.scaling;
2387 + if (desktopsettings.framerate) { d7framelimiter.value = desktopsettings.framerate; }
2388 + }
2389 +
2390 + var fullscreen = false;
2391 + /*
2392 + function deskToggleFull() {
2393 + fullscreen = !fullscreen;
2394 + QV('mastheadx', !fullscreen);
2395 + QV('masthead', !fullscreen);
2396 + QV('topbar', !fullscreen);
2397 + QV('p11deviceNameHeader', !fullscreen);
2398 + QV('footer', !fullscreen);
2399 + QV('column_l_bottomgap', !fullscreen);
2400 + QV('idx_deskFullBtn2', fullscreen);
2401 + QV('deskFullBtn', !fullscreen);
2402 + if (fullscreen) {
2403 + QS('container').width = '100%';
2404 + QS('container')['border-right'] = '0';
2405 + QS('container')['border-left'] = '0';
2406 + QS('column_l').padding = '0';
2407 + QS('column_l').width = '100%';
2408 + } else {
2409 + QS('container').width = '960px';
2410 + QS('container')['border-right'] = '1px solid #b7b7b7';
2411 + QS('container')['border-left'] = '1px solid #b7b7b7';
2412 + QS('column_l').padding = '0 15px';
2413 + QS('column_l').width = '930px';
2414 + toggleFullScreen();
2415 + }
2416 + deskAdjust();
2417 + }
2418 + */
2419 +
2420 + function deskAdjust() {
2421 + var x = (Q('DeskParent').clientHeight - Q('Desk').clientHeight) / 2;
2422 + if (x < 0) {
2423 + var mh = Q('DeskParent').clientHeight, mw = 9999;
2424 + if (desktop) { mw = (desktop.m.width / desktop.m.height) * mh; }
2425 + QS('Desk')['max-height'] = mh + 'px';
2426 + QS('Desk')['max-width'] = mw + 'px';
2427 + x = 0;
2428 + } else {
2429 + QS('Desk')['max-height'] = null;
2430 + QS('Desk')['max-width'] = null;
2431 + }
2432 + QS('Desk')['margin-top'] = x + 'px';
2433 + QS('Desk')['margin-bottom'] = x + 'px';
2434 + }
2435 +
2436 + // Remote desktop special key combos for Windows
2437 + function deskSendKeys() {
2438 + if (xxdialogMode || desktop == null || desktop.State != 3) return;
2439 + var ks = Q('deskkeys').value;
2440 + if (ks == 0) { // WIN+Down arrow
2441 + if (desktop.contype == 2) {
2442 + desktop.m.sendkey([[0xffe7, 1], [0xff54, 1], [0xff54, 0], [0xffe7, 0]]); // Intel AMT: Meta-left down, Down arrow press, Down arrow release, Meta-left release
2443 + } else {
2444 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 0x5B], [desktop.m.KeyAction.DOWN, 40], [desktop.m.KeyAction.UP, 40], [desktop.m.KeyAction.EXUP, 0x5B]]); // Agent: L-Winkey press, Down arrow press, Down arrow release, L-Winkey release
2445 + }
2446 + } else if (ks == 1) { // WIN+Up arrow
2447 + if (desktop.contype == 2) {
2448 + desktop.m.sendkey([[0xffe7, 1], [0xff52, 1], [0xff52, 0], [0xffe7, 0]]); // Intel AMT: Meta-left down, Up arrow press, Up arrow release, Meta-left release
2449 + } else {
2450 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 0x5B], [desktop.m.KeyAction.DOWN, 38], [desktop.m.KeyAction.UP, 38], [desktop.m.KeyAction.EXUP, 0x5B]]); // MeshAgent: L-Winkey press, Up arrow press, Up arrow release, L-Winkey release
2451 + }
2452 + } else if (ks == 2) { // WIN+L arrow
2453 + if (desktop.contype == 2) {
2454 + desktop.m.sendkey([[0xffe7, 1], [0x6c, 1], [0x6c, 0], [0xffe7, 0]]); // Intel AMT: Meta-left down, 'l' press, 'l' release, Meta-left release
2455 + } else {
2456 + desktop.sendCtrlMsg('{"action":"lock"}');
2457 + //desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,0x5B],[desktop.m.KeyAction.DOWN,76],[desktop.m.KeyAction.UP,76],[desktop.m.KeyAction.EXUP,0x5B]]); // MeshAgent: L-Winkey press, 'L' press, 'L' release, L-Winkey release
2458 + //desktop.m.SendKeyMsgKC(desktop.m.KeyAction.EXDOWN, 0x5B);
2459 + //desktop.m.SendKeyMsgKC(desktop.m.KeyAction.DOWN, 76);
2460 + //desktop.m.SendKeyMsgKC(desktop.m.KeyAction.UP, 76);
2461 + //desktop.m.SendKeyMsgKC(desktop.m.KeyAction.EXUP, 0x5B);
2462 + }
2463 + } else if (ks == 3) { // WIN+M arrow
2464 + if (desktop.contype == 2) {
2465 + desktop.m.sendkey([[0xffe7, 1], [0x6d, 1], [0x6d, 0], [0xffe7, 0]]); // Intel AMT: Meta-left down, 'm' press, 'm' release, Meta-left release
2466 + } else {
2467 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 0x5B], [desktop.m.KeyAction.DOWN, 77], [desktop.m.KeyAction.UP, 77], [desktop.m.KeyAction.EXUP, 0x5B]]); // MeshAgent: L-Winkey press, 'M' press, 'M' release, L-Winkey release
2468 + }
2469 + } else if (ks == 4) { // Shift+WIN+M arrow
2470 + if (desktop.contype == 2) {
2471 + desktop.m.sendkey([[0xffe1, 1], [0xffe7, 1], [0x6d, 1], [0x6d, 0], [0xffe7, 0], [0xffe1, 0]]); // Intel AMT: Shift-left down, Meta-left down, 'm' press, 'm' release, Meta-left release, Shift-left release
2472 + } else {
2473 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN, 16], [desktop.m.KeyAction.EXDOWN, 0x5B], [desktop.m.KeyAction.DOWN, 77], [desktop.m.KeyAction.UP, 77], [desktop.m.KeyAction.EXUP, 0x5B], [desktop.m.KeyAction.UP, 16]]); // MeshAgent: L-shift press, L-Winkey press, 'M' press, 'M' release, L-Winkey release, L-shift release
2474 + }
2475 + } else if (ks == 5) { // WIN
2476 + if (desktop.contype == 2) {
2477 + desktop.m.sendkey([[0xffe7, 1], [0xffe7, 0]]); // Intel AMT: Meta-left down, Meta-left release
2478 + } else {
2479 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 0x5B], [desktop.m.KeyAction.EXUP, 0x5B]]); // MeshAgent: L-Winkey press, L-Winkey release
2480 + }
2481 + } else if (ks == 6) { // WIN+R
2482 + if (desktop.contype == 2) {
2483 + desktop.m.sendkey([[0xffe7, 1], [0x72, 1], [0x72, 0], [0xffe7, 0]]); // Intel AMT: Meta-left down, 'r' press, 'r' release, Meta-left release
2484 + } else {
2485 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 0x5B], [desktop.m.KeyAction.DOWN, 82], [desktop.m.KeyAction.UP, 82], [desktop.m.KeyAction.EXUP, 0x5B]]); // MeshAgent: L-Winkey press, 'R' press, 'R' release, L-Winkey release
2486 + }
2487 + } else if (ks == 7) { // ALT-F4
2488 + if (desktop.contype == 2) {
2489 + desktop.m.sendkey([[0xffe9, 1], [0xffc1, 1], [0xffc1, 0], [0xffe9, 0]]); // Intel AMT: Alt down, 'F4' press, 'F4' release, Alt release
2490 + } else {
2491 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 18], [desktop.m.KeyAction.DOWN, 115], [desktop.m.KeyAction.UP, 115], [desktop.m.KeyAction.EXUP, 18]]); // MeshAgent: Alt press, 'F4' press, 'F4' release, Alt release
2492 + }
2493 + } else if (ks == 8) { // CTRL-W
2494 + if (desktop.contype == 2) {
2495 + desktop.m.sendkey([[0xffe3, 1], [0x77, 1], [0x77, 0], [0xffe3, 0]]); // Intel AMT: Ctrl down, 'w' press, 'w' release, Ctrl release
2496 + } else {
2497 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 17], [desktop.m.KeyAction.DOWN, 87], [desktop.m.KeyAction.UP, 87], [desktop.m.KeyAction.EXUP, 17]]); // MeshAgent: Ctrl press, 'W' press, 'W' release, Ctrl release
2498 + }
2499 + } else if (ks == 9) { // ALT-TAB
2500 + if (desktop.contype == 2) {
2501 + desktop.m.sendkey([[0xffe9, 1], [0xff09, 1], [0xff09, 0], [0xffe9, 0]]); // Intel AMT: Alt down, 'TAB' press, 'TAB' release, Alt release
2502 + } else {
2503 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN, 18], [desktop.m.KeyAction.DOWN, 9], [desktop.m.KeyAction.UP, 9], [desktop.m.KeyAction.EXUP, 18]]); // MeshAgent: Alt press, 'TAB' press, 'TAB' release, Alt release
2504 + }
2505 + } else if (ks == 10) { // CTRL-ALT-DEL
2506 + desktop.m.sendcad();
2507 + } else if (ks == 11) { // TAB
2508 + if (desktop.contype == 2) {
2509 + desktop.m.sendkey([[0xff09, 1], [0xff09, 0]]); // Intel AMT: 'TAB' press, 'TAB' release
2510 + } else {
2511 + desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN, 9], [desktop.m.KeyAction.UP, 9]]); // MeshAgent: 'TAB' press, 'TAB' release
2512 + }
2513 + }
2514 + }
2515 +
2516 + function sendSpecialKeys() {
2517 + if (xxdialogMode || desktop == null || desktop.State != 3) return;
2518 + setDialogMode(3, "Speciale toetsen", 3, deskSendKeys);
2519 + }
2520 +
2521 + // Send CTRL-ALT-DEL
2522 + /*
2523 + function sendCAD() {
2524 + if (xxdialogMode || desktop == null || desktop.State != 3) return;
2525 + desktop.m.sendcad();
2526 + }
2527 + */
2528 +
2529 + // Toggle soft keyboard
2530 + function toggleSoftKeys(x) {
2531 + QV('DeskSoftInput', x == 1);
2532 + if (x == 1) { Q('DeskSoftInput').focus(); }
2533 + }
2534 +
2535 + // Show process dialogs
2536 + function toggleDeskTools() {
2537 + setSessionActivity();
2538 + if (xxdialogMode) return;
2539 + if (QS('DeskTools').display == 'none') {
2540 + QV('DeskTools', true);
2541 + Q('DeskTools').nodeid = currentNode._id;
2542 + refreshDeskTools();
2543 + } else {
2544 + QV('DeskTools', false);
2545 + }
2546 + }
2547 +
2548 + // Refresh all of the desktop tool panels
2549 + function refreshDeskTools() {
2550 + setSessionActivity();
2551 + QV('DeskToolsRefreshButton', false);
2552 + setTimeout(refreshDeskToolsEx, 500);
2553 + meshserver.send({ action: 'msg', type: 'ps', nodeid: currentNode._id });
2554 + }
2555 + function refreshDeskToolsEx() { QV('DeskToolsRefreshButton', true); }
2556 + var deskTools = { sort: 1, msg: null };
2557 + function sortProcess(sort) { deskTools.sort = sort; showDeskToolsProcesses(deskTools.msg); }
2558 + function sortProcessPid(a, b) { if (a.p > b.p) return 1; if (a.p < b.p) return (-1); return 0; }
2559 + function sortProcessName(a, b) { if (a.d > b.d) return 1; if (a.d < b.d) return (-1); return 0; }
2560 + function showDeskToolsProcesses(message) {
2561 + deskTools.msg = message;
2562 + if (message == null) { QH('DeskToolsProcesses', ''); return; }
2563 + if (Q('DeskTools').nodeid != message.nodeid) return;
2564 + var p = [], processes = null;
2565 + try { processes = JSON.parse(message.value); } catch (e) { }
2566 + console.log(processes);
2567 + if (processes != null) {
2568 + for (var pid in processes) { p.push({ p: parseInt(pid), c: processes[pid].cmd, d: processes[pid].cmd.toLowerCase(), u: processes[pid].user }); }
2569 + if (deskTools.sort == 0) { p.sort(sortProcessPid); } else if (deskTools.sort == 1) { p.sort(sortProcessName); }
2570 + var x = '';
2571 + for (var i in p) { if (p[i].p != 0) { x += '<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>' + p[i].p + '</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess(' + p[i].p + ',"' + p[i].c + '")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>' + (p[i].u ? p[i].u : '') + '</div><div>' + p[i].c + '</div></div>'; } }
2572 + QH('DeskToolsProcesses', x);
2573 + }
2574 + }
2575 +
2576 + // Save the desktop image to file
2577 + function deskSaveImage() {
2578 + setSessionActivity();
2579 + if (xxdialogMode || desktop == null || desktop.State != 3) return;
2580 + var d = new Date(), n = 'Desktop-' + currentNode.name + '-' + d.getFullYear() + '-' + ('0' + (d.getMonth() + 1)).slice(-2) + '-' + ('0' + d.getDate()).slice(-2) + "-" + ("0" + d.getHours()).slice(-2) + '-' + ('0' + d.getMinutes()).slice(-2);
2581 + Q('Desk')['toBlob'](function (blob) { saveAs(blob, n + '.jpg'); });
2582 + }
2583 +
2584 + function deskDisplayInfo(sender, info, selDisplay, selItem) {
2585 + var txt = Q('termdisplays').value;
2586 + if (info.length > 0) { var options = ''; for (var x in info) { options += '<option' + ((txt == info[x]) ? ' selected' : '') + '>' + info[x] + '</option>'; } QH('termdisplays', options); }
2587 + QV('termdisplays', info.length > 0);
2588 + }
2589 +
2590 + function deskGetDisplayNumbers(e) { desktop.m.GetDisplayNumbers(); }
2591 +
2592 + function deskSetDisplay(e) {
2593 + setSessionActivity();
2594 + var display = 0, txt = Q('termdisplays').value;
2595 + if (txt == "alle schermen") display = 65535; else display = parseInt(txt.substring(8));
2596 + desktop.m.SetDisplay(display);
2597 + }
2598 +
2599 + function dmousedown(e) { setSessionActivity(); if ((!xxdialogMode && desktop != null)) desktop.m.mousedown(e) }
2600 + function dmouseup(e) { setSessionActivity(); if ((!xxdialogMode && desktop != null)) desktop.m.mouseup(e) }
2601 + function dmousemove(e) { setSessionActivity(); if ((!xxdialogMode && desktop != null)) desktop.m.mousemove(e) }
2602 + function dmousewheel(e) { setSessionActivity(); if ((!xxdialogMode && desktop != null) && desktop.m.mousewheel) { desktop.m.mousewheel(e); haltEvent(e); return true; } return false; }
2603 + function drotate(x) { if (!xxdialogMode && desktop != null) { desktop.m.setRotation(desktop.m.rotation + x); deskAdjust(); deskAdjust(); } }
2604 + function stopProcess(id, name) { setDialogMode(2, "Proces controle", 3, stopProcessEx, format("Stop process #{0} \"{1}\"?", id, name), id); return false; }
2605 + function stopProcessEx(buttons, tag) { meshserver.send({ action: 'msg', type: 'pskill', nodeid: currentNode._id, value: tag }); setTimeout(refreshDeskTools, 300); }
2606 +
2607 + //
2608 + // FILES
2609 + //
2610 +
2611 + var filesNode;
2612 + function setupFiles() {
2613 + // Setup the files tab
2614 + var samenode = (filesNode == currentNode);
2615 + filesNode = currentNode;
2616 + var online = ((filesNode.conn & 1) != 0) ? true : false; // If Agent (1) connected, enable Terminal
2617 + QE('p13Connect', online);
2618 + if (((samenode == false) || (online == false)) && files) { files.Stop(); files = null; }
2619 + }
2620 +
2621 + function onFilesStateChange(xfiles, state) {
2622 + setSessionActivity();
2623 + p13Connect.value = (state == 0) ? "Verbinden" : "Verbreken";
2624 + var str = StatusStrs[state];
2625 + if (files.webRtcActive == true) { str += ", WebRTC"; }
2626 + Q('p13Status').textContent = str;
2627 + switch (state) {
2628 + case 0:
2629 + // Disconnected, clear the files
2630 + QH('p13files', '');
2631 + p13filetree = null;
2632 + p13filetreelocation = [];
2633 + QH('p13currentpath', '');
2634 + QE('p13FolderUp', false);
2635 + p13setActions();
2636 + if (files != null) { files.Stop(); files = null; }
2637 + break;
2638 + case 3:
2639 + p13targetpath = '';
2640 + files.sendText({ action: 'ls', reqid: 1, path: '' });
2641 + break;
2642 + default:
2643 + //console.log('Unknown onFilesStateChange state', state);
2644 + break;
2645 + }
2646 + }
2647 +
2648 + function CreateRemoteFiles(onFileUpdate) {
2649 + var obj = { protocol: 5 };
2650 + obj.onFileUpdate = onFileUpdate;
2651 + obj.xxStateChange = function (state) { }
2652 + obj.ProcessData = function (data) { obj.onFileUpdate(data); }
2653 + return obj;
2654 + }
2655 +
2656 + // Debug Only
2657 + var autoConnectFilesTimer = null;
2658 + function autoConnectFiles(e) { if (autoConnectFilesTimer == null) { autoConnectFilesTimer = setInterval(connectFiles, 100); } else { clearInterval(autoConnectFilesTimer); autoConnectFilesTimer = null; } }
2659 +
2660 + function connectFiles(e) {
2661 + if (!files) {
2662 + // Setup a mesh agent files
2663 + files = CreateAgentRedirect(meshserver, CreateRemoteFiles(p13gotFiles), serverPublicNamePort, authCookie, authRelayCookie, domainUrl);
2664 + files.attemptWebRTC = attemptWebRTC;
2665 + files.onStateChanged = onFilesStateChange;
2666 + files.Start(filesNode._id);
2667 + } else {
2668 + //QH('Term', '');
2669 + files.Stop();
2670 + files = null;
2671 + }
2672 + p13clipboard = p13clipboardFolder = null;
2673 + p13clipboardCut = 0;
2674 + p13updateClipview();
2675 + }
2676 +
2677 + var p13filetree = null;
2678 + var p13targetpath = null;
2679 + var p13filetreelocation = [];
2680 +
2681 + function p13gotFiles(data) {
2682 + setSessionActivity();
2683 + //console.log('p13gotFiles', data);
2684 + if ((data.length > 0) && (data.charCodeAt(0) != 123)) { p13gotDownloadBinaryData(data); return; }
2685 + //console.log('p13gotFiles', data);
2686 + data = JSON.parse(decode_utf8(data));
2687 + if (data.action == 'download') { p13gotDownloadCommand(data); return; }
2688 + data.path = data.path.replace(/\//g, "\\");
2689 + if ((p13filetree != null) && (data.path == p13filetree.path)) {
2690 + // This is an update to the same folder
2691 + var checkedNames = p13getCheckedNames();
2692 + p13filetree = data;
2693 + p13updateFiles(checkedNames);
2694 + } else {
2695 + // Make both paths use the same seperator not start with /
2696 + var x1 = data.path.replace(/\//g, "\\"), x2 = p13targetpath.replace(/\//g, "\\");
2697 + while ((x1.length > 0) && (x1[0] == '\\')) { x1 = x1.substring(1); }
2698 + while ((x2.length > 0) && (x2[0] == '\\')) { x2 = x2.substring(1); }
2699 + if ((x1 == x2) || ((data.path == '\\') && (p13targetpath == ''))) {
2700 + // This is a different folder
2701 + p13filetree = data;
2702 + p13updateFiles();
2703 + }
2704 + }
2705 + }
2706 +
2707 + function p13getCheckedNames() {
2708 + // Save all existing checked boxes
2709 + var checkedNames = [], checkboxes = document.getElementsByName('fd');
2710 + for (var i = 0; i < checkboxes.length; i++) { if (checkboxes[i].checked) { checkedNames.push(p13filetree.dir[checkboxes[i].value].n) }; }
2711 + return checkedNames;
2712 + }
2713 +
2714 + function p13updateFiles(checkedNames) {
2715 + var html1 = '', html2 = '', displayPath = '<a style=cursor:pointer onclick=p13folderup(0)>' + "Root" + '</a>', fullPath = 'Root';
2716 +
2717 + // Work on parsing the file path
2718 + var x = p13filetree.path.split('\\');
2719 + p13filetreelocation = [];
2720 + for (var i in x) { if (x[i] != '') { p13filetreelocation.push(x[i]); } } // Remove empty spaces
2721 + for (var i in p13filetreelocation) { displayPath += ' / <a style=cursor:pointer onclick=p13folderup(' + (parseInt(i) + 1) + ')>' + p13filetreelocation[i] + '</a>' } // Setup the path we display
2722 + var newlinkpath = p13filetreelocation.join('/');
2723 +
2724 + // Sort the files
2725 + var filetreexx = p13sort_files(p13filetree.dir);
2726 +
2727 + // Display all files and folders at this location
2728 + for (var i in filetreexx) {
2729 + // Figure out the name and shortname
2730 + var f = filetreexx[i], name = f.n, shortname;
2731 + shortname = name;
2732 + if (name.length > 70) { shortname = EscapeHtml(name.substring(0, 70)) + "..."; } else { shortname = EscapeHtml(name); }
2733 + name = EscapeHtml(name);
2734 +
2735 + // Figure out the size
2736 + var fsize = '';
2737 + if (f.s != null) { fsize = getFileSizeStr(f.s); }
2738 +
2739 + var h = '';
2740 + if (f.t < 3) {
2741 + var right = '';
2742 + h = '<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value=\'' + f.nx + '\'>&nbsp;<span style=float:right>' + right + '</span><span><div class=fileIcon' + f.t + '></div><a style=cursor:pointer onclick=p13folderset(\"' + encodeURIComponent(f.nx) + '\")>' + shortname + '</a></span></div>';
2743 + } else {
2744 + var link = shortname;
2745 + if (f.s > 0) { link = '<a rel=\"noreferrer noopener\" target=\"_blank\" style=cursor:pointer onclick=\"p13downloadfile(\'' + encodeURIComponent(newlinkpath + '/' + name) + '\',\'' + encodeURIComponent(name) + '\',' + f.s + ')\">' + shortname + '</a>'; }
2746 + h = '<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value=\'' + f.nx + '\'>&nbsp;<span style=float:right;padding-right:4px>' + fsize + '</span><span><div class=fileIcon' + f.t + '></div>' + link + '</span></div>';
2747 + }
2748 +
2749 + if (f.t < 3) { html1 += h; } else { html2 += h; }
2750 + }
2751 +
2752 + // Display the files and path
2753 + QH('p13files', html1 + html2);
2754 + QH('p13currentpath', displayPath);
2755 + QE('p13FolderUp', p13filetreelocation.length != 0);
2756 +
2757 + // Re-check all boxes if needed using names
2758 + if (checkedNames != null) { var checkboxes = document.getElementsByName('fd'); for (var i = 0; i < checkboxes.length; i++) { if (checkedNames.indexOf(p13filetree.dir[checkboxes[i].value].n) >= 0) { checkboxes[i].checked = true; } } }
2759 +
2760 + // Update the actions buttons
2761 + p13setActions();
2762 + }
2763 +
2764 + function p13folderset(x) {
2765 + p13targetpath = joinPaths(p13filetree.path, p13filetree.dir[x].n).split('\\').join('/');
2766 + files.sendText({ action: 'ls', reqid: 1, path: p13targetpath });
2767 + }
2768 +
2769 + function p13folderup(x) {
2770 + if (x == null) { p13filetreelocation.pop(); } else { while (p13filetreelocation.length > x) { p13filetreelocation.pop(); } }
2771 + p13targetpath = p13filetreelocation.join('/');
2772 + files.sendText({ action: 'ls', reqid: 1, path: p13targetpath });
2773 + }
2774 +
2775 + var p13sortorder;
2776 + function p13sort_filename(a, b) { if (a.ln > b.ln) return (1 * p13sortorder); if (a.ln < b.ln) return (-1 * p13sortorder); return 0; }
2777 + function p13sort_timestamp(a, b) { if (a.d > b.d) return (1 * p13sortorder); if (a.d < b.d) return (-1 * p13sortorder); return 0; }
2778 + function p13sort_bysize(a, b) { if (a.s == b.s) return p13sort_filename(a, b); return (((a.s - b.s)) * p13sortorder); }
2779 +
2780 + function p13sort_files(files) {
2781 + var r = [], sortselection = Q('p13sortdropdown').value;
2782 + for (var i in files) { files[i].nx = i; if (files[i].s == null) { files[i].s = 0; } if (files[i].n == null) { files[i].n = i; } files[i].ln = files[i].n.toLowerCase(); r.push(files[i]); }
2783 + p13sortorder = 1;
2784 + if (sortselection > 3) { p13sortorder = -1; sortselection -= 3; }
2785 + if (sortselection == 1) { r.sort(p13sort_filename); }
2786 + else if (sortselection == 2) { r.sort(p13sort_bysize); }
2787 + else if (sortselection == 3) { r.sort(p13sort_timestamp); }
2788 + return r;
2789 + }
2790 +
2791 + function p13setActions() {
2792 + if (p13filetree == null) {
2793 + QE('p13DeleteFileButton', false);
2794 + QE('p13NewFolderButton', false);
2795 + QE('p13UploadButton', false);
2796 + QE('p13RenameFileButton', false);
2797 + QE('p13SelectAllButton', false);
2798 + Q('p13SelectAllButton').value = "alles";
2799 + QE('p13RefreshButton', false);
2800 + QE('p13CutButton', false);
2801 + QE('p13CopyButton', false);
2802 + QE('p13PasteButton', false);
2803 + } else {
2804 + var cc = p13getFileSelCount(), tc = p13getFileCount(), sfc = p13getFileSelCount(false); // In order: number of entires selected, number of total entries, number of selected entires that are files (not folders)
2805 + var winAgent = ((currentNode.agent.id > 0) && (currentNode.agent.id < 5));
2806 + QE('p13DeleteFileButton', (cc > 0) && ((p13filetreelocation.length > 0) || (winAgent == false)));
2807 + QE('p13NewFolderButton', ((p13filetreelocation.length > 0) || (winAgent == false)));
2808 + QE('p13UploadButton', ((p13filetreelocation.length > 0) || (winAgent == false)));
2809 + QE('p13RenameFileButton', (cc == 1) && ((p13filetreelocation.length > 0) || (winAgent == false)));
2810 + QE('p13SelectAllButton', tc > 0);
2811 + Q('p13SelectAllButton').value = (cc > 0 ? "Geen" : "alles");
2812 + QE('p13RefreshButton', true);
2813 + QE('p13CutButton', (cc > 0) && (cc == sfc) && ((p13filetreelocation.length > 0) || (winAgent == false)));
2814 + QE('p13CopyButton', (cc > 0) && (cc == sfc) && ((p13filetreelocation.length > 0) || (winAgent == false)));
2815 + QE('p13PasteButton', ((p13filetreelocation.length > 0) || (winAgent == false)) && ((p13clipboard != null) && (p13clipboard.length > 0)));
2816 + }
2817 + }
2818 +
2819 + function p13getFileSelCount(includeDirs) { var cc = 0; var checkboxes = document.getElementsByName('fd'); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && ((includeDirs != false) || (checkboxes[i].attributes.file.value == '3'))) cc++; } return cc; }
2820 + function p13getFileSelDirCount() { var cc = 0, checkboxes = document.getElementsByName('fd'); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == '999')) cc++; } return cc; }
2821 + function p13getFileCount() { var cc = 0; var checkboxes = document.getElementsByName('fd'); return checkboxes.length; }
2822 + function p13selectallfile() { var nv = (p13getFileSelCount() == 0), checkboxes = document.getElementsByName('fd'); for (var i = 0; i < checkboxes.length; i++) { checkboxes[i].checked = nv; } p13setActions(); }
2823 + function p13createfolder() { setDialogMode(2, "Nieuwe map", 3, p13createfolderEx, '<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />'); focusTextBox('p13renameinput'); p13fileNameCheck(); }
2824 + function p13createfolderEx() { files.sendText({ action: 'mkdir', reqid: 1, path: p13filetreelocation.join('/') + '/' + Q('p13renameinput').value }); p13folderup(999); }
2825 + function p13deletefile() { var cc = p13getFileSelCount(), rec = (p13getFileSelDirCount() > 0) ? '<br /><br /><label><input type=checkbox id=p13recdeleteinput>' + "Recursieve verwijdering" + '</label><br>' : '<input type=checkbox id=p13recdeleteinput style=\'display:none\'>'; setDialogMode(2, "Verwijderen", 3, p13deletefileEx, (cc > 1) ? (format("Verwijder {0} gelecteerde items?", cc) + rec) : ("Verwijder geselecteerde item?" + rec)); }
2826 + function p13deletefileEx() { var delfiles = [], checkboxes = document.getElementsByName('fd'); for (var i = 0; i < checkboxes.length; i++) { if (checkboxes[i].checked) { delfiles.push(p13filetree.dir[checkboxes[i].value].n); } } files.sendText({ action: 'rm', reqid: 1, path: p13filetreelocation.join('/'), delfiles: delfiles, rec: Q('p13recdeleteinput').checked }); p13folderup(999); }
2827 + function p13renamefile() { var renamefile, checkboxes = document.getElementsByName('fd'); for (var i = 0; i < checkboxes.length; i++) { if (checkboxes[i].checked) { renamefile = p13filetree.dir[checkboxes[i].value].n; } } setDialogMode(2, "Hernoemen", 3, p13renamefileEx, '<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="' + renamefile + '" />', { action: 'rename', path: p13filetreelocation.join('/'), oldname: renamefile }); focusTextBox('p13renameinput'); p13fileNameCheck(); }
2828 + function p13renamefileEx(b, t) { t.newname = Q('p13renameinput').value; files.sendText(t); p13folderup(999); }
2829 + function p13fileNameCheck(e) { var x = isFilenameValid(Q('p13renameinput').value); QE('idx_dlgOkButton', x); if ((x == true) && (e != null) && (e.keyCode == 13)) { dialogclose(1); } }
2830 + function p13uploadFile() { setDialogMode(2, "Upload bestand", 3, p13uploadFileEx, '<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p13uploadinput\')" />'); updateUploadDialogOk('p13uploadinput'); }
2831 + function p13uploadFileEx() { p13doUploadFiles(Q('p13uploadinput').files); }
2832 + function p13viewfile() {
2833 + var checkboxes = document.getElementsByName('fd');
2834 + for (var i = 0; i < checkboxes.length; i++) {
2835 + if (checkboxes[i].checked) {
2836 + if (p13filetree.dir[checkboxes[i].value].s <= 204800) {
2837 + p13downloadfile(encodeURIComponent(p13filetreelocation.join('/') + '/' + p13filetree.dir[checkboxes[i].value].n), encodeURIComponent(p13filetree.dir[checkboxes[i].value].n), p13filetree.dir[checkboxes[i].value].s, 'viewer');
2838 + } else { messagebox("Bestandsberwerker", "Alleen bestanden kleiner dan 200k kunnen worden bewerkt."); }
2839 + break;
2840 + }
2841 + }
2842 + }
2843 +
2844 + var p13clipboard = null, p13clipboardFolder = null, p13clipboardCut = 0;
2845 + function p13copyFile(cut) { var checkboxes = document.getElementsByName('fd'); p13clipboard = []; p13clipboardCut = cut, p13clipboardFolder = p13targetpath; for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && (checkboxes[i].attributes.file.value == '3')) { p13clipboard.push(p13filetree.dir[checkboxes[i].value].n); } } p13updateClipview(); }
2846 + function p13pasteFile() {
2847 + var x = '';
2848 + if ((p13clipboard != null) && (p13clipboard.length > 0)) {
2849 + if (p13clipboardCut == 0) {
2850 + if (p13clipboard.length > 1) { x = format("Bevestig kopieën van {0} vermeldingen tot deze locatie?", p13clipboard.length); } else { x = format("Bevestig kopie van 1 vermelding tot deze locatie?"); }
2851 + } else {
2852 + if (p13clipboard.length > 1) { x = format("Verplaatsing van {0} vermeldingen naar deze locatie bevestigen?", p13clipboard.length); } else { x = format("Verplaatsing van 1 vermelding naar deze locatie bevestigen?"); }
2853 + }
2854 + }
2855 + setDialogMode(2, "Plakken", 3, p13pasteFileEx, x);
2856 + }
2857 + function p13pasteFileEx() { files.sendText({ action: (p13clipboardCut == 0 ? 'copy' : 'move'), reqid: 1, scpath: p13clipboardFolder, dspath: p13targetpath, names: p13clipboard }); p13folderup(999); if (p13clipboardCut == 1) { p13clipboard = null, p13clipboardFolder = null, p13clipboardCut = 0; p13updateClipview(); } }
2858 + function p13updateClipview() {
2859 + var x = '';
2860 + if ((p13clipboard != null) && (p13clipboard.length > 0)) {
2861 + if (p13clipboardCut == 0) {
2862 + if (p13clipboard.length > 1) {
2863 + x = format("{0} items vasthouden voor kopiëren" + ', <a href=# onclick="return p13clearClip()" style=cursor:pointer>' + "Wissen" + '</a>.', p13clipboard.length);
2864 + } else {
2865 + x = format("1 item vasthouden voor kopiëren" + ', <a href=# onclick="return p13clearClip()" style=cursor:pointer>' + "Wissen" + '</a>.');
2866 + }
2867 + } else {
2868 + if (p13clipboard.length > 1) {
2869 + x = format("{0} items vasthouden voor verplaatsen" + ', <a href=# onclick="return p13clearClip()" style=cursor:pointer>' + "Wissen" + '</a>.', p13clipboard.length);
2870 + } else {
2871 + x = format("1 item vasthouden voor verplaatsen" + ', <a href=# onclick="return p13clearClip()" style=cursor:pointer>' + "Wissen" + '</a>.');
2872 + }
2873 + }
2874 + }
2875 + QH('p13bottomstatus', x);
2876 + p13setActions();
2877 + }
2878 + function p13clearClip() { p13clipboard = null; p13clipboardFolder = null; p13clipboardCut = 0; p13updateClipview(); return false; } function updateUploadDialogOk(x) { QE('idx_dlgOkButton', Q(x).value != ''); }
2879 + function getFileSelCount(includeDirs) { var cc = 0; var checkboxes = document.getElementsByName('fc'); for (var i = 0; i < checkboxes.length; i++) { if ((checkboxes[i].checked) && ((includeDirs != false) || (checkboxes[i].attributes.file.value == "3"))) cc++; } return cc; }
2880 + function getFileCount() { var cc = 0; var checkboxes = document.getElementsByName('fc'); return checkboxes.length; }
2881 +
2882 + //
2883 + // FILES DOWNLOAD
2884 + //
2885 +
2886 + var downloadFile; // Global state for file download
2887 +
2888 + // Called by the html page to start a download, arguments are: path, file name and file size.
2889 + function p13downloadfile(x, y, z) {
2890 + if (xxdialogMode || downloadFile || !files) return;
2891 + downloadFile = { path: decodeURIComponent(x), file: decodeURIComponent(y), size: z, tsize: 0, data: '', state: 0, id: Math.random() }
2892 + //console.log('p13downloadFileCancel', downloadFile);
2893 + files.sendText({ action: 'download', sub: 'start', id: downloadFile.id, path: downloadFile.path });
2894 + setDialogMode(2, "Download Bestand", 10, p13downloadFileCancel, '<div>' + downloadFile.file + '</div><br /><progress id=d2progressBar style=width:100% value=0 max=' + z + ' />');
2895 + }
2896 +
2897 + // Called by the html page to cancel the download
2898 + function p13downloadFileCancel() { setDialogMode(0); files.sendText({ action: 'download', sub: 'cancel', id: downloadFile.id }); downloadFile = null; }
2899 +
2900 + // Called by the transport when download control command is received
2901 + function p13gotDownloadCommand(cmd) {
2902 + //console.log('p13gotDownloadCommand', cmd);
2903 + if ((downloadFile == null) || (cmd.id != downloadFile.id)) return;
2904 + if (cmd.sub == 'start') { downloadFile.state = 1; files.sendText({ action: 'download', sub: 'startack', id: downloadFile.id }); }
2905 + else if (cmd.sub == 'cancel') { downloadFile = null; setDialogMode(0); }
2906 + }
2907 +
2908 + // Called by the transport when binary data is received
2909 + function p13gotDownloadBinaryData(data) {
2910 + if (!downloadFile || downloadFile.state == 0) return;
2911 + if (data.length > 4) {
2912 + downloadFile.tsize += (data.length - 4); // Add to the total bytes received
2913 + downloadFile.data += data.substring(4); // Append the data
2914 + Q('d2progressBar').value = downloadFile.tsize; // Change the progress bar
2915 + }
2916 + if ((ReadInt(data, 0) & 1) != 0) { // Check end flag
2917 + saveAs(data2blob(downloadFile.data), downloadFile.file); downloadFile = null; setDialogMode(0); // Save the file
2918 + } else {
2919 + files.sendText({ action: 'download', sub: 'ack', id: downloadFile.id }); // Send the ACK
2920 + }
2921 + }
2922 +
2923 + /*
2924 + var downloadFile; // Global state for file download
2925 +
2926 + // Called by the html page to start a download, arguments are: path, file name and file size.
2927 + function p13downloadfile(x, y, z) {
2928 + if (xxdialogMode) return;
2929 + downloadFile = CreateAgentRedirect(meshserver, CreateRemoteFiles(p13gotDownloadData), serverPublicNamePort, authCookie, authRelayCookie, domainUrl); // Create our websocket file transport
2930 + downloadFile.ctrlMsgAllowed = false;
2931 + downloadFile.onStateChanged = onFileDownloadStateChange;
2932 + downloadFile.xpath = decodeURIComponent(x);
2933 + downloadFile.xfile = decodeURIComponent(y);
2934 + downloadFile.xsize = z;
2935 + downloadFile.xtsize = 0;
2936 + downloadFile.xstate = 0;
2937 + downloadFile.Start(filesNode._id);
2938 + setDialogMode(2, "Download File", 10, p13downloadFileCancel, '<div>' + downloadFile.xfile + '</div><br /><progress id=d2progressBar style=width:100% value=0 max=' + z + ' />');
2939 + }
2940 +
2941 + // Called by the html page to cancel the download
2942 + function p13downloadFileCancel(button, tag) {
2943 + //console.log('p13downloadFileCancel');
2944 + downloadFile.Stop();
2945 + delete downloadFile;
2946 + downloadFile = null;
2947 + }
2948 +
2949 + // Called by the file transport to indicate when the transport connection state has changed
2950 + function onFileDownloadStateChange(xdownloadFile, state) {
2951 + switch (state) {
2952 + case 0: // Transport as disconnected. If this is not part of an abort, we need to save the file
2953 + setDialogMode(0); // Close any dialog boxes if present
2954 + if ((downloadFile != null) && (downloadFile.xstate == 1)) { saveAs(data2blob(downloadFile.xdata), downloadFile.xfile); } // Save the file
2955 + break;
2956 + case 3: // Transport as connected, send a command to indicate we want to start a file download
2957 + downloadFile.send(JSON.stringify({ action: 'download', reqid: 1, path: downloadFile.xpath }));
2958 + break;
2959 + default:
2960 + console.log('Unknown onFileDownloadStateChange state', state);
2961 + break;
2962 + }
2963 + }
2964 +
2965 + // Called by the transport when data is received
2966 + function p13gotDownloadData(data) {
2967 + if (downloadFile.xstate == 0) { // If state is 0, this is a command confirming if the file will be transfered.
2968 + var cmd = JSON.parse(data);
2969 + if (cmd.action == 'downloadstart') { // Yes, the file is about to start
2970 + downloadFile.xstate = 1; // Switch to state 1, we will start receiving the file data
2971 + downloadFile.xdata = ''; // Start with empty data
2972 + downloadFile.send('a'); // Send the first ACK
2973 + } else if (cmd.action == 'downloaderror') { // Problem opening this file, cancel
2974 + p13downloadFileCancel();
2975 + }
2976 + } else { // We are in the process of receiving the file
2977 + downloadFile.xtsize += (data.length); // Add to the total bytes received
2978 + downloadFile.xdata += data; // Append the data
2979 + Q('d2progressBar').value = downloadFile.xtsize; // Change the progress bar
2980 + downloadFile.send('a'); // Send the ACK
2981 + }
2982 + }
2983 + */
2984 +
2985 + //
2986 + // FILES UPLOAD
2987 + //
2988 +
2989 + var uploadFile;
2990 + function p13doUploadFiles(files) {
2991 + if (xxdialogMode) return;
2992 + uploadFile = {};
2993 + uploadFile.xpath = p13filetreelocation.join('/');
2994 + uploadFile.xfiles = files;
2995 + uploadFile.xfilePtr = -1;
2996 + setDialogMode(2, "Upload bestand", 10, p13uploadFileCancel, '<div id=p13dfileName>' + "Verbinden..." + '</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />');
2997 + p13uploadReconnect();
2998 + }
2999 +
3000 + function onFileUploadStateChange(xdownloadFile, state) {
3001 + switch (state) {
3002 + case 0:
3003 + p13folderup(9999);
3004 + break;
3005 + case 3:
3006 + p13uploadNextFile();
3007 + break;
3008 + default:
3009 + console.log('Unknown onFileUploadStateChange state', state);
3010 + break;
3011 + }
3012 + }
3013 +
3014 + // Connect again
3015 + function p13uploadReconnect() {
3016 + uploadFile.ws = CreateAgentRedirect(meshserver, CreateRemoteFiles(p13gotUploadData), serverPublicNamePort, authCookie, authRelayCookie, domainUrl);
3017 + uploadFile.ws.attemptWebRTC = false;
3018 + uploadFile.ws.ctrlMsgAllowed = false;
3019 + uploadFile.ws.onStateChanged = onFileUploadStateChange;
3020 + uploadFile.ws.Start(filesNode._id);
3021 + }
3022 +
3023 + // Push the next file
3024 + function p13uploadNextFile() {
3025 + uploadFile.xfilePtr++;
3026 + if (uploadFile.xfiles.length > uploadFile.xfilePtr) {
3027 + uploadFile.xptr = 0;
3028 + var file = uploadFile.xfiles[uploadFile.xfilePtr];
3029 + QH('p13dfileName', file.name);
3030 + Q('d2progressBar').max = file.size;
3031 + Q('d2progressBar').value = 0;
3032 +
3033 + uploadFile.xreader = new FileReader();
3034 + uploadFile.xreader.onload = function () {
3035 + uploadFile.xdata = uploadFile.xreader.result;
3036 + uploadFile.ws.sendText({ action: 'upload', reqid: uploadFile.xfilePtr, path: uploadFile.xpath, name: file.name, size: uploadFile.xdata.byteLength });
3037 + };
3038 + uploadFile.xreader.readAsArrayBuffer(file);
3039 + } else {
3040 + p13uploadFileCancel();
3041 + }
3042 + }
3043 +
3044 + // Used to cancel the entire transfer.
3045 + function p13uploadFileCancel(button, tag) {
3046 + if (uploadFile != null) {
3047 + if (uploadFile.ws != null) {
3048 + uploadFile.ws.Stop();
3049 + uploadFile.ws = null;
3050 + }
3051 + uploadFile = null;
3052 + }
3053 + setDialogMode(0); // Close any dialog boxes if present
3054 + }
3055 +
3056 + // Receive upload ack from the mesh agent, use this to keep sending more data
3057 + function p13gotUploadData(data) {
3058 + var cmd = JSON.parse(data);
3059 + if ((uploadFile == null) || (parseInt(uploadFile.xfilePtr) != parseInt(cmd.reqid))) { return; }
3060 +
3061 + if (cmd.action == 'uploadstart') {
3062 + p13uploadNextPart(false);
3063 + for (var i = 0; i < 8; i++) { p13uploadNextPart(true); } // Send 8 more blocks of 4 k to full the websocket.
3064 + } else if (cmd.action == 'uploadack') {
3065 + p13uploadNextPart(false);
3066 + } else if (cmd.action == 'uploaderror') {
3067 + p13uploadFileCancel();
3068 + }
3069 + }
3070 +
3071 + // Push the next part of the file into the websocket. If dataPriming is true, push more data only if it's not the last block of the file.
3072 + function p13uploadNextPart(dataPriming) {
3073 + var data = uploadFile.xdata;
3074 + var start = uploadFile.xptr;
3075 + var end = uploadFile.xptr + 4096;
3076 + if (end > data.byteLength) { if (dataPriming == true) { return; } end = data.byteLength; }
3077 + if (start == data.byteLength) {
3078 + if (uploadFile.ws != null) { uploadFile.ws.Stop(); uploadFile.ws = null; }
3079 + if (uploadFile.xfiles.length > uploadFile.xfilePtr + 1) { p13uploadReconnect(); } else { p13uploadFileCancel(); }
3080 + } else {
3081 + var datapart = data.slice(start, end);
3082 + uploadFile.ws.send(datapart);
3083 + uploadFile.xptr = end;
3084 + Q('d2progressBar').value = end;
3085 + }
3086 + }
3087 +
3088 + //
3089 + // MY MESHS
3090 + //
3091 +
3092 + var currentMesh;
3093 + function p20updateMesh() {
3094 + if (currentMesh == null) return;
3095 + QH('p20meshName', EscapeHtml(currentMesh.name));
3096 + var meshtype = format("Onbekend #{0}", currentMesh.mtype);
3097 + var meshrights = currentMesh.links[userinfo._id].rights;
3098 + if (currentMesh.mtype == 1) meshtype = "Intel&reg; AMT alleen, geen agent";
3099 + if (currentMesh.mtype == 2) meshtype = "Beheerd met behulp van een software-agent";
3100 +
3101 + var x = '';
3102 + x += addHtmlValue("Naam", addLinkConditional(EscapeHtml(currentMesh.name), 'p20editmesh(1)', (meshrights & 1) != 0));
3103 + x += addHtmlValue("Omschrijving", addLinkConditional(((currentMesh.desc && currentMesh.desc != '') ? EscapeHtml(currentMesh.desc) : ('<i>' + "Geen" + '</i>')), 'p20editmesh(2)', (meshrights & 1) != 0));
3104 + x += addHtmlValue("Typen", meshtype);
3105 + //x += addHtmlValue('Identifier', currentMesh._id.split('/')[2]);
3106 +
3107 + //x += '<br><input type=button value=Notes onclick=showNotes(false,"' + encodeURIComponent(currentMesh._id) + '") />';
3108 +
3109 + x += '<br style=clear:both><br>';
3110 + var currentMeshLinks = currentMesh.links[userinfo._id];
3111 + if (currentMeshLinks && ((currentMeshLinks.rights & 2) != 0)) { x += '<div style=margin-bottom:6px><a onclick=p20showAddMeshUserDialog() style=cursor:pointer><img src=images/icon-addnew.png border=0 height=12 width=12>' + " gebruiker toevoegen" + '</a></div>'; }
3112 +
3113 + /*
3114 + if ((meshrights & 4) != 0) {
3115 + if (currentMesh.mtype == 1) {
3116 + x += '<a onclick=addCiraDeviceToMesh(\"' + currentMesh._id + '\") style=cursor:pointer;margin-right:10px><img src=images/icon-installmesh.png border=0 height=12 width=12> Install CIRA</a>';
3117 + x += '<a onclick=addDeviceToMesh(\"' + currentMesh._id + '\") style=cursor:pointer;margin-right:10px><img src=images/icon-installmesh.png border=0 height=12 width=12> Install local</a>';
3118 + }
3119 + if (currentMesh.mtype == 2) {
3120 + x += '<a onclick=addAgentToMesh(\"' + currentMesh._id + '\") style=cursor:pointer;margin-right:10px><img src=images/icon-addnew.png border=0 height=12 width=12> Install</a>';
3121 + }
3122 + }
3123 + */
3124 +
3125 + /*
3126 + function getMeshActions(mesh, meshrights) {
3127 + if ((meshrights & 4) == 0) return '';
3128 + var r = '';
3129 + if (mesh.mtype == 1) {
3130 + r += ' <a style=cursor:pointer;font-size:10px onclick=addCiraDeviceToMesh(\"' + mesh._id + '\")>Add CIRA</a>';
3131 + r += ' <a style=cursor:pointer;font-size:10px onclick=addDeviceToMesh(\"' + mesh._id + '\")>Add Local</a>';
3132 + }
3133 + if (mesh.mtype == 2) {
3134 + r += ' <a style=cursor:pointer;font-size:10px onclick=addAgentToMesh(\"' + mesh._id + '\")>Add Agent</a>';
3135 + }
3136 + return r;
3137 + }
3138 + */
3139 +
3140 + x += '<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>' + "Gebruikersautorisaties" + '</th></tr>';
3141 +
3142 + // Sort the users for this mesh
3143 + var count = 1, sortedusers = [];
3144 + for (var i in currentMesh.links) { sortedusers.push({ id: i, name: i.split('/')[2], rights: currentMesh.links[i].rights }); }
3145 + sortedusers.sort(function (a, b) { if (a.name > b.name) return 1; if (a.name < b.name) return -1; return 0; });
3146 +
3147 + // Display all users for this mesh
3148 + for (var i in sortedusers) {
3149 + var trash = '', rights = "Gedeeltelijke rechten", r = sortedusers[i].rights;
3150 + if (r == 0xFFFFFFFF) rights = "Volledige beheerder"; else if (r == 0) rights = "Geen rechten";
3151 + if ((i != userinfo._id) && (meshrights == 0xFFFFFFFF || (((meshrights & 2) != 0)))) { trash = '<a onclick=p20deleteUser(event,"' + encodeURIComponent(sortedusers[i].id) + '") style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'; }
3152 + x += '<tr onclick=p20viewuser("' + encodeURIComponent(sortedusers[i].id) + '") style=height:32px;cursor:pointer' + (((count % 2) == 0) ? ';background-color:#DDD' : '') + '><td>';
3153 + x += '<div style=float:right>' + trash + '</div><div style=float:right;padding-right:4px>' + rights + '</div><div class=m2></div><div>&nbsp;' + EscapeHtml(decodeURIComponent(sortedusers[i].name)) + '<div></div></div>';
3154 + x += '</td></tr>';
3155 + ++count;
3156 + }
3157 +
3158 + x += '</tbody></table>';
3159 +
3160 + // If we are full administrator on this mesh, allow deletion of the mesh
3161 + if (meshrights == 0xFFFFFFFF) { x += '<div style=font-size:small;text-align:right;margin-top:6px><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>' + "Verwijder groep" + '</a></span></div>'; }
3162 +
3163 + QH('p20info', x);
3164 + }
3165 +
3166 + function p20showDeleteMeshDialog() {
3167 + if (xxdialogMode) return false;
3168 + var x = format("Weet je zeker dat je groep {0} wilt verwijderen? Als u de apparaatgroep verwijdert, wordt ook alle informatie over apparaten binnen deze groep verwijderd.", EscapeHtml(currentMesh.name)) + '<br /><br />';
3169 + x += '<label><input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />' + "Bevestig" + '</label>';
3170 + setDialogMode(2, "Verwijder groep", 3, p20showDeleteMeshDialogEx, x);
3171 + p20validateDeleteMeshDialog();
3172 + return false;
3173 + }
3174 +
3175 + function p20validateDeleteMeshDialog() {
3176 + QE('idx_dlgOkButton', Q('p20check').checked);
3177 + }
3178 +
3179 + function p20showDeleteMeshDialogEx(buttons, tag) {
3180 + meshserver.send({ action: 'deletemesh', meshid: currentMesh._id, meshname: currentMesh.name });
3181 + }
3182 +
3183 + function p20editmesh(focus) {
3184 + if (xxdialogMode) return;
3185 + var x = addHtmlValue("Naam", '<input id=dp20meshname style=width:170px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />');
3186 + x += addHtmlValue("Omschrijving", '<input id=dp20meshdesc style=width:170px maxlength=1024 onkeyup=p20editmeshValidate() />');
3187 + setDialogMode(2, "Bewerk apparaatgroep", 3, p20editmeshEx, x);
3188 + Q('dp20meshname').value = currentMesh.name;
3189 + if (currentMesh.desc) Q('dp20meshdesc').value = currentMesh.desc;
3190 + p20editmeshValidate();
3191 + if (focus == 2) { Q('dp20meshdesc').focus(); } else { Q('dp20meshname').focus(); }
3192 + }
3193 +
3194 + function p20editmeshEx() {
3195 + meshserver.send({ action: 'editmesh', meshid: currentMesh._id, meshname: Q('dp20meshname').value, desc: Q('dp20meshdesc').value });
3196 + }
3197 +
3198 + function p20editmeshValidate() {
3199 + QE('idx_dlgOkButton', Q('dp20meshname').value.length > 0);
3200 + }
3201 +
3202 + function p20showAddMeshUserDialog() {
3203 + if (xxdialogMode) return;
3204 + var x = addHtmlValue('User', '<input id=dp20username style=width:170px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />');
3205 + x += '<div style="border:2px groove gray;background-color:white;max-height:120px;overflow-y:scroll">';
3206 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>' + "Volledige beheerder" + '</label><br>';
3207 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>' + "Bewerk apparaatgroep" + '</label><br>';
3208 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>' + "Beheer apparaatgroep gebruikers" + '</label><br>';
3209 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>' + "Beheer apparaatgroep computers" + '</label><br>';
3210 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>' + "Extern beheer" + '</label><br>';
3211 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>' + "Alleen extern meekijken" + '</label><br>';
3212 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotelimitedinput style=margin-left:12px>' + "Alleen beperkte invoer" + '</label><br>';
3213 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>' + "Geen terminal toegang" + '</label><br>';
3214 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>' + "Geen bestandstoegang" + '</label><br>';
3215 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>' + "Geen Intel&reg; AMT" + '</label><br>';
3216 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>' + "Mesh Agent Console" + '</label><br>';
3217 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>' + "Serverbestanden" + '</label><br>';
3218 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>' + "apparaat wekken" + '</label><br>';
3219 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>' + "Apparaatnotities bewerken" + '</label><br>';
3220 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20limitevents>' + "Toon alleen eigen gebeurtenissen" + '</label><br>';
3221 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20chatnotify>' + "Chat & Melden" + '</label><br>';
3222 + x += '<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20uninstall>' + "deinstallatie agent" + '</label><br>';
3223 + x += '</div>';
3224 + setDialogMode(2, "Gebruiker toevoegen aan Mesh", 3, p20showAddMeshUserDialogEx, x);
3225 + p20validateAddMeshUserDialog();
3226 + Q('dp20username').focus();
3227 + }
3228 +
3229 + function p20validateAddMeshUserDialog() {
3230 + var meshrights = currentMesh.links[userinfo._id].rights;
3231 + var nc = !Q('p20fulladmin').checked;
3232 + QE('p20fulladmin', meshrights == 0xFFFFFFFF);
3233 + QE('p20editmesh', nc && (meshrights == 0xFFFFFFFF));
3234 + QE('p20manageusers', nc);
3235 + QE('p20managecomputers', nc);
3236 + QE('p20remotecontrol', nc);
3237 + QE('p20meshagentconsole', nc);
3238 + QE('p20meshserverfiles', nc);
3239 + QE('p20wakedevices', nc);
3240 + QE('p20editnotes', nc);
3241 + QE('p20limitevents', nc);
3242 + QE('p20remoteview', nc && Q('p20remotecontrol').checked);
3243 + QE('p20remotelimitedinput', nc && Q('p20remotecontrol').checked && !Q('p20remoteview').checked);
3244 + QE('p20noterminal', nc && Q('p20remotecontrol').checked);
3245 + QE('p20nofiles', nc && Q('p20remotecontrol').checked);
3246 + QE('p20noamt', nc && Q('p20remotecontrol').checked);
3247 + QE('p20chatnotify', nc);
3248 + QE('p20uninstall', nc);
3249 + }
3250 +
3251 + function p20showAddMeshUserDialogEx() {
3252 + var meshadmin = 0;
3253 + if (Q('p20fulladmin').checked == true) { meshadmin = 0xFFFFFFFF; } else {
3254 + if (Q('p20editmesh').checked == true) meshadmin += 1;
3255 + if (Q('p20manageusers').checked == true) meshadmin += 2;
3256 + if (Q('p20managecomputers').checked == true) meshadmin += 4;
3257 + if (Q('p20remotecontrol').checked == true) meshadmin += 8;
3258 + if (Q('p20meshagentconsole').checked == true) meshadmin += 16;
3259 + if (Q('p20meshserverfiles').checked == true) meshadmin += 32;
3260 + if (Q('p20wakedevices').checked == true) meshadmin += 64;
3261 + if (Q('p20editnotes').checked == true) meshadmin += 128;
3262 + if (Q('p20remoteview').checked == true) meshadmin += 256;
3263 + if (Q('p20noterminal').checked == true) meshadmin += 512;
3264 + if (Q('p20nofiles').checked == true) meshadmin += 1024;
3265 + if (Q('p20noamt').checked == true) meshadmin += 2048;
3266 + if (Q('p20remotelimitedinput').checked == true) meshadmin += 4096;
3267 + if (Q('p20limitevents').checked == true) meshadmin += 8192;
3268 + if (Q('p20chatnotify').checked == true) meshadmin += 16384;
3269 + if (Q('p20uninstall').checked == true) meshadmin += 32768;
3270 + }
3271 + var users = Q('dp20username').value.split(','), users2 = [];
3272 + for (var i in users) { users2.push(users[i].trim()); }
3273 + meshserver.send({ action: 'addmeshuser', meshid: currentMesh._id, meshname: currentMesh.name, usernames: users2, meshadmin: meshadmin });
3274 + }
3275 +
3276 + function p20viewuser(userid) {
3277 + if (xxdialogMode) return;
3278 + userid = decodeURIComponent(userid);
3279 + var r = [], cmeshrights = currentMesh.links[userinfo._id].rights, meshrights = currentMesh.links[userid].rights;
3280 + if (meshrights == 0xFFFFFFFF) r.push("Volledige beheerder"); else {
3281 + if ((meshrights & 1) != 0) r.push("Bewerk apparaatgroep");
3282 + if ((meshrights & 2) != 0) r.push("Beheer apparaatgroep gebruikers");
3283 + if ((meshrights & 4) != 0) r.push("Beheer apparaatgroep computers");
3284 + if ((meshrights & 8) != 0) r.push("Extern beheer");
3285 + if ((meshrights & 16) != 0) r.push("Agentconsole");
3286 + if ((meshrights & 32) != 0) r.push("Serverbestanden");
3287 + if ((meshrights & 64) != 0) r.push("apparaat wekken");
3288 + if ((meshrights & 128) != 0) r.push("Notities bewerken");
3289 + if ((meshrights & 256) != 0) r.push("Alleen extern meekijken");
3290 + if ((meshrights & 512) != 0) r.push("Geen terminal");
3291 + if ((meshrights & 1024) != 0) r.push("Geen bestanden");
3292 + if ((meshrights & 2048) != 0) r.push("Geen Intel&reg; AMT");
3293 + if (((meshrights & 8) != 0) && ((meshrights & 4096) != 0) && ((meshrights & 256) == 0)) r.push("Beperkte invoer");
3294 + if ((meshrights & 8192) != 0) r.push("Alleen eigen gebeurtenissen");
3295 + if ((meshrights & 16384) != 0) r.push("Chat & Melden");
3296 + if ((meshrights & 32768) != 0) r.push("deinstallatie");
3297 + }
3298 + if (r.length == 0) { r.push("Geen rechten"); }
3299 + var buttons = 1, x = addHtmlValue("Gebruiker", EscapeHtml(decodeURIComponent(userid.split('/')[2])));
3300 + x += addHtmlValue("machtigingen", r.join(","));
3301 + if (((userinfo._id) != userid) && (cmeshrights == 0xFFFFFFFF || (((cmeshrights & 2) != 0) && (meshrights != 0xFFFFFFFF)))) buttons += 4;
3302 + setDialogMode(2, "Apparaatgroep gebruiker", buttons, p20viewuserEx, x, userid);
3303 + }
3304 +
3305 + function p20viewuserEx(button, userid) { if (button != 2) return; setDialogMode(2, "externe Mesh gebruiker", 3, p20viewuserEx2, format("Bevestig de verwijdering van gebruiker {0}?", userid.split('/')[2]), userid); }
3306 + function p20deleteUser(e, userid) { haltEvent(e); p20viewuserEx(2, decodeURIComponent(userid)); }
3307 + function p20viewuserEx2(button, userid) { meshserver.send({ action: 'removemeshuser', meshid: currentMesh._id, meshname: currentMesh.name, userid: userid }); }
3308 +
3309 + //
3310 + // PANELS
3311 + //
3312 +
3313 + var xxcurrentView = -1;
3314 + function go(x) {
3315 + setSessionActivity();
3316 + if (xxdialogMode || xxcurrentView == x) return;
3317 + updateFooterMenu();
3318 + setDialogMode(0);
3319 + // Edit this line when adding a new screen
3320 + for (var i = 0; i < 32; i++) { QV('p' + i, i == x); }
3321 + xxcurrentView = x;
3322 + }
3323 +
3324 + //
3325 + // POPUP DIALOG
3326 + //
3327 +
3328 + // undefined = Hidden, 1 = Generic Message
3329 + var xxdialogMode;
3330 + var xxdialogFunc;
3331 + var xxdialogButtons;
3332 + var xxdialogTag;
3333 +
3334 + // Display a dialog box
3335 + // Parameters: Dialog Mode (0 = none), Dialog Title, Buttons (1 = OK, 2 = Cancel, 3 = OK & Cancel), Call back function(0 = Cancel, 1 = OK), Dialog Content (Mode 2 only)
3336 + function setDialogMode(x, y, b, f, c, tag) {
3337 + setSessionActivity();
3338 + xxdialogMode = x;
3339 + xxdialogFunc = f;
3340 + xxdialogButtons = b;
3341 + xxdialogTag = tag;
3342 + QE('idx_dlgOkButton', true);
3343 + QV('idx_dlgOkButton', b & 1);
3344 + QV('idx_dlgCancelButton', b & 2);
3345 + QV('id_dialogclose', (b & 2) || (b & 8));
3346 + QV('idx_dlgButtonBar', b & 7);
3347 + if (y) QH('id_dialogtitle', y);
3348 + for (var i = 1; i < 24; i++) { QV('dialog' + i, i == x); } // Edit this line when more dialogs are added
3349 + QV('dialog', x);
3350 + if (c) { if (x == 2) { QH('id_dialogOptions', c); } else { QH('id_dialogMessage', c); } }
3351 + }
3352 +
3353 + function dialogclose(x) {
3354 + setSessionActivity();
3355 + var f = xxdialogFunc;
3356 + var b = xxdialogButtons;
3357 + var t = xxdialogTag;
3358 + setDialogMode();
3359 + if (((b & 8) || x) && f) f(x, t);
3360 + }
3361 +
3362 + function putstore(name, val) { try { if ((typeof (localStorage) === 'undefined') || (localStorage.getItem(name) == val)) return; if (val == null) { localStorage.removeItem(name); } else { localStorage.setItem(name, val); } } catch (e) { } if (name[0] != '_') { var s = {}; for (var i = 0, len = localStorage.length; i < len; ++i) { var k = localStorage.key(i); if (k[0] != '_') { s[k] = localStorage.getItem(k); } } meshserver.send({ action: 'userWebState', state: JSON.stringify(s) }); } }
3363 + function getstore(name, val) { try { if (typeof (localStorage) === 'undefined') return val; var v = localStorage.getItem(name); if ((v == null) || (v == null)) return val; return v; } catch (e) { return val; } }
3364 + function center() { QS('dialog').left = ((((getDocWidth() - 300) / 2)) + 'px'); deskAdjust(); deskAdjust(); /*drawDeviceTimeline();*/ }
3365 + function messagebox(t, m) { QH('id_dialogMessage', m); setDialogMode(1, t, 1); }
3366 + function statusbox(t, m) { QH('id_dialogMessage', m); setDialogMode(1, t); }
3367 + function getDocWidth() { if (window.innerWidth) return window.innerWidth; if (document.documentElement && document.documentElement.clientWidth && document.documentElement.clientWidth != 0) return document.documentElement.clientWidth; return document.getElementsByTagName('body')[0].clientWidth; }
3368 + function haltEvent(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; }
3369 + function haltReturn(e) { if (e.keyCode == 13) { haltEvent(e); } }
3370 + function validateEmail(v) { var emailReg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return emailReg.test(v); }
3371 + function reload() { window.location.href = window.location.href; }
3372 + function getNodeFromId(id) { for (var i in nodes) { if (nodes[i]._id == id) return nodes[i]; } return null; }
3373 + function addHtmlValue(t, v) { return '<table><td style=width:120px>' + t + '<td><b>' + v + '</b></table>'; }
3374 + function addHtmlValue2(t, v) { return '<div><div style=display:inline-block;float:right>' + v + '</div><div style=display:inline-block>' + t + '</div></div>'; }
3375 + function addLink(x, f) { return '<a style=cursor:pointer;color:darkblue;text-decoration:none onclick=\'' + f + '\'>&diams; ' + x + '</a>'; }
3376 + function addLinkConditional(x, f, c) { if (c) return addLink(x, f); return x; }
3377 + function passwordcheck(p) { var re = /(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/; return re.test(p); }
3378 + function getFileSizeStr(size) { if (size == 1) return "1 byte"; return format('{0} bytes', size); }
3379 + function joinPaths() { var x = []; for (var i in arguments) { var w = arguments[i]; if ((w != null) && (w != '')) { while (w.endsWith('/') || w.endsWith('\\')) { w = w.substring(0, w.length - 1); } while (w.startsWith('/') || w.startsWith('\\')) { w = w.substring(1); } x.push(w); } } return x.join('/'); }
3380 + function focusTextBox(x) { setTimeout(function () { Q(x).selectionStart = Q(x).selectionEnd = 65535; Q(x).focus(); }, 0); }
3381 + var isFilenameValid = (function () { var x1 = /^[^\\/:\*\?"<>\|]+$/, x2 = /^\./, x3 = /^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i; return function isFilenameValid(fname) { return x1.test(fname) && !x2.test(fname) && !x3.test(fname) && (fname[0] != '.'); } })();
3382 + function parseUriArgs() { var name, r = {}, parsedUri = window.document.location.href.split(/[\?&|\=]/); parsedUri.splice(0, 1); for (x in parsedUri) { switch (x % 2) { case 0: { name = decodeURIComponent(parsedUri[x]); break; } case 1: { r[name] = decodeURIComponent(parsedUri[x]); var x = parseInt(r[name]); if (x == r[name]) { r[name] = x; } break; } default: { break; } } } return r; }
3383 + function printDate(d) { return d.toLocaleDateString(args.locale); }
3384 + function printTime(d) { return d.toLocaleTimeString(args.locale); }
3385 + function printDateTime(d) { return d.toLocaleString(args.locale); }
3386 + function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
3387 + function nobreak(x) { return x.split(' ').join('&nbsp;'); }
3388 +
3389 + </script>
3390 +
3391 +</body></html>
\ No newline at end of file
views/translations/default-mobile_pt.handlebars
+1 -1
@@ -696,7 +696,7 @@
696 else if ((passRequirements != null) && (typeof passRequirements.reset == 'number')) {
697 var seconds = (userinfo.passchange) + (passRequirements.reset * 86400) - Math.floor(Date.now() / 1000);
698 if (seconds < 0) { QH('p2nextPasswordUpdateTime', " - Redefinir no próximo login."); }
699 - else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format("- Redefinir em {0} minuto {1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
699 + else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format(" - Redefinir em {0} minuto {1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
700 else if (seconds < 86400) { QH('p2nextPasswordUpdateTime', format(" - Redefinir em {0} hora {1}.", Math.floor(seconds / 3600), addLetterS(Math.floor(seconds / 3600)))); }
701 else { QH('p2nextPasswordUpdateTime', format(" - Redefinir em {0} dia {1}."), Math.floor(seconds / 86400), addLetterS(Math.floor(seconds / 86400))); }
702 }
views/translations/default_cs.handlebars
+2 -2
@@ -7386,10 +7386,10 @@
7386 if (currentMesh.amt.type == 1) { intelAmtPolicy = 'Deactivate Client Control Mode (CCM)'; }
7387 else if (currentMesh.amt.type == 2) {
7388 intelAmtPolicy = "Jednoduchý Client Control Mode (CCM)";
7389 - if (currentMesh.amt.cirasetup == 2) { intelAmtPolicy += "+ CIRA"; }
7389 + if (currentMesh.amt.cirasetup == 2) { intelAmtPolicy += " + CIRA"; }
7390 } else if (currentMesh.amt.type == 3) {
7391 intelAmtPolicy = "Jednoduchý Admin Control Mode (ACM)";
7392 - if (currentMesh.amt.cirasetup == 2) { intelAmtPolicy += "+ CIRA"; }
7392 + if (currentMesh.amt.cirasetup == 2) { intelAmtPolicy += " + CIRA"; }
7393 }
7394 }
7395 x += addHtmlValue("Intel&reg; AMT", addLinkConditional(intelAmtPolicy, 'p20editMeshAmt()', meshrights & 1));
views/translations/default_fr.handlebars
+1 -1
@@ -1469,7 +1469,7 @@
1469 else if ((passRequirements != null) && (typeof passRequirements.reset == 'number')) {
1470 var seconds = (userinfo.passchange) + (passRequirements.reset * 86400) - Math.floor(Date.now() / 1000);
1471 if (seconds < 0) { QH('p2nextPasswordUpdateTime', " - Réinitialiser à la prochaine connexion."); }
1472 - else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format("- Réinitialisation en {0} minute {1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
1472 + else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format(" - Réinitialisation en {0} minute {1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
1473 else if (seconds < 86400) { QH('p2nextPasswordUpdateTime', format(" - Réinitialisation dans {0} heure {1}.", Math.floor(seconds / 3600), addLetterS(Math.floor(seconds / 3600)))); }
1474 else { QH('p2nextPasswordUpdateTime', format(" - Réinitialiser dans le {0} jour {1}."), Math.floor(seconds / 86400), addLetterS(Math.floor(seconds / 86400))); }
1475 }
views/translations/default_ja.handlebars
+12 -12
@@ -3071,7 +3071,7 @@
3071 function addDeviceToMesh(meshid) {
3072 if (xxdialogMode) return false;
3073 var mesh = meshes[meshid];
3074 - var x = format("新しいIntel&reg;を追加しますAMTデバイスからデバイスグループ\"{0} \"へ。", EscapeHtml(mesh.name)) + '<br /><br />';
3074 + var x = format("新しいIntel&reg;を追加しますAMTデバイスからデバイスグループ\"{0}\"へ。", EscapeHtml(mesh.name)) + '<br /><br />';
3075 x += addHtmlValue("装置名", '<input id=dp1devicename style=width:230px maxlength=32 autocomplete=off onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');
3076 x += addHtmlValue("ホスト名", '<input id=dp1hostname style=width:230px maxlength=32 autocomplete=off placeholder=\"' + "デバイス名と同じ" + '\" onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');
3077 x += addHtmlValue("ユーザー名", '<input id=dp1username style=width:230px maxlength=32 autocomplete=off placeholder=\"' + "管理者" + '\" onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');
@@ -3096,7 +3096,7 @@
3096 var portStr = (serverinfo.port == 80) ? '' : (':' + serverinfo.port);
3097 url = 'ws://' + servername + portStr + domainUrl;
3098 }
3099 - var x = format("MeshCMDツールをダウンロードして次のように実行することにより、グループ\"{0} \"にIntel AMTクライアントコントロールモード(CCM)アクティベーションを実行します。", EscapeHtml(mesh.name)) + '<br /><br />';
3099 + var x = format("MeshCMDツールをダウンロードして次のように実行することにより、グループ\"{0}\"にIntel AMTクライアントコントロールモード(CCM)アクティベーションを実行します。", EscapeHtml(mesh.name)) + '<br /><br />';
3100 x += '<textarea readonly=readonly style=width:100%;resize:none;height:100px;overflow:auto;font-size:12px readonly>meshcmd amtccm --url ' + url + 'amtactivate?id=' + meshid.split('/')[2] + ' --serverhttpshash ' + serverinfo.tlshash + '</textarea>';
3101 setDialogMode(2, "Intel&reg; AMTアクティベーション", 9, null, x);
3102 Q('idx_dlgOkButton').focus();
@@ -3116,7 +3116,7 @@
3116 var portStr = (serverinfo.port == 80) ? '' : (':' + serverinfo.port);
3117 url = 'ws://' + servername + portStr + domainUrl;
3118 }
3119 - var x = format("MeshCMDツールをダウンロードして次のように実行することにより、グループ\"{0} \"にIntel AMT管理制御モード(ACM)アクティベーションを実行します。", EscapeHtml(mesh.name)) + '<br /><br />';
3119 + var x = format("MeshCMDツールをダウンロードして次のように実行することにより、グループ\"{0}\"にIntel AMT管理制御モード(ACM)アクティベーションを実行します。", EscapeHtml(mesh.name)) + '<br /><br />';
3120 x += '<textarea readonly=readonly style=width:100%;resize:none;height:100px;overflow:auto;font-size:12px readonly>meshcmd amtacm --url ' + url + 'amtactivate?id=' + meshid.split('/')[2] + ' --serverhttpshash ' + serverinfo.tlshash + '</textarea>';
3121 if (serverinfo.amtAcmFqdn != null) {
3122 x += ('<div style=margin-top:8px>' + "Intel AMTは、MEBxで信頼できるFQDNを使用して設定するか、ネットワーク上に有線LANが必要です。" + ' <b>' + serverinfo.amtAcmFqdn.join(', ') + '</b></div>');
@@ -3185,14 +3185,14 @@
3185 x += '<hr>';
3186
3187 // Setup CIRA using a MeshCommander script (Pretty Simple)
3188 - x += '<div id=dlgAddCira0>' + format("新しいIntel&reg;を追加するにはCIRAを使用してAMTデバイスからデバイスグループ\"{0} \"に移動し、次のスクリプトファイルをダウンロードして、<a href='http://meshcommander.com' rel='noreferrer noopener' target='_blank'> MeshCommander </を使用しますa>スクリプトを実行してコンピューターを構成します。", EscapeHtml(mesh.name)) + '<br /><br />';
3188 + x += '<div id=dlgAddCira0>' + format("新しいIntel&reg;を追加するにはCIRAを使用してAMTデバイスからデバイスグループ\"{0}\"に移動し、次のスクリプトファイルをダウンロードして、<a href='http://meshcommander.com' rel='noreferrer noopener' target='_blank'> MeshCommander </を使用しますa>スクリプトを実行してコンピューターを構成します。", EscapeHtml(mesh.name)) + '<br /><br />';
3189 //x += addHtmlValue('Setup CIRA', '<a href="mescript.ashx?type=1&meshid=' + meshidx.substring(0, 16) + '" download>cira_setup.mescript</a>');
3190 x += addHtmlValue("CIRAのセットアップ", '<a href="mescript.ashx?type=1&meshid=' + meshid + '" download>cira_setup.mescript</a>');
3191 x += addHtmlValue("CIRAのクリーンアップ", '<a href="mescript.ashx?type=2" download>cira_clean.mescript</a>');
3192 x += '</div>';
3193
3194 // Setup CIRA with user/pass authentication (Somewhat difficult)
3195 - x += '<div id=dlgAddCira1 style=display:none>' + format("新しいIntel&reg;を追加するにはAMTデバイスからCIRAを使用したデバイスグループ\"{0} \"に、Intel AMT内で信頼されたルートとして次の証明書をロード", EscapeHtml(mesh.name));
3195 + x += '<div id=dlgAddCira1 style=display:none>' + format("新しいIntel&reg;を追加するにはAMTデバイスからCIRAを使用したデバイスグループ\"{0}\"に、Intel AMT内で信頼されたルートとして次の証明書をロード", EscapeHtml(mesh.name));
3196 if (serverinfo.mpspass) { x += (" このユーザー名とパスワードを使用してサーバーに対して認証します。" + '<br /><br />'); } else { x += (" このユーザー名とパスワードを使用してサーバーに対して認証します。" + '<br /><br />'); }
3197 x += addHtmlValue("ルート証明書", '<a href=\"' + "MeshServerRootCert.cer" + '\" download>' + "ルート証明書ファイル" + '</a>');
3198 x += addHtmlValue("ユーザー名", '<input style=width:230px readonly value="' + meshidx.substring(0, 16) + '" />');
@@ -3202,7 +3202,7 @@
3202
3203 // Setup CIRA with certificate authentication (Really difficult, only if TLS offload is not used)
3204 if ((features & 16) == 0) {
3205 - x += '<div id=dlgAddCira2 style=display:none>' + format("新しいIntel&reg;を追加するにはCIRAを使用してデバイスグループ\"{0} \"へのAMTデバイス、Intel AMT内の信頼されたルートとして次の証明書を読み込み、次の共通名を持つクライアント証明書を使用して認証し、次のサーバーに接続します。", EscapeHtml(mesh.name)) + '<br /><br />';
3205 + x += '<div id=dlgAddCira2 style=display:none>' + format("新しいIntel&reg;を追加するにはCIRAを使用してデバイスグループ\"{0}\"へのAMTデバイス、Intel AMT内の信頼されたルートとして次の証明書を読み込み、次の共通名を持つクライアント証明書を使用して認証し、次のサーバーに接続します。", EscapeHtml(mesh.name)) + '<br /><br />';
3206 x += addHtmlValue("ルート証明書", '<a href="MeshServerRootCert.cer" download>' + "ルート証明書ファイル" + '</a>');
3207 x += addHtmlValue("組織", '<input style=width:230px readonly value="' + meshidx + '" />');
3208 if (serverinfo != null) { x += addHtmlValue("MPSサーバー", '<input style=width:230px readonly value="' + EscapeHtml(serverinfo.mpsname) + ':' + serverinfo.mpsport + '" />'); }
@@ -3234,7 +3234,7 @@
3234 var x = '', mesh = meshes[meshid];
3235 if (features & 64) {
3236 x += addHtmlValue("招待タイプ", '<select id=d2InviteType onchange=d2ChangedInviteType() style=width:236px><option value=0>Link invitation</option><option value=1>Email invitation</option></select>') + '<hr />';
3237 - x += '<div id=emailInviteDiv style=display:none>' + format("メッシュエージェントをインストールする人を招待します。 \"{0} \"デバイスグループのメッシュエージェントインストールへのリンクが記載されたメール。", EscapeHtml(mesh.name)) + '<br /><br />';
3237 + x += '<div id=emailInviteDiv style=display:none>' + format("メッシュエージェントをインストールする人を招待します。 \"{0}\"デバイスグループのメッシュエージェントインストールへのリンクが記載されたメール。", EscapeHtml(mesh.name)) + '<br /><br />';
3238 x += addHtmlValue("名前(オプション)", '<input id=agentInviteName value="" style=width:230px maxlength=64 />');
3239 x += addHtmlValue("Eメール", '<input id=agentInviteEmail style=width:230px placeholder=\"' + "example@email.com" + '\" onkeyup=validateAgentInvite()></input>');
3240 x += addHtmlValue("オペレーティング・システム", '<select id=agentInviteNameOs onchange=d2ChangedInviteType() style=width:236px><option value=4>' + "インストールリンクを送信" + '</option><option value=0 selected>' + "サポートされているもの" + '</option><option value=1>' + "Windowsのみ" + '</option><option value=3>' + "Apple MacOSのみ" + '</option><option value=2>' + "Linuxのみ" + '</option></select>');
@@ -3245,7 +3245,7 @@
3245 x += addHtmlValue("メッセージ" + '<br />' + "(オプション)", '<textarea id=agentInviteMessage value="" style=width:230px;height:100px;resize:none maxlength=1024 /></textarea>');
3246 x += '</div>';
3247 }
3248 - x += '<div id=urlInviteDiv>' + format("招待リンクを共有して、メッシュエージェントをインストールする人を招待します。このリンクは、ユーザーに\"{0} \"デバイスグループのインストール手順を示します。リンクは公開されており、このサーバーのアカウントは必要ありません。", EscapeHtml(mesh.name)) + '<br /><br />';
3248 + x += '<div id=urlInviteDiv>' + format("招待リンクを共有して、メッシュエージェントをインストールする人を招待します。このリンクは、ユーザーに\"{0}\"デバイスグループのインストール手順を示します。リンクは公開されており、このサーバーのアカウントは必要ありません。", EscapeHtml(mesh.name)) + '<br /><br />';
3249 x += addHtmlValue("リンクの有効期限", '<select id=d2inviteExpire style=width:236px onchange=d2RequestInvitationLink()><option value=1>' + "1時間" + '</option><option value=8>' + "8時間" + '</option><option value=24>' + "1日" + '</option><option value=168>' + "1週間" + '</option><option value=5040>' + "1ヶ月" + '</option><option value=0>' + "無制限" + '</option></select>');
3250 x += '<div id=agentInvitationLinkDiv style="text-align:center;font-size:large;margin:16px;display:none"><a href=# id=agentInvitationLink target="_blank" style=cursor:pointer></a> <img src=images/link4.png height=10 width=10 title=\"' + "リンクをクリップボードにコピー" + '\" style=cursor:pointer onclick=d2CopyInviteToClip()></div></div>';
3251 setDialogMode(2, "招待する", 3, performAgentInvite, x, meshid);
@@ -3297,7 +3297,7 @@
3297
3298 // Windows agent install
3299 //x += "<div id=agins_windows>To add a new computer to device group \"" + EscapeHtml(mesh.name) + "\", download the mesh agent and configuration file and install the agent on the computer to manage.<br /><br />";
3300 - x += '<div id=agins_windows>' + format("デバイスグループ\"{0} \"に新しいコンピューターを追加するには、メッシュエージェントをダウンロードし、管理するコンピューターにインストールします。このエージェントには、サーバーとデバイスグループの情報が埋め込まれています。", EscapeHtml(mesh.name)) + '<br /><br />';
3300 + x += '<div id=agins_windows>' + format("デバイスグループ\"{0}\"に新しいコンピューターを追加するには、メッシュエージェントをダウンロードし、管理するコンピューターにインストールします。このエージェントには、サーバーとデバイスグループの情報が埋め込まれています。", EscapeHtml(mesh.name)) + '<br /><br />';
3301 x += addHtmlValue("メッシュエージェント", '<a id=aginsw32lnk href="meshagents?id=3&meshid=' + meshid.split('/')[2] + '&installflags=0" download onclick="setDialogMode(0)" title=\"' + "MeshAgentの32ビットバージョン" + '\">' + "Windows(.exe)" + '</a> <img src=images/link4.png height=10 width=10 title="Copy Windows 32bit agent URL to clipboard" style=cursor:pointer onclick=copyAgentUrl("meshagents?id=3&meshid=' + meshid.split('/')[2] + '&installflags=",1)>');
3302 x += addHtmlValue("メッシュエージェント", '<a id=aginsw64lnk href="meshagents?id=4&meshid=' + meshid.split('/')[2] + '&installflags=0" download onclick="setDialogMode(0)" title=\"' + "MeshAgentの64ビットバージョン" + '\">' + "Windows x64(.exe)" + '</a> <img src=images/link4.png height=10 width=10 title="Copy Windows 64bit agent URL to clipboard" style=cursor:pointer onclick=copyAgentUrl("meshagents?id=4&meshid=' + meshid.split('/')[2] + '&installflags=",1)>');
3303 if (debugmode > 0) { x += addHtmlValue("設定ファイル", '<a id=aginswmshlnk href="meshsettings?id=' + meshid.split('/')[2] + '&installflags=0" rel="noreferrer noopener" target="_blank">' + format("{0}設定(.msh)", EscapeHtml(mesh.name)) + '</a>'); }
@@ -3306,10 +3306,10 @@
3306 // Linux agent install
3307 x += '<div id=agins_linux style=display:none>' + format("{0}にコンピューターを追加するには、次のコマンドを実行します。ルート資格情報が必要になります。", EscapeHtml(mesh.name)) + '<br />';
3308 x += '<textarea id=agins_linux_area rows=2 cols=20 readonly=readonly style=width:100%;resize:none;height:120px;overflow:scroll;font-size:12px readonly></textarea>';
3309 - x += '<div style=\'font-size:x-small\'>' + "* BSDの場合、最初に\"pkg install wget sudo bash \"を実行します。" + '</div></div>';
3309 + x += '<div style=\'font-size:x-small\'>' + "* BSDの場合、最初に\"pkg install wget sudo bash\"を実行します。" + '</div></div>';
3310
3311 // MacOS agent install
3312 - x += '<div id=agins_osx style=display:none>' + format("デバイスグループ\"{0} \"に新しいコンピューターを追加するには、メッシュエージェントをダウンロードし、管理するコンピューターにインストールします。このエージェントインストーラーには、サーバーとデバイスグループの情報が埋め込まれています。", EscapeHtml(mesh.name)) + '<br /><br />';
3312 + x += '<div id=agins_osx style=display:none>' + format("デバイスグループ\"{0}\"に新しいコンピューターを追加するには、メッシュエージェントをダウンロードし、管理するコンピューターにインストールします。このエージェントインストーラーには、サーバーとデバイスグループの情報が埋め込まれています。", EscapeHtml(mesh.name)) + '<br /><br />';
3313 x += addHtmlValue("メッシュエージェント", '<a href="meshosxagent?id=16&meshid=' + meshid.split('/')[2] + '" rel="noreferrer noopener" target="_blank" title="64bit version of MacOS Mesh Agent">MacOS Agent (64bit)</a> <img src=images/link4.png height=10 width=10 title="' + "MacOSエージェントのURLをクリップボードにコピーします" + '" style=cursor:pointer onclick=copyAgentUrl("meshosxagent?id=16&meshid=' + meshid.split('/')[2] + '",0)>');
3314 x += '</div>';
3315
@@ -5871,7 +5871,7 @@
5871 function dmousemove(e) { setSessionActivity(); e.addx = Q('DeskParent').scrollLeft; e.addy = Q('DeskParent').scrollTop; if (!xxdialogMode && desktop != null && Q('DeskControl').checked) { if ((webRtcDesktop != null) && (webRtcDesktop.softdesktop != null)) { webRtcDesktop.softdesktop.m.mousemove(e); desktop.m.sendKeepAlive(); } else { desktop.m.mousemove(e); } } }
5872 function dmousewheel(e) { setSessionActivity(); e.addx = Q('DeskParent').scrollLeft; e.addy = Q('DeskParent').scrollTop; if (!xxdialogMode && desktop != null && Q('DeskControl').checked) { if ((webRtcDesktop != null) && (webRtcDesktop.softdesktop != null)) { webRtcDesktop.softdesktop.m.mousewheel(e); desktop.m.sendKeepAlive(); } else { if (desktop.m.mousewheel) { desktop.m.mousewheel(e); } } haltEvent(e); return true; } return false; }
5873 function drotate(x) { if (!xxdialogMode && desktop != null) { desktop.m.setRotation(desktop.m.rotation + x); deskAdjust(); deskAdjust(); } }
5874 - function stopProcess(id, name) { setDialogMode(2, "プロセス制御", 3, stopProcessEx, format("プロセス#{0} \"{1} \"を停止しますか?", id, name), id); return false; }
5874 + function stopProcess(id, name) { setDialogMode(2, "プロセス制御", 3, stopProcessEx, format("プロセス#{0} \"{1}\"を停止しますか?", id, name), id); return false; }
5875 function stopProcessEx(buttons, tag) { meshserver.send({ action: 'msg', type: 'pskill', nodeid: currentNode._id, value: tag }); setTimeout(refreshDeskTools, 300); }
5876
5877 //
views/translations/default_nl.handlebars new
+9789
@@ -0,0 +1,9789 @@
1 +<!DOCTYPE html><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head>
2 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 + <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
4 + <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 + <meta name="apple-mobile-web-app-capable" content="yes">
6 + <meta name="format-detection" content="telephone=no">
7 + <link rel="shortcut icon" type="image/x-icon" href="{{{domainurl}}}favicon.ico">
8 + <link keeplink="1" type="text/css" href="styles/style.css" media="screen" rel="stylesheet" title="CSS">
9 + <link type="text/css" href="styles/ol.css" media="screen" rel="stylesheet" title="CSS">
10 + <link type="text/css" href="styles/ol3-contextmenu.min.css" media="screen" rel="stylesheet" title="CSS">
11 + <script type="text/javascript" src="scripts/common-0.0.1.js"></script>
12 + <script type="text/javascript" src="scripts/meshcentral.js"></script>
13 + <script type="text/javascript" src="scripts/amt-0.2.0.js"></script>
14 + <script type="text/javascript" src="scripts/amt-wsman-0.2.0.js"></script>
15 + <script type="text/javascript" src="scripts/amt-desktop-0.0.2.js"></script>
16 + <script type="text/javascript" src="scripts/amt-terminal-0.0.2.js"></script>
17 + <script type="text/javascript" src="scripts/zlib.js"></script>
18 + <script type="text/javascript" src="scripts/zlib-inflate.js"></script>
19 + <script type="text/javascript" src="scripts/zlib-adler32.js"></script>
20 + <script type="text/javascript" src="scripts/zlib-crc32.js"></script>
21 + <script type="text/javascript" src="scripts/amt-redir-ws-0.1.0.js"></script>
22 + <script type="text/javascript" src="scripts/amt-wsman-ws-0.2.0.js"></script>
23 + <script type="text/javascript" src="scripts/agent-redir-ws-0.1.1.js"></script>
24 + <script type="text/javascript" src="scripts/agent-redir-rtc-0.1.0.js"></script>
25 + <script type="text/javascript" src="scripts/agent-desktop-0.0.2.js"></script>
26 + <script type="text/javascript" src="scripts/qrcode.min.js"></script>
27 + <script keeplink="1" type="text/javascript" src="scripts/u2f-api.js"></script>
28 + <script keeplink="1" type="text/javascript" src="scripts/charts.js"></script>
29 + <script keeplink="1" type="text/javascript" src="scripts/filesaver.js"></script>
30 + </head><body id="body" onload="if (typeof(startup) !== 'undefined') startup();" oncontextmenu="handleContextMenu(event)" style="display:none;min-width:495px">{{{StartGeoLocation}}}
31 + <script keeplink="1" type="text/javascript" src="scripts/ol.js"></script>
32 + <script keeplink="1" type="text/javascript" src="scripts/ol3-contextmenu.js"></script>
33 + {{{EndGeoLocation}}}
34 + <title>{{{title}}}</title>
35 +
36 +
37 + <!-- right click menu -->
38 + <div id="contextMenu" class="contextMenu noselect" style="display:none">
39 + <div id="cxinfo" class="cmtext" onclick="cmaction(1,event)"><b>Informatie</b></div>
40 + <div id="cxdesktop" class="cmtext" onclick="cmaction(3,event)">bureaublad</div>
41 + <div id="cxterminal" class="cmtext" onclick="cmaction(2,event)">Terminal</div>
42 + <div id="cxfiles" class="cmtext" onclick="cmaction(4,event)">Bestanden</div>
43 + <div id="cxevents" class="cmtext" onclick="cmaction(5,event)">Gebeurtenissen</div>
44 + <div id="cxconsole" class="cmtext" onclick="cmaction(6,event)">Console</div>
45 + <hr id="cxmgroupsplit">
46 + <div id="cxmdesktop" class="cmtext" onclick="cmaction(7,event)" style="display:none">Multi Desktop</div>
47 + </div>
48 + <div id="meshContextMenu" class="contextMenu noselect" style="display:none;min-width:0px">
49 + <div id="cxselectall" class="cmtext" onclick="cmmeshaction(1,event)">Selecteer alles</div>
50 + <div id="cxselectnone" class="cmtext" onclick="cmmeshaction(2,event)">Selecteer niets</div>
51 + <!--
52 + <hr id="cxmgroupsplit2" style="display:none" />
53 + <div id="cxmmdesktop" class="cmtext" style="display:none" onclick="cmmeshaction(3,event)">Multi-Desktop</div>
54 + -->
55 + </div>
56 + <div id="termShellContextMenu" class="contextMenu noselect" style="display:none;min-width:0px">
57 + <div id="cxtermnorm" class="cmtext" onclick="cmtermaction(1,event)"><b>Beheerder Shell</b></div>
58 + <div id="cxtermps" class="cmtext" onclick="cmtermaction(6,event)">Beheerder PowerShell</div>
59 + <div id="cxtermunorm" class="cmtext" onclick="cmtermaction(8,event)">Gebruiker Shell</div>
60 + <div id="cxtermups" class="cmtext" onclick="cmtermaction(9,event)">Gebruiker PowerShell</div>
61 + </div>
62 + <div id="termShellContextMenuLinux" class="contextMenu noselect" style="display:none;min-width:0px">
63 + <div id="cxtermnorm" class="cmtext" onclick="cmtermaction(1,event)"><b>Root Shell</b></div>
64 + <div id="cxtermps" class="cmtext" onclick="cmtermaction(8,event)">Gebruiker Shell</div>
65 + </div>
66 + <!--
67 + <div id="pluginTabContextMenu" class="contextMenu noselect" style="display:none;min-width:0px">
68 + <div id="cxclose" class="cmtext" onclick="pluginTabClose(event)">Close Tab</div>
69 + </div>
70 + -->
71 + <!-- main page -->
72 + <div id="container">
73 + <div id="notifiyBox" class="notifiyBox" style="display:none"></div>
74 + <div id="masthead" class="noselect">
75 + <div style="float:left">{{{titlehtml}}}</div>
76 + <div class="title">{{{title1}}}</div>
77 + <div class="title2">{{{title2}}}</div>
78 + <div style="float:right">
79 + <div id="notificationCount" onclick="clickNotificationIcon()" class="unselectable" style="display: none;" title="Klik om de huidige meldingen te bekijken">0</div>
80 + </div>
81 + <p id="logoutControl"><span id="logoutControlSpan" style="color:white"></span><span id="idleTimeoutNotify" style="color:yellow"></span></p>
82 + </div>
83 + <div id="page_leftbar">
84 + <div style="height:16px"></div>
85 + <div id="LeftMenuMyDevices" tabindex="0" class="lbbutton lbbuttonsel" title="Mijn apparaten" onclick="go(1,event)" onkeypress="if (event.key=='Enter') { go(1); }">
86 + <div class="lb2"></div>
87 + </div>
88 + <div id="LeftMenuMyAccount" tabindex="0" class="lbbutton" title="Mijn Account" onclick="go(2,event)" onkeypress="if (event.key=='Enter') { go(2); }">
89 + <div class="lb1"></div>
90 + </div>
91 + <div id="LeftMenuMyEvents" tabindex="0" class="lbbutton" title="Mijn gebeurtenissen" onclick="go(3,event)" onkeypress="if (event.key=='Enter') { go(3); }">
92 + <div class="lb3"></div>
93 + </div>
94 + <div id="LeftMenuMyFiles" tabindex="0" class="lbbutton" style="display:none" title="Mijn bestanden" onclick="go(5,event)" onkeypress="if (event.key=='Enter') { go(5); }">
95 + <div class="lb4"></div>
96 + </div>
97 + <div id="LeftMenuMyUsers" tabindex="0" class="lbbutton" style="display:none" title="Mijn gebruikers" onclick="go(4,event)" onkeypress="if (event.key=='Enter') { go(4); }">
98 + <div class="lb5"></div>
99 + </div>
100 + <div id="LeftMenuMyServer" tabindex="0" class="lbbutton" style="display:none" title="Mijn server" onclick="go(6,event)" onkeypress="if (event.key=='Enter') { go(6); }">
101 + <div class="lb6"></div>
102 + </div>
103 + </div>
104 + <div id="topbar" class="noselect">
105 + <div>
106 + <div style="position:relative">
107 + <div tabindex="0" id="uiMenuButton" title="Selectie gebruikersinterface" onclick="showUserInterfaceSelectMenu()" onkeypress="if (event.key == 'Enter') showUserInterfaceSelectMenu()">
108 + ♦
109 + <div id="uiMenu" style="display:none">
110 + <div tabindex="0" id="uiViewButton1" class="uiSelector" onclick="userInterfaceSelectMenu(1)" title="Linkerbalk interface" onkeypress="if (event.key == 'Enter') userInterfaceSelectMenu(1)"><div class="uiSelector1"></div></div>
111 + <div tabindex="0" id="uiViewButton2" class="uiSelector" onclick="userInterfaceSelectMenu(2)" title="Boven werkbalk interface" onkeypress="if (event.key == 'Enter') userInterfaceSelectMenu(2)"><div class="uiSelector2"></div></div>
112 + <div tabindex="0" id="uiViewButton3" class="uiSelector" onclick="userInterfaceSelectMenu(3)" title="Interface met vaste breedte" onkeypress="if (event.key == 'Enter') userInterfaceSelectMenu(3)"><div class="uiSelector3"></div></div>
113 + <div tabindex="0" id="uiViewButton4" class="uiSelector" onclick="toggleNightMode()" title="Wissel nachtmodus" onkeypress="if (event.key == 'Enter') toggleNightMode()"><div class="uiSelector4"></div></div>
114 + </div>
115 + </div>
116 + <table id="MainMenuSpan" cellpadding="0" cellspacing="0" class="style1">
117 + <tbody><tr>
118 + <td tabindex="0" id="MainMenuMyDevices" class="topbar_td style3x" onclick="go(1,event)" onkeypress="if (event.key == 'Enter') go(1)">Mijn apparaten</td>
119 + <td tabindex="0" id="MainMenuMyAccount" class="topbar_td style3x" onclick="go(2,event)" onkeypress="if (event.key == 'Enter') go(2)">Mijn Account</td>
120 + <td tabindex="0" id="MainMenuMyEvents" class="topbar_td style3x" onclick="go(3,event)" onkeypress="if (event.key == 'Enter') go(3)">Mijn gebeurtenissen</td>
121 + <td tabindex="0" id="MainMenuMyFiles" class="topbar_td style3x" onclick="go(5,event)" onkeypress="if (event.key == 'Enter') go(5)">Mijn bestanden</td>
122 + <td tabindex="0" id="MainMenuMyUsers" class="topbar_td style3x" onclick="go(4,event)" onkeypress="if (event.key == 'Enter') go(4)">Mijn gebruikers</td>
123 + <td tabindex="0" id="MainMenuMyServer" class="topbar_td style3x" onclick="go(6,event)" onkeypress="if (event.key == 'Enter') go(6)">Mijn server</td>
124 + <td class="topbar_td_end style3">&nbsp;</td>
125 + </tr>
126 + </tbody></table>
127 + <div id="MainSubMenuSpan" style="display:none">
128 + <table id="MainSubMenu" cellpadding="0" cellspacing="0" class="style1">
129 + <tbody><tr>
130 + <td tabindex="0" id="MainDev" class="topbar_td style3x" onclick="go(10,event)" onkeypress="if (event.key == 'Enter') go(10)">Algemeen</td>
131 + <td tabindex="0" id="MainDevDesktop" class="topbar_td style3x" onclick="go(11,event)" onkeypress="if (event.key == 'Enter') go(11)">bureaublad</td>
132 + <td tabindex="0" id="MainDevTerminal" class="topbar_td style3x" onclick="go(12,event)" onkeypress="if (event.key == 'Enter') go(12)">Terminal</td>
133 + <td tabindex="0" id="MainDevFiles" class="topbar_td style3x" onclick="go(13,event)" onkeypress="if (event.key == 'Enter') go(13)">Bestanden</td>
134 + <td tabindex="0" id="MainDevEvents" class="topbar_td style3x" onclick="go(16,event)" onkeypress="if (event.key == 'Enter') go(16)">Gebeurtenissen</td>
135 + <td tabindex="0" id="MainDevInfo" class="topbar_td style3x" onclick="go(17,event)" onkeypress="if (event.key == 'Enter') go(17)">Details</td>
136 + <td tabindex="0" id="MainDevAmt" class="topbar_td style3x" onclick="go(14,event)" onkeypress="if (event.key == 'Enter') go(14)">Intel® AMT</td>
137 + <td tabindex="0" id="MainDevConsole" class="topbar_td style3x" onclick="go(15,event)" onkeypress="if (event.key == 'Enter') go(15)">Console</td>
138 + <td tabindex="0" id="MainDevPlugins" class="topbar_td style3x" onclick="go(19,event)" onkeypress="if (event.key == 'Enter') go(19)">Plugins</td>
139 + <td class="topbar_td_end style3">&nbsp;</td>
140 + </tr>
141 + </tbody></table>
142 + </div>
143 + <div id="MeshSubMenuSpan" style="display:none">
144 + <table id="MeshSubMenu" cellpadding="0" cellspacing="0" class="style1">
145 + <tbody><tr>
146 + <td tabindex="0" id="MeshGeneral" class="topbar_td style3x" onclick="go(20,event)" onkeypress="if (event.key == 'Enter') go(20)">Algemeen</td>
147 + <td class="topbar_td_end style3">&nbsp;</td>
148 + </tr>
149 + </tbody></table>
150 + </div>
151 + <div id="UserSubMenuSpan" style="display:none">
152 + <table id="UserSubMenu" cellpadding="0" cellspacing="0" class="style1">
153 + <tbody><tr>
154 + <td tabindex="0" id="UserGeneral" class="topbar_td style3x" onclick="go(30,event)" onkeypress="if (event.key == 'Enter') go(30)">Algemeen</td>
155 + <td tabindex="0" id="UserEvents" class="topbar_td style3x" onclick="go(31,event)" onkeypress="if (event.key == 'Enter') go(31)">Gebeurtenissen</td>
156 + <td class="topbar_td_end style3">&nbsp;</td>
157 + </tr>
158 + </tbody></table>
159 + </div>
160 + <div id="ServerSubMenuSpan" style="display:none">
161 + <table id="ServerSubMenu" cellpadding="0" cellspacing="0" class="style1">
162 + <tbody><tr>
163 + <td tabindex="0" id="ServerGeneral" class="topbar_td style3x" onclick="go(6,event)" onkeypress="if (event.key == 'Enter') go(6)">Algemeen</td>
164 + <td tabindex="0" id="ServerStats" class="topbar_td style3x" onclick="go(40,event)" onkeypress="if (event.key == 'Enter') go(40)">Statistieken</td>
165 + <td tabindex="0" id="ServerConsole" class="topbar_td style3x" onclick="go(115,event)" onkeypress="if (event.key == 'Enter') go(115)">Console</td>
166 + <td tabindex="0" id="ServerTrace" class="topbar_td style3x" onclick="go(41,event)" onkeypress="if (event.key == 'Enter') go(41)">Traceer</td>
167 + <td tabindex="0" id="ServerPlugins" class="topbar_td style3x" onclick="go(42,event)" onkeypress="if (event.key == 'Enter') go(42)">Plugins</td>
168 + <td class="topbar_td_end style3">&nbsp;</td>
169 + </tr>
170 + </tbody></table>
171 + </div>
172 + <div id="UserDummyMenuSpan">
173 + <table id="UserDummyMenu" cellpadding="0" cellspacing="0" class="style1">
174 + <tbody><tr><td class="style3" style="">&nbsp;</td></tr>
175 + </tbody></table>
176 + </div>
177 + </div>
178 + </div>
179 + </div>
180 + <div id="column_l">
181 + <div id="p0" style="display:none">
182 + <div id="p0message"><span id="p0span">Server verbroken</span>, <href onclick="reload()" style="cursor:pointer"><u>klik om opnieuw verbinding te maken</u></href>.</div>
183 + </div>
184 + <div id="p1" style="display:none">
185 + <div style="display:none" id="devListToolbarViewIcons">
186 + <div tabindex="0" id="devViewButton1" class="viewSelector" onclick="onDeviceViewChange(1)" onkeypress="if (event.key == 'Enter') { onDeviceViewChange(1); }" title="kolommen"><div class="viewSelector2"></div></div>
187 + <div tabindex="0" id="devViewButton2" class="viewSelector" onclick="onDeviceViewChange(2)" onkeypress="if (event.key == 'Enter') { onDeviceViewChange(2); }" title="Lijst"><div class="viewSelector1"></div></div>
188 + <div tabindex="0" id="devViewButton3" class="viewSelector" onclick="onDeviceViewChange(3)" onkeypress="if (event.key == 'Enter') { onDeviceViewChange(3); }" title="Bureaubladen"><div class="viewSelector3"></div></div>
189 + <div tabindex="0" id="devViewButton4" class="viewSelector" onclick="onDeviceViewChange(4)" onkeypress="if (event.key == 'Enter') { onDeviceViewChange(4); }" title="Kaart" style="display:none"><div class="viewSelector4"></div></div>
190 + </div><div><h1>Mijn apparaten</h1></div>
191 + <table id="devListToolbarSpan" class="noselect">
192 + <tbody><tr>
193 + <td class="h1"></td>
194 + <td id="devListToolbar" class="style14" style="display:none">
195 + &nbsp;&nbsp;<input type="button" id="SelectAllButton" onclick="selectallButtonFunction();" value="Selecteer alles">&nbsp;
196 + <input type="button" id="GroupActionButton" disabled="disabled" value="Groepsactie" onclick="groupActionFunction()">&nbsp;
197 + <input id="SearchInput" type="text" placeholder="Filter" onchange="masterUpdate(5)" onkeyup="masterUpdate(5)" autocomplete="off" onfocus="onSearchFocus(1)" onblur="onSearchFocus(0)">&nbsp;
198 + <label><input type="checkbox" id="RealNameCheckBox" onclick="onRealNameCheckBox()"><span title="Toon apparaten besturingssysteemnaam">Naam van het besturingssysteem</span></label>
199 + </td>
200 + <td id="kvmListToolbar" class="style14" style="display:none">
201 + &nbsp;&nbsp;<input type="button" onclick="connectAllKvmFunction()" value="Alles verbinden">&nbsp;
202 + <input type="button" onclick="disconnectAllKvmFunction()" value="Verbreek alles">&nbsp;
203 + <label><input type="checkbox" id="autoConnectDesktopCheckbox" onclick="autoConnectDesktops(event)" title="Automatisch verbinden">Automatisch&nbsp;</label>
204 + <input type="button" onclick="showMultiDesktopSettings()" value="Instellingen">&nbsp;
205 + </td>
206 + <td id="devMapToolbar" class="style14" style="display:none">
207 + &nbsp;&nbsp;<input type="text" id="mapSearchLocation" placeholder="Zoek locatie" onfocus="onMapSearchFocus(1)" onblur="onMapSearchFocus(0)">
208 + <input type="button" value="Zoeken" title="Zoeken naar locatie" onclick="getSearchLocation()">
209 + <input type="button" id="refreshmap" title="Reset kaartweergave" value="Reset" onclick="refreshMap(false,true)">
210 + </td>
211 + <td class="auto-style1" style="height:100%">
212 + <div style="display:none" id="devListToolbarView">
213 + Kijken
214 + <select id="viewselect" onchange="onDeviceViewChange()">
215 + <option value="1">kolommen</option>
216 + <option value="2">Lijst</option>
217 + <option value="3">Bureaubladen</option>
218 + <option id="viewselectmapoption" value="4" style="display:none">Kaart</option>
219 + </select>
220 + </div>
221 + <div style="display:none" id="devListToolbarSort">
222 + Sorteer
223 + <select id="sortselect" onchange="masterUpdate(6)">
224 + <option>Groep</option>
225 + <option>Power</option>
226 + <option>Apparaat</option>
227 + <option>Tags</option>
228 + </select>
229 + &nbsp;
230 + </div>
231 + <div style="display:none" id="devListToolbarSize">
232 + Grootte
233 + <select id="sizeselect" onchange="onDeviceViewChange()">
234 + <option value="0">Klein</option>
235 + <option value="1">Gemiddeld</option>
236 + <option value="2">Grote</option>
237 + </select>
238 + &nbsp;
239 + </div>
240 + </td>
241 + <td class="h2"></td>
242 + </tr>
243 + </tbody></table>
244 + <div id="NoMeshesPanel" style="display:none">
245 + <table>
246 + <tbody><tr>
247 + <td valign="top" style="width: 50px">
248 + <img src="images/info.png">
249 + </td>
250 + <td>
251 + <div id="getStarted1">om meteen aan de slag te gaan, <a href="#" onclick="return account_createMesh()"><strong>klik hier om een apparaatgroep te maken</strong></a>.</div>
252 + <div id="getStarted2">Geen apparaatgroepen.</div>
253 + </td>
254 + </tr>
255 + </tbody></table>
256 + </div>
257 + <div id="xdevices" class="noselect" style="display:none"></div>
258 + <div id="xdevicesmap" style="display:none">
259 + <div id="xmapSearchResultsDlg" style="display:none">
260 + <div id="xmapSearchResultsBck">
261 + <div id="xmapSearchClose" onclick="mapCloseSearchWindow()"><b>X</b></div>
262 + <div style="padding:5px">Locatie resultaten</div>
263 + <div style="width:100%;margin:6px"></div>
264 + </div>
265 + <div id="xmapSearchResults" style="margin:6px"></div>
266 + </div>
267 + </div>
268 + <div id="xmap-info-window"></div>
269 + </div>
270 + <div id="p2" style="display:none">
271 + <h1>Mijn Account</h1>
272 + <img id="p2AccountImage" alt="" src="images/clipboard-128.png">
273 + <div id="p2AccountSecurity" style="display:none">
274 + <p><strong>Gebruikersaccount beveiliging</strong></p>
275 + <div style="margin-left:25px">
276 + <div id="manageAuthApp"><div class="p2AccountActions"><span id="authAppSetupCheck"><strong>✓</strong></span></div><span><a href="#" onclick="return account_manageAuthApp()">Beheer authenticator-app</a><br></span></div>
277 + <div id="manageHardwareOtp"><div class="p2AccountActions"><span id="authKeySetupCheck"><strong>✓</strong></span></div><span><a href="#" onclick="return account_manageHardwareOtp(0)">Beheer beveiligingssleutels</a><br></span></div>
278 + <div id="manageOtp"><div class="p2AccountActions"><span id="authCodesSetupCheck"><strong>✓</strong></span></div><span><a href="#" onclick="return account_manageOtp(0)">Beheer back-up codes</a><br></span></div>
279 + </div>
280 + </div>
281 + <div id="p2AccountActions">
282 + <p><strong>gebruikersacties</strong></p>
283 + <p class="mL">
284 + <span id="verifyEmailId" style="display:none"><a href="#" onclick="return account_showVerifyEmail()">Verifieer Email</a><br></span>
285 + <span id="accountEnableNotificationsSpan" style="display:none"><a href="#" onclick="return account_enableNotifications()">Schakel webmeldingen in</a><br></span>
286 + <a href="#" onclick="return account_showLocalizationSettings()">Lokalisatie instellingen</a><br>
287 + <a href="#" onclick="return account_showAccountNotifySettings()">meldingsinstellingen</a><br>
288 + <span id="accountChangeEmailAddressSpan" style="display:none"><a href="#" onclick="return account_showChangeEmail()">Verander e-mailadres</a><br></span>
289 + <a href="#" onclick="return account_showChangePassword()">Verander wachtwoord</a><span id="p2nextPasswordUpdateTime"></span><br>
290 + <a href="#" onclick="return account_showDeleteAccount()">Verwijder account</a><br>
291 + </p>
292 + <br style="clear:both">
293 + </div>
294 + <strong>Apparaatgroepen</strong>
295 + <span id="p2createMeshLink1">( <a href="#" onclick="return account_createMesh()" class="newMeshBtn"> Nieuw</a> )</span>
296 + <br><br>
297 + <div id="p2meshes"></div>
298 + <div id="p2noMeshFound" style="display:none">Geen apparaatgroepen.<span id="p2createMeshLink2"> <a href="#" onclick="return account_createMesh()"><strong>Begin hier!</strong></a></span></div>
299 + <br style="clear:both">
300 + </div>
301 + <div id="p3" style="display:none">
302 + <h1>Mijn gebeurtenissen</h1>
303 + <table class="pTable">
304 + <tbody><tr>
305 + <td class="h1"></td>
306 + <td class="auto-style1">
307 + Tonen
308 + <select id="p3limitdropdown" onchange="refreshEvents()">
309 + <option value="60">Laatste 60</option>
310 + <option value="120">Laatste 120</option>
311 + <option value="250">Laatste 250</option>
312 + <option value="500">Laatste 500</option>
313 + <option value="1000">Laatste 1000</option>
314 + </select>&nbsp;
315 + <a href="#" onclick="p3showDownloadEventsDialog(2)"><img src="images/link4.png" height="10" width="10" title="Download gebeurtenissen" style="cursor:pointer"></a>&nbsp;
316 + </td>
317 + <td class="h2"></td>
318 + </tr>
319 + </tbody></table>
320 + <div id="p3events" style=""></div>
321 + </div>
322 + <div id="p4" style="display:none">
323 + <h1>Mijn gebruikers</h1>
324 + <table class="pTable">
325 + <tbody><tr>
326 + <td class="h1"></td>
327 + <td class="style14">
328 + <div style="float:right">
329 + <input type="button" onclick="showUserBroadcastDialog()" style="margin-right:6px" value="Uitzending">
330 + <a href="#" onclick="p4downloadUserInfo()"><img style="cursor:pointer" title="Download gebruikers informatie" src="images/link4.png"></a>
331 + <a href="#" onclick="p4batchAccountCreate()"><img id="p4UserBatchCreate" style="cursor:pointer;display:none" title="Batch aanmaken gebruikersaccounts" src="images/link6.png"></a>
332 + </div>
333 + <div>
334 + <input id="UserNewAccountButton" type="button" style="margin-left:6px" onclick="showCreateNewAccountDialog()" value="Nieuw account...">
335 + <input id="UserSearchInput" type="text" style="width:120px;margin-left:6px" placeholder="Filter" onchange="onUserSearchInputChanged()" onkeyup="onUserSearchInputChanged()" autocomplete="off" onfocus="onUserSearchFocus(1)" onblur="onUserSearchFocus(0)">
336 + </div>
337 + </td>
338 + <td class="h2"></td>
339 + </tr>
340 + </tbody></table>
341 + <div id="p3users"></div>
342 + </div>
343 + <div id="p5" style="display:none">
344 + <h1>Mijn bestanden</h1>
345 + <table id="p5toolbar" cellpadding="0" cellspacing="0">
346 + <tbody><tr>
347 + <td id="p5filehead" valign="bottom">
348 + <div id="p5rightOfButtons"></div>
349 + <div>
350 + <input type="button" id="p5FolderUp" disabled="disabled" onclick="return p5folderup();" value="Omhoog">&nbsp;
351 + <input type="button" id="p5SelectAllButton" disabled="disabled" onclick="p5selectallfile();" value="Selecteer alles">&nbsp;
352 + <input type="button" id="p5RenameFileButton" disabled="disabled" value="Hernoemen" onclick="p5renamefile();">&nbsp;
353 + <input type="button" id="p5DeleteFileButton" disabled="disabled" value="Verwijderen" onclick="p5deletefile();">&nbsp;
354 + <!--<input type=button id=p5ViewFileButton disabled="disabled" value="View" onclick="p5viewfile()" />&nbsp;-->
355 + <input type="button" id="p5NewFolderButton" disabled="disabled" value="Nieuwe map" onclick="p5createfolder();">&nbsp;
356 + <input type="button" id="p5UploadButton" disabled="disabled" value="Uploaden" onclick="p5uploadFile()">&nbsp;
357 + <input type="button" id="p5CutButton" disabled="disabled" value="Knippen" onclick="p5copyFile(1)">&nbsp;
358 + <input type="button" id="p5CopyButton" disabled="disabled" value="Kopie" onclick="p5copyFile(0)">&nbsp;
359 + <input type="button" id="p5PasteButton" disabled="disabled" value="Plakken" onclick="p5pasteFile()">&nbsp;
360 + </div>
361 + </td>
362 + </tr>
363 + <tr>
364 + <td id="p5filesubhead">
365 + <div style="float:right">
366 + <select id="p5sortdropdown" onchange="updateFiles()">
367 + <option value="1" selected="selected">Sorteren op naam</option>
368 + <option value="2">Sorteren op grootte</option>
369 + <option value="3">Sorteren op datum</option>
370 + <option value="4">Aflopend op naam</option>
371 + <option value="5">Aflopend op grootte</option>
372 + <option value="6">Aflopend op datum</option>
373 + </select>
374 + </div>
375 + <div>&nbsp;&nbsp;<span id="p5currentpath"></span></div>
376 + </td>
377 + </tr>
378 + </tbody></table>
379 + <div id="p5filetable">
380 + <!--
381 + <form id=p5fileCatchAll method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame>
382 + <input type=file id=p5fileCatchAllInput name=files style="position:absolute;left:0;width:100%;top:0;bottom:0;opacity:0;display:none" onchange="p5fileCatchAllInputChanged(event)" />
383 + <input id=p5fileDragLink2 name="link" style="display:none" />
384 + <input type=submit id=p5fileCatchAllSubmit style="display:none" />
385 + </form>
386 + -->
387 + <div id="p5PublicShare" style=""><div>Deze bestanden worden openbaar gedeeld, klik op "link" om de openbare URL te krijgen.</div></div>
388 + <div id="bigok" style="display:none"><b>✓</b></div>
389 + <div id="bigfail" style="display:none"><b>✗</b></div>
390 + <span id="p5files"></span>
391 + </div>
392 + <table id="p5toolbarBottom" style="width:100%" cellpadding="0" cellspacing="0">
393 + <tbody><tr><td class="style6">&nbsp;<span id="p5bottomstatus"></span></td></tr>
394 + </tbody></table>
395 + </div>
396 + <div id="p6" style="display:none">
397 + <img id="MainMeshImage" src="serverpic.ashx">
398 + <h1>Mijn server</h1>
399 + <div id="p2ServerActions">
400 + <p><strong>Server acties</strong></p>
401 + <div class="mL">
402 + <div id="p2ServerActionsBackup"><a href="{{{domainurl}}}backup.zip" rel="noreferrer noopener" target="_blank">Download server back-up</a></div>
403 + <div id="p2ServerActionsRestore"><a href="#" onclick="return server_showRestoreDlg()">Herstel server met back-up</a></div>
404 + <div id="p2ServerActionsVersion"><a href="#" onclick="return server_showVersionDlg()">Controleer server versie</a></div>
405 + <div id="p2ServerActionsErrors"><a href="#" onclick="return server_showErrorsDlg()">Serverlogboek weergeven</a></div>
406 + </div>
407 + </div>
408 + <br><strong>Serverstatistieken</strong><br><br>
409 + <div id="serverStats">
410 + <div id="serverCpuChartView" style="display:none">
411 + <div class="chartViewCanvas"><canvas id="serverCpuChart"></canvas></div>
412 + <div class="chartViewText" id="serverCpuChartText"></div>
413 + </div>
414 + <div id="serverMemoryChartView" style="display:none">
415 + <div class="chartViewCanvas"><canvas id="serverMemoryChart"></canvas></div>
416 + <div class="chartViewText" id="serverMemoryChartText"></div>
417 + </div><br><br>
418 + <div id="serverStatsTable"></div>
419 + </div>
420 + <div id="serverWarningsDiv" style="display:none">
421 + <br><strong>Serverwaarschuwingen</strong><br><br>
422 + <div id="serverWarnings"></div>
423 + </div>
424 + </div>
425 + <div id="p10" style="display:none">
426 + <table style="width:100%" cellpadding="0" cellspacing="0">
427 + <tbody><tr>
428 + <td style="width:auto" valign="top">
429 + <div id="p10title">
430 + <div id="p10BackButton"><div class="backButton" tabindex="0" onclick="goBack()" title="Terug" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
431 + <h1>Algemeen - <span id="p10deviceName"></span></h1>
432 + </div>
433 + <div id="p10html"></div>
434 + </td>
435 + <td style="width:20px"></td>
436 + <td style="width:200px">
437 + <a href="#" onclick="p10showiconselector()"><img id="MainComputerImage"></a>
438 + <div id="MainComputerState"></div>
439 + </td>
440 + </tr>
441 + </tbody></table><br>
442 + <div id="p10html2"></div>
443 + <div id="p10html3"></div>
444 + </div>
445 + <div id="p11" class="noselect" style="display:none">
446 + <div id="p11title">
447 + <div id="p11deviceNameHeader">
448 + <div id="p11BackButton"><div class="backButton" tabindex="0" onclick="goBack()" title="Terug" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
449 + <div id="devListToolbarViewIcons"><div class="viewSelector" onclick="deskToggleFull(event)" title="Volledig scherm. Houd shift ingedrukt om de browser op volledig scherm weer te geven."><div class="viewSelector5"></div></div></div>
450 + <h1>bureaublad - <span id="p11deviceName"></span></h1>
451 + </div>
452 + </div>
453 + <div id="p11warning" onclick="showFeaturesDlg()">
454 + <div class="icon2"></div>
455 + <div class="warningbox">Intel® AMT omleidingspoort of KVM-functie is uitgeschakeld<span id="p11warninga">, klik hier om in te schakelen</span></div>
456 + </div>
457 + <div id="p11warning2" onclick="showPowerActionDlg()">
458 + <div class="icon2"></div>
459 + <div class="warningbox">Externe computer is niet ingeschakeld, klik hier om een stroomopdracht uit te voeren.</div>
460 + </div>
461 + <div id="deskarea0" cellpadding="0" cellspacing="0">
462 + <div id="deskarea1" class="areaHead">
463 + <div class="toright2">
464 + <span id="p11power"></span>&nbsp;
465 + <div class="deskareaicon" title="Schakel weergavemodus" onclick="toggleAspectRatio(1)">⇲</div>
466 + <div class="deskareaicon" title="Draai naar links" onclick="drotate(-1)">↺</div>
467 + <div class="deskareaicon" title="Draai naar rechts" onclick="drotate(1)">↻</div>
468 + <div id="deskRecordIcon" class="deskareaicon" title="Server neemt deze sessie op" style="display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px"></div>
469 + <input id="deskFocusBtn" type="button" title="Schakel focusmodus in, indien actief wordt alleen het gebied rond de muis bijgewerkt" onkeypress="return false" onkeydown="return false" value="Focus alles" onclick="deskToggleFocus()" style="margin-right:3px;display:none">
470 + <input id="deskSaveBtn" type="button" title="Bewaar een screenshot van het externe bureaublad" onkeypress="return false" onkeydown="return false" value="Opslaan..." onclick="deskSaveImage()" class="mR">
471 + <input id="deskActionsBtn" type="button" title="Voer krachtacties uit op het apparaat" onkeypress="return false" onkeydown="return false" value="Akties" onclick="deviceActionFunction()" class="mR">
472 + <input id="deskActionsSettings" type="button" value="Instellingen ..." title="Bewerk externe bureaubladinstellingen" onkeypress="return false" onkeydown="return false" onclick="showDesktopSettings()" class="mR">
473 + <input type="button" title="Wijzig de stroomstatus van het externe apparaat" onkeypress="return false" onkeydown="return false" value="Power Actie's..." onclick="showPowerActionDlg()" style="display:none">
474 + </div>
475 + <div>
476 + <div id="idx_deskFullBtn2" onclick="deskToggleFull(event)">&nbsp;✖</div>
477 + <input type="button" id="autoconnectbutton1" value="Automatisch verbinden" onclick="autoConnectDesktop(event)" onkeypress="return false" onkeydown="return false" style="display:none">
478 + <span id="connectbutton1span"><input type="button" id="connectbutton1" value="Verbinden" onclick="connectDesktop(event,3)" onkeypress="return false" onkeydown="return false" disabled="disabled"></span>
479 + <span id="connectbutton1hspan">&nbsp;<input type="button" id="connectbutton1h" value="HW verbinden" title="Maak verbinding met Intel AMT hardware KVM" onclick="connectDesktop(event,2)" onkeypress="return false" onkeydown="return false" disabled="disabled"></span>
480 + <span id="disconnectbutton1span">&nbsp;<input type="button" id="disconnectbutton1" value="Verbreken" onclick="connectDesktop(event,0)" onkeypress="return false" onkeydown="return false"></span>
481 + &nbsp;<span id="deskstatus">Verbroken</span>
482 + </div>
483 + </div>
484 + <div id="deskarea2" style="">
485 + <div class="areaProgress"><div id="progressbar" style=""></div></div>
486 + </div>
487 + <div id="deskarea3x">
488 + <div id="DeskFocus" oncontextmenu="return false" onmousedown="dmousedown(event)" onmouseup="dmouseup(event)" onmousemove="dmousemove(event)"></div>
489 + <div id="DeskParent">
490 + <canvas id="Desk" width="640" height="480" oncontextmenu="return false" onmousedown="dmousedown(event)" onmouseup="dmouseup(event)" onmousemove="dmousemove(event)" onmousewheel="dmousewheel(event)"></canvas>
491 + </div>
492 + <div id="DeskTools">
493 + <div id="deskToolsAreaTop">
494 + <a id="DeskToolsRefreshButton" style="right:2px" onclick="refreshDeskTools()">Ververs</a>
495 + <div id="deskToolsTopTabProcess" class="deskToolsTopTab" onclick="changeDeskToolTab(0)" style="left:0px;bottom:0px">Processen</div>
496 + <div id="deskToolsTopTabService" class="deskToolsTopTab" onclick="changeDeskToolTab(1)" style="display:none;left:90px;color:gray">Services</div>
497 + </div>
498 + <div id="deskToolsArea">
499 + <div id="DeskToolsProcessTab">
500 + <div id="deskToolsHeader">
501 + <a class="colmn1" title="Sorteer op proces ID" onclick="sortProcess(0)">PID</a>
502 + <a class="colmn2" title="Sorteren op naam" onclick="sortProcess(1)">Naam</a>
503 + </div>
504 + <div id="DeskToolsProcesses" style=""></div>
505 + </div>
506 + <div id="DeskToolsServiceTab" style="display:none">
507 + <div id="deskToolsServiceHeader">
508 + <a class="colmn1" style="width:70px" title="Sorteer op status" onclick="sortService(0)">Status</a>
509 + <a class="colmn2" title="Sorteren op naam" onclick="sortService(1)">Naam</a>
510 + </div>
511 + <div id="DeskToolsServices" style=""></div>
512 + </div>
513 + </div>
514 + </div>
515 + <div id="p11DeskConsoleMsg" style="display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:yellow;background-color:rgba(0,0,0,0.6);padding:10px;border-radius:5px" onclick="p11clearConsoleMsg()"></div>
516 + <div id="p11DeskSessionSelector" style="display:none;position:absolute;left:30px;top:17px;right:30px"></div>
517 + </div>
518 + <div id="deskarea4" class="areaFoot">
519 + <div class="toright2">
520 + <span id="DeskTimer" title="Sessie tijd"></span>&nbsp;
521 + <select id="termdisplays" style="display:none" onchange="deskSetDisplay(event)" onkeypress="return false" onkeydown="return false"></select>&nbsp;
522 + <input id="DeskToolsButton" type="button" value="Gereedschap" title="Schakel hulpmiddelenweergave in" onkeypress="return false" onkeydown="return false" onclick="toggleDeskTools()">&nbsp;
523 + <span id="DeskChatButton" class="deskarea" title="Open chatvenster op deze computer"><img src="images/icon-chat.png" onclick="deviceChat(event)" height="16" width="16" style="padding-top:2px"></span>
524 + <span id="DeskNotifyButton" title="Toon een melding op de externe computer"><img src="images/icon-notify.png" onclick="deviceToastFunction()" height="16" width="16" style="padding-top:2px"></span>
525 + <span id="DeskOpenWebButton" title="Open een webadres op de externe computer"><img src="images/icon-url2.png" onclick="deviceUrlFunction()" height="16" width="16" style="padding-top:2px"></span>
526 + <span id="DeskBackgroundButton" title="Wissel bureaubladachtergrond op afstand in"><img src="images/icon-background.png" onclick="deviceToggleBackground(event)" height="16" width="16" style="padding-top:2px"></span>
527 + </div>
528 + <div>
529 + <select id="deskkeys">
530 + <option value="10">Ctrl+Alt+Del</option>
531 + <option value="5">Win</option>
532 + <option value="0">Win+pijl naar omlaag</option>
533 + <option value="1">Win+ pijl omhoog</option>
534 + <option value="2">Win+L</option>
535 + <option value="3">Win+M</option>
536 + <option value="4">Shift+Win+M</option>
537 + <option value="6">Win+R</option>
538 + <option value="7">Alt-F4</option>
539 + <option value="8">Ctrl-W</option>
540 + <option value="9">Alt-Tab</option>
541 + <option value="11">Win+pijl Links</option>
542 + <option value="12">Win+pijl rechts</option>
543 + </select>
544 + <input id="DeskWD" type="button" value="verzenden" onkeypress="return false" onkeydown="return false" onclick="deskSendKeys()">
545 + <input id="DeskClip" style="" type="button" value="Klembord" onkeypress="return false" onkeydown="return false" onclick="showDeskClip()">
546 + <input id="DeskType" style="" type="button" value="Typen" onkeypress="return false" onkeydown="return false" onclick="showDeskType()">
547 + <label><span id="DeskControlSpan" title="Schakelen tussen muis- en toetsenbordinvoer"><input id="DeskControl" type="checkbox" onkeypress="return false" onkeydown="return false" onclick="toggleKvmControl()">Invoer</span></label>&nbsp;
548 + </div>
549 + </div>
550 + </div>
551 + </div>
552 + <div id="p12" style="display:none">
553 + <div id="p12title">
554 + <div id="p12BackButton"><div class="backButton" tabindex="0" onclick="goBack()" title="Terug" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
555 + <h1>Terminal - <span id="p12deviceName"></span></h1>
556 + </div>
557 + <div id="p12warning" onclick="showFeaturesDlg()">
558 + <div class="icon2"></div>
559 + <div class="warningbox">Intel® AMT omleidingspoort of KVM-functie is uitgeschakeld<span id="p12warninga">, klik hier om in te schakelen</span></div>
560 + </div>
561 + <div id="p12warning2" onclick="showPowerActionDlg()">
562 + <div class="icon2"></div>
563 + <div class="warningbox">Externe computer is niet ingeschakeld, klik hier om een stroomopdracht uit te voeren.</div>
564 + </div>
565 + <div id="termTable" style="position:relative">
566 + <table style="width:100%" cellpadding="0" cellspacing="0">
567 + <tbody><tr>
568 + <td class="areaHead">
569 + <div class="toright2">
570 + <div id="termRecordIcon" class="deskareaicon" title="Server neemt deze sessie op" style="display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px"></div>
571 + <input id="termActionsBtn" type="button" title="Voer krachtacties uit op het apparaat" onkeypress="return false" onkeydown="return false" value="Akties" onclick="deviceActionFunction()">
572 + </div>
573 + <div>
574 + <input type="button" id="autoconnectbutton2" value="Automatisch verbinden" onclick="autoConnectTerminal(event)" onkeypress="return false" onkeydown="return false" style="display:none">
575 + <span id="connectbutton2span"><input type="button" id="connectbutton2" value="Verbinden" onclick="connectTerminal(event,1)" onkeypress="return false" onkeydown="return false" disabled="disabled"></span>
576 + <span id="connectbutton2hspan">&nbsp;<input type="button" id="connectbutton2h" value="HW verbinden" title="Maak verbinding met Intel AMT hardware KVM" onclick="connectTerminal(event,2)" onkeypress="return false" onkeydown="return false" disabled="disabled"></span>
577 + <span id="disconnectbutton2span">&nbsp;<input type="button" id="disconnectbutton2" value="Verbreken" onclick="connectTerminal(event,0)" onkeypress="return false" onkeydown="return false"></span>
578 + &nbsp;<span id="termstatus">Verbroken</span><span id="termtitle"></span>
579 + </div>
580 + </td>
581 + </tr>
582 + <tr>
583 + <td>
584 + <div class="areaProgress"><div id="termprogressbar" style=""></div></div>
585 + </td>
586 + </tr>
587 + <tr>
588 + <td id="termarea3x">
589 + <pre id="Term"></pre>
590 + </td>
591 + </tr>
592 + <tr>
593 + <td class="areaFoot">
594 + <div class="toright2">
595 + <span id="TermTimer" title="Sessie tijd"></span>&nbsp;
596 + <span id="terminalSettingsButtons" style="display:none">
597 + <input id="id_tcrbutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="CR+LF" title="Wissel wat de return toets zal verzenden" onclick="termToggleCr()">
598 + <input id="id_tfxkeysbutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="Intel (F10 = ESC+[OM)" title="Schakel het emulatietype van F1 naar F10-toetsen" onclick="termToggleFx()">
599 + <input id="id_ttypebutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="Extended Ascii" title="Schakel het type terminal emulatie in" onclick="termToggleType()">
600 + </span>
601 + <span id="terminalSizeDropDown">
602 + <select id="termSizeList" onkeypress="return false"><option value="1">80x25</option><option value="2">100x30</option><option value="3" selected="">Automatisch</option></select>
603 + </span>
604 + <select id="specialkeylist" onkeypress="return false"></select>
605 + <input id="specialkeylistinput" type="button" onkeypress="return false" class="bottombutton" value="verzenden" title="Verzend de geselecteerde speciale sleutel" onclick="sendSpecialKey()">
606 + </div>
607 + <div>
608 + &nbsp;
609 + <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="ctrlcbutton" value="Ctl-C" onclick="termSendKey(3,'ctrlcbutton')">
610 + <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="ctrlxbutton" value="Ctl-X" onclick="termSendKey(24,'ctrlxbutton')">
611 + <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="escbutton" value="ESC" onclick="termSendKey(27,'escbutton')">
612 + <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="bsbutton" value="Backspace" onclick="termSendKey(8,'bsbutton')">
613 + <input type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" id="pastebutton" value="Plakken" title="Plak tekst in de terminal" onclick="showTermPasteDialog()">
614 + </div>
615 + </td>
616 + </tr>
617 + </tbody></table>
618 + <div id="p12TermConsoleMsg" style="display:none;cursor:pointer;position:absolute;left:30px;top:45px;color:yellow;background-color:rgba(0,0,0,0.6);padding:10px;border-radius:5px" onclick="p12clearConsoleMsg()"></div>
619 + </div>
620 + </div>
621 + <div id="p13" style="display:none">
622 + <div id="p13title">
623 + <div id="p13BackButton" style="float:left"><div class="backButton" tabindex="0" onclick="goBack()" title="Terug" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
624 + <h1>Bestanden - <span id="p13deviceName"></span></h1>
625 + </div>
626 + <table id="p13toolbar" cellpadding="0" cellspacing="0">
627 + <tbody><tr>
628 + <td class="areaHead">
629 + <div class="toright2">
630 + <input id="filesActionsBtn" type="button" title="Voer krachtacties uit op het apparaat" value="Akties" onclick="deviceActionFunction()">
631 + <div id="filesRecordIcon" class="deskareaicon" title="Server neemt deze sessie op" style="display:none;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-left:5px"></div>
632 + </div>
633 + <div>
634 + <input id="p13AutoConnect" value="Automatisch verbinden" onclick="autoConnectFiles(event)" type="button" style="display:none">
635 + <input id="p13Connect" value="Verbinden" onclick="connectFiles(event)" type="button">
636 + <span id="p13Status">Verbroken</span>
637 + </div>
638 + </td>
639 + </tr>
640 + <tr>
641 + <td class="areaHead2" valign="bottom">
642 + <div id="p13rightOfButtons" class="toright2"></div>
643 + <div>
644 + <input type="button" id="p13FolderUp" disabled="disabled" onclick="p13folderup()" value="Omhoog">&nbsp;
645 + <input type="button" id="p13SelectAllButton" disabled="disabled" onclick="p13selectallfile()" value="Selecteer alles">&nbsp;
646 + <input type="button" id="p13RenameFileButton" disabled="disabled" value="Hernoemen" onclick="p13renamefile()">&nbsp;
647 + <input type="button" id="p13DeleteFileButton" disabled="disabled" value="Verwijderen" onclick="p13deletefile()">&nbsp;
648 + <input type="button" id="p13ViewFileButton" disabled="disabled" value="Bewerk" onclick="p13viewfile()">&nbsp;
649 + <input type="button" id="p13NewFolderButton" disabled="disabled" value="Nieuwe map" onclick="p13createfolder()">&nbsp;
650 + <input type="button" id="p13UploadButton" disabled="disabled" value="Uploaden" onclick="p13uploadFile()">&nbsp;
651 + <input type="button" id="p13CutButton" disabled="disabled" value="Knippen" onclick="p13copyFile(1)">&nbsp;
652 + <input type="button" id="p13CopyButton" disabled="disabled" value="Kopie" onclick="p13copyFile(0)">&nbsp;
653 + <input type="button" id="p13PasteButton" disabled="disabled" value="Plakken" onclick="p13pasteFile()">&nbsp;
654 + <input type="button" id="p13RefreshButton" disabled="disabled" value="Ververs" onclick="p13folderup(9999)">&nbsp;
655 + </div>
656 + </td>
657 + </tr>
658 + <tr>
659 + <td class="areaHead3">
660 + <div class="toright2">
661 + <select id="p13sortdropdown" onchange="p13updateFiles()">
662 + <option value="1" selected="selected">Sorteren op naam</option>
663 + <option value="2">Sorteren op grootte</option>
664 + <option value="3">Sorteren op datum</option>
665 + <option value="4">Aflopend op naam</option>
666 + <option value="5">Aflopend op grootte</option>
667 + <option value="6">Aflopend op datum</option>
668 + </select>
669 + </div>
670 + <div>&nbsp;&nbsp;<span id="p13currentpath"></span></div>
671 + </td>
672 + </tr>
673 + </tbody></table>
674 + <div id="p13FilesConsoleMsg" style="display:none;cursor:pointer;position:absolute;left:30px;top:165px;color:yellow;background-color:rgba(0,0,0,0.6);padding:10px;border-radius:5px" onclick="p13clearConsoleMsg()"></div>
675 + <div id="p13filetable" style="">
676 + <div id="p13bigok" style="display:none"><b>✓</b></div>
677 + <div id="p13bigfail" style="display:none"><b>✗</b></div>
678 + <span id="p13files"></span>
679 + </div>
680 + <table id="p13toolbarBottom" cellpadding="0" cellspacing="0">
681 + <tbody><tr><td class="style6">&nbsp;<span id="p13bottomstatus"></span></td></tr>
682 + </tbody></table>
683 + </div>
684 + <div id="p14" style="display:none">
685 + <div id="p14title">
686 + <div id="p14BackButton" style="float:left"><div class="backButton" tabindex="0" onclick="goBack()" title="Terug" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
687 + <div id="devListToolbarViewIcons"><div class="viewSelector" onclick="deskToggleFull(event)" title="Volledig scherm. Houd shift ingedrukt om de browser op volledig scherm weer te geven."><div class="viewSelector5"></div></div></div>
688 + <h1>Intel® AMT - <span id="p14deviceName"></span></h1>
689 + </div>
690 + <iframe id="p14iframe" src="{{{domainurl}}}commander.htm"></iframe>
691 + </div>
692 + <div id="p15" style="display:none">
693 + <div id="p15title">
694 + <div id="p15BackButton" style="float:left"><div class="backButton" tabindex="0" onclick="goBack()" title="Terug" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
695 + <h1><span id="p15deviceName"></span></h1>
696 + </div>
697 + <table id="consoleTable" cellpadding="0" cellspacing="0">
698 + <tbody><tr>
699 + <td class="areaHead">
700 + <div class="toright2">
701 + <div id="p15coreName" title="Informatie over de huidige kern die op deze agent wordt uitgevoerd"></div>
702 + <input type="button" id="p15uploadCore" value="Agent actie" onclick="p15uploadCore(event)" title="Wijzig de Javascript code module van de agent">
703 + <img onclick="p15downloadConsoleText()" style="cursor:pointer;margin-top:6px" title="Consoletekst downloaden" src="images/link4.png">
704 + </div>
705 + <div id="p15statetext"></div>
706 + </td>
707 + </tr>
708 + <tr>
709 + <td>
710 + <div class="areaProgress"><div id="consoleprogressbar" style=""></div></div>
711 + </td>
712 + </tr>
713 + <tr>
714 + <td id="p15agentConsole">
715 + <pre id="p15agentConsoleText"></pre>
716 + </td>
717 + </tr>
718 + <tr>
719 + <td class="areaFoot">
720 + <table style="width:100%">
721 + <tbody><tr>
722 + <td style="width:99%">
723 + <input id="p15consoleText" style="width:100%" onkeyup="p15consoleSend(event)" onfocus="onConsoleFocus(1)" onblur="onConsoleFocus(0)">
724 + </td>
725 + <td>&nbsp;</td>
726 + <td id="p15outputselecttd">
727 + <select id="p15outputselect">
728 + <option value="1">Agent</option>
729 + <option value="2">MQTT</option>
730 + </select>
731 + </td>
732 + <td style="width:1%"><input id="id_p15consoleClear" type="button" class="bottombutton" value="Wissen" onclick="p15consoleClear()"></td>
733 + </tr>
734 + </tbody></table>
735 + </td>
736 + </tr>
737 + </tbody></table>
738 + </div>
739 + <div id="p16" style="display:none">
740 + <div id="p16title">
741 + <div id="p16BackButton" style="float:left"><div class="backButton" tabindex="0" onclick="goBack()" title="Terug" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
742 + <h1>Gebeurtenissen - <span id="p16deviceName"></span></h1>
743 + </div>
744 + <table class="pTable">
745 + <tbody><tr>
746 + <td class="h1"></td>
747 + <!--<td>&nbsp;<input type=button onclick=refreshDeviceEvents() value="Refresh" /></td>-->
748 + <td class="auto-style1">
749 + Tonen
750 + <select id="p16limitdropdown" onchange="refreshDeviceEvents()">
751 + <option value="60">Laatste 60</option>
752 + <option value="120">Laatste 120</option>
753 + <option value="250">Laatste 250</option>
754 + <option value="500">Laatste 500</option>
755 + <option value="1000">Laatste 1000</option>
756 + </select>
757 + <a href="#" onclick="p3showDownloadEventsDialog(1)"><img src="images/link4.png" height="10" width="10" title="Download gebeurtenissen" style="cursor:pointer"></a>&nbsp;
758 + </td>
759 + <td class="h2"></td>
760 + </tr>
761 + </tbody></table>
762 + <div id="p16events"></div>
763 + </div>
764 + <div id="p17" style="display:none">
765 + <div id="p17title">
766 + <div id="p17BackButton" style="float:left"><div class="backButton" tabindex="0" onclick="goBack()" title="Terug" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
767 + <h1>Details - <span id="p17deviceName"></span></h1>
768 + </div>
769 + <div id="p17info"></div>
770 + </div>
771 + <div id="p20" style="display:none">
772 + <picture id="MainMeshImage" style="border-width:0px;height:200px;width:200px;float:right">
773 + <source type="image/webp" width="200" height="200" srcset="images/webp/mesh-256.webp">
774 + <img alt="" width="200" height="200" src="images/mesh-256.png">
775 + </picture>
776 + <div style="float:left"><div class="backButton" tabindex="0" onclick="goBack()" title="Terug" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
777 + <h1>Algemeen - <span id="p20meshName"></span></h1>
778 + <p id="p20info"></p>
779 + </div>
780 + <div id="p30" style="display:none">
781 + <table style="width:100%" cellpadding="0" cellspacing="0">
782 + <tbody><tr>
783 + <td style="width:auto" valign="top">
784 + <div id="p30title">
785 + <div style="float:left"><div class="backButton" tabindex="0" onclick="goBack()" title="Terug" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
786 + <h1>Algemeen - <span id="p30userName"></span></h1>
787 + </div>
788 + <div id="p30html"></div>
789 + </td>
790 + <td style="width:20px"></td>
791 + <td style="width:200px">
792 + <picture id="MainUserImage" style="border-width:0px;height:200px;width:200px;float:right">
793 + <source type="image/webp" width="200" height="200" srcset="images/webp/user-256.webp">
794 + <img alt="" width="200" height="200" src="images/user-256.png">
795 + </picture>
796 + <div style="width:100%;text-align:center"><strong><span id="MainUserState"></span></strong></div>
797 + </td>
798 + </tr>
799 + </tbody></table><br>
800 + <div id="p30html2"></div>
801 + <div id="p30html3"></div>
802 + </div>
803 + <div id="p31" style="display:none">
804 + <div style="float:left"><div class="backButton" tabindex="0" onclick="goBack()" title="Terug" onkeypress="if (event.key == 'Enter') goBack()"><div class="backButtonEx"></div></div></div>
805 + <h1>Gebeurtenissen - <span id="p31userName"></span></h1>
806 + <table class="pTable">
807 + <tbody><tr>
808 + <td class="h1"></td>
809 + <!--<td>&nbsp;<input type=button onclick=refreshUsersEvents() value="Refresh" /></td>-->
810 + <td class="auto-style1">
811 + Tonen
812 + <select id="p31limitdropdown" onchange="refreshUsersEvents()">
813 + <option value="60">Laatste 60</option>
814 + <option value="120">Laatste 120</option>
815 + <option value="250">Laatste 250</option>
816 + <option value="500">Laatste 500</option>
817 + <option value="1000">Laatste 1000</option>
818 + </select>
819 + <a href="#" onclick="p3showDownloadEventsDialog(3)"><img src="images/link4.png" height="10" width="10" title="Download gebeurtenissen" style="cursor:pointer"></a>&nbsp;
820 + </td>
821 + <td class="h2"></td>
822 + </tr>
823 + </tbody></table>
824 + <div id="p31events" style=""></div>
825 + </div>
826 + <div id="p40" style="display:none">
827 + <h1>Mijn serverstatistieken</h1>
828 + <div class="areaHead">
829 + <div class="toright2">
830 + <select id="p40type" onchange="updateServerTimelineStats()">
831 + <option value="0">Verbindingen</option>
832 + <option value="1">Geheugen</option>
833 + </select>&nbsp;
834 + <select id="p40time" onchange="updateServerTimelineHours()">
835 + <option value="3">Laatste 3 uur</option>
836 + <option value="8">Laatste 8 uur</option>
837 + <option value="24">Laatste dag</option>
838 + <option value="168">Vorige week</option>
839 + <option value="720">Laatste 30 dagen</option>
840 + </select>&nbsp;
841 + <img src="images/link4.png" height="10" width="10" title="Gegevenspunten downloaden (.csv)" style="cursor:pointer" onclick="p40downloadEvents()">&nbsp;
842 + </div>
843 + <div>
844 + <input value="Ververs" type="button" onclick="refreshServerTimelineStats()">
845 + &nbsp;<label><input id="p40log" type="checkbox" onclick="updateServerTimelineHours()">Log-X</label>
846 + </div>
847 + </div>
848 + <canvas id="serverMainStats" style=""></canvas>
849 + </div>
850 + <div id="p41" style="display:none">
851 + <h1>Mijn server traceren</h1>
852 + <div class="areaHead">
853 + <div class="toright2">
854 + Tonen
855 + <select id="p41limitdropdown" onchange="displayServerTrace()">
856 + <option value="100">Laatste 100</option>
857 + <option value="250">Laatste 250</option>
858 + <option value="500">Laatste 500</option>
859 + <option value="1000">Laatste 1000</option>
860 + </select>
861 + <input value="Wissen" type="button" onclick="clearServerTracing()">
862 + <img src="images/link4.png" height="10" width="10" title="Download sporen (.csv)" style="cursor:pointer" onclick="p41downloadServerTrace()">&nbsp;
863 + </div>
864 + <div>
865 + <input value="traceren" type="button" onclick="setServerTracing()">
866 + <span id="p41traceStatus">Geen</span>
867 + </div>
868 + </div>
869 + <div id="p41events" style=""></div>
870 + </div>
871 + <div id="p42" style="display:none">
872 + <h1>Mijn serverplug-ins</h1>
873 + <div class="areaHead">
874 + <div class="toright2">
875 + </div>
876 + <div>
877 + <input value="Download Plugin" type="button" onclick="return pluginHandler.addPluginDlg();">
878 + </div>
879 + </div>
880 + <div id="pluginRestartNotice" class="areaHead" style="background-color:gold;display:none">
881 + <div class="toright2">
882 + <input value="Agentcores vernieuwen" type="button" onclick="distributeCore();return false">
883 + </div>
884 + <div style="padding:2px">
885 + <div style="padding:2px"><b>Opmerking:</b> Plug-ins zijn gewijzigd, dit kan een update van de agent vereisen.</div>
886 + </div>
887 + </div>
888 + <table id="p42tbl">
889 + <tbody><tr class="DevSt"><th style="width:26px"></th><th style="width:10px"></th><th class="chName">Naam</th><th class="chDescription">Omschrijving</th><th class="chSite" style="text-align:center">Link</th><th class="chVersion" style="text-align:center">Versie</th><th class="chUpgradeAvail" style="text-align:center">Laatste</th><th class="chStatus" style="text-align:center">Status</th><th class="chAction" style="text-align:center">Aktie</th><th style="width:10px"></th></tr>
890 + </tbody></table>
891 + <div id="pluginNoneNotice" style="width:100%;text-align:center;padding-top:10px;display:none"><i>Geen plug-ins op server.</i></div>
892 + </div>
893 + <div id="p43" style="display:none">
894 + <div id="p43BackButton"><div class="backButton" tabindex="0" onclick="go(42)" title="Terug" onkeypress="if (event.key == 'Enter') go(42)"><div class="backButtonEx"></div></div></div>
895 + <h1>Mijn serverplug-ins - <span id="p43title"></span></h1>
896 + <iframe id="p43iframe" frameborder="0" style="width:100%;height:calc(100vh - 245px);max-height:calc(100vh - 245px)"></iframe>
897 + </div>
898 + <div id="p19" style="display:none">
899 + <h1>Plugins - <span id="p19deviceName"></span></h1>
900 + <div id="p19headers"></div>
901 + <div id="p19pages"></div>
902 + </div>
903 + <br id="column_l_bottomgap">
904 + </div>
905 + <div id="footer">
906 + <div class="footer1">{{{footer}}}</div>
907 + <div class="footer2">
908 + <a id="verifyEmailId2" style="display:none" href="#" onclick="account_showVerifyEmail()">Verifieer Email</a>
909 + &nbsp;<a href="terms">Voorwaarden &amp; Privacy</a>
910 + </div>
911 + </div>
912 + <div id="dialog" class="noselect" style="display:none">
913 + <div id="dialogHeader">
914 + <div tabindex="0" id="id_dialogclose" onclick="setDialogMode()" onkeypress="if (event.key == 'Enter') setDialogMode()">✖</div>
915 + <div id="id_dialogtitle"></div>
916 + </div>
917 + <div id="dialogBody">
918 + <div id="dialog1">
919 + <div id="id_dialogMessage" style=""></div>
920 + </div>
921 + <div id="dialog2" style="">
922 + <div id="id_dialogOptions"></div>
923 + </div>
924 + <div id="dialog3" style="">
925 + <div id="d3upload">
926 + <div>Bestand selectie</div>
927 + <select id="d3uploadMode" onchange="d3modechange()">
928 + <option value="1">Lokaal bestand uploaden</option>
929 + <option value="2">Selectie serverbestand</option>
930 + </select>
931 + </div>
932 + <div id="d3localmode" style="display:none">
933 + <div>Upload bestand</div>
934 + <form id="d3localmodeform" method="post" enctype="multipart/form-data" action="uploadfile.ashx" target="fileUploadFrame">
935 + <input type="text" id="d3auth" name="auth" style="display:none">
936 + <input type="text" id="d3attrib" name="attrib" style="display:none">
937 + <input type="file" id="d3localFile" name="files" onchange="d3setActions()">
938 + <input type="submit" id="d3submit" style="display:none">
939 + </form>
940 + </div>
941 + <div id="d3servermode">
942 + <div id="d3serveraction" valign="bottom">
943 + <input type="button" id="p3FolderUp" disabled="disabled" onclick="d3folderup()" value="Omhoog">&nbsp;
944 + </div>
945 + <div id="d3serverfiles"></div>
946 + </div>
947 + </div>
948 + <div id="dialog4" style="">
949 + <input id="d4WrapButton" type="button" value="Wrap On" onclick="d4ToggleWrap()">
950 + <input id="d4SizeButton" type="button" value="Klein" onclick="d4ToggleSize()">
951 + <textarea id="d4editorarea" style="height:calc(100vh - 286px);width:100%;overflow:scroll;resize:none;white-space:pre"></textarea>
952 + </div>
953 + <div id="dialog7" style="">
954 + <div id="d7meshkvm">
955 + <h4>Agent Extern bureaublad</h4>
956 + <div>
957 + <div>Kwaliteit</div>
958 + <select id="d7bitmapquality" dir="rtl"></select>
959 + </div>
960 + <div>
961 + <div>Schalen</div>
962 + <select id="d7bitmapscaling" style="" dir="rtl">
963 + <option selected="selected" value="1024">100%</option>
964 + <option value="896">87.5%</option>
965 + <option value="768">75%</option>
966 + <option value="640">62.5%</option>
967 + <option value="512">50%</option>
968 + <option value="384">37.5%</option>
969 + <option value="256">25%</option>
970 + <option value="128">12.5%</option>
971 + </select>
972 + </div>
973 + <div>
974 + <div>Frameverhouding</div>
975 + <select id="d7framelimiter" dir="rtl">
976 + <option selected="selected" value="50">Snel</option>
977 + <option value="100">Gemiddeld</option>
978 + <option value="400">Traag</option>
979 + <option value="1000">erg traag</option>
980 + </select>
981 + </div>
982 + </div>
983 + <div id="d7amtkvm">
984 + <h4>Intel® AMT Hardware KVM</h4>
985 + <div>
986 + <div>Beeldcodering</div>
987 + <select id="d7desktopmode">
988 + <option value="1">RLE8, snelste</option>
989 + <option value="2">RLE16, Aanbevolen</option>
990 + <option value="3">RAW8, langzaam</option>
991 + <option value="4">RAW16, Zeer langzaam</option>
992 + </select>
993 + </div>
994 + <div>
995 + <div>Andere instellingen</div>
996 + <div id="d7otherset" style="display:block">
997 + <label style="display:block"><input type="checkbox" id="d7showfocus">Toon focus tool</label>
998 + <label style="display:block"><input type="checkbox" id="d7showcursor">Lokale muiscursor weergeven</label>
999 + <label style="display:block"><input type="checkbox" id="d7localKeyMap">Lokale toetsenbordkaart</label>
1000 + </div>
1001 + </div>
1002 + </div>
1003 + </div>
1004 + </div>
1005 + <div id="idx_dlgButtonBar">
1006 + <input id="idx_dlgCancelButton" type="button" value="Afbreken" style="" onclick="dialogclose(0)">
1007 + <input id="idx_dlgOkButton" type="button" value="Oke" style="" onclick="dialogclose(1)">
1008 + <div><input id="idx_dlgDeleteButton" type="button" value="Verwijderen" style="display:none" onclick="dialogclose(2)"></div>
1009 + </div>
1010 + </div>
1011 + <iframe name="fileUploadFrame" style="display:none"></iframe>
1012 + <form style="display:none" method="post" action="uploadfile.ashx" enctype="multipart/form-data" target="fileUploadFrame"><input id="p5fileDragName" name="name"><input id="p5fileDragAuthCookie" name="auth"><input id="p5fileDragSize" name="size"><input id="p5fileDragType" name="type"><input id="p5fileDragData" name="data"><input id="p5fileDragLink" name="link"><input type="submit" id="p5loginSubmit2" style="display:none"></form>
1013 + <form style="display:none" method="post" action="uploadnodefile.ashx" enctype="multipart/form-data" target="fileUploadFrame"><input id="p13fileDragName" name="name"><input id="p13fileDragSize" name="size"><input id="p13fileDragType" name="type"><input id="p13fileDragData" name="data"><input id="p13fileDragLink" name="link"><input type="submit" id="p13loginSubmit2" style="display:none"></form>
1014 + <audio id="chimes"><source src="sounds/chimes.mp3" type="audio/mp3"></audio>
1015 + </div>
1016 + <script type="text/javascript">
1017 + 'use strict';
1018 +
1019 + // Process server-side web state
1020 + var webState = '{{{webstate}}}';
1021 + if (webState != '') { webState = JSON.parse(decodeURIComponent(webState)); }
1022 + for (var i in webState) { localStorage.setItem(i, webState[i]); }
1023 + if (!webState.loctag) { delete localStorage.removeItem('loctag'); }
1024 +
1025 + var args;
1026 + var autoReconnect = true;
1027 + var powerStatetable = ['', "ingeschakeld", "Slaap", "Slaap", "Slaap", "Slaapstand", "Uitzetten", "Aanwezig"];
1028 + var StatusStrs = ["Verbroken", "Verbinden...", "Setup...", "Verbonden", "Intel® AMT verbonden"];
1029 + var sort = 0;
1030 + var searchFocus = 0;
1031 + var mapSearchFocus = 0;
1032 + var userSearchFocus = 0;
1033 + var consoleFocus = 0;
1034 + var showRealNames = false;
1035 + var meshserver = null;
1036 + var meshes = {};
1037 + var meshcount = 0;
1038 + var nodes = null;
1039 + var filetree = {};
1040 + var userinfo = null;
1041 + var serverinfo = null;
1042 + var events = [];
1043 + var users = null;
1044 + var wssessions = null;
1045 + var nodeShortIdent = 0;
1046 + var desktop;
1047 + var desktopsettings = { encoding: 2, showfocus: false, showmouse: true, showcad: true, quality: 40, scaling: 1024, framerate: 50, localkeymap: false };
1048 + var multidesktopsettings = { quality: 20, scaling: 128, framerate: 1000 };
1049 + var terminal;
1050 + var files;
1051 + var debugLevel = parseInt('{{{debuglevel}}}');
1052 + var features = parseInt('{{{features}}}');
1053 + var sessionTime = parseInt('{{{sessiontime}}}');
1054 + var domain = '{{{domain}}}';
1055 + var domainUrl = '{{{domainurl}}}';
1056 + var authCookie = '{{{authCookie}}}';
1057 + var authRelayCookie = '{{{authRelayCookie}}}';
1058 + var logoutControls = {{{logoutControls}}};
1059 + var authCookieRenewTimer = null;
1060 + var multiDesktop = {};
1061 + var multiDesktopFilter = null;
1062 + var serverPublicNamePort = '{{{serverDnsName}}}:{{{serverPublicPort}}}';
1063 + var amtScanResults = null;
1064 + var debugmode = 0;
1065 + var clickOnce = (((features & 256) != 0) && detectClickOnce());
1066 + var attemptWebRTC = ((features & 128) != 0);
1067 + var passRequirements = '{{{passRequirements}}}';
1068 + if (passRequirements != '') { passRequirements = JSON.parse(decodeURIComponent(passRequirements)); }
1069 + var deskAspectRatio = 0;
1070 + try { deskAspectRatio = parseInt(getstore('deskAspectRatio', '0')); } catch (ex) { }
1071 + var uiMode = parseInt(getstore('uiMode', 1));
1072 + var webPageStackMenu = false;
1073 + var webPageFullScreen = true;
1074 + var nightMode = (getstore('_nightMode', '0') == '1');
1075 + var sessionActivity = Date.now();
1076 + var updateSessionTimer = null;
1077 + var pluginHandlerBuilder = {{{pluginHandler}}};
1078 + var pluginHandler = null;
1079 + if (pluginHandlerBuilder != null) { pluginHandler = new pluginHandlerBuilder(); }
1080 + var installedPluginList = null;
1081 +
1082 + // Console Message Display Timers
1083 + var p11DeskConsoleMsgTimer = null;
1084 + var p12TermConsoleMsgTimer = null;
1085 + var p13FilesConsoleMsgTimer = null;
1086 +
1087 + function startup() {
1088 + if ((features & 32) == 0) {
1089 + // Guard against other site's top frames (web bugs).
1090 + var loc = null;
1091 + try { loc = top.location.toString().toLowerCase(); } catch (e) { }
1092 + if (top != self && (loc == null || top.active == false)) { top.location = self.location; return; }
1093 + }
1094 +
1095 + // Setup logout control
1096 + var logoutControl = '';
1097 + if (logoutControls.name != null) { logoutControl = format("Welkom {0}.", logoutControls.name); }
1098 + if (logoutControls.logoutUrl != null) { logoutControl += format(' <a href=\"' + logoutControls.logoutUrl + '\" style="color:white">' + "Uitloggen" + '</a>'); }
1099 + QH('logoutControlSpan', logoutControl);
1100 +
1101 + // Check if we are in debug mode
1102 + args = parseUriArgs();
1103 + if (!args.locale) { var x = getstore('loctag', 0); if ((x != null) && (x != '*')) { args.locale = x; } }
1104 + debugmode = args.debug;
1105 + if (args.webrtc != null) { attemptWebRTC = (args.webrtc == 1); }
1106 + QV('p13AutoConnect', debugmode); // Files
1107 + QV('autoconnectbutton2', debugmode); // Terminal
1108 + QV('autoconnectbutton1', debugmode); // Desktop
1109 + //QV('DeskClip', debugmode); // Clipboard feature, not completed so show in in debug mode only.
1110 +
1111 + if (nightMode) { QC('body').add('night'); }
1112 + toggleFullScreen();
1113 +
1114 + // Setup page visuals
1115 + if (args.hide) {
1116 + var hide = parseInt(args.hide);
1117 + QV('masthead', !(hide & 1));
1118 + QV('topbar', !(hide & 2));
1119 + QV('footer', !(hide & 4));
1120 + QV('p10title', !(hide & 8));
1121 + QV('p11title', !(hide & 8));
1122 + QV('p12title', !(hide & 8));
1123 + QV('p13title', !(hide & 8));
1124 + QV('p14title', !(hide & 8));
1125 + QV('p15title', !(hide & 8));
1126 + QV('p16title', !(hide & 8));
1127 + //if (hide & 16) {
1128 + // QV('page_leftbar', false);
1129 + // QS('page_content').left = '0px';
1130 + //}
1131 +
1132 + // Fix the main grid to zero-height elements we want to hide.
1133 + QS('container')['grid-template-rows'] = ((hide & 1) ? '0' : '66') + 'px ' + ((hide & 2) ? '0' : '24') + 'px auto ' + ((hide & 4) ? '0' : '45') + 'px';
1134 + QS('container')['-ms-grid-rows'] = ((hide & 1) ? '0' : '66') + 'px ' + ((hide & 2) ? '0' : '24') + 'px auto ' + ((hide & 4) ? '0' : '45') + 'px';
1135 +
1136 + // Adjust height of remote desktop, files and Intel AMT
1137 + var xh = (((hide & 1) ? 0 : 66) + ((hide & 2) ? 0 : 24) + ((hide & 4) ? 0 : 45) + ((hide & 8) ? 0 : 60)); // 0 to 195
1138 + QS('p3users')['max-height'] = 'calc(100vh - ' + (124 + xh) + 'px)';
1139 + QS('p3events')['height'] = 'calc(100vh - ' + (124 + xh) + 'px)';
1140 + QS('deskarea3x')['height'] = 'calc(100vh - ' + (75 + xh) + 'px)';
1141 + QS('deskarea3x')['max-height'] = 'calc(100vh - ' + (75 + xh) + 'px)';
1142 + QS('p5filetable')['height'] = 'calc(100vh - ' + (160 + xh) + 'px)';
1143 + QS('p13filetable')['height'] = 'calc(100vh - ' + (124 + xh) + 'px)';
1144 + QS('serverMainStats')['height'] = 'calc(100vh - ' + (110 + xh) + 'px)';
1145 + QS('serverMainStats')['max-height'] = 'calc(100vh - ' + (110 + xh) + 'px)';
1146 + QS('xdevices')['max-height'] = 'calc(100vh - ' + (124 + xh) + 'px)';
1147 + QS('xdevicesmap')['max-height'] = 'calc(100vh - ' + (124 + xh) + 'px)';
1148 + QS('p15agentConsole')['height'] = 'calc(100vh - ' + (84 + xh) + 'px)';
1149 + QS('p15agentConsole')['max-height'] = 'calc(100vh - ' + (84 + xh) + 'px)';
1150 + QS('p15agentConsoleText')['height'] = 'calc(100vh - ' + (81 + xh) + 'px)';
1151 + QS('p15agentConsoleText')['max-height'] = 'calc(100vh - ' + (81 + xh) + 'px)';
1152 + QS('p43iframe')['height'] = 'calc(100vh - ' + (84 + xh) + 'px)';
1153 + QS('p43iframe')['max-height'] = 'calc(100vh - ' + (84 + xh) + 'px)';
1154 + }
1155 +
1156 + // We are looking at a single device, remove all the back buttons
1157 + if ('{{currentNode}}' != '') {
1158 + QV('p10BackButton', false);
1159 + QV('p11BackButton', false);
1160 + QV('p12BackButton', false);
1161 + QV('p13BackButton', false);
1162 + QV('p14BackButton', false);
1163 + QV('p15BackButton', false);
1164 + QV('p16BackButton', false);
1165 + }
1166 + p1updateInfo();
1167 +
1168 + // Setup the context menu
1169 + document.onclick = function (e) { hideContextMenu(); }
1170 + document.onkeypress = ondockeypress;
1171 + document.onkeydown = ondockeydown;
1172 + document.onkeyup = ondockeyup;
1173 + //window.addEventListener('focus', ondocfocus, false);
1174 + window.addEventListener('blur', ondocblur, false);
1175 + window.onresize = function () { masterUpdate(512); }
1176 + setTimeout(function() { masterUpdate(512); }, 200);
1177 +
1178 + // Connect to the mesh server
1179 + meshserver = MeshServerCreateControl(domainUrl, authCookie);
1180 + meshserver.onStateChanged = onStateChanged;
1181 + meshserver.onMessage = onMessage;
1182 + meshserver.trace = (args.trace == 1);
1183 + meshserver.Start();
1184 +
1185 + // Setup page controls
1186 + Q('sortselect').selectedIndex = sort = getstore('sort', 0);
1187 + Q('sizeselect').selectedIndex = getstore('_viewsize', 1);
1188 + Q('SearchInput').value = getstore('_search', '');
1189 + showRealNames = (getstore('showRealNames', 0) == 1);
1190 + Q('RealNameCheckBox').checked = showRealNames;
1191 + Q('viewselect').value = getstore('_deviceView', 1);
1192 + Q('DeskControl').checked = (getstore('DeskControl', 1) == 1);
1193 + QV('accountChangeEmailAddressSpan', (features & 0x200000) == 0);
1194 +
1195 + // Display the page devices
1196 + masterUpdate(3)
1197 + for (var j = 1; j < 5; j++) { Q('devViewButton' + j).classList.remove('viewSelectorSel'); }
1198 + Q('devViewButton' + Q('viewselect').value).classList.add('viewSelectorSel');
1199 +
1200 + // Setup upload drag & drop
1201 + Q('p5filetable').addEventListener('drop', p5fileDragDrop, false);
1202 + Q('p5filetable').addEventListener('dragover', p5fileDragOver, false);
1203 + Q('p5filetable').addEventListener('dragleave', p5fileDragLeave, false);
1204 + //Q('p5fileCatchAllInput').addEventListener('drop', p5fileDragDrop, false);
1205 + //Q('p5fileCatchAllInput').addEventListener('dragover', p5fileDragOver, false);
1206 + //Q('p5fileCatchAllInput').addEventListener('dragleave', p5fileDragLeave, false);
1207 +
1208 + // Setup upload drag & drop
1209 + Q('p13filetable').addEventListener('drop', p13fileDragDrop, false);
1210 + Q('p13filetable').addEventListener('dragover', p13fileDragOver, false);
1211 + Q('p13filetable').addEventListener('dragleave', p13fileDragLeave, false);
1212 +
1213 + // Timeline update interval
1214 + setInterval(updateDeviceTimeline, 120000); // Check every 2 minutes
1215 +
1216 + // Load desktop settings
1217 + var t = localStorage.getItem('desktopsettings');
1218 + if (t != null) { desktopsettings = JSON.parse(t); }
1219 + t = localStorage.getItem('multidesktopsettings');
1220 + if (t != null) { multidesktopsettings = JSON.parse(t); }
1221 + applyDesktopSettings();
1222 +
1223 + // Terminal special keys
1224 + var x = '';
1225 + for (var c = 1; c < 27; c++) x += '<option value=\'' + c + '\'>' + "Ctrl" + '-' + String.fromCharCode(64 + c) + ' (' + c + ')</option>';
1226 + QH('specialkeylist', x);
1227 +
1228 + // Setup server stats panels
1229 + setupGeneralServerStats();
1230 + setupServerTimelineStats();
1231 +
1232 + // Setup the user interface in the right mode
1233 + userInterfaceSelectMenu();
1234 +
1235 + // If SSPI or LDAP authentication not used, allow batch account creation.
1236 + QV('p4UserBatchCreate', (features & 0x00080000) == 0);
1237 +
1238 + // Set the file editor
1239 + d4EditWrapVal = getstore('editorWrap', 0);
1240 + d4EditSizeVal = getstore('editorSize', 0);
1241 + d4ToggleWrap(true);
1242 + d4ToggleSize(true);
1243 + }
1244 +
1245 + // Toggle the web page to full screen
1246 + function toggleAspectRatio(toggle) {
1247 + if (toggle === 1) { deskAspectRatio = ((deskAspectRatio + 1) % 3); putstore('deskAspectRatio', deskAspectRatio); }
1248 + deskAdjust();
1249 + }
1250 +
1251 + // If FullScreen, toggle menu to be horisontal or vertical
1252 + function toggleStackMenu(toggle) {
1253 + if (webPageFullScreen == true) {
1254 + if (toggle === 1) {
1255 + webPageStackMenu = !webPageStackMenu;
1256 + putstore('webPageStackMenu', webPageStackMenu);
1257 + }
1258 + if (webPageStackMenu == false) {
1259 + QC('body').remove('menu_stack');
1260 + } else {
1261 + QC('body').add('menu_stack');
1262 + if (xxcurrentView >= 10) QC('column_l').remove('room4submenu');
1263 + }
1264 + deskAdjust();
1265 + }
1266 + }
1267 +
1268 + // Toggle user interface menu
1269 + function showUserInterfaceSelectMenu() {
1270 + Q('uiViewButton1').classList.remove('uiSelectorSel');
1271 + Q('uiViewButton2').classList.remove('uiSelectorSel');
1272 + Q('uiViewButton3').classList.remove('uiSelectorSel');
1273 + Q('uiViewButton4').classList.remove('uiSelectorSel');
1274 + try { Q('uiViewButton' + uiMode).classList.add('uiSelectorSel'); } catch (ex) { }
1275 + QV('uiMenu', (QS('uiMenu').display == 'none'));
1276 + //Q('uiViewButton1').focus();
1277 + if (nightMode) { Q('uiViewButton4').classList.add('uiSelectorSel'); }
1278 + }
1279 +
1280 + function userInterfaceSelectMenu(s) {
1281 + if (s) { uiMode = s; putstore('uiMode', uiMode); }
1282 + webPageFullScreen = (uiMode < 3);
1283 + webPageStackMenu = (uiMode > 1);
1284 + toggleFullScreen(0);
1285 + toggleStackMenu(0);
1286 + if (webPageStackMenu && (xxcurrentView >= 10)) { QC('column_l').add('room4submenu'); } else { QC('column_l').remove('room4submenu'); }
1287 + }
1288 +
1289 + function toggleNightMode() {
1290 + nightMode = !nightMode;
1291 + if (nightMode) { QC('body').add('night'); } else { QC('body').remove('night'); }
1292 + putstore('_nightMode', nightMode?'1':'0');
1293 + }
1294 +
1295 + // Toggle the web page to full screen
1296 + function toggleFullScreen(toggle) {
1297 + if (toggle === 1) { webPageFullScreen = !webPageFullScreen; putstore('webPageFullScreen', webPageFullScreen); }
1298 + var hide = 0;
1299 + if (args.hide) { hide = parseInt(args.hide); }
1300 + if (webPageFullScreen == false) {
1301 + QC('body').remove('menu_stack');
1302 + QC('body').remove('fullscreen');
1303 + QC('body').remove('arg_hide');
1304 + if (xxcurrentView >= 10) QC('column_l').add('room4submenu');
1305 + QV('UserDummyMenuSpan', false);
1306 + //QV('page_leftbar', false);
1307 + } else {
1308 + QC('body').add('fullscreen');
1309 + if (hide & 16) QC('body').add('arg_hide'); // This is replacement for QV('page_leftbar', !(hide & 16));
1310 + QV('page_leftbar', !(hide & 16));
1311 + QV('MainMenuSpan', !(hide & 16));
1312 + if (xxcurrentView >= 10) QC('column_l').remove('room4submenu');
1313 + QV('UserDummyMenuSpan', (xxcurrentView < 10) && webPageFullScreen);
1314 + }
1315 + masterUpdate(512);
1316 + QV('body', true);
1317 + }
1318 +
1319 + function getNodeFromId(id) { if (nodes != null) { for (var i in nodes) { if (nodes[i]._id == id) return nodes[i]; } } return null; }
1320 + function reload() {
1321 + var x = window.location.href;
1322 + if (x.endsWith('/#')) { x = x.substring(0, x.length - 2); }
1323 + window.location.href = x;
1324 + }
1325 +
1326 + function onStateChanged(server, state, prevState, errorCode) {
1327 + if (state == 0) {
1328 + // Control web socket disconnected
1329 + setDialogMode(0); // Close any dialog boxes if present
1330 + go(0); // Go to disconnection panel
1331 +
1332 + // Clean up
1333 + powerTimeline = null;
1334 + powerTimelineReq = null;
1335 + powerTimelineNode = null;
1336 + powerTimelineUpdate = null;
1337 + deleteAllNotifications(); // Close and clear notifications if present
1338 + hideContextMenu(); // Hide the context menu if present
1339 + QV('verifyEmailId2', false);
1340 + QV('logoutControl', false);
1341 + if (errorCode == 'noauth') { QH('p0span', "Kan authenticatie niet uitvoeren"); return; }
1342 + if (prevState == 2) { if (autoReconnect) { setTimeout(serverPoll, 5000); } } else { QH('p0span', "Kan geen websocket aansluiten"); }
1343 + if (authCookieRenewTimer != null) { clearInterval(authCookieRenewTimer); authCookieRenewTimer = null; }
1344 + } else if (state == 2) {
1345 + // Fetch list of meshes, nodes, files
1346 + meshserver.send({ action: 'meshes' });
1347 + meshserver.send({ action: 'nodes', id: '{{currentNode}}' });
1348 + if (pluginHandler != null) { meshserver.send({ action: 'plugins' }); }
1349 + if ('{{currentNode}}' == '') { meshserver.send({ action: 'files' }); }
1350 + if ('{{viewmode}}' == '') { go(1); }
1351 + authCookieRenewTimer = setInterval(function () { meshserver.send({ action: 'authcookie' }); }, 1800000); // Request a cookie refresh every 30 minutes.
1352 + }
1353 + }
1354 +
1355 + // Poll the server, if it responds, refresh the page.
1356 + function serverPoll() {
1357 + var xdr = null;
1358 + try { xdr = new XDomainRequest(); } catch (e) { }
1359 + if (!xdr) xdr = new XMLHttpRequest();
1360 + xdr.open('HEAD', window.location.href);
1361 + xdr.timeout = 15000;
1362 + xdr.onload = function () { reload(); };
1363 + xdr.onerror = xdr.ontimeout = function () { setTimeout(serverPoll, 10000); };
1364 + xdr.send();
1365 + }
1366 +
1367 + // Return true if this browser supports clickonce
1368 + function detectClickOnce() {
1369 + for (var i in window.navigator.mimeTypes) { if (window.navigator.mimeTypes[i].type == 'application/x-ms-application') { return true; } }
1370 + var userAgent = window.navigator.userAgent.toUpperCase();
1371 + return (userAgent.indexOf('.NET CLR 3.5') >= 0) || (userAgent.indexOf('(WINDOWS NT ') >= 0);
1372 + }
1373 +
1374 + function updateSiteAdmin() {
1375 + var noServerBackup = '{{{noServerBackup}}}';
1376 + var siteRights = userinfo.siteadmin;
1377 + if (noServerBackup == 1) { siteRights &= 0xFFFFFFFA; } // If not server backups allowed, remove server backup and restore permissions
1378 +
1379 + // Update account actions
1380 + QV('p2AccountSecurity', ((features & 4) == 0) && (serverinfo.domainauth == false) && ((features & 4096) != 0)); // Hide Account Security if in single user mode, domain authentication to 2 factor auth not supported.
1381 + QV('p2AccountActions', ((features & 4) == 0) && (serverinfo.domainauth == false)); // Hide Account Actions if in single user mode or domain authentication
1382 + QV('p2AccountImage', ((features & 4) == 0) && (serverinfo.domainauth == false)); // If account actions are not visible, also remove the image on that panel
1383 + QV('p2ServerActions', siteRights & 21);
1384 + QV('LeftMenuMyServer', siteRights & 21); // 16 + 4 + 1
1385 + QV('MainMenuMyServer', siteRights & 21);
1386 + QV('p2ServerActionsBackup', siteRights & 1);
1387 + QV('p2ServerActionsRestore', siteRights & 4);
1388 + QV('p2ServerActionsVersion', siteRights & 16);
1389 + QV('MainMenuMyFiles', siteRights & 8);
1390 + QV('LeftMenuMyFiles', siteRights & 8);
1391 + if (((siteRights & 8) == 0) && (xxcurrentView == 5)) { setDialogMode(0); go(1); }
1392 + if (currentNode != null) { gotoDevice(currentNode._id, xxcurrentView, true); }
1393 +
1394 + // Update user management state
1395 + if ((userinfo.siteadmin & 2) != 0)
1396 + {
1397 + // We are user administrator
1398 + if (users == null) { meshserver.send({ action: 'users' }); }
1399 + if (wssessions == null) { meshserver.send({ action: 'wssessioncount' }); }
1400 + } else {
1401 + // We are not user administrator
1402 + users = null;
1403 + wssessions = null;
1404 + updateUsers();
1405 + if (xxcurrentView == 4 || ((xxcurrentView >= 30) && (xxcurrentView < 40))) { setDialogMode(0); go(1); currentUser = null; }
1406 + }
1407 + meshserver.send({ action: 'events', limit: parseInt(p3limitdropdown.value) });
1408 + QV('ServerConsole', userinfo.siteadmin === 0xFFFFFFFF);
1409 + QV('ServerTrace', userinfo.siteadmin === 0xFFFFFFFF);
1410 + if ((xxcurrentView == 115) && (userinfo.siteadmin != 0xFFFFFFFF)) { go(6); }
1411 + if ((xxcurrentView == 6) && ((userinfo.siteadmin & 21) == 0)) { go(1); }
1412 +
1413 + // If we are site administrator, register to get server statistics
1414 + if ((siteRights & 21) != 0) { meshserver.send({ action: 'serverstats', interval: 10000 }); }
1415 + }
1416 +
1417 + // To boost the speed of the web page when even floods occur, this method perform a delayed update on the web page.
1418 + var updateNaggleTimer = null;
1419 + var updateNaggleFlags = 0;
1420 + function masterUpdate(flags) {
1421 + updateNaggleFlags |= flags;
1422 + if (updateNaggleTimer == null) {
1423 + updateNaggleTimer = setTimeout(function () {
1424 + if (updateNaggleFlags & 512) { center(); }
1425 + if (updateNaggleFlags & 1) { onSearchInputChanged(); }
1426 + if (updateNaggleFlags & 2) { onSortSelectChange(false); }
1427 + if (updateNaggleFlags & 128) { updateMeshes(); }
1428 + if (updateNaggleFlags & 4) { updateDevices(); }
1429 + if (updateNaggleFlags & 8) { drawNotifications(); }
1430 + {{{StartGeoLocationJS}}}if (updateNaggleFlags & 16) { updateMapMarkers(); }{{{EndGeoLocationJS}}}
1431 + if (updateNaggleFlags & 32) { eventsUpdate(); }
1432 + {{{StartGeoLocationJS}}}if (updateNaggleFlags & 64) { refreshMap(false, true); }{{{EndGeoLocationJS}}}
1433 + if (updateNaggleFlags & 256) { drawDeviceTimeline(); }
1434 + if (updateNaggleFlags & 1024) { deviceEventsUpdate(); }
1435 + if (updateNaggleFlags & 2048) { userEventsUpdate(); }
1436 + if (updateNaggleFlags & 4096) { p20updateMesh(); }
1437 + updateNaggleTimer = null;
1438 + updateNaggleFlags = 0;
1439 + }, 150);
1440 + }
1441 + }
1442 +
1443 + var backupCodesWarningDone = false;
1444 + function updateSelf() {
1445 + QV('verifyEmailId', (userinfo.emailVerified !== true) && (userinfo.email != null) && (serverinfo.emailcheck == true));
1446 + QV('verifyEmailId2', (userinfo.emailVerified !== true) && (userinfo.email != null) && (serverinfo.emailcheck == true));
1447 + QV('manageOtp', (userinfo.otpsecret == 1) || (userinfo.otphkeys > 0));
1448 + QV('authAppSetupCheck', userinfo.otpsecret == 1);
1449 + QV('authKeySetupCheck', userinfo.otphkeys > 0);
1450 + QV('authCodesSetupCheck', userinfo.otpkeys > 0);
1451 + masterUpdate(4 + 128 + 4096);
1452 +
1453 + // Check if backup codes should really be enabled
1454 + if ((backupCodesWarningDone == false) && !(userinfo.otpkeys > 0) && (((userinfo.otpsecret == 1) && !(userinfo.otphkeys > 0)) || ((userinfo.otpsecret != 1) && (userinfo.otphkeys == 1)))) {
1455 + var n = { text: "Voeg back-upcodes met twee factoren toe. Als de huidige factor verloren gaat, is er geen manier om dit account te herstellen.", title: "Twee-factor authenticatie" };
1456 + addNotification(n);
1457 + backupCodesWarningDone = true;
1458 + }
1459 +
1460 + // If we can't create new groups, hide all links that can do that.
1461 + var newGroupsAllowed = ((userinfo.siteadmin == 0xFFFFFFFF) || ((userinfo.siteadmin & 64) == 0));
1462 + QV('p2createMeshLink1', newGroupsAllowed);
1463 + QV('p2createMeshLink2', newGroupsAllowed);
1464 + QV('getStarted1', newGroupsAllowed);
1465 + QV('getStarted2', !newGroupsAllowed);
1466 +
1467 + if (typeof userinfo.passchange == 'number') {
1468 + if (userinfo.passchange == -1) { QH('p2nextPasswordUpdateTime', " - Reset bij volgende inlog."); }
1469 + else if ((passRequirements != null) && (typeof passRequirements.reset == 'number')) {
1470 + var seconds = (userinfo.passchange) + (passRequirements.reset * 86400) - Math.floor(Date.now() / 1000);
1471 + if (seconds < 0) { QH('p2nextPasswordUpdateTime', " - Reset bij volgende inlog."); }
1472 + else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format(" - Reset in {0} minuten{1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
1473 + else if (seconds < 86400) { QH('p2nextPasswordUpdateTime', format(" - Reset in {0} uur{1}.", Math.floor(seconds / 3600), addLetterS(Math.floor(seconds / 3600)))); }
1474 + else { QH('p2nextPasswordUpdateTime', format(" - Reset in {0} dag(en){1}."), Math.floor(seconds / 86400), addLetterS(Math.floor(seconds / 86400))); }
1475 + }
1476 + }
1477 + }
1478 +
1479 + function addLetterS(x) { return (x > 1) ? 's' : ''; }
1480 + function setSessionActivity() { sessionActivity = Date.now(); QH('idleTimeoutNotify', ''); }
1481 + function checkIdleSessionTimeout() {
1482 + var delta = (Date.now() - sessionActivity);
1483 + if (delta > serverinfo.timeout) { window.location.href = 'logout'; } else {
1484 + var ds = Math.round((serverinfo.timeout - delta) / 1000);
1485 + if (ds <= 60) {
1486 + QH('idleTimeoutNotify', '<br />' + format("{0} seconde {1} tot verbreken", ds, addLetterS(ds)));
1487 + } else {
1488 + ds = Math.round(ds / 60);
1489 + if (ds <= 5) { QH('idleTimeoutNotify', '<br />' + format("{0} minuut {1} tot verbreken", ds, addLetterS(ds))); }
1490 + }
1491 + }
1492 + }
1493 +
1494 + function onMessage(server, message) {
1495 + switch (message.action) {
1496 + case 'trace': {
1497 + serverTrace.unshift(message);
1498 + displayServerTrace();
1499 + break;
1500 + }
1501 + case 'traceinfo': {
1502 + if (typeof message.traceSources == 'object') {
1503 + if ((message.traceSources != null) && (message.traceSources.length > 0)) {
1504 + serverTraceSources = message.traceSources;
1505 + QH('p41traceStatus', EscapeHtml(message.traceSources.join(', ')));
1506 + } else {
1507 + serverTraceSources = [];
1508 + QH('p41traceStatus', "Geen");
1509 + }
1510 + }
1511 + break;
1512 + }
1513 + case 'serverstats': {
1514 + updateGeneralServerStats(message);
1515 + break;
1516 + }
1517 + case 'serverwarnings': {
1518 + if ((message.warnings != null) && (message.warnings.length > 0)) {
1519 + var x = '';
1520 + for (var i in message.warnings) { x += '<div style=color:red;padding-bottom:6px><b>' + "Waarschuwing" + message.warnings[i] + '</b></div>'; }
1521 + QH('serverWarnings', x);
1522 + QV('serverWarningsDiv', true);
1523 + }
1524 + break;
1525 + }
1526 + case 'servertimelinestats': {
1527 + setServerTimelineStats(message.events);
1528 + break;
1529 + }
1530 + case 'authcookie': {
1531 + // Got an authentication cookie refresh
1532 + authCookie = message.cookie;
1533 + authRelayCookie = message.rcookie;
1534 + break;
1535 + }
1536 + case 'serverinfo': {
1537 + serverinfo = message.serverinfo;
1538 + if (serverinfo.timeout) { setInterval(checkIdleSessionTimeout, 10000); checkIdleSessionTimeout(); }
1539 + if (debugmode == 1) { console.log('Server time: ', printDateTime(new Date(serverinfo.serverTime))); }
1540 + break;
1541 + }
1542 + case 'userinfo': {
1543 + userinfo = message.userinfo;
1544 + updateSiteAdmin();
1545 + updateSelf();
1546 + break;
1547 + }
1548 + case 'users': {
1549 + users = {};
1550 + for (var m in message.users) { users[message.users[m]._id] = message.users[m]; }
1551 + updateUsers();
1552 + break;
1553 + }
1554 + case 'wssessioncount': {
1555 + wssessions = message.wssessions;
1556 + updateUsers();
1557 + break;
1558 + }
1559 + case 'meshes': {
1560 + meshes = {};
1561 + for (var m in message.meshes) { meshes[message.meshes[m]._id] = message.meshes[m]; }
1562 + masterUpdate(4 + 128);
1563 + break;
1564 + }
1565 + case 'files': {
1566 + filetree = setupBackPointers(message.filetree);
1567 + updateFiles();
1568 + d3updatefiles();
1569 + break;
1570 + }
1571 + case 'nodes': {
1572 + nodes = [];
1573 + for (var m in message.nodes) {
1574 + if (!meshes[m]) { console.log('Invalid mesh (1): ' + m); continue; }
1575 + for (var n in message.nodes[m]) {
1576 + if (message.nodes[m][n]._id == null) { console.log('Invalid node (' + n + '): ' + JSON.stringify(message.nodes)); continue; }
1577 + message.nodes[m][n].namel = message.nodes[m][n].name.toLowerCase();
1578 + if (message.nodes[m][n].rname) { message.nodes[m][n].rnamel = message.nodes[m][n].rname.toLowerCase(); } else { message.nodes[m][n].rnamel = message.nodes[m][n].namel; }
1579 + message.nodes[m][n].meshnamel = meshes[m].name.toLowerCase();
1580 + message.nodes[m][n].meshid = m;
1581 + message.nodes[m][n].state = (message.nodes[m][n].state)?(message.nodes[m][n].state):0;
1582 + message.nodes[m][n].desc = message.nodes[m][n].desc;
1583 + message.nodes[m][n].ip = message.nodes[m][n].ip;
1584 + if (!message.nodes[m][n].icon) message.nodes[m][n].icon = 1;
1585 + message.nodes[m][n].ident = ++nodeShortIdent;
1586 + nodes.push(message.nodes[m][n]);
1587 + }
1588 + }
1589 + masterUpdate(1 | 2 | 4 | 64);
1590 +
1591 + if (xxcurrentView == -1) { if ('{{viewmode}}' != '') { go(parseInt('{{viewmode}}')); } else { setDialogMode(0); go(1); } }
1592 + if ('{{currentNode}}' != '') { gotoDevice('{{currentNode}}',parseInt('{{viewmode}}'));}
1593 + break;
1594 + }
1595 + case 'powertimeline': {
1596 + if (message.nodeid != powerTimelineReq) break;
1597 + powerTimelineNode = message.nodeid;
1598 + powerTimeline = message.timeline;
1599 + powerTimelineUpdate = Date.now() + 300000; // Update every 5 minutes
1600 + for (var i in powerTimeline) { if (i % 2 == 1) { powerTimeline[i] = powerTimeline[i] * 1000; } } // Decompress time
1601 + if (currentNode._id == message.nodeid) { masterUpdate(256); }
1602 + break;
1603 + }
1604 + case 'getsysinfo': {
1605 + if (message.nodeid != powerTimelineReq) break;
1606 + //console.log('getsysinfo', message); // ***********************
1607 + if (message.noinfo === true) {
1608 + QH('p17info', "Geen informatie over dit apparaat.");
1609 + } else {
1610 + var x = '', s = {};
1611 + if (message.hardware) {
1612 + if (message.hardware.identifiers) {
1613 + var ident = message.hardware.identifiers;
1614 + // BIOS
1615 + x += '<div class=DevSt style=margin-bottom:3px><b>' + "BIOS" + '</b></div>';
1616 + if (ident.bios_vendor) { x += addDetailItem("Verkoper", ident.bios_vendor, s); }
1617 + if (ident.bios_version) { x += addDetailItem("Versie", ident.bios_version, s); }
1618 + x += '<br />';
1619 +
1620 + // Motherboard
1621 + x += '<div class=DevSt style=margin-bottom:3px><b>' + "Moederbord" + '</b></div>';
1622 + if (ident.board_vendor) { x += addDetailItem("Verkoper", ident.board_vendor, s); }
1623 + if (ident.board_name) { x += addDetailItem("Naam", ident.board_name, s); }
1624 + if (ident.board_serial && (ident.board_serial != '')) { x += addDetailItem("Serieel", ident.board_serial, s); }
1625 + if (ident.board_version) { x += addDetailItem("Versie", ident.board_version, s); }
1626 + if (ident.product_uuid) { x += addDetailItem("Identifier", ident.product_uuid, s); }
1627 + x += '<br />';
1628 + }
1629 +
1630 + if (message.hardware.windows) {
1631 + if (message.hardware.windows.memory) {
1632 + // Memory
1633 + x += '<div class=DevSt style=margin-bottom:3px><b>' + "Geheugen" + '</b></div>';
1634 +
1635 + // Sort Memory
1636 + function memorySort(a, b) { if (a.BankLabel > b.BankLabel) return 1; if (a.BankLabel < b.BankLabel) return -1; return 0; }
1637 + message.hardware.windows.memory.sort(memorySort);
1638 +
1639 + x += '<table style=width:100%>';
1640 + for (var i in message.hardware.windows.memory) {
1641 + var m = message.hardware.windows.memory[i];
1642 + x += '<tr><td VALIGN=Top style=width:38px><img src="images/ram2.png" />'
1643 + x += '<td><div style=background-color:lightgray;border-radius:5px;padding:8px>';
1644 + x += '<div><b>' + m.BankLabel + '</b></div>';
1645 + if (m.Capacity) { x += addDetailItem("Capaciteit / snelheid", format("{0} Mb, {1} Mhz", (m.Capacity / 1024 / 1024), m.Speed), s); }
1646 + if (m.PartNumber) { x += addDetailItem("Onderdeel nummer", ((m.Manufacturer && m.Manufacturer != 'Undefined')?(m.Manufacturer + ', '):'') + m.PartNumber, s); }
1647 + x += '</div>';
1648 + }
1649 + x += '</table><br />';
1650 + }
1651 +
1652 + if (message.hardware.windows.osinfo) {
1653 + // Operating System
1654 + var m = message.hardware.windows.osinfo;
1655 + x += '<div class=DevSt style=margin-bottom:3px><b>' + "Besturingssysteem" + '</b></div>';
1656 + if (m.Caption) { x += addDetailItem("Naam", m.Caption, s); }
1657 + if (m.Version) { x += addDetailItem("Versie", m.Version, s); }
1658 + if (m.OSArchitecture) { x += addDetailItem("architectuur", m.OSArchitecture, s); }
1659 + x += '<br />';
1660 + }
1661 +
1662 + // Disks
1663 + //x += '<div class=DevSt style=margin-bottom:3px><b>Disks</b></div>';
1664 + //x += '<br />';
1665 + }
1666 + }
1667 +
1668 + QH('p17info', x);
1669 + }
1670 + break;
1671 + }
1672 + case 'lastconnect': {
1673 + var node = getNodeFromId(message.nodeid);
1674 + if (node != null) {
1675 + node.lastconnect = message.time;
1676 + node.lastaddr = message.addr;
1677 + if ((currentNode._id == node._id) && (Q('MainComputerState').innerHTML == '')) {
1678 + QH('MainComputerState', '<span>' + "Laatst gezien" + '<br />' + printDateTime(new Date(node.lastconnect)) + '</span>');
1679 + }
1680 + }
1681 + break;
1682 + }
1683 + case 'msg': {
1684 + // Check if this is a message from a node
1685 + if (message.nodeid != null) {
1686 + var index = -1;
1687 + if (nodes != null) { for (var i in nodes) { if (nodes[i]._id == message.nodeid) { index = i; break; } } }
1688 + if (index != -1) {
1689 + // Node was found, dispatch the message
1690 + if (message.type == 'console') { p15consoleReceive(nodes[index], message.value, message.source); } // This is a console message.
1691 + else if (message.type == 'notify') { // This is a notification message.
1692 + var n = getstore('notifications', 0);
1693 + if (((n & 8) == 0) && (message.amtMessage != null)) { break; } // Intel AMT desktop & terminal messages should be ignored.
1694 + var n = { text: message.value, title: message.title, icon: message.icon };
1695 + if (message.nodeid != null) { n.nodeid = message.nodeid; }
1696 + if (message.tag != null) { n.tag = message.tag; }
1697 + if (message.username != null) { n.username = message.username; }
1698 + addNotification(n);
1699 + } else if (message.type == 'ps') {
1700 + showDeskToolsProcesses(message);
1701 + } else if (message.type == 'services') {
1702 + showDeskToolsServices(message);
1703 + } else if ((message.type == 'getclip') && (xxdialogTag == 'clipboard') && (currentNode != null) && (currentNode._id == message.nodeid)) {
1704 + Q('d2clipText').value = message.data;
1705 + } else if ((message.type == 'setclip') && (xxdialogTag == 'clipboard') && (currentNode != null) && (currentNode._id == message.nodeid)) {
1706 + // Display success/fail on the clipboard dialog box.
1707 + QH('dlgClipStatus', message.success ? '<span style=color:green>' + "Geslaagd" + '</span>' : '<span style=color:red>' + "Mislukt" + '</span>')
1708 + setTimeout(function () { try { QH('dlgClipStatus', ''); } catch (ex) { } }, 2000);
1709 + } else if ((message.type == 'userSessions') && (currentNode != null) && (currentNode._id == message.nodeid) && (desktop == null)) {
1710 + // Got list of user sessions
1711 + var userSessions = [];
1712 + if (message.data != null) { for (var i in message.data) { if ((message.data[i].State == 'Active') || (message.data[i].StationName == 'Console') || (debugmode == 3)) { userSessions.push(message.data[i]); } } }
1713 + if (userSessions.length == 0) { connectDesktop(null, 1); } // No active sessions, do a normal connection.
1714 + else if (userSessions.length == 1) { connectDesktop(null, 1, userSessions[0].SessionId); } // One active session, connect to it
1715 + else {
1716 + var x = '';
1717 + for (var i in userSessions) {
1718 + x += '<div style="text-align:left;cursor:pointer;background-color:gray;margin:5px;padding:5px;border-radius:5px" onclick=connectDesktop(event,1,' + userSessions[i].SessionId + ')>' + userSessions[i].State + ', ' + userSessions[i].StationName;
1719 + if (userSessions[i].Username) { if (userSessions[i].Domain) { x += ' - ' + userSessions[i].Domain + '/' + userSessions[i].Username; } else { x += ' - ' + userSessions[i].Username; } }
1720 + x += '</div>';
1721 + }
1722 + QH('p11DeskSessionSelector', x);
1723 + QV('p11DeskSessionSelector', true);
1724 + }
1725 + }
1726 + }
1727 + } else {
1728 + if (message.type == 'notify') { // This is a notification message.
1729 + var n = { text: message.value, title: message.title, icon: message.icon };
1730 + if (message.tag != null) { n.tag = message.tag; }
1731 + if (message.username != null) { n.username = message.username; }
1732 + addNotification(n);
1733 + }
1734 + }
1735 + break;
1736 + }
1737 + case 'getnetworkinfo': {
1738 + if ((currentNode._id == message.nodeid) && (xxdialogMode == 2) && (xxdialogTag == 'if' + message.nodeid)) {
1739 + if (message.netif == null) {
1740 + QH('d2netinfo', "geen netwerkinterface informatie beschikbaar voor dit apparaat.");
1741 + } else {
1742 + var x = '<div class=dialogText>';
1743 +
1744 + if (currentNode.lastconnect) { x += addHtmlValue2("Laatste agentverbinding", printDateTime(new Date(currentNode.lastconnect))); }
1745 + if (currentNode.lastaddr) {
1746 + var splitip = currentNode.lastaddr.split(':');
1747 + if (splitip.length > 2) {
1748 + // IPv6
1749 + x += addHtmlValue2("Laatste agentadres", currentNode.lastaddr + ' <img src="images/link4.png" title="Copy address to clipboard" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(currentNode.lastaddr) + '\") width=10 height=10>');
1750 + } else {
1751 + // IPv4
1752 + if (isPrivateIP(currentNode.lastaddr)) {
1753 + x += addHtmlValue2("Laatste agentadres", splitip[0] + ' <img src="images/link4.png" title="' + "Kopieer adres naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(splitip[0]) + '\") width=10 height=10>');
1754 + } else {
1755 + x += addHtmlValue2("Laatste agentadres", '<a href="https://iplocation.com/?ip=' + splitip[0] + '" rel="noreferrer noopener" target="MeshIPLoopup">' + splitip[0] + '</a> <img src="images/link4.png" title="' + "Kopieer adres naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(splitip[0]) + '\") width=10 height=10>');
1756 + }
1757 + }
1758 + }
1759 +
1760 + x += addHtmlValue2("Laatste update van interfaces", printDateTime(new Date(message.updateTime)));
1761 + for (var i in message.netif) {
1762 + var net = message.netif[i];
1763 + x += '<hr />'
1764 + if (net.name) { x += addHtmlValue2("Naam", '<b>' + EscapeHtml(net.name) + '</b>'); }
1765 + if (net.desc) { x += addHtmlValue2("Omschrijving", EscapeHtml(net.desc).replace('(R)', '&reg;').replace('(r)', '&reg;')); }
1766 + if (net.dnssuffix) { x += addHtmlValue2("DNS-achtervoegsel", EscapeHtml(net.dnssuffix) + ' <img src="images/link4.png" title="' + "Kopieer de naam naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(net.dnssuffix) + '\") width=10 height=10>'); }
1767 + if (net.mac) { x += addHtmlValue2("MAC adres", '<a href="https://dnslytics.com/mac-address-lookup/' + net.mac.substring(0, 6) + '" rel="noreferrer noopener" target="MeshMACLoopup">' + EscapeHtml(net.mac.toLowerCase()) + '</a> <img src="images/link4.png" title="' + "Kopieer MAC adres naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(net.mac.toLowerCase()) + '\") width=10 height=10>'); }
1768 + if (net.v4addr) { x += addHtmlValue2("IPv4 adres", EscapeHtml(net.v4addr) + ' <img src="images/link4.png" title="' + "Kopieer adres naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(net.v4addr) + '\") width=10 height=10>'); }
1769 + if (net.v4mask) { x += addHtmlValue2("IPv4 mask", EscapeHtml(net.v4mask) + ' <img src="images/link4.png" title="' + "Kopieer adres naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(net.v4mask) + '\") width=10 height=10>'); }
1770 + if (net.v4gateway) { x += addHtmlValue2("IPv4 gateway", EscapeHtml(net.v4gateway) + ' <img src="images/link4.png" title="' + "Kopieer adres naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(net.v4gateway) + '\") width=10 height=10>'); }
1771 + if (net.gatewaymac) { x += addHtmlValue2("Gateway MAC", '<a href="https://dnslytics.com/mac-address-lookup/' + net.gatewaymac.substring(0, 6) + '" rel="noreferrer noopener" target="MeshMACLoopup">' + EscapeHtml(net.gatewaymac.toLowerCase()) + '</a> <img src="images/link4.png" title="' + "Kopieer MAC adres naar het klembord" + '" style="cursor:pointer" onclick=copyTextToClip2(\"' + encodeURIComponent(net.gatewaymac.toLowerCase()) + '\") width=10 height=10>'); }
1772 + }
1773 + x += '</div>';
1774 + QH('d2netinfo', x);
1775 + }
1776 + }
1777 + break;
1778 + }
1779 + case 'serverversion': {
1780 + if ((xxdialogMode == 2) && (xxdialogTag == 'MeshCentralServerUpdate')) {
1781 + var x = '<div class=dialogText>';
1782 + if (!message.current) { message.current = "Onbekend"; }
1783 + if (!message.latest) { message.latest = "Onbekend"; }
1784 + x += addHtmlValue2("Huidige versie", '<b>' + EscapeHtml(message.current) + '</b>');
1785 + x += addHtmlValue2("Laatste versie", '<b>' + EscapeHtml(message.latest) + '</b>');
1786 + x += '</div>';
1787 + if ((message.latest.indexOf('.') == -1) || (message.current == message.latest) || ((features & 2048) == 0)) {
1788 + setDialogMode(2, "MeshCentral Versie", 1, null, x);
1789 + } else {
1790 + setDialogMode(2, "MeshCentral Versie", 3, server_showVersionDlgEx, x + '<br /><label><input id=d2updateCheck type=checkbox onclick=server_showVersionDlgUpdate() /> ' + "Controleer en klik op OK om de serverupdate te starten." + '</label>');
1791 + server_showVersionDlgUpdate();
1792 + }
1793 + }
1794 + break;
1795 + }
1796 + case 'servererrors': {
1797 + if ((xxdialogMode == 2) && (xxdialogTag == 'MeshCentralServerErrors')) {
1798 + if (message.data == null) {
1799 + setDialogMode(2, "MeshCentral serverfouten", 1, null, "Server heeft geen foutenlogboek.");
1800 + } else {
1801 + var x = '<div class="dialogText dialogTextLog"><pre id=d2ServerErrorsLogPre>' + message.data + '<pre></div>';
1802 + setDialogMode(2, "MeshCentral serverfouten", 3, server_showErrorsDlgEx, x + '<br /><div style=float:right><img src=images/link4.png height=10 width=10 title="' + "Foutenlogboek downloaden" + '" style=cursor:pointer onclick=d2CopyServerErrorsToClip()></div><div><label><input id=d2updateCheck type=checkbox onclick=server_showVersionDlgUpdate() /> ' + "Controleer en klik op OK om het foutenlogboek te wissen." + '</label></div>');
1803 + server_showVersionDlgUpdate();
1804 + }
1805 + }
1806 + break;
1807 + }
1808 + case 'serverconsole': {
1809 + p15consoleReceive('serverconsole', message.value);
1810 + break;
1811 + }
1812 + case 'events': {
1813 + if ((message.nodeid != null) && (message.nodeid == currentNode._id)) {
1814 + currentDeviceEvents = message.events;
1815 + masterUpdate(1024);
1816 + } else if ((message.user != null) && (message.user == currentUser.name)) {
1817 + currentUserEvents = message.events;
1818 + masterUpdate(2048);
1819 + } else {
1820 + events = message.events;
1821 + masterUpdate(32);
1822 + }
1823 + break;
1824 + }
1825 + case 'getcookie': {
1826 + if (message.tag == 'clickonce') {
1827 + var basicPort = '{{{serverRedirPort}}}' == '' ? '{{{serverPublicPort}}}' : '{{{serverRedirPort}}}';
1828 + var rdpurl = 'http://' + window.location.hostname + ':' + basicPort + '/clickonce/minirouter/MeshMiniRouter.application?WS=wss%3A%2F%2F' + window.location.hostname + '%2Fmeshrelay.ashx%3Fauth=' + message.cookie + '&CH={{{webcerthash}}}&AP=' + message.protocol + ((debugmode == 1) ? '' : '&HOL=1');
1829 + var newWindow = window.open(rdpurl, '_blank');
1830 + newWindow.opener = null;
1831 + }
1832 + break;
1833 + }
1834 + case 'getNotes': {
1835 + var n = Q('d2devNotes');
1836 + if (n && (message.id == decodeURIComponent(n.attributes['noteid'].value))) {
1837 + if (message.notes) { QH('d2devNotes', decodeURIComponent(message.notes)); } else { QH('d2devNotes', ''); }
1838 + var ro = (n.attributes['ro'].value == 'true');
1839 + if (ro == false) { // If we have permissions, set read/write on this note.
1840 + n.removeAttribute('readonly');
1841 + QE('idx_dlgOkButton', true);
1842 + QV('idx_dlgOkButton', true);
1843 + focusTextBox('d2devNotes');
1844 + }
1845 + }
1846 + break;
1847 + }
1848 + case 'otpauth-request': {
1849 + if ((xxdialogMode == 2) && (xxdialogTag == 'otpauth-request')) {
1850 + var secret = message.secret;
1851 + if (secret.length == 52) { secret = secret.split(/(.............)/).filter(Boolean).join(' '); }
1852 + else if (secret.length == 32) { secret = secret.split(/(....)/).filter(Boolean).join(' '); secret = secret.substring(0, 20) + '<br/>' + secret.substring(20) }
1853 + QH('d2optinfo', '<table style=width:380px><tr><td style=vertical-align:top>' + "Installeer <a href=\"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2\" rel=\"noreferrer noopener\" target=_blank> Google Authenticator </a> of een compatibele applicatie en scan de streepjescode, gebruik <a href=\"' + message.url +'\" rel=\"noreferrer noopener\" target=_blank> deze link </a> of voer de link in geheim. Voer vervolgens het huidige 6-cijferige token hieronder in om 2-staps aanmelding te activeren." + '<br /><br />Secret<br /><tt id=d2optsecret secret=\"' + message.secret + '\" style=font-size:12px>' + secret + '</tt><br /><br /></td><td style=width:1px;vertical-align:top><a href=\"' + message.url + '\" rel=\"noreferrer noopener\" target=_blank><div id="qrcode"></div></a></td><tr><td colspan=2 style="text-align:center;border-top:1px solid black"><br />' + "Voer hier het token in voor tweestaps-aanmelding:" + ' <input type=text onkeypress=\"return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)\" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></td></table>');
1854 + new QRCode(Q('qrcode'), { text: message.url, width: 128, height: 128, colorDark: '#000000', colorLight: '#EEE', correctLevel: QRCode.CorrectLevel.H });
1855 + QV('idx_dlgOkButton', true);
1856 + QE('idx_dlgOkButton', false);
1857 + Q('d2otpauthinput').focus();
1858 + }
1859 + break;
1860 + }
1861 + case 'otpauth-setup': {
1862 + if (xxdialogMode) return;
1863 + setDialogMode(2, "Verificatie-app", 1, null, message.success ? ('<b style=color:green>' + "Verificatie-app activatie geslaagd" + '</b> ' + "U hebt nu een geldig token nodig om opnieuw in te loggen.") : ('<b style=color:red>' + "Tweestapsverificatie is msilukt." + '</b> ' + "Wis het geheim van de applicatie en probeer het opnieuw. Je hebt maar een paar minuten om de juiste code in te voeren."));
1864 + break;
1865 + }
1866 + case 'otpauth-clear': {
1867 + if (xxdialogMode) return;
1868 + setDialogMode(2, "Verificatie-app", 1, null, message.success ? ('<b>' + "Verificatie-applicatie verwijderd." + '</b> ' + "U kunt deze functie op elk moment opnieuw activeren.") : ('<b style=color:red>' + "Tweestapsverificatie verwijdering is mislukt." + '</b> ' + "Probeer opnieuw"));
1869 + break;
1870 + }
1871 + case 'otpauth-getpasswords': {
1872 + if (xxdialogMode) return;
1873 + var x = "Eenmalige tokens kunnen worden gebruikt als secundaire authenticatie. Genereer een set, druk ze af en bewaar ze op een veilige plaats.";
1874 + x += '<div style="border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px"><div style="padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold"><table class=selecttext style=width:100%;text-align:center>';
1875 + if (message.passwords) {
1876 + var j = 0, clipb = '';
1877 + for (var i in message.passwords) {
1878 + if (++j % 2) { x += '<tr>'; }
1879 + var p = '' + message.passwords[i].p;
1880 + while (p.length < 8) { p = '0' + p; }
1881 + if (message.passwords[i].u === true) {
1882 + x += '<td>' + p.substring(0, 4) + '&nbsp;' + p.substring(4);
1883 + if (clipb != '') { clipb += ' '; }
1884 + clipb += p;
1885 + } else {
1886 + x += '<td><strike style=color:#BBB>' + p.substring(0, 4) + '&nbsp;' + p.substring(4); + '</strike>';
1887 + }
1888 + }
1889 + } else {
1890 + x += '<tr><td>' + "geen actieve tokens";
1891 + }
1892 + x += '</table></div></div><br />';
1893 + x += '<div><input type=button value=' + "Sluiten" + ' onclick=setDialogMode(0) style=float:right></input>';
1894 + x += '<input type=button value="' + "Genereer nieuwe tokens" + '" onclick="account_manageOtp(1);"></input>';
1895 + if (message.passwords != null) {
1896 + x += '<input type=button value="' + "Wis Tokens" + '" onclick="account_manageOtp(2);"></input>';
1897 + x += '&nbsp;<img src=images/link4.png height=10 width=10 title="' + "Kopieer de geldige code's naar het klembord" + '" style=cursor:pointer onclick=copyTextToClip2("' + encodeURIComponent(clipb) + '")>';
1898 + }
1899 + x += '</div><br />';
1900 + setDialogMode(2, "Beheer back-up codes", 8, null, x, 'otpauth-manage');
1901 + break;
1902 + }
1903 + case 'otp-hkey-get': {
1904 + if (xxdialogMode && (xxdialogTag != 'otpauth-hardware-manage')) return;
1905 + var start = '<div style="border-radius:6px;border:2px solid #CCC;background-color:#BBB;width:100%;box-sizing:border-box;margin-bottom:6px"><div style="margin:3px;font-family:Arial, Helvetica, sans-serif;font-size:16px;font-weight:bold"><table style=width:100%;text-align:left>';
1906 + var end = '</table></div></div>';
1907 + var x = "<a href=\"https://www.yubico.com/\" rel=\"noreferrer noopener\" target=\"_blank\">Hardware sleutels</a> worden gebruikt als secundaire inlogverificatie.";
1908 + x += '<div style="max-height:150px;overflow-y:auto;overflow-x:hidden;margin-top:6px;margin-bottom:6px">';
1909 + if (message.keys && message.keys.length > 0) {
1910 + for (var i in message.keys) {
1911 + var key = message.keys[i], type = (key.type == 2)?'OTP':'WebAuthn';
1912 + x += start + '<tr style=margin:5px><td style=width:30px><img width=24 height=18 src="images/hardware-key-' + type + '-24.png" style=margin-top:4px><td style=width:250px>' + key.name + '<td><input type=button value="' + "verwijderen" + '" onclick=account_removehkey(' + key.i + ')></input>' + end;
1913 + }
1914 + } else {
1915 + x += start + '<tr style=text-align:center><td>' + "Geen sleutels geconfigureerd" + end;
1916 + }
1917 + x += '</div>';
1918 + x += '<div><input type=button value="' + "Sluiten" + '" onclick=setDialogMode(0) style=float:right></input>';
1919 + if ((features & 0x00020000) != 0) { x += '<input id=d2addkey3 type=button value="' + "Sleutel toevoegen" + '" onclick="account_addhkey(3);"></input>'; }
1920 + if ((features & 0x00004000) != 0) { x += '<input id=d2addkey2 type=button value="' + "Voeg YubiKey® OTP toe" + '" onclick="account_addhkey(2);"></input>'; }
1921 + x += '</div><br />';
1922 + setDialogMode(2, "Beheer beveiligingssleutels", 8, null, x, 'otpauth-hardware-manage');
1923 + if (u2fSupported() == false) { QE('d2addkey1', false); }
1924 + break;
1925 + }
1926 + case 'otp-hkey-yubikey-add': {
1927 + if (message.result) {
1928 + meshserver.send({ action: 'otp-hkey-get' }); // Success, ask for the full list of keys.
1929 + } else {
1930 + setDialogMode(2, "Beveiligingssleutel toevoegen", 1, null, '<br />' + "Fout, kan sleutel niet toevoegen." + '<br /><br />');
1931 + }
1932 + break;
1933 + }
1934 + case 'otp-hkey-setup-response': {
1935 + if (xxdialogMode && (xxdialogTag != 'otpauth-hardware-manage')) return;
1936 + if (message.result == true) {
1937 + meshserver.send({ action: 'otp-hkey-get' }); // Success, ask for the full list of keys.
1938 + } else {
1939 + setDialogMode(2, "Beveiligingssleutel toevoegen", 1, null, '<br />' + "FOUT: kan sleutel niet toevoegen." + '<br /><br />', 'otpauth-hardware-manage');
1940 + }
1941 + break;
1942 + }
1943 + case 'webauthn-startregister': {
1944 + if (xxdialogMode && (xxdialogTag != 'otpauth-hardware-manage')) return;
1945 + var x = "Druk nu op de sleutelknop." + '<br /><br /><div style=width:100%;text-align:center><img width=120 height=117 src="images/hardware-keypress-120.png" /></div><input id=dp1keyname style=display:none value=' + message.name + ' />';
1946 + setDialogMode(2, "Beveiligingssleutel toevoegen", 2, null, x);
1947 +
1948 + var publicKey = message.request;
1949 + message.request.challenge = Uint8Array.from(atob(message.request.challenge), function (c) { return c.charCodeAt(0) })
1950 + message.request.user.id = Uint8Array.from(atob(message.request.user.id), function (c) { return c.charCodeAt(0) })
1951 + navigator.credentials.create({ publicKey: publicKey })
1952 + .then(function(newCredentialInfo) {
1953 + // Public key credential
1954 + var r = { rawId: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.rawId))), response: { attestationObject: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.response.attestationObject))), clientDataJSON: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.response.clientDataJSON))) }, type: newCredentialInfo.type };
1955 + meshserver.send({ action: 'webauthn-endregister', response: r });
1956 + setDialogMode(0);
1957 + }, function(error) {
1958 + // Error
1959 + setDialogMode(2, "Beveiligingssleutel toevoegen", 1, null, "FOUT:" + error);
1960 + });
1961 + break;
1962 + }
1963 + case 'event': {
1964 + if (!message.event.nolog) {
1965 + if (currentNode && (message.event.nodeid == currentNode._id)) {
1966 + // If this event has a nodeid and we are looking at this node, update the log in real time.
1967 + currentDeviceEvents.unshift(message.event);
1968 + var eventLimit = parseInt(p16limitdropdown.value);
1969 + while (currentDeviceEvents.length > eventLimit) { currentDeviceEvents.pop(); } // Remove element(s) at the end
1970 + masterUpdate(1024);
1971 + }
1972 +
1973 + if (currentUser && (message.event.userid == currentUser._id)) {
1974 + // If this event has a userid and we are looking at this user, update the log in real time.
1975 + currentUserEvents.unshift(message.event);
1976 + var eventLimit = parseInt(p31limitdropdown.value);
1977 + while (currentUserEvents.length > eventLimit) { currentUserEvents.pop(); } // Remove element(s) at the end
1978 + masterUpdate(2048);
1979 + }
1980 +
1981 + // Add this event to the master events log.
1982 + events.unshift(message.event);
1983 + var eventLimit = parseInt(p3limitdropdown.value);
1984 + while (events.length > eventLimit) { events.pop(); } // Remove element(s) at the end
1985 + masterUpdate(32);
1986 + }
1987 + if (message.event.noact) break; // Take no action on this event
1988 + switch (message.event.action) {
1989 + case 'userWebState': {
1990 + // New user web state, update the web page as needed
1991 + if (localStorage != null) {
1992 + var oldShowRealNames = localStorage.getItem('showRealNames');
1993 + var oldUiMode = localStorage.getItem('uiMode');
1994 + var oldSort = localStorage.getItem('sort');
1995 + var oldLoctag = localStorage.getItem('loctag');
1996 +
1997 + var webstate = JSON.parse(message.event.state);
1998 + for (var i in webstate) { localStorage.setItem(i, webstate[i]); }
1999 +
2000 + // Update the web page
2001 + if ((webstate.deskAspectRatio != null) && (webstate.deskAspectRatio != deskAspectRatio)) { deskAspectRatio = webstate.deskAspectRatio; deskAdjust(); }
2002 + if ((webstate.showRealNames != null) && (webstate.showRealNames != oldShowRealNames)) { showRealNames = Q('RealNameCheckBox').checked = (webstate.showRealNames == '1'); masterUpdate(6); }
2003 + if ((webstate.uiMode != null) && (webstate.uiMode != oldUiMode)) { userInterfaceSelectMenu(parseInt(webstate.uiMode)); }
2004 + if ((webstate.sort != null) && (webstate.sort != oldSort)) { document.getElementById('sortselect').selectedIndex = sort = parseInt(webstate.sort); masterUpdate(6); }
2005 + if ((webstate.loctag != null) && (webstate.loctag != oldLoctag)) { if (webstate.loctag != null) { args.locale = webstate.loctag; } else { delete args.locale; } masterUpdate(0xFFFFFFFF); }
2006 + }
2007 + break;
2008 + }
2009 + case 'servertimelinestats': { addServerTimelineStats(message.event.data); break; }
2010 + case 'accountcreate':
2011 + case 'accountchange': {
2012 + // An account was created or changed
2013 + if (userinfo.name == message.event.account.name) {
2014 + var newsiteadmin = message.event.account.siteadmin?message.event.account.siteadmin:0;
2015 + var oldsiteadmin = userinfo.siteadmin?userinfo.siteadmin:0;
2016 + if ((message.event.account.quota != userinfo.quota) || (((userinfo.siteadmin & 8) == 0) && ((message.event.account.siteadmin & 8) != 0))) { meshserver.send({ action: 'files' }); }
2017 + var oldgroups = userinfo.groups;
2018 + userinfo = message.event.account;
2019 + if (oldsiteadmin != newsiteadmin) updateSiteAdmin();
2020 + updateSelf();
2021 +
2022 + if ((userinfo.siteadmin & 2) != 0) {
2023 + // Compare our groups
2024 + var og = oldgroups ? oldgroups : [];
2025 + var ng = userinfo.groups ? userinfo.groups : [];
2026 + if (og.join(',') != ng.join(',')) {
2027 + // Our groups have changed, re-ask for a list of users.
2028 + users = wssessions = null;
2029 + meshserver.send({ action: 'users' });
2030 + meshserver.send({ action: 'wssessioncount' });
2031 + }
2032 + }
2033 + }
2034 + if (users == null) break;
2035 +
2036 + // Check if the account is part of our user group
2037 + if ((userinfo.groups == null) || (userinfo.groups.length == 0) || (findOne(message.event.account.groups, userinfo.groups) == true)) {
2038 + users[message.event.account._id] = message.event.account; // Part of our groups, update this user.
2039 + } else {
2040 + delete users[message.event.account._id]; // No longer part of our groups, remove this user.
2041 + }
2042 +
2043 + updateUsers();
2044 + break;
2045 + }
2046 + case 'accountremove': {
2047 + // An account was removed
2048 + if (users == null) break;
2049 + delete users['user/' + domain + '/' + message.event.username.toLowerCase()];
2050 + updateUsers();
2051 + break;
2052 + }
2053 + case 'createmesh': {
2054 + // A new mesh was created
2055 + if ((meshes[message.event.meshid] == null) && (message.event.links[userinfo._id] != null)) { // Check if this is a mesh create for a mesh we own. If site administrator, we get all messages so need to ignore some.
2056 + meshes[message.event.meshid] = { _id: message.event.meshid, name: message.event.name, mtype: message.event.mtype, desc: message.event.desc, links: message.event.links };
2057 + masterUpdate(4 + 128);
2058 + meshserver.send({ action: 'files' });
2059 + }
2060 + break;
2061 + }
2062 + case 'meshchange': {
2063 + // Update mesh information
2064 + if (meshes[message.event.meshid] == null) {
2065 + // This is a new mesh for us
2066 + meshes[message.event.meshid] = { _id: message.event.meshid, name: message.event.name, mtype: message.event.mtype, desc: message.event.desc, links: message.event.links };
2067 + meshserver.send({ action: 'nodes' }); // Request a refresh of all nodes (TODO: We could optimize this to only request nodes for the new mesh).
2068 + } else {
2069 + // This is an existing mesh
2070 + if (message.event.name != null) {
2071 + meshes[message.event.meshid].name = message.event.name;
2072 + for (var i in nodes) { if (nodes[i].meshid == message.event.meshid) { nodes[i].meshnamel = message.event.name.toLowerCase(); } }
2073 + }
2074 + if (message.event.desc != null) { meshes[message.event.meshid].desc = message.event.desc; }
2075 + if (message.event.flags != null) { meshes[message.event.meshid].flags = message.event.flags; }
2076 + if (message.event.consent != null) { meshes[message.event.meshid].consent = message.event.consent; }
2077 + if (message.event.links) { meshes[message.event.meshid].links = message.event.links; }
2078 + if (message.event.amt) { meshes[message.event.meshid].amt = message.event.amt; }
2079 +
2080 + // Check if we lost rights to this mesh in this change.
2081 + if (meshes[message.event.meshid].links[userinfo._id] == null) {
2082 + if ((xxcurrentView == 20) && (currentMesh == meshes[message.event.meshid])) go(2);
2083 + delete meshes[message.event.meshid];
2084 +
2085 + // Delete all nodes in that mesh
2086 + var newnodes = [];
2087 + for (var i in nodes) { if (nodes[i].meshid != message.event.meshid) { newnodes.push(nodes[i]); } }
2088 + nodes = newnodes;
2089 +
2090 + // If we are looking at a node in the deleted mesh, move back to "My Devices"
2091 + if (xxcurrentView >= 10 && xxcurrentView < 20 && currentNode && currentNode.meshid == message.event.meshid) { setDialogMode(0); go(1); }
2092 + }
2093 + }
2094 + masterUpdate(4 + 128);
2095 + if (currentNode && (currentNode.meshid == message.event.meshid)) { currentNode = null; if ((xxcurrentView >= 10) && (xxcurrentView < 20)) { go(1); } }
2096 + //meshserver.send({ action: 'files' }); // TODO: Why do we need to do this??
2097 +
2098 + // If we are looking at a mesh that is now deleted, move back to "My Account"
2099 + if (xxcurrentView == 20 && currentMesh._id == message.event.meshid) { masterUpdate(4096); }
2100 + break;
2101 + }
2102 + case 'deletemesh': {
2103 + // Delete the mesh
2104 + if (meshes[message.event.meshid]) {
2105 + delete meshes[message.event.meshid];
2106 + masterUpdate(128);
2107 + meshserver.send({ action: 'files' });
2108 + }
2109 +
2110 + // Delete all nodes in that mesh
2111 + var newnodes = [];
2112 + if (nodes != null) { for (var i in nodes) { if (nodes[i].meshid != message.event.meshid) { newnodes.push(nodes[i]); } } }
2113 + nodes = newnodes;
2114 + masterUpdate(4);
2115 +
2116 + // If we are looking at a mesh that is now deleted, move back to "My Account"
2117 + if (xxcurrentView >= 20 && xxcurrentView < 30 && currentMesh._id == message.event.meshid) { setDialogMode(0); go(2); }
2118 + // If we are looking at a node in the deleted mesh, move back to "My Devices"
2119 + if (xxcurrentView >= 10 && xxcurrentView < 20 && currentNode && currentNode.meshid == message.event.meshid) { setDialogMode(0); go(1); }
2120 +
2121 + break;
2122 + }
2123 + case 'addnode': {
2124 + var node = message.event.node;
2125 + if (!meshes[node.meshid]) break; // This is a node for a mesh we don't know. Happens when we are site administrator, we get all messages.
2126 + if (getNodeFromId(node._id) != null) break; // This node is already known.
2127 + node.namel = node.name.toLowerCase();
2128 + if (node.rname) { node.rnamel = node.rname.toLowerCase(); } else { node.rnamel = node.namel; }
2129 + node.meshnamel = meshes[node.meshid].name.toLowerCase();
2130 + node.state = 0;
2131 + if (!node.icon) node.icon = 1;
2132 + node.ident = ++nodeShortIdent;
2133 + if (nodes == null) { }
2134 + nodes.push(node);
2135 +
2136 + // Web page update
2137 + masterUpdate(1 | 2 | 4 | 16);
2138 +
2139 + break;
2140 + }
2141 + case 'removenode': {
2142 + var index = -1;
2143 + for (var i in nodes) { if (nodes[i]._id == message.event.nodeid) { index = i; break; } }
2144 + if (index != -1) {
2145 + var node = nodes[index];
2146 + if (currentNode == node) {
2147 + if (xxcurrentView >= 10 && xxcurrentView < 20) { setDialogMode(0); go(1); }
2148 + currentNode = null;
2149 + // TODO: Correctly disconnect from this node (Desktop/Terminal/Files...)
2150 + }
2151 + nodes.splice(index, 1);
2152 +
2153 + // Web page update
2154 + masterUpdate(4 | 16);
2155 + }
2156 + break;
2157 + }
2158 + case 'changenode': {
2159 + var index = -1;
2160 + for (var i in nodes) { if (nodes[i]._id == message.event.nodeid) { index = i; break; } }
2161 + if (index != -1) {
2162 + var node = nodes[index];
2163 +
2164 + // Change the node
2165 + node.name = message.event.node.name;
2166 + node.rname = message.event.node.rname;
2167 + node.users = message.event.node.users;
2168 + node.host = message.event.node.host;
2169 + node.desc = message.event.node.desc;
2170 + node.ip = message.event.node.ip;
2171 + node.osdesc = message.event.node.osdesc;
2172 + node.publicip = message.event.node.publicip;
2173 + node.iploc = message.event.node.iploc;
2174 + node.wifiloc = message.event.node.wifiloc;
2175 + node.gpsloc = message.event.node.gpsloc;
2176 + node.tags = message.event.node.tags;
2177 + node.userloc = message.event.node.userloc;
2178 + if (message.event.node.agent != null) {
2179 + if (node.agent == null) node.agent = {};
2180 + if (message.event.node.agent.ver != null) { node.agent.ver = message.event.node.agent.ver; }
2181 + if (message.event.node.agent.id != null) { node.agent.id = message.event.node.agent.id; }
2182 + if (message.event.node.agent.caps != null) { node.agent.caps = message.event.node.agent.caps; }
2183 + if (message.event.node.agent.core != null) { node.agent.core = message.event.node.agent.core; } else { if (node.agent.core) { delete node.agent.core; } }
2184 + node.agent.tag = message.event.node.agent.tag;
2185 + }
2186 + if (message.event.node.intelamt != null) {
2187 + if (node.intelamt == null) node.intelamt = {};
2188 + if (message.event.node.intelamt.state != null) { node.intelamt.state = message.event.node.intelamt.state; }
2189 + if (message.event.node.intelamt.host != null) { node.intelamt.user = message.event.node.intelamt.host; }
2190 + if (message.event.node.intelamt.user != null) { node.intelamt.user = message.event.node.intelamt.user; }
2191 + if (message.event.node.intelamt.tls != null) { node.intelamt.tls = message.event.node.intelamt.tls; }
2192 + if (message.event.node.intelamt.ver != null) { node.intelamt.ver = message.event.node.intelamt.ver; }
2193 + if (message.event.node.intelamt.tag != null) { node.intelamt.tag = message.event.node.intelamt.tag; }
2194 + if (message.event.node.intelamt.uuid != null) { node.intelamt.uuid = message.event.node.intelamt.uuid; }
2195 + if (message.event.node.intelamt.realm != null) { node.intelamt.realm = message.event.node.intelamt.realm; }
2196 + }
2197 + if (message.event.node.av != null) { node.av = message.event.node.av; }
2198 + node.namel = node.name.toLowerCase();
2199 + if (node.rname) { node.rnamel = node.rname.toLowerCase(); } else { node.rnamel = node.namel; }
2200 + if (message.event.node.icon) { node.icon = message.event.node.icon; }
2201 +
2202 + // Web page update
2203 + masterUpdate(2 | 4 | 8 | 16);
2204 + refreshDevice(node._id);
2205 +
2206 + if ((currentNode == node) && (xxdialogMode != null) && (xxdialogTag == '@xxmap')) { p10showNodeLocationDialog(); }
2207 + }
2208 + break;
2209 + }
2210 + case 'nodemeshchange': {
2211 + var index = -1;
2212 + for (var i in nodes) { if (nodes[i]._id == message.event.nodeid) { index = i; break; } }
2213 + if (index != -1) {
2214 + var node = nodes[index];
2215 + if (meshes[message.event.newMeshId] == null) {
2216 + // We don't see the new mesh, remove this device
2217 +
2218 + // TODO: Correctly disconnect from this node (Desktop/Terminal/Files...)
2219 + if (currentNode == node) { if (xxcurrentView >= 10 && xxcurrentView < 20) { setDialogMode(0); go(1); } currentNode = null; }
2220 + nodes.splice(index, 1);
2221 + masterUpdate(4 | 16);
2222 + } else {
2223 + // We see the new mesh, move this device
2224 + node.meshid = message.event.newMeshId;
2225 + node.meshnamel = meshes[message.event.newMeshId].name.toLowerCase();
2226 + masterUpdate(1 | 2 | 4);
2227 + }
2228 + refreshDevice(message.event.nodeid);
2229 + } else {
2230 + // This is a new device, add it.
2231 + var node = message.event.node;
2232 + if (!meshes[node.meshid]) break; // This is a node for a mesh we don't know. Happens when we are site administrator, we get all messages.
2233 + node.namel = node.name.toLowerCase();
2234 + if (node.rname) { node.rnamel = node.rname.toLowerCase(); } else { node.rnamel = node.namel; }
2235 + node.meshnamel = meshes[node.meshid].name.toLowerCase();
2236 + node.state = 0;
2237 + if (!node.icon) node.icon = 1;
2238 + node.ident = ++nodeShortIdent;
2239 + if (nodes == null) { }
2240 + nodes.push(node);
2241 +
2242 + // Web page update
2243 + masterUpdate(1 | 2 | 4 | 16);
2244 + }
2245 + break;
2246 + }
2247 + case 'nodeconnect': {
2248 + // Indicated a node has changed connectivity state
2249 + var index = -1;
2250 + for (var i in nodes) { if (nodes[i]._id == message.event.nodeid) { index = i; break; } }
2251 + if (index != -1) {
2252 + var node = nodes[index];
2253 +
2254 + // Event the connection change if needed
2255 + var n = getstore('notifications', 0); // Account notification settings
2256 +
2257 + // Per-group notification settings
2258 + if (message.event.meshid && userinfo.links && userinfo.links[message.event.meshid] && userinfo.links[message.event.meshid].notify) {
2259 + n &= userinfo.links[message.event.meshid].notify;
2260 + } else {
2261 + n = 0;
2262 + }
2263 +
2264 + // Show the notification
2265 + if (n & 2) {
2266 + if (((node.conn & 1) == 0) && ((message.event.conn & 1) != 0)) { addNotification({ text: "Agent verbonden", title: node.name, icon: node.icon, nodeid: node._id }); }
2267 + if (((node.conn & 2) == 0) && ((message.event.conn & 2) != 0)) { addNotification({ text: "Intel AMT gedetecteerd", title: node.name, icon: node.icon, nodeid: node._id }); }
2268 + if (((node.conn & 4) == 0) && ((message.event.conn & 4) != 0)) { addNotification({ text: "Intel AMT CIRA verbonden", title: node.name, icon: node.icon, nodeid: node._id }); }
2269 + if (((node.conn & 16) == 0) && ((message.event.conn & 16) != 0)) { addNotification({ text: "MQTT verbonden", title: node.name, icon: node.icon, nodeid: node._id }); }
2270 + }
2271 + if (n & 4) {
2272 + if (((node.conn & 1) != 0) && ((message.event.conn & 1) == 0)) { addNotification({ text: "Agent niet verbonden", title: node.name, icon: node.icon, nodeid: node._id }); }
2273 + if (((node.conn & 2) != 0) && ((message.event.conn & 2) == 0)) { addNotification({ text: "Intel AMT niet gedetecteerd", title: node.name, icon: node.icon, nodeid: node._id }); }
2274 + if (((node.conn & 4) != 0) && ((message.event.conn & 4) == 0)) { addNotification({ text: "Intel AMT CIRA verbroken", title: node.name, icon: node.icon, nodeid: node._id }); }
2275 + if (((node.conn & 16) != 0) && ((message.event.conn & 16) == 0)) { addNotification({ text: "MQTT verbroken", title: node.name, icon: node.icon, nodeid: node._id }); }
2276 + }
2277 +
2278 + // Change the node connection state
2279 + node.conn = message.event.conn;
2280 + node.pwr = message.event.pwr;
2281 +
2282 + // Web page update
2283 + masterUpdate(4 | 16);
2284 + refreshDevice(node._id);
2285 + }
2286 + break;
2287 + }
2288 + case 'wssessioncount': {
2289 + // Update the active web socket session count for a user
2290 + if (wssessions != null) {
2291 + if (message.event.count == 0 && wssessions['user/' + domain + '/' + message.event.username.toLowerCase()]) {
2292 + delete wssessions['user/' + domain + '/' + message.event.username.toLowerCase()];
2293 + } else {
2294 + wssessions['user/' + domain + '/' + message.event.username.toLowerCase()] = message.event.count;
2295 + }
2296 + updateUsers();
2297 + }
2298 + break;
2299 + }
2300 + case 'login': {
2301 + // Update the last login time
2302 + if (users != null && users['user/' + domain + '/' + message.event.username.toLowerCase()]) {
2303 + users['user/' + domain + '/' + message.event.username.toLowerCase()].login = Math.floor(new Date(message.event.time).getTime() / 1000);
2304 + }
2305 + break;
2306 + }
2307 + case 'scanamtdevice': {
2308 + // Populate the Intel AMT scan dialog box with the result of the RMCP scan
2309 + if ((xxdialogMode == null) || (!Q('dp1range')) || (Q('dp1range').value != message.event.range)) return;
2310 + var x = '';
2311 + if (message.event.results == null) {
2312 + // The scan could not occur because of an error. Likely the user range was invalid.
2313 + x = '<div style=width:100%;text-align:center;margin-top:12px>' + "Kan dit adresbereik niet scannen." + '</div><div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>' + "Voorbeeld van IP-bereikwaarden <br /> 192.168.0.100 <br /> 192.168.1.0/24 <br /> 192.167.0.1-192.168.0.100" + '</div>';
2314 + } else {
2315 + // Go thru all the results and populate the dialog box
2316 + amtScanResults = message.event.results;
2317 + for (var i in message.event.results) {
2318 + var r = message.event.results[i], shortname = r.hostname;
2319 + if (shortname.length > 20) { shortname = shortname.substring(0, 20) + '...'; }
2320 + var str = '<b title="' + EscapeHtml(r.hostname) + '">' + EscapeHtml(shortname) + '</b> - v' + r.ver;
2321 + if (r.state == 2) { if (r.tls == 1) { str += " met TLS."; } else { str += "zonder TLS."; } } else { str += ' not activated.'; }
2322 + x += '<div style=width:100%;margin-bottom:2px;background-color:lightgray><div style=padding:4px><div style=display:inline-block;margin-right:5px><input class=DevScanCheckbox name=dp1checkbox tag="' + EscapeHtml(i) + '" type=checkbox onclick=addAmtScanToMeshCheckbox() /></div><div class=j1 style=display:inline-block></div><div style=display:inline-block;margin-left:5px;overflow-x:auto;white-space:nowrap>' + str + '</div></div></div>';
2323 + }
2324 + // If no results where found, display a nice message
2325 + if (x == '') { x = '<div style=width:100%;text-align:center;margin-top:12px>Scan returned no results.</div><div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>Sample IP range values<br />192.168.0.100<br />192.168.1.0/24<br />192.167.0.1-192.168.0.100</div>'; }
2326 + }
2327 + // Set the html in the dialog box and re-enable the scan button
2328 + QH('dp1results', x);
2329 + QE('dp1range', true);
2330 + QE('dp1rangebutton', true);
2331 + break;
2332 + }
2333 + case 'notify': {
2334 + var n = { text: message.event.value, title: message.event.title, icon: message.event.icon };
2335 + if (message.event.tag != null) { n.tag = message.event.tag; }
2336 + addNotification(n);
2337 + break;
2338 + }
2339 + case 'traceinfo': {
2340 + if (typeof message.event.traceSources == 'object') {
2341 + if ((message.event.traceSources != null) && (message.event.traceSources.length > 0)) {
2342 + serverTraceSources = message.event.traceSources;
2343 + QH('p41traceStatus', EscapeHtml(message.event.traceSources.join(', ')));
2344 + } else {
2345 + serverTraceSources = [];
2346 + QH('p41traceStatus', "Geen");
2347 + }
2348 + }
2349 + break;
2350 + }
2351 + case 'sysinfohash': {
2352 + // If the sysinfo document has changed and we are looking at it, request an update.
2353 + if ((currentNode != null) && (message.event.nodeid == powerTimelineReq)) {
2354 + meshserver.send({ action: 'getsysinfo', nodeid: message.event.nodeid });
2355 + }
2356 + break;
2357 + }
2358 + case 'stopped': { // Server is stopping.
2359 + // Disconnect
2360 + //console.log(message.msg);
2361 + break;
2362 + }
2363 + case 'updatePluginList': {
2364 + installedPluginList = message.event.list;
2365 + updatePluginList();
2366 + break;
2367 + }
2368 + case 'pluginStateChange': {
2369 + if (pluginHandler == null) break;
2370 + pluginHandler.refreshPluginHandler();
2371 + break;
2372 + }
2373 + case 'plugin': {
2374 + if (pluginHandler == null) break;
2375 + try { pluginHandler[message.event.plugin][message.event.pluginaction](message); } catch (e) { console.log("PluginHandler could not event message: ", e); }
2376 + break;
2377 + }
2378 + default:
2379 + //console.log('Unknown message.event.action', message.event.action);
2380 + break;
2381 + }
2382 + break;
2383 + }
2384 + case 'createInviteLink': { // Agent installation invitation link
2385 + if (xxdialogTag != message.meshid) break;
2386 + var servername = serverinfo.name;
2387 + if ((servername.indexOf('.') == -1) || ((features & 2) != 0)) { servername = window.location.hostname; } // If the server name is not set or it's in LAN-only mode, use the URL hostname as server name.
2388 + var domainUrlNoSlash = domainUrl.substring(0, domainUrl.length - 1);
2389 + var url;
2390 + if (serverinfo.https == true) {
2391 + var portStr = (serverinfo.port == 443) ? '' : (':' + serverinfo.port);
2392 + url = 'https://' + servername + portStr + domainUrl + 'agentinvite?c=' + message.cookie;
2393 + } else {
2394 + var portStr = (serverinfo.port == 80) ? '' : (':' + serverinfo.port);
2395 + url = 'http://' + servername + portStr + domainUrl + 'agentinvite?c=' + message.cookie;
2396 + }
2397 + Q('agentInvitationLink').href = url;
2398 + var t = format("{0} uur{1}", message.expire, addLetterS(message.expire));
2399 + if (message.expire == 24) { t = "1 dag"; }
2400 + if (message.expire == 168) { t = "1 week"; }
2401 + if (message.expire == 5040) { t = "1 maand"; }
2402 + if (message.expire == 0) { t = "Ongelimiteerd"; }
2403 + QH('agentInvitationLink', format("Uitnodigingslink ({0})", t));
2404 + QV('agentInvitationLinkDiv', true);
2405 + break;
2406 + }
2407 + case 'getmqttlogin': {
2408 + if ((currentNode == null) || (currentNode._id != message.nodeid) || (xxdialogMode != null)) return;
2409 + var x = "Deze instellingen kunnen worden gebruikt om MQTT voor dit apparaat te verbinden." + '<br /><br />';
2410 + delete message.action;
2411 + delete message.nodeid;
2412 + x += '<textarea readonly=readonly style=width:100%;resize:none;height:100px;overflow:auto;font-size:12px readonly>' + JSON.stringify(message) + '</textarea>';
2413 + /*
2414 + x += addHtmlValue('Username', '<input style=width:230px readonly value="' + message.user + '" />');
2415 + x += addHtmlValue('Password', '<input style=width:230px readonly value="' + message.pass + '" />');
2416 + x += addHtmlValue('WS URL', '<input style=width:230px readonly value="' + message.wsUrl + '" />');
2417 + if (message.mpsUrl && message.mpsCertHash) {
2418 + x += addHtmlValue('MPS URL', '<input style=width:230px readonly value="' + message.mpsUrl + '" />');
2419 + x += addHtmlValue('MPS Cert Hash', '<input style=width:230px readonly value="' + message.mpsCertHash + '" />');
2420 + }
2421 + */
2422 + setDialogMode(2, "MQTT referenties", 1, null, x);
2423 + break;
2424 + }
2425 + case 'stopped': { // Server is stopping.
2426 + // Disconnect
2427 + autoReconnect = false;
2428 + QH('p0span', message.msg);
2429 + break;
2430 + }
2431 + case 'updatePluginList': {
2432 + installedPluginList = message.list;
2433 + updatePluginList();
2434 + break;
2435 + }
2436 + case 'pluginVersionsAvailable': {
2437 + if (pluginHandler == null) break;
2438 + updatePluginList(message.list);
2439 + break;
2440 + }
2441 + case 'downgradePluginVersions': {
2442 + var vSelect = '<select id="lastPluginVersion">';
2443 + message.info.versionList.forEach(function(v) { vSelect += '<option value="' + v.zipball_url + '">' + v.name + '</option>'; });
2444 + vSelect += '</select>';
2445 + setDialogMode(2, "Plugin Actie", 3, pluginActionEx, format('Select the version to downgrade the plugin: {0}', message.info.name) + '<hr />' + vSelect + '<hr />' + "Houd er rekening mee dat downgraden niet wordt aanbevolen. Doe dit alleen als een recente upgrade iets heeft gebroken." + + '<input id="lastPluginAct" type="hidden" value="downgrade" /><input id="lastPluginId" type="hidden" value="' + message.info.id + '" />');
2446 + break;
2447 + }
2448 + case 'pluginError': {
2449 + setDialogMode(2, "Plugin fout", 1, null, message.msg);
2450 + break;
2451 + }
2452 + case 'plugin': {
2453 + if ((pluginHandler == null) || (typeof message.plugin != 'string')) break;
2454 + try { pluginHandler[message.plugin][message.method](server, message); } catch (e) { console.log('Error loading plugin handler ('+ e + ')'); }
2455 + break;
2456 + }
2457 + default:
2458 + //console.log('Unknown message.action', message.action);
2459 + break;
2460 + }
2461 + }
2462 +
2463 + //
2464 + // MY DEVICES
2465 + //
2466 +
2467 + function onRealNameCheckBox() {
2468 + showRealNames = Q('RealNameCheckBox').checked;
2469 + putstore('showRealNames', showRealNames ? 1 : 0);
2470 + masterUpdate(6);
2471 + return;
2472 + }
2473 +
2474 + function onDeviceViewChange(i) {
2475 + if (i != null) { Q('viewselect').value = i; }
2476 + for (var j = 1; j < 5; j++) { Q('devViewButton' + j).classList.remove('viewSelectorSel'); }
2477 + Q('devViewButton' + Q('viewselect').value).classList.add('viewSelectorSel');
2478 + putstore('_deviceView', Q('viewselect').value);
2479 + putstore('_viewsize', Q('sizeselect').value);
2480 + masterUpdate(4);
2481 + setTimeout(function () { masterUpdate(512); }, 200);
2482 + }
2483 +
2484 + function ondockeypress(e) {
2485 + setSessionActivity();
2486 + if (!xxdialogMode && xxcurrentView == 11 && desktop && Q('DeskControl').checked) {
2487 + // Check what keys we are allows to send
2488 + if (currentNode != null) {
2489 + var mesh = meshes[currentNode.meshid];
2490 + var meshrights = mesh.links[userinfo._id].rights;
2491 + var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
2492 + if (inputAllowed == false) return false;
2493 + var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));
2494 + if (limitedInputAllowed == true) { if ((e.altKey == true) || (e.ctrlKey == true) || ((e.keyCode < 32) && (e.keyCode != 8) && (e.keyCode != 13)) || (e.keyCode > 90)) return false; }
2495 + }
2496 + return desktop.m.handleKeys(e);
2497 + }
2498 + if (!xxdialogMode && xxcurrentView == 12 && terminal && terminal.State == 3) { return terminal.m.TermHandleKeys(e); }
2499 + if (!xxdialogMode && ((xxcurrentView == 15) || (xxcurrentView == 115))) return agentConsoleHandleKeys(e);
2500 + if (!xxdialogMode && xxcurrentView == 4) {
2501 + if (e.ctrlKey == true || e.altKey == true || e.metaKey == true) return;
2502 + var processed = 0;
2503 + if (e.key) {
2504 + if (e.key.length === 1 && userSearchFocus == 0) { Q('UserSearchInput').value = ((Q('UserSearchInput').value + e.key)); processed = 1; }
2505 + if (e.keyCode == 8 && userSearchFocus == 0) { var x = Q('UserSearchInput').value; Q('UserSearchInput').value = x.substring(0, x.length - 1); processed = 1; }
2506 + if (e.keyCode == 27) { Q('UserSearchInput').value = ''; processed = 1; }
2507 + } else {
2508 + if (e.charCode != 0 && userSearchFocus == 0) { Q('UserSearchInput').value = ((Q('UserSearchInput').value + String.fromCharCode(e.charCode))); processed = 1; }
2509 + }
2510 + if (processed > 0) { if (processed == 1) { onUserSearchInputChanged(); } return haltEvent(e); }
2511 + }
2512 + if (xxdialogMode || xxcurrentView != 1) return;
2513 + if (e.ctrlKey == true && e.charCode == 96) {
2514 + showRealNames = !showRealNames;
2515 + Q('RealNameCheckBox').value = showRealNames;
2516 + putstore('showRealNames', showRealNames ? 1 : 0);
2517 + masterUpdate(6)
2518 + return;
2519 + }
2520 + if (e.ctrlKey == true || e.altKey == true || e.metaKey == true) return;
2521 + if (Q('viewselect').value < 3) {
2522 + var processed = 0;
2523 + if (e.key) {
2524 + if (e.key.length === 1 && searchFocus == 0) { Q('SearchInput').value = ((Q('SearchInput').value + e.key)); processed = 1; }
2525 + if (e.keyCode == 8 && searchFocus == 0) { var x = Q('SearchInput').value; Q('SearchInput').value = x.substring(0, x.length - 1); processed = 1; }
2526 + if (e.keyCode == 27) { Q('SearchInput').value = ''; processed = 1; }
2527 + } else {
2528 + if (e.charCode != 0 && searchFocus == 0) { Q('SearchInput').value = ((Q('SearchInput').value + String.fromCharCode(e.charCode))); processed = 1; }
2529 + }
2530 + if (processed > 0) { if (processed == 1) { masterUpdate(5); } return haltEvent(e); }
2531 + }
2532 + if (Q('viewselect').value == 3) {
2533 + if (e.key) {
2534 + if (e.key.length === 1 && mapSearchFocus == 0) { Q('mapSearchLocation').value = ((Q('mapSearchLocation').value + e.key)); processed = 1; }
2535 + //if (e.keyCode == 8 && mapSearchFocus == 0) { var x = Q('mapSearchLocation').value; Q('mapSearchLocation').value = x.substring(0, x.length - 1); processed = 1; }
2536 + if (e.keyCode == 27) { Q('mapSearchLocation').value = ''; mapCloseSearchWindow(); processed = 1; }
2537 + if (e.keyCode == 13) { getSearchLocation(); }
2538 + } else {
2539 + if (e.charCode != 0 && mapSearchFocus == 0) { Q('mapSearchLocation').value = ((Q('mapSearchLocation').value + String.fromCharCode(e.charCode))); processed = 1; }
2540 + }
2541 + }
2542 + }
2543 +
2544 + function ondockeydown(e) {
2545 + setSessionActivity();
2546 + if (!xxdialogMode && xxcurrentView == 11 && desktop && Q('DeskControl').checked) {
2547 + // Check what keys we are allows to send
2548 + if (currentNode != null) {
2549 + var mesh = meshes[currentNode.meshid];
2550 + var meshrights = mesh.links[userinfo._id].rights;
2551 + var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
2552 + if (inputAllowed == false) return false;
2553 + var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));
2554 + if (limitedInputAllowed == true) { if ((e.altKey == true) || (e.ctrlKey == true) || ((e.keyCode < 32) && (e.keyCode != 8) && (e.keyCode != 13)) || (e.keyCode > 90)) return false; }
2555 + }
2556 + return desktop.m.handleKeyDown(e);
2557 + }
2558 + if (!xxdialogMode && xxcurrentView == 12 && terminal && terminal.State == 3) { terminal.m.TermHandleKeyDown(e); if ((e.keyCode >= 37) && (e.keyCode <= 40)) { haltEvent(e); } }
2559 + if (!xxdialogMode && xxcurrentView == 13 && e.keyCode == 116 && p13filetree != null) { haltEvent(e); return false; } // F5 Refresh on files
2560 + if (!xxdialogMode && ((xxcurrentView == 15) || (xxcurrentView == 115))) { return agentConsoleHandleKeys(e); }
2561 + if (!xxdialogMode && xxcurrentView == 4) {
2562 + if (e.keyCode === 8 && userSearchFocus == 0) { var x = Q('UserSearchInput').value; Q('UserSearchInput').value = (x.substring(0, x.length - 1)); processed = 1; }
2563 + if (e.keyCode === 27) { Q('UserSearchInput').value = ''; processed = 1; }
2564 + if (processed > 0) { if (processed == 1) { masterUpdate(5); } return haltEvent(e); }
2565 + }
2566 + if (xxdialogMode || xxcurrentView != 1 || e.ctrlKey == true || e.altKey == true || e.metaKey == true) return;
2567 + var processed = 0;
2568 + if (Q('viewselect').value < 3) {
2569 + if (e.keyCode === 8 && searchFocus == 0) { var x = Q('SearchInput').value; Q('SearchInput').value = (x.substring(0, x.length - 1)); processed = 1; }
2570 + if (e.keyCode === 27) { Q('SearchInput').value = ''; processed = 1; }
2571 + if (processed > 0) { if (processed == 1) { masterUpdate(5); } return haltEvent(e); }
2572 + }
2573 + if (Q('viewselect').value == 3) {
2574 + if (e.keyCode === 8 && mapSearchFocus == 0) { var x = Q('mapSearchLocation').value; Q('mapSearchLocation').value = (x.substring(0, x.length - 1)); processed = 1; }
2575 + if (e.keyCode === 27) { Q('mapSearchLocation').value = ''; mapCloseSearchWindow(); processed = 1; }
2576 + }
2577 + }
2578 +
2579 + function ondockeyup(e) {
2580 + setSessionActivity();
2581 + if (!xxdialogMode && xxcurrentView == 11 && desktop && Q('DeskControl').checked) {
2582 + // Check what keys we are allows to send
2583 + if (currentNode != null) {
2584 + var mesh = meshes[currentNode.meshid];
2585 + var meshrights = mesh.links[userinfo._id].rights;
2586 + var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
2587 + if (inputAllowed == false) return false;
2588 + var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));
2589 + if (limitedInputAllowed == true) { if ((e.altKey == true) || (e.ctrlKey == true) || ((e.keyCode < 32) && (e.keyCode != 8) && (e.keyCode != 13)) || (e.keyCode > 90)) return false; }
2590 + }
2591 + return desktop.m.handleKeyUp(e);
2592 + }
2593 + if (!xxdialogMode && xxcurrentView == 12 && terminal && terminal.State == 3) { return terminal.m.TermHandleKeyUp(e); }
2594 + if (!xxdialogMode && xxcurrentView == 13 && e.keyCode == 116 && p13filetree != null) { p13folderup(9999); haltEvent(e); return false; } // F5 Refresh on files
2595 + if (!xxdialogMode && xxcurrentView == 4) { if ((e.keyCode === 8 && searchFocus == 0) || e.keyCode === 27) { return haltEvent(e); } }
2596 + if (xxdialogMode && e.keyCode == 27) { dialogclose(0); }
2597 + if (xxdialogMode || xxcurrentView != 0 || e.ctrlKey == true || e.altKey == true || e.metaKey == true) return;
2598 + if (Q('viewselect').value < 3) { if ((e.keyCode === 8 && searchFocus == 0) || e.keyCode === 27) { return haltEvent(e); } }
2599 + if (Q('viewselect').value == 3) { if ((e.keyCode === 8 && mapSearchFocus == 0) || e.keyCode === 27) { return haltEvent(e); } }
2600 + }
2601 +
2602 + //function ondocfocus() { }
2603 + // TODO: Add handleReleaseKeys() for Intel AMT.
2604 + function ondocblur() { if (!xxdialogMode && xxcurrentView == 11 && desktop && Q('DeskControl').checked && desktop.m.handleReleaseKeys) { return desktop.m.handleReleaseKeys(); } }
2605 +
2606 + // Highlights the device being hovered
2607 + function devMouseHover(element, over) {
2608 + setSessionActivity();
2609 + var view = Q('viewselect').value;
2610 + if (view == 1) {
2611 + var e = element.children[1].children[1];
2612 + e.children[0].classList.remove('g1s');
2613 + e.children[1].classList.remove('e2s');
2614 + e.children[2].classList.remove('g2s');
2615 + if (over == 1) {
2616 + e.children[0].classList.add('g1s');
2617 + e.children[1].classList.add('e2s');
2618 + e.children[2].classList.add('g2s');
2619 + }
2620 + } else if (view == 2) {
2621 + var e = element;
2622 + e.children[2].classList.remove('g1s');
2623 + e.children[4].classList.remove('e2s');
2624 + e.children[3].classList.remove('g2s');
2625 + if (over == 1) {
2626 + e.children[2].classList.add('g1s');
2627 + e.children[4].classList.add('e2s');
2628 + e.children[3].classList.add('g2s');
2629 + }
2630 + }
2631 + }
2632 +
2633 + var deviceHeaderId = 0;
2634 + var deviceHeaderTotal = 0;
2635 + var deviceHeadersTitles = {};
2636 + var deviceHeaderCount;
2637 + var deviceHeaders = {};
2638 + var oldviewmode = 0;
2639 + function updateDevices() {
2640 + if (nodes == null) { return; }
2641 + var r = '', c = 0, current = null, count = 0, displayedMeshes = {}, view = Q('viewselect').value, groups = {}, groupCount = {};
2642 + QV('xdevices', view < 4);
2643 + QV('xdevicesmap', view == 4);
2644 + QV('devListToolbar', view < 3);
2645 + QV('kvmListToolbar', view == 3);
2646 + QV('devMapToolbar', view == 4);
2647 + QV('devListToolbarSize', view == 3);
2648 + QV('NoMeshesPanel', meshcount == 0);
2649 + //QV('devListToolbarView', (meshcount != 0) && (nodes.length > 0));
2650 + QV('devListToolbarViewIcons', (meshcount != 0) && (nodes.length > 0));
2651 + QV('devListToolbarSort', (meshcount != 0) && (nodes.length > 0) && (view < 4));
2652 + if ((meshcount == 0) || (nodes.length == 0)) { view = 1; sort = 0; }
2653 + if (view == 4) {
2654 + setTimeout( function() { if (xxmap.map != null) { xxmap.map.updateSize(); } }, 200);
2655 + // TODO
2656 + } else {
2657 + // 3 wide, list view or desktop view
2658 + deviceHeaderId = 0;
2659 + deviceHeaderCount = {};
2660 + deviceHeaderTotal = 0;
2661 + deviceHeaders = {};
2662 + deviceHeadersTitles = {};
2663 + var kvmDivs = [];
2664 +
2665 + // Perform node sort
2666 + if (sort == 0) { nodes.sort(meshSort); }
2667 + else if (sort == 1) { nodes.sort(powerSort); }
2668 + else if (sort == 2) { if (showRealNames == true) { nodes.sort(deviceHostSort); } else { nodes.sort(deviceSort); } }
2669 +
2670 + // Save the list of currently checked nodeid's
2671 + var checkedNodeids = [], elements = document.getElementsByClassName('DeviceCheckbox'), checkcount = 0;
2672 + for (var i=0;i<elements.length;i++) { if (elements[i].checked) { checkedNodeids.push(elements[i].value); } }
2673 + if ((oldviewmode < 3) && (view == 3)) { multiDesktopFilter = checkedNodeids; }
2674 + else if ((oldviewmode == 3) && (view < 3)) { checkedNodeids = multiDesktopFilter; }
2675 +
2676 + // Compute the width of the device view.
2677 + var totalDeviceViewWidth = Q('column_l').clientWidth - 60;
2678 + var deviceBoxWidth = Math.floor(totalDeviceViewWidth / 301);
2679 + deviceBoxWidth = 301 + Math.floor((totalDeviceViewWidth - (deviceBoxWidth * 301)) / deviceBoxWidth);
2680 +
2681 + if ((view == 2) && (sort != 3)) {
2682 + r += '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Gebruiker" + '<th style=color:gray;width:120px>' + "Adres" + '<th style=color:gray;width:100px>' + "connectiviteit"; //<th style=color:gray;width:100px>State';
2683 + }
2684 +
2685 + // Go thru the list of nodes and display them
2686 + for (var i in nodes) {
2687 + var node = nodes[i];
2688 + if (node.v == false) continue;
2689 + var mesh2 = meshes[node.meshid], meshlinks = mesh2.links[userinfo._id];
2690 + if (meshlinks == null) continue;
2691 + var meshrights = meshlinks.rights;
2692 + if ((view == 3) && (mesh2.mtype == 1)) continue;
2693 + if (sort == 0) {
2694 + // Mesh header
2695 + if (node.meshid != current) {
2696 + deviceHeaderSet();
2697 + var extra = '';
2698 + if (view == 2) { r += '<tr><td colspan=5>'; }
2699 + if (meshes[node.meshid].mtype == 1) { extra = '<span class=devHeaderx>' + ", Intel&reg; AMT alleen" + '</span>'; }
2700 + if ((view == 1) && (current != null)) { if (c == 2) { r += '<td><div style=width:301px></div></td>'; } if (r != '') { r += '</tr></table>'; } }
2701 + if (view == 2) { r += '<div>'; }
2702 + r += '<div class=DevSt style=width:100%;padding-top:4px><span style=float:right>';
2703 + r += '<span id=DevxHeader' + deviceHeaderId + ' class=devHeaderx></span>' + extra;
2704 + r += '</span><span id=MxMESH tabindex=0 style=cursor:pointer onclick=gotoMesh("' + node.meshid + '") onkeypress="if (event.key==\'Enter\') gotoMesh(\'' + node.meshid + '\')">' + EscapeHtml(meshes[node.meshid].name) + '</span>' + getMeshActions(mesh2, meshrights) + '</div>';
2705 + if (view == 2) { r += '</div>'; }
2706 + current = node.meshid;
2707 + displayedMeshes[current] = 1;
2708 + c = 0;
2709 + }
2710 + } else if (sort == 1) {
2711 + // Power header
2712 + var pwr = node.pwr?node.pwr:0;
2713 + if (pwr !== current) {
2714 + deviceHeaderSet();
2715 + if ((view == 1) && (current !== null)) { if (c == 2) { r += '<td><div style=width:301px></div></td>'; } if (r != '') { r += '</tr></table>'; } }
2716 +
2717 + if (view == 2) { r += '<tr><td>'; }
2718 + r += '<div class=DevSt style=width:100%;padding-top:4px><span id=DevxHeader' + deviceHeaderId + ' class=devHeaderx style=float:right></span><span>' + PowerStateStr2(node.pwr) + '</span></div>';
2719 +
2720 + current = pwr;
2721 + c = 0;
2722 + }
2723 + } else if (sort == 2) {
2724 + // Device header
2725 + if (current == null) { current = '1'; }
2726 + }
2727 +
2728 + count++;
2729 + var title = EscapeHtml(node.name);
2730 + if (title.length == 0) { title = '<i>' + "Geen" + '</i>'; }
2731 + if ((node.rname != null) && (node.rname.length > 0)) { title += ' / ' + EscapeHtml(node.rname); }
2732 + var name = EscapeHtml(node.name);
2733 + if (showRealNames == true && node.rname != null) name = EscapeHtml(node.rname);
2734 + if (name.length == 0) { name = '<i>' + "Geen" + '</i>'; }
2735 +
2736 + // Node
2737 + var icon = node.icon;
2738 + if ((!node.conn) || (node.conn == 0)) { icon += ' gray'; }
2739 + if (view == 1) {
2740 + r += '<div id=devs onmouseover=devMouseHover(this,1) onmouseout=devMouseHover(this,0) style=display:inline-block;width:' + deviceBoxWidth + 'px;height:50px;padding-top:1px;padding-bottom:1px><div style=width:22px;height:50%;float:left;padding-top:12px><input class="' + node.meshid + ' DeviceCheckbox" onclick=p1updateInfo() value=devid_' + node._id + ' type=checkbox></div><div style=height:100%;cursor:pointer tabindex=0 onclick=gotoDevice(\'' + node._id + '\',null,null,event) onkeypress="if (event.key==\'Enter\') gotoDevice(\'' + node._id + '\',null,null,event)"><div class="i' + icon + '" style=width:50px;float:left></div><div style=height:100%><div class=g1></div><div class=e2><div class=e1 style=width:' + (deviceBoxWidth - 100) + 'px title="' + title + '">' + name + '</div><div>' + NodeStateStr(node) + '</div></div><div class=g2></div></div></div></div>';
2741 + } else if (view == 2) {
2742 + var states = [];
2743 + if (node.conn) {
2744 + if ((node.conn & 1) != 0) { states.push('<span title=\"' + "Mesh-agent is verbonden en klaar voor gebruik." + '\">' + "Agent" + '</span>'); }
2745 + if ((node.conn & 2) != 0) { states.push('<span title=\"' + "Intel® AMT CIRA is verbonden en klaar voor gebruik." + '\">' + "CIRA" + '</span>'); }
2746 + else if ((node.conn & 4) != 0) { states.push('<span title=\"' + "Intel® AMT is routeerbaar." + '\">' + "AMT" + '</span>'); }
2747 + if ((node.conn & 8) != 0) { states.push('<span title=\"' + "Mesh-agent is bereikbaar met een andere agent als relay." + '\">' + "Relay" + '</span>'); }
2748 + if ((node.conn & 16) != 0) { states.push('<span title=\"' + "MQTT verbinding met het apparaat is actief." + '\">' + "MQTT" + '</span>'); }
2749 + }
2750 + r += '<tr><td><div id=devs class=bar18 tabindex=0 onmouseover=devMouseHover(this,1) onmouseout=devMouseHover(this,0) style=height:18px;width:100%;font-size:medium onkeypress="if (event.key==\'Enter\') gotoDevice(\'' + node._id + '\',null,null,event)">';
2751 + r += '<div class=deviceBarCheckbox><input class="' + node.meshid + ' DeviceCheckbox" onclick=p1updateInfo() value=devid_' + node._id + ' type=checkbox></div>';
2752 + r += '<div class=deviceBarIcon onclick=gotoDevice(\'' + node._id + '\',null,null,event)><div class=\"j' + icon + '\" style=width:16px;margin-top:1px;margin-left:2px;height:16px></div></div>';
2753 + r += '<div class=g1 style=height:18px;float:left></div><div class=g2 style=height:18px;float:right></div>';
2754 + r += '<div style=cursor:pointer;font-size:14px title="' + title + '" onclick=gotoDevice(\'' + node._id + '\',null,null,event)><span style=width:300px>' + name + '</span></div></div></td>';
2755 + r += '<td style=text-align:center>' + getUserShortStr(node);
2756 + r += '<td style=text-align:center>' + (node.ip != null ? node.ip : '');
2757 + r += '<td style=text-align:center>' + states.join('&nbsp;+&nbsp;');
2758 + //r += '<td style=text-align:center>' + (node.pwr != null ? powerStateStrings[node.pwr] : '');
2759 + r += '</tr>';
2760 + } else if ((view == 3) && (node.conn & 1) && (((meshrights & 8) || (meshrights & 256)) != 0) && ((node.agent.caps & 1) != 0)) { // Check if we have rights and agent is capable of KVM.
2761 + if ((multiDesktopFilter) && ((multiDesktopFilter.length == 0) || (multiDesktopFilter.indexOf('devid_' + node._id) >= 0))) {
2762 + r += '<div id=devs style=display:inline-block;margin:1px;background-color:lightgray;border-radius:5px;position:relative><div tabindex=0 style=padding:3px;cursor:pointer onclick=gotoDevice(\'' + node._id + '\',11,null,event) onkeypress="if (event.key==\'Enter\') gotoDevice(\'' + node._id + '\',11,null,event)">';
2763 + //r += '<input class="' + node.meshid + ' DeviceCheckbox" onclick=p1updateInfo() value=devid_' + node._id + ' type=checkbox style=float:left>';
2764 + r += '<div class="j' + icon + '" style=width:16px;float:left></div>&nbsp;' + name + '</div>';
2765 + r += '<span onclick=gotoDevice(\'' + node._id + '\',null,null,event)></span><div id=xkvmid_' + node._id.split('/')[2] + '><div id=skvmid_' + node._id.split('/')[2] + ' tabindex=0 style="position:absolute;color:white;left:5px;top:27px;text-shadow:0px 0px 5px #000;z-index:1000;cursor:default" onclick=toggleKvmDevice(\'' + node._id + '\') onkeypress="if (event.key==\'Enter\') toggleKvmDevice(\'' + node._id + '\')">' + "Verbroken" + '</div></div>';
2766 + r += '</div>';
2767 + kvmDivs.push(node._id);
2768 + }
2769 + }
2770 +
2771 + // If we are displaying devices by group, put the device in the right group.
2772 + if ((sort == 3) && (r != '')) {
2773 + if (node.tags) {
2774 + for (var j in node.tags) {
2775 + var tag = node.tags[j];
2776 + if (groups[tag] == null) { groups[tag] = r; groupCount[tag] = 1; } else { groups[tag] += r; groupCount[tag] += 1; }
2777 + if (view == 3) break;
2778 + }
2779 + }
2780 + r = '';
2781 + }
2782 +
2783 + deviceHeaderTotal++;
2784 + if (typeof deviceHeaderCount[node.state] == 'undefined') { deviceHeaderCount[node.state] = 1; } else { deviceHeaderCount[node.state]++; }
2785 + }
2786 +
2787 + // Above 32 devices, gray out the auto connect feature.
2788 + if (kvmDivs.length >= 32) { Q('autoConnectDesktopCheckbox').checked = false; }
2789 + QE('autoConnectDesktopCheckbox', kvmDivs.length < 32);
2790 +
2791 + // If displaying devices by groups, sort the group names and display the devices.
2792 + if (sort == 3) {
2793 + if (view == 2) { r = '<table style=width:100%;margin-top:4px cellpadding=0 cellspacing=0><th style=color:gray><th style=color:gray;width:120px>' + "Gebruiker" + '<th style=color:gray;width:120px>' + "Adres" + '<th style=color:gray;width:100px>' + "connectiviteit"; }
2794 +
2795 + var groupNames = [];
2796 + for (var i in groups) { groupNames.push(i); }
2797 + groupNames.sort(function (a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()); });
2798 + for (var j in groupNames) {
2799 + var i = groupNames[j];
2800 + if (view == 2) {
2801 + r += '<tr><td colspan=4><div class=DevSt style=width:100%;padding-top:4px><span class=devHeaderx style=float:right>' + groupCount[i] + ' node' + ((groupCount[i] > 1) ? 's' : '') + '</span><span>' + i + '</span></div>' + groups[i];
2802 + } else {
2803 + r += '<div class=DevSt style=width:100%;padding-top:4px><span class=devHeaderx style=float:right>' + groupCount[i] + ' node' + ((groupCount[i] > 1) ? 's' : '') + '</span><span>' + i + '</span></div>' + groups[i];
2804 + }
2805 + }
2806 + }
2807 +
2808 + // If there is nothing to display, explain the problem
2809 + if ((r == '') && (meshcount > 0) && (Q('SearchInput').value != '')) {
2810 + if (sort == 3) {
2811 + r = '<div style="margin:30px">' + "Er zijn geen apparaten opgenomen in groepen, klik op een apparaat \"Groepen\" om toe te voegen aan een groep." + '</div>';
2812 + } else {
2813 + r = '<div style="margin:30px">' + "Geen apparaten die overeenkomen met deze zoekopdracht." + '</div>';
2814 + }
2815 + }
2816 +
2817 + if ((view == 1) && (c == 2)) r += '<td><div style=width:301px></div></td>'; // Adds device padding
2818 +
2819 + // Display all empty device groups, we need to do this because users can add devices to these at any time.
2820 + if ((sort == 0) && (Q('SearchInput').value == '') && (view < 3)) {
2821 + for (var i in meshes) {
2822 + var mesh = meshes[i], meshlink = mesh.links[userinfo._id];
2823 + if (meshlink != null) {
2824 + var meshrights = meshlink.rights;
2825 + if (displayedMeshes[mesh._id] == null) {
2826 + if ((current != '') && (r != '')) { r += '</tr></table>'; }
2827 + r += '<table style=width:100%;padding-top:4px cellpadding=0 cellspacing=0><tr><td colspan=3 class=DevSt><span id=MxMESH style=cursor:pointer onclick=gotoMesh("' + mesh._id + '")>' + EscapeHtml(mesh.name) + '</span><span>';
2828 + r += getMeshActions(mesh, meshrights);
2829 + r += '</span></td></tr><tr>';
2830 + if (mesh.mtype == 1) {
2831 + r += '<td><div style=padding:10px><i>' + "Geen Intel&reg; AMT-apparaten in deze mesh";
2832 + if ((meshrights & 4) != 0) { r += ', <a href=# style=cursor:pointer onclick=\'return addDeviceToMesh(\"' + mesh._id + '\")\'>' + "Voeg toe" + '</a>'; }
2833 + }
2834 + if (mesh.mtype == 2) {
2835 + r += '<td><div style=padding:10px><i>' + "Geen apparaten in deze groep";
2836 + if ((meshrights & 4) != 0) { r += ', <a href=# style=cursor:pointer onclick=\'return addAgentToMesh(\"' + mesh._id + '\")\'>' + "Voeg toe" + '</a>'; }
2837 + }
2838 + r += '.</i></div></td>';
2839 + current = mesh._id;
2840 + count++;
2841 + }
2842 + }
2843 + }
2844 + }
2845 + r += '</tr></table><div style=height:1px></div>'; // This height of 1 div fixes a problem in Linux firefox browsers
2846 +
2847 + // Add a "Add Device Group" option
2848 + r += '<div style=border-top-style:solid;border-top-width:1px;border-top-color:#DDDDDD;cursor:pointer;font-size:10px>';
2849 + if ((view < 3) && (sort == 0) && (meshcount > 0) && ((userinfo.siteadmin == 0xFFFFFFFF) || ((userinfo.siteadmin & 64) == 0))) {
2850 + r += '<a href=# onclick="return account_createMesh()" title=\"' + "Maak een nieuwe apparaatgroep." + '\" style=cursor:pointer>' + "Apparaatgroep toevoegen" + '</a>&nbsp';
2851 + }
2852 + if ((userinfo.siteadmin == 0xFFFFFFFF) || ((userinfo.siteadmin & 128) == 0)) {
2853 + r += '<a href=# onclick=\'return p10showMeshCmdDialog(0)\' style=cursor:pointer title=\"' + "Download MeshCmd, een opdrachtregelprogramma dat vele functies uitvoert." + '\">' + "MeshCmd" + '</a>&nbsp';
2854 + if (navigator.platform.toLowerCase() == 'win32') { r += '<a href=# onclick=\'return p10showMeshRouterDialog()\' style=cursor:pointer title=\"' + "Download MeshCentral Router, een hulpmiddel voor het toewijzen van TCP-poorten." + '\">' + "Router" + '</a>&nbsp'; }
2855 + }
2856 + r += '</div><br/>';
2857 +
2858 + QH('xdevices', r);
2859 + deviceHeaderSet();
2860 +
2861 + // Re-check nodeid's
2862 + var elements = document.getElementsByClassName('DeviceCheckbox'), checkcount = 0;
2863 + if (checkedNodeids) { for (var i=0;i<elements.length;i++) { elements[i].checked = (checkedNodeids.indexOf(elements[i].value) >= 0); } }
2864 +
2865 + for (var i in deviceHeaders) { QH(i, deviceHeaders[i]); }
2866 + for (var i in deviceHeadersTitles) { Q(i).title = deviceHeadersTitles[i]; }
2867 + p1updateInfo();
2868 +
2869 + // Take care of KVM surfaces in desktop view mode
2870 + if (view == 3) {
2871 + // Figure out and adjust the size to fill the width of the div
2872 + var vsize = [{ x: 180, y: 101 }, { x: 302, y: 169 }, { x: 454, y: 255 }][Q('sizeselect').selectedIndex];
2873 + //var realw = vsize.x + 2, tw = Q('xdevices').clientWidth - 30, xw = Math.floor(tw / realw);
2874 + var realw = vsize.x + 2, tw = totalDeviceViewWidth - 5, xw = Math.floor(tw / realw);
2875 + xw = realw + Math.floor((tw - (xw * realw)) / xw);
2876 + vsize.y = vsize.y * (xw / vsize.x);
2877 + vsize.x = xw;
2878 +
2879 + for (var i in multiDesktop) { multiDesktop[i].xxdelete = true; }
2880 + for (var i in kvmDivs) {
2881 + var id = kvmDivs[i], shortid = id.split('/')[2], desk = multiDesktop[id];
2882 + if (desk != null) {
2883 + // This device already has a canvas, use it.
2884 + desk.m.CanvasId.setAttribute('style', 'background-color:black;width:' + vsize.x + 'px;height:' + vsize.y + 'px');
2885 + Q('xkvmid_' + shortid).appendChild(desk.m.CanvasId);
2886 + delete desk.xxdelete;
2887 + QH('skvmid_' + shortid, ["Verbroken", "Verbinden...", "Setup...", '', ''][((desk.m.State == null)?desk.m.state:desk.m.State)]);
2888 + } else {
2889 + var node = getNodeFromId(id);
2890 + if ((desktopNode == node) && (desktop != null)) { // Check if the main desktop is this device, if it is, use that.
2891 + // This device already has a canvas, use it.
2892 + var c = desktop.m.CanvasId;
2893 + c.setAttribute('id', 'kvmid_' + shortid);
2894 + c.setAttribute('style', 'background-color:black;width:' + vsize.x + 'px;height:' + vsize.y + 'px');
2895 + c.setAttribute('onclick', 'toggleKvmDevice(\'' + id + '\')');
2896 + c.removeAttribute('onmousedown');
2897 + c.removeAttribute('onmouseup');
2898 + c.removeAttribute('onmousemove');
2899 + Q('xkvmid_' + shortid).appendChild(c);
2900 + QH('skvmid_' + shortid, ["Verbroken", "Verbinden...", "Setup...", '', ''][((desktop.m.State == null)?desktop.m.state:desktop.m.State)]);
2901 + if (desktop.m.SendCompressionLevel) { desktop.m.SendCompressionLevel(1, multidesktopsettings.quality, multidesktopsettings.scaling, multidesktopsettings.framerate); }
2902 + desktop.shortid = shortid;
2903 + desktop.onStateChanged = onMultiDesktopStateChange;
2904 + multiDesktop[id] = desktop;
2905 + desktop = desktopNode = currentNode = null;
2906 + // Setup a replacement desktop
2907 + QH('DeskParent', '<canvas id="Desk" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>');
2908 + } else {
2909 + // This is a new device, create a canvas for it.
2910 + var c = document.createElement('canvas');
2911 + c.setAttribute('id', 'kvmid_' + shortid);
2912 + c.setAttribute('width', 640);
2913 + c.setAttribute('height', 480);
2914 + c.setAttribute('oncontextmenu', 'return false');
2915 + c.setAttribute('style', 'background-color:black;width:' + vsize.x + 'px;height:' + vsize.y + 'px');
2916 + c.setAttribute('onclick', 'toggleKvmDevice(\'' + id + '\')');
2917 + try { Q('xkvmid_' + shortid).appendChild(c); } catch (ex) {}
2918 + // Check if we need to auto-connect
2919 + if (Q('autoConnectDesktopCheckbox').checked == true) { setTimeout(function() { connectMultiDesktop(node, 1); }, 100); }
2920 + }
2921 + }
2922 + }
2923 + for (var i in multiDesktop) {
2924 + // If a device is no longer viewed, disconnect it.
2925 + if (multiDesktop[i].xxdelete == true) { multiDesktop[i].Stop(); delete multiDesktop[i]; }
2926 + else if (debugmode && multiDesktop[i].m && multiDesktop[i].m.onScreenSizeChange) {
2927 + mdeskAdjust(multiDesktop[i].m, multiDesktop[i].m.ScreenWidth, multiDesktop[i].m.ScreenHeight, multiDesktop[i].m.CanvasId); // Adjust screen size change
2928 + }
2929 + }
2930 + deskAdjust();
2931 + } else {
2932 + disconnectAllKvmFunction();
2933 + Q('autoConnectDesktopCheckbox').checked = false;
2934 + }
2935 + }
2936 + oldviewmode = view;
2937 + }
2938 +
2939 + function toggleKvmDevice(node) {
2940 + if (typeof node == 'string') { node = getNodeFromId(node); } // Convert nodeid to node if needed
2941 + var mesh = meshes[node.meshid], meshrights = mesh.links[userinfo._id].rights;
2942 + if ((meshrights & 8) || (meshrights & 256)) { // Requires remote control rights or desktop view only rights
2943 + //var conn = 0;
2944 + //if ((node.conn & 1) != 0) { conn = 1; } else if ((node.conn & 6) != 0) { conn = 2; } // Check what type of connect we can do (Agent vs AMT)
2945 + if (node.conn & 1) { connectMultiDesktop(node, 1); }
2946 + }
2947 + }
2948 +
2949 + function getUserShortStr(node) {
2950 + if (node == null || node.users == null || node.users.length == 0) return '';
2951 + if (node.users.length > 1) { return '<span title="' + EscapeHtml(node.users.join(', ')) + '">' + nobreak(format("{0} gebruikers", node.users.length)) + '</span>'; }
2952 + var u = node.users[0], su = u, i = u.indexOf('\\');
2953 + if (i > 0) { su = u.substring(i + 1); }
2954 + su = EscapeHtml(su);
2955 + if (su.length > 15) { su = su.substring(0, 14) + '&#8230;'; }
2956 + return '<span title="' + EscapeHtml(u) + '">' + su + '</span>';
2957 + }
2958 +
2959 + function autoConnectDesktops() { if (Q('autoConnectDesktopCheckbox').checked == true) { connectAllKvmFunction(); } }
2960 + function connectAllKvmFunction(force) {
2961 + if (xxdialogMode) return false;
2962 + if (force !== true) { // We need to count how many devices will need to be connected, if it's a lot, prompt first.
2963 + var count = 0;
2964 + for (var i in nodes) {
2965 + var node = nodes[i], nodeid = nodes[i]._id;
2966 + if (multiDesktop[nodeid] == null) {
2967 + var mesh = meshes[node.meshid], meshrights = mesh.links[userinfo._id].rights;
2968 + if ((meshrights & 8) || (meshrights & 256)) { // Requires remote control rights or desktop view only rights
2969 + //var conn = 0;
2970 + //if ((node.conn & 1) != 0) { conn = 1; } else if ((node.conn & 6) != 0) { conn = 2; } // Check what type of connect we can do (Agent vs AMT)
2971 + if (node.conn & 1) { count++; }
2972 + }
2973 + }
2974 + }
2975 + if (count > 8) { setDialogMode(2, "Alles verbinden", 3, function() { connectAllKvmFunction(true); }, format("Weet u zeker dat u verbinding wilt maken met {0} -apparaten?", count)); return; }
2976 + }
2977 +
2978 + // Perform connect all
2979 + for (var i in nodes) { if (multiDesktop[nodes[i]._id] == null) { toggleKvmDevice(nodes[i]._id); } }
2980 + }
2981 + function disconnectAllKvmFunction() { if (xxdialogMode) return false; for (var nodeid in multiDesktop) { multiDesktop[nodeid].Stop(); } multiDesktop = {}; }
2982 + function onMultiDesktopStateChange(desk, state) { try { QH('skvmid_' + desk.shortid, ["Verbroken", "Verbinden...", "Setup...", '', ''][state]); } catch (ex) {} }
2983 +
2984 + function showMultiDesktopSettings() {
2985 + QV('d7amtkvm', false);
2986 + QV('d7meshkvm', true);
2987 + d7bitmapquality.value = multidesktopsettings.quality;
2988 + d7bitmapscaling.value = multidesktopsettings.scaling;
2989 + if (multidesktopsettings.framerate) { d7framelimiter.value = multidesktopsettings.framerate; } else { d7framelimiter.value = 1000; }
2990 + setDialogMode(7, "Instellingen extern bureaublad", 3, showMultiDesktopSettingsChanged);
2991 + }
2992 +
2993 + function showMultiDesktopSettingsChanged() {
2994 + multidesktopsettings.quality = d7bitmapquality.value;
2995 + multidesktopsettings.scaling = d7bitmapscaling.value;
2996 + multidesktopsettings.framerate = d7framelimiter.value;
2997 + localStorage.setItem('multidesktopsettings', JSON.stringify(multidesktopsettings));
2998 + // Make changes to all current connections
2999 + for (var i in multiDesktop) { multiDesktop[i].m.SendCompressionLevel(1, multidesktopsettings.quality, multidesktopsettings.scaling, multidesktopsettings.framerate); }
3000 + }
3001 +
3002 + function connectMultiDesktop(node, contype) {
3003 + var nodeid = node._id, shortid = nodeid.split('/')[2];
3004 + var desk = multiDesktop[nodeid];
3005 + if (desk == null) {
3006 + if (Q('kvmid_' + shortid) == null) return; // Check if this device is being displayed, if not, exit now.
3007 + if (contype == 2) {
3008 + // Setup the Intel AMT remote desktop
3009 + if ((node.intelamt.user == null) || (node.intelamt.user == '')) { return; }
3010 + desk = CreateAmtRedirect(CreateAmtRemoteDesktop('kvmid_' + shortid), authCookie);
3011 + desk.shortid = shortid;
3012 + //desk.debugmode = debugmode;
3013 + desk.onStateChanged = onMultiDesktopStateChange;
3014 + desk.m.bpp = 1;
3015 + desk.m.useZRLE = true;
3016 + desk.m.showmouse = true;
3017 + desk.m.onKvmData = function (data) { console.log('KVM Data received in multi-desktop mode, this is not supported.'); }; // KVM Data Channel not supported in multi-desktop right now.
3018 + //desk.m.onScreenSizeChange = deskAdjust;
3019 + if (debugmode > 0) { desk.m.onScreenSizeChange = mdeskAdjust; } // Multi-Desktop Adjust
3020 + desk.Start(nodeid, 16994, '*', '*', 0);
3021 + desk.contype = 2;
3022 + multiDesktop[nodeid] = desk;
3023 + } else if (contype == 1) {
3024 + // Setup the Mesh Agent remote desktop
3025 + desk = CreateAgentRedirect(meshserver, CreateAgentRemoteDesktop('kvmid_' + shortid), serverPublicNamePort, authCookie, authRelayCookie, domainUrl);
3026 + desk.shortid = shortid;
3027 + desk.attemptWebRTC = attemptWebRTC;
3028 + desk.onStateChanged = onMultiDesktopStateChange;
3029 + //desk.onConsoleMessageChange = function () { console.log('CONSOLEMSG:', desk.consoleMessage); }
3030 + desk.m.CompressionLevel = multidesktopsettings.quality;
3031 + desk.m.ScalingLevel = multidesktopsettings.scaling;
3032 + desk.m.FrameRateTimer = multidesktopsettings.framerate;
3033 + //desk.m.onDisplayinfo = deskDisplayInfo;
3034 + //desk.m.onScreenSizeChange = deskAdjust;
3035 + if (debugmode > 0) { desk.m.onScreenSizeChange = mdeskAdjust; } // Multi-Desktop Adjust
3036 + desk.Start(nodeid);
3037 + desk.contype = 1;
3038 + multiDesktop[nodeid] = desk;
3039 + }
3040 + } else {
3041 + // Disconnect and clean up the remote desktop
3042 + desk.Stop();
3043 + delete multiDesktop[nodeid];
3044 + }
3045 + }
3046 +
3047 + function getMeshActions(mesh, meshrights) {
3048 + if ((meshrights & 4) == 0) return '';
3049 + var r = '';
3050 + if ((features & 1024) == 0) { // If CIRA is allowed
3051 + r += ' <a href=# style=cursor:pointer;font-size:10px title=\"' + "Voeg een nieuwe Intel® AMT computer toe welke zich op het internet bevind." + '\" onclick=\'return addCiraDeviceToMesh(\"' + mesh._id + '\")\'>' + "Toevoegen CIRA" + '</a>';
3052 + }
3053 + if (mesh.mtype == 1) {
3054 + if ((features & 1) == 0) { // If not WAN-Only
3055 + r += ' <a href=# style=cursor:pointer;font-size:10px title=\"' + "Voeg een nieuwe Intel® AMT computer toe welke zich op het lokale netwerk bevind." + '\" onclick=\'return addDeviceToMesh(\"' + mesh._id + '\")\'>' + "Lokaal toevoegen" + '</a>';
3056 + r += ' <a href=# style=cursor:pointer;font-size:10px title=\"' + "Voeg een nieuwe Intel® AMT computer toe door het lokale netwerk te scannen." + '\" onclick=\'return addAmtScanToMesh(\"' + mesh._id + '\")\'>' + "Scan Netwerk" + '</a>';
3057 + }
3058 + if (mesh.amt && (mesh.amt.type == 2)) { // CCM activation
3059 + r += ' <a href=# style=cursor:pointer;font-size:10px title=\"' + "Voer Intel AMT client control mode (CCM) activering uit." + '\" onclick=\'return showCcmActivation(\"' + mesh._id + '\")\'>' + "Activatie" + '</a>';
3060 + } else if (mesh.amt && (mesh.amt.type == 3) && ((features & 0x00100000) != 0)) { // ACM activation
3061 + r += ' <a href=# style=cursor:pointer;font-size:10px title=\"' + "Voer Intel AMT admin control mode (ACM) activering uit." + '\" onclick=\'return showAcmActivation(\"' + mesh._id + '\")\'>' + "Activatie" + '</a>';
3062 + }
3063 + }
3064 + if (mesh.mtype == 2) {
3065 + r += ' <a href=# style=cursor:pointer;font-size:10px title=\"' + "Voeg een nieuwe computer toe aan deze mesh door de mesh-agent te installeren." + '\" onclick=\'return addAgentToMesh(\"' + mesh._id + '\")\'>' + "Toevoegen Agent" + '</a>';
3066 + if ((features & 2) == 0) { r += ' <a href=# style=cursor:pointer;font-size:10px title=\"' + "Nodig iemand uit om de mesh-agent op deze mesh te installeren." + '\" onclick=\'return inviteAgentToMesh(\"' + mesh._id + '\")\'>' + "Nodig uit" + '</a>'; }
3067 + }
3068 + return r;
3069 + }
3070 +
3071 + function addDeviceToMesh(meshid) {
3072 + if (xxdialogMode) return false;
3073 + var mesh = meshes[meshid];
3074 + var x = format("Voeg een nieuwe Intel&reg; AMT computer toe aan een apparaatgroep \"{0}\".", EscapeHtml(mesh.name)) + '<br /><br />';
3075 + x += addHtmlValue("Apparaat naam", '<input id=dp1devicename style=width:230px maxlength=32 autocomplete=off onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');
3076 + x += addHtmlValue("Hostname", '<input id=dp1hostname style=width:230px maxlength=32 autocomplete=off placeholder=\"' + "Hetzelfde als de apparaatnaam" + '\" onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');
3077 + x += addHtmlValue("Gebruikersnaam", '<input id=dp1username style=width:230px maxlength=32 autocomplete=off placeholder=\"' + "Beheerder" + '\" onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');
3078 + x += addHtmlValue("wachtwoord", '<input id=dp1password type=password style=width:230px autocomplete=off maxlength=32 onchange=validateDeviceToMesh() onkeyup=validateDeviceToMesh() />');
3079 + x += addHtmlValue("Veiligheid", '<select id=dp1tls style=width:236px><option value=0>' + "Geen TLS beveiliging" + '</option><option value=1>' + "TLS beveiliging vereist" + '</option></select>');
3080 + setDialogMode(2, "Add Intel&reg; AMT aaparaat", 3, addDeviceToMeshEx, x, meshid);
3081 + validateDeviceToMesh();
3082 + Q('dp1devicename').focus();
3083 + return false;
3084 + }
3085 +
3086 + // Intel AMT CCM Activation
3087 + function showCcmActivation(meshid) {
3088 + if (xxdialogMode) return false;
3089 + var servername = serverinfo.name, mesh = meshes[meshid];
3090 + if ((servername.indexOf('.') == -1) || ((features & 2) != 0)) { servername = window.location.hostname; } // If the server name is not set or it's in LAN-only mode, use the URL hostname as server name.
3091 + var url, domainUrlNoSlash = domainUrl.substring(0, domainUrl.length - 1);
3092 + if (serverinfo.https == true) {
3093 + var portStr = (serverinfo.port == 443) ? '' : (':' + serverinfo.port);
3094 + url = 'wss://' + servername + portStr + domainUrl;
3095 + } else {
3096 + var portStr = (serverinfo.port == 80) ? '' : (':' + serverinfo.port);
3097 + url = 'ws://' + servername + portStr + domainUrl;
3098 + }
3099 + var x = format("Voer Intel AMT client control mode (CCM) activering uit naar groep \"{0}\" door het hulpprogramma MeshCMD te downloaden en als volgt uit te voeren:", EscapeHtml(mesh.name)) + '<br /><br />';
3100 + x += '<textarea readonly=readonly style=width:100%;resize:none;height:100px;overflow:auto;font-size:12px readonly>meshcmd amtccm --url ' + url + 'amtactivate?id=' + meshid.split('/')[2] + ' --serverhttpshash ' + serverinfo.tlshash + '</textarea>';
3101 + setDialogMode(2, "Intel&reg; AMT activatie", 9, null, x);
3102 + Q('idx_dlgOkButton').focus();
3103 + return false;
3104 + }
3105 +
3106 + // Intel AMT ACM Activation
3107 + function showAcmActivation(meshid) {
3108 + if (xxdialogMode) return false;
3109 + var servername = serverinfo.name, mesh = meshes[meshid];
3110 + if ((servername.indexOf('.') == -1) || ((features & 2) != 0)) { servername = window.location.hostname; } // If the server name is not set or it's in LAN-only mode, use the URL hostname as server name.
3111 + var url, domainUrlNoSlash = domainUrl.substring(0, domainUrl.length - 1);
3112 + if (serverinfo.https == true) {
3113 + var portStr = (serverinfo.port == 443) ? '' : (':' + serverinfo.port);
3114 + url = 'wss://' + servername + portStr + domainUrl;
3115 + } else {
3116 + var portStr = (serverinfo.port == 80) ? '' : (':' + serverinfo.port);
3117 + url = 'ws://' + servername + portStr + domainUrl;
3118 + }
3119 + var x = format("Voer Intel AMT admin control mode (ACM) activering uit naar groep \"{0}\" door het hulpprogramma MeshCMD te downloaden en als volgt uit te voeren:", EscapeHtml(mesh.name)) + '<br /><br />';
3120 + x += '<textarea readonly=readonly style=width:100%;resize:none;height:100px;overflow:auto;font-size:12px readonly>meshcmd amtacm --url ' + url + 'amtactivate?id=' + meshid.split('/')[2] + ' --serverhttpshash ' + serverinfo.tlshash + '</textarea>';
3121 + if (serverinfo.amtAcmFqdn != null) {
3122 + x += ('<div style=margin-top:8px>' + "Intel AMT moet worden ingesteld met een vertrouwd FQDN in MEBx of een bekabeld LAN op het netwerk hebben:" + ' <b>' + serverinfo.amtAcmFqdn.join(', ') + '</b></div>');
3123 + }
3124 + setDialogMode(2, "Intel&reg; AMT activatie", 9, null, x);
3125 + Q('idx_dlgOkButton').focus();
3126 + return false;
3127 + }
3128 +
3129 + // Display the Intel AMT scanning dialog box
3130 + function addAmtScanToMesh(meshid) {
3131 + if (xxdialogMode) return false;
3132 + var x = "Voer een reeks IP-adressen in om te scannen op Intel AMT-apparaten." + '<br /><br />';
3133 + x += addHtmlValue("IP-bereik", '<input id=dp1range style=width:184px value="192.168.1.0/24" onkeyup=addAmtScanToMeshKeyUp(event) /><input id=dp1rangebutton type=button value=\"' + "Scan" + '\" onclick=addAmtScanToMeshButton()></input>');
3134 + x += '<div id=dp1results style="width:100%;height:200px;background-color:white;border:1px gray solid;overflow-y:scroll"></div>';
3135 + setDialogMode(2, "Scannen naar Intel® AMT-apparaten", 3, addAmtScanToMeshEx, x, meshid);
3136 + QE('idx_dlgOkButton', false);
3137 + QH('dp1results', '<div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>Sample IP range values<br />192.168.0.100<br />192.168.1.0/24<br />192.167.0.1-192.168.0.100</div>');
3138 + focusTextBox('dp1range');
3139 + return false;
3140 + }
3141 +
3142 + function addAmtScanToMeshKeyUp(e) {
3143 + if (e.keyCode == 13) { haltEvent(e); addAmtScanToMeshButton(); }
3144 + }
3145 +
3146 + // Called when OK is pressed on the Intel AMT scanning box
3147 + function addAmtScanToMeshEx(button, meshid) {
3148 + var elements = document.getElementsByClassName('DevScanCheckbox'), checkcount = 0;
3149 + for (var i=0;i<elements.length;i++) {
3150 + if (elements[i].checked) {
3151 + var ipaddr = elements[i].getAttribute('tag');
3152 + var amtinfo = amtScanResults[ipaddr];
3153 + meshserver.send({ action: 'addamtdevice', meshid: meshid, devicename: ipaddr, hostname: amtinfo.hostname, amtusername: '', amtpassword: '', amttls: amtinfo.tls });
3154 + }
3155 + }
3156 + }
3157 +
3158 + // If the user presses the "Scan" button on the Intel AMT scanning dialog box, start a scan.
3159 + function addAmtScanToMeshButton() {
3160 + QE('dp1range', false);
3161 + QE('dp1rangebutton', false);
3162 + QH('dp1results', '<div style=width:100%;text-align:center;margin-top:12px>' + "Scannen van ..." + '</div>');
3163 + meshserver.send({ action: 'scanamtdevice', range: Q('dp1range').value });
3164 + }
3165 +
3166 + // Called when a scanned computer is checked or unchecked.
3167 + function addAmtScanToMeshCheckbox() {
3168 + var elements = document.getElementsByClassName('DevScanCheckbox'), checkcount = 0;
3169 + for (var i=0;i<elements.length;i++) { if (elements[i].checked) checkcount++; }
3170 + QE('idx_dlgOkButton', checkcount > 0);
3171 + }
3172 +
3173 + function addCiraDeviceToMesh(meshid) {
3174 + if (xxdialogMode) return false;
3175 + var mesh = meshes[meshid];
3176 +
3177 + // Replace non alphabetic characters (@ and $) with 'X' because MPS username cannot accept it.
3178 + var meshidx = meshid.split('/')[2].replace(/\@/g, 'X').replace(/\$/g, 'X');
3179 +
3180 + var y = '<select id=dlgAddCiraSel onclick=dlgAddCiraSelClick() style=width:230px><option value=0>' + "MeshCommander Script" + '</option><option value=1>' + "Handmatige gebruikersnaam / wachtwoord" + '</option>';
3181 + if ((features & 16) == 0) { y += ('<option value=2>' + "Handmatig certificaat" + '</option></select>'); } // Only display this option if Intel AMT CIRA with Mutual-Auth is allowed.
3182 +
3183 + var x = '';
3184 + x += addHtmlValue("Setup methode", y);
3185 + x += '<hr>';
3186 +
3187 + // Setup CIRA using a MeshCommander script (Pretty Simple)
3188 + x += '<div id=dlgAddCira0>' + format("Om een nieuw Intel® AMT-apparaat toe te voegen aan apparaatgroep \"{0}\" met CIRA, downloadt u de volgende scriptbestanden en gebruikt u <a href = 'http: //meshcommander.com' rel = 'noreferrer noopener' target = ' _blank '> MeshCommander </a> om het script uit te voeren om computers te configureren.", EscapeHtml(mesh.name)) + '<br /><br />';
3189 + //x += addHtmlValue('Setup CIRA', '<a href="mescript.ashx?type=1&meshid=' + meshidx.substring(0, 16) + '" download>cira_setup.mescript</a>');
3190 + x += addHtmlValue("CIRA instellen", '<a href="mescript.ashx?type=1&meshid=' + meshid + '" download>cira_setup.mescript</a>');
3191 + x += addHtmlValue("Opruimen CIRA", '<a href="mescript.ashx?type=2" download>cira_clean.mescript</a>');
3192 + x += '</div>';
3193 +
3194 + // Setup CIRA with user/pass authentication (Somewhat difficult)
3195 + x += '<div id=dlgAddCira1 style=display:none>' + format("v", EscapeHtml(mesh.name));
3196 + if (serverinfo.mpspass) { x += (" verifieer bij de server met deze gebruikersnaam en wachtwoord." + '<br /><br />'); } else { x += (" verifieer bij de server met deze gebruikersnaam en elk wachtwoord." + '<br /><br />'); }
3197 + x += addHtmlValue("Hoofd certificaat", '<a href=\"' + "MeshServerRootCert.cer" + '\" download>' + "Hoofd certificaat bestand" + '</a>');
3198 + x += addHtmlValue("Gebruikersnaam", '<input style=width:230px readonly value="' + meshidx.substring(0, 16) + '" />');
3199 + if (serverinfo.mpspass) { x += addHtmlValue("wachtwoord", '<input style=width:230px readonly value="' + EscapeHtml(serverinfo.mpspass) + '" />'); }
3200 + if (serverinfo != null) { x += addHtmlValue("MPS Server", '<input style=width:230px readonly value="' + EscapeHtml(serverinfo.mpsname) + ':' + serverinfo.mpsport + '" />'); }
3201 + x += '</div>';
3202 +
3203 + // Setup CIRA with certificate authentication (Really difficult, only if TLS offload is not used)
3204 + if ((features & 16) == 0) {
3205 + x += '<div id=dlgAddCira2 style=display:none>' + format("Om een nieuw Intel® AMT-apparaat toe te voegen aan apparaatgroep \"{0}\" met CIRA, laadt u het volgende certificaat als vertrouwde root in Intel AMT, verifieert u met een clientcertificaat met de volgende gemeenschappelijke naam en maakt u verbinding met de volgende server.", EscapeHtml(mesh.name)) + '<br /><br />';
3206 + x += addHtmlValue("Hoofd certificaat", '<a href="MeshServerRootCert.cer" download>' + "Hoofd certificaat bestand" + '</a>');
3207 + x += addHtmlValue("Organisatie", '<input style=width:230px readonly value="' + meshidx + '" />');
3208 + if (serverinfo != null) { x += addHtmlValue("MPS Server", '<input style=width:230px readonly value="' + EscapeHtml(serverinfo.mpsname) + ':' + serverinfo.mpsport + '" />'); }
3209 + x += '</div>';
3210 + }
3211 +
3212 + setDialogMode(2, "Toevoegen Intel® AMT CIRA apparaat", 2, null, x, 'fileDownload');
3213 + Q('dlgAddCiraSel').focus();
3214 + return false;
3215 + }
3216 +
3217 + function dlgAddCiraSelClick() {
3218 + var val = Q('dlgAddCiraSel').value;
3219 + QV('dlgAddCira0', val == 0);
3220 + QV('dlgAddCira1', val == 1);
3221 + QV('dlgAddCira2', val == 2);
3222 + }
3223 +
3224 + // Return true is the input string looks like an email address
3225 + function checkEmail(str) {
3226 + var x = str.split('@');
3227 + var ok = ((x.length == 2) && (x[0].length > 0) && (x[1].split('.').length > 1) && (x[1].length > 2));
3228 + if (ok == true) { var y = x[1].split('.'); for (var i in y) { if (y[i].length == 0) { ok = false; } } }
3229 + return ok;
3230 + }
3231 +
3232 + function inviteAgentToMesh(meshid) {
3233 + if (xxdialogMode) return false;
3234 + var x = '', mesh = meshes[meshid];
3235 + if (features & 64) {
3236 + x += addHtmlValue("Type uitnodiging", '<select id=d2InviteType onchange=d2ChangedInviteType() style=width:236px><option value=0>Link invitation</option><option value=1>Email invitation</option></select>') + '<hr />';
3237 + x += '<div id=emailInviteDiv style=display:none>' + format("Nodig iemand uit om de mesh-agent te installeren. Er wordt een e-mail verzonden met de link naar de installatie van de mesh-agent voor de apparaatgroep \"{0}\".", EscapeHtml(mesh.name)) + '<br /><br />';
3238 + x += addHtmlValue("Naam (Optioneel)", '<input id=agentInviteName value="" style=width:230px maxlength=64 />');
3239 + x += addHtmlValue("Email", '<input id=agentInviteEmail style=width:230px placeholder=\"' + "voorbeeld@email.nl" + '\" onkeyup=validateAgentInvite()></input>');
3240 + x += addHtmlValue("Besturingssysteem", '<select id=agentInviteNameOs onchange=d2ChangedInviteType() style=width:236px><option value=4>' + "Verzend installatie link" + '</option><option value=0 selected>' + "Alle ondersteunde" + '</option><option value=1>' + "alleen Windows" + '</option><option value=3>' + "Apple MacOS alleen" + '</option><option value=2>' + "alleen Linux" + '</option></select>');
3241 + x += '<div id=d2agentexpirediv>';
3242 + x += addHtmlValue("Link vervaldatum", '<select id=agentInviteExpire style=width:236px><option value=1>' + "1 uur" + '</option><option value=8>' + "8 uur" + '</option><option value=24>' + "1 dag" + '</option><option value=168>' + "1 week" + '</option><option value=5040>' + "1 maand" + '</option><option value=0>' + "Ongelimiteerd" + '</option></select>');
3243 + x += '</div>';
3244 + x += addHtmlValue("Installatie type", '<select id=agentInviteType style=width:236px><option value=0>' + "Achtergrond en interactief" + '</option><option value=2>' + "Achtergrond alleen" + '</option><option value=1>' + "Alleen interactief" + '</option></select>');
3245 + x += addHtmlValue("Bericht" + '<br />' + "(optioneel)", '<textarea id=agentInviteMessage value="" style=width:230px;height:100px;resize:none maxlength=1024 /></textarea>');
3246 + x += '</div>';
3247 + }
3248 + x += '<div id=urlInviteDiv>' + format("Nodig iemand uit om de mesh-agent te installeren door een uitnodigingslink te delen. Deze koppeling verwijst de gebruiker naar installatie-instructies voor de apparaatgroep \"{0}\". De link is openbaar en er is geen account voor deze server nodig.", EscapeHtml(mesh.name)) + '<br /><br />';
3249 + x += addHtmlValue("Link vervaldatum", '<select id=d2inviteExpire style=width:236px onchange=d2RequestInvitationLink()><option value=1>' + "1 uur" + '</option><option value=8>' + "8 uur" + '</option><option value=24>' + "1 dag" + '</option><option value=168>' + "1 week" + '</option><option value=5040>' + "1 maand" + '</option><option value=0>' + "Ongelimiteerd" + '</option></select>');
3250 + x += '<div id=agentInvitationLinkDiv style="text-align:center;font-size:large;margin:16px;display:none"><a href=# id=agentInvitationLink target="_blank" style=cursor:pointer></a> <img src=images/link4.png height=10 width=10 title=\"' + "Kopieer link naar het klembord" + '\" style=cursor:pointer onclick=d2CopyInviteToClip()></div></div>';
3251 + setDialogMode(2, "Nodig uit", 3, performAgentInvite, x, meshid);
3252 + if (features & 64) { Q('d2InviteType').focus(); d2ChangedInviteType(); } else { Q('d2inviteExpire').focus(); validateAgentInvite(); }
3253 + d2RequestInvitationLink();
3254 + return false;
3255 + }
3256 +
3257 + function d2RequestInvitationLink() {
3258 + meshserver.send({ action: 'createInviteLink', meshid: xxdialogTag, expire: parseInt(Q('d2inviteExpire').value), flags: 0 });
3259 + }
3260 +
3261 + function d2ChangedInviteType() {
3262 + QV('urlInviteDiv', Q('d2InviteType').value == 0);
3263 + QV('d2agentexpirediv', Q('agentInviteNameOs').value == 4);
3264 + QV('emailInviteDiv', Q('d2InviteType').value == 1);
3265 + validateAgentInvite();
3266 + }
3267 +
3268 + function d2CopyInviteToClip() { copyTextToClip(Q('agentInvitationLink').href); }
3269 +
3270 + function validateAgentInvite() {
3271 + if ((features & 64) && (Q('d2InviteType').value == 1)) {
3272 + QE('idx_dlgOkButton', checkEmail(Q('agentInviteEmail').value));
3273 + QV('idx_dlgCancelButton', true);
3274 + } else {
3275 + QE('idx_dlgOkButton', true);
3276 + QV('idx_dlgCancelButton', false);
3277 + }
3278 + }
3279 +
3280 + function performAgentInvite(button, meshid) {
3281 + if ((features & 64) && (Q('d2InviteType').value == 1)) {
3282 + meshserver.send({ action: 'inviteAgent', meshid: meshid, email: Q('agentInviteEmail').value, name: Q('agentInviteName').value, os: Q('agentInviteNameOs').value, flags: Q('agentInviteType').value, msg: Q('agentInviteMessage').value, expire: parseInt(Q('agentInviteExpire').value) });
3283 + }
3284 + }
3285 +
3286 + function addAgentToMesh(meshid) {
3287 + if (xxdialogMode) return false;
3288 + var mesh = meshes[meshid], x = '', installType = 0;
3289 + x += addHtmlValue("Besturingssysteem", '<select id=aginsSelect onchange=addAgentToMeshClick() style=width:236px><option value=0>' + "Windows" + '</option><option value=1>' + "Linux / BSD" + '</option><option value=2>' + "Apple MacOS" + '</option><option value=3>' + "Windows (deinstallatie)" + '</option><option value=4>' + "Linux / BSD (de-installeren)" + '</option></select>');
3290 + x += '<div id=aginsTypeDiv>';
3291 + x += addHtmlValue("Installatie type", '<select id=aginsType onchange=addAgentToMeshClick() style=width:236px><option value=0>' + "Achtergrond & interactief" + '</option><option value=2>' + "Achtergrond alleen" + '</option><option value=1>' + "Alleen interactief" + '</option></select>');
3292 + x += '</div><hr>';
3293 +
3294 + // \/:*?"<>|
3295 + var meshfilename = mesh.name
3296 + meshfilename = meshfilename.split('\\').join('').split('/').join('').split(':').join('').split('*').join('').split('?').join('').split('"').join('').split('<').join('').split('>').join('').split('|').join('').split(' ').join('').split('\'').join('');
3297 +
3298 + // Windows agent install
3299 + //x += "<div id=agins_windows>To add a new computer to device group \"" + EscapeHtml(mesh.name) + "\", download the mesh agent and configuration file and install the agent on the computer to manage.<br /><br />";
3300 + x += '<div id=agins_windows>' + format("Als u een nieuwe computer aan apparaatgroep \"{0}\" wilt toevoegen, downloadt u de mesh-agent en installeert u deze op de te beheren computer. Deze agent heeft server- en apparaatgroepinformatie erin ingebed.", EscapeHtml(mesh.name)) + '<br /><br />';
3301 + x += addHtmlValue("Mesh Agent", '<a id=aginsw32lnk href="meshagents?id=3&meshid=' + meshid.split('/')[2] + '&installflags=0" download onclick="setDialogMode(0)" title=\"' + "32bit versie van de MeshAgent" + '\">' + "Windows (.exe)" + '</a> <img src=images/link4.png height=10 width=10 title="Copy Windows 32bit agent URL to clipboard" style=cursor:pointer onclick=copyAgentUrl("meshagents?id=3&meshid=' + meshid.split('/')[2] + '&installflags=",1)>');
3302 + x += addHtmlValue("Mesh Agent", '<a id=aginsw64lnk href="meshagents?id=4&meshid=' + meshid.split('/')[2] + '&installflags=0" download onclick="setDialogMode(0)" title=\"' + "64bit versie van de MeshAgent" + '\">' + "Windows x64 (.exe)" + '</a> <img src=images/link4.png height=10 width=10 title="Copy Windows 64bit agent URL to clipboard" style=cursor:pointer onclick=copyAgentUrl("meshagents?id=4&meshid=' + meshid.split('/')[2] + '&installflags=",1)>');
3303 + if (debugmode > 0) { x += addHtmlValue("Instellingenbestand", '<a id=aginswmshlnk href="meshsettings?id=' + meshid.split('/')[2] + '&installflags=0" rel="noreferrer noopener" target="_blank">' + format("{0} instellingen (.msh)", EscapeHtml(mesh.name)) + '</a>'); }
3304 + x += '</div>';
3305 +
3306 + // Linux agent install
3307 + x += '<div id=agins_linux style=display:none>' + format("Voer de volgende opdracht uit om een computer toe te voegen aan {0}. Root gegevens zijn nodig.", EscapeHtml(mesh.name)) + '<br />';
3308 + x += '<textarea id=agins_linux_area rows=2 cols=20 readonly=readonly style=width:100%;resize:none;height:120px;overflow:scroll;font-size:12px readonly></textarea>';
3309 + x += '<div style=\'font-size:x-small\'>' + "* Voor BSD, start eerst \"pkg install wget sudo bash\" ." + '</div></div>';
3310 +
3311 + // MacOS agent install
3312 + x += '<div id=agins_osx style=display:none>' + format("Als u een nieuwe computer aan apparaatgroep \"{0}\" wilt toevoegen, downloadt u de mesh-agent en installeert u deze op de te beheren computer. In dit installatieprogramma van de agent zijn server- en apparaatgroepgegevens ingebed.", EscapeHtml(mesh.name)) + '<br /><br />';
3313 + x += addHtmlValue("Mesh Agent", '<a href="meshosxagent?id=16&meshid=' + meshid.split('/')[2] + '" rel="noreferrer noopener" target="_blank" title="64bit version of MacOS Mesh Agent">MacOS Agent (64bit)</a> <img src=images/link4.png height=10 width=10 title="' + "Kopieer MacOS agent link naar het klembord" + '" style=cursor:pointer onclick=copyAgentUrl("meshosxagent?id=16&meshid=' + meshid.split('/')[2] + '",0)>');
3314 + x += '</div>';
3315 +
3316 + // Windows agent uninstall
3317 + x += '<div id=agins_windows_un style=display:none>' + "Om een mesh-agent te verwijderen, download het onderstaande bestand, voer het uit en klik op \"deinstalleer\"." + '<br /><br />';
3318 + x += addHtmlValue("Mesh Agent", '<a href="meshagents?id=3" download onclick="setDialogMode(0)" title="' + "32bit versie van de MeshAgent" + '">' + "Windows (.exe)" + '</a>');
3319 + x += addHtmlValue("Mesh Agent", '<a href="meshagents?id=4" download onclick="setDialogMode(0)" title="' + "64bit versie van de MeshAgent" + '">' + "Windows x64 (.exe)" + '</a>');
3320 + x += '</div>';
3321 +
3322 + // Linux agent uninstall
3323 + x += '<div id=agins_linux_un style=display:none>' + "Voer de volgende opdracht uit om een mesh-agent te verwijderen. Root gegevens zijn nodig." + '<br />';
3324 + x += '<textarea id=agins_linux_area_un rows=2 cols=20 readonly=readonly style=width:100%;resize:none;height:120px;overflow:scroll;font-size:12px readonly></textarea>';
3325 + x += '</div>';
3326 +
3327 + setDialogMode(2, "Toevoegen Mesh agent", 2, null, x, 'fileDownload');
3328 + var servername = serverinfo.name;
3329 + if ((servername.indexOf('.') == -1) || ((features & 2) != 0)) { servername = window.location.hostname; } // If the server name is not set or it's in LAN-only mode, use the URL hostname as server name.
3330 + var domainUrlNoSlash = domainUrl.substring(0, domainUrl.length - 1);
3331 +
3332 + if (serverinfo.https == true)
3333 + {
3334 + var portStr = (serverinfo.port == 443)?'':(':' + serverinfo.port);
3335 + if ((features & 0x2000) == 0)
3336 + {
3337 + Q('agins_linux_area').value = '(wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo -E ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid.split('/')[2] + '\' || ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid.split('/')[2] + '\'\r\n';
3338 + Q('agins_linux_area_un').value = '(wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-check-certificate -O ./meshinstall.sh || wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
3339 + }
3340 + else
3341 + {
3342 + // Server asked that agent be installed to preferably not use a HTTP proxy.
3343 + Q('agins_linux_area').value = 'wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid.split('/')[2] + '\' || ./meshinstall.sh https://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid.split('/')[2] + '\'\r\n';
3344 + Q('agins_linux_area_un').value = 'wget https://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy --no-check-certificate -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
3345 + }
3346 + }
3347 + else
3348 + {
3349 + var portStr = (serverinfo.port == 80) ? '' : (':' + serverinfo.port);
3350 + if ((features & 0x2000) == 0)
3351 + {
3352 + Q('agins_linux_area').value = '(wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 -O ./meshinstall.sh || wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo -E ./meshinstall.sh http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid.split('/')[2] + '\'\r\n';
3353 + Q('agins_linux_area_un').value = '(wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 -O ./meshinstall.sh || wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy -O ./meshinstall.sh) && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
3354 + }
3355 + else
3356 + {
3357 + // Server asked that agent be installed to preferably not use a HTTP proxy.
3358 + Q('agins_linux_area').value = 'wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh http://' + servername + portStr + domainUrlNoSlash + ' \'' + meshid.split('/')[2] + '\'\r\n';
3359 + Q('agins_linux_area_un').value = 'wget http://' + servername + portStr + domainUrl + 'meshagents?script=1 --no-proxy -O ./meshinstall.sh && chmod 755 ./meshinstall.sh && sudo ./meshinstall.sh uninstall\r\n';
3360 + }
3361 + }
3362 + Q('aginsSelect').focus();
3363 + addAgentToMeshClick();
3364 + return false;
3365 + }
3366 +
3367 + function copyAgentUrl(url,addflag) {
3368 + var servername = serverinfo.name;
3369 + if ((servername.indexOf('.') == -1) || ((features & 2) != 0)) { servername = window.location.hostname; } // If the server name is not set or it's in LAN-only mode, use the URL hostname as server name.
3370 + var domainUrlNoSlash = domainUrl.substring(0, domainUrl.length - 1);
3371 + var portStr = (serverinfo.port == 443) ? '' : (':' + serverinfo.port);
3372 + var c = 'https://' + servername + portStr + domainUrl + url;
3373 + if (addflag == 1) c += Q('aginsType').value;
3374 + copyTextToClip(c);
3375 + }
3376 +
3377 + function addAgentToMeshClick() {
3378 + var v = Q('aginsSelect').value;
3379 + QV('agins_windows', v == 0);
3380 + QV('agins_linux', v == 1);
3381 + QV('agins_osx', v == 2);
3382 + QV('agins_windows_un', v == 3);
3383 + QV('agins_linux_un', v == 4);
3384 + QV('aginsTypeDiv', v == 0);
3385 +
3386 + // Fix the links if needed
3387 + Q('aginsw32lnk').href = (Q('aginsw32lnk').href.split('installflags=')[0]) + 'installflags=' + Q('aginsType').value;
3388 + Q('aginsw64lnk').href = (Q('aginsw64lnk').href.split('installflags=')[0]) + 'installflags=' + Q('aginsType').value;
3389 + if (debugmode > 0) { Q('aginswmshlnk').href = (Q('aginswmshlnk').href.split('installflags=')[0]) + 'installflags=' + Q('aginsType').value; }
3390 + }
3391 +
3392 + function validateDeviceToMesh() {
3393 + QE('idx_dlgOkButton', (Q('dp1devicename').value.length > 0) && (passwordcheck(Q('dp1password').value)));
3394 + }
3395 +
3396 + function addDeviceToMeshEx(button, meshid) {
3397 + var amtuser = Q('dp1username').value;
3398 + if (amtuser == '') amtuser = 'admin';
3399 + var host = Q('dp1hostname').value;
3400 + if (host == '') host = Q('dp1devicename').value;
3401 + meshserver.send({ action: 'addamtdevice', meshid: meshid, devicename: Q('dp1devicename').value, hostname: host, amtusername: amtuser, amtpassword: Q('dp1password').value, amttls: Q('dp1tls').value });
3402 + }
3403 +
3404 + function deviceHeaderSet() {
3405 + if (deviceHeaderId == 0) { deviceHeaderId = 1; return; }
3406 + deviceHeaders['DevxHeader' + deviceHeaderId] = ((deviceHeaderTotal == 1) ? "1 apparaat" : format("{0} knooppunten", deviceHeaderTotal));
3407 + //var title = '';
3408 + //for (x in deviceHeaderCount) { if (title.length > 0) title += ', '; title += deviceHeaderCount[x] + ' ' + PowerStateStr2(x); }
3409 + //deviceHeadersTitles["DevxHeader" + deviceHeaderId] = title;
3410 + deviceHeaderId++;
3411 + deviceHeaderCount = {};
3412 + deviceHeaderTotal = 0;
3413 + }
3414 +
3415 + var powerStateStrings = ['', '<span title=\"' + "Apparaat is ingeschakeld." + '\">' + "ingeschakeld" + '</span>', '<span title=\"' + "Apparaat bevindt zich in slaapstand (S1)." + '\">' + "Slapen" + '</span>', '<span title=\"' + "Apparaat bevindt zich in slaapstand (S2)." + '\">' + "Slapen" + '</span>', '<span title=\"' + "Apparaat bevindt zich in diepe slaapstand (S3)." + '\">' + "Slaapstand" + '</span>', '<span title=\"' + "Apparaat bevindt zich in de slaapstand (S4)." + '\">' + "Slaapstand" + '</span>', '<span title=\"' + "Apparaat is uitgeschakeld (S5)." + '\">' + "softwarematig uit" + '</span>', '<span title=\"' + "Apparaat is gedetecteerd, maar de stroomstatus kon niet worden verkregen." + '\">' + "Aanwezig" + '</span>'];
3416 + var powerStateStrings2 = ['', "Apparaat is ingeschakeld", "Apparaat bevindt zich in slaapstand (S1)", "Apparaat bevindt zich in slaapstand (S2)", "Apparaat bevindt zich in diepe slaapstand (S3)", "Apparaat is in slaapstand (S4)", "Apparaat is uitgeschakeld (S5)", "Apparaat is aanwezig, maar de stroomstatus kan niet worden bepaald"];
3417 + var powerColorTable = ['pwsTransparent', 'pwsBlack', 'pwsBlue', 'pwsBlue2', 'pwsLightblue', 'pwsBlueviolet', 'pwsDarkgreen', 'pwsLightseagreen', 'pwsLightseagreen2'];
3418 + function NodeStateStr(node) {
3419 + var states = [];
3420 + if (node.state > 0 && node.state < powerStatetable.length) state.push(powerStatetable[node.state]);
3421 + if (node.conn) {
3422 + if ((node.conn & 1) != 0) { states.push('<span title=\"' + "Mesh-agent is verbonden en klaar voor gebruik." + '\">' + "Agent" + '</span>'); }
3423 + if ((node.conn & 2) != 0) { states.push('<span title=\"' + "Intel® AMT CIRA is verbonden en klaar voor gebruik." + '\">' + "CIRA" + '</span>'); }
3424 + else if ((node.conn & 4) != 0) { states.push('<span title=\"' + "Intel® AMT is routeerbaar." + '\">' + "AMT" + '</span>'); }
3425 + if ((node.conn & 8) != 0) { states.push('<span title=\"' + "Mesh-agent is bereikbaar met een andere agent als relay." + '\">' + "Relay" + '</span>'); }
3426 + if ((node.conn & 16) != 0) { states.push('<span title=\"' + "MQTT verbinding met het apparaat is actief." + '\">' + "MQTT" + '</span>'); }
3427 + }
3428 + if ((node.pwr != null) && (node.pwr != 0)) { states.push(powerStateStrings[node.pwr]); }
3429 + return states.join(', ');
3430 + }
3431 +
3432 + function PowerStateStr(x) {
3433 + if (x < powerStatetable.length) return powerStatetable[x];
3434 + return '';
3435 + }
3436 +
3437 + function PowerStateStr2(x) {
3438 + if ((x != 0) && (x < powerStatetable.length)) return powerStatetable[x];
3439 + return "Onbekend";
3440 + }
3441 +
3442 + function selectallButtonFunction() {
3443 + var elements = document.getElementsByClassName('DeviceCheckbox'), checkcount = 0;
3444 + for (var i=0;i<elements.length;i++) { if (elements[i].checked === true) checkcount++; }
3445 + for (var i=0;i<elements.length;i++) { elements[i].checked = (checkcount == 0); }
3446 + p1updateInfo();
3447 + }
3448 +
3449 + function p1updateInfo() {
3450 + var elements = document.getElementsByClassName('DeviceCheckbox'), checkcount = 0;
3451 + for (var i=0;i<elements.length;i++) { if (elements[i].checked === true) { checkcount++; } }
3452 + if (checkcount > 0) {
3453 + QE('GroupActionButton', true);
3454 + Q('SelectAllButton').value = "Selecteer niets";
3455 + QV('cxmgroupsplit', true);
3456 + QV('cxmdesktop', true);
3457 + } else {
3458 + QE('GroupActionButton', false);
3459 + Q('SelectAllButton').value = "Selecteer alles";
3460 + QV('cxmgroupsplit', false);
3461 + QV('cxmdesktop', false);
3462 + }
3463 + }
3464 +
3465 + function groupActionFunction() {
3466 + var addedOptions = '', nodeids = getCheckedDevices();
3467 +
3468 + // Check if any of the selected devices have a MQTT connection active
3469 + if (features & 0x00400000) {
3470 + for (var i in nodeids) { if ((getNodeFromId(nodeids[i]).conn & 16) != 0) { addedOptions += '<option value=103>' + "Verzend MQTT bericht" + '</option>'; break; } }
3471 + }
3472 +
3473 + // Display the "Uninstall Agent" option if allowed and we selected connected devices.
3474 + for (var i in nodeids) {
3475 + var node = getNodeFromId(nodeids[i]);
3476 + var mesh = meshes[node.meshid];
3477 + var meshrights = mesh.links[userinfo._id].rights;
3478 + if (((node.conn & 1) != 0) && ((meshrights & 32768) != 0)) { addedOptions += '<option value=104>' + "deinstallatie agent" + '</option>'; break; }
3479 + }
3480 +
3481 + var x = "Selecteer een bewerking die op alle geselecteerde apparaten moet worden uitgevoerd. Acties worden alleen uitgevoerd met de juiste rechten." + '<br /><br />';
3482 + x += addHtmlValue("Operatie", '<select id=d2groupop><option value=100>' + "apparaat wekken" + '</option><option value=4>' + "Slaap apparaten" + '</option><option value=3>' + "Reset apparaten" + '</option><option value=2>' + "Schakel apparaten uit" + '</option><option value=102>' + "Verplaatsen naar apparaatgroep" + '</option>' + addedOptions + '<option value=101>' + "Verwijder apparaten" + '</option></select>');
3483 + setDialogMode(2, "Groepsactie", 3, groupActionFunctionEx, x);
3484 + }
3485 +
3486 + // Get the list of checked devices, removes any duplicates.
3487 + function getCheckedDevices() {
3488 + var nodeids = [], elements = document.getElementsByClassName("Apparaat Checkbox"), checkcount = 0;
3489 + for (var i=0;i<elements.length;i++) { if (elements[i].checked) { if (elements[i].value) { var nid = elements[i].value.substring(6); if (nodeids.indexOf(nid) == -1) { nodeids.push(nid); } } } }
3490 + return nodeids;
3491 + }
3492 +
3493 + function groupActionFunctionEx() {
3494 + var op = Q('d2groupop').value;
3495 + if (op == 100) {
3496 + // Group wake
3497 + meshserver.send({ action: 'wakedevices', nodeids: getCheckedDevices() });
3498 + } else if (op == 101) {
3499 + // Group delete, ask for confirmation
3500 + var x = "Bevestig geselecteerde apparaten verwijderen?" + '<br /><br />';
3501 + x += '<label><input id=d2check type=checkbox onchange=d2groupActionFunctionDelEx() />' + "Bevestig" + '</label>';
3502 + setDialogMode(2, "Verwijder apparaten", 3, groupActionFunctionDelEx, x);
3503 + QE('idx_dlgOkButton', false);
3504 + } else if (op == 102) {
3505 + // Move computers to a different group
3506 + p10showChangeGroupDialog(getCheckedDevices());
3507 + } else if (op == 103) {
3508 + // Send MQTT Message
3509 + p10showSendMqttMsgDialog(getCheckedDevices());
3510 + } else if (op == 104) {
3511 + // Uninstall agent
3512 + p10showSendUninstallAgentDialog(getCheckedDevices());
3513 + } else {
3514 + // Power operation
3515 + meshserver.send({ action: 'poweraction', nodeids: getCheckedDevices(), actiontype: parseInt(op) });
3516 + }
3517 + }
3518 +
3519 + function d2groupActionFunctionDelEx() { QE('idx_dlgOkButton', Q('d2check').checked); }
3520 + function groupActionFunctionDelEx() { meshserver.send({ action: 'removedevices', nodeids: getCheckedDevices() }); }
3521 +
3522 + function onSortSelectChange(skipsave) {
3523 + sort = document.getElementById('sortselect').selectedIndex;
3524 + if (!skipsave) { putstore('sort', sort); }
3525 + }
3526 +
3527 + function meshSort(a, b) { if (a.meshnamel > b.meshnamel) return 1; if (a.meshnamel < b.meshnamel) return -1; if (a.meshid == b.meshid) { if (showRealNames == true) { if (a.rnamel > b.rnamel) return 1; if (a.rnamel < b.rnamel) return -1; return 0; } else { if (a.namel > b.namel) return 1; if (a.namel < b.namel) return -1; return 0; } } return 0; }
3528 + function powerSort(a, b) { var ap = a.pwr?a.pwr:0; var bp = b.pwr?b.pwr:0; if (ap > bp) return -1; if (ap < bp) return 1; if (ap == bp) { if (showRealNames == true) { if (a.rnamel > b.rnamel) return 1; if (a.rnamel < b.rnamel) return -1; return 0; } else { if (a.namel > b.namel) return 1; if (a.namel < b.namel) return -1; return 0; } } return 0; }
3529 + function deviceSort(a, b) { if (a.namel > b.namel) return 1; if (a.namel < b.namel) return -1; return 0; }
3530 + function deviceHostSort(a, b) { if (a.rnamel > b.rnamel) return 1; if (a.rnamel < b.rnamel) return -1; return 0; }
3531 + function onSearchFocus(x) { searchFocus = x; }
3532 + function onMapSearchFocus(x) { mapSearchFocus = x; }
3533 + function onUserSearchFocus(x) { userSearchFocus = x; }
3534 + function onConsoleFocus(x) { consoleFocus = x; }
3535 +
3536 + function onSearchInputChanged() {
3537 + var x = Q('SearchInput').value.toLowerCase().trim(); putstore('_search', x);
3538 + var userSearch = null, ipSearch = null, groupSearch = null;
3539 + if (x.startsWith('user:')) { userSearch = x.substring(5); }
3540 + else if (x.startsWith('u:')) { userSearch = x.substring(2); }
3541 + else if (x.startsWith('ip:')) { ipSearch = x.substring(3); }
3542 + else if (x.startsWith('group:')) { groupSearch = x.substring(6); }
3543 + else if (x.startsWith('g:')) { groupSearch = x.substring(2); }
3544 +
3545 + if (x == '') {
3546 + // No search
3547 + for (var d in nodes) { nodes[d].v = true; }
3548 + } else if (ipSearch != null) {
3549 + // IP address search
3550 + for (var d in nodes) { nodes[d].v = ((nodes[d].ip != null) && (nodes[d].ip.indexOf(ipSearch) >= 0)); }
3551 + } else if (groupSearch != null) {
3552 + // Group filter
3553 + for (var d in nodes) { nodes[d].v = (meshes[nodes[d].meshid].name.toLowerCase().indexOf(groupSearch) >= 0); }
3554 + } else if (userSearch != null) {
3555 + // User search
3556 + for (var d in nodes) {
3557 + nodes[d].v = false;
3558 + if (nodes[d].users && nodes[d].users.length > 0) { for (var i in nodes[d].users) { if (nodes[d].users[i].toLowerCase().indexOf(userSearch) >= 0) { nodes[d].v = true; } } }
3559 + }
3560 + } else {
3561 + // Device name search
3562 + try {
3563 + var rs = x.split(/\s+/).join('|'), rx = new RegExp(rs); // In some cases (like +), this can throw an exception.
3564 + for (var d in nodes) {
3565 + nodes[d].v = (rx.test(nodes[d].name.toLowerCase())) || (nodes[d].rnamel != null && rx.test(nodes[d].rnamel.toLowerCase()));
3566 + if ((nodes[d].v == false) && nodes[d].tags) {
3567 + for (var s in nodes[d].tags) {
3568 + if (rx.test(nodes[d].tags[s].toLowerCase())) {
3569 + nodes[d].v = true;
3570 + break;
3571 + } else {
3572 + nodes[d].v = false;
3573 + }
3574 + }
3575 + }
3576 + }
3577 + } catch (ex) { for (var d in nodes) { nodes[d].v = true; } }
3578 + }
3579 + }
3580 +
3581 + var contextelement = null;
3582 + function handleContextMenu(event) {
3583 + hideContextMenu();
3584 + var scrollLeft = (window.pageXOffset !== null) ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body).scrollLeft;
3585 + var scrollTop = (window.pageYOffset !== null) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
3586 + var elem = document.elementFromPoint(event.pageX - scrollLeft, event.pageY - scrollTop);
3587 + if (elem && elem != null && elem.id == 'connectbutton2' && currentNode && currentNode.agent && (currentNode.agent.id > 0) && (currentNode.agent.id < 5)) {
3588 + contextelement = elem;
3589 + var contextmenudiv = document.getElementById('termShellContextMenu');
3590 + contextmenudiv.style.left = event.pageX + 'px';
3591 + contextmenudiv.style.top = event.pageY + 'px';
3592 + contextmenudiv.style.display = 'block';
3593 + } else if (elem && elem != null && elem.id == 'connectbutton2' && currentNode && currentNode.agent && (currentNode.agent.id > 4)) {
3594 + contextelement = elem;
3595 + var contextmenudiv = document.getElementById('termShellContextMenuLinux');
3596 + contextmenudiv.style.left = event.pageX + 'px';
3597 + contextmenudiv.style.top = event.pageY + 'px';
3598 + contextmenudiv.style.display = 'block';
3599 + } else if (elem && elem != null && elem.id == 'MxMESH') {
3600 + contextelement = elem;
3601 + var contextmenudiv = document.getElementById('meshContextMenu');
3602 + contextmenudiv.style.left = event.pageX + 'px';
3603 + contextmenudiv.style.top = event.pageY + 'px';
3604 + contextmenudiv.style.display = 'block';
3605 + /*} else if (elem && elem != null && elem.classList.contains('pluginTab')) {
3606 + contextelement = elem;
3607 + var contextmenudiv = document.getElementById('pluginTabContextMenu');
3608 + contextmenudiv.style.left = event.pageX + 'px';
3609 + contextmenudiv.style.top = event.pageY + 'px';
3610 + contextmenudiv.style.display = 'block';*/
3611 + } else {
3612 + while (elem && elem != null && elem.id != 'devs') { elem = elem.parentElement; }
3613 + if (!elem || elem == null) return true;
3614 + contextelement = elem;
3615 + var contextmenudiv = document.getElementById('contextMenu');
3616 + contextmenudiv.style.left = event.pageX + 'px';
3617 + contextmenudiv.style.top = event.pageY + 'px';
3618 + contextmenudiv.style.display = 'block';
3619 +
3620 + // Get the node and set the menu options
3621 + var nodeid = contextelement.children[1].attributes.onclick.value;
3622 + var node = getNodeFromId(nodeid.substring(12, nodeid.length - 18));
3623 + var mesh = meshes[node.meshid];
3624 + var meshlinks = mesh.links[userinfo._id];
3625 + var meshrights = meshlinks.rights;
3626 + var consoleRights = ((meshrights & 16) != 0);
3627 +
3628 + // Check if we have terminal and file access
3629 + var terminalAccess = ((meshrights == 0xFFFFFFFF) || ((meshrights & 512) == 0));
3630 + var fileAccess = ((meshrights == 0xFFFFFFFF) || ((meshrights & 1024) == 0));
3631 +
3632 + QV('cxdesktop', ((mesh.mtype == 1) || (node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 1) != 0) || (node.intelamt && (node.intelamt.state == 2))) && ((meshrights & 8) || (meshrights & 256)));
3633 + QV('cxterminal', ((mesh.mtype == 1) || (node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 2) != 0) || (node.intelamt && (node.intelamt.state == 2))) && (meshrights & 8) && terminalAccess);
3634 + QV('cxfiles', ((mesh.mtype == 2) && ((node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 4) != 0))) && (meshrights & 8) && fileAccess);
3635 + QV('cxevents', (node.intelamt != null) && ((node.intelamt.state == 2) || (node.conn & 2)) && (meshrights & 8));
3636 + QV('cxconsole', (consoleRights && (mesh.mtype == 2) && ((node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 8) != 0))) && (meshrights & 8));
3637 + }
3638 +
3639 + return haltEvent(event);
3640 + }
3641 +
3642 + function cmaction(action,event) {
3643 + var nodeid = contextelement.children[1].attributes.onclick.value;
3644 + nodeid = nodeid.substring(12, nodeid.length - 18);
3645 + if (action == 7) { Q('viewselect').value = 3; Q('viewselect').onchange(); Q('autoConnectDesktopCheckbox').checked = true; Q('autoConnectDesktopCheckbox').onclick(); } // Multi-Desktop
3646 + if ((action > 0) && (action < 7)) {
3647 + var panel = [0, 10, 12, 11, 13, 16, 15][action]; // (invalid), General, Desktop, Terminal, Files, Events, Console
3648 + if (event && (event.shiftKey == true)) {
3649 + // Open the device in a different tab
3650 + window.open(window.location.origin + '?node=' + nodeid.split('/')[2] + '&viewmode=' + panel + '&hide=16', 'meshcentral:' + nodeid);
3651 + } else {
3652 + // Go to the right panel
3653 + gotoDevice(nodeid, panel);
3654 +
3655 + // If possible, connect...
3656 + var mesh = meshes[currentNode.meshid];
3657 + if ((currentNode.conn & 1) && (mesh.mtype == 2)) {
3658 + if ((panel == 11) && (desktop == null) && (currentNode.agent.caps & 1)) { connectDesktop(null, 3); } // Desktop
3659 + if ((panel == 12) && (terminal == null) && (currentNode.agent.caps & 2)) { connectTerminal(null, 1); } // Terminal
3660 + if ((panel == 13) && (files == null)) { connectFiles(null); } // files
3661 + }
3662 + }
3663 + }
3664 + }
3665 +
3666 + function cmmeshaction(action) {
3667 + var meshid = contextelement.attributes.onclick.value.substring(10, contextelement.attributes.onclick.value.length - 2);
3668 + var elements = document.getElementsByClassName('DeviceCheckbox');
3669 + if ((action == 1) || (action == 2)) {
3670 + for (var i = 0; i < elements.length; i++) {
3671 + if ((elements[i].attributes) && (elements[i].attributes['class']['value'].split(' ')[0] == meshid)) { elements[i].checked = (action == 1); }
3672 + }
3673 + }
3674 + //if (action == 3) { window.location = "multidesktop.aspx?mesh=" + meshid + "&auto=1"; }
3675 + p1updateInfo();
3676 + }
3677 +
3678 + function cmtermaction(action) {
3679 + connectTerminal(null, 1, { protocol: action });
3680 + }
3681 +
3682 + /*
3683 + function pluginTabClose() {
3684 + var pluginTab = contextelement;
3685 + var pname = pluginTab.getAttribute('x-data-plugin-sname');
3686 + var pdiv = Q('plugin-'+pname);
3687 + pdiv.parentNode.removeChild(pdiv);
3688 + pluginTab.parentNode.removeChild(pluginTab);
3689 + QV('p42', true);
3690 + goPlugin(-1);
3691 + }
3692 + */
3693 +
3694 + function hideContextMenu() {
3695 + QV('contextMenu', false);
3696 + QV('meshContextMenu', false);
3697 + QV('termShellContextMenu', false);
3698 + QV('termShellContextMenuLinux', false);
3699 + //QV('pluginTabContextMenu', false);
3700 + contextelement = null;
3701 + }
3702 +
3703 + //
3704 + // DEVICES MAP
3705 + //
3706 +
3707 + // Maps code starts from here. Initialize all the variables
3708 + var xxmap = {
3709 + map: null,
3710 + contextmenu: null,
3711 + activeInteractions: [], // Save Modified features in this list
3712 + showindex: 0,
3713 + markersSource: null, // Initialize a Source Vector
3714 + markersLayer: null,
3715 + mapLayer: null, // Create a tile and use OSM source
3716 + mapView: null, // Sets the initial view
3717 + }
3718 +
3719 + {{{StartGeoLocationJS}}}
3720 +
3721 + // Add a feature for every Node and change style if connection status changes
3722 + function updateMapMarkers(selectedMesh) {
3723 + if ((xxmap != null) && (xxmap.map == null)) { try { loadmap(); } catch (ex) { console.error('loadmap() exception', ex); } }
3724 + if (xxmap == null) return;
3725 + var boundingBox = null;
3726 + for (var i in nodes) {
3727 + try {
3728 + var loc = map_parseNodeLoc(nodes[i]), feature = xxmap.markersSource.getFeatureById(nodes[i]._id);
3729 + if ((loc != null) && ((nodes[i].meshid == selectedMesh) || (selectedMesh == null))) { // Draw markers for devices with locations
3730 + var lat = loc[0], lon = loc[1], type = loc[2];
3731 + if (boundingBox == null) { boundingBox = [ lat, lon, lat, lon, 0 ]; } else { if (lat < boundingBox[0]) { boundingBox[0] = lat; } if (lon < boundingBox[1]) { boundingBox[1] = lon; } if (lat > boundingBox[2]) { boundingBox[2] = lat; } if (lon > boundingBox[3]) { boundingBox[3] = lon; } }
3732 + if (feature == null) { addFeature(nodes[i]); boundingBox[4] = 1; } else { updateFeature(nodes[i], feature); feature.setStyle(markerStyle(nodes[i], loc[2])); } // Update Feature
3733 + } else {
3734 + if (feature) { xxmap.markersSource.removeFeature(feature); }
3735 + }
3736 + } catch (ex) { console.error('updateMapMarkers() exception', ex, JSON.stringify(nodes[i])); }
3737 + }
3738 + return boundingBox;
3739 + }
3740 +
3741 + // Show node details on hovering over a feature
3742 + var map_cm_popup = new ol.Overlay({ element: Q('xmap-info-window'), positioning: 'bottom-center', stopEvent: false });
3743 +
3744 + // Edit Marker item
3745 + var map_cm_editMarker = { text: "Wijzig knooppuntlocatie", callback: function (obj) { modifyMarkerloc(obj.data); } };
3746 +
3747 + // Clear Marker item
3748 + var map_cm_clearMarker = { text: "Verwijder knooppuntlocatie", callback: function (obj) {
3749 + meshserver.send({ action: 'changedevice', nodeid: obj.data.a, userloc: [] }); // Clear the user position marker
3750 + }};
3751 +
3752 + // Save Marker item
3753 + var map_cm_saveMarker = { text: "Knooppuntlocatie opslaan", callback: function (obj) { saveMarkerloc(obj.data); } };
3754 +
3755 + // Build a context menu for a feature
3756 + var map_cm_nodemenu_items = [
3757 + { text: "Algemene informatie", callback: function (obj) { if (obj.data !=null) { gotoDevice(obj.data, 10); } } },
3758 + { text: "bureaublad", callback: function (obj) { if (obj.data !=null) { gotoDevice(obj.data, 11); } } },
3759 + { text: "Terminal", callback: function (obj) { if (obj.data !=null) { gotoDevice(obj.data, 12); } } },
3760 + { text: "Intel&reg; AMT", callback: function (obj) { if (obj.data !=null) { gotoDevice(obj.data, 14); } } },
3761 + '-',
3762 + { text: "Inzoomen tot maat", callback: function(obj) { var coords = obj.data.getGeometry().getCoordinates(); zoomToLocation(coords, 19); } },
3763 + { text: "Uitzoomen naar maat", callback: function(obj) { var coords = obj.data.getGeometry().getCoordinates(); zoomToLocation(coords, 2); } }
3764 + ];
3765 +
3766 + // Context menu for clicks other than on feature
3767 + var contextmenu_items = [
3768 + { text: "Ververs", callback: function () { refreshMap(true, true); } },
3769 + { text: "Zoom in op maat", callback: function () { zoomToFitExtent(); } },
3770 + { text: "Centreer kaart hier", callback: function(obj) { xxmap.mapView.animate({ center: obj.coordinate } ); } },
3771 + { text: "Plaats hier een knooppunt", callback: function(obj) { placeNode(obj.coordinate); } }
3772 + ];
3773 +
3774 + function stringToIntHash(str) {
3775 + var hash = 0, i;
3776 + for (i = 0; i < str.length; i++) { hash = ((hash << 5) - hash) + str.charCodeAt(i); hash |= 0; }
3777 + return hash;
3778 + };
3779 +
3780 + // Get the lat/lon from a node
3781 + function map_parseNodeLoc(node) {
3782 + var loc = null, t = 0;
3783 + if (node.iploc) { loc = node.iploc; t = 1; }
3784 + if (node.wifiloc) { loc = node.wifiloc; t = 2; }
3785 + if (node.gpsloc) { loc = node.gpsloc; t = 3; }
3786 + if (node.userloc) { loc = node.userloc; t = 4; }
3787 + if ((loc == null) || (typeof loc != 'string')) return null;
3788 + loc = loc.split(',');
3789 + if (t == 1) {
3790 + // If this is IP location, randomize the position a little.
3791 + return [ parseFloat(loc[0]) + (stringToIntHash(node._id.substring(0, 20)) / 100000000000), parseFloat(loc[1]) + (stringToIntHash(node._id.substring(20)) / 100000000000), t ];
3792 + } else {
3793 + // Return the real position
3794 + return [ parseFloat(loc[0]), parseFloat(loc[1]), t ];
3795 + }
3796 + }
3797 +
3798 + // Load the entire map
3799 + function loadmap() {
3800 + if (xxmap == null) return;
3801 + if ((features & 0x8000) == 0) { xxmap = null; return; } // Geolocation not supported
3802 + QV('viewselectmapoption', true);
3803 + QV('devViewButton4', true);
3804 + try {
3805 + // Initialize a Source Vector
3806 + xxmap.markersSource = new ol.source.Vector();
3807 +
3808 + xxmap.markersLayer = new ol.layer.Vector({
3809 + source: xxmap.markersSource
3810 + });
3811 +
3812 + // Create a tile and use OSM source
3813 + xxmap.mapLayer = new ol.layer.Tile({ source: new ol.source.OSM() });
3814 +
3815 + xxmap.mapView = new ol.View({ // Set the initial view
3816 + center: ol.proj.transform([0, 0], 'EPSG:4326', 'EPSG:3857'),
3817 + zoom: 2,
3818 + minZoom: 2,
3819 + maxZoom: 20,
3820 + extent: ol.proj.transformExtent([-100000, -69.55, 100000, 69.55], 'EPSG:4326', 'EPSG:3857')
3821 + });
3822 +
3823 + xxmap.map = new ol.Map({
3824 + target: 'xdevicesmap',
3825 + layers: [xxmap.mapLayer, xxmap.markersLayer],
3826 + view: xxmap.mapView
3827 + });
3828 +
3829 + xxmap.map.addOverlay(map_cm_popup);
3830 +
3831 + // Goto information tab if a user clicks on a feature
3832 + xxmap.map.on('click', function(evt) {
3833 + var feature = xxmap.map.forEachFeatureAtPixel(evt.pixel, function(feat, layer) { return feat; });
3834 + if (feature) {
3835 + var nodeid = feature.getId();
3836 + if (nodeid != null) { gotoDevice(nodeid, 10); } // Goto general info tab
3837 + else { // For pointer
3838 + var nodeFeatgoto = getCorrespondingFeature(feature); gotoDevice(nodeFeatgoto.getId(), 10);
3839 + }
3840 + }
3841 + });
3842 +
3843 + // On hover feature show the name of the node. Also add pointer style
3844 + xxmap.map.on('pointermove', function(evt) {
3845 + var feature = xxmap.map.forEachFeatureAtPixel(evt.pixel, function(feat, layer) { return feat; });
3846 + if (feature) {
3847 + xxmap.map.getTargetElement().style.cursor = 'pointer';
3848 + var coord = feature.getGeometry().getCoordinates();
3849 + // map_cm_popup.setPosition(evt.coordinate);
3850 + map_cm_popup.setPosition(coord);
3851 + var featid = feature.getId();
3852 + if (featid) {
3853 + QH('xmap-info-window', feature.get('name'));
3854 + } else {
3855 + var nodeFeat = getCorrespondingFeature(feature); // Return the node feature associated to pointer.
3856 + QH('xmap-info-window', nodeFeat.get('name'));
3857 + }
3858 + } else {
3859 + xxmap.map.getTargetElement().style.cursor = '';
3860 + QH('xmap-info-window', '');
3861 + }
3862 + });
3863 +
3864 + // Initialize context menu for openlayers
3865 + var contextmenu = new ContextMenu({
3866 + width: 160,
3867 + defaultItems: false, // defaultItems are Zoom In/Zoom Out
3868 + items: contextmenu_items
3869 + });
3870 +
3871 + // On right click open the context menu
3872 + contextmenu.on("Open", function (evt) {
3873 + var feature = xxmap.map.forEachFeatureAtPixel(evt.pixel, function(ft, l){ return ft; });
3874 + xxmap.contextmenu.clear(); //Clear the context menu
3875 + if (feature) {
3876 + var featId = feature.getId();
3877 + if (featId) { addContextMenuItems(feature); } // Node feature will have an id
3878 + else { // If the feature is a pointer, Get its corresponding Node feature
3879 + var nodeFeature = getCorrespondingFeature(feature); //return the node feature associated to pointer.
3880 + if (nodeFeature) { addContextMenuItems(nodeFeature); }
3881 + else{ xxmap.contextmenu.extend(contextmenu_items); }
3882 + }
3883 + }
3884 + else { xxmap.contextmenu.extend(contextmenu_items); }
3885 + });
3886 + if (xxmap.contextmenu == null) { xxmap.contextmenu = contextmenu; }
3887 + xxmap.map.addControl(xxmap.contextmenu);
3888 + //addMeshOptions(); // Adds Mesh names to mesh dropdown
3889 + } catch (ex) {
3890 + console.log(ex);
3891 + QV('viewselectmapoption', false);
3892 + QV('devViewButton4', false);
3893 + xxmap = null;
3894 + }
3895 + }
3896 +
3897 + // Add feature on to Map for a Node
3898 + function addFeature(node, lat, lon) {
3899 + var existingfeature = getModifiedFeature(node._id); // Check if Corresponding feature was Modified ( Modifed feature are in active interactions list)
3900 + if (existingfeature) { xxmap.markersSource.addFeature(existingfeature); } // Add that existing feature
3901 + else { // Add new feature for this node
3902 + if (!lat && !lon) { var loc = map_parseNodeLoc(node); lat = loc[0]; lon = loc[1]; }
3903 +
3904 + // Fix the longiture and send an event to patch the db to correct coordinate format. It will cause second unnecessary updateFeature on this node to the map.
3905 + if (lon > 180) { lon = 180 - lon; meshserver.send({ action: 'changedevice', nodeid: node._id, userloc: [ lat, lon ] }); }
3906 +
3907 + if ((lat < 90) && (lat > -90) && (lon < 180) && (lon > -180)) { // Check valid lat/lon
3908 + var feature = new ol.Feature({ geometry: new ol.geom.Point(ol.proj.transform([lon, lat], 'EPSG:4326','EPSG:3857')), name: node.name, status: node.conn, lat: lat, lon: lon });
3909 + feature.setId(node._id); // Set id for the device as nodeid
3910 + feature.setStyle(markerStyle(node));
3911 + xxmap.markersSource.addFeature(feature); // Add the feature to Marker Source
3912 + }
3913 + }
3914 + }
3915 +
3916 + // Removing any feature from map
3917 + function removeFeature(node) {
3918 + var feature = xxmap.markersSource.getFeatureById(node._id);
3919 + if (feature) { xxmap.markersSource.removeFeature(feature); }
3920 + }
3921 +
3922 + // Update feature
3923 + function updateFeature(node, feature) {
3924 + if (node.conn != feature.get('status') ) { // Update status if changed
3925 + feature.set('status',node.conn)
3926 + feature.setStyle(markerStyle(node));
3927 + }
3928 +
3929 + // Since this is IP address location, add some fixed randomness to the location. Avoid pin pile-up.
3930 + var loc = map_parseNodeLoc(node);
3931 + if (loc != null) {
3932 + var lat = loc[0], lon = loc[1];
3933 + if ((lat != feature.get('lat')) || (lon != feature.get('lon'))) { // Update lat and lon if changed
3934 + feature.set('lat', lat); feature.set('lon', lon);
3935 + var modifiedCoordinates = ol.proj.transform([parseFloat(lon), parseFloat(lat)], 'EPSG:4326', 'EPSG:3857');
3936 + feature.getGeometry().setCoordinates(modifiedCoordinates);
3937 + }
3938 + }
3939 +
3940 + if (node.name != feature.get('name') ) { feature.set('name', node.name); } // Update name
3941 + }
3942 +
3943 + // Enable dragging of a marker after edit option is clicked in context menu
3944 + function modifyMarkerloc(ft){
3945 + var featid = ft.getId();
3946 + if (featid) {
3947 + ft.setStyle(markerStyle(getNodeFromId(ft.a), 4)); // Switch to a user marker
3948 + if ( !getActiveInteractions(ft)) {
3949 + var dragInteration = new ol.interaction.Modify({
3950 + features: new ol.Collection([ft]),
3951 + pixelTolerance: 10
3952 + });
3953 + xxmap.activeInteractions.push({ featureid: featid, feature:ft, interaction: dragInteration }); // Also keep track of Interactions
3954 + xxmap.map.addInteraction(dragInteration);
3955 + }
3956 + }
3957 + }
3958 +
3959 + // This will be called when save location option is clicked in context menu
3960 + function saveMarkerloc(ft){
3961 + var featid = ft.getId()
3962 + if (featid) {
3963 + var actInteraction = getActiveInteractions(ft);
3964 + if (actInteraction) { // Check if the interaction exists
3965 + xxmap.map.removeInteraction(actInteraction); //Clear Interaction for that node
3966 + removeInteraction(featid);
3967 + var coord = ft.getGeometry().getCoordinates();
3968 + var v = ol.proj.transform(coord, 'EPSG:3857', 'EPSG:4326');
3969 + if (v[0] > 180) { v[0] = 180 - v[0]; }
3970 + var vx = [ v[1], v[0] ]; // Flip the coordinates around, lat/long
3971 + meshserver.send({ action: 'changedevice', nodeid: featid, userloc: vx }); // Send them to server to save changes
3972 + }
3973 + }
3974 + }
3975 +
3976 + // Style the Markers
3977 + function markerStyle(node, type) {
3978 + if (type == null) {
3979 + type = 0;
3980 + if (node.iploc) { type = 1; }
3981 + if (node.wifiloc) { type = 2; }
3982 + if (node.gpsloc) { type = 3; }
3983 + if (node.userloc) { type = 4; }
3984 + }
3985 + var types = ['', '-ip','-wifi','-gps','-user'];
3986 + var color = connStateColor(node);
3987 + var style = new ol.style.Style({
3988 + image: new ol.style.Icon({ color: color, anchor: [0.5, 1], src: 'images/mapmarker' + types[type] + '.png' })
3989 + //stroke: new ol.style.Stroke({ color: '#000', width: 20 })
3990 + //text: new ol.style.Text({ text: 'bob!', textAlign: 'right', offsetX: -10, fill: new ol.style.Fill({ color: '#000' }), stroke: new ol.style.Stroke({ color: '#fff', width: 2 }) })
3991 + });
3992 +
3993 + //deviceMark.setStyle(new ol.style.Style({
3994 + // text: new ol.style.Text({
3995 + // //font: '12px helvetica,sans-serif',
3996 + // text: currentNode.name,
3997 + // textAlign: 'right',
3998 + // offsetX: -10,
3999 + // fill: new ol.style.Fill({ color: '#000' }),
4000 + // stroke: new ol.style.Stroke({ color: '#fff', width: 2 })
4001 + // }),
4002 + // image: new ol.style.Icon(({ color: [113, 140, 0], src: 'images/dot.png' })) }));
4003 +
4004 + return [ style ];
4005 + }
4006 +
4007 + // TODO: Add more connection status types. Currently we only change color if connection status changes
4008 + function connStateColor(nodeConn){
4009 + if (nodeConn.conn == 1 || nodeConn.conn == 3 || nodeConn.conn == 5) { return '#00ffdd'; } // Green for connected devices
4010 + return '#C70039'; // Red if the Agent is not connected
4011 + }
4012 +
4013 + // Add save/edit option to context menu
4014 + function addContextMenuItems(feature) {
4015 + if (getActiveInteractions(feature)) { // If this feature is modified then display save option in contextmenu
4016 + map_cm_saveMarker.data = feature;
4017 + xxmap.contextmenu.push(map_cm_saveMarker);
4018 + } else {
4019 + map_cm_editMarker.data = feature;
4020 + xxmap.contextmenu.push(map_cm_editMarker);
4021 + var node = getNodeFromId(feature.a);
4022 + if (node.userloc) {
4023 + map_cm_clearMarker.data = feature;
4024 + xxmap.contextmenu.push(map_cm_clearMarker);
4025 + }
4026 + }
4027 + map_cm_nodemenu_items.forEach(function (item){
4028 + if (item.text == "Inzoomen tot maat" || item.text == "Uitzoomen naar maat") { item.data = feature; }
4029 + else { if (item != '-') { item.data = feature.getId(); } }
4030 + });
4031 + xxmap.contextmenu.extend(map_cm_nodemenu_items);
4032 + }
4033 +
4034 + // Return a active Interaction if it exists in activeInteractions list
4035 + function getActiveInteractions(feature) {
4036 + var featid = feature.getId();
4037 + for (var i = 0; i < xxmap.activeInteractions.length; i++) {
4038 + if (xxmap.activeInteractions[i].featureid == featid) { return xxmap.activeInteractions[i].interaction; }
4039 + }
4040 + return false;
4041 + }
4042 +
4043 + // Return Modified feature based on Id
4044 + function getModifiedFeature(featid) {
4045 + if (featid) {
4046 + for (var i = 0; i < xxmap.activeInteractions.length; i++) {
4047 + if (xxmap.activeInteractions[i].featureid == featid) { return xxmap.activeInteractions[i].feature; }
4048 + }
4049 + }
4050 + return null;
4051 + }
4052 +
4053 + // Remove Interaction
4054 + function removeInteraction(ftid) {
4055 + var index = -1;
4056 + for (var i = 0; i < xxmap.activeInteractions.length; i++) {
4057 + if (xxmap.activeInteractions[i].featureid === ftid) { index = i; break; }
4058 + }
4059 + if (index >= 0) { xxmap.activeInteractions.splice(index, 1); }
4060 + }
4061 +
4062 + // Check if pointer coordinates are equal to features and return node feature
4063 + function getCorrespondingFeature(pointerFeat) {
4064 + var pointerCoord = pointerFeat.getGeometry().getCoordinates();
4065 + for (var i = 0; i < xxmap.activeInteractions.length ; i++) {
4066 + var modifiedFeatures = xxmap.activeInteractions[i].feature;
4067 + var fearCoord = modifiedFeatures.getGeometry().getCoordinates();
4068 + if (fearCoord[0].toFixed(5) == pointerCoord[0].toFixed(5) && fearCoord[1].toFixed(5) == pointerCoord[1].toFixed(5) ) { return modifiedFeatures; }
4069 + }
4070 + return null;
4071 + }
4072 +
4073 + // Refresh the map and clear list
4074 + function refreshMap(reset, rebound){
4075 + if (reset) {
4076 + xxmap.map.setTarget(null);
4077 + xxmap.map = null;
4078 + xxmap.markersSource = null;
4079 + xxmap.mapView = null;
4080 + xxmap.mapLayer = null;
4081 + xxmap.activeInteractions = []; // Clear Active Interaction list
4082 + }
4083 + //clearMeshOptions();
4084 + //onSelectMeshChange();
4085 + var box = updateMapMarkers();
4086 + if ((box != null) && (rebound || (box[4] == 1))) {
4087 + var clat = (box[0] + box[2]) / 2;
4088 + var clon = (box[1] + box[3]) / 2;
4089 + var cscale = Math.max(Math.abs(box[0] - box[2]), Math.abs(box[1] - box[3]));
4090 + var view = xxmap.map.getView();
4091 + view.setCenter(ol.proj.transform([clon, clat], 'EPSG:4326', 'EPSG:3857'));
4092 + var i = 360, j = -2;
4093 + while (i > cscale) { j++; i = i / 2; }
4094 + view.setZoom(j);
4095 + }
4096 + }
4097 +
4098 + // Called When Place a node option is clicked from context menu
4099 + function placeNode(coords) {
4100 + if (xxdialogMode) return;
4101 + var x = '<div style=margin-bottom:6px><label for=selectnode-search>' + "Zoeken" + '</label>&nbsp&nbsp<input type=text placeholder="' + "Apparaat naam" + '" id="selectnode-search" onchange=onPlaceNodeInputChange() onkeyup=onPlaceNodeInputChange() autocomplete=off style=width:120px></div><div id=placenode style="height:254px;overflow-y:auto;width:100%;margin:12px 1px 4px 1px;"><div id=noNodesMapPlace style=text-align:center;width:100%;display:none>' + "Geen apparaten gevonden." + '</div>';
4102 + for (var i in nodes) {
4103 + x += '<div class=noselect id=' + nodes[i]._id + '-rowid onclick=selectNodeToPlace(event,\''+ nodes[i]._id +'\') style=background-color:lightgray;margin-bottom:4px;border-radius:2px><input name=PlaceMapDeviceCheckbox id=' + nodes[i]._id + '-checkid type=checkbox style=width:16px;display:inline />';
4104 + x += '<div class=j' + nodes[i].icon + ' style=width:16px;height:16px;margin-top:2px;margin-right:4px;display:inline-block></div><div style=width:16px;display:inline>' + nodes[i].name + '</div></div>';
4105 + }
4106 + setDialogMode(2, "Selecteer een knooppunt om te plaatsen", 3, placeNodeEx, x + '</div>', coords);
4107 + onPlaceNodeInputChange();
4108 + }
4109 +
4110 + function placeNodeEx(button, coords) {
4111 + var elements = document.getElementsByName('PlaceMapDeviceCheckbox');
4112 + for (var i in elements) {
4113 + if (elements[i].checked) {
4114 + var node = getNodeFromId(elements[i].id.substring(0, elements[i].id.length - 8));
4115 + if (node) {
4116 + var feature = xxmap.markersSource.getFeatureById(i);
4117 + var v = ol.proj.transform(coords, 'EPSG:3857', 'EPSG:4326');
4118 + var vx = [ v[1], v[0] ]; // Flip the coordinates around, lat/long
4119 + if (feature) {
4120 + feature.getGeometry().setCoordinates(coords);
4121 + var activeInteraction = getActiveInteractions(feature);
4122 + if (activeInteraction) {
4123 + saveMarkerloc(feature);
4124 + } else { // If this feature is not saved after its location is changed, then send updated coords to server.
4125 + meshserver.send({ action: 'changedevice', nodeid: node._id, userloc: vx }); // Send them to server to save changes
4126 + }
4127 + } else {
4128 + meshserver.send({ action: 'changedevice', nodeid: node._id, userloc: vx }); // This Node is not yet added to maps.
4129 + }
4130 + }
4131 + }
4132 + }
4133 + }
4134 +
4135 + // Called when the user changes the search box
4136 + function onPlaceNodeInputChange() {
4137 + updatePlaceNodeTable(Q('selectnode-search').value.trim().toLowerCase());
4138 + }
4139 +
4140 + // Update the list of devices in the "place on map" table
4141 + function updatePlaceNodeTable(inputSearch) {
4142 + var elements = document.getElementsByName('PlaceMapDeviceCheckbox'), count = 0;
4143 + for (var i in nodes) {
4144 + var visible = ((nodes[i].namel.indexOf(inputSearch) >= 0 || inputSearch == '') || (nodes[i].rnamel != null && nodes[i].rnamel.indexOf(inputSearch) >= 0));
4145 + if (visible) { count++; }
4146 + QV(nodes[i]._id + '-rowid', visible);
4147 + }
4148 + QV('noNodesMapPlace', count == 0);
4149 + //console.log(selected);
4150 + //for (var i in nodes) {
4151 + // if ((nodes[i].name.toLowerCase().indexOf(inputSearch) >= 0 || inputSearch == '') || (nodes[i].rnamel != null && nodes[i].rnamel.toLowerCase().indexOf(inputSearch) >= 0)) {
4152 + // console.log(selected.indexOf(nodes[i]._id));
4153 + // x += '<div class=noselect id=' + nodes[i]._id + '-rowid onclick=selectNodeToPlace(event,\''+ nodes[i]._id +'\') style=background-color:lightgray;margin-bottom:4px;border-radius:2px><input name=PlaceMapDeviceCheckbox id=' + nodes[i]._id + '-checkid type=checkbox style=width:16px;display:inline ' + ((selected.indexOf(nodes[i]._id) >= 0)?'checked':'') + ' />';
4154 + // x += '<div class=j' + nodes[i].icon + ' style=width:16px;height:16px;margin-top:2px;margin-right:4px;display:inline-block></div><div style=width:16px;display:inline>' + nodes[i].name + '</div></div>';
4155 + // }
4156 + //}
4157 + //if (x == '') { x = '<div style=text-align:center;width:100%>No devices found.</div>'; }
4158 + //QH('placenode', '');
4159 + }
4160 +
4161 + // Called when a user clicks on a device to toggle selection for placement on map.
4162 + function selectNodeToPlace(e, id) {
4163 + // Toggle checkbox if needed
4164 + if (e.target.name != 'PlaceMapDeviceCheckbox') { var inputElement = Q(id + '-checkid'); inputElement.checked = !inputElement.checked; }
4165 +
4166 + // Check button state
4167 + var elements = document.getElementsByName('PlaceMapDeviceCheckbox'), checkcount = 0;
4168 + for (var i in elements) { if (elements[i].checked) checkcount++; }
4169 + QE('idx_dlgOkButton', checkcount > 0);
4170 + }
4171 +
4172 + // Add option for available meshes in mesh Dropdown
4173 + function addMeshOptions(addMeshid, meshName) {
4174 + //var meshOptions = Q('select-mesh');
4175 + //if (addMeshid && meshName) {
4176 + // var option = document.createElement('option');
4177 + // option.value =addMeshid;
4178 + // option.text = meshName;
4179 + // meshOptions.add(option); // Add specific option
4180 + //}
4181 + //else {
4182 + // for (var i in meshes) { // Add all options
4183 + // var option = document.createElement('option');
4184 + // option.value = i;
4185 + // option.text = meshes[i].name;
4186 + // meshOptions.add(option);
4187 + // }
4188 + //}
4189 + }
4190 +
4191 + // Remove/Modify options in Mesh dropdown (if modMeshname is defined then Modify else Remove)
4192 + function meshOptionRmvMod(delMeshid, modMeshname){
4193 + //var meshOptions = Q('select-mesh');
4194 + //if (delMeshid) {
4195 + // var index=-1;
4196 + // for (var i = 1; i < meshOptions.options.length; i++) {
4197 + // if (meshOptions[i].value === delMeshid) { index=i; }
4198 + // }
4199 + // if (index > 0) {
4200 + // if (modMeshname) {
4201 + // meshOptions[index].innerHTML=modMeshname; // If Mesh name is Modified
4202 + // }
4203 + // else { meshOptions.remove(index); }
4204 + // }
4205 + //}
4206 + }
4207 +
4208 + //Check if there is any mesh created
4209 + function meshExists() {
4210 + for (var i in meshes) { if (meshes[i]) { return true; } }
4211 + return false;
4212 + }
4213 +
4214 + // Reset Mesh dropdown option to 'All' when a current view mesh is deleted.
4215 + function setMeshView(emeshid) {
4216 + var selectMeshElement=Q('select-mesh');
4217 + var selectedIndex = selectMeshElement.selectedIndex;
4218 + if (selectMeshElement[selectedIndex].value == emeshid) { selectMeshElement[0].selected = true; onSelectMeshChange(); }
4219 + }
4220 +
4221 + // Clear all mesh options except 'All'
4222 + function clearMeshOptions() {
4223 + //var meshOptions=Q('select-mesh');
4224 + //for(var i = meshOptions.options.length - 1 ; i > 0 ; i--) { meshOptions.remove(i); }
4225 + }
4226 +
4227 + // Make a http get call- Replace this with AJAX get if jquery is used
4228 + function getSearchLocation() {
4229 + try {
4230 + var searchdata = Q('mapSearchLocation').value.trim();
4231 + if (searchdata.length > 0) {
4232 + var xmlhttp = new XMLHttpRequest(); // Compatible with Chrome, Opera, Safari, IE7+, Firefox.
4233 + xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { formatSearchData(xmlhttp.responseText); } }
4234 + xmlhttp.open('GET', 'https://nominatim.openstreetmap.org/search?q=' + searchdata + '&format=json', true); // Get request
4235 + xmlhttp.send();
4236 + }
4237 + } catch (e) {}
4238 + }
4239 +
4240 + // Format data recieved from nominatim API and display it on content window
4241 + function formatSearchData(data) {
4242 + try {
4243 + QH('xmapSearchResults','');
4244 + var dataInfo = JSON.parse(data), count = 0, x = '<div class="xmapItem">';
4245 + for (var i = 0; i < dataInfo.length; i++) {
4246 + if (dataInfo[i].display_name && dataInfo[i].boundingbox[0] && dataInfo[i].boundingbox[1] && dataInfo[i].boundingbox[2] && dataInfo[i].boundingbox[3]) {
4247 + count++;
4248 + var itemclass = (i % 2 == 0)?'xmapItemSel1':'xmapItemSel1';
4249 + x += '<div class="' + itemclass + '" onclick=mapGotoSelectedLocation(this)><div>' + dataInfo[i].display_name + '</div><div style=display:none>' + dataInfo[i].boundingbox[0] + '!#!' + dataInfo[i].boundingbox[1] + '!#!' + dataInfo[i].boundingbox[2] + '!#!' + dataInfo[i].boundingbox[3] + '</div></div>';
4250 + }
4251 + }
4252 + x += '</div>';
4253 + if (count == 1) {
4254 + // If only one result is returned then zoom to that location
4255 + var extent = [ parseFloat(dataInfo[0].boundingbox[2]), parseFloat(dataInfo[0].boundingbox[0]), parseFloat(dataInfo[0].boundingbox[3]), parseFloat(dataInfo[0].boundingbox[1]) ];
4256 + zoomToExtent(extent);
4257 + } else {
4258 + if (count == 0) { x = '<div style=width:200px>' + "Geen locatie gevonden." + '<div>'; }
4259 + QV('xmapSearchResultsDlg', true);
4260 + }
4261 + QH('xmapSearchResults', x);
4262 + }
4263 + catch (e) {}
4264 + }
4265 +
4266 + // Zoom into the bounding box
4267 + function mapGotoSelectedLocation(obj) {
4268 + var objchildren = obj.children;
4269 + var boundingBox = objchildren[1].innerHTML.split('!#!');
4270 + var extent = [parseFloat(boundingBox[2]), parseFloat(boundingBox[0]), parseFloat(boundingBox[3]), parseFloat(boundingBox[1])];
4271 + //Q('search-location').value = objchildren[0].innerHTML;
4272 + zoomToExtent(extent);
4273 + mapCloseSearchWindow();
4274 + }
4275 +
4276 + // Close the search window
4277 + function mapCloseSearchWindow() {
4278 + QH('xmapSearchResults', '');
4279 + QV('xmapSearchResultsDlg', false);
4280 + }
4281 +
4282 + // Zoom to specific cordinates
4283 + function zoomToLocation(coordinates, zoomVal) {
4284 + var view = xxmap.map.getView();
4285 + view.setCenter(coordinates);
4286 + view.setZoom(zoomVal);
4287 + }
4288 +
4289 + function zoomToFitExtent() {
4290 + var features = xxmap.markersSource.getFeatures();
4291 + if (features.length > 0) {
4292 + var extent = xxmap.markersSource.getExtent();
4293 + xxmap.map.getView().fit(extent, xxmap.map.getSize());
4294 + }
4295 + }
4296 +
4297 + function zoomToExtent(extent){
4298 + var boundingExtent = ol.proj.transformExtent(extent, ol.proj.get('EPSG:4326'), ol.proj.get('EPSG:3857'));
4299 + xxmap.map.getView().fit(boundingExtent, xxmap.map.getSize());
4300 + }
4301 +
4302 + {{{EndGeoLocationJS}}}
4303 +
4304 + //
4305 + // MY DEVICE
4306 + //
4307 + function refreshDevice(nodeid) {
4308 + if (!currentNode || currentNode._id != nodeid) return;
4309 + gotoDevice(nodeid, xxcurrentView, true);
4310 + }
4311 +
4312 + function getNodeRights(nodeid) {
4313 + var node = getNodeFromId(nodeid), mesh = meshes[node.meshid];
4314 + return mesh.links[userinfo._id].rights;
4315 + }
4316 +
4317 + var currentNode;
4318 + var powerTimelineNode = null;
4319 + var powerTimelineReq = null;
4320 + var powerTimelineUpdate = null;
4321 + var powerTimeline = null;
4322 + function getCurrentNode() { return currentNode; };
4323 + function gotoDevice(nodeid, panel, refresh, event) {
4324 + // Remind the user to verify the email address
4325 + if ((userinfo.emailVerified !== true) && (serverinfo.emailcheck == true) && (userinfo.siteadmin != 0xFFFFFFFF)) { setDialogMode(2, "Gebruikersaccount beveiliging", 1, null, "Geen toegang tot een apparaat totdat een e-mailadres is geverifieerd. Dit is vereist voor wachtwoordherstel. Ga naar het tabblad \"Mijn account\" om een e-mailadres te wijzigen en te verifiëren."); return; }
4326 +
4327 + // Remind the user to add two factor authentication
4328 + if ((features & 0x00040000) && !((userinfo.otpsecret == 1) || (userinfo.otphkeys > 0) || (userinfo.otpkeys > 0))) { setDialogMode(2, "Gebruikersaccount beveiliging", 1, null, "Geen toegang tot een apparaat totdat tweefactorauthenticatie is ingeschakeld. Dit is vereist voor extra beveiliging. Ga naar het tabblad \"Mijn account\" en bekijk het gedeelte \"Accountbeveiliging\"."); return; }
4329 +
4330 + if (event && (event.shiftKey == true)) {
4331 + // Open the device in a different tab
4332 + window.open(window.location.origin + '?node=' + nodeid.split('/')[2] + '&viewmode=10&hide=16', 'meshcentral:' + nodeid);
4333 + return;
4334 + }
4335 +
4336 + //disconnectAllKvmFunction();
4337 + var node = getNodeFromId(nodeid);
4338 + var mesh = meshes[node.meshid];
4339 + var meshrights = mesh.links[userinfo._id].rights;
4340 + if (!currentNode || currentNode._id != node._id || refresh == true) {
4341 + currentNode = node;
4342 +
4343 + // Add node name
4344 + var nname = EscapeHtml(node.name);
4345 + if (nname.length == 0) { nname = '<i>' + "Geen" + '</i>'; }
4346 + if (((meshrights & 4) != 0) && ((!mesh.flags) || ((mesh.flags & 2) == 0))) { nname = '<span tabindex=0 title=\"' + "Klik hier om de apparaatnaam van de server te bewerken" + '\" onclick=showEditNodeValueDialog(0) onkeyup="if (event.key == \'Enter\') showEditNodeValueDialog(0)" style=cursor:pointer>' + nname + ' <img class=hoverButton src="images/link5.png" /></span>'; }
4347 + nname += '<span style=color:#AAA;font-size:small> - ' + EscapeHtml(mesh.name) + '</span>';
4348 + QH('p10deviceName', nname);
4349 + QH('p11deviceName', nname);
4350 + QH('p12deviceName', nname);
4351 + QH('p13deviceName', nname);
4352 + QH('p14deviceName', nname);
4353 + QH('p15deviceName', "Console - " + nname);
4354 + QH('p16deviceName', nname);
4355 + QH('p17deviceName', nname);
4356 + QH('p19deviceName', nname);
4357 +
4358 + // Node attributes
4359 + var x = '<table style=width:100%>';
4360 +
4361 + // Attribute: Mesh
4362 + x += addDeviceAttribute('<span title=\"' + "De naam van de apparaatgroep waartoe deze computer behoort" + '\">' + "Groep" + '</span>', '<a href=# title=\"' + "De naam van de apparaatgroep waartoe deze computer behoort" + '\" onclick=gotoMesh("' + node.meshid + '") style=cursor:pointer>' + EscapeHtml(meshes[node.meshid].name) + '</a>');
4363 +
4364 + // Attribute: Name
4365 + if ((node.rname != null) && (node.name != node.rname)) { x += addDeviceAttribute('<span title="The name of this computer as set in the operating system">Name</span>', '<span title="The name of this computer as set in the operating system">' + EscapeHtml(node.rname) + '</span>'); }
4366 +
4367 + // Attribute: Host
4368 + if ((features & 1) == 0) { // If not WAN-only, local hostname is in use
4369 + if ((meshrights & 4) != 0) {
4370 + if (node.host) {
4371 + x += addDeviceAttribute("Hostname", '<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>' + EscapeHtml(node.host) + '</span>');
4372 + } else {
4373 + x += addDeviceAttribute("Hostname", '<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>' + "Geen" + '</i></span>');
4374 + }
4375 + } else {
4376 + x += addDeviceAttribute("Hostname", EscapeHtml(node.host));
4377 + }
4378 + }
4379 +
4380 + // Attribute: Description
4381 + var description = node.desc?EscapeHtml(node.desc):('<i>' + "Geen" + '</i>');
4382 + if ((meshrights & 4) != 0) {
4383 + x += addDeviceAttribute("Omschrijving", '<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>' + description + ' <img class=hoverButton src="images/link5.png" /></span>');
4384 + } else {
4385 + x += addDeviceAttribute("Omschrijving", description);
4386 + }
4387 +
4388 + // Attribute: Mesh Agent
4389 + var agentsStr = ["Onbekend", "Windows 32bit console", "Windows 64bit console", "Windows 32bit service", "Windows 64bit service", "Linux 32bit", "Linux 64bit", "MIPS", "XENx86", "Android ARM", "Linux ARM", "MacOS 32bit", "Android x86", "PogoPlug ARM", "Android APK", "Linux Poky x86-32bit", "MacOS 64bit", "ChromeOS", "Linux Poky x86-64bit", "Linux NoKVM x86-32bit", "Linux NoKVM x86-64bit", "Windows MinCore console", "Windows MinCore service", "NodeJS", "ARM-Linaro", "ARMv6l / ARMv7l", "ARMv8 64bit", "ARMv6l / ARMv7l / NoKVM", "Onbekend", "Onbekend", "FreeBSD x86-64"];
4390 + if ((node.agent != null) && (node.agent.id != null) && (node.agent.ver != null)) {
4391 + var str = '';
4392 + if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; }
4393 + if (node.agent.ver != 0) { str += ' v' + node.agent.ver; }
4394 + x += addDeviceAttribute("Mesh Agent", str);
4395 + }
4396 +
4397 + // Attribute: Intel AMT
4398 + if (node.intelamt != null) {
4399 + var str = '';
4400 + var provisioningStates = { 0: nobreak("Niet geactiveerd (Pre)"), 1: nobreak("Niet geactiveerd (In)"), 2: nobreak("Geactiveerd") };
4401 + if (node.intelamt.ver != null && node.intelamt.state == null) { str += '<i>' + "Onbekende staat" + '</i>, v' + node.intelamt.ver; } else
4402 +
4403 + if ((node.intelamt.ver == null) && (node.intelamt.state == 2)) { str += '<i>' + "Geactiveerd" + '</i>'; }
4404 + else if ((node.intelamt.ver == null) || (node.intelamt.state == null)) { str += '<i>' + "Onbekende versie en staat" + '</i>'; }
4405 + else {
4406 + str += provisioningStates[node.intelamt.state];
4407 + if ((node.intelamt.state == 2) && node.intelamt.flags) { if (node.intelamt.flags & 2) { str += ' <span title=\"' + "Intel AMT wordt geactiveerd in Client Control Mode" + '\">' + "CCM" + '</span>'; } else if (node.intelamt.flags & 4) { str += ' <span title=\"' + "Intel AMT wordt geactiveerd in de beheerdersmodus" + '\">' + "ACM" + '</span>'; } }
4408 + str += (', v' + node.intelamt.ver);
4409 + }
4410 +
4411 + if (node.intelamt.tls == 1) { str += ', <span title=\"' + "Intel AMT is ingesteld met TLS-netwerkbeveiliging" + '\">' + "TLS" + '</span>'; }
4412 + if (node.intelamt.state == 2) {
4413 + if (node.intelamt.user == null || node.intelamt.user == '') {
4414 + if ((meshrights & 4) != 0) {
4415 + str += ', <i style=color:#FF0000;cursor:pointer title=\"' + "Bewerk Intel® AMT-gegevens" + '\" onclick=editDeviceAmtSettings("' + node._id + '")>' + "Geen referenties" + '</i>';
4416 + } else {
4417 + str += ', <i style=color:#FF0000>' + "Geen referenties" + '</i>';
4418 + }
4419 + }
4420 + str += ' ';
4421 + if ((meshrights & 4) != 0) {
4422 + str += '<img src=images/link4.png height=10 width=10 title=\"' + "Bewerk Intel® AMT-gegevens" + '\" style=cursor:pointer onclick=editDeviceAmtSettings("' + node._id + '")>';
4423 + }
4424 + }
4425 +
4426 + var meName = '<span title=\"Intel&reg; Manageability Engine\">' + "Intel&reg; ME" + '<span>';
4427 + if (typeof node.intelamt.sku == 'number') {
4428 + if ((node.intelamt.sku & 8) != 0) { meName = '<span title=\"' + "Intel&reg; Active Management Technology" + '\">' + "Intel&reg; AMT" + '<span>'; }
4429 + else if ((node.intelamt.sku & 16) != 0) { meName = '<span title=\"' + "Standaard beheerbaarheid van Intel®" + '\">' + "Intel&reg; SM" + '<span>'; }
4430 + }
4431 + x += addDeviceAttribute(meName, str);
4432 + }
4433 +
4434 + if (mesh.mtype == 2) {
4435 + // Attribute: Mesh Agent Tag
4436 + if ((node.agent != null) && (node.agent.tag != null)) {
4437 + var tag = EscapeHtml(node.agent.tag);
4438 + if (tag.startsWith('mailto:')) { tag = '<a href="' + tag + '">' + tag.substring(7) + '</a>'; }
4439 + x += addDeviceAttribute("Agent Tag", tag);
4440 + }
4441 + } else {
4442 + // Attribute: Intel AMT Tag
4443 + if ((node.intelamt != null) && (node.intelamt.tag != null)) {
4444 + var tag = EscapeHtml(node.intelamt.tag);
4445 + if (tag.startsWith('mailto:')) { tag = '<a href="' + tag + '">' + tag.substring(7) + '</a>'; }
4446 + x += addDeviceAttribute("Intel&reg; AMT Tag", tag);
4447 + }
4448 + }
4449 +
4450 + // Attribute: Intel AMT
4451 + //if (node.intelamt && node.intelamt.user) { x += addDeviceAttribute('Intel&reg; AMT', node.intelamt.user); }
4452 +
4453 + // Operating system description
4454 + if (node.osdesc) { x += addDeviceAttribute("Besturingssysteem", node.osdesc); }
4455 +
4456 + // Antivirus
4457 + if (node.av && node.av.length > 0) {
4458 + var y = [];
4459 + for (var i in node.av) {
4460 + if (node.av[i].product) {
4461 + var avx = EscapeHtml(node.av[i].product);
4462 + if (node.av[i].enabled !== true) { avx += ' - <span style=color:red>' + "Uitgeschakeld" + '</span>'; }
4463 + if (node.av[i].updated !== true) { avx += ' - <span style=color:red>' + "Verouderd" + '</span>'; }
4464 + if ((node.av[i].enabled == true) && (node.av[i].updated == true)) { avx += ' - <span style=color:green>' + "Oke" + '</span>'; }
4465 + y.push(avx);
4466 + }
4467 + }
4468 + x += addDeviceAttribute("Anti-virus", y.join('<br />'));
4469 + }
4470 +
4471 + // Active Users
4472 + if (node.users && node.conn && (node.users.length > 0) && (node.conn & 1)) { x += addDeviceAttribute(format("Actieve gebruiker(s){0}", ((node.users.length > 1)?'s':'')), node.users.join(', ')); }
4473 +
4474 + // Attribute: Connectivity (Only show this if more than just the agent is connected).
4475 + var connectivity = node.conn;
4476 + if (connectivity && connectivity > 1) {
4477 + var cstate = [];
4478 + if ((node.conn & 1) != 0) cstate.push('<span title=\"' + "Mesh-agent is verbonden en klaar voor gebruik." + '\">' + "Mesh Agent" + '</span>');
4479 + if ((node.conn & 2) != 0) cstate.push('<span title=\"' + "Intel® AMT CIRA is verbonden en klaar voor gebruik." + '\">' + "Intel&reg; AMT CIRA" + '</span>');
4480 + else if ((node.conn & 4) != 0) cstate.push('<span title=\"' + "Intel® AMT is routeerbaar en klaar voor gebruik." + '\">' + "Intel&reg; AMT" + '</span>');
4481 + if ((node.conn & 8) != 0) cstate.push('<span title=\"' + "Mesh-agent is bereikbaar met een andere agent als relay." + '\">' + "Mesh Relay" + '</span>');
4482 + if ((node.conn & 16) != 0) { cstate.push('<span title=\"' + "MQTT verbinding met het apparaat is actief." + '\">' + "MQTT" + '</span>'); }
4483 + x += addDeviceAttribute("connectiviteit", cstate.join(', '));
4484 + }
4485 +
4486 + // Node grouping tags
4487 + var groupingTags = '<i>' + "Geen" + '</i>';
4488 + if (node.tags != null) { groupingTags = ''; for (var i in node.tags) { groupingTags += '<span class="tagSpan">' + node.tags[i] + '</span>'; } }
4489 + if ((meshrights & 4) != 0) {
4490 + x += addDeviceAttribute('Tags', '<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>' + groupingTags + ' <img class=hoverButton src="images/link5.png" /></span>');
4491 + } else {
4492 + x += addDeviceAttribute('Tags', groupingTags);
4493 + }
4494 +
4495 + x += '</table><br />';
4496 + // Show action button, only show if we have permissions 4, 8, 64
4497 + if ((meshrights & 76) != 0) { x += '<input type=button value=\"' + "Akties" + '\" title=\"' + "Voer krachtacties uit op het apparaat" + '\" onclick=deviceActionFunction() />'; }
4498 + x += '<input type=button value=\"' + "Notities" + '\" title=\"' + "Bekijk opmerkingen over dit apparaat" + '\" onclick=showNotes(' + ((meshrights & 128) == 0) + ',"' + encodeURIComponent(node._id) + '") />';
4499 + x += '<input type=button value=\"' + "Gebeurtenissenlog" + '\" title=\"' + "Schrijf een gebeurtenis voor dit apparaat" + '\" onclick=writeDeviceEvent("' + encodeURIComponent(node._id) + '") />';
4500 + //if ((connectivity & 1) && (meshrights & 8) && (node.agent.id < 5)) { x += '<input type=button value=Toast title="Display a text message of the remote device" onclick=deviceToastFunction() />'; }
4501 + QH('p10html', x);
4502 +
4503 + // Show node last 7 days timeline
4504 + masterUpdate(256);
4505 +
4506 + // Show bottom buttons
4507 + x = '<div class="p10html3right">';
4508 + if ((meshrights & 4) != 0) {
4509 + // TODO: Show change group only if there is another mesh of the same type.
4510 + x += '&nbsp;<a href=# onclick=p10showChangeGroupDialog(["' + node._id + '"]) title=\"' + "Verplaats dit apparaat naar een andere apparaatgroep" + '\">' + "verander groep" + '</a>';
4511 + x += '&nbsp;<a href=# onclick=p10showDeleteNodeDialog("' + node._id + '") title=\"' + "Verwijder dit apparaat" + '\">' + "Verwijder apparaat" + '</a>';
4512 + }
4513 + x += '</div><div class="p10html3left">';
4514 + if (mesh.mtype == 2) x += '<a href=# onclick=p10showNodeNetInfoDialog("' + node._id + '") title=\"' + "Toon apparaat netwerk interface informatie" + '\">' + "Interfaces" + '</a>&nbsp;';
4515 + if (xxmap != null) x += '<a href=# onclick=p10showNodeLocationDialog("' + node._id + '") title=\"' + "Informatie over apparaatlocaties weergeven" + '\">' + "Lokatie" + '</a>&nbsp;';
4516 + if (((meshrights & 8) != 0) && (mesh.mtype == 2)) x += '<a href=# onclick=p10showMeshCmdDialog(1,"' + node._id + '") title=\"' + "Verkeersrouter gebruikt om verbinding te maken met een apparaat via deze server" + '.\">' + "Router" + '</a>&nbsp;';
4517 +
4518 + // RDP link, show this link only of the remote machine is Windows.
4519 + if (((connectivity & 1) != 0) && (clickOnce == true) && (mesh.mtype == 2) && ((meshrights & 8) != 0)) {
4520 + if ((node.agent.id > 0) && (node.agent.id < 5)) { x += '<a href=# onclick=p10clickOnce("' + node._id + '","RDP2",3389) title=\"' + "Vereist Microsoft ClickOnce-ondersteuning in uw browser" + '.\">' + "RDP" + '</a>&nbsp;'; }
4521 + if (node.agent.id > 4) {
4522 + x += '<a href=# onclick=p10clickOnce("' + node._id + '","PSSH",22) title=\"' + "Vereist Microsoft ClickOnce-ondersteuning in uw browser" + '\">' + "Putty" + '</a>&nbsp;';
4523 + x += '<a href=# onclick=p10clickOnce("' + node._id + '","WSCP",22) title=\"' + "Vereist Microsoft ClickOnce-ondersteuning in uw browser" + '\">' + "WinSCP" + '</a>&nbsp;';
4524 + }
4525 + }
4526 +
4527 + // MQTT options
4528 + if ((meshrights == 0xFFFFFFFF) && (features & 0x00400000)) { x += '<a href=# onclick=p10showMqttLoginDialog("' + node._id + '") title=\"' + "Ontvang MQTT-inloggegevens voor dit apparaat." + '\">' + "MQTT Login" + '</a>&nbsp;'; }
4529 + x += '</div><br>'
4530 +
4531 + QH('p10html3', x);
4532 +
4533 + // Set the node power state
4534 + var powerstate = PowerStateStr(node.state);
4535 + //if (node.state == 0) { powerstate = 'Unknown State'; }
4536 + if ((connectivity & 1) != 0) { if (powerstate.length > 0) { powerstate += '<br/>'; } powerstate += '<span style=font-size:12px title=\"' + "Agent verbonden" + '\">' + "Agent verbonden" + '</span>'; }
4537 + if ((connectivity & 2) != 0) { if (powerstate.length > 0) { powerstate += '<br/>'; } powerstate += '<span style=font-size:12px title=\"' + "Intel® AMT verbonden" + '\">' + "Intel® AMT verbonden" + '</span>'; }
4538 + else if ((connectivity & 4) != 0) { if (powerstate.length > 0) { powerstate += '<br/>'; } powerstate += '<span style=font-size:12px title=\"' + "Intel&reg; AMT gedetecteerd" + '\">' + "Intel&reg; AMT gedetecteerd" + '</span>'; }
4539 + if ((connectivity & 16) != 0) { if (powerstate.length > 0) { powerstate += '<br/>'; } powerstate += '<span style=font-size:12px title=\"' + "MQTT verbonden" + '\">' + "MQTT-kanaal verbonden" + '</span>'; }
4540 + if ((powerstate == '') && node.lastconnect) { powerstate = '<span style=font-size:12px>' + "Laatst gezien" + '<br />' + printDateTime(new Date(node.lastconnect)) + '</span>'; }
4541 + QH('MainComputerState', powerstate);
4542 +
4543 + // Set the node icon
4544 + Q('MainComputerImage').setAttribute('src', 'images/icons256-' + node.icon + '-1.png');
4545 + Q('MainComputerImage').className = ((!node.conn) || (node.conn == 0)?'gray':'');
4546 +
4547 + // Check if we have terminal and file access
4548 + var terminalAccess = ((meshrights == 0xFFFFFFFF) || ((meshrights & 512) == 0));
4549 + var fileAccess = ((meshrights == 0xFFFFFFFF) || ((meshrights & 1024) == 0));
4550 + var amtAccess = ((meshrights == 0xFFFFFFFF) || ((meshrights & 2048) == 0));
4551 +
4552 + // Setup/Refresh the desktop tab
4553 + if (terminalAccess) { setupTerminal(); }
4554 + if (fileAccess) { setupFiles(); }
4555 + var consoleRights = ((meshrights & 16) != 0);
4556 + if (consoleRights) { setupConsole(); } else { if (panel == 15) { panel = 10; } }
4557 +
4558 + // Show or hide the tabs
4559 + // mesh.mtype: 1 = Intel AMT only, 2 = Mesh Agent
4560 + // node.agent.caps (bitmask): 1 = Desktop, 2 = Terminal, 4 = Files, 8 = Console
4561 + QV('MainDevDesktop', (((mesh.mtype == 1) && ((typeof node.intelamt.sku !== 'number') || ((node.intelamt.sku & 8) != 0)))
4562 + || ((mesh.mtype == 2) && ((node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 1) != 0) || (node.intelamt && (node.intelamt.state == 2)))))
4563 + && ((meshrights & 8) || (meshrights & 256))
4564 + );
4565 + QV('MainDevTerminal', ((mesh.mtype == 1) || (node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 2) != 0) || (node.intelamt && (node.intelamt.state == 2))) && (meshrights & 8) && terminalAccess);
4566 + QV('MainDevFiles', ((mesh.mtype == 2) && ((node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 4) != 0))) && (meshrights & 8) && fileAccess);
4567 + QV('MainDevAmt', (node.intelamt != null) && ((node.intelamt.state == 2) || (node.conn & 2)) && (meshrights & 8) && amtAccess);
4568 + QV('MainDevConsole', (consoleRights && (mesh.mtype == 2) && ((node.agent == null) || (node.agent.caps == null) || ((node.agent.caps & 8) != 0))) && (meshrights & 8));
4569 + QV('MainDevPlugins', false);
4570 + QV('p15uploadCore', (node.agent != null) && (node.agent.caps != null) && ((node.agent.caps & 16) != 0));
4571 + QH('p15coreName', ((node.agent != null) && (node.agent.core != null))?node.agent.core:'');
4572 +
4573 + // Setup/Refresh Intel AMT tab
4574 + var amtFrameNode = Q('p14iframe').contentWindow.getCurrentMeshNode();
4575 + if ((amtFrameNode != null) && (amtFrameNode._id != currentNode._id)) { Q('p14iframe').contentWindow.disconnect(); }
4576 + var online = ((node.conn & 6) != 0)?true:false; // If CIRA (2) or AMT (4) connected, enable Commander
4577 + Q('p14iframe').contentWindow.setConnectionState(online);
4578 + Q('p14iframe').contentWindow.setFrameHeight('650px');
4579 + Q('p14iframe').contentWindow.setAuthCallback(updateAmtCredentials);
4580 +
4581 + // Display "action" button on desktop/terminal/files
4582 + QV('deskActionsBtn', (meshrights & 72) != 0); // 72 = Wake-up + Remote Control permissions
4583 + QV('termActionsBtn', (meshrights & 72) != 0);
4584 + QV('filesActionsBtn', (meshrights & 72) != 0);
4585 +
4586 + // Request the power timeline
4587 + if ((powerTimelineNode != currentNode._id) && (powerTimelineReq != currentNode._id)) {
4588 + QH('p10html2', '');
4589 + powerTimelineReq = currentNode._id;
4590 + meshserver.send({ action: 'powertimeline', nodeid: currentNode._id });
4591 + meshserver.send({ action: 'lastconnect', nodeid: currentNode._id });
4592 + meshserver.send({ action: 'getsysinfo', nodeid: currentNode._id });
4593 + QH('p17info', '');
4594 + }
4595 +
4596 + // Reset the desktop tools
4597 + QV('DeskTools', false);
4598 + showDeskToolsProcesses();
4599 +
4600 + // Ask for device events
4601 + refreshDeviceEvents();
4602 +
4603 + // Update the web page title
4604 + if ((currentNode) && (xxcurrentView >= 10) && (xxcurrentView < 20)) {
4605 + document.title = decodeURIComponent('{{{extitle}}}') + ' - ' + currentNode.name + ' - ' + mesh.name;
4606 + } else {
4607 + document.title = decodeURIComponent('{{{extitle}}}');
4608 + }
4609 +
4610 + // Clear user consent status if present
4611 + p11clearConsoleMsg();
4612 + p12clearConsoleMsg();
4613 + p13clearConsoleMsg();
4614 +
4615 + // Device refresh plugin handler
4616 + if (pluginHandler != null) {
4617 + QH('p19headers', ''); QH('p19pages', '');
4618 + pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event);
4619 + var lastTab = getstore('_curPluginPage', null);
4620 + if (lastTab != null && Q('p19ph-' + lastTab) != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab));
4621 + }
4622 + }
4623 + setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching.
4624 + if (!panel) panel = 10;
4625 + go(panel);
4626 + }
4627 +
4628 + function writeDeviceEvent(nodeid) {
4629 + if (xxdialogMode) return;
4630 + setDialogMode(2, "Apparaatgebeurtenis toevoegen", 3, writeDeviceEventEx, '<textarea id=d2devEvent style=background-color:#fcf3cf;width:100%;height:200px;resize:none;overflow-y:scroll></textarea><span style=font-size:10px>' + "Hiermee wordt een vermelding toegevoegd aan het gebeurtenislogboek van dit apparaat." + '<span>', nodeid);
4631 + }
4632 +
4633 + function writeDeviceEventEx(buttons, tag) { meshserver.send({ action: 'setDeviceEvent', nodeid: decodeURIComponent(tag), msg: encodeURIComponent(Q('d2devEvent').value) }); }
4634 +
4635 + function showNotes(readonly, noteid) {
4636 + if (xxdialogMode) return;
4637 + setDialogMode(2, "Notities", 2, showNotesEx, '<textarea id=d2devNotes ro=' + readonly + ' noteid=' + noteid + ' readonly style=background-color:#fcf3cf;width:100%;height:200px;resize:none;overflow-y:scroll></textarea><span style=font-size:10px>' + "Apparaatgroepnotities kunnen worden bekeken en gewijzigd door andere apparaatgroepbeheerders." + '<span>', noteid);
4638 + meshserver.send({ action: 'getNotes', id: decodeURIComponent(noteid) });
4639 + }
4640 +
4641 + function showNotesEx(buttons, tag) { meshserver.send({ action: 'setNotes', id: decodeURIComponent(tag), notes: encodeURIComponent(Q('d2devNotes').value) }); }
4642 +
4643 + function deviceChat(e) {
4644 + if (xxdialogMode) return;
4645 + var url = '/messenger?id=meshmessenger/' + encodeURIComponent(currentNode._id) + '/' + encodeURIComponent(userinfo._id) + '&title=' + currentNode.name;
4646 + if ((authCookie != null) && (authCookie != '')) { url += '&auth=' + authCookie; }
4647 + if (e && (e.shiftKey == true)) {
4648 + window.open(url, 'meshmessenger:' + currentNode._id);
4649 + } else {
4650 + window.open(url, 'meshmessenger:' + currentNode._id, 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=560');
4651 + }
4652 + meshserver.send({ action: 'meshmessenger', nodeid: decodeURIComponent(currentNode._id) });
4653 + }
4654 +
4655 + function deviceToggleBackground() {
4656 + if (xxdialogMode) return;
4657 + meshserver.send({ action: 'msg', type: 'deskBackground', nodeid: currentNode._id, op: 1 }); // Toggle desktop background image
4658 + }
4659 +
4660 + function deviceUrlFunction() {
4661 + if (xxdialogMode) return;
4662 + setDialogMode(2, "Open pagina op apparaat", 3, deviceUrlFunctionEx, '<input id=d2devurl placeholder="http://server.com" style=width:100%;overflow-y:scroll></input>');
4663 + Q('d2devurl').focus();
4664 + }
4665 +
4666 + function deviceUrlFunctionEx() {
4667 + meshserver.send({ action: 'msg', type: 'openUrl', nodeid: currentNode._id, url: Q('d2devurl').value });
4668 + }
4669 +
4670 + function deviceToastFunction() {
4671 + if (xxdialogMode) return;
4672 + setDialogMode(2, "Apparaatmelding", 3, deviceToastFunctionEx, '<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>');
4673 + Q('d2devToast').focus();
4674 + }
4675 +
4676 + function deviceToastFunctionEx() {
4677 + meshserver.send({ action: 'toast', nodeids: [ currentNode._id ], title: 'MeshCentral', msg: Q('d2devToast').value });
4678 + }
4679 +
4680 + function deviceActionFunction() {
4681 + if (xxdialogMode) return;
4682 + var meshrights = meshes[currentNode.meshid].links[userinfo._id].rights;
4683 + var x = "Selecteer een bewerking die u op dit apparaat wilt uitvoeren." + '<br /><br />';
4684 + var y = '<select id=d2deviceop style=float:right;width:250px>';
4685 + if ((meshrights & 64) != 0) { y += '<option value=100>' + "Wakker worden" + '</option>'; } // Wake-up permission
4686 + if ((meshrights & 8) != 0) { y += '<option value=4>' + "Slaap" + '</option><option value=3>' + "Reset" + '</option><option value=2>' + "Uitzetten" + '</option>'; } // Remote control permission
4687 + if ((currentNode.conn & 16) != 0) { y += '<option value=103>' + "Verzend MQTT bericht" + '</option>'; }
4688 + if (((currentNode.conn & 1) != 0) && ((meshrights & 32768) != 0)) { y += '<option value=104>' + "deinstallatie agent" + '</option>'; }
4689 + y += '</select>';
4690 + x += addHtmlValue("Operatie", y);
4691 + setDialogMode(2, "Apparaatactie", 3, deviceActionFunctionEx, x);
4692 + }
4693 +
4694 + function deviceActionFunctionEx() {
4695 + var op = Q('d2deviceop').value;
4696 + if (op == 100) {
4697 + // Device wake
4698 + meshserver.send({ action: 'wakedevices', nodeids: [currentNode._id] });
4699 + } else if (op == 103) {
4700 + // Send MQTT Message
4701 + p10showSendMqttMsgDialog([currentNode._id]);
4702 + } else if (op == 104) {
4703 + // Uninstall agent
4704 + p10showSendUninstallAgentDialog([currentNode._id]);
4705 + } else {
4706 + // Power operation
4707 + meshserver.send({ action: 'poweraction', nodeids: [ currentNode._id ], actiontype: parseInt(op) });
4708 + }
4709 + }
4710 +
4711 + // Called when MeshCommander needs new credentials or updated credentials.
4712 + function updateAmtCredentials(forceDialog) {
4713 + var node = getNodeFromId(currentNode._id);
4714 + if ((forceDialog == true) || (node.intelamt.user == null) || (node.intelamt.user == '')) {
4715 + editDeviceAmtSettings(currentNode._id, updateAmtCredentialsEx);
4716 + } else {
4717 + Q('p14iframe').contentWindow.connectButtonfunctionEx();
4718 + }
4719 + }
4720 +
4721 + function updateAmtCredentialsEx(button, tag) {
4722 + Q('p14iframe').contentWindow.connectButtonfunctionEx();
4723 + }
4724 +
4725 + // Look to see if we need to update the device timeline
4726 + function updateDeviceTimeline() {
4727 + if ((meshserver.State != 2) || (powerTimelineNode == null) || (powerTimelineUpdate == null) || (currentNode == null)) return;
4728 + if ((powerTimelineNode == powerTimelineReq) && (currentNode._id == powerTimelineNode) && (powerTimelineUpdate < Date.now())) {
4729 + powerTimelineUpdate = null;
4730 + meshserver.send({ action: 'powertimeline', nodeid: currentNode._id });
4731 + meshserver.send({ action: 'lastconnect', nodeid: currentNode._id });
4732 + }
4733 + }
4734 +
4735 + // Draw device power bars. The bars are 766px wide.
4736 + function drawDeviceTimeline() {
4737 + if ((currentNode == null) || (xxcurrentView < 10) || (xxcurrentView > 19)) return;
4738 + var timeline = null, now = Date.now();
4739 + if (currentNode._id == powerTimelineNode) { timeline = powerTimeline; }
4740 +
4741 + // Calculate when the timeline starts
4742 + var d = new Date();
4743 + d.setHours(0, 0, 0, 0);
4744 + d = new Date(d.getTime() - (1000 * 60 * 60 * 24 * 6));
4745 + var timelineStart = d.getTime();
4746 +
4747 + // De-compact the timeline
4748 + var timeline2 = [];
4749 + if (timeline != null && timeline.length > 1) {
4750 + timeline2.push([ 0, timeline[1], timeline[0] ]); // Start, End, Power
4751 + var ct = timeline[1];
4752 + for (var i = 2; i < timeline.length; i += 2) {
4753 + var power = timeline[i], dt = now;
4754 + if (timeline.length > (i + 1)) { dt = timeline[i + 1]; }
4755 + timeline2.push([ ct, ct + dt, power ]); // Start, End, Power
4756 + ct = ct + dt;
4757 + }
4758 + }
4759 +
4760 + // Draw the timeline
4761 + var x = '', count = 1, date = new Date();
4762 + var totalWidth = Q('masthead').offsetWidth - (160 + 9 + 9 + 14); // Compute the total width of the power bar
4763 + date.setHours(0, 0, 0, 0);
4764 + for (var i = 0; i < 7; i++) {
4765 + var datavalue = '', start = date.getTime(), end = start + (1000 * 60 * 60 * 24);
4766 + for (var j in timeline2) {
4767 + var block = timeline2[j];
4768 + if (isTimeBlockInside(start, end, block[0], block[1]) == true) {
4769 + var ts = Math.max(start, block[0]);
4770 + var te = Math.min(Math.min(end, block[1]), now);
4771 + var width = Math.round(((te - ts) * totalWidth) / 86400000);
4772 + if (width > 0) {
4773 + var title = format('{0} from {1} to {2}.', powerStateStrings2[block[2]], printTime(new Date(ts)), printTime(new Date(te)));
4774 + datavalue += '<div class="pwState ' + powerColor(block[2]) + '" title="' + title + '" style="width:' + width + 'px;"></div>';
4775 + }
4776 + }
4777 + }
4778 + x += '<tr class=' + (((count % 2) == 0)?'altBack':'') + '><td><div>&nbsp;' + printDate(date) + '<div></div></div></td><td><div>' + datavalue + '</div></td></tr>';
4779 + ++count;
4780 + date = new Date(date.getTime() - (1000 * 60 * 60 * 24)); // Substract one day
4781 + }
4782 + QH('p10html2', '<table cellpadding=2 cellspacing=0><thead><tr style=><th scope=col style=text-align:center;width:150px>' + "Dag" + '</th><th scope=col style=text-align:center><a download href="devicepowerevents.ashx?id=' + currentNode._id + '" onclick="setDialogMode(0)"><img title=\"' + "Downloaden Power gebeurtenissen" + '\" src="images/link4.png" /></a>' + "7 dagen stroom status" + '</th></tr></thead><tbody>' + x + '</tbody></table>');
4783 + }
4784 +
4785 + // Return a color for the given power state
4786 + function powerColor(x) { if (x < powerColorTable.length) { return powerColorTable[x]; } return 'pwsYellow'; }
4787 +
4788 + // Return true if the time block is visible within the start/end period
4789 + function isTimeBlockInside(start, end, blockStart, blockEnd) {
4790 + if ((blockStart < start) && (blockEnd > end)) return true; // Block is wider than timespan
4791 + if ((blockStart > start) && (blockStart < end)) return true;
4792 + if ((blockEnd > start) && (blockEnd < end)) return true;
4793 + return false;
4794 + }
4795 +
4796 + function addDeviceAttribute(name, value) { return '<tr><td class=style7>' + name + '</td><td class=style9>' + value + '</td></tr>'; }
4797 +
4798 + function editDeviceAmtSettings(nodeid, func, arg) {
4799 + if (xxdialogMode) return;
4800 + var x = '', node = getNodeFromId(nodeid), buttons = 3, meshrights = getNodeRights(nodeid);
4801 + if ((meshrights & 4) == 0) return;
4802 + x += addHtmlValue("Gebruikersnaam", '<input id=dp10username style=width:230px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />');
4803 + x += addHtmlValue("wachtwoord", '<input id=dp10password type=password style=width:230px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />');
4804 + x += addHtmlValue("Veiligheid", '<select id=dp10tls style=width:236px><option value=0>' + "Geen TLS beveiliging" + '</option><option value=1>' + "TLS beveiliging vereist" + '</option></select>');
4805 + if ((node.intelamt.user != null) && (node.intelamt.user != '')) { buttons = 7; }
4806 + setDialogMode(2, "Bewerk Intel® AMT-gegevens", buttons, editDeviceAmtSettingsEx, x, { node: node, func: func, arg: arg });
4807 + if ((node.intelamt.user != null) && (node.intelamt.user != '')) { Q('dp10username').value = node.intelamt.user; } else { Q('dp10username').value = 'admin'; }
4808 + Q('dp10tls').value = node.intelamt.tls;
4809 + validateDeviceAmtSettings();
4810 + }
4811 +
4812 + function validateDeviceAmtSettings() {
4813 + QE('idx_dlgOkButton', passwordcheck(Q('dp10password').value));
4814 + }
4815 +
4816 + function editDeviceAmtSettingsEx(button, tag) {
4817 + if (button == 2) {
4818 + // Delete button pressed, remove credentials
4819 + meshserver.send({ action: 'changedevice', nodeid: tag.node._id, intelamt: { user: '', pass: '' } });
4820 + } else {
4821 + // Change Intel AMT credentials
4822 + var amtuser = Q('dp10username').value;
4823 + if (amtuser == '') amtuser = 'admin';
4824 + var amtpass = Q('dp10password').value;
4825 + if (amtpass == '') amtuser = '';
4826 + meshserver.send({ action: 'changedevice', nodeid: tag.node._id, intelamt: { user: amtuser, pass: amtpass, tls: Q('dp10tls').value } });
4827 + tag.node.intelamt.user = amtuser;
4828 + tag.node.intelamt.tls = Q('dp10tls').value;
4829 + if (tag.func) { setTimeout(function () { tag.func(null, tag.arg); }, 300); }
4830 + }
4831 + }
4832 +
4833 + function p10showSendMqttMsgDialog(nodeids) {
4834 + if (xxdialogMode) return false;
4835 + var x = addHtmlValue("Onderwerp", '<input id=dp2topic style=width:230px maxlength=64 onchange=p10validateSendMqttMsgDialog() onkeyup=p10validateSendMqttMsgDialog(event,1) />');
4836 + x += addHtmlValue("Bericht", '<div style=width:230px;margin:0;padding:0><textarea id=dp2msg maxlength=4096 style=width:100%;height:150px;resize:none onchange=p10validateSendMqttMsgDialog() onkeyup=p10validateSendMqttMsgDialog(event,1)></textarea></div>');
4837 + setDialogMode(2, "Verzend MQTT bericht", 3, p10showSendMqttMsgDialogEx, x, nodeids);
4838 + p10validateSendMqttMsgDialog();
4839 + Q('dp2topic').focus();
4840 + return false;
4841 + }
4842 +
4843 + function p10validateSendMqttMsgDialog() {
4844 + QE('idx_dlgOkButton', (Q('dp2topic').value.length > 0) && (Q('dp2msg').value.length > 0));
4845 + }
4846 +
4847 + function p10showSendMqttMsgDialogEx(b, nodeids) {
4848 + meshserver.send({ action: 'sendmqttmsg', nodeids: nodeids, topic: Q('dp2topic').value, msg: Q('dp2msg').value });
4849 + }
4850 +
4851 + function p10showSendUninstallAgentDialog(nodeids) {
4852 + if (xxdialogMode) return false;
4853 + var x = '';
4854 + if (nodeids.length > 1) { x = format("Weet u zeker dat u de geselecteerde {0} agenten wilt verwijderen?", nodeids.length); } else { x = "Weet u zeker dat u de geselecteerde agent wilt verwijderen?"; }
4855 + x += '<br /><br />';
4856 + if (nodeids.length > 1) { x += "Hiermee worden de apparaten niet van de server verwijderd, maar kunnen de apparaten geen verbinding meer maken met de server. Alle externe toegang tot de apparaten gaat verloren. De apparaten moeten zijn aangesloten om deze opdracht te laten werken."; } else { x += "Hiermee wordt dit apparaat niet van de server verwijderd, maar kan het apparaat geen verbinding meer maken met de server. Alle externe toegang tot het apparaat gaat verloren. Het apparaat moet verbonden zijn om dit commando te laten werken."; }
4857 + x += '<br /><br /><label style=color:red><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />' + "Bevestig" + '</label>';
4858 + setDialogMode(2, "deinstallatie agent", 3, p10showSendUninstallAgentDialogEx, x, nodeids);
4859 + p10validateSendUninstallAgentDialog();
4860 + return false;
4861 + }
4862 +
4863 + function p10validateSendUninstallAgentDialog() { QE('idx_dlgOkButton', Q('p10check').checked); }
4864 + function p10showSendUninstallAgentDialogEx(b, nodeids) { meshserver.send({ action: 'uninstallagent', nodeids: nodeids }); }
4865 +
4866 + function p10showChangeGroupDialog(nodeids) {
4867 + if (xxdialogMode) return false;
4868 + var targetMeshId = null;
4869 + if (nodeids.length == 1) { try { targetMeshId = meshes[getNodeFromId(nodeids[0])]._id; } catch (ex) { } }
4870 +
4871 + // List all available alternative groups
4872 + var y = '<select id=p10newGroup style=width:236px>', count = 0;
4873 + for (var i in meshes) {
4874 + var meshrights = meshes[i].links[userinfo._id].rights;
4875 + if ((meshes[i]._id != targetMeshId) && (meshrights & 4)) { count++; y += '<option value=\'' + meshes[i]._id + '\'>' + meshes[i].name + '</option>'; }
4876 + }
4877 + y += '</select>';
4878 +
4879 + if (count > 0) {
4880 + var x = (nodeids.length == 1) ? ("Selecteer een nieuwe groep voor dit apparaat" + '<br /><br />') : ("Selecteer een nieuwe groep voor geselecteerde apparaten" + '<br /><br />');
4881 + x += addHtmlValue("Nieuwe apparaatgroep", y);
4882 + setDialogMode(2, "verander groep", 3, p10showChangeGroupDialogEx, x, nodeids);
4883 + } else {
4884 + setDialogMode(2, "verander groep", 1, null, "Er bestaat geen andere apparaatgroep van hetzelfde type.");
4885 + }
4886 + return false;
4887 + }
4888 +
4889 + function p10showChangeGroupDialogEx(b, nodeids) {
4890 + meshserver.send({ action: 'changeDeviceMesh', nodeids: nodeids, meshid: Q('p10newGroup').value });
4891 + }
4892 +
4893 + function p10showDeleteNodeDialog(nodeid) {
4894 + if (xxdialogMode) return false;
4895 + var x = format("Weet u zeker dat u apparaat {0} wilt verwijderen?", EscapeHtml(currentNode.name)) + '<br /><br /><label><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />' + "Bevestig" + '</label>';
4896 + setDialogMode(2, "Verwijder apparaat", 3, p10showDeleteNodeDialogEx, x, nodeid);
4897 + p10validateDeleteNodeDialog();
4898 + return false;
4899 + }
4900 +
4901 + function p10validateDeleteNodeDialog() {
4902 + QE('idx_dlgOkButton', Q('p10check').checked);
4903 + }
4904 +
4905 + function p10showDeleteNodeDialogEx(buttons, nodeid) {
4906 + meshserver.send({ action: 'removedevices', nodeids: [ nodeid ] });
4907 + }
4908 +
4909 + function p10clickOnce(nodeid, protocol, port) {
4910 + meshserver.send({ action: 'getcookie', nodeid: nodeid, tcpport: port, tag: 'clickonce', protocol: protocol });
4911 + return false;
4912 + }
4913 +
4914 + // Show current location
4915 + var d2map = null;
4916 + function p10showNodeLocationDialog() {
4917 + if ((xxdialogMode != null) && (xxdialogTag == '@xxmap')) { setDialogMode(0); } else { if (xxdialogMode) return false; }
4918 + var markers = [], types = ['iploc', 'wifiloc', 'gpsloc', 'userloc'], boundingBox = null;
4919 +
4920 + for (var loctype in types) {
4921 + if (currentNode[types[loctype]] != null) {
4922 + var loc = currentNode[types[loctype]].split(','), lat = parseFloat(loc[0]), lon = parseFloat(loc[1]);
4923 + if ((lat < 90) && (lat > -90) && (lon < 180) && (lon > -180)) { // Check valid lat/lon
4924 + var deviceMark = new ol.Feature({ geometry: new ol.geom.Point(ol.proj.fromLonLat([lon, lat])) });
4925 + deviceMark.setStyle(markerStyle(currentNode, parseInt(loctype) + 1));
4926 + markers.push(deviceMark);
4927 +
4928 + if (boundingBox == null) { boundingBox = [ lat, lon, lat, lon, 0 ]; } else { if (lat < boundingBox[0]) { boundingBox[0] = lat; } if (lon < boundingBox[1]) { boundingBox[1] = lon; } if (lat > boundingBox[2]) { boundingBox[2] = lat; } if (lon > boundingBox[3]) { boundingBox[3] = lon; } }
4929 + }
4930 + }
4931 + }
4932 +
4933 + // Setup the device mark layer
4934 + var vectorSource = new ol.source.Vector({ features: markers });
4935 + var vectorLayer = new ol.layer.Vector({ source: vectorSource });
4936 +
4937 + //var x = '<div><a href="https://www.google.com/maps/preview/@' + lat + ',' + lng + ',12z" rel="noreferrer noopener" target=_blank>Open in Google maps</a></div>';
4938 + var x = '<div id=d2map style=width:100%;height:300px></div>';
4939 + setDialogMode(2, "Apparaat locatie", 1, null, x, '@xxmap');
4940 +
4941 + var clng = 0, clat = 0, zoom = 8;
4942 + if (boundingBox != null) {
4943 + var clat = (boundingBox[0] + boundingBox[2]) / 2;
4944 + var clng = (boundingBox[1] + boundingBox[3]) / 2;
4945 + var cscale = Math.max(Math.abs(boundingBox[0] - boundingBox[2]), Math.abs(boundingBox[1] - boundingBox[3]));
4946 + var i = 360, zoom = -2;
4947 + while (i > cscale) { zoom++; i = i / 2; }
4948 + }
4949 +
4950 + if (markers.length == 1) { zoom = 8; }
4951 +
4952 + // Setup the map
4953 + d2map = new ol.Map({
4954 + target: 'd2map',
4955 + interactions: ol.interaction.defaults({dragPan:false, mouseWheelZoom:false}),
4956 + layers: [ new ol.layer.Tile({ source: new ol.source.OSM() }), vectorLayer ],
4957 + view: new ol.View({ center: ol.proj.fromLonLat([clng, clat]), zoom: zoom })
4958 + });
4959 + return false;
4960 + }
4961 +
4962 + // Show network interfaces
4963 + function p10showNodeNetInfoDialog() {
4964 + if (xxdialogMode) return false;
4965 + setDialogMode(2, "Netwerk Interfaces", 1, null, '<div id=d2netinfo>' + "Laden..." + '</div>', 'if' + currentNode._id );
4966 + meshserver.send({ action: 'getnetworkinfo', nodeid: currentNode._id });
4967 + return false;
4968 + }
4969 +
4970 + // Show MeshCentral Router dialog
4971 + function p10showMeshRouterDialog() {
4972 + if (xxdialogMode) return;
4973 + var x = '<div>' + "MeshCentral Router is een Windows tool voor het toewijzen van TCP poorten. U kunt RDP bijvoorbeeld via deze server naar een extern apparaat sturen." + '</div><br />';
4974 + x += addHtmlValue('Win32 Executable', '<a style=cursor:pointer download href="meshagents?meshaction=winrouter" onclick="setDialogMode(0)">MeshCentralRouter.exe</a>');
4975 + setDialogMode(2, "MeshCentral Router", 1, null, x, 'fileDownload');
4976 + }
4977 +
4978 + // Request MQTT login credentials
4979 + function p10showMqttLoginDialog(nodeid) { meshserver.send({ action: 'getmqttlogin', nodeid: nodeid }); }
4980 +
4981 + // Show MeshCmd dialog
4982 + function p10showMeshCmdDialog(mode, nodeid) {
4983 + if (xxdialogMode) return;
4984 + var y = '<select id=aginsSelect onclick=meshCmdOsClick() style=width:236px>';
4985 + y += '<option value=3>' + "Windows (32bit)" + '</option>';
4986 + y += '<option value=4>' + "Windows (64bit)" + '</option>';
4987 + y += '<option value=5>' + "Linux x86 (32bit)" + '</option>';
4988 + y += '<option value=6>' + "Linux x86 (64bit)" + '</option>';
4989 + y += '<option value=16>' + "MacOS (64bit)" + '</option>';
4990 + y += '<option value=25>' + "Linux ARM, Raspberry Pi (32bit)" + '</option>';
4991 + y += '</select>';
4992 +
4993 + var x = '';
4994 + if (mode == 0) { x += '<div>MeshCmd is a command line tool that performs lots of different operations. The action file can optionally be downloaded and edited to provide server information and credentials.<br /><br />'; }
4995 + if (mode == 1) { x += '<div>Download "meshcmd" with an action file to route traffic thru this server to this device. Make sure to edit meshaction.txt and add your account password or make any changes needed.<br /><br />'; }
4996 + x += addHtmlValue('Operating System', y);
4997 + x += addHtmlValue('MeshCmd', '<a id=meshcmddownloadid href="meshagents?meshcmd=3" download></a>');
4998 + if (mode == 0) { x += addHtmlValue('Action File', '<a href="meshagents?meshaction=generic" download>MeshAction (.txt)</a>'); }
4999 + if (mode == 1) { x += addHtmlValue('Action File', '<a href="meshagents?meshaction=route&nodeid=' + nodeid + '" download>MeshAction (.txt)</a>'); }

This file is too large to show in full.

views/translations/default_pt.handlebars
+1 -1
@@ -1469,7 +1469,7 @@
1469 else if ((passRequirements != null) && (typeof passRequirements.reset == 'number')) {
1470 var seconds = (userinfo.passchange) + (passRequirements.reset * 86400) - Math.floor(Date.now() / 1000);
1471 if (seconds < 0) { QH('p2nextPasswordUpdateTime', " - Redefinir no próximo login."); }
1472 - else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format("- Redefinir em {0} minuto {1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
1472 + else if (seconds < 3600) { QH('p2nextPasswordUpdateTime', format(" - Redefinir em {0} minuto {1}.", Math.floor(seconds / 60), addLetterS(Math.floor(seconds / 60)))); }
1473 else if (seconds < 86400) { QH('p2nextPasswordUpdateTime', format(" - Redefinir em {0} hora {1}.", Math.floor(seconds / 3600), addLetterS(Math.floor(seconds / 3600)))); }
1474 else { QH('p2nextPasswordUpdateTime', format(" - Redefinir em {0} dia {1}."), Math.floor(seconds / 86400), addLetterS(Math.floor(seconds / 86400))); }
1475 }
views/translations/download-min_cs.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title1}}} - Download</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>Stažení</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right>{{{rootCertLink}}} &nbsp;<a href=terms>Podmínky &amp; soukromí</a></table></div></div></div>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title1}}} - Download</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>Stažení</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right>{{{rootCertLink}}} &nbsp;<a href=terms>Podmínky &amp; soukromí</a></table></div></div></div>
\ No newline at end of file
views/translations/download-min_fr.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title1}}} - Download</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>Télécharger</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right>{{{rootCertLink}}} &nbsp;<a href=terms>Terms &amp; Privacy</a></table></div></div></div>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title1}}} - Download</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>Télécharger</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right>{{{rootCertLink}}} &nbsp;<a href=terms>Terms &amp; Privacy</a></table></div></div></div>
\ No newline at end of file
views/translations/download-min_ja.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title1}}} - Download</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>ダウンロード</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right>{{{rootCertLink}}} &nbsp;<a href=terms>利用規約とプライバシー</a></table></div></div></div>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title1}}} - Download</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>ダウンロード</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right>{{{rootCertLink}}} &nbsp;<a href=terms>利用規約とプライバシー</a></table></div></div></div>
\ No newline at end of file
views/translations/download-min_nl.handlebars new
+1
@@ -0,0 +1 @@
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title1}}} - Download</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>Download</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right>{{{rootCertLink}}} &nbsp;<a href=terms>Voorwaarden &amp; Privacy</a></table></div></div></div>
\ No newline at end of file
views/translations/download-min_pt.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title1}}} - Download</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>Baixar</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right>{{{rootCertLink}}} &nbsp;<a href=terms>Termos &amp; Privacidade</a></table></div></div></div>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title1}}} - Download</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>Baixar</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right>{{{rootCertLink}}} &nbsp;<a href=terms>Termos &amp; Privacidade</a></table></div></div></div>
\ No newline at end of file
views/translations/download_cs.handlebars
+1 -1
@@ -12,7 +12,7 @@
12 <div id="mastheadx"></div>
13 <div id="masthead" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden">
14 <div style="float:left">{{{titlehtml}}}</div>
15 - <div style="float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px">
15 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px">
16 <strong><font style="font-size:46px;font-family:Arial,Helvetica,sans-serif">{{{title1}}}</font></strong>
17 </div>
18 <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px">
views/translations/download_fr.handlebars
+1 -1
@@ -12,7 +12,7 @@
12 <div id="mastheadx"></div>
13 <div id="masthead" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden">
14 <div style="float:left">{{{titlehtml}}}</div>
15 - <div style="float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px">
15 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px">
16 <strong><font style="font-size:46px;font-family:Arial,Helvetica,sans-serif">{{{title1}}}</font></strong>
17 </div>
18 <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px">
views/translations/download_ja.handlebars
+1 -1
@@ -12,7 +12,7 @@
12 <div id="mastheadx"></div>
13 <div id="masthead" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden">
14 <div style="float:left">{{{titlehtml}}}</div>
15 - <div style="float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px">
15 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px">
16 <strong><font style="font-size:46px;font-family:Arial,Helvetica,sans-serif">{{{title1}}}</font></strong>
17 </div>
18 <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px">
views/translations/download_nl.handlebars new
+42
@@ -0,0 +1,42 @@
1 +<!DOCTYPE html><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head>
2 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 + <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
4 + <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 + <meta name="apple-mobile-web-app-capable" content="yes">
6 + <meta name="format-detection" content="telephone=no">
7 + <link type="text/css" href="/styles/style.css" media="screen" rel="stylesheet" title="CSS">
8 + <title>{{{title1}}} - Download</title>
9 +</head>
10 +<body>
11 + <div id="container" style="max-height:100vh">
12 + <div id="mastheadx"></div>
13 + <div id="masthead" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden">
14 + <div style="float:left">{{{titlehtml}}}</div>
15 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px">
16 + <strong><font style="font-size:46px;font-family:Arial,Helvetica,sans-serif">{{{title1}}}</font></strong>
17 + </div>
18 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px">
19 + <strong><font style="font-size:14px;font-family:Arial,Helvetica,sans-serif">{{{title2}}}</font></strong>
20 + </div>
21 + </div>
22 + <div id="page_content" style="max-height:calc(100vh-138px)">
23 + <div id="column_l">
24 + <h1>Download</h1>
25 + <p style="margin-left:20px">{{{message}}}</p>
26 + <br>
27 + </div>
28 + <div id="footer">
29 + <table cellpadding="0" cellspacing="10" style="width:100%">
30 + <tbody><tr>
31 + <td style="text-align:left"></td>
32 + <td style="text-align:right">
33 + {{{rootCertLink}}}
34 + &nbsp;<a href="terms">Voorwaarden &amp; Privacy</a>
35 + </td>
36 + </tr>
37 + </tbody></table>
38 + </div>
39 + </div>
40 + </div>
41 +
42 +</body></html>
\ No newline at end of file
views/translations/download_pt.handlebars
+1 -1
@@ -12,7 +12,7 @@
12 <div id="mastheadx"></div>
13 <div id="masthead" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden">
14 <div style="float:left">{{{titlehtml}}}</div>
15 - <div style="float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px">
15 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px">
16 <strong><font style="font-size:46px;font-family:Arial,Helvetica,sans-serif">{{{title1}}}</font></strong>
17 </div>
18 <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px">
views/translations/error404-min_cs.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Výběr rozhraní uživatele"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Rozhraní levé lišty"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Rozhraní horní lišty"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Rozhraní s pevnou šířkou"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Přepnout na noční mód"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><div style=text-align:center;padding-top:30px;font-size:200px;font-family:Arial;color:#bbb><b>404</b></div><div style=text-align:center;font-size:20px;font-family:Arial;color:#999>Tato stránka neexistuje</div><div style=text-align:center;padding-top:20px;font-size:20px;font-family:Arial;color:#999><a href=/ style=text-decoration:none><b>Zpět na hlavní stránku</b></a></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Zpět</a></table></div></div><script>"use strict";var uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),terms="{{{terms}}}";function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}""!=terms&&QH("column_l",decodeURIComponent(terms)),QV("column_l",!0),userInterfaceSelectMenu()</script>
\ No newline at end of file
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:16px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Výběr rozhraní uživatele"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Rozhraní levé lišty"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Rozhraní horní lišty"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Rozhraní s pevnou šířkou"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Přepnout na noční mód"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><div style=text-align:center;padding-top:30px;font-size:200px;font-family:Arial;color:#bbb><b>404</b></div><div style=text-align:center;font-size:20px;font-family:Arial;color:#999>Tato stránka neexistuje</div><div style=text-align:center;padding-top:20px;font-size:20px;font-family:Arial;color:#999><a href=/ style=text-decoration:none><b>Zpět na hlavní stránku</b></a></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Zpět</a></table></div></div><script>"use strict";var uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),terms="{{{terms}}}";function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}""!=terms&&QH("column_l",decodeURIComponent(terms)),QV("column_l",!0),userInterfaceSelectMenu()</script>
\ No newline at end of file
views/translations/error404-min_fr.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface à largeur fixe"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Basculer mode nuit"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><div style=text-align:center;padding-top:30px;font-size:200px;font-family:Arial;color:#bbb><b>404</b></div><div style=text-align:center;font-size:20px;font-family:Arial;color:#999>This page does not exist</div><div style=text-align:center;padding-top:20px;font-size:20px;font-family:Arial;color:#999><a href=/ style=text-decoration:none><b>Aller sur le site principal</b></a></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Retour</a></table></div></div><script>"use strict";var uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),terms="{{{terms}}}";function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}""!=terms&&QH("column_l",decodeURIComponent(terms)),QV("column_l",!0),userInterfaceSelectMenu()</script>
\ No newline at end of file
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:16px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface à largeur fixe"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Basculer mode nuit"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><div style=text-align:center;padding-top:30px;font-size:200px;font-family:Arial;color:#bbb><b>404</b></div><div style=text-align:center;font-size:20px;font-family:Arial;color:#999>This page does not exist</div><div style=text-align:center;padding-top:20px;font-size:20px;font-family:Arial;color:#999><a href=/ style=text-decoration:none><b>Aller sur le site principal</b></a></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Retour</a></table></div></div><script>"use strict";var uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),terms="{{{terms}}}";function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}""!=terms&&QH("column_l",decodeURIComponent(terms)),QV("column_l",!0),userInterfaceSelectMenu()</script>
\ No newline at end of file
views/translations/error404-min_ja.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title=ユーザーインターフェイスの選択 onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title=左バーインターフェイス><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title=トップバーインターフェース><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title=固定幅インターフェイス><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title=ナイトモードを切り替える><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><div style=text-align:center;padding-top:30px;font-size:200px;font-family:Arial;color:#bbb><b>404</b></div><div style=text-align:center;font-size:20px;font-family:Arial;color:#999>このページは存在しません</div><div style=text-align:center;padding-top:20px;font-size:20px;font-family:Arial;color:#999><a href=/ style=text-decoration:none><b>メインサイトに行く</b></a></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >バック</a></table></div></div><script>"use strict";var uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),terms="{{{terms}}}";function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}""!=terms&&QH("column_l",decodeURIComponent(terms)),QV("column_l",!0),userInterfaceSelectMenu()</script>
\ No newline at end of file
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:16px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title=ユーザーインターフェイスの選択 onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title=左バーインターフェイス><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title=トップバーインターフェース><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title=固定幅インターフェイス><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title=ナイトモードを切り替える><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><div style=text-align:center;padding-top:30px;font-size:200px;font-family:Arial;color:#bbb><b>404</b></div><div style=text-align:center;font-size:20px;font-family:Arial;color:#999>このページは存在しません</div><div style=text-align:center;padding-top:20px;font-size:20px;font-family:Arial;color:#999><a href=/ style=text-decoration:none><b>メインサイトに行く</b></a></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >バック</a></table></div></div><script>"use strict";var uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),terms="{{{terms}}}";function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}""!=terms&&QH("column_l",decodeURIComponent(terms)),QV("column_l",!0),userInterfaceSelectMenu()</script>
\ No newline at end of file
views/translations/error404-min_nl.handlebars new
+1
@@ -0,0 +1 @@
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:16px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Selectie gebruikersinterface"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Linkerbalk interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Boven werkbalk interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface met vaste breedte"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Wissel nachtmodus"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><div style=text-align:center;padding-top:30px;font-size:200px;font-family:Arial;color:#bbb><b>404</b></div><div style=text-align:center;font-size:20px;font-family:Arial;color:#999>This page does not exist</div><div style=text-align:center;padding-top:20px;font-size:20px;font-family:Arial;color:#999><a href=/ style=text-decoration:none><b>Ga naar hoofdsite</b></a></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Terug</a></table></div></div><script>"use strict";var uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),terms="{{{terms}}}";function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}""!=terms&&QH("column_l",decodeURIComponent(terms)),QV("column_l",!0),userInterfaceSelectMenu()</script>
\ No newline at end of file
views/translations/error404-min_pt.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Seleção da interface do usuário"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Interface da barra esquerda"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Interface da barra superior"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface de largura fixa"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Alternar modo noturno"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><div style=text-align:center;padding-top:30px;font-size:200px;font-family:Arial;color:#bbb><b>404</b></div><div style=text-align:center;font-size:20px;font-family:Arial;color:#999>Esta página não existe</div><div style=text-align:center;padding-top:20px;font-size:20px;font-family:Arial;color:#999><a href=/ style=text-decoration:none><b>Ir para o site principal</b></a></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Voltar</a></table></div></div><script>"use strict";var uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),terms="{{{terms}}}";function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}""!=terms&&QH("column_l",decodeURIComponent(terms)),QV("column_l",!0),userInterfaceSelectMenu()</script>
\ No newline at end of file
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}}</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:16px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Seleção da interface do usuário"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Interface da barra esquerda"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Interface da barra superior"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface de largura fixa"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Alternar modo noturno"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><div style=text-align:center;padding-top:30px;font-size:200px;font-family:Arial;color:#bbb><b>404</b></div><div style=text-align:center;font-size:20px;font-family:Arial;color:#999>Esta página não existe</div><div style=text-align:center;padding-top:20px;font-size:20px;font-family:Arial;color:#999><a href=/ style=text-decoration:none><b>Ir para o site principal</b></a></div></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Voltar</a></table></div></div><script>"use strict";var uiMode=parseInt(getstore("uiMode",1)),webPageStackMenu=!1,webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),terms="{{{terms}}}";function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel"),Q("uiViewButton4").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,webPageStackMenu=!0,toggleFullScreen(0),toggleStackMenu(0),QC("column_l").add("room4submenu")}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function toggleFullScreen(e){1===e&&putstore("webPageFullScreen",webPageFullScreen=!webPageFullScreen);0==webPageFullScreen?(QC("body").remove("menu_stack"),QC("body").remove("fullscreen"),QC("body").remove("arg_hide")):QC("body").add("fullscreen"),QV("body",!0)}function toggleStackMenu(e){1==webPageFullScreen&&(1===e&&putstore("webPageStackMenu",webPageStackMenu=!webPageStackMenu),0==webPageStackMenu?QC("body").remove("menu_stack"):QC("body").add("menu_stack"))}function putstore(e,t){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,t)}catch(e){}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var o=localStorage.getItem(e);return null==o||null==o?t:o}catch(e){return t}}""!=terms&&QH("column_l",decodeURIComponent(terms)),QV("column_l",!0),userInterfaceSelectMenu()</script>
\ No newline at end of file
views/translations/error404-mobile-min_nl.handlebars new
+1
@@ -0,0 +1 @@
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><title>{{{title}}}</title><style type=text/css>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;max-width:100%;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:4px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:7px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%><div id=column_l style=padding-left:10px;padding-right:10px><div style=text-align:center;padding-top:30px;font-size:100px;font-family:Arial;color:#bbb><b>404</b></div><div style=text-align:center;font-size:16px;font-family:Arial;color:#999>This page does not exist</div><div style=text-align:center;padding-top:16px;font-size:20px;font-family:Arial;color:#999><a href=/ style=text-decoration:none><b>Ga naar hoofdsite</b></a></div></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table cellpadding=0 cellspacing=6 style=width:100%><tr><td style=text-align:left;color:#fff>{{{footer}}}<td style=text-align:right>{{{rootCertLink}}}&nbsp;<a href=/ >Terug</a></table></div></div>
\ No newline at end of file
views/translations/error404-mobile_nl.handlebars new
+54
@@ -0,0 +1,54 @@
1 +<!DOCTYPE html><html><head>
2 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 + <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
4 + <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 + <meta name="apple-mobile-web-app-capable" content="yes">
6 + <meta name="format-detection" content="telephone=no">
7 + <title>{{{title}}}</title>
8 + <style type="text/css">
9 + a {
10 + color: #036;
11 + text-decoration: underline;
12 + }
13 +
14 + #footer a {
15 + color: #fff;
16 + text-decoration: underline;
17 + }
18 +
19 + #footer a:hover {
20 + color: #fff;
21 + text-decoration: none;
22 + }
23 + </style>
24 +</head>
25 +<body onload="if (typeof(startup) !== 'undefined') startup();" style="overflow-y:hidden;max-width:100%;margin:0;padding:0;border:0;color:black;font-size:13px;font-family:\'Trebuchet MS\', Arial, Helvetica, sans-serif">
26 + <div id="container">
27 + <!-- Begin Masthead -->
28 + <div id="masthead" style="background:url(logo.png) 0px 0px;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden">
29 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:4px">
30 + <strong><font style="font-size:36px;font-family:Arial,Helvetica,sans-serif">{{{title}}}</font></strong>
31 + </div>
32 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:7px">
33 + <strong><font style="font-size:12px;font-family:Arial,Helvetica,sans-serif">{{{title2}}}</font></strong>
34 + </div>
35 + </div>
36 + <div id="page_content" style="overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%">
37 + <div id="column_l" style="padding-left:10px;padding-right:10px">
38 + <div style="text-align:center;padding-top:30px;font-size:100px;font-family:Arial;color:#bbb"><b>404</b></div>
39 + <div style="text-align:center;font-size:16px;font-family:Arial;color:#999">This page does not exist</div>
40 + <div style="text-align:center;padding-top:16px;font-size:20px;font-family:Arial;color:#999"><a href="/" style="text-decoration:none"><b>Ga naar hoofdsite</b></a></div>
41 + </div>
42 + </div>
43 + <div id="footer" style="height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0px">
44 + <table cellpadding="0" cellspacing="6" style="width:100%">
45 + <tbody><tr>
46 + <td style="text-align:left;color:white">{{{footer}}}</td>
47 + <td style="text-align:right">{{{rootCertLink}}}&nbsp;<a href="/">Terug</a></td>
48 + </tr>
49 + </tbody></table>
50 + </div>
51 + </div>
52 +
53 +
54 +</body></html>
\ No newline at end of file
views/translations/error404_cs.handlebars
+1 -1
@@ -13,7 +13,7 @@
13 <!-- Begin Masthead -->
14 <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
15 <div style="float:left">{{{titlehtml}}}</div>
16 - <div style="float:left; height: 66px; color:#c8c8c8; padding-left:20px; padding-top:8px">
16 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:16px; padding-top:7px">
17 <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
18 </div>
19 <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">
views/translations/error404_fr.handlebars
+1 -1
@@ -13,7 +13,7 @@
13 <!-- Begin Masthead -->
14 <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
15 <div style="float:left">{{{titlehtml}}}</div>
16 - <div style="float:left; height: 66px; color:#c8c8c8; padding-left:20px; padding-top:8px">
16 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:16px; padding-top:7px">
17 <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
18 </div>
19 <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">
views/translations/error404_ja.handlebars
+1 -1
@@ -13,7 +13,7 @@
13 <!-- Begin Masthead -->
14 <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
15 <div style="float:left">{{{titlehtml}}}</div>
16 - <div style="float:left; height: 66px; color:#c8c8c8; padding-left:20px; padding-top:8px">
16 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:16px; padding-top:7px">
17 <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
18 </div>
19 <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">
views/translations/error404_nl.handlebars new
+132
@@ -0,0 +1,132 @@
1 +<!DOCTYPE html><html><head>
2 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 + <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
4 + <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 + <meta name="apple-mobile-web-app-capable" content="yes">
6 + <meta name="format-detection" content="telephone=no">
7 + <link type="text/css" href="styles/style.css" media="screen" rel="stylesheet" title="CSS">
8 + <script type="text/javascript" src="scripts/common-0.0.1.js"></script>
9 + <title>{{{title}}}</title>
10 +</head>
11 +<body id="body" onload="if (typeof(startup) !== 'undefined') startup();" style="display:none;overflow:hidden">
12 + <div id="container">
13 + <!-- Begin Masthead -->
14 + <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
15 + <div style="float:left">{{{titlehtml}}}</div>
16 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:16px; padding-top:7px">
17 + <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
18 + </div>
19 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">
20 + <strong><font style="font-size:14px; font-family: Arial, Helvetica, sans-serif;">{{{title2}}}</font></strong>
21 + </div>
22 + </div>
23 + <div id="page_leftbar">
24 + <div style="height:16px"></div>
25 + </div>
26 + <div id="topbar" class="noselect style3" style="height:24px;position:relative">
27 + <div id="uiMenuButton" title="Selectie gebruikersinterface" onclick="showUserInterfaceSelectMenu()">
28 + ♦
29 + <div id="uiMenu" style="display:none">
30 + <div id="uiViewButton1" class="uiSelector" onclick="userInterfaceSelectMenu(1)" title="Linkerbalk interface"><div class="uiSelector1"></div></div>
31 + <div id="uiViewButton2" class="uiSelector" onclick="userInterfaceSelectMenu(2)" title="Boven werkbalk interface"><div class="uiSelector2"></div></div>
32 + <div id="uiViewButton3" class="uiSelector" onclick="userInterfaceSelectMenu(3)" title="Interface met vaste breedte"><div class="uiSelector3"></div></div>
33 + <div id="uiViewButton4" class="uiSelector" onclick="toggleNightMode()" title="Wissel nachtmodus"><div class="uiSelector4"></div></div>
34 + </div>
35 + </div>
36 + </div>
37 + <div id="column_l" style="max-height:calc(100vh - 135px);overflow-y:auto">
38 + <div style="text-align:center;padding-top:30px;font-size:200px;font-family:Arial;color:#bbb"><b>404</b></div>
39 + <div style="text-align:center;font-size:20px;font-family:Arial;color:#999">This page does not exist</div>
40 + <div style="text-align:center;padding-top:20px;font-size:20px;font-family:Arial;color:#999"><a href="/" style="text-decoration:none"><b>Ga naar hoofdsite</b></a></div>
41 + </div>
42 + <div id="footer">
43 + <table cellpadding="0" cellspacing="10" style="width: 100%">
44 + <tbody><tr>
45 + <td style="text-align:left"></td>
46 + <td style="text-align:right"><a href="/">Terug</a></td>
47 + </tr>
48 + </tbody></table>
49 + </div>
50 + </div>
51 + <script>
52 + 'use strict';
53 + var uiMode = parseInt(getstore('uiMode', 1));
54 + var webPageStackMenu = false;
55 + var webPageFullScreen = true;
56 + var nightMode = (getstore('_nightMode', '0') == '1');
57 +
58 + var terms = '{{{terms}}}';
59 + if (terms != '') { QH('column_l', decodeURIComponent(terms)); }
60 + QV('column_l', true);
61 + userInterfaceSelectMenu();
62 +
63 + // Toggle user interface menu
64 + function showUserInterfaceSelectMenu() {
65 + Q('uiViewButton1').classList.remove('uiSelectorSel');
66 + Q('uiViewButton2').classList.remove('uiSelectorSel');
67 + Q('uiViewButton3').classList.remove('uiSelectorSel');
68 + Q('uiViewButton4').classList.remove('uiSelectorSel');
69 + try { Q('uiViewButton' + uiMode).classList.add('uiSelectorSel'); } catch (ex) { }
70 + QV('uiMenu', (QS('uiMenu').display == 'none'));
71 + if (nightMode) { Q('uiViewButton4').classList.add('uiSelectorSel'); }
72 + }
73 +
74 + function userInterfaceSelectMenu(s) {
75 + if (s) { uiMode = s; putstore('uiMode', uiMode); }
76 + webPageFullScreen = (uiMode < 3);
77 + webPageStackMenu = true;//(uiMode > 1);
78 + toggleFullScreen(0);
79 + toggleStackMenu(0);
80 + QC('column_l').add('room4submenu');
81 + }
82 +
83 + function toggleNightMode() {
84 + nightMode = !nightMode;
85 + if (nightMode) { QC('body').add('night'); } else { QC('body').remove('night'); }
86 + putstore('_nightMode', nightMode ? '1' : '0');
87 + }
88 +
89 + // Toggle the web page to full screen
90 + function toggleFullScreen(toggle) {
91 + if (toggle === 1) { webPageFullScreen = !webPageFullScreen; putstore('webPageFullScreen', webPageFullScreen); }
92 + var hide = 0;
93 + //if (args.hide) { hide = parseInt(args.hide); }
94 + if (webPageFullScreen == false) {
95 + QC('body').remove('menu_stack');
96 + QC('body').remove('fullscreen');
97 + QC('body').remove('arg_hide');
98 + //if (xxcurrentView >= 10) QC('column_l').add('room4submenu');
99 + //QV('UserDummyMenuSpan', false);
100 + //QV('page_leftbar', false);
101 + } else {
102 + QC('body').add('fullscreen');
103 + if (hide & 16) QC('body').add('arg_hide'); // This is replacement for QV('page_leftbar', !(hide & 16));
104 + //QV('UserDummyMenuSpan', (xxcurrentView < 10) && webPageFullScreen);
105 + //QV('page_leftbar', true);
106 + }
107 + QV('body', true);
108 + }
109 +
110 + // If FullScreen, toggle menu to be horisontal or vertical
111 + function toggleStackMenu(toggle) {
112 + if (webPageFullScreen == true) {
113 + if (toggle === 1) {
114 + webPageStackMenu = !webPageStackMenu;
115 + putstore('webPageStackMenu', webPageStackMenu);
116 + }
117 + if (webPageStackMenu == false) {
118 + QC('body').remove('menu_stack');
119 + } else {
120 + QC('body').add('menu_stack');
121 + //if (xxcurrentView >= 10) QC('column_l').remove('room4submenu');
122 + }
123 + }
124 + }
125 +
126 + function putstore(name, val) { try { if (typeof (localStorage) === 'undefined') return; localStorage.setItem(name, val); } catch (e) { } }
127 + function getstore(name, val) { try { if (typeof (localStorage) === 'undefined') return val; var v = localStorage.getItem(name); if ((v == null) || (v == null)) return val; return v; } catch (e) { return val; } }
128 +
129 + </script>
130 +
131 +
132 +</body></html>
\ No newline at end of file
views/translations/error404_pt.handlebars
+1 -1
@@ -13,7 +13,7 @@
13 <!-- Begin Masthead -->
14 <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
15 <div style="float:left">{{{titlehtml}}}</div>
16 - <div style="float:left; height: 66px; color:#c8c8c8; padding-left:20px; padding-top:8px">
16 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:16px; padding-top:7px">
17 <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
18 </div>
19 <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">
views/translations/login-min_nl.handlebars new
+1
@@ -0,0 +1 @@
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><link keeplink=1 type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script keeplink=1 src=scripts/u2f-api.js></script><title>{{{title}}} - Login</title><body id=body onload='"undefined"!=typeof startup&&startup()'class="arg_hide login"><div id=container><div id=masthead><div style=float:left>{{{titlehtml}}}</div><div class=title>{{{title1}}}</div><div class=title2>{{{title2}}}</div></div><div id=topbar class="noselect style3"style=height:24px><div id=uiMenuButton title="Selectie gebruikersinterface"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Linkerbalk interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Boven werkbalk interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface met vaste breedte"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Wissel nachtmodus"><div class=uiSelector4></div></div></div></div></div><div id=column_l><h1>Welkom</h1><div id=welcomeText style=display:none>Maak overal ter wereld verbinding met uw thuis- of kantoorapparatuur via MeshCentral, de realtime, open source externe monitoring- en managementwebsite. U moet een beheeragent op uw computers downloaden en installeren. Na installatie verschijnen computers in het gedeelte "Mijn apparaten" van deze website en kunt u ze volgen en de controle over hen nemen.</div><table id=centralTable><tr><td id=welcomeimage><picture><img alt=""src=welcome.jpg style=border-radius:20px></picture><td id=logincell><div id=loginpanel style=display:none><form method=post><input type=hidden name=action value=login><div id=message1></div><div><b>Inloggen</b></div><table><tr><td id=loginusername align=right width=100>Gebruikersnaam:<td><input id=username maxlength=64 name=username onchange=validateLogin(1) onkeyup=validateLogin(1,event)><tr><td align=right>Wachtwoord:<td><input id=password type=password maxlength=256 name=password autocomplete=off onchange=validateLogin(2) onkeyup=validateLogin(2,event)><tr><td><div id=showPassHintLink style=display:none><a onclick="return showPassHint(event)"href=# style=cursor:pointer>Toon hint</a></div><td align=right><input id=loginButton type=submit value=Inloggen disabled></table><div id=hrAccountDiv style=display:none><hr></div><div id=resetAccountDiv style=display:none;padding:2px><span id=resetAccountSpan>Gebruikersnaam / wachtwoord vergeten?</span> <a onclick="return xgo(3,event)"href=# style=cursor:pointer>Account opnieuw instellen</a>.</div><div id=newAccountDiv style=display:none;padding:2px>Heb je nog geen account? <a onclick="return xgo(2,event)"href=# style=cursor:pointer>Creëer er een</a>.</div><input id=loginformargs name=urlargs type=hidden></form></div><div id=createpanel style=display:none;position:relative><form method=post><input type=hidden name=action value=createaccount><div id=message2></div><div><b>Gebruikersaccount aanmaken</b></div><div id=passwordPolicyCallout style=display:none></div><table><tr id=nuUserRow><td id=nuUser align=right width=100>Gebruikersnaam:<td><input id=ausername name=username onchange=validateCreate(1) maxlength=64 onkeydown=haltReturn(event) onkeyup=validateCreate(1,event)><tr><td id=nuEmail align=right width=100>Email:<td><input id=aemail name=email onchange=validateCreate(2) maxlength=256 onkeydown=haltReturn(event) onkeyup=validateCreate(2,event)><tr><td id=nuPass1 align=right>Wachtwoord:<td><input id=apassword1 type=password name=password1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(3,event) onkeyup=validateCreate(3,event)><tr><td id=nuPass2 align=right>Wachtwoord:<td><input id=apassword2 type=password name=password2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(4,event) onkeyup=validateCreate(4,event)><tr id=createPanelHint style=display:none><td id=nuHint align=right>wachtwoord hint:<td><input id=apasswordhint name=apasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(5,event) onkeyup=validateCreate(5,event)><tr id=newAccountPass title="Voer het token voor het maken van een account in"><td id=nuToken align=right>Token aanmaken:<td><input id=anewaccountpass type=password name=anewaccountpass autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(6,event) onkeyup=validateCreate(6,event)><tr><td colspan=2><div style=float:right><input id=createButton type=submit value="Account aanmaken"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Terug naar inloggen</a> <input id=createformargs name=urlargs type=hidden></form></div><div id=resetpanel style=display:none><form method=post><input type=hidden name=action value=resetaccount><div id=message3></div><div><b>Gebruikersaccount resetten</b></div><table><tr><td align=right width=100>Email:<td><input id=remail name=email maxlength=256 onchange=validateReset() onkeyup=validateReset(event)><tr><td colspan=2><div style=float:right><input id=eresetButton type=submit value="Account opnieuw instellen"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Terug naar inloggen</a> <input id=resetformargs name=urlargs type=hidden></form></div><div id=tokenpanel style=display:none><form method=post autocomplete=off><input type=hidden name=action value=tokenlogin> <input type=hidden name=hwstate value={{{hwstate}}}><div id=message4></div><table><tr><td align=right width=100>Inlog token:<td><input id=tokenInput name=token maxlength=50 onchange=checkToken(event) onpaste=resetCheckToken(event) onkeyup=checkToken(event) onkeydown=checkToken(event)><br><input id=hwtokenInput name=hwtoken style=display:none><tr><td colspan=2 style=align-content:center><label><input id=tokenInputRemember name=remembertoken type=checkbox>Onthoud dit apparaat gedurende 30 dagen.</label><tr><td colspan=2><div style=float:right><input id=tokenOkButton type=submit value=Inloggen disabled></div><div style=float:right><input style=display:none;float:right id=securityKeyButton type=button value="Gebruik beveiligingssleutel"onclick=useSecurityKey()></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Terug naar inloggen</a> <input id=tokenformargs name=urlargs type=hidden></form></div><div id=resettokenpanel style=display:none><form method=post><input type=hidden name=action value=resetaccount><div id=message5></div><table><tr><td align=right width=100>Inlog token:<td><input id=resetTokenInput name=token maxlength=50 onchange=resetCheckToken(event) onkeyup=resetCheckToken(event) onkeydown=resetCheckToken(event)> <input id=resetHwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=resetTokenOkButton type=submit value=Inloggen disabled></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Terug naar inloggen</a> <input id=resettokenformargs name=urlargs type=hidden></form></div><div id=resetpasswordpanel style=display:none;position:relative><form method=post><input type=hidden name=action value=resetpassword><div id=message6></div><div id=rpasswordPolicyCallout style=display:none></div><table><tr><td id=rnuPass1 width=100 align=right>Wachtwoord:<td><input id=rapassword1 type=password name=rpassword1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(3,event) onkeyup=validatePassReset(3,event)><tr><td id=rnuPass2 align=right>Wachtwoord:<td><input id=rapassword2 type=password name=rpassword2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(4,event) onkeyup=validatePassReset(4,event)><tr id=resetpasswordpanelHint style=display:none><td id=rnuHint align=right>wachtwoord hint:<td><input id=rapasswordhint name=rpasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(5,event) onkeyup=validatePassReset(5,event)><tr><td colspan=2><div style=float:right><input id=resetPassButton type=submit value="Reset wachtwoord"disabled></div><div id=rpassWarning style=padding-top:6px></div></table><hr><a onclick="return xgo(1,event)"href=# style=cursor:pointer>Terug naar inloggen</a> <input id=resetpasswordformargs name=urlargs type=hidden></form></div></table><br></div><div id=footer><div class=footer1>{{{footer}}}</div><div class=footer2>{{{rootCertLink}}} &nbsp;<a href=terms>Voorwaarden &amp; Privacy</a></div></div></div><div id=dialog style=display:none><div id=dialogHeader><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Afbreken onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=Oke onclick=dialogclose(1)></div></div><script>"use strict";var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,passhint="{{{passhint}}}",loginMode="{{{loginmode}}}",newAccount="{{{newAccount}}}",newAccountPass=parseInt("{{{newAccountPass}}}"),emailCheck=!1,passRequirements="{{{passRequirements}}}",hardwareKeyChallenge=decodeURIComponent("{{{hkey}}}"),passRequirementsEx=null!=(passRequirements=""!=passRequirements?JSON.parse(decodeURIComponent(passRequirements)):{}).min||null!=passRequirements.max||null!=passRequirements.upper||null!=passRequirements.lower||null!=passRequirements.numeric||null!=passRequirements.nonalpha,features=parseInt("{{{features}}}"),welcomeText=decodeURIComponent("{{{welcometext}}}"),currentpanel=0,uiMode=parseInt(getstore("uiMode","1")),webPageFullScreen=!0,nightMode="1"==getstore("_nightMode","0"),publicKeyCredentialRequestOptions=null,messageid=parseInt("{{{messageid}}}"),okmessages=["","Wacht even, reset e-mail verzonden."],failmessages=["Kan geen account maken.","Gebruikersaccount limiet bereikt.","Bestaand account met dit e-mailadres.","Ongeldig token voor het maken van een account.","Gebruikersnaam bestaal al.","Wachtwoord geweigerd, gebruik een ander.","Ongeldige e-mail.","Gebruikersaccount niet gevonden","Ongeldig token, probeer het opnieuw.","Kan geen e-mail verzenden.","Gebruikersaccount vergrendeld","Toegang geweigerd.","Inloggen mislukt, controleer gebruikersnaam en wachtwoord.","Wachtwoordwijziging aangevraagd.","IP-adres geblokkeerd, probeer het later opnieuw."];if(0<messageid){var msg="";if(messageid<100&&messageid<okmessages.length?msg=okmessages[messageid]:100<=messageid&&messageid-100<failmessages.length&&(msg=failmessages[messageid-100]),""!=msg){msg=100<=messageid?'<span class="msg error"><b style=color:#8C001A>'+msg+"<b></span><br /><br />":'<span class="msg success"><b>'+msg+"</b></span><br /><br />";for(var i=1;i<7;i++)QH("message"+i,msg)}}if(0<window.location.href.indexOf("?")){var urlargs=window.location.href.substring(window.location.href.indexOf("?"));Q("loginformargs").value=urlargs,Q("createformargs").value=urlargs,Q("resetformargs").value=urlargs,Q("tokenformargs").value=urlargs,Q("resettokenformargs").value=urlargs,Q("resetpasswordformargs").value=urlargs}function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(2097152&features&&(QH("loginusername","Email:"),QH("resetAccountSpan","Wachtwoord vergeten?"),QV("nuUserRow",!1)),nightMode&&QC("body").add("night"),QV("createPanelHint",!0===passRequirements.hint),QV("resetpasswordpanelHint",!0===passRequirements.hint),welcomeText&&QH("welcomeText",welcomeText),QH("welcomeText",addTextLink("MeshCentral",Q("welcomeText").innerHTML,"http://www.meshcommander.com/meshcentral2")),QV("welcomeText",!0),(window.onresize=center)(),validateLogin(),validateCreate(),0!=loginMode.length?go(parseInt(loginMode)):go(1),QV("newAccountDiv","1"===newAccount||"true"===newAccount),null!=passhint&&0<passhint.length&&QV("showPassHintLink",!0),QV("newAccountPass",1==newAccountPass),QV("resetAccountDiv",1==emailCheck),QV("hrAccountDiv",1==emailCheck||1==newAccountPass),"4"==loginMode){try{hardwareKeyChallenge=0<hardwareKeyChallenge.length?JSON.parse(hardwareKeyChallenge):null}catch(e){hardwareKeyChallenge=null}QV("securityKeyButton",null!=hardwareKeyChallenge&&"webAuthn"==hardwareKeyChallenge.type)}if("5"==loginMode){try{hardwareKeyChallenge=0<hardwareKeyChallenge.length?JSON.parse(hardwareKeyChallenge):null}catch(e){hardwareKeyChallenge=null}if(null!=hardwareKeyChallenge&&"webAuthn"==hardwareKeyChallenge.type){"string"==typeof hardwareKeyChallenge.challenge&&(hardwareKeyChallenge.challenge=Uint8Array.from(atob(hardwareKeyChallenge.challenge),function(e){return e.charCodeAt(0)}).buffer),publicKeyCredentialRequestOptions={challenge:hardwareKeyChallenge.challenge,allowCredentials:[],timeout:hardwareKeyChallenge.timeout};for(var a=0;a<hardwareKeyChallenge.keyIds.length;a++)publicKeyCredentialRequestOptions.allowCredentials.push({id:Uint8Array.from(atob(hardwareKeyChallenge.keyIds[a]),function(e){return e.charCodeAt(0)}),type:"public-key",transports:["usb","ble","nfc"]});navigator.credentials.get({publicKey:publicKeyCredentialRequestOptions}).then(function(e){var a={id:btoa(String.fromCharCode.apply(null,new Uint8Array(e.rawId))),clientDataJSON:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.clientDataJSON))),userHandle:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.userHandle))),signature:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.signature))),authenticatorData:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.authenticatorData)))};Q("resetHwtokenInput").value=JSON.stringify(a),QE("resetTokenOkButton",!0),Q("resetTokenOkButton").click()},function(e){console.log("credentials-get error",e)})}}userInterfaceSelectMenu()}function useSecurityKey(){if(null!=hardwareKeyChallenge&&"webAuthn"==hardwareKeyChallenge.type){"string"==typeof hardwareKeyChallenge.challenge&&(hardwareKeyChallenge.challenge=Uint8Array.from(atob(hardwareKeyChallenge.challenge),function(e){return e.charCodeAt(0)}).buffer),publicKeyCredentialRequestOptions={challenge:hardwareKeyChallenge.challenge,allowCredentials:[],timeout:hardwareKeyChallenge.timeout};for(var e=0;e<hardwareKeyChallenge.keyIds.length;e++)publicKeyCredentialRequestOptions.allowCredentials.push({id:Uint8Array.from(atob(hardwareKeyChallenge.keyIds[e]),function(e){return e.charCodeAt(0)}),type:"public-key",transports:["usb","ble","nfc"]});navigator.credentials.get({publicKey:publicKeyCredentialRequestOptions}).then(function(e){var a={id:btoa(String.fromCharCode.apply(null,new Uint8Array(e.rawId))),clientDataJSON:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.clientDataJSON))),userHandle:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.userHandle))),signature:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.signature))),authenticatorData:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.authenticatorData)))};Q("hwtokenInput").value=JSON.stringify(a),QE("tokenOkButton",!0),Q("tokenOkButton").click()},function(e){console.log("credentials-get error",e)})}}function showPassHint(e){return messagebox("wachtwoord hint",passhint),haltEvent(e),!1}function xgo(e,a){return QV("message1",!1),QV("message2",!1),QV("message3",!1),QV("message4",!1),QV("message5",!1),QV("message6",!1),go(e),haltEvent(a),!1}function go(e){currentpanel=e,setDialogMode(0),QV("showPassHintLink",!1),QV("loginpanel",1==e),QV("createpanel",2==e),QV("resetpanel",3==e),QV("tokenpanel",4==e),QV("resettokenpanel",5==e),QV("resetpasswordpanel",6==e),1==e&&Q("username").focus(),2==e&&(2097152&features?Q("aemail").focus():Q("ausername").focus()),3==e&&Q("remail").focus(),4==e&&Q("tokenInput").focus(),5==e&&Q("resetTokenInput").focus(),6==e&&Q("rapassword1").focus()}function validateLogin(e,a){var n=0<Q("username").value.length&&-1==Q("username").value.indexOf(" ")&&0<Q("password").value.length;QE("loginButton",n),setDialogMode(0),null!=a&&13==a.keyCode&&(1==e&&""!=Q("username").value?Q("password").focus():2==e&&""!=Q("password").value&&Q("loginButton").click()),null!=a&&haltEvent(a)}function validateCreate(e,a){setDialogMode(0);var n=!1;n=!!(2097152&features)||0<Q("ausername").value.length&&-1==Q("ausername").value.indexOf(" ")&&-1==Q("ausername").value.indexOf('"')&&-1==Q("ausername").value.indexOf(",");var t=1==validateEmail(Q("aemail").value),r=0<Q("apassword1").value.length,s=0<Q("apassword2").value.length&&Q("apassword2").value==Q("apassword1").value,o=0==newAccountPass||0<Q("anewaccountpass").value.length,l=n&&t&&r&&s&&o;if(QS("nuUser").color=n?"black":"#7b241c",QS("nuEmail").color=t?"black":"#7b241c",QS("nuPass1").color=r?"black":"#7b241c",QS("nuPass2").color=s?"black":"#7b241c",QS("nuToken").color=o?"black":"#7b241c",""==Q("apassword1").value)QH("passWarning",""),QV("passwordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("apassword1").value,passRequirements)?(l=!1,QS("nuPass1").color="#7b241c",QS("nuPass2").color="#7b241c",QH("passWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Wachtwoord beleid</b><div>"),QV("passwordPolicyCallout",!0),QH("passwordPolicyCallout",passwordPolicyText(Q("apassword1").value))):(QH("passWarning",""),QV("passwordPolicyCallout",!1))}else{var i=checkPasswordStrength(Q("apassword1").value);80<=i?QH("passWarning","<span style=color:green><b>Sterk wachtwoord</b><span>"):60<=i?QH("passWarning","<span style=color:blue><b>Goed wachtwoord</b><span>"):QH("passWarning","<span style=color:red><b>Zwak wachtwoord</b><span>")}null!=a&&13==a.keyCode&&(1==e&&n&&Q("aemail").focus(),2==e&&t&&Q("apassword1").focus(),3==e&&r&&Q("apassword2").focus(),4==e&&s&&(!0===passRequirements.hint?Q("apasswordhint").focus():e=5),5==e&&(1==newAccountPass?Q("anewaccountpass").focus():e=6),6==e&&Q("createButton").click()),null!=a&&haltEvent(a),QE("createButton",l)}function validatePassReset(e,a){setDialogMode(0);var n=0<Q("rapassword1").value.length,t=0<Q("rapassword2").value.length&&Q("rapassword2").value==Q("rapassword1").value,r=n&&t;if(QS("rnuPass1").color=n?"black":"#7b241c",QS("rnuPass2").color=t?"black":"#7b241c",""==Q("rapassword1").value)QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("rapassword1").value,passRequirements)?(r=!1,QS("rnuPass1").color="#7b241c",QS("rnuPass2").color="#7b241c",QH("rpassWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Wachtwoord beleid</b><div>"),QV("rpasswordPolicyCallout",!0),QH("rpasswordPolicyCallout",passwordPolicyText(Q("rapassword1").value))):(QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1))}else{var s=checkPasswordStrength(Q("rapassword1").value);80<=s?QH("rpassWarning","<span style=color:green><b>Sterk wachtwoord</b><span>"):60<=s?QH("rpassWarning","<span style=color:blue><b>Goed wachtwoord</b><span>"):QH("rpassWarning","<span style=color:red><b>Zwak wachtwoord</b><span>")}null!=a&&13==a.keyCode&&(2==e&&Q("rapassword1").focus(),3==e&&Q("rapassword2").focus(),4==e&&Q("rapasswordhint").focus(),6==e&&Q("resetPassButton").click()),null!=a&&haltEvent(a),QE("resetPassButton",r)}function passwordPolicyText(e){var a="<div style=text-align:left>",n=strCount(e);return passRequirements.min&&(null==e||e.length<passRequirements.min)&&(a+=format("Minimale lengte van {0}",passRequirements.min)+"<br />"),passRequirements.max&&(null==e||e.length>passRequirements.max)&&(a+=format("Maximale lengte van {0}",passRequirements.max)+"<br />"),passRequirements.upper&&(null==e||n.upper<passRequirements.upper)&&(a+=format("{0} hoofdletters",passRequirements.upper)+"<br />"),passRequirements.lower&&(null==e||n.lower<passRequirements.lower)&&(a+=format("{0} kleine letters",passRequirements.lower)+"<br />"),passRequirements.numeric&&(null==e||n.numeric<passRequirements.numeric)&&(a+=format("{0} numeriek",passRequirements.numeric)+"<br />"),passRequirements.nonalpha&&(null==e||n.nonalpha<passRequirements.nonalpha)&&(a+=format("{0} niet-alfanumeriek",passRequirements.nonalpha)+"<br />"),a+="</div>"}function showPasswordPolicy(){messagebox("Wachtwoord beleid",passwordPolicyText())}function validateReset(e){setDialogMode(0);var a=validateEmail(Q("remail").value);QE("eresetButton",a),null!=e&&13==e.keyCode&&1==a&&Q("eresetButton").click(),null!=e&&haltEvent(e)}function checkPasswordStrength(e){var a=0,n={},t=0,r={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var s=0;s<e.length;s++)n[e[s]]=(n[e[s]]||0)+1,a+=5/n[e[s]];for(var o in r)t+=1==r[o]?1:0;return parseInt(a+10*(t-1))}function checkPasswordRequirements(e,a){if(null==a||""==a||"object"!=typeof a)return!0;if(a.min&&e.length<a.min)return!1;if(a.max&&e.length>a.max)return!1;var n=strCount(e);return!(a.numeric&&n.numeric<a.numeric)&&(!(a.lower&&n.lower<a.lower)&&(!(a.upper&&n.upper<a.upper)&&!(a.nonalpha&&n.nonalpha<a.nonalpha)))}function strCount(e){var a={numeric:0,lower:0,upper:0,nonalpha:0};if("string"!=typeof e)return a;for(var n=0;n<e.length;n++)/\d/.test(e[n])&&a.numeric++,/[a-z]/.test(e[n])&&a.lower++,/[A-Z]/.test(e[n])&&a.upper++,/\W/.test(e[n])&&a.nonalpha++;return a}function checkToken(){var e=Q("tokenInput").value,a=e.split(" ").join("");e!=a&&(Q("tokenInput").value=a),QE("tokenOkButton",6==Q("tokenInput").value.length||8==Q("tokenInput").value.length||44==Q("tokenInput").value.length)}function resetCheckToken(){var e=Q("resetTokenInput").value,a=e.split(" ").join("");e!=a&&(Q("resetTokenInput").value=a),QE("resetTokenOkButton",6==Q("resetTokenInput").value.length||8==Q("resetTokenInput").value.length||44==Q("resetTokenInput").value.length)}var xxcurrentView=0;function setDialogMode(e,a,n,t,r,s){xxdialogMode=e,xxdialogFunc=t,xxdialogButtons=n,xxdialogTag=s,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&n),QV("idx_dlgCancelButton",2&n),QV("id_dialogclose",2&n||8&n),QV("idx_dlgButtonBar",7&n),a&&QH("id_dialogtitle",a);for(var o=1;o<24;o++)QV("dialog"+o,o==e);QV("dialog",e),r&&(2==e?QH("id_dialogOptions",r):QH("id_dialogMessage",r))}function dialogclose(e){var a=xxdialogFunc,n=xxdialogButtons,t=xxdialogTag;setDialogMode(),(8&n||e)&&a&&a(e,t)}function toggleFullScreen(e){0==webPageFullScreen?QC("body").remove("fullscreen"):QC("body").add("fullscreen"),QV("body",!0),center()}function showUserInterfaceSelectMenu(){Q("uiViewButton1").classList.remove("uiSelectorSel"),Q("uiViewButton2").classList.remove("uiSelectorSel"),Q("uiViewButton3").classList.remove("uiSelectorSel");try{Q("uiViewButton"+uiMode).classList.add("uiSelectorSel")}catch(e){}QV("uiMenu","none"==QS("uiMenu").display),nightMode&&Q("uiViewButton4").classList.add("uiSelectorSel")}function userInterfaceSelectMenu(e){e&&putstore("uiMode",uiMode=e),webPageFullScreen=uiMode<3,toggleFullScreen(0)}function toggleNightMode(){(nightMode=!nightMode)?QC("body").add("night"):QC("body").remove("night"),putstore("_nightMode",nightMode?"1":"0")}function center(){if(0==webPageFullScreen)QS("centralTable")["margin-top"]="";else{var e=Q("column_l").clientHeight/2-220;e<0&&(e=0),QS("centralTable")["margin-top"]=e+"px"}}function messagebox(e,a){QH("id_dialogMessage",a),setDialogMode(1,e,1)}function statusbox(e,a){QH("id_dialogMessage",a),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function putstore(e,a){try{if("undefined"==typeof localStorage)return;localStorage.setItem(e,a)}catch(e){}}function getstore(e,a){try{if("undefined"==typeof localStorage)return a;var n=localStorage.getItem(e);return null==n||null==n?a:n}catch(e){return a}}function format(e){var n=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,a){return void 0!==n[a]?n[a]:e})}function addTextLink(e,a,n){var t=a.toLowerCase().indexOf(e.toLowerCase());return-1==t?a:a.substring(0,t)+'<a href="'+n+'">'+e+"</a>"+a.substring(t+e.length)}</script>
\ No newline at end of file
views/translations/login-mobile-min_nl.handlebars new
+1
@@ -0,0 +1 @@
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/u2f-api.js></script><title>{{{title}}} - Login</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%;display:flex;align-items:center><div id=column_l style=padding:10px;width:100%><table style=width:100%><tr><td align=center><div id=loginpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;clear:both;display:none><form method=post><input type=hidden name=action value=login><div id=message1></div><div><b>Inloggen</b></div><table><tr><td id=loginusername align=right width=100>Gebruikersnaam:<td><input id=username maxlength=64 name=username onchange=validateLogin(1) onkeyup=validateLogin(1,event)><tr><td align=right>Wachtwoord:<td><input id=password type=password maxlength=256 name=password autocomplete=off onchange=validateLogin(2) onkeyup=validateLogin(2,event)><tr><td><div id=showPassHintLink style=display:none><a onclick=showPassHint() style=cursor:pointer>Toon hint</a></div><td align=right><input id=loginButton type=submit value=Inloggen disabled></table><div id=hrAccountDiv style=display:none><hr></div><div id=resetAccountDiv style=display:none;padding:2px><span id=resetAccountSpan>Gebruiker / wachtwoord vergeten?</span> <a onclick=xgo(3) style=cursor:pointer>Account opnieuw instellen</a>.</div><div id=newAccountDiv style=display:none;padding:2px>Heb je nog geen account? <a onclick=xgo(2) style=cursor:pointer>Creëer er een</a>.</div><input id=loginformargs name=urlargs type=hidden></form></div><div id=createpanel style=display:none><div style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;clear:both;position:relative><form method=post><input type=hidden name=action value=createaccount><div id=message2></div><div><b>Gebruikersaccount aanmaken</b></div><div id=passwordPolicyCallout style="left:-5px;top:10px;width:100px;position:absolute;background-color:#ffc;border-radius:5px;padding:5px;box-shadow:0 0 15px #666;font-size:10px"></div><table><tr id=nuUserRow><td align=right width=100>Gebruikersnaam:<td><input id=ausername name=username onchange=validateCreate(1) maxlength=64 onkeydown=haltReturn(event) onkeyup=validateCreate(1,event)><tr><td align=right width=100>Email:<td><input id=aemail name=email onchange=validateCreate(2) maxlength=256 onkeydown=haltReturn(event) onkeyup=validateCreate(2,event)><tr><td align=right>Wachtwoord:<td><input id=apassword1 type=password name=password1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(3) onkeyup=validateCreate(3,event)><tr><td align=right>Wachtwoord:<td><input id=apassword2 type=password name=password2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(4) onkeyup=validateCreate(4,event)><tr id=createPanelHint style=display:none><td align=right>wachtwoord hint:<td><input id=apasswordhint name=apasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(5) onkeyup=validateCreate(5,event)><tr id=newAccountPass title="Voer het token voor het maken van een account in"><td align=right>Token aanmaken:<td><input id=anewaccountpass type=password name=anewaccountpass autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validateCreate(6) onkeyup=validateCreate(6,event)><tr><td colspan=2><div style=float:right><input id=createButton type=submit value="Account aanmaken"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Terug naar inloggen</a> <input id=createformargs name=urlargs type=hidden></form></div></div><div id=resetpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post><input type=hidden name=action value=resetaccount><div id=message3></div><div><b>Gebruikersaccount resetten</b></div><table><tr><td align=right width=100>Email:<td><input id=remail name=email maxlength=256 onchange=validateReset() onkeyup=validateReset(event)><tr><td colspan=2><div style=float:right><input id=eresetButton type=submit value="Account opnieuw instellen"disabled></div><div id=passWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Terug naar inloggen</a> <input id=resetformargs name=urlargs type=hidden></form></div><div id=tokenpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post autocomplete=off><input type=hidden name=action value=tokenlogin> <input type=hidden name=hwstate value={{{hwstate}}}><div id=message4></div><table><tr><td align=right width=100>Inlog token:<td><input id=tokenInput name=token maxlength=50 onchange=checkToken(event) onkeyup=checkToken(event) onkeydown=checkToken(event) onfocus=checkTokenTimer(1) onblur=checkTokenTimer(0)> <input id=hwtokenInput name=hwtoken style=display:none><tr><td colspan=2 style=align-content:center><label><input id=tokenInputRemember name=remembertoken type=checkbox>Onthoud dit apparaat gedurende 30 dagen.</label><tr><td colspan=2><div style=float:right><input id=tokenOkButton type=submit value=Inloggen disabled></div><div style=float:right><input style=display:none;float:right id=securityKeyButton type=button value="Gebruik beveiligingssleutel"onclick=useSecurityKey()></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Terug naar inloggen</a> <input id=tokenformargs name=urlargs type=hidden></form></div><div id=resettokenpanel style=background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both><form method=post autocomplete=off><input type=hidden name=action value=resetaccount><div id=message5></div><table><tr><td align=right width=100>Inlog token:<td><input id=resetTokenInput name=token maxlength=50 onchange=resetCheckToken(event) onpaste=resetCheckToken(event) onkeyup=resetCheckToken(event) onkeydown=resetCheckToken(event)> <input id=resetHwtokenInput name=hwtoken style=display:none><tr><td colspan=2><div style=float:right><input id=resetTokenOkButton type=submit value=Inloggen disabled></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Terug naar inloggen</a> <input id=resettokenformargs name=urlargs type=hidden></form></div><div id=resetpasswordpanel style=position:relative;background-color:#979797;border-radius:16px;width:300px;padding:16px;text-align:center;display:none><form method=post><input type=hidden name=action value=resetpassword><div id=message6></div><div id=rpasswordPolicyCallout style="left:-10px;width:100px;display:none;position:absolute;background-color:#ffc;border-radius:5px;padding:5px;box-shadow:0 0 15px #666;font-size:10px"></div><table><tr><td id=rnuPass1 width=100 align=right>Wachtwoord:<td><input id=rapassword1 type=password name=rpassword1 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(3,event) onkeyup=validatePassReset(3,event)><tr><td id=rnuPass2 align=right>Wachtwoord:<td><input id=rapassword2 type=password name=rpassword2 autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(4,event) onkeyup=validatePassReset(4,event)><tr id=resetpasswordpanelHint style=display:none><td id=rnuHint align=right>wachtwoord hint:<td><input id=rapasswordhint name=rpasswordhint autocomplete=off maxlength=256 onkeydown=haltReturn(event) onchange=validatePassReset(5,event) onkeyup=validatePassReset(5,event)><tr><td colspan=2><div style=float:right><input id=resetPassButton type=submit value="Reset wachtwoord"disabled></div><div id=rpassWarning style=padding-top:6px></div></table><hr><a onclick=xgo(1) style=cursor:pointer>Terug naar inloggen</a> <input id=resetpasswordformargs name=urlargs type=hidden></form></div></table></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table cellpadding=0 cellspacing=6 style=width:100%><tr><td style=text-align:left;color:#fff>{{{footer}}}<td style=text-align:right>{{{rootCertLink}}}&nbsp;<a href=terms>Voorwaarden &amp; Privacy</a></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:180px;width:400px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Afbreken style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=Oke style=float:right;width:80px onclick=dialogclose(1)></div></div><script>"use strict";var loginMode="{{{loginmode}}}",newAccount="{{{newAccount}}}",passhint="{{{passhint}}}",newAccountPass=parseInt("{{{newAccountPass}}}"),emailCheck=!1,features=parseInt("{{{features}}}"),passRequirements="{{{passRequirements}}}",passRequirementsEx=null!=(passRequirements=""!=passRequirements?JSON.parse(decodeURIComponent(passRequirements)):{}).min||null!=passRequirements.max||null!=passRequirements.upper||null!=passRequirements.lower||null!=passRequirements.numeric||null!=passRequirements.nonalpha,hardwareKeyChallenge=decodeURIComponent("{{{hkey}}}"),publicKeyCredentialRequestOptions=null,currentpanel=0,messageid=parseInt("{{{messageid}}}"),okmessages=["","Wacht even, reset e-mail verzonden."],failmessages=["Kan geen account maken.","Gebruikersaccount limiet bereikt.","Bestaand account met dit e-mailadres.","Ongeldig token voor het maken van een account.","Gebruikersnaam bestaal al.","Wachtwoord geweigerd, gebruik een ander.","Ongeldige e-mail.","Gebruikersaccount niet gevonden","Ongeldig token, probeer het opnieuw.","Kan geen e-mail verzenden.","Gebruikersaccount vergrendeld","Toegang geweigerd.","Inloggen mislukt, controleer gebruikersnaam en wachtwoord.","Wachtwoordwijziging aangevraagd.","IP-adres geblokkeerd, probeer het later opnieuw."];if(0<messageid){var msg="";if(messageid<100&&messageid<okmessages.length?msg=okmessages[messageid]:100<=messageid&&messageid-100<failmessages.length&&(msg=failmessages[messageid-100]),""!=msg){msg=100<=messageid?'<span class="msg error"><b style=color:#8C001A>'+msg+"<b></span><br /><br />":'<span class="msg success"><b>'+msg+"</b></span><br /><br />";for(var i=1;i<7;i++)QH("message"+i,msg)}}if(0<window.location.href.indexOf("?")){var urlargs=window.location.href.substring(window.location.href.indexOf("?"));Q("loginformargs").value=urlargs,Q("createformargs").value=urlargs,Q("resetformargs").value=urlargs,Q("tokenformargs").value=urlargs,Q("resettokenformargs").value=urlargs,Q("resetpasswordformargs").value=urlargs}function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(2097152&features&&(QH("loginusername","Email:"),QH("resetAccountSpan","Wachtwoord vergeten?"),QV("nuUserRow",!1)),QV("createPanelHint",!0===passRequirements.hint),QV("resetpasswordpanelHint",!0===passRequirements.hint),(window.onresize=center)(),validateLogin(),validateCreate(),0!=loginMode.length?go(parseInt(loginMode)):go(1),QV("newAccountDiv","1"===newAccount||"true"===newAccount),!0===passRequirements.hint&&null!=passhint&&0<passhint.length&&QV("showPassHintLink",!0),QV("newAccountPass",1==newAccountPass),QV("resetAccountDiv",1==emailCheck),QV("hrAccountDiv",1==emailCheck||1==newAccountPass),"4"==loginMode){try{hardwareKeyChallenge=0<hardwareKeyChallenge.length?JSON.parse(hardwareKeyChallenge):null}catch(e){hardwareKeyChallenge=null}QV("securityKeyButton",null!=hardwareKeyChallenge&&"webAuthn"==hardwareKeyChallenge.type)}if("5"==loginMode){try{hardwareKeyChallenge=0<hardwareKeyChallenge.length?JSON.parse(hardwareKeyChallenge):null}catch(e){hardwareKeyChallenge=null}if(null!=hardwareKeyChallenge&&"webAuthn"==hardwareKeyChallenge.type){"string"==typeof hardwareKeyChallenge.challenge&&(hardwareKeyChallenge.challenge=Uint8Array.from(atob(hardwareKeyChallenge.challenge),function(e){return e.charCodeAt(0)}).buffer),publicKeyCredentialRequestOptions={challenge:hardwareKeyChallenge.challenge,allowCredentials:[],timeout:hardwareKeyChallenge.timeout};for(var a=0;a<hardwareKeyChallenge.keyIds.length;a++)publicKeyCredentialRequestOptions.allowCredentials.push({id:Uint8Array.from(atob(hardwareKeyChallenge.keyIds[a]),function(e){return e.charCodeAt(0)}),type:"public-key",transports:["usb","ble","nfc"]});navigator.credentials.get({publicKey:publicKeyCredentialRequestOptions}).then(function(e){var a={id:btoa(String.fromCharCode.apply(null,new Uint8Array(e.rawId))),clientDataJSON:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.clientDataJSON))),userHandle:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.userHandle))),signature:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.signature))),authenticatorData:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.authenticatorData)))};Q("resetHwtokenInput").value=JSON.stringify(a),QE("resetTokenOkButton",!0),Q("resetTokenOkButton").click()},function(e){console.log("credentials-get error",e)})}}}function useSecurityKey(){if(null!=hardwareKeyChallenge&&"webAuthn"==hardwareKeyChallenge.type){"string"==typeof hardwareKeyChallenge.challenge&&(hardwareKeyChallenge.challenge=Uint8Array.from(atob(hardwareKeyChallenge.challenge),function(e){return e.charCodeAt(0)}).buffer),publicKeyCredentialRequestOptions={challenge:hardwareKeyChallenge.challenge,allowCredentials:[],timeout:hardwareKeyChallenge.timeout};for(var e=0;e<hardwareKeyChallenge.keyIds.length;e++)publicKeyCredentialRequestOptions.allowCredentials.push({id:Uint8Array.from(atob(hardwareKeyChallenge.keyIds[e]),function(e){return e.charCodeAt(0)}),type:"public-key",transports:["usb","ble","nfc"]});navigator.credentials.get({publicKey:publicKeyCredentialRequestOptions}).then(function(e){var a={id:btoa(String.fromCharCode.apply(null,new Uint8Array(e.rawId))),clientDataJSON:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.clientDataJSON))),userHandle:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.userHandle))),signature:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.signature))),authenticatorData:btoa(String.fromCharCode.apply(null,new Uint8Array(e.response.authenticatorData)))};Q("hwtokenInput").value=JSON.stringify(a),QE("tokenOkButton",!0),Q("tokenOkButton").click()},function(e){console.log("credentials-get error",e)})}}function showPassHint(){!0===passRequirements.hint&&messagebox("wachtwoord hint",passhint)}function xgo(e){QV("message1",!1),QV("message2",!1),QV("message3",!1),QV("message4",!1),QV("message5",!1),QV("message6",!1),go(e)}function go(e){currentpanel=e,setDialogMode(0),QV("showPassHintLink",!1),QV("loginpanel",1==e),QV("createpanel",2==e),QV("resetpanel",3==e),QV("tokenpanel",4==e),QV("resettokenpanel",5==e),QV("resetpasswordpanel",6==e),1==e&&Q("username").focus(),2==e&&(2097152&features?Q("aemail").focus():Q("ausername").focus()),3==e&&Q("remail").focus(),4==e&&Q("tokenInput").focus(),5==e&&Q("resetTokenInput").focus(),6==e&&Q("rapassword1").focus()}function validateLogin(e,a){var n=0<Q("username").value.length&&-1==Q("username").value.indexOf(" ")&&0<Q("password").value.length;QE("loginButton",n),setDialogMode(0),null!=a&&13==a.keyCode&&(1==e?Q("password").focus():2==e&&Q("loginButton").click()),null!=a&&haltEvent(a)}function validateCreate(e,a){setDialogMode(0);var n=!1;if(n=!!(2097152&features)||0<Q("ausername").value.length&&-1==Q("ausername").value.indexOf(" ")&&-1==Q("ausername").value.indexOf('"')&&-1==Q("ausername").value.indexOf(","),n&=1==validateEmail(Q("aemail").value)&&0<Q("apassword1").value.length&&Q("apassword2").value==Q("apassword1").value,1==newAccountPass&&0==Q("anewaccountpass").value.length&&(n=!1),""==Q("apassword1").value)QH("passWarning",""),QV("passwordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("apassword1").value,passRequirements)?(n=!1,QH("passWarning","<span style=color:red><b>Wachtwoord beleid</b><span>"),QV("passwordPolicyCallout",!0),QH("passwordPolicyCallout",passwordPolicyText(Q("apassword1").value))):(QH("passWarning",""),QV("passwordPolicyCallout",!1))}else{var r=checkPasswordStrength(Q("apassword1").value);80<=r?QH("passWarning","<span style=color:green><b>Sterk wachtwoord</b><span>"):60<=r?QH("passWarning","<span style=color:blue><b>Goed wachtwoord</b><span>"):QH("passWarning","<span style=color:red><b>Zwak wachtwoord</b><span>")}QE("createButton",n),null!=a&&13==a.keyCode&&(1==e&&Q("aemail").focus(),2==e&&Q("apassword1").focus(),3==e&&Q("apassword2").focus(),4==e&&Q("apasswordhint").focus(),5==e&&(1==newAccountPass?Q("anewaccountpass").focus():Q("createButton").click()),6==e&&Q("createButton").click()),null!=a&&haltEvent(a)}function validatePassReset(e,a){setDialogMode(0);var n=0<Q("rapassword1").value.length,r=0<Q("rapassword2").value.length&&Q("rapassword2").value==Q("rapassword1").value,t=n&&r;if(QS("rnuPass1").color=n?"black":"#7b241c",QS("rnuPass2").color=r?"black":"#7b241c",""==Q("rapassword1").value)QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1);else if(passRequirementsEx){0==checkPasswordRequirements(Q("rapassword1").value,passRequirements)?(t=!1,QS("rnuPass1").color="#7b241c",QS("rnuPass2").color="#7b241c",QH("rpassWarning","<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>Wachtwoord beleid</b><div>"),QV("rpasswordPolicyCallout",!0),QH("rpasswordPolicyCallout",passwordPolicyText(Q("rapassword1").value))):(QH("rpassWarning",""),QV("rpasswordPolicyCallout",!1))}else{var s=checkPasswordStrength(Q("rapassword1").value);80<=s?QH("rpassWarning","<span style=color:green><b>Sterk wachtwoord</b><span>"):60<=s?QH("rpassWarning","<span style=color:blue><b>Goed wachtwoord</b><span>"):QH("rpassWarning","<span style=color:red><b>Zwak wachtwoord</b><span>")}null!=a&&13==a.keyCode&&(2==e&&Q("rapassword1").focus(),3==e&&Q("rapassword2").focus(),4==e&&Q("rapasswordhint").focus(),6==e&&Q("resetPassButton").click()),null!=a&&haltEvent(a),QE("resetPassButton",t)}function validateReset(e){setDialogMode(0);var a=validateEmail(Q("remail").value);QE("eresetButton",a),null!=e&&13==e.keyCode&&1==a&&Q("eresetButton").click(),null!=e&&haltEvent(e)}function passwordPolicyText(e){var a="<div style=text-align:left>",n=strCount(e);return passRequirements.min&&(null==e||e.length<passRequirements.min)&&(a+=format("Minimale lengte van {0}",passRequirements.min)+"<br />"),passRequirements.max&&(null==e||e.length>passRequirements.max)&&(a+=format("Maximale lengte van {0}",passRequirements.max)+"<br />"),passRequirements.upper&&(null==e||n.upper<passRequirements.upper)&&(a+=format("{0} hoofdletters",passRequirements.upper)+"<br />"),passRequirements.lower&&(null==e||n.lower<passRequirements.lower)&&(a+=format("{0} kleine letters",passRequirements.lower)+"<br />"),passRequirements.numeric&&(null==e||n.numeric<passRequirements.numeric)&&(a+=format("{0} numeriek",passRequirements.numeric)+"<br />"),passRequirements.nonalpha&&(null==e||n.nonalpha<passRequirements.nonalpha)&&(a+=format("{0} niet-alfanumeriek",passRequirements.nonalpha)+"<br />"),a+="</div>"}function checkPasswordStrength(e){var a=0,n={},r=0,t={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var s=0;s<e.length;s++)n[e[s]]=(n[e[s]]||0)+1,a+=5/n[e[s]];for(var o in t)r+=1==t[o]?1:0;return parseInt(a+10*(r-1))}function checkPasswordRequirements(e,a){if(null==a||""==a||"object"!=typeof a)return!0;if(a.min&&e.length<a.min)return!1;if(a.max&&e.length>a.max)return!1;var n=strCount(e);return!(a.numeric&&n.numeric<a.numeric)&&(!(a.lower&&n.lower<a.lower)&&(!(a.upper&&n.upper<a.upper)&&!(a.nonalpha&&n.nonalpha<a.nonalpha)))}function strCount(e){var a={numeric:0,lower:0,upper:0,nonalpha:0};if("string"!=typeof e)return a;for(var n=0;n<e.length;n++)/\d/.test(e[n])&&a.numeric++,/[a-z]/.test(e[n])&&a.lower++,/[A-Z]/.test(e[n])&&a.upper++,/\W/.test(e[n])&&a.nonalpha++;return a}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xcheckTokenTimer=null;function checkTokenTimer(e){0==e&&null!=xcheckTokenTimer&&(clearInterval(xcheckTokenTimer),xcheckTokenTimer=null),1==e&&null==xcheckTokenTimer&&(xcheckTokenTimer=setInterval(checkToken,200))}function checkToken(){var e=Q("tokenInput").value,a=e.split(" ").join("");e!=a&&(Q("tokenInput").value=a),QE("tokenOkButton",6==Q("tokenInput").value.length||8==Q("tokenInput").value.length||44==Q("tokenInput").value.length)}function resetCheckToken(){var e=Q("resetTokenInput").value,a=e.split(" ").join("");e!=a&&(Q("resetTokenInput").value=a),QE("resetTokenOkButton",6==Q("resetTokenInput").value.length||8==Q("resetTokenInput").value.length||44==Q("resetTokenInput").value.length)}var xxcurrentView=0;function setDialogMode(e,a,n,r,t,s){xxdialogMode=e,xxdialogFunc=r,xxdialogButtons=n,xxdialogTag=s,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&n),QV("idx_dlgCancelButton",2&n),QV("id_dialogclose",2&n||8&n),QV("idx_dlgButtonBar",7&n),a&&QH("id_dialogtitle",a);for(var o=1;o<24;o++)QV("dialog"+o,o==e);QV("dialog",e),t&&(2==e?QH("id_dialogOptions",t):QH("id_dialogMessage",t))}function dialogclose(e){var a=xxdialogFunc,n=xxdialogButtons,r=xxdialogTag;setDialogMode(),(8&n||e)&&a&&a(e,r)}function center(){QS("dialog").left=(getDocWidth()-400)/2+"px"}function messagebox(e,a){QH("id_dialogMessage",a),setDialogMode(1,e,1)}function statusbox(e,a){QH("id_dialogMessage",a),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function format(e){var n=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,a){return void 0!==n[a]?n[a]:e})}</script>
\ No newline at end of file
views/translations/login-mobile_nl.handlebars new
+647
@@ -0,0 +1,647 @@
1 +<!DOCTYPE html><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head>
2 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 + <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
4 + <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 + <meta name="apple-mobile-web-app-capable" content="yes">
6 + <meta name="format-detection" content="telephone=no">
7 + <link rel="shortcut icon" type="image/x-icon" href="{{{domainurl}}}favicon.ico">
8 + <script type="text/javascript" src="scripts/common-0.0.1.js"></script>
9 + <script type="text/javascript" src="scripts/u2f-api.js"></script>
10 + <title>{{{title}}} - Login</title>
11 + <style>
12 + a {
13 + color: #036;
14 + text-decoration: underline;
15 + }
16 +
17 + #footer a {
18 + color: #fff;
19 + text-decoration: underline;
20 + }
21 +
22 + #footer a:hover {
23 + color: #fff;
24 + text-decoration: none;
25 + }
26 + </style>
27 +</head>
28 +<body onload="if (typeof(startup) !== 'undefined') startup();" style="overflow-y:hidden;margin:0;padding:0;border:0;color:black;font-size:13px;font-family:\'Trebuchet MS\', Arial, Helvetica, sans-serif">
29 + <div id="container">
30 + <div id="mastheadx"></div>
31 + <div id="masthead" style="background:url(logo.png) 0px 0px;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden">
32 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px">
33 + <strong><font style="font-size:36px;font-family:Arial,Helvetica,sans-serif">{{{title}}}</font></strong>
34 + </div>
35 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px">
36 + <strong><font style="font-size:12px;font-family:Arial,Helvetica,sans-serif">{{{title2}}}</font></strong>
37 + </div>
38 + </div>
39 + <div id="page_content" style="overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%;display:flex;align-items:center">
40 + <div id="column_l" style="padding:10px;width:100%">
41 + <table style="width:100%">
42 + <tbody><tr>
43 + <td align="center">
44 + <div id="loginpanel" style="background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;clear:both;display:none">
45 + <form method="post">
46 + <input type="hidden" name="action" value="login">
47 + <div id="message1"></div>
48 + <div>
49 + <b>Inloggen</b>
50 + </div>
51 + <table>
52 + <tbody><tr>
53 + <td id="loginusername" align="right" width="100">Gebruikersnaam:</td>
54 + <td><input id="username" type="text" maxlength="64" name="username" onchange="validateLogin(1)" onkeyup="validateLogin(1,event)"></td>
55 + </tr>
56 + <tr>
57 + <td align="right">Wachtwoord:</td>
58 + <td><input id="password" type="password" maxlength="256" name="password" autocomplete="off" onchange="validateLogin(2)" onkeyup="validateLogin(2,event)"></td>
59 + </tr>
60 + <tr>
61 + <td><div id="showPassHintLink" style="display:none"><a onclick="showPassHint()" style="cursor:pointer">Toon hint</a></div></td>
62 + <td align="right"><input id="loginButton" type="submit" value="Inloggen" disabled="disabled"></td>
63 + </tr>
64 + </tbody></table>
65 + <div id="hrAccountDiv" style="display:none"><hr></div>
66 + <div id="resetAccountDiv" style="display:none;padding:2px">
67 + <span id="resetAccountSpan">Gebruiker / wachtwoord vergeten?</span> <a onclick="xgo(3)" style="cursor:pointer">Account opnieuw instellen</a>.
68 + </div>
69 + <div id="newAccountDiv" style="display:none;padding:2px">
70 + Heb je nog geen account? <a onclick="xgo(2)" style="cursor:pointer">Creëer er een</a>.
71 + </div>
72 + <input id="loginformargs" name="urlargs" type="hidden" value="">
73 + </form>
74 + </div>
75 + <div id="createpanel" style="display:none">
76 + <div style="background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;clear:both;position:relative">
77 + <form method="post">
78 + <input type="hidden" name="action" value="createaccount">
79 + <div id="message2"></div>
80 + <div>
81 + <b>Gebruikersaccount aanmaken</b>
82 + </div>
83 + <div id="passwordPolicyCallout" style="left:-5px;top:10px;width:100px;position:absolute;background-color:#FFC;border-radius:5px;padding:5px;box-shadow:0px 0px 15px #666;font-size:10px"></div>
84 + <table>
85 + <tbody><tr id="nuUserRow">
86 + <td align="right" width="100">Gebruikersnaam:</td>
87 + <td><input id="ausername" type="text" name="username" onchange="validateCreate(1)" maxlength="64" onkeydown="haltReturn(event)" onkeyup="validateCreate(1,event)"></td>
88 + </tr>
89 + <tr>
90 + <td align="right" width="100">Email:</td>
91 + <td><input id="aemail" type="text" name="email" onchange="validateCreate(2)" maxlength="256" onkeydown="haltReturn(event)" onkeyup="validateCreate(2,event)"></td>
92 + </tr>
93 + <tr>
94 + <td align="right">Wachtwoord:</td>
95 + <td><input id="apassword1" type="password" name="password1" autocomplete="off" maxlength="256" onkeydown="haltReturn(event)" onchange="validateCreate(3)" onkeyup="validateCreate(3,event)"></td>
96 + </tr>
97 + <tr>
98 + <td align="right">Wachtwoord:</td>
99 + <td><input id="apassword2" type="password" name="password2" autocomplete="off" maxlength="256" onkeydown="haltReturn(event)" onchange="validateCreate(4)" onkeyup="validateCreate(4,event)"></td>
100 + </tr>
101 + <tr id="createPanelHint" style="display:none">
102 + <td align="right">wachtwoord hint:</td>
103 + <td><input id="apasswordhint" type="text" name="apasswordhint" autocomplete="off" maxlength="256" onkeydown="haltReturn(event)" onchange="validateCreate(5)" onkeyup="validateCreate(5,event)"></td>
104 + </tr>
105 + <tr id="newAccountPass" title="Voer het token voor het maken van een account in">
106 + <td align="right">Token aanmaken:</td>
107 + <td><input id="anewaccountpass" type="password" name="anewaccountpass" autocomplete="off" maxlength="256" onkeydown="haltReturn(event)" onchange="validateCreate(6)" onkeyup="validateCreate(6,event)"></td>
108 + </tr>
109 + <tr>
110 + <td colspan="2">
111 + <div style="float:right"><input id="createButton" type="submit" value="Account aanmaken" disabled="disabled"></div>
112 + <div id="passWarning" style="padding-top:6px"></div>
113 + </td>
114 + </tr>
115 + </tbody></table>
116 + <hr><a onclick="xgo(1)" style="cursor:pointer">Terug naar inloggen</a>
117 + <input id="createformargs" name="urlargs" type="hidden" value="">
118 + </form>
119 + </div>
120 + </div>
121 + <div id="resetpanel" style="background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both">
122 + <form method="post">
123 + <input type="hidden" name="action" value="resetaccount">
124 + <div id="message3"></div>
125 + <div>
126 + <b>Gebruikersaccount resetten</b>
127 + </div>
128 + <table>
129 + <tbody><tr>
130 + <td align="right" width="100">Email:</td>
131 + <td><input id="remail" type="text" name="email" maxlength="256" onchange="validateReset()" onkeyup="validateReset(event)"></td>
132 + </tr>
133 + <tr>
134 + <td colspan="2">
135 + <div style="float:right"><input id="eresetButton" type="submit" value="Account opnieuw instellen" disabled="disabled"></div>
136 + <div id="passWarning" style="padding-top:6px"></div>
137 + </td>
138 + </tr>
139 + </tbody></table>
140 + <hr><a onclick="xgo(1)" style="cursor:pointer">Terug naar inloggen</a>
141 + <input id="resetformargs" name="urlargs" type="hidden" value="">
142 + </form>
143 + </div>
144 + <div id="tokenpanel" style="background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both">
145 + <form method="post" autocomplete="off">
146 + <input type="hidden" name="action" value="tokenlogin">
147 + <input type="hidden" name="hwstate" value="{{{hwstate}}}">
148 + <div id="message4"></div>
149 + <table>
150 + <tbody><tr>
151 + <td align="right" width="100">Inlog token:</td>
152 + <td>
153 + <input id="tokenInput" type="text" name="token" maxlength="50" onchange="checkToken(event)" onkeyup="checkToken(event)" onkeydown="checkToken(event)" onfocus="checkTokenTimer(1)" onblur="checkTokenTimer(0)">
154 + <input id="hwtokenInput" type="text" name="hwtoken" style="display:none">
155 + </td>
156 + </tr>
157 + <tr>
158 + <td colspan="2" style="align-content:center">
159 + <label><input id="tokenInputRemember" name="remembertoken" type="checkbox">Onthoud dit apparaat gedurende 30 dagen.</label>
160 + </td>
161 + </tr>
162 + <tr>
163 + <td colspan="2">
164 + <div style="float:right"><input id="tokenOkButton" type="submit" value="Inloggen" disabled="disabled"></div>
165 + <div style="float:right"><input style="display:none;float:right" id="securityKeyButton" type="button" value="Gebruik beveiligingssleutel" onclick="useSecurityKey()"></div>
166 + </td>
167 + </tr>
168 + </tbody></table>
169 + <hr><a onclick="xgo(1)" style="cursor:pointer">Terug naar inloggen</a>
170 + <input id="tokenformargs" name="urlargs" type="hidden" value="">
171 + </form>
172 + </div>
173 +
174 + <div id="resettokenpanel" style="background-color:#979797;border-radius:16px;width:260px;padding:16px;text-align:center;display:none;clear:both">
175 + <form method="post" autocomplete="off">
176 + <input type="hidden" name="action" value="resetaccount">
177 + <div id="message5"></div>
178 + <table>
179 + <tbody><tr>
180 + <td align="right" width="100">Inlog token:</td>
181 + <td>
182 + <input id="resetTokenInput" type="text" name="token" maxlength="50" onchange="resetCheckToken(event)" onpaste="resetCheckToken(event)" onkeyup="resetCheckToken(event)" onkeydown="resetCheckToken(event)">
183 + <input id="resetHwtokenInput" type="text" name="hwtoken" style="display:none">
184 + </td>
185 + </tr>
186 + <tr>
187 + <td colspan="2">
188 + <div style="float:right"><input id="resetTokenOkButton" type="submit" value="Inloggen" disabled="disabled"></div>
189 + </td>
190 + </tr>
191 + </tbody></table>
192 + <hr><a onclick="xgo(1)" style="cursor:pointer">Terug naar inloggen</a>
193 + <input id="resettokenformargs" name="urlargs" type="hidden" value="">
194 + </form>
195 + </div>
196 +
197 + <div id="resetpasswordpanel" style="position:relative;background-color:#979797;border-radius:16px;width:300px;padding:16px;text-align:center;display:none">
198 + <form method="post">
199 + <input type="hidden" name="action" value="resetpassword">
200 + <div id="message6"></div>
201 + <div id="rpasswordPolicyCallout" style="left:-10px;width:100px;display:none;position:absolute;background-color:#FFC;border-radius:5px;padding:5px;box-shadow:0px 0px 15px #666;font-size:10px"></div>
202 + <table>
203 + <tbody><tr>
204 + <td id="rnuPass1" width="100" align="right">Wachtwoord:</td>
205 + <td><input id="rapassword1" type="password" name="rpassword1" autocomplete="off" maxlength="256" onkeydown="haltReturn(event)" onchange="validatePassReset(3,event)" onkeyup="validatePassReset(3,event)"></td>
206 + </tr>
207 + <tr>
208 + <td id="rnuPass2" align="right">Wachtwoord:</td>
209 + <td><input id="rapassword2" type="password" name="rpassword2" autocomplete="off" maxlength="256" onkeydown="haltReturn(event)" onchange="validatePassReset(4,event)" onkeyup="validatePassReset(4,event)"></td>
210 + </tr>
211 + <tr id="resetpasswordpanelHint" style="display:none">
212 + <td id="rnuHint" align="right">wachtwoord hint:</td>
213 + <td><input id="rapasswordhint" type="text" name="rpasswordhint" autocomplete="off" maxlength="256" onkeydown="haltReturn(event)" onchange="validatePassReset(5,event)" onkeyup="validatePassReset(5,event)"></td>
214 + </tr>
215 + <tr>
216 + <td colspan="2">
217 + <div style="float:right"><input id="resetPassButton" type="submit" value="Reset wachtwoord" disabled="disabled"></div>
218 + <div id="rpassWarning" style="padding-top:6px"></div>
219 + </td>
220 + </tr>
221 + </tbody></table>
222 + <hr><a onclick="xgo(1)" style="cursor:pointer">Terug naar inloggen</a>
223 + <input id="resetpasswordformargs" name="urlargs" type="hidden" value="">
224 + </form>
225 + </div>
226 +
227 + </td>
228 + </tr>
229 + </tbody></table>
230 + </div>
231 + </div>
232 + <div id="footer" style="height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0px">
233 + <table cellpadding="0" cellspacing="6" style="width:100%">
234 + <tbody><tr>
235 + <td style="text-align:left;color:white">{{{footer}}}</td>
236 + <td style="text-align:right">{{{rootCertLink}}}&nbsp;<a href="terms">Voorwaarden &amp; Privacy</a></td>
237 + </tr>
238 + </tbody></table>
239 + </div>
240 + </div>
241 + <div id="dialog" style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:180px;width:400px;display:none">
242 + <div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0">
243 + <div id="id_dialogclose" style="float:right;padding:5px;cursor:pointer" onclick="setDialogMode()"><b>X</b></div>
244 + <div id="id_dialogtitle" style="padding:5px"></div>
245 + <div style="width:100%;margin:6px"></div>
246 + </div>
247 + <div style="margin-right:16px;margin-left:8px">
248 + <div id="dialog1" style="margin:auto;text-align:center;margin:3px">
249 + <div id="id_dialogMessage" style="padding:10px"></div>
250 + </div>
251 + <div id="dialog2" style="margin:auto;margin:3px">
252 + <div id="id_dialogOptions"></div>
253 + </div>
254 + </div>
255 + <div id="idx_dlgButtonBar" style="padding:10px;margin-bottom:20px">
256 + <input id="idx_dlgCancelButton" type="button" value="Afbreken" style="float:right;width:80px;margin-left:5px" onclick="dialogclose(0)">
257 + <input id="idx_dlgOkButton" type="button" value="Oke" style="float:right;width:80px" onclick="dialogclose(1)">
258 + </div>
259 + </div>
260 + <script>
261 + 'use strict';
262 + var loginMode = '{{{loginmode}}}';
263 + var newAccount = '{{{newAccount}}}';
264 + var passhint = '{{{passhint}}}';
265 + var newAccountPass = parseInt('{{{newAccountPass}}}');
266 + var emailCheck = ('{{{emailcheck}}}' == 'true');
267 + var features = parseInt('{{{features}}}');
268 + var passRequirements = '{{{passRequirements}}}';
269 + if (passRequirements != '') { passRequirements = JSON.parse(decodeURIComponent(passRequirements)); } else { passRequirements = {}; }
270 + var passRequirementsEx = ((passRequirements.min != null) || (passRequirements.max != null) || (passRequirements.upper != null) || (passRequirements.lower != null) || (passRequirements.numeric != null) || (passRequirements.nonalpha != null));
271 + var hardwareKeyChallenge = decodeURIComponent('{{{hkey}}}');
272 + var publicKeyCredentialRequestOptions = null;
273 + var currentpanel = 0;
274 +
275 + // Display the right server message
276 + var messageid = parseInt('{{{messageid}}}');
277 + var okmessages = ['', "Wacht even, reset e-mail verzonden."];
278 + var failmessages = ["Kan geen account maken.", "Gebruikersaccount limiet bereikt.", "Bestaand account met dit e-mailadres.", "Ongeldig token voor het maken van een account.", "Gebruikersnaam bestaal al.", "Wachtwoord geweigerd, gebruik een ander.", "Ongeldige e-mail.", "Gebruikersaccount niet gevonden", "Ongeldig token, probeer het opnieuw.", "Kan geen e-mail verzenden.", "Gebruikersaccount vergrendeld", "Toegang geweigerd.", "Inloggen mislukt, controleer gebruikersnaam en wachtwoord.", "Wachtwoordwijziging aangevraagd.", "IP-adres geblokkeerd, probeer het later opnieuw."];
279 + if (messageid > 0) {
280 + var msg = '';
281 + if ((messageid < 100) && (messageid < okmessages.length)) { msg = okmessages[messageid]; }
282 + else if ((messageid >= 100) && ((messageid - 100) < failmessages.length)) { msg = failmessages[messageid - 100]; }
283 + if (msg != '') {
284 + if (messageid >= 100) { msg = ('<span class="msg error"><b style=color:#8C001A>' + msg + '<b></span><br /><br />'); } else { msg = ('<span class="msg success"><b>' + msg + '</b></span><br /><br />'); }
285 + for (var i = 1; i < 7; i++) { QH('message' + i, msg); }
286 + }
287 + }
288 +
289 + // If URL arguments are provided, add them to form posts
290 + if (window.location.href.indexOf('?') > 0) {
291 + var urlargs = window.location.href.substring(window.location.href.indexOf('?'));
292 + Q('loginformargs').value = urlargs;
293 + Q('createformargs').value = urlargs;
294 + Q('resetformargs').value = urlargs;
295 + Q('tokenformargs').value = urlargs;
296 + Q('resettokenformargs').value = urlargs;
297 + Q('resetpasswordformargs').value = urlargs;
298 + }
299 +
300 + function startup() {
301 + if ((features & 32) == 0) {
302 + // Guard against other site's top frames (web bugs).
303 + var loc = null;
304 + try { loc = top.location.toString().toLowerCase(); } catch (e) { }
305 + if (top != self && (loc == null || top.active == false)) { top.location = self.location; return; }
306 + }
307 +
308 + if (features & 0x200000) { // Email is username
309 + QH('loginusername', "Email:");
310 + QH('resetAccountSpan', "Wachtwoord vergeten?");
311 + QV('nuUserRow', false);
312 + }
313 +
314 + QV('createPanelHint', passRequirements.hint === true);
315 + QV('resetpasswordpanelHint', passRequirements.hint === true);
316 +
317 + window.onresize = center;
318 + center();
319 + validateLogin();
320 + validateCreate();
321 + if (loginMode.length != 0) { go(parseInt(loginMode)); } else { go(1); }
322 + QV('newAccountDiv', (newAccount === '1') || (newAccount === 'true')); // If new accounts are not allowed, don't display the new account link.
323 + if ((passRequirements.hint === true) && (passhint != null) && (passhint.length > 0)) { QV('showPassHintLink', true); }
324 + QV('newAccountPass', (newAccountPass == 1));
325 + QV('resetAccountDiv', (emailCheck == true));
326 + QV('hrAccountDiv', (emailCheck == true) || (newAccountPass == 1));
327 +
328 + if (loginMode == '4') {
329 + try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
330 + QV('securityKeyButton', (hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn'));
331 + }
332 +
333 + if (loginMode == '5') {
334 + try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
335 + if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
336 + if (typeof hardwareKeyChallenge.challenge == 'string') { hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer; }
337 +
338 + publicKeyCredentialRequestOptions = { challenge: hardwareKeyChallenge.challenge, allowCredentials: [], timeout: hardwareKeyChallenge.timeout }
339 + for (var i = 0; i < hardwareKeyChallenge.keyIds.length; i++) {
340 + publicKeyCredentialRequestOptions.allowCredentials.push(
341 + { id: Uint8Array.from(atob(hardwareKeyChallenge.keyIds[i]), function (c) { return c.charCodeAt(0) }), type: 'public-key', transports: ['usb', 'ble', 'nfc'], }
342 + );
343 + }
344 +
345 + // New WebAuthn hardware keys
346 + navigator.credentials.get({ publicKey: publicKeyCredentialRequestOptions }).then(
347 + function (rawAssertion) {
348 + var assertion = {
349 + id: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.rawId))),
350 + clientDataJSON: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.clientDataJSON))),
351 + userHandle: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.userHandle))),
352 + signature: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.signature))),
353 + authenticatorData: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.authenticatorData))),
354 + };
355 + Q('resetHwtokenInput').value = JSON.stringify(assertion);
356 + QE('resetTokenOkButton', true);
357 + Q('resetTokenOkButton').click();
358 + },
359 + function (error) { console.log('credentials-get error', error); }
360 + );
361 + }
362 + }
363 + }
364 +
365 + // Use a hardware security key
366 + function useSecurityKey() {
367 + if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
368 + if (typeof hardwareKeyChallenge.challenge == 'string') { hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer; }
369 +
370 + publicKeyCredentialRequestOptions = { challenge: hardwareKeyChallenge.challenge, allowCredentials: [], timeout: hardwareKeyChallenge.timeout }
371 + for (var i = 0; i < hardwareKeyChallenge.keyIds.length; i++) {
372 + publicKeyCredentialRequestOptions.allowCredentials.push(
373 + { id: Uint8Array.from(atob(hardwareKeyChallenge.keyIds[i]), function (c) { return c.charCodeAt(0) }), type: 'public-key', transports: ['usb', 'ble', 'nfc'], }
374 + );
375 + }
376 +
377 + // New WebAuthn hardware keys
378 + navigator.credentials.get({ publicKey: publicKeyCredentialRequestOptions }).then(
379 + function (rawAssertion) {
380 + var assertion = {
381 + id: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.rawId))),
382 + clientDataJSON: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.clientDataJSON))),
383 + userHandle: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.userHandle))),
384 + signature: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.signature))),
385 + authenticatorData: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.authenticatorData))),
386 + };
387 + Q('hwtokenInput').value = JSON.stringify(assertion);
388 + QE('tokenOkButton', true);
389 + Q('tokenOkButton').click();
390 + },
391 + function (error) { console.log('credentials-get error', error); }
392 + );
393 + }
394 + }
395 +
396 + function showPassHint() {
397 + if (passRequirements.hint === true) { messagebox("wachtwoord hint", passhint); }
398 + }
399 +
400 + function xgo(x) {
401 + QV('message1', false);
402 + QV('message2', false);
403 + QV('message3', false);
404 + QV('message4', false);
405 + QV('message5', false);
406 + QV('message6', false);
407 + go(x);
408 + }
409 +
410 + function go(x) {
411 + currentpanel = x;
412 + setDialogMode(0);
413 + QV('showPassHintLink', false);
414 + QV('loginpanel', x == 1);
415 + QV('createpanel', x == 2);
416 + QV('resetpanel', x == 3);
417 + QV('tokenpanel', x == 4);
418 + QV('resettokenpanel', x == 5);
419 + QV('resetpasswordpanel', x == 6);
420 + if (x == 1) { Q('username').focus(); }
421 + if (x == 2) { if (features & 0x200000) { Q('aemail').focus(); } else { Q('ausername').focus(); } } // Email is username
422 + if (x == 3) { Q('remail').focus(); }
423 + if (x == 4) { Q('tokenInput').focus(); }
424 + if (x == 5) { Q('resetTokenInput').focus(); }
425 + if (x == 6) { Q('rapassword1').focus(); }
426 + }
427 +
428 + function validateLogin(box, e) {
429 + var ok = ((Q('username').value.length > 0) && (Q('username').value.indexOf(' ') == -1) && (Q('password').value.length > 0));
430 + QE('loginButton', ok);
431 + setDialogMode(0);
432 + if ((e != null) && (e.keyCode == 13)) { if (box == 1) { Q('password').focus(); } else if (box == 2) { Q('loginButton').click(); } }
433 + if (e != null) { haltEvent(e); }
434 + }
435 +
436 + function validateCreate(box,e) {
437 + setDialogMode(0);
438 + var ok = false;
439 + if (features & 0x200000) { ok = true; } else { ok = (Q('ausername').value.length > 0) && (Q('ausername').value.indexOf(' ') == -1) && (Q('ausername').value.indexOf('"') == -1) && (Q('ausername').value.indexOf(',') == -1); }
440 + ok &= ((validateEmail(Q('aemail').value) == true) && (Q('apassword1').value.length > 0) && (Q('apassword2').value == Q('apassword1').value));
441 + if ((newAccountPass == 1) && (Q('anewaccountpass').value.length == 0)) { ok = false; }
442 + if (Q('apassword1').value == '') {
443 + QH('passWarning', '');
444 + QV('passwordPolicyCallout', false);
445 + } else {
446 + if (!passRequirementsEx) {
447 + // No password requirements, display password strength
448 + var passStrength = checkPasswordStrength(Q('apassword1').value);
449 + if (passStrength >= 80) { QH('passWarning', '<span style=color:green><b>' + "Sterk wachtwoord" + '</b><span>'); }
450 + else if (passStrength >= 60) { QH('passWarning', '<span style=color:blue><b>' + "Goed wachtwoord" + '</b><span>'); }
451 + else { QH('passWarning', '<span style=color:red><b>' + "Zwak wachtwoord" + '</b><span>'); }
452 + } else {
453 + // Password requirements provided, use that
454 + var passReq = checkPasswordRequirements(Q('apassword1').value, passRequirements);
455 + if (passReq == false) {
456 + ok = false;
457 + //QS('nuPass1').color = '#7b241c';
458 + //QS('nuPass2').color = '#7b241c';
459 + QH('passWarning', '<span style=color:red><b>' + "Wachtwoord beleid" + '</b><span>'); // TODO: Display problem hint
460 + QV('passwordPolicyCallout', true);
461 + QH('passwordPolicyCallout', passwordPolicyText(Q('apassword1').value));
462 + } else {
463 + QH('passWarning', '');
464 + QV('passwordPolicyCallout', false);
465 + }
466 + }
467 + }
468 + QE('createButton', ok);
469 + if ((e != null) && (e.keyCode == 13)) {
470 + if (box == 1) { Q('aemail').focus(); }
471 + if (box == 2) { Q('apassword1').focus(); }
472 + if (box == 3) { Q('apassword2').focus(); }
473 + if (box == 4) { Q('apasswordhint').focus(); }
474 + if (box == 5) { if (newAccountPass == 1) { Q('anewaccountpass').focus(); } else { Q('createButton').click(); } }
475 + if (box == 6) { Q('createButton').click(); }
476 + }
477 + if (e != null) { haltEvent(e); }
478 + }
479 +
480 + function validatePassReset(box, e) {
481 + setDialogMode(0);
482 + var pass1ok = (Q('rapassword1').value.length > 0);
483 + var pass2ok = (Q('rapassword2').value.length > 0) && (Q('rapassword2').value == Q('rapassword1').value);
484 + var ok = (pass1ok && pass2ok);
485 +
486 + // Color the fields
487 + QS('rnuPass1').color = pass1ok ? 'black' : '#7b241c';
488 + QS('rnuPass2').color = pass2ok ? 'black' : '#7b241c';
489 +
490 + if (Q('rapassword1').value == '') {
491 + QH('rpassWarning', '');
492 + QV('rpasswordPolicyCallout', false);
493 + } else {
494 + if (!passRequirementsEx) {
495 + // No password requirements, display password strength
496 + var passStrength = checkPasswordStrength(Q('rapassword1').value);
497 + if (passStrength >= 80) { QH('rpassWarning', '<span style=color:green><b>' + "Sterk wachtwoord" + '</b><span>'); }
498 + else if (passStrength >= 60) { QH('rpassWarning', '<span style=color:blue><b>' + "Goed wachtwoord" + '</b><span>'); }
499 + else { QH('rpassWarning', '<span style=color:red><b>' + "Zwak wachtwoord" + '</b><span>'); }
500 + } else {
501 + // Password requirements provided, use that
502 + var passReq = checkPasswordRequirements(Q('rapassword1').value, passRequirements);
503 + if (passReq == false) {
504 + ok = false;
505 + QS('rnuPass1').color = '#7b241c';
506 + QS('rnuPass2').color = '#7b241c';
507 + QH('rpassWarning', '<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>' + "Wachtwoord beleid" + '</b><div>'); // This is also a link to the password policy
508 + QV('rpasswordPolicyCallout', true);
509 + QH('rpasswordPolicyCallout', passwordPolicyText(Q('rapassword1').value));
510 + } else {
511 + QH('rpassWarning', '');
512 + QV('rpasswordPolicyCallout', false);
513 + }
514 + }
515 + }
516 + if ((e != null) && (e.keyCode == 13)) {
517 + if (box == 2) { Q('rapassword1').focus(); }
518 + if (box == 3) { Q('rapassword2').focus(); }
519 + if (box == 4) { Q('rapasswordhint').focus(); }
520 + if (box == 6) { Q('resetPassButton').click(); }
521 + }
522 + if (e != null) { haltEvent(e); }
523 + QE('resetPassButton', ok);
524 + }
525 +
526 + function validateReset(e) {
527 + setDialogMode(0);
528 + var x = validateEmail(Q('remail').value);
529 + QE('eresetButton', x);
530 + if ((e != null) && (e.keyCode == 13) && (x == true)) { Q('eresetButton').click(); }
531 + if (e != null) { haltEvent(e); }
532 + }
533 +
534 + function passwordPolicyText(pass) {
535 + var policy = '<div style=text-align:left>';
536 + var counts = strCount(pass);
537 + if (passRequirements.min && ((pass == null) || (pass.length < passRequirements.min))) { policy += format("Minimale lengte van {0}", passRequirements.min) + '<br />'; }
538 + if (passRequirements.max && ((pass == null) || (pass.length > passRequirements.max))) { policy += format("Maximale lengte van {0}", passRequirements.max) + '<br />'; }
539 + if (passRequirements.upper && ((pass == null) || (counts.upper < passRequirements.upper))) { policy += format("{0} hoofdletters", passRequirements.upper) + '<br />'; }
540 + if (passRequirements.lower && ((pass == null) || (counts.lower < passRequirements.lower))) { policy += format("{0} kleine letters", passRequirements.lower) + '<br />'; }
541 + if (passRequirements.numeric && ((pass == null) || (counts.numeric < passRequirements.numeric))) { policy += format("{0} numeriek", passRequirements.numeric) + '<br />'; }
542 + if (passRequirements.nonalpha && ((pass == null) || (counts.nonalpha < passRequirements.nonalpha))) { policy += format("{0} niet-alfanumeriek", passRequirements.nonalpha) + '<br />'; }
543 + policy += '</div>';
544 + return policy;
545 + }
546 +
547 + // Return a password strength score
548 + function checkPasswordStrength(password) {
549 + var r = 0, letters = {}, varCount = 0, variations = { digits: /\d/.test(password), lower: /[a-z]/.test(password), upper: /[A-Z]/.test(password), nonWords: /\W/.test(password) }
550 + if (!password) return 0;
551 + for (var i = 0; i< password.length; i++) { letters[password[i]] = (letters[password[i]] || 0) + 1; r += 5.0 / letters[password[i]]; }
552 + for (var c in variations) { varCount += (variations[c] == true) ? 1 : 0; }
553 + return parseInt(r + (varCount - 1) * 10);
554 + }
555 +
556 + // Check password requirements
557 + function checkPasswordRequirements(password, requirements) {
558 + if ((requirements == null) || (requirements == '') || (typeof requirements != 'object')) return true;
559 + if (requirements.min) { if (password.length < requirements.min) return false; }
560 + if (requirements.max) { if (password.length > requirements.max) return false; }
561 + var counts = strCount(password);
562 + if (requirements.numeric && (counts.numeric < requirements.numeric)) return false;
563 + if (requirements.lower && (counts.lower < requirements.lower)) return false;
564 + if (requirements.upper && (counts.upper < requirements.upper)) return false;
565 + if (requirements.nonalpha && (counts.nonalpha < requirements.nonalpha)) return false;
566 + return true;
567 + }
568 +
569 + function strCount(password) {
570 + var counts = { numeric: 0, lower: 0, upper: 0, nonalpha: 0 };
571 + if (typeof password != 'string') return counts;
572 + for (var i = 0; i < password.length; i++) {
573 + if (/\d/.test(password[i])) { counts.numeric++; }
574 + if (/[a-z]/.test(password[i])) { counts.lower++; }
575 + if (/[A-Z]/.test(password[i])) { counts.upper++; }
576 + if (/\W/.test(password[i])) { counts.nonalpha++; }
577 + }
578 + return counts;
579 + }
580 +
581 + var xcheckTokenTimer = null;
582 + function checkTokenTimer(enter) {
583 + if ((enter == 0) && (xcheckTokenTimer != null)) { clearInterval(xcheckTokenTimer); xcheckTokenTimer = null; }
584 + if ((enter == 1) && (xcheckTokenTimer == null)) { xcheckTokenTimer = setInterval(checkToken, 200); }
585 + }
586 +
587 + function checkToken() {
588 + var t1 = Q('tokenInput').value, t2 = t1.split(' ').join('');
589 + if (t1 != t2) { Q('tokenInput').value = t2; }
590 + QE('tokenOkButton', (Q('tokenInput').value.length == 6) || (Q('tokenInput').value.length == 8) || (Q('tokenInput').value.length == 44));
591 + }
592 +
593 + function resetCheckToken() {
594 + var t1 = Q('resetTokenInput').value, t2 = t1.split(' ').join('');
595 + if (t1 != t2) { Q('resetTokenInput').value = t2; }
596 + QE('resetTokenOkButton', (Q('resetTokenInput').value.length == 6) || (Q('resetTokenInput').value.length == 8) || (Q('resetTokenInput').value.length == 44));
597 + }
598 +
599 + //
600 + // POPUP DIALOG
601 + //
602 +
603 + // undefined = Hidden, 1 = Generic Message
604 + var xxdialogMode;
605 + var xxdialogFunc;
606 + var xxdialogButtons;
607 + var xxdialogTag;
608 + var xxcurrentView = 0;
609 +
610 + // Display a dialog box
611 + // Parameters: Dialog Mode (0 = none), Dialog Title, Buttons (1 = OK, 2 = Cancel, 3 = OK & Cancel), Call back function(0 = Cancel, 1 = OK), Dialog Content (Mode 2 only)
612 + function setDialogMode(x, y, b, f, c, tag) {
613 + xxdialogMode = x;
614 + xxdialogFunc = f;
615 + xxdialogButtons = b;
616 + xxdialogTag = tag;
617 + QE('idx_dlgOkButton', true);
618 + QV('idx_dlgOkButton', b & 1);
619 + QV('idx_dlgCancelButton', b & 2);
620 + QV('id_dialogclose', (b & 2) || (b & 8));
621 + QV('idx_dlgButtonBar', b & 7);
622 + if (y) QH('id_dialogtitle', y);
623 + for (var i = 1; i < 24; i++) { QV('dialog' + i, i == x); } // Edit this line when more dialogs are added
624 + QV('dialog', x);
625 + if (c) { if (x == 2) { QH('id_dialogOptions', c); } else { QH('id_dialogMessage', c); } }
626 + }
627 +
628 + function dialogclose(x) {
629 + var f = xxdialogFunc;
630 + var b = xxdialogButtons;
631 + var t = xxdialogTag;
632 + setDialogMode();
633 + if (((b & 8) || x) && f) f(x, t);
634 + }
635 +
636 + function center() { QS('dialog').left = ((((getDocWidth() - 400) / 2)) + 'px'); }
637 + function messagebox(t, m) { QH('id_dialogMessage', m); setDialogMode(1, t, 1); }
638 + function statusbox(t, m) { QH('id_dialogMessage', m); setDialogMode(1, t); }
639 + function getDocWidth() { if (window.innerWidth) return window.innerWidth; if (document.documentElement && document.documentElement.clientWidth && document.documentElement.clientWidth != 0) return document.documentElement.clientWidth; return document.getElementsByTagName('body')[0].clientWidth; }
640 + function haltEvent(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; }
641 + function haltReturn(e) { if (e.keyCode == 13) { haltEvent(e); } }
642 + function validateEmail(v) { var emailReg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return emailReg.test(v); } // New version
643 + function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
644 +
645 + </script>
646 +
647 +</body></html>
\ No newline at end of file
views/translations/login_nl.handlebars new
+728
@@ -0,0 +1,728 @@
1 +<!DOCTYPE html><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head>
2 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 + <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
4 + <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 + <meta name="apple-mobile-web-app-capable" content="yes">
6 + <meta name="format-detection" content="telephone=no">
7 + <link rel="shortcut icon" type="image/x-icon" href="{{{domainurl}}}favicon.ico">
8 + <link keeplink="1" type="text/css" href="styles/style.css" media="screen" rel="stylesheet" title="CSS">
9 + <script type="text/javascript" src="scripts/common-0.0.1.js"></script>
10 + <script keeplink="1" type="text/javascript" src="scripts/u2f-api.js"></script>
11 + <title>{{{title}}} - Login</title>
12 +</head>
13 +<body id="body" onload="if (typeof(startup) !== 'undefined') startup();" class="arg_hide login">
14 + <div id="container">
15 + <div id="masthead">
16 + <div style="float:left">{{{titlehtml}}}</div>
17 + <div class="title">{{{title1}}}</div>
18 + <div class="title2">{{{title2}}}</div>
19 + </div>
20 + <div id="topbar" class="noselect style3" style="height:24px">
21 + <div id="uiMenuButton" title="Selectie gebruikersinterface" onclick="showUserInterfaceSelectMenu()">
22 + ♦
23 + <div id="uiMenu" style="display:none">
24 + <div id="uiViewButton1" class="uiSelector" onclick="userInterfaceSelectMenu(1)" title="Linkerbalk interface"><div class="uiSelector1"></div></div>
25 + <div id="uiViewButton2" class="uiSelector" onclick="userInterfaceSelectMenu(2)" title="Boven werkbalk interface"><div class="uiSelector2"></div></div>
26 + <div id="uiViewButton3" class="uiSelector" onclick="userInterfaceSelectMenu(3)" title="Interface met vaste breedte"><div class="uiSelector3"></div></div>
27 + <div id="uiViewButton4" class="uiSelector" onclick="toggleNightMode()" title="Wissel nachtmodus"><div class="uiSelector4"></div></div>
28 + </div>
29 + </div>
30 + </div>
31 + <div id="column_l">
32 + <h1>Welkom</h1>
33 + <div id="welcomeText" style="display:none">Maak overal ter wereld verbinding met uw thuis- of kantoorapparatuur via MeshCentral, de realtime, open source externe monitoring- en managementwebsite. U moet een beheeragent op uw computers downloaden en installeren. Na installatie verschijnen computers in het gedeelte "Mijn apparaten" van deze website en kunt u ze volgen en de controle over hen nemen.</div>
34 + <table id="centralTable" style="">
35 + <tbody><tr>
36 + <td id="welcomeimage">
37 + <picture>
38 + <img alt="" src="welcome.jpg" style="border-radius:20px">
39 + </picture>
40 + </td>
41 + <td id="logincell">
42 + <div id="loginpanel" style="display:none">
43 + <form method="post">
44 + <input type="hidden" name="action" value="login">
45 + <div id="message1"></div>
46 + <div>
47 + <b>Inloggen</b>
48 + </div>
49 + <table>
50 + <tbody><tr>
51 + <td id="loginusername" align="right" width="100">Gebruikersnaam:</td>
52 + <td><input id="username" type="text" maxlength="64" name="username" onchange="validateLogin(1)" onkeyup="validateLogin(1,event)"></td>
53 + </tr>
54 + <tr>
55 + <td align="right">Wachtwoord:</td>
56 + <td><input id="password" type="password" maxlength="256" name="password" autocomplete="off" onchange="validateLogin(2)" onkeyup="validateLogin(2,event)"></td>
57 + </tr>
58 + <tr>
59 + <td><div id="showPassHintLink" style="display:none"><a onclick="return showPassHint(event);" href="#" style="cursor:pointer">Toon hint</a></div></td>
60 + <td align="right"><input id="loginButton" type="submit" value="Inloggen" disabled="disabled"></td>
61 + </tr>
62 + </tbody></table>
63 + <div id="hrAccountDiv" style="display:none"><hr></div>
64 + <div id="resetAccountDiv" style="display:none;padding:2px">
65 + <span id="resetAccountSpan">Gebruikersnaam / wachtwoord vergeten?</span> <a onclick="return xgo(3,event);" href="#" style="cursor:pointer">Account opnieuw instellen</a>.
66 + </div>
67 + <div id="newAccountDiv" style="display:none;padding:2px">
68 + Heb je nog geen account? <a onclick="return xgo(2,event);" href="#" style="cursor:pointer">Creëer er een</a>.
69 + </div>
70 + <input id="loginformargs" name="urlargs" type="hidden" value="">
71 + </form>
72 + </div>
73 + <div id="createpanel" style="display:none;position:relative">
74 + <form method="post">
75 + <input type="hidden" name="action" value="createaccount">
76 + <div id="message2"></div>
77 + <div>
78 + <b>Gebruikersaccount aanmaken</b>
79 + </div>
80 + <div id="passwordPolicyCallout" style="display:none"></div>
81 + <table>
82 + <tbody><tr id="nuUserRow">
83 + <td id="nuUser" align="right" width="100">Gebruikersnaam:</td>
84 + <td><input id="ausername" type="text" name="username" onchange="validateCreate(1)" maxlength="64" onkeydown="haltReturn(event)" onkeyup="validateCreate(1,event)"></td>
85 + </tr>
86 + <tr>
87 + <td id="nuEmail" align="right" width="100">Email:</td>
88 + <td><input id="aemail" type="text" name="email" onchange="validateCreate(2)" maxlength="256" onkeydown="haltReturn(event)" onkeyup="validateCreate(2,event)"></td>
89 + </tr>
90 + <tr>
91 + <td id="nuPass1" align="right">Wachtwoord:</td>
92 + <td><input id="apassword1" type="password" name="password1" autocomplete="off" maxlength="256" onkeydown="haltReturn(event)" onchange="validateCreate(3,event)" onkeyup="validateCreate(3,event)"></td>
93 + </tr>
94 + <tr>
95 + <td id="nuPass2" align="right">Wachtwoord:</td>
96 + <td><input id="apassword2" type="password" name="password2" autocomplete="off" maxlength="256" onkeydown="haltReturn(event)" onchange="validateCreate(4,event)" onkeyup="validateCreate(4,event)"></td>
97 + </tr>
98 + <tr id="createPanelHint" style="display:none">
99 + <td id="nuHint" align="right">wachtwoord hint:</td>
100 + <td><input id="apasswordhint" type="text" name="apasswordhint" autocomplete="off" maxlength="256" onkeydown="haltReturn(event)" onchange="validateCreate(5,event)" onkeyup="validateCreate(5,event)"></td>
101 + </tr>
102 + <tr id="newAccountPass" title="Voer het token voor het maken van een account in">
103 + <td id="nuToken" align="right">Token aanmaken:</td>
104 + <td><input id="anewaccountpass" type="password" name="anewaccountpass" autocomplete="off" maxlength="256" onkeydown="haltReturn(event)" onchange="validateCreate(6,event)" onkeyup="validateCreate(6,event)"></td>
105 + </tr>
106 + <tr>
107 + <td colspan="2">
108 + <div style="float:right"><input id="createButton" type="submit" value="Account aanmaken" disabled="disabled"></div>
109 + <div id="passWarning" style="padding-top:6px"></div>
110 + </td>
111 + </tr>
112 + </tbody></table>
113 + <hr><a onclick="return xgo(1,event);" href="#" style="cursor:pointer">Terug naar inloggen</a>
114 + <input id="createformargs" name="urlargs" type="hidden" value="">
115 + </form>
116 + </div>
117 + <div id="resetpanel" style="display:none">
118 + <form method="post">
119 + <input type="hidden" name="action" value="resetaccount">
120 + <div id="message3"></div>
121 + <div>
122 + <b>Gebruikersaccount resetten</b>
123 + </div>
124 + <table>
125 + <tbody><tr>
126 + <td align="right" width="100">Email:</td>
127 + <td><input id="remail" type="text" name="email" maxlength="256" onchange="validateReset()" onkeyup="validateReset(event)"></td>
128 + </tr>
129 + <tr>
130 + <td colspan="2">
131 + <div style="float:right"><input id="eresetButton" type="submit" value="Account opnieuw instellen" disabled="disabled"></div>
132 + <div id="passWarning" style="padding-top:6px"></div>
133 + </td>
134 + </tr>
135 + </tbody></table>
136 + <hr><a onclick="return xgo(1,event);" href="#" style="cursor:pointer">Terug naar inloggen</a>
137 + <input id="resetformargs" name="urlargs" type="hidden" value="">
138 + </form>
139 + </div>
140 + <div id="tokenpanel" style="display:none">
141 + <form method="post" autocomplete="off">
142 + <input type="hidden" name="action" value="tokenlogin">
143 + <input type="hidden" name="hwstate" value="{{{hwstate}}}">
144 + <div id="message4"></div>
145 + <table>
146 + <tbody><tr>
147 + <td align="right" width="100">Inlog token:</td>
148 + <td>
149 + <input id="tokenInput" type="text" name="token" maxlength="50" onchange="checkToken(event)" onpaste="resetCheckToken(event)" onkeyup="checkToken(event)" onkeydown="checkToken(event)"><br>
150 + <input id="hwtokenInput" type="text" name="hwtoken" style="display:none">
151 + </td>
152 + </tr>
153 + <tr>
154 + <td colspan="2" style="align-content:center">
155 + <label><input id="tokenInputRemember" name="remembertoken" type="checkbox">Onthoud dit apparaat gedurende 30 dagen.</label>
156 + </td>
157 + </tr>
158 + <tr>
159 + <td colspan="2">
160 + <div style="float:right"><input id="tokenOkButton" type="submit" value="Inloggen" disabled="disabled"></div>
161 + <div style="float:right"><input style="display:none;float:right" id="securityKeyButton" type="button" value="Gebruik beveiligingssleutel" onclick="useSecurityKey()"></div>
162 + </td>
163 + </tr>
164 + </tbody></table>
165 + <hr><a onclick="return xgo(1,event);" href="#" style="cursor:pointer">Terug naar inloggen</a>
166 + <input id="tokenformargs" name="urlargs" type="hidden" value="">
167 + </form>
168 + </div>
169 + <div id="resettokenpanel" style="display:none">
170 + <form method="post">
171 + <input type="hidden" name="action" value="resetaccount">
172 + <div id="message5"></div>
173 + <table>
174 + <tbody><tr>
175 + <td align="right" width="100">Inlog token:</td>
176 + <td>
177 + <input id="resetTokenInput" type="text" name="token" maxlength="50" onchange="resetCheckToken(event)" onkeyup="resetCheckToken(event)" onkeydown="resetCheckToken(event)">
178 + <input id="resetHwtokenInput" type="text" name="hwtoken" style="display:none">
179 + </td>
180 + </tr>
181 + <tr>
182 + <td colspan="2">
183 + <div style="float:right"><input id="resetTokenOkButton" type="submit" value="Inloggen" disabled="disabled"></div>
184 + </td>
185 + </tr>
186 + </tbody></table>
187 + <hr><a onclick="return xgo(1,event);" href="#" style="cursor:pointer">Terug naar inloggen</a>
188 + <input id="resettokenformargs" name="urlargs" type="hidden" value="">
189 + </form>
190 + </div>
191 + <div id="resetpasswordpanel" style="display:none;position:relative">
192 + <form method="post">
193 + <input type="hidden" name="action" value="resetpassword">
194 + <div id="message6"></div>
195 + <div id="rpasswordPolicyCallout" style="display:none"></div>
196 + <table>
197 + <tbody><tr>
198 + <td id="rnuPass1" width="100" align="right">Wachtwoord:</td>
199 + <td><input id="rapassword1" type="password" name="rpassword1" autocomplete="off" maxlength="256" onkeydown="haltReturn(event)" onchange="validatePassReset(3,event)" onkeyup="validatePassReset(3,event)"></td>
200 + </tr>
201 + <tr>
202 + <td id="rnuPass2" align="right">Wachtwoord:</td>
203 + <td><input id="rapassword2" type="password" name="rpassword2" autocomplete="off" maxlength="256" onkeydown="haltReturn(event)" onchange="validatePassReset(4,event)" onkeyup="validatePassReset(4,event)"></td>
204 + </tr>
205 + <tr id="resetpasswordpanelHint" style="display:none">
206 + <td id="rnuHint" align="right">wachtwoord hint:</td>
207 + <td><input id="rapasswordhint" type="text" name="rpasswordhint" autocomplete="off" maxlength="256" onkeydown="haltReturn(event)" onchange="validatePassReset(5,event)" onkeyup="validatePassReset(5,event)"></td>
208 + </tr>
209 + <tr>
210 + <td colspan="2">
211 + <div style="float:right"><input id="resetPassButton" type="submit" value="Reset wachtwoord" disabled="disabled"></div>
212 + <div id="rpassWarning" style="padding-top:6px"></div>
213 + </td>
214 + </tr>
215 + </tbody></table>
216 + <hr><a onclick="return xgo(1,event);" href="#" style="cursor:pointer">Terug naar inloggen</a>
217 + <input id="resetpasswordformargs" name="urlargs" type="hidden" value="">
218 + </form>
219 + </div>
220 + </td>
221 + </tr>
222 + </tbody></table>
223 + <br>
224 + </div>
225 + <div id="footer">
226 + <div class="footer1">{{{footer}}}</div>
227 + <div class="footer2">
228 + {{{rootCertLink}}}
229 + &nbsp;<a href="terms">Voorwaarden &amp; Privacy</a>
230 + </div>
231 + </div>
232 +
233 + </div>
234 + <div id="dialog" style="display:none">
235 + <div id="dialogHeader">
236 + <div id="id_dialogclose" style="float:right;padding:5px;cursor:pointer" onclick="setDialogMode()"><b>X</b></div>
237 + <div id="id_dialogtitle" style="padding:5px"></div>
238 + <div style="width:100%;margin:6px"></div>
239 + </div>
240 + <div id="dialogBody">
241 + <div id="dialog1">
242 + <div id="id_dialogMessage" style=""></div>
243 + </div>
244 + <div id="dialog2" style="">
245 + <div id="id_dialogOptions"></div>
246 + </div>
247 + </div>
248 + <div id="idx_dlgButtonBar" style="">
249 + <input id="idx_dlgCancelButton" type="button" value="Afbreken" style="" onclick="dialogclose(0)">
250 + <input id="idx_dlgOkButton" type="button" value="Oke" style="" onclick="dialogclose(1)">
251 + </div>
252 + </div>
253 + <script>
254 + 'use strict';
255 + var passhint = '{{{passhint}}}';
256 + var loginMode = '{{{loginmode}}}';
257 + var newAccount = '{{{newAccount}}}';
258 + var newAccountPass = parseInt('{{{newAccountPass}}}');
259 + var emailCheck = ('{{{emailcheck}}}' == 'true');
260 + var passRequirements = '{{{passRequirements}}}';
261 + var hardwareKeyChallenge = decodeURIComponent('{{{hkey}}}');
262 + if (passRequirements != '') { passRequirements = JSON.parse(decodeURIComponent(passRequirements)); } else { passRequirements = {}; }
263 + var passRequirementsEx = ((passRequirements.min != null) || (passRequirements.max != null) || (passRequirements.upper != null) || (passRequirements.lower != null) || (passRequirements.numeric != null) || (passRequirements.nonalpha != null));
264 + var features = parseInt('{{{features}}}');
265 + var welcomeText = decodeURIComponent('{{{welcometext}}}');
266 + var currentpanel = 0;
267 + var uiMode = parseInt(getstore('uiMode', '1'));
268 + var webPageFullScreen = true;
269 + var nightMode = (getstore('_nightMode', '0') == '1');
270 + var publicKeyCredentialRequestOptions = null;
271 +
272 + // Display the right server message
273 + var messageid = parseInt('{{{messageid}}}');
274 + var okmessages = ['', "Wacht even, reset e-mail verzonden."];
275 + var failmessages = ["Kan geen account maken.", "Gebruikersaccount limiet bereikt.", "Bestaand account met dit e-mailadres.", "Ongeldig token voor het maken van een account.", "Gebruikersnaam bestaal al.", "Wachtwoord geweigerd, gebruik een ander.", "Ongeldige e-mail.", "Gebruikersaccount niet gevonden", "Ongeldig token, probeer het opnieuw.", "Kan geen e-mail verzenden.", "Gebruikersaccount vergrendeld", "Toegang geweigerd.", "Inloggen mislukt, controleer gebruikersnaam en wachtwoord.", "Wachtwoordwijziging aangevraagd.", "IP-adres geblokkeerd, probeer het later opnieuw."];
276 + if (messageid > 0) {
277 + var msg = '';
278 + if ((messageid < 100) && (messageid < okmessages.length)) { msg = okmessages[messageid]; }
279 + else if ((messageid >= 100) && ((messageid - 100) < failmessages.length)) { msg = failmessages[messageid - 100]; }
280 + if (msg != '') {
281 + if (messageid >= 100) { msg = ('<span class="msg error"><b style=color:#8C001A>' + msg + '<b></span><br /><br />'); } else { msg = ('<span class="msg success"><b>' + msg + '</b></span><br /><br />'); }
282 + for (var i = 1; i < 7; i++) { QH('message' + i, msg); }
283 + }
284 + }
285 +
286 + // If URL arguments are provided, add them to form posts
287 + if (window.location.href.indexOf('?') > 0) {
288 + var urlargs = window.location.href.substring(window.location.href.indexOf('?'));
289 + Q('loginformargs').value = urlargs;
290 + Q('createformargs').value = urlargs;
291 + Q('resetformargs').value = urlargs;
292 + Q('tokenformargs').value = urlargs;
293 + Q('resettokenformargs').value = urlargs;
294 + Q('resetpasswordformargs').value = urlargs;
295 + }
296 +
297 + //var webPageFullScreen = getstore('webPageFullScreen', true);
298 + //if (webPageFullScreen == 'false') { webPageFullScreen = false; }
299 + //if (webPageFullScreen == 'true') { webPageFullScreen = true; }
300 + //toggleFullScreen();
301 +
302 + function startup() {
303 + if ((features & 32) == 0) {
304 + // Guard against other site's top frames (web bugs).
305 + var loc = null;
306 + try { loc = top.location.toString().toLowerCase(); } catch (e) { }
307 + if (top != self && (loc == null || top.active == false)) { top.location = self.location; return; }
308 + }
309 +
310 + if (features & 0x200000) { // Email is username
311 + QH('loginusername', "Email:");
312 + QH('resetAccountSpan', "Wachtwoord vergeten?");
313 + QV('nuUserRow', false);
314 + }
315 +
316 + if (nightMode) { QC('body').add('night'); }
317 +
318 + QV('createPanelHint', passRequirements.hint === true);
319 + QV('resetpasswordpanelHint', passRequirements.hint === true);
320 +
321 + // Display the welcome text
322 + if (welcomeText) { QH('welcomeText', welcomeText); }
323 + QH('welcomeText', addTextLink('MeshCentral', Q('welcomeText').innerHTML, 'http://www.meshcommander.com/meshcentral2'));
324 + QV('welcomeText', true);
325 +
326 + window.onresize = center;
327 + center();
328 +
329 + validateLogin();
330 + validateCreate();
331 + if (loginMode.length != 0) { go(parseInt(loginMode)); } else { go(1); }
332 + QV('newAccountDiv', (newAccount === '1') || (newAccount === 'true')); // If new accounts are not allowed, don't display the new account link.
333 + if ((passhint != null) && (passhint.length > 0)) { QV('showPassHintLink', true); }
334 + QV('newAccountPass', (newAccountPass == 1));
335 + QV('resetAccountDiv', (emailCheck == true));
336 + QV('hrAccountDiv', (emailCheck == true) || (newAccountPass == 1));
337 +
338 + if (loginMode == '4') {
339 + try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
340 + QV('securityKeyButton', (hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn'));
341 + }
342 +
343 + if (loginMode == '5') {
344 + try { if (hardwareKeyChallenge.length > 0) { hardwareKeyChallenge = JSON.parse(hardwareKeyChallenge); } else { hardwareKeyChallenge = null; } } catch (ex) { hardwareKeyChallenge = null }
345 + if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
346 + if (typeof hardwareKeyChallenge.challenge == 'string') { hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer; }
347 +
348 + publicKeyCredentialRequestOptions = { challenge: hardwareKeyChallenge.challenge, allowCredentials: [], timeout: hardwareKeyChallenge.timeout }
349 + for (var i = 0; i < hardwareKeyChallenge.keyIds.length; i++) {
350 + publicKeyCredentialRequestOptions.allowCredentials.push(
351 + { id: Uint8Array.from(atob(hardwareKeyChallenge.keyIds[i]), function (c) { return c.charCodeAt(0) }), type: 'public-key', transports: ['usb', 'ble', 'nfc'], }
352 + );
353 + }
354 +
355 + // New WebAuthn hardware keys
356 + navigator.credentials.get({ publicKey: publicKeyCredentialRequestOptions }).then(
357 + function (rawAssertion) {
358 + var assertion = {
359 + id: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.rawId))),
360 + clientDataJSON: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.clientDataJSON))),
361 + userHandle: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.userHandle))),
362 + signature: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.signature))),
363 + authenticatorData: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.authenticatorData))),
364 + };
365 + Q('resetHwtokenInput').value = JSON.stringify(assertion);
366 + QE('resetTokenOkButton', true);
367 + Q('resetTokenOkButton').click();
368 + },
369 + function (error) { console.log('credentials-get error', error); }
370 + );
371 + }
372 + }
373 +
374 + // Setup the user interface in the right mode
375 + userInterfaceSelectMenu();
376 + }
377 +
378 + // Use a hardware security key
379 + function useSecurityKey() {
380 + if ((hardwareKeyChallenge != null) && (hardwareKeyChallenge.type == 'webAuthn')) {
381 + if (typeof hardwareKeyChallenge.challenge == 'string') { hardwareKeyChallenge.challenge = Uint8Array.from(atob(hardwareKeyChallenge.challenge), function (c) { return c.charCodeAt(0) }).buffer; }
382 +
383 + publicKeyCredentialRequestOptions = { challenge: hardwareKeyChallenge.challenge, allowCredentials: [], timeout: hardwareKeyChallenge.timeout }
384 + for (var i = 0; i < hardwareKeyChallenge.keyIds.length; i++) {
385 + publicKeyCredentialRequestOptions.allowCredentials.push(
386 + { id: Uint8Array.from(atob(hardwareKeyChallenge.keyIds[i]), function (c) { return c.charCodeAt(0) }), type: 'public-key', transports: ['usb', 'ble', 'nfc'], }
387 + );
388 + }
389 +
390 + // New WebAuthn hardware keys
391 + navigator.credentials.get({ publicKey: publicKeyCredentialRequestOptions }).then(
392 + function (rawAssertion) {
393 + var assertion = {
394 + id: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.rawId))),
395 + clientDataJSON: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.clientDataJSON))),
396 + userHandle: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.userHandle))),
397 + signature: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.signature))),
398 + authenticatorData: btoa(String.fromCharCode.apply(null, new Uint8Array(rawAssertion.response.authenticatorData))),
399 + };
400 + Q('hwtokenInput').value = JSON.stringify(assertion);
401 + QE('tokenOkButton', true);
402 + Q('tokenOkButton').click();
403 + },
404 + function (error) { console.log('credentials-get error', error); }
405 + );
406 + }
407 + }
408 +
409 + function showPassHint(e) {
410 + messagebox("wachtwoord hint", passhint);
411 + haltEvent(e);
412 + return false;
413 + }
414 +
415 + function xgo(x, e) {
416 + QV('message1', false);
417 + QV('message2', false);
418 + QV('message3', false);
419 + QV('message4', false);
420 + QV('message5', false);
421 + QV('message6', false);
422 + go(x);
423 + haltEvent(e);
424 + return false;
425 + }
426 +
427 + function go(x) {
428 + currentpanel = x;
429 + setDialogMode(0);
430 + QV('showPassHintLink', false);
431 + QV('loginpanel', x == 1);
432 + QV('createpanel', x == 2);
433 + QV('resetpanel', x == 3);
434 + QV('tokenpanel', x == 4);
435 + QV('resettokenpanel', x == 5);
436 + QV('resetpasswordpanel', x == 6);
437 + if (x == 1) { Q('username').focus(); }
438 + if (x == 2) { if (features & 0x200000) { Q('aemail').focus(); } else { Q('ausername').focus(); } } // Email is username
439 + if (x == 3) { Q('remail').focus(); }
440 + if (x == 4) { Q('tokenInput').focus(); }
441 + if (x == 5) { Q('resetTokenInput').focus(); }
442 + if (x == 6) { Q('rapassword1').focus(); }
443 + }
444 +
445 + function validateLogin(box, e) {
446 + var ok = ((Q('username').value.length > 0) && (Q('username').value.indexOf(' ') == -1) && (Q('password').value.length > 0));
447 + QE('loginButton', ok);
448 + setDialogMode(0);
449 + if ((e != null) && (e.keyCode == 13)) { if ((box == 1) && (Q('username').value != '')) { Q('password').focus(); } else if ((box == 2) && (Q('password').value != '')) { Q('loginButton').click(); } }
450 + if (e != null) { haltEvent(e); }
451 + }
452 +
453 + function validateCreate(box, e) {
454 + setDialogMode(0);
455 + var userok = false;
456 + if (features & 0x200000) { userok = true; } else { userok = (Q('ausername').value.length > 0) && (Q('ausername').value.indexOf(' ') == -1) && (Q('ausername').value.indexOf('"') == -1) && (Q('ausername').value.indexOf(',') == -1); }
457 + var emailok = (validateEmail(Q('aemail').value) == true);
458 + var pass1ok = (Q('apassword1').value.length > 0);
459 + var pass2ok = (Q('apassword2').value.length > 0) && (Q('apassword2').value == Q('apassword1').value);
460 + var newAccOk = (newAccountPass == 0) || (Q('anewaccountpass').value.length > 0);
461 + var ok = (userok && emailok && pass1ok && pass2ok && newAccOk);
462 +
463 + // Color the fields
464 + QS('nuUser').color = userok?'black':'#7b241c';
465 + QS('nuEmail').color = emailok?'black':'#7b241c';
466 + QS('nuPass1').color = pass1ok?'black':'#7b241c';
467 + QS('nuPass2').color = pass2ok?'black':'#7b241c';
468 + QS('nuToken').color = newAccOk?'black':'#7b241c';
469 +
470 + if (Q('apassword1').value == '') {
471 + QH('passWarning', '');
472 + QV('passwordPolicyCallout', false);
473 + } else {
474 + if (!passRequirementsEx) {
475 + // No password requirements, display password strength
476 + var passStrength = checkPasswordStrength(Q('apassword1').value);
477 + if (passStrength >= 80) { QH('passWarning', '<span style=color:green><b>' + "Sterk wachtwoord" + '</b><span>'); }
478 + else if (passStrength >= 60) { QH('passWarning', '<span style=color:blue><b>' + "Goed wachtwoord" + '</b><span>'); }
479 + else { QH('passWarning', '<span style=color:red><b>' + "Zwak wachtwoord" + '</b><span>'); }
480 + } else {
481 + // Password requirements provided, use that
482 + var passReq = checkPasswordRequirements(Q('apassword1').value, passRequirements);
483 + if (passReq == false) {
484 + ok = false;
485 + QS('nuPass1').color = '#7b241c';
486 + QS('nuPass2').color = '#7b241c';
487 + QH('passWarning', '<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>' + "Wachtwoord beleid" + '</b><div>'); // This is also a link to the password policy
488 + QV('passwordPolicyCallout', true);
489 + QH('passwordPolicyCallout', passwordPolicyText(Q('apassword1').value));
490 + } else {
491 + QH('passWarning', '');
492 + QV('passwordPolicyCallout', false);
493 + }
494 + }
495 + }
496 + if ((e != null) && (e.keyCode == 13)) {
497 +
498 + if ((box == 1) && userok) { Q('aemail').focus(); }
499 + if ((box == 2) && emailok) { Q('apassword1').focus(); }
500 + if ((box == 3) && pass1ok) { Q('apassword2').focus(); }
501 + if ((box == 4) && pass2ok) { if (passRequirements.hint === true) { Q('apasswordhint').focus(); } else { box = 5; } }
502 + if (box == 5) { if (newAccountPass == 1) { Q('anewaccountpass').focus(); } else { box = 6; } }
503 + if (box == 6) { Q('createButton').click(); }
504 + }
505 + if (e != null) { haltEvent(e); }
506 + QE('createButton', ok);
507 + }
508 +
509 + function validatePassReset(box, e) {
510 + setDialogMode(0);
511 + var pass1ok = (Q('rapassword1').value.length > 0);
512 + var pass2ok = (Q('rapassword2').value.length > 0) && (Q('rapassword2').value == Q('rapassword1').value);
513 + var ok = (pass1ok && pass2ok);
514 +
515 + // Color the fields
516 + QS('rnuPass1').color = pass1ok ? 'black' : '#7b241c';
517 + QS('rnuPass2').color = pass2ok ? 'black' : '#7b241c';
518 +
519 + if (Q('rapassword1').value == '') {
520 + QH('rpassWarning', '');
521 + QV('rpasswordPolicyCallout', false);
522 + } else {
523 + if (!passRequirementsEx) {
524 + // No password requirements, display password strength
525 + var passStrength = checkPasswordStrength(Q('rapassword1').value);
526 + if (passStrength >= 80) { QH('rpassWarning', '<span style=color:green><b>' + "Sterk wachtwoord" + '</b><span>'); }
527 + else if (passStrength >= 60) { QH('rpassWarning', '<span style=color:blue><b>' + "Goed wachtwoord" + '</b><span>'); }
528 + else { QH('rpassWarning', '<span style=color:red><b>' + "Zwak wachtwoord" + '</b><span>'); }
529 + } else {
530 + // Password requirements provided, use that
531 + var passReq = checkPasswordRequirements(Q('rapassword1').value, passRequirements);
532 + if (passReq == false) {
533 + ok = false;
534 + QS('rnuPass1').color = '#7b241c';
535 + QS('rnuPass2').color = '#7b241c';
536 + QH('rpassWarning', '<div style=color:red;cursor:pointer onclick=showPasswordPolicy()><b>' + "Wachtwoord beleid" + '</b><div>'); // This is also a link to the password policy
537 + QV('rpasswordPolicyCallout', true);
538 + QH('rpasswordPolicyCallout', passwordPolicyText(Q('rapassword1').value));
539 + } else {
540 + QH('rpassWarning', '');
541 + QV('rpasswordPolicyCallout', false);
542 + }
543 + }
544 + }
545 + if ((e != null) && (e.keyCode == 13)) {
546 + if (box == 2) { Q('rapassword1').focus(); }
547 + if (box == 3) { Q('rapassword2').focus(); }
548 + if (box == 4) { Q('rapasswordhint').focus(); }
549 + if (box == 6) { Q('resetPassButton').click(); }
550 + }
551 + if (e != null) { haltEvent(e); }
552 + QE('resetPassButton', ok);
553 + }
554 +
555 + function passwordPolicyText(pass) {
556 + var policy = '<div style=text-align:left>';
557 + var counts = strCount(pass);
558 + if (passRequirements.min && ((pass == null) || (pass.length < passRequirements.min))) { policy += format("Minimale lengte van {0}", passRequirements.min) + '<br />'; }
559 + if (passRequirements.max && ((pass == null) || (pass.length > passRequirements.max))) { policy += format("Maximale lengte van {0}", passRequirements.max) + '<br />'; }
560 + if (passRequirements.upper && ((pass == null) || (counts.upper < passRequirements.upper))) { policy += format("{0} hoofdletters", passRequirements.upper) + '<br />'; }
561 + if (passRequirements.lower && ((pass == null) || (counts.lower < passRequirements.lower))) { policy += format("{0} kleine letters", passRequirements.lower) + '<br />'; }
562 + if (passRequirements.numeric && ((pass == null) || (counts.numeric < passRequirements.numeric))) { policy += format("{0} numeriek", passRequirements.numeric) + '<br />'; }
563 + if (passRequirements.nonalpha && ((pass == null) || (counts.nonalpha < passRequirements.nonalpha))) { policy += format("{0} niet-alfanumeriek", passRequirements.nonalpha) + '<br />'; }
564 + policy += '</div>';
565 + return policy;
566 + }
567 +
568 + function showPasswordPolicy() {
569 + messagebox("Wachtwoord beleid", passwordPolicyText());
570 + }
571 +
572 + function validateReset(e) {
573 + setDialogMode(0);
574 + var x = validateEmail(Q('remail').value);
575 + QE('eresetButton', x);
576 + if ((e != null) && (e.keyCode == 13) && (x == true)) {
577 + Q('eresetButton').click();
578 + }
579 + if (e != null) { haltEvent(e); }
580 + }
581 +
582 + // Return a password strength score
583 + function checkPasswordStrength(password) {
584 + var r = 0, letters = {}, varCount = 0, variations = { digits: /\d/.test(password), lower: /[a-z]/.test(password), upper: /[A-Z]/.test(password), nonWords: /\W/.test(password) }
585 + if (!password) return 0;
586 + for (var i = 0; i< password.length; i++) { letters[password[i]] = (letters[password[i]] || 0) + 1; r += 5.0 / letters[password[i]]; }
587 + for (var c in variations) { varCount += (variations[c] == true) ? 1 : 0; }
588 + return parseInt(r + (varCount - 1) * 10);
589 + }
590 +
591 + // Check password requirements
592 + function checkPasswordRequirements(password, requirements) {
593 + if ((requirements == null) || (requirements == '') || (typeof requirements != 'object')) return true;
594 + if (requirements.min) { if (password.length < requirements.min) return false; }
595 + if (requirements.max) { if (password.length > requirements.max) return false; }
596 + var counts = strCount(password);
597 + if (requirements.numeric && (counts.numeric < requirements.numeric)) return false;
598 + if (requirements.lower && (counts.lower < requirements.lower)) return false;
599 + if (requirements.upper && (counts.upper < requirements.upper)) return false;
600 + if (requirements.nonalpha && (counts.nonalpha < requirements.nonalpha)) return false;
601 + return true;
602 + }
603 +
604 + function strCount(password) {
605 + var counts = { numeric: 0, lower: 0, upper: 0, nonalpha: 0 };
606 + if (typeof password != 'string') return counts;
607 + for (var i = 0; i < password.length; i++) {
608 + if (/\d/.test(password[i])) { counts.numeric++; }
609 + if (/[a-z]/.test(password[i])) { counts.lower++; }
610 + if (/[A-Z]/.test(password[i])) { counts.upper++; }
611 + if (/\W/.test(password[i])) { counts.nonalpha++; }
612 + }
613 + return counts;
614 + }
615 +
616 + function checkToken() {
617 + var t1 = Q('tokenInput').value;
618 + var t2 = t1.split(' ').join('');
619 + if (t1 != t2) { Q('tokenInput').value = t2; }
620 + QE('tokenOkButton', (Q('tokenInput').value.length == 6) || (Q('tokenInput').value.length == 8) || (Q('tokenInput').value.length == 44));
621 + }
622 +
623 + function resetCheckToken() {
624 + var t1 = Q('resetTokenInput').value;
625 + var t2 = t1.split(' ').join('');
626 + if (t1 != t2) { Q('resetTokenInput').value = t2; }
627 + QE('resetTokenOkButton', (Q('resetTokenInput').value.length == 6) || (Q('resetTokenInput').value.length == 8) || (Q('resetTokenInput').value.length == 44));
628 + }
629 +
630 + //
631 + // POPUP DIALOG
632 + //
633 +
634 + // undefined = Hidden, 1 = Generic Message
635 + var xxdialogMode;
636 + var xxdialogFunc;
637 + var xxdialogButtons;
638 + var xxdialogTag;
639 + var xxcurrentView = 0;
640 +
641 + // Display a dialog box
642 + // Parameters: Dialog Mode (0 = none), Dialog Title, Buttons (1 = OK, 2 = Cancel, 3 = OK & Cancel), Call back function(0 = Cancel, 1 = OK), Dialog Content (Mode 2 only)
643 + function setDialogMode(x, y, b, f, c, tag) {
644 + xxdialogMode = x;
645 + xxdialogFunc = f;
646 + xxdialogButtons = b;
647 + xxdialogTag = tag;
648 + QE('idx_dlgOkButton', true);
649 + QV('idx_dlgOkButton', b & 1);
650 + QV('idx_dlgCancelButton', b & 2);
651 + QV('id_dialogclose', (b & 2) || (b & 8));
652 + QV('idx_dlgButtonBar', b & 7);
653 + if (y) QH('id_dialogtitle', y);
654 + for (var i = 1; i < 24; i++) { QV('dialog' + i, i == x); } // Edit this line when more dialogs are added
655 + QV('dialog', x);
656 + if (c) { if (x == 2) { QH('id_dialogOptions', c); } else { QH('id_dialogMessage', c); } }
657 + }
658 +
659 + function dialogclose(x) {
660 + var f = xxdialogFunc;
661 + var b = xxdialogButtons;
662 + var t = xxdialogTag;
663 + setDialogMode();
664 + if (((b & 8) || x) && f) f(x, t);
665 + }
666 +
667 + // Toggle the web page to full screen
668 + function toggleFullScreen(toggle) {
669 + //if (toggle === 1) { webPageFullScreen = !webPageFullScreen; putstore('webPageFullScreen', webPageFullScreen); }
670 + if (webPageFullScreen == false) {
671 + // By adding body class, it will change a style of all ellements using CSS selector
672 + // No need for JS anymore and it will be consistent style for all the templates.
673 + QC('body').remove('fullscreen');
674 + } else {
675 + QC('body').add('fullscreen');
676 + }
677 + QV('body', true);
678 + center();
679 + }
680 +
681 + // Toggle user interface menu
682 + function showUserInterfaceSelectMenu() {
683 + Q('uiViewButton1').classList.remove('uiSelectorSel');
684 + Q('uiViewButton2').classList.remove('uiSelectorSel');
685 + Q('uiViewButton3').classList.remove('uiSelectorSel');
686 + try { Q('uiViewButton' + uiMode).classList.add('uiSelectorSel'); } catch (ex) { }
687 + QV('uiMenu', (QS('uiMenu').display == 'none'));
688 + if (nightMode) { Q('uiViewButton4').classList.add('uiSelectorSel'); }
689 + }
690 +
691 + function userInterfaceSelectMenu(s) {
692 + if (s) { uiMode = s; putstore('uiMode', uiMode); }
693 + webPageFullScreen = (uiMode < 3);
694 + //webPageStackMenu = (uiMode > 1);
695 + toggleFullScreen(0);
696 + //toggleStackMenu(0);
697 + }
698 +
699 + function toggleNightMode() {
700 + nightMode = !nightMode;
701 + if (nightMode) { QC('body').add('night'); } else { QC('body').remove('night'); }
702 + putstore('_nightMode', (nightMode ? '1' : '0'));
703 + }
704 +
705 + function center() {
706 + /* Now we use CSS media to achive the same effect as deleted JS */
707 + if (webPageFullScreen == false) {
708 + QS('centralTable')['margin-top'] = '';
709 + } else {
710 + var h = ((Q('column_l').clientHeight) / 2) - 220;
711 + if (h < 0) h = 0;
712 + QS('centralTable')['margin-top'] = h + 'px';
713 + }
714 + }
715 + function messagebox(t, m) { QH('id_dialogMessage', m); setDialogMode(1, t, 1); }
716 + function statusbox(t, m) { QH('id_dialogMessage', m); setDialogMode(1, t); }
717 + function getDocWidth() { if (window.innerWidth) return window.innerWidth; if (document.documentElement && document.documentElement.clientWidth && document.documentElement.clientWidth != 0) return document.documentElement.clientWidth; return document.getElementsByTagName('body')[0].clientWidth; }
718 + function haltEvent(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; }
719 + function haltReturn(e) { if (e.keyCode == 13) { haltEvent(e); } }
720 + function validateEmail(v) { var emailReg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return emailReg.test(v); } // New version
721 + function putstore(name, val) { try { if (typeof (localStorage) === 'undefined') return; localStorage.setItem(name, val); } catch (e) { } }
722 + function getstore(name, val) { try { if (typeof (localStorage) === 'undefined') return val; var v = localStorage.getItem(name); if ((v == null) || (v == null)) return val; return v; } catch (e) { return val; } }
723 + function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
724 + function addTextLink(subtext, text, link) { var i = text.toLowerCase().indexOf(subtext.toLowerCase()); if (i == -1) { return text; } return text.substring(0, i) + '<a href=\"' + link + '\">' + subtext + '</a>' + text.substring(i + subtext.length); }
725 +
726 + </script>
727 +
728 +</body></html>
\ No newline at end of file
views/translations/message-min_cs.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title}}} - {{{title3}}}</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>{{{title3}}}</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=terms>Podmínky &amp; soukromí</a></table></div></div></div>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title}}} - {{{title3}}}</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>{{{title3}}}</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=terms>Podmínky &amp; soukromí</a></table></div></div></div>
\ No newline at end of file
views/translations/message-min_fr.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title}}} - {{{title3}}}</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>{{{title3}}}</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=terms>Terms &amp; Privacy</a></table></div></div></div>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title}}} - {{{title3}}}</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>{{{title3}}}</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=terms>Terms &amp; Privacy</a></table></div></div></div>
\ No newline at end of file
views/translations/message-min_ja.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title}}} - {{{title3}}}</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>{{{title3}}}</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=terms>利用規約とプライバシー</a></table></div></div></div>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title}}} - {{{title3}}}</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>{{{title3}}}</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=terms>利用規約とプライバシー</a></table></div></div></div>
\ No newline at end of file
views/translations/message-min_nl.handlebars new
+1
@@ -0,0 +1 @@
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title}}} - {{{title3}}}</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>{{{title3}}}</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=terms>Voorwaarden &amp; Privacy</a></table></div></div></div>
\ No newline at end of file
views/translations/message-min_pt.handlebars
+1 -1
@@ -1 +1 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title}}} - {{{title3}}}</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>{{{title3}}}</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=terms>Termos &amp; Privacidade</a></table></div></div></div>
\ No newline at end of file
1 +<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=/styles/style.css media=screen rel=stylesheet title=CSS><title>{{{title}}} - {{{title3}}}</title><div id=container style=max-height:100vh><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=max-height:calc(100vh-138px)><div id=column_l><h1>{{{title3}}}</h1><p style=margin-left:20px>{{{message}}}</p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=terms>Termos &amp; Privacidade</a></table></div></div></div>
\ No newline at end of file
views/translations/message_cs.handlebars
+1 -1
@@ -12,7 +12,7 @@
12 <div id="mastheadx"></div>
13 <div id="masthead" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden">
14 <div style="float:left">{{{titlehtml}}}</div>
15 - <div style="float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px">
15 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px">
16 <strong><font style="font-size:46px;font-family:Arial,Helvetica,sans-serif">{{{title1}}}</font></strong>
17 </div>
18 <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px">
views/translations/message_fr.handlebars
+1 -1
@@ -12,7 +12,7 @@
12 <div id="mastheadx"></div>
13 <div id="masthead" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden">
14 <div style="float:left">{{{titlehtml}}}</div>
15 - <div style="float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px">
15 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px">
16 <strong><font style="font-size:46px;font-family:Arial,Helvetica,sans-serif">{{{title1}}}</font></strong>
17 </div>
18 <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px">
views/translations/message_ja.handlebars
+1 -1
@@ -12,7 +12,7 @@
12 <div id="mastheadx"></div>
13 <div id="masthead" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden">
14 <div style="float:left">{{{titlehtml}}}</div>
15 - <div style="float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px">
15 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px">
16 <strong><font style="font-size:46px;font-family:Arial,Helvetica,sans-serif">{{{title1}}}</font></strong>
17 </div>
18 <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px">
views/translations/message_nl.handlebars new
+41
@@ -0,0 +1,41 @@
1 +<!DOCTYPE html><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head>
2 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 + <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
4 + <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 + <meta name="apple-mobile-web-app-capable" content="yes">
6 + <meta name="format-detection" content="telephone=no">
7 + <link type="text/css" href="/styles/style.css" media="screen" rel="stylesheet" title="CSS">
8 + <title>{{{title}}} - {{{title3}}}</title>
9 +</head>
10 +<body>
11 + <div id="container" style="max-height:100vh">
12 + <div id="mastheadx"></div>
13 + <div id="masthead" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden">
14 + <div style="float:left">{{{titlehtml}}}</div>
15 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px">
16 + <strong><font style="font-size:46px;font-family:Arial,Helvetica,sans-serif">{{{title1}}}</font></strong>
17 + </div>
18 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px">
19 + <strong><font style="font-size:14px;font-family:Arial,Helvetica,sans-serif">{{{title2}}}</font></strong>
20 + </div>
21 + </div>
22 + <div id="page_content" style="max-height:calc(100vh-138px)">
23 + <div id="column_l">
24 + <h1>{{{title3}}}</h1>
25 + <p style="margin-left:20px">{{{message}}}</p>
26 + <br>
27 + </div>
28 + <div id="footer">
29 + <table cellpadding="0" cellspacing="10" style="width:100%">
30 + <tbody><tr>
31 + <td style="text-align:left"></td>
32 + <td style="text-align:right">
33 + <a href="terms">Voorwaarden &amp; Privacy</a>
34 + </td>
35 + </tr>
36 + </tbody></table>
37 + </div>
38 + </div>
39 + </div>
40 +
41 +</body></html>
\ No newline at end of file
views/translations/message_pt.handlebars
+1 -1
@@ -12,7 +12,7 @@
12 <div id="mastheadx"></div>
13 <div id="masthead" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden">
14 <div style="float:left">{{{titlehtml}}}</div>
15 - <div style="float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px">
15 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px">
16 <strong><font style="font-size:46px;font-family:Arial,Helvetica,sans-serif">{{{title1}}}</font></strong>
17 </div>
18 <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px">
views/translations/messenger-min_nl.handlebars new
+1
@@ -0,0 +1 @@
1 +<!doctypehtml><html style=height:100%><title>{{{title}}} - Messenger</title><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><link type=text/css href=styles/messenger.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/filesaver.js></script><body style=font-family:Arial,Helvetica,sans-serif><div id=xtop style="position:absolute;left:0;right:0;top:0;height:38px;background-color:#036;color:#c8c8c8;box-shadow:3px 3px 10px gray"><div style=position:absolute;background-color:#036;right:0;height:38px><div id=notifyButton class="icon13 topButton"style=margin-right:4px;display:none title="Schakel browsermelding in"onclick=enableNotificationsButtonClick()></div><div id=fileButton class="icon4 topButton"title="Deel een bestand"style=display:none onclick=fileButtonClick()></div><div id=camButton class="icon2 topButton"title="Activeer camera &amp; microfoon"style=display:none onclick=camButtonClick()></div><div id=micButton class="icon6 topButton"title="Activeer microfoon"style=display:none onclick=micButtonClick()></div><div id=hangupButton class="icon11 topRedButton"title=Vastlopen style=display:none onclick=hangUpButtonClick(1)></div></div><div style=padding-top:9px;padding-left:6px;font-size:20px;display:inline-block><b><span id=xtitle>MeshMessenger</span></b></div></div><div id=xmiddle style=position:absolute;left:0;right:0;top:38px;bottom:30px><div style=position:absolute;left:0;right:0;top:0;bottom:0;overflow-y:scroll><div id=xmsg style=position:absolute;left:0;right:0;bottom:0;padding:5px></div></div></div><div id=xbottom style=position:absolute;left:0;right:0;bottom:0;height:30px;background-color:#036><div style=position:absolute;left:5px;right:215px;bottom:4px;top:4px;background-color:#f0f8ff><input id=xouttext style="width:calc(100% - 5px)"onfocus=onUserInputFocus(1) onblur=onUserInputFocus(0)></div><input type=button id=sendButton value=verzenden style=position:absolute;right:110px;width:100px;top:4px onclick=xsend(event)> <input type=button id=clearButton value=Wissen style=position:absolute;right:5px;width:100px;top:4px onclick=displayClear()></div><div id=remoteVideo style="position:absolute;right:24px;top:45px;width:320px;height:calc(240px + 30px);background-color:gray;border-radius:12px 12px 12px 12px;box-shadow:3px 3px 10px gray;display:none"><div style=position:absolute;right:0;left:0;top:2.5px;text-align:center>Extern</div><video id=remoteVideoCanvas autoplay style="position:absolute;top:20px;left:0;width:100%;height:calc(100% - 30px);background-color:#000"></video></div><div id=localVideo style="position:absolute;right:24px;top:320px;width:160px;height:calc(120px + 30px);background-color:gray;border-radius:12px 12px 12px 12px;box-shadow:3px 3px 10px gray;display:none"><div style=position:absolute;right:0;left:0;top:2.5px;text-align:center>Lokaal</div><video id=localVideoCanvas autoplay muted style="position:absolute;top:20px;left:0;width:100%;height:calc(100% - 30px);background-color:#000"></video></div><input id=uploadFileInput type=file multiple style=display:none><script onunload=onUnLoad()>var userInputFocus=0,args=parseUriArgs(),socket=null,state=0,random=Math.random(),webrtcSessions={},webchannel=null,localStream=null,remoteStream=null,multiWebRtc=!0,userMediaSupport=0,notification=null;getUserMediaSupport(function(e){userMediaSupport=e});var webrtcconfiguration="{{{webrtconfig}}}";if(""==webrtcconfiguration)webrtcconfiguration=null;else try{webrtcconfiguration=JSON.parse(decodeURIComponent(webrtcconfiguration))}catch(e){console.log('Invalid WebRTC config: "'+webrtcconfiguration+'".'),webrtcconfiguration=null}var fileUploads=[],fileDownloads={},currentFileUpload=null,currentFileDownload=null;function onUserInputFocus(e){userInputFocus=e}function displayClear(){QH("xmsg",""),cancelAllFileTransfers(),fileUploads=[],fileDownloads={}}function getUserMediaSupport(i){try{navigator.mediaDevices.enumerateDevices().then(function(e){try{var t=0,n=0;e.forEach(function(e){"audioinput"===e.kind&&(t=1),"videoinput"===e.kind&&(n=1)}),0==t&&i(0),i(t+n)}catch(e){}})}catch(e){}}function displayControl(e){QA("xmsg",'<div style="clear:both"><div style="color:gray;float:left;margin-bottom:2px">'+e+"</div><div></div></div>"),Q("xmsg").scrollTop=Q("xmsg").scrollHeight}function displayLocalVideo(e){QV("localVideo",e),adjustVideoWindows()}function displayRemoteVideo(e){QV("remoteVideo",e),adjustVideoWindows()}function adjustVideoWindows(){var e="none"!=QS("remoteVideo").display;QS("localVideo").top=e?"320px":"45px"}function displayRemote(e){QA("xmsg",'<div style="clear:both"><div class="remoteBubble">'+e+"</div><div></div></div>"),Q("xmsg").scrollTop=Q("xmsg").scrollHeight,Notification&&QV("notifyButton","granted"!=Notification.permission),Notification&&"granted"==Notification.permission&&(null!=notification&&(notification.close(),notification=null),notification=args.title?new Notification("MeshMessenger - "+args.title,{body:e}):new Notification("MeshMessenger",{body:e}))}function xsend(e){null!=notification&&(notification.close(),notification=null),Notification&&QV("notifyButton","granted"!=Notification.permission);var t=Q("xouttext").value;0<t.length&&(Q("xouttext").value="",QA("xmsg",'<div style="clear:both"><div class="localBubble">'+t+"</div><div></div></div>"),Q("xmsg").scrollTop=Q("xmsg").scrollHeight,send({action:"chat",msg:t}))}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function parseUriArgs(){var e,t={},n=window.document.location.href.split(/[\?&|\=]/);for(i in n.splice(0,1),n)switch(i%2){case 0:e=decodeURIComponent(n[i]);break;case 1:t[e]=decodeURIComponent(n[i]);var i=parseInt(t[e]);i==t[e]&&(t[e]=i)}return t}function updateControls(){QE("sendButton",2==state),QE("clearButton",2==state),QE("xouttext",2==state),QV("fileButton",2==state),QV("camButton",webchannel&&webchannel.ok&&!localStream&&2==userMediaSupport),QV("micButton",webchannel&&webchannel.ok&&!localStream&&0<userMediaSupport),QV("hangupButton",webchannel&&webchannel.ok&&localStream)}function startWebRTC(t,e){if(null!=webrtcSessions[0]&&0==multiWebRtc)return webrtcSessions[0];var n=null;return"undefined"!=typeof RTCPeerConnection?n=new RTCPeerConnection(webrtcconfiguration):"undefined"!=typeof webkitRTCPeerConnection&&(n=new webkitRTCPeerConnection(webrtcconfiguration)),null==n?null:(n.id=t,n.onicecandidate=function(e){try{null!=e.candidate&&sendws({action:"webRtcIce",ice:e.candidate,id:this.id})}catch(e){}},n.oniceconnectionstatechange=function(){n&&"failed"==n.iceConnectionState&&(n.close(),webrtcSessions[n.id]&&delete webrtcSessions[n.id])},n.ondatachannel=function(e){(webchannel=e.channel).onmessage=function(e){processMessage(e.data,2)},webchannel.onopen=function(){webchannel.ok=!0,updateControls(),sendws({action:"rtcSwitch",v:0})},webchannel.onclose=function(e){webchannel&&webchannel.ok?disconnect():hangUpButtonClick(0)}},n.onnegotiationneeded=function(e){null==n.holdTimer&&(n.holdTimer=setTimeout(function(){n.holdTimer=null,n.createOffer(function(e){n.setLocalDescription(e,function(){sendws({action:"webRtcSdp",sdp:e,id:t})},function(){hangUpButtonClick(t)})},function(){hangUpButtonClick(t)})},20))},n.ontrack=function(e){var t=Q("remoteVideoCanvas");t.srcObject=remoteStream=e.streams[0],t.onloadedmetadata=function(e){t.play()},displayRemoteVideo(!0)},1==e&&((webchannel=n.createDataChannel("DataChannel",{})).onmessage=function(e){processMessage(e.data,2)},webchannel.onopen=function(){webchannel.ok=!0,updateControls(),sendws({action:"rtcSwitch",v:0})},webchannel.onclose=function(e){webchannel&&webchannel.ok?disconnect():hangUpButtonClick(0)}),webrtcSessions[t]=n)}function webRtcHandleOffer(i,e){var t=webrtcSessions[i];t&&t.setRemoteDescription(new RTCSessionDescription(e),function(){"offer"==e.type&&t.createAnswer(function(n){t.setLocalDescription(n,function(e,t){try{sendws({action:"webRtcSdp",sdp:n,id:i})}catch(e){}},function(){hangUpButtonClick(i)})},function(){hangUpButtonClick(i)})},function(){hangUpButtonClick(i)})}function performWebRtcSwitch(){webchannel&&webchannel.ok&&(sendws({action:"rtcSwitch",v:1}),webchannel.xoutBuffer=[])}function disconnect(){0<state&&displayControl("Verbinding gesloten."),1<state&&setTimeout(start,500),cancelAllFileTransfers(),hangUpButtonClick(0,!0),hangUpButtonClick(1,!0),hangUpButtonClick(2,!0),null!=socket&&(socket.close(),socket=null),updateControls(),state=0}function send(e){if(2==state)if("object"==typeof e&&(e=JSON.stringify(e)),webchannel&&webchannel.ok)null!=webchannel.xoutBuffer?webchannel.xoutBuffer.push(e):webchannel.send(e);else if(null!=socket)try{socket.send(e)}catch(e){}}function sendws(e){2==state&&("object"==typeof e&&(e=JSON.stringify(e)),null!=socket&&socket.send(e))}function webRtcIdSwitch(e){return 0==e?0:3-e}function processMessage(t,e){if("string"==typeof t){try{t=JSON.parse(t)}catch(e){return void console.log("Unable to parse",t)}switch(t.action){case"chat":displayRemote(t.msg);break;case"random":random>t.random&&startWebRTC(0,!0);break;case"webRtcSdp":webrtcSessions[webRtcIdSwitch(t.id)]||startWebRTC(webRtcIdSwitch(t.id),!1),webRtcHandleOffer(webRtcIdSwitch(t.id),t.sdp);break;case"webRtcIce":var n=webrtcSessions[webRtcIdSwitch(t.id)];if(n)try{n.addIceCandidate(new RTCIceCandidate(t.ice))}catch(e){}break;case"videoStop":hangUpButtonClick(webRtcIdSwitch(t.id),!0);break;case"rtcSwitch":switch(t.v){case 0:performWebRtcSwitch();break;case 1:sendws({action:"rtcSwitch",v:2});break;case 2:for(var i in webchannel.xoutBuffer)webchannel.send(webchannel.xoutBuffer[i]);delete webchannel.xoutBuffer;break;default:console.log("Unknown rtcSwitch value: "+t.action)}break;case"file":startFileDownload(t);break;case"fileUploadCancel":cancelFileTransfer(t.id);break;case"fileUploadStart":fileDownloads[t.id]&&((currentFileDownload=fileDownloads[t.id]).data="",changeFileInfo(t.id,2,0),continueFileDownload(t),send({action:"fileUploadAck",id:t.id}));break;case"fileUploadEnd":currentFileDownload&&currentFileDownload.id==t.id&&(changeFileInfo(t.id,3,200),currentFileDownload.done=1,currentFileDownload=null,send({action:"fileUploadAck",id:t.id})),currentFileDownload=null;break;case"fileUploadAck":continueFileUpload();break;case"fileData":currentFileDownload&&currentFileDownload.id==t.id&&(currentFileDownload.data+=t.data,changeFileInfo(t.id,2,200*currentFileDownload.data.length/currentFileDownload.size),send({action:"fileUploadAck",id:t.id}));break;default:console.log("Unhandled object data",t)}}else console.log("Unhandled data",typeof t,t)}function fileButtonClick(){var e=Q("uploadFileInput");1!=e.getAttribute("eventset")&&(e.setAttribute("eventset","1"),e.addEventListener("change",fileSelect,!1)),e.value=null,e.click()}function fileSelect(){if(2==state){var e=Q("uploadFileInput");if(10<e.files.length)displayControl("Limiet van 10 bestandsuploads tegelijkertijd.");else for(var t=0;t<e.files.length;t++)if(0<e.files[t].size){var n=new FileReader;n.onload=function(e){this.xfile.data=e.target.result,startFileUpload(this.xfile)},n.xfile=e.files[t],n.readAsBinaryString(e.files[t])}}}function fileDrop(e){if(haltEvent(e),2==state&&null!=e.dataTransfer)if(10<e.dataTransfer.files.length)displayControl("Limiet van 10 bestandsuploads tegelijkertijd.");else for(var t=0;t<e.dataTransfer.files.length;t++)if(0<e.dataTransfer.files[t].size){var n=new FileReader;n.onload=function(e){this.xfile.data=e.target.result,startFileUpload(this.xfile)},n.xfile=e.dataTransfer.files[t],n.readAsBinaryString(e.dataTransfer.files[t])}}function startFileUpload(e){2==state&&(e.id=Math.random(),fileUploads.push(e),QA("xmsg",'<div style="clear:both"></div><div id="FILEUP-'+e.id+'" class="localBubble" style="width:240px;cursor:pointer" onclick="cancelFileTransfer(\''+e.id+'\')"><div id="FILEUP-ICON-'+e.id+'" class="fileicon" style="float:left;width:32px;height:32px"></div><div><div id="FILEUP-NAME-'+e.id+'" style="height:16px;overflow:hidden;white-space:nowrap;" title="'+e.name+'">'+e.name+'</div><div style="width:200px;background-color:lightgray;margin-left:32px;border-radius:3px;margin-top:3px;height:11px"><div id="FILEUP-PROGRESS-'+e.id+'" style="width:0px;background-color:green;border-radius:3px;height:11px">&nbsp;</div></div></div></div>'),Q("xmsg").scrollTop=Q("xmsg").scrollHeight,send({action:"file",size:e.size,id:e.id,type:e.type,name:e.name}),null==currentFileUpload&&continueFileUpload())}function startFileDownload(e){2==state&&(fileDownloads[e.id]=e,QA("xmsg",'<div style="clear:both"></div><div id="FILEUP-'+e.id+'" class="remoteBubble" style="width:240px;cursor:pointer" onclick="saveFileTransfer(\''+e.id+'\')"><div id="FILEUP-ICON-'+e.id+'" class="fileicon" style="float:left;width:32px;height:32px"></div><div><div id="FILEUP-NAME-'+e.id+'" style="height:16px;overflow:hidden;white-space:nowrap;" title="'+e.name+'">'+e.name+'</div><div style="width:200px;background-color:lightgray;margin-left:32px;border-radius:3px;margin-top:3px;height:11px"><div id="FILEUP-PROGRESS-'+e.id+'" style="width:0px;background-color:green;border-radius:3px;height:11px">&nbsp;</div></div></div></div>'),Q("xmsg").scrollTop=Q("xmsg").scrollHeight)}function changeFileInfo(e,t,n,i){t&&(Q("FILEUP-ICON-"+e).classList.remove("fileicon"),Q("FILEUP-ICON-"+e).classList.remove("fileiconx"),Q("FILEUP-ICON-"+e).classList.remove("fileicontransfer"),Q("FILEUP-ICON-"+e).classList.remove("fileicondone"),Q("FILEUP-ICON-"+e).classList.add(["fileicon","fileiconx","fileicontransfer","fileicondone"][t])),n&&(QS("FILEUP-PROGRESS-"+e).width=n+"px"),i&&(QS("FILEUP-PROGRESS-"+e)["background-color"]=i)}function data2blob(e){for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return new Blob([new Uint8Array(t)])}function saveFileTransfer(e){var t=fileDownloads[e];t&&1==t.done&&saveAs(data2blob(t.data),t.name)}function cancelFileTransfer(e){null!=currentFileUpload&&currentFileUpload.id==e&&(currentFileUpload=null),null!=currentFileDownload&&currentFileDownload.id==e&&(currentFileDownload=null);var t=!1;if(fileDownloads[e]&&1!=fileDownloads[e].done)delete fileDownloads[e],t=!0;else for(var n in fileUploads)if(fileUploads[n].id==e){send({action:"fileUploadCancel",id:e}),fileUploads.splice(n,1),t=!0;break}t&&changeFileInfo(e,1,200,"gray")}function cancelAllFileTransfers(){for(var e in fileDownloads)cancelFileTransfer(fileDownloads[e].id);for(var e in fileUploads)cancelFileTransfer(fileUploads[e].id)}function continueFileUpload(){if(null==currentFileUpload){if(0==fileUploads.length)return;(currentFileUpload=fileUploads[0]).ptr=0,send({action:"fileUploadStart",size:currentFileUpload.size,id:currentFileUpload.id,type:currentFileUpload.type,name:currentFileUpload.name})}else if(currentFileUpload.size<=currentFileUpload.ptr)send({action:"fileUploadEnd",size:currentFileUpload.size,id:currentFileUpload.id,type:currentFileUpload.type,name:currentFileUpload.name}),changeFileInfo(currentFileUpload.id,3,200),fileUploads.splice(0,1),currentFileUpload=null,continueFileUpload();else{var e=Math.min(4e3,currentFileUpload.data.length-currentFileUpload.ptr),t=currentFileUpload.data.substring(currentFileUpload.ptr,currentFileUpload.ptr+e);send({action:"fileData",id:currentFileUpload.id,data:t}),currentFileUpload.ptr+=e,changeFileInfo(currentFileUpload.id,0,200*currentFileUpload.ptr/currentFileUpload.size)}}function continueFileDownload(e){send({action:"fileUploadAck",id:e.id})}function enableNotificationsButtonClick(){return Notification&&Notification.requestPermission().then(function(e){QV("notifyButton","granted"!=e)}),!1}function camButtonClick(){null==localStream&&startLocalStream({video:!0,audio:!0})}function micButtonClick(){null==localStream&&startLocalStream({video:!1,audio:!0})}function hangUpButtonClick(e,t){var n=Q("localVideoCanvas"),i=Q("remoteVideoCanvas"),o=webrtcSessions[1==multiWebRtc?e:0];if(0==e&&null!=webchannel){try{webchannel.close()}catch(e){}webchannel=null}if(o){if(1!=multiWebRtc&&0!=e||(o.ontrack=null,o.onremovetrack=null,o.onremovestream=null,o.onnicecandidate=null,o.oniceconnectionstatechange=null,o.onsignalingstatechange=null,o.onicegatheringstatechange=null,o.onnotificationneeded=null),1==e&&localStream){var a=localStream.getTracks();for(var l in a)a[l].stop();localStream=null}if(2==e&&remoteStream){a=remoteStream.getTracks();for(var l in a)a[l].stop();remoteStream=null}1!=multiWebRtc&&0!=e||(o.close(),delete webrtcSessions[e])}1==e?(n.removeAttribute("src"),n.removeAttribute("srcObject"),null!=localStream&&(localStream=null),displayLocalVideo(!1)):2==e&&(i.removeAttribute("src"),i.removeAttribute("srcObject"),displayRemoteVideo(!1)),1!=t&&send({action:"videoStop",id:e}),updateControls()}function startLocalStream(a){var l=1==multiWebRtc?1:0;null==localStream&&(1==multiWebRtc&&null!=webrtcSessions[1]||navigator.mediaDevices.getUserMedia&&(localStream=1,updateControls(),navigator.mediaDevices.getUserMedia(a).then(function(e){var t=(localStream=e).getTracks(),n=startWebRTC(l);if(1==a.video){var i=Q("localVideoCanvas");i.srcObject=e,i.onloadedmetadata=function(e){i.play()},displayLocalVideo(!0)}for(var o in t)n.addTrack(t[o],localStream)},function(e){displayControl(e.message+"."),hangUpButtonClick(1)})))}function start(){if(updateControls(),"string"==typeof args.id&&0<args.id.length){var e=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/meshrelay.ashx?id="+args.id;null!=args.auth&&""!=args.auth&&(e+="&auth="+args.auth),(socket=new WebSocket(e)).onopen=function(){state=1,displayControl("Wachten op andere gebruiker ...")},socket.onerror=function(e){},socket.onclose=function(){disconnect()},socket.onmessage=function(e){if(state<2&&"string"==typeof e.data&&("c"==e.data||"cr"==e.data))return hangUpButtonClick(0,!0),hangUpButtonClick(1,!0),hangUpButtonClick(2,!0),displayControl("Verbonden."),state=2,updateControls(),void sendws({action:"random",random:random});2==state&&processMessage(e.data,1)}}else displayControl("Fout: geen verbindingssleutel opgegeven.")}function onUnLoad(){for(var e=0;e<3;e++)webrtcSessions[e]&&(webrtcSessions[e].close(),delete webrtcSessions[e]);if(null!=webchannel){try{webchannel.close()}catch(e){}webchannel=null}if(null!=socket){try{socket.close()}catch(e){}socket=null}}args.title&&(QH("xtitle",args.title.split(" ").join("&nbsp")),document.title=document.title+" - "+args.title),Notification&&QV("notifyButton","granted"!=Notification.permission),document.addEventListener("dragover",haltEvent,!1),document.addEventListener("dragleave",haltEvent,!1),document.addEventListener("drop",fileDrop,!1),document.onclick=function(e){Notification&&QV("notifyButton","granted"!=Notification.permission),null!=notification&&(notification.close(),notification=null)},document.onkeyup=function(e){if(Notification&&QV("notifyButton","granted"!=Notification.permission),null!=notification&&(notification.close(),notification=null),2==state&&8==e.keyCode&&0==userInputFocus){var t=Q("xouttext").value;0<t.length&&(Q("xouttext").value=t.substring(0,t.length-1))}if(0==userInputFocus)return haltEvent(e),!1},document.onkeypress=function(e){if(Notification&&QV("notifyButton","granted"!=Notification.permission),null!=notification&&(notification.close(),notification=null),2==state&&(13==e.keyCode?xsend(e):0==userInputFocus&&1==e.key.length&&(Q("xouttext").value=Q("xouttext").value+e.key)),0==userInputFocus)return haltEvent(e),!1},FileReader.prototype.readAsBinaryString||(FileReader.prototype.readAsBinaryString=function(e){var i="",o=this,a=new FileReader;a.onload=function(e){for(var t=new Uint8Array(a.result),n=0;n<t.byteLength;n++)i+=String.fromCharCode(t[n]);o.onload({target:{result:i}})},a.readAsArrayBuffer(e)}),start()</script>
\ No newline at end of file
views/translations/messenger_nl.handlebars new
+642
@@ -0,0 +1,642 @@
1 +<!DOCTYPE html><html style="height:100%"><head>
2 + <title>{{{title}}} - Messenger</title>
3 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
4 + <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
5 + <meta name="format-detection" content="telephone=no">
6 + <link type="text/css" href="styles/style.css" media="screen" rel="stylesheet" title="CSS">
7 + <link type="text/css" href="styles/messenger.css" media="screen" rel="stylesheet" title="CSS">
8 + <script type="text/javascript" src="scripts/common-0.0.1.js"></script>
9 + <script type="text/javascript" src="scripts/filesaver.js"></script>
10 + </head>
11 + <body style="font-family:Arial,Helvetica,sans-serif">
12 + <div id="xtop" style="position:absolute;left:0;right:0;top:0;height:38px;background-color:#036;color:#c8c8c8;box-shadow:3px 3px 10px gray">
13 + <div style="position:absolute;background-color:#036;right:0;height:38px">
14 + <div id="notifyButton" class="icon13 topButton" style="margin-right:4px;display:none" title="Schakel browsermelding in" onclick="enableNotificationsButtonClick()"></div>
15 + <div id="fileButton" class="icon4 topButton" title="Deel een bestand" style="display:none" onclick="fileButtonClick()"></div>
16 + <div id="camButton" class="icon2 topButton" title="Activeer camera &amp; microfoon" style="display:none" onclick="camButtonClick()"></div>
17 + <div id="micButton" class="icon6 topButton" title="Activeer microfoon" style="display:none" onclick="micButtonClick()"></div>
18 + <div id="hangupButton" class="icon11 topRedButton" title="Vastlopen" style="display:none" onclick="hangUpButtonClick(1)"></div>
19 + </div>
20 + <div style="padding-top:9px;padding-left:6px;font-size:20px;display:inline-block"><b><span id="xtitle">MeshMessenger</span></b></div>
21 + </div>
22 + <div id="xmiddle" style="position:absolute;left:0;right:0;top:38px;bottom:30px">
23 + <div style="position:absolute;left:0;right:0;top:0;bottom:0;overflow-y:scroll">
24 + <div id="xmsg" style="position:absolute;left:0;right:0;bottom:0;padding:5px"></div>
25 + </div>
26 + </div>
27 + <div id="xbottom" style="position:absolute;left:0;right:0;bottom:0px;height:30px;background-color:#036">
28 + <div style="position:absolute;left:5px;right:215px;bottom:4px;top:4px;background-color:aliceblue"><input id="xouttext" type="text" style="width:calc(100% - 5px)" onfocus="onUserInputFocus(1)" onblur="onUserInputFocus(0)"></div>
29 + <input type="button" id="sendButton" value="verzenden" style="position:absolute;right:110px;width:100px;top:4px;" onclick="xsend(event)">
30 + <input type="button" id="clearButton" value="Wissen" style="position:absolute;right:5px;width:100px;top:4px;" onclick="displayClear()">
31 + </div>
32 + <div id="remoteVideo" style="position:absolute;right:24px;top:45px;width:320px;height:calc(240px + 30px);background-color:gray;border-radius:12px 12px 12px 12px;box-shadow:3px 3px 10px gray;display:none">
33 + <div style="position:absolute;right:0;left:0;top:2.5px;text-align:center">Extern</div>
34 + <video id="remoteVideoCanvas" autoplay="" style="position:absolute;top:20px;left:0;width:100%;height:calc(100% - 30px);background-color:black"></video>
35 + </div>
36 + <div id="localVideo" style="position:absolute;right:24px;top:320px;width:160px;height:calc(120px + 30px);background-color:gray;border-radius:12px 12px 12px 12px;box-shadow:3px 3px 10px gray;display:none">
37 + <div style="position:absolute;right:0;left:0;top:2.5px;text-align:center">Lokaal</div>
38 + <video id="localVideoCanvas" autoplay="" muted="" style="position:absolute;top:20px;left:0;width:100%;height:calc(100% - 30px);background-color:black"></video>
39 + </div>
40 + <input id="uploadFileInput" type="file" multiple="" style="display:none">
41 + <script type="text/javascript" onunload="onUnLoad()">
42 + var userInputFocus = 0;
43 + var args = parseUriArgs();
44 + var socket = null; // Websocket object
45 + var state = 0; // Connection state. 0 = Disconnected, 1 = Connecting, 2 = Connected.
46 +
47 + // WebRTC sessions and data, audio and video channels
48 + var random = Math.random(); // Selected random, larger value initiates WebRTC.
49 + var webrtcSessions = { }; // WebRTC objects: 0 for data, 1 for outbound audio/video, 2 for inbound audio/video
50 + var webchannel = null; // WebRTC data channel
51 + var localStream = null;
52 + var remoteStream = null;
53 + var multiWebRtc = true; // if set to true, multiple WebRTC sessions will be setup. If false, everything uses one session.
54 + var userMediaSupport = 0;
55 + var notification = null;
56 + getUserMediaSupport(function (x) { userMediaSupport = x; })
57 + var webrtcconfiguration = '{{{webrtconfig}}}';
58 + if (webrtcconfiguration == '') { webrtcconfiguration = null; } else { try { webrtcconfiguration = JSON.parse(decodeURIComponent(webrtcconfiguration)); } catch (ex) { console.log('Invalid WebRTC config: \"' + webrtcconfiguration + '\".'); webrtcconfiguration = null; } }
59 +
60 + // File transfer state
61 + var fileUploads = [];
62 + var fileDownloads = {};
63 + var currentFileUpload = null;
64 + var currentFileDownload = null;
65 +
66 + // Set the title
67 + if (args.title) { QH('xtitle', args.title.split(' ').join('&nbsp')); document.title = document.title + ' - ' + args.title; }
68 +
69 + // Setup web notifications
70 + if (Notification) { QV('notifyButton', Notification.permission != 'granted'); }
71 +
72 + // Listen to drag & drop events
73 + document.addEventListener('dragover', haltEvent, false);
74 + document.addEventListener('dragleave', haltEvent, false);
75 + document.addEventListener('drop', fileDrop, false);
76 +
77 + document.onclick = function (e) {
78 + if (Notification) { QV('notifyButton', Notification.permission != 'granted'); }
79 + if (notification != null) { notification.close(); notification = null; }
80 + }
81 +
82 + // Trap document key up events
83 + document.onkeyup = function ondockeypress(e) {
84 + if (Notification) { QV('notifyButton', Notification.permission != 'granted'); }
85 + if (notification != null) { notification.close(); notification = null; }
86 + if (state == 2) {
87 + if ((e.keyCode == 8) && (userInputFocus == 0)) {
88 + // Backspace
89 + var outtext = Q('xouttext').value;
90 + if (outtext.length > 0) { Q('xouttext').value = outtext.substring(0, outtext.length - 1); }
91 + }
92 + }
93 + if (userInputFocus == 0) { haltEvent(e); return false; }
94 + }
95 +
96 + // Trap document key presses
97 + document.onkeypress = function ondockeypress(e) {
98 + if (Notification) { QV('notifyButton', Notification.permission != 'granted'); }
99 + if (notification != null) { notification.close(); notification = null; }
100 + if (state == 2) {
101 + if (e.keyCode == 13) {
102 + // Return
103 + xsend(e);
104 + } else {
105 + // Any other key
106 + if ((userInputFocus == 0) && (e.key.length == 1)) { Q('xouttext').value = Q('xouttext').value + e.key; }
107 + }
108 + }
109 + if (userInputFocus == 0) { haltEvent(e); return false; }
110 + }
111 +
112 + function onUserInputFocus(x) { userInputFocus = x; }
113 + function displayClear() { QH('xmsg', ''); cancelAllFileTransfers(); fileUploads = [], fileDownloads = {}; }
114 +
115 + // Polyfill FileReader if needed
116 + if (!FileReader.prototype.readAsBinaryString) {
117 + FileReader.prototype.readAsBinaryString = function (fileData) {
118 + var binary = '', self = this, reader = new FileReader();
119 + reader.onload = function (e) {
120 + var bytes = new Uint8Array(reader.result);
121 + for (var i = 0; i < bytes.byteLength; i++) { binary += String.fromCharCode(bytes[i]); }
122 + self.onload({ target: { result: binary } });
123 + }
124 + reader.readAsArrayBuffer(fileData);
125 + }
126 + }
127 +
128 + // Detect if microphone & camera are present
129 + // 0 = nomedia, 1 = miconly, 2 = mic&cam
130 + function getUserMediaSupport(func) {
131 + try {
132 + navigator.mediaDevices.enumerateDevices().then(function (devices) {
133 + try {
134 + var mic = 0, cam = 0;
135 + devices.forEach(function (device) {
136 + if (device.kind === 'audioinput') { mic = 1; }
137 + if (device.kind === 'videoinput') { cam = 1; }
138 + });
139 + if (mic == 0) { func(0); }
140 + func(mic + cam);
141 + } catch (ex) { }
142 + })
143 + } catch (ex) { }
144 + }
145 +
146 + // Display a control message
147 + function displayControl(msg) {
148 + QA('xmsg', '<div style="clear:both"><div style="color:gray;float:left;margin-bottom:2px">' + msg + '</div><div></div></div>');
149 + Q('xmsg').scrollTop = Q('xmsg').scrollHeight;
150 + }
151 +
152 + function displayLocalVideo(active) { QV('localVideo', active); adjustVideoWindows(); }
153 + function displayRemoteVideo(active) { QV('remoteVideo', active); adjustVideoWindows(); }
154 + function adjustVideoWindows() {
155 + //var lv = (QS('localVideo')['display'] != 'none');
156 + var rv = (QS('remoteVideo')['display'] != 'none');
157 + QS('localVideo')['top'] = rv ? '320px' : '45px';
158 + }
159 +
160 + // Display a message from the remote user
161 + function displayRemote(msg) {
162 + QA('xmsg', '<div style="clear:both"><div class="remoteBubble">' + msg + '</div><div></div></div>');
163 + Q('xmsg').scrollTop = Q('xmsg').scrollHeight;
164 +
165 + // If web notifications are granted, use it.
166 + if (Notification) { QV('notifyButton', Notification.permission != 'granted'); }
167 + if (Notification && (Notification.permission == 'granted')) {
168 + if (notification != null) { notification.close(); notification = null; }
169 + if (args.title) {
170 + notification = new Notification("MeshMessenger" + ' - ' + args.title, { body: msg });
171 + } else {
172 + notification = new Notification("MeshMessenger", { body: msg });
173 + }
174 + }
175 + }
176 +
177 + // Display and send a message from the local user
178 + function xsend(event) {
179 + if (notification != null) { notification.close(); notification = null; }
180 + if (Notification) { QV('notifyButton', Notification.permission != 'granted'); }
181 + var outtext = Q('xouttext').value;
182 + if (outtext.length > 0) {
183 + Q('xouttext').value = '';
184 + QA('xmsg', '<div style="clear:both"><div class="localBubble">' + outtext + '</div><div></div></div>');
185 + Q('xmsg').scrollTop = Q('xmsg').scrollHeight;
186 + send({ action: 'chat', msg: outtext });
187 + }
188 + }
189 +
190 + function haltEvent(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; }
191 + function parseUriArgs() { var name, r = {}, parsedUri = window.document.location.href.split(/[\?&|\=]/); parsedUri.splice(0, 1); for (x in parsedUri) { switch (x % 2) { case 0: { name = decodeURIComponent(parsedUri[x]); break; } case 1: { r[name] = decodeURIComponent(parsedUri[x]); var x = parseInt(r[name]); if (x == r[name]) { r[name] = x; } break; } default: { break; } } } return r; }
192 +
193 + // Update user controls
194 + function updateControls() {
195 + QE('sendButton', state == 2);
196 + QE('clearButton', state == 2);
197 + QE('xouttext', state == 2);
198 + QV('fileButton', state == 2);
199 + QV('camButton', webchannel && webchannel.ok && !localStream && (userMediaSupport == 2));
200 + QV('micButton', webchannel && webchannel.ok && !localStream && (userMediaSupport > 0));
201 + QV('hangupButton', webchannel && webchannel.ok && localStream);
202 + }
203 +
204 + // This is the WebRTC setup
205 + function startWebRTC(id, startDataChannel) {
206 + if ((webrtcSessions[0] != null) && (multiWebRtc == false)) { return webrtcSessions[0]; };
207 +
208 + // Setup the WebRTC object
209 + var webrtc = null;
210 + if (typeof RTCPeerConnection !== 'undefined') { webrtc = new RTCPeerConnection(webrtcconfiguration); }
211 + else if (typeof webkitRTCPeerConnection !== 'undefined') { webrtc = new webkitRTCPeerConnection(webrtcconfiguration); }
212 + if (webrtc == null) return null; // No WebRTC support.
213 +
214 + webrtc.id = id;
215 + webrtc.onicecandidate = function (e) { try { if (e.candidate != null) { sendws({ action: 'webRtcIce', ice: e.candidate, id: this.id }); } } catch (ex) { } }
216 + webrtc.oniceconnectionstatechange = function () { if (webrtc && webrtc.iceConnectionState == 'failed') { webrtc.close(); if (webrtcSessions[webrtc.id]) { delete webrtcSessions[webrtc.id]; } } }
217 + webrtc.ondatachannel = function (ev) {
218 + //console.log('ondatachannel');
219 + webchannel = ev.channel;
220 + webchannel.onmessage = function (event) { processMessage(event.data, 2); };
221 + webchannel.onopen = function () { webchannel.ok = true; updateControls(); sendws({ action: 'rtcSwitch', v: 0 }); };
222 + webchannel.onclose = function (event) { if (webchannel && webchannel.ok) { disconnect(); } else { hangUpButtonClick(0); } }
223 + }
224 + webrtc.onnegotiationneeded = function (event) {
225 + if (webrtc.holdTimer != null) return;
226 + webrtc.holdTimer = setTimeout(function () { // This time is needed to keep Chrome from being to excited. Wait until we add all tracks before kicking this off.
227 + //console.log('onnegotiationneeded', id);
228 + webrtc.holdTimer = null;
229 + webrtc.createOffer(function (offer) { /*console.log('offer', offer.sdp.length);*/ webrtc.setLocalDescription(offer, function () { sendws({ action: 'webRtcSdp', sdp: offer, id: id }); }, function () { hangUpButtonClick(id); }); }, function () { hangUpButtonClick(id); });
230 + }, 20);
231 + }
232 + webrtc.ontrack = function (event) {
233 + //console.log('ontrack', id);
234 + var video = Q('remoteVideoCanvas');
235 + video.srcObject = remoteStream = event.streams[0];
236 + video.onloadedmetadata = function (e) { video.play(); };
237 + displayRemoteVideo(true);
238 + }
239 + //webrtc.onremovetrack = function (event) { console.log('onremovetrack'); }
240 + //webrtc.onicegatheringstatechange = function (event) { console.log('onicegatheringstatechange', event); }
241 + //webrtc.onsignalingstatechange = function (event) { console.log('onsignalingstatechange', event); }
242 +
243 + // Initiate the WebRTC offer or handle the offer from the peer.
244 + if (startDataChannel == true) {
245 + webchannel = webrtc.createDataChannel('DataChannel', {}); // { ordered: false, maxRetransmits: 2 }
246 + webchannel.onmessage = function (event) { processMessage(event.data, 2); };
247 + webchannel.onopen = function () { webchannel.ok = true; updateControls(); sendws({ action: 'rtcSwitch', v: 0 }); };
248 + webchannel.onclose = function (event) { if (webchannel && webchannel.ok) { disconnect(); } else { hangUpButtonClick(0); } }
249 + }
250 +
251 + webrtcSessions[id] = webrtc;
252 + return webrtc;
253 + }
254 +
255 + function webRtcHandleOffer(id, description) {
256 + //console.log('webRtcHandleOffer', description.sdp.length);
257 + var webrtc = webrtcSessions[id];
258 + if (webrtc) {
259 + webrtc.setRemoteDescription(new RTCSessionDescription(description), function () {
260 + if (description.type == 'offer') {
261 + webrtc.createAnswer(function (answer) {
262 + webrtc.setLocalDescription(answer, function (a, b) {
263 + try { sendws({ action: 'webRtcSdp', sdp: answer, id: id }); } catch (ex) { }
264 + }, function () { hangUpButtonClick(id); });
265 + }, function () { hangUpButtonClick(id); });
266 + }
267 + }, function () { hangUpButtonClick(id); });
268 + }
269 + }
270 +
271 + // Indicate to peer that data traffic will no longer be sent over websocket and start holding traffic.
272 + function performWebRtcSwitch() {
273 + if (webchannel && webchannel.ok) { sendws({ action: 'rtcSwitch', v: 1 }); webchannel.xoutBuffer = []; }
274 + }
275 +
276 + // Disconnect everything
277 + function disconnect() {
278 + if (state > 0) { displayControl("Verbinding gesloten."); }
279 + if (state > 1) { setTimeout(start, 500); }
280 + cancelAllFileTransfers();
281 + hangUpButtonClick(0, true); // Data channel
282 + hangUpButtonClick(1, true); // Local audio/video
283 + hangUpButtonClick(2, true); // Remote audio/video
284 + if (socket != null) { socket.close(); socket = null; }
285 + updateControls();
286 + state = 0;
287 + }
288 +
289 + // Send data over the current transport (WebRTC first)
290 + function send(data) {
291 + if (state != 2) return; // If not in connected state, ignore this.
292 + if (typeof data == 'object') { data = JSON.stringify(data); } // If this is an object, convert it to a string.
293 + if (webchannel && webchannel.ok) { if (webchannel.xoutBuffer != null) { webchannel.xoutBuffer.push(data); } else { webchannel.send(data); } } // If WebRTC channel is possible, use it or hold until we can use it.
294 + else { if (socket != null) { try { socket.send(data); } catch (ex) { } } } // If a websocket channel is present, use that.
295 + }
296 +
297 + // Send data over the websocket transport (WebSocket only)
298 + function sendws(data) {
299 + if (state != 2) return;
300 + //console.log('SEND', data);
301 + if (typeof data == 'object') { data = JSON.stringify(data); }
302 + if (socket != null) { socket.send(data); }
303 + }
304 +
305 + // WebRTC id switcher (0 -> 0, 1 -> 2, 2 -> 1)
306 + function webRtcIdSwitch(id) { if (id == 0) { return 0; } return 3 - id; }
307 +
308 + // Process incoming messages
309 + function processMessage(data, transport) {
310 + if (typeof data == 'string') {
311 + try { data = JSON.parse(data); } catch (ex) { console.log('Unable to parse', data); return; }
312 + //console.log('RECV', data);
313 + switch (data.action) {
314 + case 'chat': { displayRemote(data.msg); break; } // Incoming chat message.
315 + case 'random': { if (random > data.random) { startWebRTC(0, true); } break; } // If we have a larger random value, we start WebRTC.
316 + case 'webRtcSdp': { if (!webrtcSessions[webRtcIdSwitch(data.id)]) { startWebRTC(webRtcIdSwitch(data.id), false); } webRtcHandleOffer(webRtcIdSwitch(data.id), data.sdp); break; } // Remote WebRTC offer or answer.
317 + case 'webRtcIce': { var webrtc = webrtcSessions[webRtcIdSwitch(data.id)]; if (webrtc) { try { webrtc.addIceCandidate(new RTCIceCandidate(data.ice)); } catch (ex) { } } break; } // Remote ICE candidate
318 + case 'videoStop': { hangUpButtonClick(webRtcIdSwitch(data.id), true); break; }
319 + case 'rtcSwitch': { // WebRTC switch over commands.
320 + switch (data.v) {
321 + case 0: { performWebRtcSwitch(); break; } // Other side is ready for switch over to WebRTC
322 + case 1: { sendws({ action: 'rtcSwitch', v: 2 }); break; } // Other side no longer sending data on websocket, confirm we got the end marker
323 + case 2: { for (var i in webchannel.xoutBuffer) { webchannel.send(webchannel.xoutBuffer[i]); } delete webchannel.xoutBuffer; break; } // Send any pending data over WebRTC and start using WebRTC with all traffic
324 + default: { console.log('Unknown rtcSwitch value: ' + data.action); break; } //
325 + }
326 + break;
327 + }
328 + case 'file': { startFileDownload(data); break; }
329 + case 'fileUploadCancel': { cancelFileTransfer(data.id); break; }
330 + case 'fileUploadStart': {
331 + if (fileDownloads[data.id]) {
332 + currentFileDownload = fileDownloads[data.id];
333 + currentFileDownload.data = '';
334 + changeFileInfo(data.id, 2, 0);
335 + continueFileDownload(data);
336 + send({ action: 'fileUploadAck', id: data.id });
337 + } break;
338 + }
339 + case 'fileUploadEnd': {
340 + if (currentFileDownload && (currentFileDownload.id == data.id)) {
341 + changeFileInfo(data.id, 3, 200);
342 + currentFileDownload.done = 1;
343 + currentFileDownload = null;
344 + send({ action: 'fileUploadAck', id: data.id });
345 + }
346 + currentFileDownload = null;
347 + break;
348 + }
349 + case 'fileUploadAck': {
350 + continueFileUpload();
351 + break;
352 + }
353 + case 'fileData': {
354 + if (currentFileDownload && (currentFileDownload.id == data.id)) {
355 + currentFileDownload.data += data.data;
356 + changeFileInfo(data.id, 2, (currentFileDownload.data.length * 200 / currentFileDownload.size));
357 + send({ action: 'fileUploadAck', id: data.id });
358 + }
359 + break;
360 + }
361 + default: { console.log('Unhandled object data', data); break; }
362 + }
363 + } else {
364 + console.log('Unhandled data', typeof data, data);
365 + }
366 + }
367 +
368 + // File sharing button
369 + function fileButtonClick() {
370 + var chooser = Q('uploadFileInput');
371 + if (chooser.getAttribute('eventset') != 1) {
372 + chooser.setAttribute('eventset', '1');
373 + chooser.addEventListener('change', fileSelect, false);
374 + }
375 + chooser.value = null;
376 + chooser.click();
377 + }
378 +
379 + // User selected one or more files to upload to remote user.
380 + function fileSelect() {
381 + if (state != 2) return;
382 + var x = Q('uploadFileInput');
383 + if (x.files.length > 10) {
384 + displayControl("Limiet van 10 bestandsuploads tegelijkertijd.");
385 + } else {
386 + for (var i = 0; i < x.files.length; i++) {
387 + if (x.files[i].size > 0) {
388 + var reader = new FileReader();
389 + reader.onload = function (e) { this.xfile.data = e.target.result; startFileUpload(this.xfile); };
390 + reader.xfile = x.files[i];
391 + reader.readAsBinaryString(x.files[i]);
392 + }
393 + }
394 + }
395 + }
396 +
397 + // User drag & droped one or more files to upload to remote user.
398 + function fileDrop(e) {
399 + haltEvent(e);
400 + if ((state != 2) || (e.dataTransfer == null)) return;
401 + if (e.dataTransfer.files.length > 10) {
402 + displayControl("Limiet van 10 bestandsuploads tegelijkertijd.");
403 + } else {
404 + for (var i = 0; i < e.dataTransfer.files.length; i++) {
405 + if (e.dataTransfer.files[i].size > 0) {
406 + var reader = new FileReader();
407 + reader.onload = function (e) { this.xfile.data = e.target.result; startFileUpload(this.xfile); };
408 + reader.xfile = e.dataTransfer.files[i];
409 + reader.readAsBinaryString(e.dataTransfer.files[i]);
410 + }
411 + }
412 + }
413 + }
414 +
415 + function startFileUpload(file) {
416 + if (state != 2) return;
417 + file.id = Math.random();
418 + fileUploads.push(file);
419 + QA('xmsg', '<div style="clear:both"></div><div id="FILEUP-' + file.id + '" class="localBubble" style="width:240px;cursor:pointer" onclick="cancelFileTransfer(\'' + file.id + '\')"><div id="FILEUP-ICON-' + file.id + '" class="fileicon" style="float:left;width:32px;height:32px"></div><div><div id="FILEUP-NAME-' + file.id + '" style="height:16px;overflow:hidden;white-space:nowrap;" title="' + file.name + '">' + file.name + '</div><div style="width:200px;background-color:lightgray;margin-left:32px;border-radius:3px;margin-top:3px;height:11px"><div id="FILEUP-PROGRESS-' + file.id + '" style="width:0px;background-color:green;border-radius:3px;height:11px">&nbsp;</div></div></div></div>');
420 + Q('xmsg').scrollTop = Q('xmsg').scrollHeight;
421 + send({ action: 'file', size: file.size, id: file.id, type: file.type, name: file.name });
422 + if (currentFileUpload == null) continueFileUpload();
423 + }
424 +
425 + function startFileDownload(file) {
426 + if (state != 2) return;
427 + fileDownloads[file.id] = file;
428 + QA('xmsg', '<div style="clear:both"></div><div id="FILEUP-' + file.id + '" class="remoteBubble" style="width:240px;cursor:pointer" onclick="saveFileTransfer(\'' + file.id + '\')"><div id="FILEUP-ICON-' + file.id + '" class="fileicon" style="float:left;width:32px;height:32px"></div><div><div id="FILEUP-NAME-' + file.id + '" style="height:16px;overflow:hidden;white-space:nowrap;" title="' + file.name + '">' + file.name + '</div><div style="width:200px;background-color:lightgray;margin-left:32px;border-radius:3px;margin-top:3px;height:11px"><div id="FILEUP-PROGRESS-' + file.id + '" style="width:0px;background-color:green;border-radius:3px;height:11px">&nbsp;</div></div></div></div>');
429 + Q('xmsg').scrollTop = Q('xmsg').scrollHeight;
430 + }
431 +
432 + // Change the file icon and progress
433 + function changeFileInfo(id, icon, progress, progressColor) {
434 + if (icon) {
435 + Q('FILEUP-ICON-' + id).classList.remove('fileicon');
436 + Q('FILEUP-ICON-' + id).classList.remove('fileiconx');
437 + Q('FILEUP-ICON-' + id).classList.remove('fileicontransfer');
438 + Q('FILEUP-ICON-' + id).classList.remove('fileicondone');
439 + Q('FILEUP-ICON-' + id).classList.add(['fileicon', 'fileiconx', 'fileicontransfer', 'fileicondone'][icon]);
440 + }
441 + if (progress) { QS('FILEUP-PROGRESS-' + id)['width'] = progress + 'px'; }
442 + if (progressColor) { QS('FILEUP-PROGRESS-' + id)['background-color'] = progressColor; }
443 + }
444 +
445 + // Convert a string into a blob
446 + function data2blob(data) {
447 + var bytes = new Array(data.length);
448 + for (var i = 0; i < data.length; i++) bytes[i] = data.charCodeAt(i);
449 + return new Blob([new Uint8Array(bytes)]);
450 + };
451 +
452 + function saveFileTransfer(id) {
453 + var f = fileDownloads[id];
454 + if (f && f.done == 1) { saveAs(data2blob(f.data), f.name); }
455 + }
456 +
457 + function cancelFileTransfer(id) {
458 + if ((currentFileUpload != null) && (currentFileUpload.id == id)) { currentFileUpload = null; }
459 + if ((currentFileDownload != null) && (currentFileDownload.id == id)) { currentFileDownload = null; }
460 +
461 + var found = false;
462 + if (fileDownloads[id] && (fileDownloads[id].done != 1)) {
463 + delete fileDownloads[id];
464 + found = true;
465 + } else {
466 + for (var i in fileUploads) {
467 + if (fileUploads[i].id == id) {
468 + send({ action: 'fileUploadCancel', id: id });
469 + fileUploads.splice(i, 1);
470 + found = true;
471 + break;
472 + }
473 + }
474 + }
475 + if (found) { changeFileInfo(id, 1, 200, 'gray'); } // Only cancel a file if it was in the file queue.
476 + }
477 +
478 + function cancelAllFileTransfers() {
479 + for (var i in fileDownloads) { cancelFileTransfer(fileDownloads[i].id); }
480 + for (var i in fileUploads) { cancelFileTransfer(fileUploads[i].id); }
481 + }
482 +
483 + function continueFileUpload() {
484 + if (currentFileUpload == null) {
485 + // Select the next file to upload
486 + if (fileUploads.length == 0) { return; } // Nothing to do
487 + currentFileUpload = fileUploads[0];
488 + currentFileUpload.ptr = 0;
489 +
490 + // Indicate that we are sending this file
491 + send({ action: 'fileUploadStart', size: currentFileUpload.size, id: currentFileUpload.id, type: currentFileUpload.type, name: currentFileUpload.name });
492 + } else {
493 + if (currentFileUpload.size <= currentFileUpload.ptr) {
494 + // If we are done, send the end marker
495 + send({ action: 'fileUploadEnd', size: currentFileUpload.size, id: currentFileUpload.id, type: currentFileUpload.type, name: currentFileUpload.name });
496 + changeFileInfo(currentFileUpload.id, 3, 200);
497 + fileUploads.splice(0, 1);
498 + currentFileUpload = null;
499 + continueFileUpload(); // Send the next file
500 + } else {
501 + // Send the next block
502 + var nextBlockLen = Math.min(4000, currentFileUpload.data.length - currentFileUpload.ptr);
503 + var data = currentFileUpload.data.substring(currentFileUpload.ptr, currentFileUpload.ptr + nextBlockLen);
504 + send({ action: 'fileData', id: currentFileUpload.id, data: data });
505 + currentFileUpload.ptr += nextBlockLen;
506 + changeFileInfo(currentFileUpload.id, 0, (currentFileUpload.ptr * 200 / currentFileUpload.size));
507 + }
508 + }
509 + }
510 +
511 + function continueFileDownload(msg) {
512 + send({ action: 'fileUploadAck', id: msg.id });
513 + }
514 +
515 + // Toggle notification
516 + function enableNotificationsButtonClick() {
517 + if (Notification) { Notification.requestPermission().then(function (permission) { QV('notifyButton', permission != 'granted'); }); }
518 + return false;
519 + }
520 +
521 + // Camera button
522 + function camButtonClick() {
523 + if (localStream == null) { startLocalStream({ video: true, audio: true }); }
524 + }
525 +
526 + // Microphone
527 + function micButtonClick() {
528 + if (localStream == null) { startLocalStream({ video: false, audio: true }); }
529 + }
530 +
531 + function hangUpButtonClick(id, fromRemote) {
532 + //console.log('hangUpButtonClick', id);
533 + var localVideo = Q('localVideoCanvas');
534 + var remoteVideo = Q('remoteVideoCanvas');
535 + var webrtc = webrtcSessions[(multiWebRtc == true)? id : 0];
536 +
537 + if ((id == 0) && (webchannel != null)) { try { webchannel.close(); } catch (e) { } webchannel = null; }
538 +
539 + if (webrtc) {
540 + if ((multiWebRtc == true) || (id == 0)) {
541 + webrtc.ontrack = null;
542 + webrtc.onremovetrack = null;
543 + webrtc.onremovestream = null;
544 + webrtc.onnicecandidate = null;
545 + webrtc.oniceconnectionstatechange = null;
546 + webrtc.onsignalingstatechange = null;
547 + webrtc.onicegatheringstatechange = null;
548 + webrtc.onnotificationneeded = null;
549 + }
550 +
551 + if ((id == 1) && localStream) { var tracks = localStream.getTracks(); for (var i in tracks) { tracks[i].stop(); } localStream = null; }
552 + if ((id == 2) && remoteStream) { var tracks = remoteStream.getTracks(); for (var i in tracks) { tracks[i].stop(); } remoteStream = null; }
553 +
554 + if ((multiWebRtc == true) || (id == 0)) {
555 + webrtc.close();
556 + delete webrtcSessions[id];
557 + }
558 + }
559 +
560 + if (id == 1) {
561 + localVideo.removeAttribute('src');
562 + localVideo.removeAttribute('srcObject');
563 + if (localStream != null) { localStream = null; }
564 + displayLocalVideo(false);
565 + } else if (id == 2) {
566 + remoteVideo.removeAttribute('src');
567 + remoteVideo.removeAttribute('srcObject');
568 + displayRemoteVideo(false);
569 + }
570 +
571 + if (fromRemote != true) { send({ action: 'videoStop', id: id }); }
572 + updateControls();
573 + }
574 +
575 + // Setup local audio/video
576 + function startLocalStream(constraints) {
577 + var channel = (multiWebRtc == true) ? 1 : 0;
578 + if (localStream != null) return;
579 + if ((multiWebRtc == true) && (webrtcSessions[1] != null)) return;
580 + if (navigator.mediaDevices.getUserMedia) {
581 + localStream = 1;
582 + updateControls();
583 + navigator.mediaDevices.getUserMedia(constraints)
584 + .then(function (stream) {
585 + localStream = stream;
586 + var tracks = localStream.getTracks();
587 + var webrtc = startWebRTC(channel);
588 + if (constraints.video == true) {
589 + var video = Q('localVideoCanvas');
590 + video.srcObject = stream;
591 + video.onloadedmetadata = function (e) { video.play(); };
592 + displayLocalVideo(true);
593 + }
594 + for (var i in tracks) { webrtc.addTrack(tracks[i], localStream); }
595 + }, function (err) {
596 + displayControl(err.message + '.');
597 + hangUpButtonClick(1);
598 + });
599 + }
600 + }
601 +
602 + // This is the main start
603 + function start() {
604 + // Get started
605 + updateControls();
606 + if ((typeof args.id == 'string') && (args.id.length > 0)) {
607 + var url = window.location.protocol.replace('http', 'ws') + '//' + window.location.host + window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/')) + '/meshrelay.ashx?id=' + args.id;
608 + if ((args.auth != null) && (args.auth != '')) { url += '&auth=' + args.auth; }
609 + socket = new WebSocket(url);
610 + socket.onopen = function () { state = 1; displayControl("Wachten op andere gebruiker ..."); }
611 + socket.onerror = function (e) { /*console.error(e);*/ }
612 + socket.onclose = function () { disconnect(); }
613 + socket.onmessage = function (msg) {
614 + if ((state < 2) && (typeof msg.data == 'string') && ((msg.data == 'c') || (msg.data == 'cr'))) {
615 + hangUpButtonClick(0, true);
616 + hangUpButtonClick(1, true);
617 + hangUpButtonClick(2, true);
618 + displayControl("Verbonden.");
619 + state = 2;
620 + updateControls();
621 + sendws({ action: 'random', random: random }); // Send a random number. Higher number starts the WebRTC session.
622 + return;
623 + }
624 + if (state == 2) { processMessage(msg.data, 1); }
625 + }
626 + } else {
627 + displayControl("Fout: geen verbindingssleutel opgegeven.");
628 + }
629 + }
630 +
631 + start();
632 +
633 + function onUnLoad() {
634 + for (var i = 0; i < 3; i++) { if (webrtcSessions[i]) { webrtcSessions[i].close(); delete webrtcSessions[i]; } }
635 + if (webchannel != null) { try { webchannel.close(); } catch (e) { } webchannel = null; }
636 + if (socket != null) { try { socket.close(); } catch (e) { } socket = null; }
637 + }
638 +
639 + </script>
640 +
641 +
642 +</body></html>
\ No newline at end of file
views/translations/terms-min_cs.handlebars
+1 -1
@@ -1,4 +1,4 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Terms of use</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0"></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Výběr rozhraní uživatele"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Rozhraní levé lišty"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Rozhraní horní lišty"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Rozhraní s pevnou šířkou"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Přepnout na noční mód"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Podmínky používání</h1><p>Prosím kontaktujte správce serveru pro podrobnosti o podmínkách používání.<hr><p class=MsoNormal>Níže jsou uvedena požadovaná zveřejnění součástí a softwaru s otevřeným zdrojovým kódem začleněných do tohoto softwaru.<p class=MsoNormal><b><span>1.AJAX Control Toolkit - Nová BSD Licence</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright (c) 2009, CodePlex Foundation. Všechna práva vyhrazena.<o:p></o:p></span><p class=MsoNormal><span>Redistribuce a použití ve zdrojové a binární podobě, s úpravou nebo bez ní, jsou povoleny za předpokladu, že jsou splněny následující podmínky:<o:p></o:p></span><p class=MsoNormal><span>1.Redistribuce zdrojového kódu si musí zachovat výše uvedené upozornění o autorských právech, tento seznam podmínek a následující vyloučení odpovědnosti.<o:p></o:p></span><p class=MsoNormal><span>2.Redistribuce v binární podobě musí reprodukovat výše uvedené oznámení o autorských právech, tento seznam podmínek a následující vyloučení odpovědnosti v dokumentaci a / nebo jiných materiálech dodávaných s distribucí.<o:p></o:p></span><p class=MsoNormal><span>3.Název Nadace CodePlex Foundation ani jména jejích přispěvatelů nesmí být bez předchozího písemného svolení použita k podpoře nebo propagaci produktů odvozených od tohoto softwaru.<o:p></o:p></span><p class=MsoNormal><span>TENTO SOFTWARE POSKYTUJÍ DRŽITELÉ AUTORSKÝCH PRÁV A DODAVATELÉ "TAK JAK JE" A JAKÉKOLI VÝSLOVNÉ NEBO IMPLIKOVANÉ ZÁRUKY, VČETNĚ IMPLIKOVANÝCH ZÁRUK OBCHODOVATELNOSTI A VHODNOSTI PRO KONKRÉTNÍ ÚČEL, VČETNĚ, NEJMÉ OMEZENÉHO, NENÍ OMEZENO. V ŽÁDNÉM PŘÍPADĚ NESMÍ BÝT ZODPOVĚDNÝ MAJITEL AUTORSKÝCH PRÁV NEBO PŘIDĚLOVATELÉ ZA ŽÁDNÉ PŘÍMÉ, NEPŘÍMÉ, NÁHODNÉ, ZVLÁŠTNÍ, EXEMPLÁRNÍ NEBO NÁSLEDNÉ POŠKOZENÍ (VČETNĚ, ALE NEJEDNÁVĚJÍCÍCH, ZÍSKÁNÍ ZBOŽÍ NEBO SLUŽEB; ÚDAJE; NEBO PŘERUŠENÍ PODNIKŮ) JAK VYDĚLÁVALA A NA JAKÉKOLIV TEORII ODPOVĚDNOSTI, POKUD JDE O SMLOUVU, STRUČNOU ODPOVĚDNOST NEBO TORT (VČETNĚ NEGLIGENCE NEBO JINÉHO) VYPLÝVAJÍCÍ Z KAŽDÉHO ZPŮSOBU POUŽÍVÁNÍ TENTOHO SOFTWARU, AJ KDYKOLI PORUŠENÍ.<o:p></o:p></span><p class=MsoNormal><b><span>2.OpenSSL – OpenSSL a SSLeay licence</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=http://www.openssl.org/source/license.html>http://www.openssl.org/source/license.html</a></span><p class=MsoNormal><span>Copyright (c) 1998-2011 The OpenSSL Project. Všechna práva vyhrazena.<o:p></o:p></span><p class=MsoNormal><span>Redistribuce a použití ve zdrojové a binární podobě, s úpravou nebo bez ní, jsou povoleny za předpokladu, že jsou splněny následující podmínky:<o:p></o:p></span><p class=MsoNormal><span>1.Redistribuce zdrojového kódu si musí zachovat výše uvedené upozornění o autorských právech, tento seznam podmínek a následující vyloučení odpovědnosti.<o:p></o:p></span><p class=MsoNormal><span>2.Redistribuce v binární podobě musí reprodukovat výše uvedené oznámení o autorských právech, tento seznam podmínek a následující vyloučení odpovědnosti v dokumentaci a / nebo jiných materiálech dodávaných s distribucí.<o:p></o:p></span><p class=MsoNormal><span>Všechny reklamní materiály uvádějící funkce nebo použití tohoto softwaru musí obsahovat následující potvrzení: "Tento produkt zahrnuje software vyvinutý projektem OpenSSL pro použití v sadě OpenSSL Toolkit. (http://www.openssl.org/)"<o:p></o:p></span><p class=MsoNormal><span>4.Názvy "OpenSSL Toolkit" a "OpenSSL Project" nesmí být bez předchozího písemného souhlasu použity k propagaci nebo propagaci produktů odvozených z tohoto softwaru. Pro písemné povolení nás prosím kontaktujte openssl-core@openssl.org.<o:p></o:p></span><p class=MsoNormal><span>5.Produkty odvozené od tohoto softwaru nesmí být nazývány "OpenSSL" ani se nesmí "OpenSSL" objevit v jejich jménech bez předchozího písemného souhlasu projektu OpenSSL.<o:p></o:p></span><p class=MsoNormal><span>6.Redistribuce jakékoli formy si musí zachovat následující potvrzení: "Tento produkt zahrnuje software vyvinutý v rámci projektu OpenSSL pro použití v sadě OpenSSL Toolkit (http://www.openssl.org/)".<o:p></o:p></span><p class=MsoNormal><span>THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<o:p></o:p></span><p class=MsoNormal><b><span>3.jQuery Foundation - MIT licence</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation a ostatní přispěvatelé <a href=http://jquery.com/ >http://jquery.com/</a></span><p class=MsoNormal><span>SOFTWARE JE POSKYTOVÁN "TAK JAK JE", BEZ ZÁRUKY, VYJÁDŘENÉ NEBO IMPLIKOVANÉ, VČETNĚ NEJEDNÁVANÝCH ZÁRUK OBCHODOVATELNOSTI, VHODNOSTI PRO URČITÝ ÚČEL A NEZÁVISLOST. V ŽÁDNÉM PŘÍPADĚ NEPOSKYTUJÍ AUTOŘI NEBO DRŽITELÉ AUTORSKÝCH PRÁV ŽÁDNÉ ZÁRUKY, ZA POŠKOZENÍ NEBO OSTATNÍ ODPOVĚDNOST, PŘI ČINNOSTI SMLOUVY, TORTU NEBO JINÉ, VYPLÝVAJÍCÍ ZE SOFTWARU NEBO POUŽITÍ NEBO OSTATNÍCH OBCHODŮ SOFTWARE.</span><p class=MsoNormal><b><span>4.jQuery User Interface - MIT Licence</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation a ostatní přispěvatelé, <a href=http://jqueryui.com/ >http://jqueryui.com/</a></span><p class=MsoNormal><span>Tento software se skládá z dobrovolných příspěvků mnoha jednotlivců (AUTHORS.txt, http://jqueryui.com/about ). Přesnou historii příspěvků naleznete v historii revizí a protokolech dostupných na adrese http://jquery-ui.googlecode.com/svn/<o:p></o:p></span><p class=MsoNormal><span>SOFTWARE JE POSKYTOVÁN "TAK JAK JE", BEZ ZÁRUKY, VYJÁDŘENÉ NEBO IMPLIKOVANÉ, VČETNĚ NEJEDNÁVANÝCH ZÁRUK OBCHODOVATELNOSTI, VHODNOSTI PRO URČITÝ ÚČEL A NEZÁVISLOST. V ŽÁDNÉM PŘÍPADĚ NEPOSKYTUJÍ AUTOŘI NEBO DRŽITELÉ AUTORSKÝCH PRÁV ŽÁDNÉ ZÁRUKY, ZA POŠKOZENÍ NEBO OSTATNÍ ODPOVĚDNOST, PŘI ČINNOSTI SMLOUVY, TORTU NEBO JINÉ, VYPLÝVAJÍCÍ ZE SOFTWARU NEBO POUŽITÍ NEBO OSTATNÍCH OBCHODŮ SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>5.noVNC - Mozilla Public licence 2.0</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/kanaka/noVNC/blob/master/LICENSE.txt>https://github.com/kanaka/noVNC/blob/master/LICENSE.txt</a></span><p class=MsoNormal><span>Copyright (C) 2011 Joel Martin This Source Code Form podléhá podmínkám Mozilla Public licence, v. 2.0. Pokud kopie tohoto MPL nebyla distribuována s tímto souborem, můžete si ji pořídit na adrese http://mozilla.org/MPL/2.0/.<o:p></o:p></span><p class=MsoNormal><b><span>6.Rcarousel - MIT LIcense</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/ryrych/rcarousel/blob/master/widget/license>https://github.com/ryrych/rcarousel/blob/master/widget/license</a></span><p class=MsoNormal><span>Copyright (c) 2010 Wojciech 'RRH' Ryrych<o:p></o:p></span><p class=MsoNormal><span>SOFTWARE JE POSKYTOVÁN "TAK JAK JE", BEZ ZÁRUKY, VYJÁDŘENÉ NEBO IMPLIKOVANÉ, VČETNĚ NEJEDNÁVANÝCH ZÁRUK OBCHODOVATELNOSTI, VHODNOSTI PRO URČITÝ ÚČEL A NEZÁVISLOST. V ŽÁDNÉM PŘÍPADĚ NEPOSKYTUJÍ AUTOŘI NEBO DRŽITELÉ AUTORSKÝCH PRÁV ŽÁDNÉ ZÁRUKY, ZA POŠKOZENÍ NEBO OSTATNÍ ODPOVĚDNOST, PŘI ČINNOSTI SMLOUVY, TORTU NEBO JINÉ, VYPLÝVAJÍCÍ ZE SOFTWARU NEBO POUŽITÍ NEBO OSTATNÍCH OBCHODŮ SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UK licence</span></b><span><o:p></o:p></span><p class=MsoNormal><span>Tento software využívá kódy z <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a> licencováno pod <a href=http://creativecommons.org/licenses/by/2.0/uk/legalcode>http://creativecommons.org/licenses/by/2.0/uk/legalcode</a> a jeho zdroj může být stažen z <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a>.<o:p></o:p></span></p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Zpět</a></table></div></div><script>'use strict';
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Terms of use</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0"></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Výběr rozhraní uživatele"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Rozhraní levé lišty"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Rozhraní horní lišty"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Rozhraní s pevnou šířkou"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Přepnout na noční mód"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Podmínky používání</h1><p>Prosím kontaktujte správce serveru pro podrobnosti o podmínkách používání.<hr><p class=MsoNormal>Níže jsou uvedena požadovaná zveřejnění součástí a softwaru s otevřeným zdrojovým kódem začleněných do tohoto softwaru.<p class=MsoNormal><b><span>1.AJAX Control Toolkit - Nová BSD Licence</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright (c) 2009, CodePlex Foundation. Všechna práva vyhrazena.<o:p></o:p></span><p class=MsoNormal><span>Redistribuce a použití ve zdrojové a binární podobě, s úpravou nebo bez ní, jsou povoleny za předpokladu, že jsou splněny následující podmínky:<o:p></o:p></span><p class=MsoNormal><span>1.Redistribuce zdrojového kódu si musí zachovat výše uvedené upozornění o autorských právech, tento seznam podmínek a následující vyloučení odpovědnosti.<o:p></o:p></span><p class=MsoNormal><span>2.Redistribuce v binární podobě musí reprodukovat výše uvedené oznámení o autorských právech, tento seznam podmínek a následující vyloučení odpovědnosti v dokumentaci a / nebo jiných materiálech dodávaných s distribucí.<o:p></o:p></span><p class=MsoNormal><span>3.Název Nadace CodePlex Foundation ani jména jejích přispěvatelů nesmí být bez předchozího písemného svolení použita k podpoře nebo propagaci produktů odvozených od tohoto softwaru.<o:p></o:p></span><p class=MsoNormal><span>TENTO SOFTWARE POSKYTUJÍ DRŽITELÉ AUTORSKÝCH PRÁV A DODAVATELÉ "TAK JAK JE" A JAKÉKOLI VÝSLOVNÉ NEBO IMPLIKOVANÉ ZÁRUKY, VČETNĚ IMPLIKOVANÝCH ZÁRUK OBCHODOVATELNOSTI A VHODNOSTI PRO KONKRÉTNÍ ÚČEL, VČETNĚ, NEJMÉ OMEZENÉHO, NENÍ OMEZENO. V ŽÁDNÉM PŘÍPADĚ NESMÍ BÝT ZODPOVĚDNÝ MAJITEL AUTORSKÝCH PRÁV NEBO PŘIDĚLOVATELÉ ZA ŽÁDNÉ PŘÍMÉ, NEPŘÍMÉ, NÁHODNÉ, ZVLÁŠTNÍ, EXEMPLÁRNÍ NEBO NÁSLEDNÉ POŠKOZENÍ (VČETNĚ, ALE NEJEDNÁVĚJÍCÍCH, ZÍSKÁNÍ ZBOŽÍ NEBO SLUŽEB; ÚDAJE; NEBO PŘERUŠENÍ PODNIKŮ) JAK VYDĚLÁVALA A NA JAKÉKOLIV TEORII ODPOVĚDNOSTI, POKUD JDE O SMLOUVU, STRUČNOU ODPOVĚDNOST NEBO TORT (VČETNĚ NEGLIGENCE NEBO JINÉHO) VYPLÝVAJÍCÍ Z KAŽDÉHO ZPŮSOBU POUŽÍVÁNÍ TENTOHO SOFTWARU, AJ KDYKOLI PORUŠENÍ.<o:p></o:p></span><p class=MsoNormal><b><span>2.OpenSSL – OpenSSL a SSLeay licence</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=http://www.openssl.org/source/license.html>http://www.openssl.org/source/license.html</a></span><p class=MsoNormal><span>Copyright (c) 1998-2011 The OpenSSL Project. Všechna práva vyhrazena.<o:p></o:p></span><p class=MsoNormal><span>Redistribuce a použití ve zdrojové a binární podobě, s úpravou nebo bez ní, jsou povoleny za předpokladu, že jsou splněny následující podmínky:<o:p></o:p></span><p class=MsoNormal><span>1.Redistribuce zdrojového kódu si musí zachovat výše uvedené upozornění o autorských právech, tento seznam podmínek a následující vyloučení odpovědnosti.<o:p></o:p></span><p class=MsoNormal><span>2.Redistribuce v binární podobě musí reprodukovat výše uvedené oznámení o autorských právech, tento seznam podmínek a následující vyloučení odpovědnosti v dokumentaci a / nebo jiných materiálech dodávaných s distribucí.<o:p></o:p></span><p class=MsoNormal><span>Všechny reklamní materiály uvádějící funkce nebo použití tohoto softwaru musí obsahovat následující potvrzení: "Tento produkt zahrnuje software vyvinutý projektem OpenSSL pro použití v sadě OpenSSL Toolkit. (http://www.openssl.org/)"<o:p></o:p></span><p class=MsoNormal><span>4.Názvy "OpenSSL Toolkit" a "OpenSSL Project" nesmí být bez předchozího písemného souhlasu použity k propagaci nebo propagaci produktů odvozených z tohoto softwaru. Pro písemné povolení nás prosím kontaktujte openssl-core@openssl.org.<o:p></o:p></span><p class=MsoNormal><span>5.Produkty odvozené od tohoto softwaru nesmí být nazývány "OpenSSL" ani se nesmí "OpenSSL" objevit v jejich jménech bez předchozího písemného souhlasu projektu OpenSSL.<o:p></o:p></span><p class=MsoNormal><span>6.Redistribuce jakékoli formy si musí zachovat následující potvrzení: "Tento produkt zahrnuje software vyvinutý v rámci projektu OpenSSL pro použití v sadě OpenSSL Toolkit (http://www.openssl.org/)".<o:p></o:p></span><p class=MsoNormal><span>THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<o:p></o:p></span><p class=MsoNormal><b><span>3.jQuery Foundation - MIT licence</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation a ostatní přispěvatelé <a href=http://jquery.com/ >http://jquery.com/</a></span><p class=MsoNormal><span>SOFTWARE JE POSKYTOVÁN "TAK JAK JE", BEZ ZÁRUKY, VYJÁDŘENÉ NEBO IMPLIKOVANÉ, VČETNĚ NEJEDNÁVANÝCH ZÁRUK OBCHODOVATELNOSTI, VHODNOSTI PRO URČITÝ ÚČEL A NEZÁVISLOST. V ŽÁDNÉM PŘÍPADĚ NEPOSKYTUJÍ AUTOŘI NEBO DRŽITELÉ AUTORSKÝCH PRÁV ŽÁDNÉ ZÁRUKY, ZA POŠKOZENÍ NEBO OSTATNÍ ODPOVĚDNOST, PŘI ČINNOSTI SMLOUVY, TORTU NEBO JINÉ, VYPLÝVAJÍCÍ ZE SOFTWARU NEBO POUŽITÍ NEBO OSTATNÍCH OBCHODŮ SOFTWARE.</span><p class=MsoNormal><b><span>4.jQuery User Interface - MIT Licence</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation a ostatní přispěvatelé, <a href=http://jqueryui.com/ >http://jqueryui.com/</a></span><p class=MsoNormal><span>Tento software se skládá z dobrovolných příspěvků mnoha jednotlivců (AUTHORS.txt, http://jqueryui.com/about ). Přesnou historii příspěvků naleznete v historii revizí a protokolech dostupných na adrese http://jquery-ui.googlecode.com/svn/<o:p></o:p></span><p class=MsoNormal><span>SOFTWARE JE POSKYTOVÁN "TAK JAK JE", BEZ ZÁRUKY, VYJÁDŘENÉ NEBO IMPLIKOVANÉ, VČETNĚ NEJEDNÁVANÝCH ZÁRUK OBCHODOVATELNOSTI, VHODNOSTI PRO URČITÝ ÚČEL A NEZÁVISLOST. V ŽÁDNÉM PŘÍPADĚ NEPOSKYTUJÍ AUTOŘI NEBO DRŽITELÉ AUTORSKÝCH PRÁV ŽÁDNÉ ZÁRUKY, ZA POŠKOZENÍ NEBO OSTATNÍ ODPOVĚDNOST, PŘI ČINNOSTI SMLOUVY, TORTU NEBO JINÉ, VYPLÝVAJÍCÍ ZE SOFTWARU NEBO POUŽITÍ NEBO OSTATNÍCH OBCHODŮ SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>5.noVNC - Mozilla Public licence 2.0</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/kanaka/noVNC/blob/master/LICENSE.txt>https://github.com/kanaka/noVNC/blob/master/LICENSE.txt</a></span><p class=MsoNormal><span>Copyright (C) 2011 Joel Martin This Source Code Form podléhá podmínkám Mozilla Public licence, v. 2.0. Pokud kopie tohoto MPL nebyla distribuována s tímto souborem, můžete si ji pořídit na adrese http://mozilla.org/MPL/2.0/.<o:p></o:p></span><p class=MsoNormal><b><span>6.Rcarousel - MIT LIcense</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/ryrych/rcarousel/blob/master/widget/license>https://github.com/ryrych/rcarousel/blob/master/widget/license</a></span><p class=MsoNormal><span>Copyright (c) 2010 Wojciech 'RRH' Ryrych<o:p></o:p></span><p class=MsoNormal><span>SOFTWARE JE POSKYTOVÁN "TAK JAK JE", BEZ ZÁRUKY, VYJÁDŘENÉ NEBO IMPLIKOVANÉ, VČETNĚ NEJEDNÁVANÝCH ZÁRUK OBCHODOVATELNOSTI, VHODNOSTI PRO URČITÝ ÚČEL A NEZÁVISLOST. V ŽÁDNÉM PŘÍPADĚ NEPOSKYTUJÍ AUTOŘI NEBO DRŽITELÉ AUTORSKÝCH PRÁV ŽÁDNÉ ZÁRUKY, ZA POŠKOZENÍ NEBO OSTATNÍ ODPOVĚDNOST, PŘI ČINNOSTI SMLOUVY, TORTU NEBO JINÉ, VYPLÝVAJÍCÍ ZE SOFTWARU NEBO POUŽITÍ NEBO OSTATNÍCH OBCHODŮ SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UK licence</span></b><span><o:p></o:p></span><p class=MsoNormal><span>Tento software využívá kódy z <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a> licencováno pod <a href=http://creativecommons.org/licenses/by/2.0/uk/legalcode>http://creativecommons.org/licenses/by/2.0/uk/legalcode</a> a jeho zdroj může být stažen z <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a>.<o:p></o:p></span></p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Zpět</a></table></div></div><script>'use strict';
2 var uiMode = parseInt(getstore('uiMode', 1));
3 var webPageStackMenu = false;
4 var webPageFullScreen = true;
views/translations/terms-min_fr.handlebars
+1 -1
@@ -1,4 +1,4 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Terms of use</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0"></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface à largeur fixe"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Basculer mode nuit"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Conditions d'utilisation</h1><p>Please contact the site administrator for terms of use.<hr><p class=MsoNormal>The following are the required disclosures of open source components and software incorporated into this software.<p class=MsoNormal><b><span>1.AJAX Control Toolkit - New BSD License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright (c) 2009, CodePlex Foundation. All rights reserved.<o:p></o:p></span><p class=MsoNormal><span>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<o:p></o:p></span><p class=MsoNormal><span>1.Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.<o:p></o:p></span><p class=MsoNormal><span>2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.<o:p></o:p></span><p class=MsoNormal><span>3.Neither the name of CodePlex Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.<o:p></o:p></span><p class=MsoNormal><span>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<o:p></o:p></span><p class=MsoNormal><b><span>2.OpenSSL – OpenSSL and SSLeay License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=http://www.openssl.org/source/license.html>http://www.openssl.org/source/license.html</a></span><p class=MsoNormal><span>Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.<o:p></o:p></span><p class=MsoNormal><span>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<o:p></o:p></span><p class=MsoNormal><span>1.Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.<o:p></o:p></span><p class=MsoNormal><span>2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.<o:p></o:p></span><p class=MsoNormal><span>3.All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)"<o:p></o:p></span><p class=MsoNormal><span>4.The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.<o:p></o:p></span><p class=MsoNormal><span>5.Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project.<o:p></o:p></span><p class=MsoNormal><span>6.Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)".<o:p></o:p></span><p class=MsoNormal><span>THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<o:p></o:p></span><p class=MsoNormal><b><span>3.jQuery Foundation - MIT License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation and other contributors <a href=http://jquery.com/ >http://jquery.com/</a></span><p class=MsoNormal><span>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span><p class=MsoNormal><b><span>4.jQuery User Interface - MIT License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation and other contributors, <a href=http://jqueryui.com/ >http://jqueryui.com/</a></span><p class=MsoNormal><span>This software consists of voluntary contributions made by many individuals (AUTHORS.txt, http://jqueryui.com/about ). For exact contribution history,see the revision history and logs, available at http://jquery-ui.googlecode.com/svn/<o:p></o:p></span><p class=MsoNormal><span>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>5.noVNC - Mozilla Public License 2.0</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/kanaka/noVNC/blob/master/LICENSE.txt>https://github.com/kanaka/noVNC/blob/master/LICENSE.txt</a></span><p class=MsoNormal><span>Copyright (C) 2011 Joel Martin This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.<o:p></o:p></span><p class=MsoNormal><b><span>6.Rcarousel - MIT LIcense</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/ryrych/rcarousel/blob/master/widget/license>https://github.com/ryrych/rcarousel/blob/master/widget/license</a></span><p class=MsoNormal><span>Copyright (c) 2010 Wojciech 'RRH' Ryrych<o:p></o:p></span><p class=MsoNormal><span>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UK License</span></b><span><o:p></o:p></span><p class=MsoNormal><span>This software uses code from <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a> licensed under the <a href=http://creativecommons.org/licenses/by/2.0/uk/legalcode>http://creativecommons.org/licenses/by/2.0/uk/legalcode</a> and its source can be downloaded from <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a>.<o:p></o:p></span></p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Retour</a></table></div></div><script>'use strict';
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Terms of use</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0"></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="User interface selection"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Left bar interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Top bar interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface à largeur fixe"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Basculer mode nuit"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Conditions d'utilisation</h1><p>Please contact the site administrator for terms of use.<hr><p class=MsoNormal>The following are the required disclosures of open source components and software incorporated into this software.<p class=MsoNormal><b><span>1.AJAX Control Toolkit - New BSD License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright (c) 2009, CodePlex Foundation. All rights reserved.<o:p></o:p></span><p class=MsoNormal><span>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<o:p></o:p></span><p class=MsoNormal><span>1.Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.<o:p></o:p></span><p class=MsoNormal><span>2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.<o:p></o:p></span><p class=MsoNormal><span>3.Neither the name of CodePlex Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.<o:p></o:p></span><p class=MsoNormal><span>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<o:p></o:p></span><p class=MsoNormal><b><span>2.OpenSSL – OpenSSL and SSLeay License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=http://www.openssl.org/source/license.html>http://www.openssl.org/source/license.html</a></span><p class=MsoNormal><span>Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.<o:p></o:p></span><p class=MsoNormal><span>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<o:p></o:p></span><p class=MsoNormal><span>1.Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.<o:p></o:p></span><p class=MsoNormal><span>2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.<o:p></o:p></span><p class=MsoNormal><span>3.All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)"<o:p></o:p></span><p class=MsoNormal><span>4.The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.<o:p></o:p></span><p class=MsoNormal><span>5.Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project.<o:p></o:p></span><p class=MsoNormal><span>6.Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)".<o:p></o:p></span><p class=MsoNormal><span>THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<o:p></o:p></span><p class=MsoNormal><b><span>3.jQuery Foundation - MIT License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation and other contributors <a href=http://jquery.com/ >http://jquery.com/</a></span><p class=MsoNormal><span>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span><p class=MsoNormal><b><span>4.jQuery User Interface - MIT License</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation and other contributors, <a href=http://jqueryui.com/ >http://jqueryui.com/</a></span><p class=MsoNormal><span>This software consists of voluntary contributions made by many individuals (AUTHORS.txt, http://jqueryui.com/about ). For exact contribution history,see the revision history and logs, available at http://jquery-ui.googlecode.com/svn/<o:p></o:p></span><p class=MsoNormal><span>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>5.noVNC - Mozilla Public License 2.0</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/kanaka/noVNC/blob/master/LICENSE.txt>https://github.com/kanaka/noVNC/blob/master/LICENSE.txt</a></span><p class=MsoNormal><span>Copyright (C) 2011 Joel Martin This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.<o:p></o:p></span><p class=MsoNormal><b><span>6.Rcarousel - MIT LIcense</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/ryrych/rcarousel/blob/master/widget/license>https://github.com/ryrych/rcarousel/blob/master/widget/license</a></span><p class=MsoNormal><span>Copyright (c) 2010 Wojciech 'RRH' Ryrych<o:p></o:p></span><p class=MsoNormal><span>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UK License</span></b><span><o:p></o:p></span><p class=MsoNormal><span>This software uses code from <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a> licensed under the <a href=http://creativecommons.org/licenses/by/2.0/uk/legalcode>http://creativecommons.org/licenses/by/2.0/uk/legalcode</a> and its source can be downloaded from <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a>.<o:p></o:p></span></p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Retour</a></table></div></div><script>'use strict';
2 var uiMode = parseInt(getstore('uiMode', 1));
3 var webPageStackMenu = false;
4 var webPageFullScreen = true;
views/translations/terms-min_ja.handlebars
+1 -1
@@ -1,4 +1,4 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Terms of use</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0"></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title=ユーザーインターフェイスの選択 onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title=左バーインターフェイス><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title=トップバーインターフェース><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title=固定幅インターフェイス><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title=ナイトモードを切り替える><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>利用規約</h1><p>利用規約については、サイト管理者にお問い合わせください。<hr><p class=MsoNormal>以下は、このソフトウェアに組み込まれているオープンソースコンポーネントとソフトウェアの必須の開示です。<p class=MsoNormal><b><span>1.AJAX Control Toolkit-新しいBSDライセンス</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright(c)2009、CodePlex Foundation。全著作権所有。<o:p></o:p></span><p class=MsoNormal><span>ソースおよびバイナリ形式での再配布および使用は、変更の有無にかかわらず、次の条件が満たされている場合に許可されます。<o:p></o:p></span><p class=MsoNormal><span>1.ソースコードの再配布には、上記の著作権表示、この条件リスト、および以下の免責事項を保持する必要があります。<o:p></o:p></span><p class=MsoNormal><span>2.バイナリ形式での再配布では、上記の著作権表示、この条件リスト、および以下の免責事項を、配布物とともに提供されるドキュメントおよび/またはその他の資料に複製する必要があります。<o:p></o:p></span><p class=MsoNormal><span>3. CodePlex Foundationの名前もその貢献者の名前も、書面による事前の許可なしに、このソフトウェアから派生した製品を推奨または宣伝するために使用することはできません。<o:p></o:p></span><p class=MsoNormal><span>このソフトウェアは、著作権者および寄稿者によって「現状のまま」提供され、商品性および特定の目的への適合性の黙示的な保証を含むがこれに限定されない明示的または黙示的な保証は放棄されます。いかなる場合においても、著作権所有者または貢献者は、直接的、間接的、偶発的、特別、例示的、または結果的な損害(代替品またはサービスの調達、代替品、データ、または利益の損失を含むが、これらに限定されない)について責任を負わないものとしますまたはビジネス中断)責任の理論、または契約、厳格な責任、または不法行為(過失またはその他を含む)にかかわらず、このソフトウェアの使用から生じたものであっても、POSSIの可能性がある場合でも。<o:p></o:p></span><p class=MsoNormal><b><span>2.OpenSSL – OpenSSLおよびSSLeayライセンス</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=http://www.openssl.org/source/license.html>http://www.openssl.org/source/license.html</a></span><p class=MsoNormal><span>Copyright(c)1998-2011 The OpenSSL Project。全著作権所有。<o:p></o:p></span><p class=MsoNormal><span>ソースおよびバイナリ形式での再配布および使用は、変更の有無にかかわらず、次の条件が満たされている場合に許可されます。<o:p></o:p></span><p class=MsoNormal><span>1.ソースコードの再配布には、上記の著作権表示、この条件リスト、および以下の免責事項を保持する必要があります。<o:p></o:p></span><p class=MsoNormal><span>2.バイナリ形式での再配布では、上記の著作権表示、この条件リスト、および以下の免責事項を、配布物とともに提供されるドキュメントおよび/またはその他の資料に複製する必要があります。<o:p></o:p></span><p class=MsoNormal><span>3.このソフトウェアの機能または使用について言及するすべての広告資料には、「この製品には、OpenSSL Toolkitで使用するためにOpenSSL Projectによって開発されたソフトウェアが含まれます。(http://www.openssl.org/)」<o:p></o:p></span><p class=MsoNormal><span>4.「OpenSSL Toolkit」および「OpenSSL Project」という名前は、事前の書面による許可なしに、このソフトウェアから派生した製品を推奨または宣伝するために使用しないでください。書面による許可については、openssl-core @ openssl.orgにお問い合わせください。<o:p></o:p></span><p class=MsoNormal><span>5.このソフトウェアから派生した製品は、OpenSSL Projectの事前の書面による許可なしに、「OpenSSL」と呼ばれたり、名前に「OpenSSL」が表示されたりすることはありません。<o:p></o:p></span><p class=MsoNormal><span>6.いかなる形式の再配布でも、「この製品には、OpenSSL Toolkit(http://www.openssl.org/)で使用するためにOpenSSL Projectによって開発されたソフトウェアが含まれます」という承認を保持する必要があります。<o:p></o:p></span><p class=MsoNormal><span>このソフトウェアは、OpenSSLプロジェクトによって「現状のまま」提供され、商品性および特定の目的への適合性の黙示的な保証を含むがこれに限定されない、明示的または黙示的な保証は放棄されます。いかなる場合も、OpenSSLプロジェクトまたはその貢献者は、直接的、間接的、偶発的、特別、例示的、または結果的損害(責任を含むが、特別損害、例示的損害、または結果的損害を含む)の責任を負いませんまたはサービス、使用、データ、または利益の損失、またはビジネス中断)、契約、厳格な責任、または不法行為(過失またはその他を含む)このような損害の可能性について通知された場合でも、ソフトウェア。<o:p></o:p></span><p class=MsoNormal><b><span>3. jQuery Foundation-MITライセンス</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundationおよびその他の貢献者 <a href=http://jquery.com/ >http://jquery.com/</a></span><p class=MsoNormal><span>本ソフトウェアは、商品性、特定の目的への適合性、および非侵害の保証を含むが、これに限らず、明示または黙示を問わず、いかなる保証もなしに「現状のまま」提供されます。いかなる場合でも、作者または著作権者は、契約、不法行為、またはその他の行為、ソフトウェアまたは使用またはその他の取引に起因する、または関連するいかなる請求、損害またはその他の責任についても責任を負わないものとしますソフトウェア。</span><p class=MsoNormal><b><span>4. jQueryユーザーインターフェイス-MITライセンス</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundationおよびその他の貢献者、 <a href=http://jqueryui.com/ >http://jqueryui.com/</a></span><p class=MsoNormal><span>このソフトウェアは、多くの個人による自発的な貢献で構成されています(AUTHORS.txt、http://jqueryui.com/about)。正確な貢献履歴については、http://jquery-ui.googlecode.com/svn/にある改訂履歴とログをご覧ください<o:p></o:p></span><p class=MsoNormal><span>本ソフトウェアは、商品性、特定の目的への適合性、および非侵害の保証を含むが、これに限らず、明示または黙示を問わず、いかなる保証もなしに「現状のまま」提供されます。いかなる場合でも、作者または著作権者は、契約、不法行為、またはその他の行為、ソフトウェアまたは使用またはその他の取引に起因する、または関連するいかなる請求、損害またはその他の責任についても責任を負わないものとしますソフトウェア。<o:p></o:p></span><p class=MsoNormal><b><span>5. noVNC-Mozilla Public License 2.0</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/kanaka/noVNC/blob/master/LICENSE.txt>https://github.com/kanaka/noVNC/blob/master/LICENSE.txt</a></span><p class=MsoNormal><span>Copyright(C)2011 Joel Martinこのソースコードフォームには、Mozilla Public License v。2.0の条件が適用されます。 MPLのコピーがこのファイルとともに配布されていない場合は、http://mozilla.org/MPL/2.0/から入手できます。<o:p></o:p></span><p class=MsoNormal><b><span>6.Rcarousel-MITライセンス</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/ryrych/rcarousel/blob/master/widget/license>https://github.com/ryrych/rcarousel/blob/master/widget/license</a></span><p class=MsoNormal><span>Copyright(c)2010 Wojciech 'RRH' Ryrych<o:p></o:p></span><p class=MsoNormal><span>本ソフトウェアは、商品性、特定の目的への適合性、および非侵害の保証を含むが、これに限らず、明示または黙示を問わず、いかなる保証もなしに「現状のまま」提供されます。いかなる場合でも、作者または著作権者は、契約、不法行為、またはその他の行為、ソフトウェアまたは使用またはその他の取引に起因する、または関連するいかなる請求、損害またはその他の責任についても責任を負わないものとしますソフトウェア。<o:p></o:p></span><p class=MsoNormal><b><span>7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UKライセンス</span></b><span><o:p></o:p></span><p class=MsoNormal><span>このソフトウェアはからのコードを使用します <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a> の下でライセンス <a href=http://creativecommons.org/licenses/by/2.0/uk/legalcode>http://creativecommons.org/licenses/by/2.0/uk/legalcode</a> そのソースはからダウンロードできます <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a>。<o:p></o:p></span></p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >バック</a></table></div></div><script>'use strict';
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Terms of use</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0"></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title=ユーザーインターフェイスの選択 onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title=左バーインターフェイス><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title=トップバーインターフェース><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title=固定幅インターフェイス><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title=ナイトモードを切り替える><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>利用規約</h1><p>利用規約については、サイト管理者にお問い合わせください。<hr><p class=MsoNormal>以下は、このソフトウェアに組み込まれているオープンソースコンポーネントとソフトウェアの必須の開示です。<p class=MsoNormal><b><span>1.AJAX Control Toolkit-新しいBSDライセンス</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright(c)2009、CodePlex Foundation。全著作権所有。<o:p></o:p></span><p class=MsoNormal><span>ソースおよびバイナリ形式での再配布および使用は、変更の有無にかかわらず、次の条件が満たされている場合に許可されます。<o:p></o:p></span><p class=MsoNormal><span>1.ソースコードの再配布には、上記の著作権表示、この条件リスト、および以下の免責事項を保持する必要があります。<o:p></o:p></span><p class=MsoNormal><span>2.バイナリ形式での再配布では、上記の著作権表示、この条件リスト、および以下の免責事項を、配布物とともに提供されるドキュメントおよび/またはその他の資料に複製する必要があります。<o:p></o:p></span><p class=MsoNormal><span>3. CodePlex Foundationの名前もその貢献者の名前も、書面による事前の許可なしに、このソフトウェアから派生した製品を推奨または宣伝するために使用することはできません。<o:p></o:p></span><p class=MsoNormal><span>このソフトウェアは、著作権者および寄稿者によって「現状のまま」提供され、商品性および特定の目的への適合性の黙示的な保証を含むがこれに限定されない明示的または黙示的な保証は放棄されます。いかなる場合においても、著作権所有者または貢献者は、直接的、間接的、偶発的、特別、例示的、または結果的な損害(代替品またはサービスの調達、代替品、データ、または利益の損失を含むが、これらに限定されない)について責任を負わないものとしますまたはビジネス中断)責任の理論、または契約、厳格な責任、または不法行為(過失またはその他を含む)にかかわらず、このソフトウェアの使用から生じたものであっても、POSSIの可能性がある場合でも。<o:p></o:p></span><p class=MsoNormal><b><span>2.OpenSSL – OpenSSLおよびSSLeayライセンス</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=http://www.openssl.org/source/license.html>http://www.openssl.org/source/license.html</a></span><p class=MsoNormal><span>Copyright(c)1998-2011 The OpenSSL Project。全著作権所有。<o:p></o:p></span><p class=MsoNormal><span>ソースおよびバイナリ形式での再配布および使用は、変更の有無にかかわらず、次の条件が満たされている場合に許可されます。<o:p></o:p></span><p class=MsoNormal><span>1.ソースコードの再配布には、上記の著作権表示、この条件リスト、および以下の免責事項を保持する必要があります。<o:p></o:p></span><p class=MsoNormal><span>2.バイナリ形式での再配布では、上記の著作権表示、この条件リスト、および以下の免責事項を、配布物とともに提供されるドキュメントおよび/またはその他の資料に複製する必要があります。<o:p></o:p></span><p class=MsoNormal><span>3.このソフトウェアの機能または使用について言及するすべての広告資料には、「この製品には、OpenSSL Toolkitで使用するためにOpenSSL Projectによって開発されたソフトウェアが含まれます。(http://www.openssl.org/)」<o:p></o:p></span><p class=MsoNormal><span>4.「OpenSSL Toolkit」および「OpenSSL Project」という名前は、事前の書面による許可なしに、このソフトウェアから派生した製品を推奨または宣伝するために使用しないでください。書面による許可については、openssl-core @ openssl.orgにお問い合わせください。<o:p></o:p></span><p class=MsoNormal><span>5.このソフトウェアから派生した製品は、OpenSSL Projectの事前の書面による許可なしに、「OpenSSL」と呼ばれたり、名前に「OpenSSL」が表示されたりすることはありません。<o:p></o:p></span><p class=MsoNormal><span>6.いかなる形式の再配布でも、「この製品には、OpenSSL Toolkit(http://www.openssl.org/)で使用するためにOpenSSL Projectによって開発されたソフトウェアが含まれます」という承認を保持する必要があります。<o:p></o:p></span><p class=MsoNormal><span>このソフトウェアは、OpenSSLプロジェクトによって「現状のまま」提供され、商品性および特定の目的への適合性の黙示的な保証を含むがこれに限定されない、明示的または黙示的な保証は放棄されます。いかなる場合も、OpenSSLプロジェクトまたはその貢献者は、直接的、間接的、偶発的、特別、例示的、または結果的損害(責任を含むが、特別損害、例示的損害、または結果的損害を含む)の責任を負いませんまたはサービス、使用、データ、または利益の損失、またはビジネス中断)、契約、厳格な責任、または不法行為(過失またはその他を含む)このような損害の可能性について通知された場合でも、ソフトウェア。<o:p></o:p></span><p class=MsoNormal><b><span>3. jQuery Foundation-MITライセンス</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundationおよびその他の貢献者 <a href=http://jquery.com/ >http://jquery.com/</a></span><p class=MsoNormal><span>本ソフトウェアは、商品性、特定の目的への適合性、および非侵害の保証を含むが、これに限らず、明示または黙示を問わず、いかなる保証もなしに「現状のまま」提供されます。いかなる場合でも、作者または著作権者は、契約、不法行為、またはその他の行為、ソフトウェアまたは使用またはその他の取引に起因する、または関連するいかなる請求、損害またはその他の責任についても責任を負わないものとしますソフトウェア。</span><p class=MsoNormal><b><span>4. jQueryユーザーインターフェイス-MITライセンス</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundationおよびその他の貢献者、 <a href=http://jqueryui.com/ >http://jqueryui.com/</a></span><p class=MsoNormal><span>このソフトウェアは、多くの個人による自発的な貢献で構成されています(AUTHORS.txt、http://jqueryui.com/about)。正確な貢献履歴については、http://jquery-ui.googlecode.com/svn/にある改訂履歴とログをご覧ください<o:p></o:p></span><p class=MsoNormal><span>本ソフトウェアは、商品性、特定の目的への適合性、および非侵害の保証を含むが、これに限らず、明示または黙示を問わず、いかなる保証もなしに「現状のまま」提供されます。いかなる場合でも、作者または著作権者は、契約、不法行為、またはその他の行為、ソフトウェアまたは使用またはその他の取引に起因する、または関連するいかなる請求、損害またはその他の責任についても責任を負わないものとしますソフトウェア。<o:p></o:p></span><p class=MsoNormal><b><span>5. noVNC-Mozilla Public License 2.0</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/kanaka/noVNC/blob/master/LICENSE.txt>https://github.com/kanaka/noVNC/blob/master/LICENSE.txt</a></span><p class=MsoNormal><span>Copyright(C)2011 Joel Martinこのソースコードフォームには、Mozilla Public License v。2.0の条件が適用されます。 MPLのコピーがこのファイルとともに配布されていない場合は、http://mozilla.org/MPL/2.0/から入手できます。<o:p></o:p></span><p class=MsoNormal><b><span>6.Rcarousel-MITライセンス</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/ryrych/rcarousel/blob/master/widget/license>https://github.com/ryrych/rcarousel/blob/master/widget/license</a></span><p class=MsoNormal><span>Copyright(c)2010 Wojciech 'RRH' Ryrych<o:p></o:p></span><p class=MsoNormal><span>本ソフトウェアは、商品性、特定の目的への適合性、および非侵害の保証を含むが、これに限らず、明示または黙示を問わず、いかなる保証もなしに「現状のまま」提供されます。いかなる場合でも、作者または著作権者は、契約、不法行為、またはその他の行為、ソフトウェアまたは使用またはその他の取引に起因する、または関連するいかなる請求、損害またはその他の責任についても責任を負わないものとしますソフトウェア。<o:p></o:p></span><p class=MsoNormal><b><span>7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UKライセンス</span></b><span><o:p></o:p></span><p class=MsoNormal><span>このソフトウェアはからのコードを使用します <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a> の下でライセンス <a href=http://creativecommons.org/licenses/by/2.0/uk/legalcode>http://creativecommons.org/licenses/by/2.0/uk/legalcode</a> そのソースはからダウンロードできます <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a>。<o:p></o:p></span></p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >バック</a></table></div></div><script>'use strict';
2 var uiMode = parseInt(getstore('uiMode', 1));
3 var webPageStackMenu = false;
4 var webPageFullScreen = true;
views/translations/terms-min_nl.handlebars new
+84
@@ -0,0 +1,84 @@
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Terms of use</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0"></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Selectie gebruikersinterface"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Linkerbalk interface"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Boven werkbalk interface"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface met vaste breedte"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Wissel nachtmodus"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Gebruiksvoorwaarden</h1><p>Neem contact op met de sitebeheerder voor gebruiksvoorwaarden.<hr><p class=MsoNormal>Hierna volgen de vereiste informatie over open source-componenten en software die in deze software is opgenomen.<p class=MsoNormal><b><span>1.AJAX Control Toolkit - Nieuwe BSD Licentie</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright (c) 2009, CodePlex Foundation. Alle rechten voorbehouden.<o:p></o:p></span><p class=MsoNormal><span>Herdistributie en gebruik in bron- en binaire vorm, met of zonder wijziging, zijn toegestaan mits aan de volgende voorwaarden wordt voldaan:<o:p></o:p></span><p class=MsoNormal><span>1. Herdistributies van broncode moeten de bovenstaande copyright kennisgeving en deze lijst met voorwaarden en de volgende disclaimer bevatten.<o:p></o:p></span><p class=MsoNormal><span>2. Herdistributies in binaire vorm moeten de bovenstaande copyright kennisgeving, deze lijst met voorwaarden en de volgende disclaimer reproduceren in de documentatie en / of andere materialen die bij de distributie worden geleverd.<o:p></o:p></span><p class=MsoNormal><span>3. Noch de naam van CodePlex Foundation, noch de namen van haar bijdragers mogen worden gebruikt om producten die zijn afgeleid van deze software te ondersteunen of promoten zonder specifieke voorafgaande schriftelijke toestemming.<o:p></o:p></span><p class=MsoNormal><span>DEZE SOFTWARE WORDT GELEVERD DOOR DE AUTEURSRECHTHOUDERS EN BIJDRAGERS "ALS ZODANIG" EN ENIGE EXPLICIETE OF IMPLICIETE GARANTIES, INCLUSIEF, MAAR NIET BEPERKT TOT, DE IMPLICIETE GARANTIES VAN VERKOOPBAARHEID EN GESCHIKTHEID VOOR EEN BEPAALD DOEL. IN GEEN GEVAL ZULLEN DE EIGENAAR VAN HET AUTEURSRECHT OF DE BIJDRAGERS AANSPRAKELIJK ZIJN VOOR ENIGE DIRECTE, INDIRECTE, INCIDENTELE, SPECIALE, UITZONDERLIJKE OF GEVOLGSCHADE (INCLUSIEF, MAAR NIET BEPERKT TOT, AANSCHAF VAN VERVANGENDE GOEDEREN OF DIENSTEN; VERLIES VAN GEBRUIK, GEGEVENS OF GEGEVENS; OF ONDERBREKING VAN HET BEDRIJF) EVENWEL VEROORZAAKT EN OP ENIGE AANSPRAAK VAN AANSPRAKELIJKHEID, OF IN CONTRACT, STRIKTE AANSPRAKELIJKHEID OF STORT (INCLUSIEF NALATIGHEID OF ANDERSZINS) DIE VOORTVLOEIT OP ENIGE MANIER UIT HET GEBRUIK VAN DEZE SOFTWARE, ZELFS ALS GEADVISEERD VAN DE MOGELIJKHEID.<o:p></o:p></span><p class=MsoNormal><b><span>2.OpenSSL – OpenSSL en SSLeay Licentie</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=http://www.openssl.org/source/license.html>http://www.openssl.org/source/license.html</a></span><p class=MsoNormal><span>Copyright (c) 1998-2011 The OpenSSL Project. Alle rechten voorbehouden.<o:p></o:p></span><p class=MsoNormal><span>Herdistributie en gebruik in bron- en binaire vorm, met of zonder wijziging, zijn toegestaan mits aan de volgende voorwaarden wordt voldaan:<o:p></o:p></span><p class=MsoNormal><span>1. Herdistributies van broncode moeten de bovenstaande copyright kennisgeving en deze lijst met voorwaarden en de volgende disclaimer bevatten.<o:p></o:p></span><p class=MsoNormal><span>2. Herdistributies in binaire vorm moeten de bovenstaande copyright kennisgeving, deze lijst met voorwaarden en de volgende disclaimer reproduceren in de documentatie en / of andere materialen die bij de distributie worden geleverd.<o:p></o:p></span><p class=MsoNormal><span>3.Alle advertentiematerialen die functies of gebruik van deze software maken, moeten de volgende tekst bevatten: "Dit product bevat software die is ontwikkeld door het OpenSSL-project voor gebruik in de OpenSSL Toolkit. (Http://www.openssl.org/)"<o:p></o:p></span><p class=MsoNormal><span>4. De namen "OpenSSL Toolkit" en "OpenSSL Project" mogen niet worden gebruikt om producten die zijn afgeleid van deze software te ondersteunen of promoten zonder voorafgaande schriftelijke toestemming. Neem voor schriftelijke toestemming contact op met openssl-core@openssl.org.<o:p></o:p></span><p class=MsoNormal><span>5. Producten die zijn afgeleid van deze software mogen niet "OpenSSL" worden genoemd, noch mag "OpenSSL" in hun naam worden weergegeven zonder voorafgaande schriftelijke toestemming van het OpenSSL-project.<o:p></o:p></span><p class=MsoNormal><span>6. Herdistributies in welke vorm dan ook moet de volgende tekst behouden: "Dit product bevat software die is ontwikkeld door het OpenSSL-project voor gebruik in de OpenSSL Toolkit (http://www.openssl.org/)".<o:p></o:p></span><p class=MsoNormal><span>DEZE SOFTWARE WORDT GELEVERD DOOR HET OpenSSL-PROJECT `` ZOALS HET IS '' EN ELKE UITDRUKKELIJKE OF IMPLICIETE GARANTIES, INCLUSIEF MAAR NIET BEPERKT TOT DE IMPLICIETE GARANTIES VAN VERKOOPBAARHEID EN GESCHIKTHEID VOOR EEN BEPAALD DOEL WORDEN AFGEWEZEN. IN GEEN GEVAL ZAL HET PROJECT VAN DE OpenSSL OF HAAR BIJDRAGERS AANSPRAKELIJK ZIJN VOOR ENIGE DIRECTE, INDIRECTE, INCIDENTELE, SPECIALE, UITZONDERLIJKE OF GEVOLGSCHADE (INCLUSIEF, MAAR SPECIALE, UITZONDERLIJKE OF GEVOLGSCHADE (INCLUSIEF, MAAR NIET BEPERKT TOT SCHULDEN) OF DIENSTEN; VERLIES VAN GEBRUIK, GEGEVENS OF WINST; OF ONDERBREKING VAN HET BEDRIJF) EVENWEL OORZAAKT EN OP ENIGE AANSPRAAK VAN AANSPRAKELIJKHEID, OF IN CONTRACT, STRIKTE AANSPRAKELIJKHEID, OF TORT (INCLUSIEF NALATIGHEID OF ANDERSZINS) DIE OP ENIGE MANIER UIT DE GEBRUIKSVOORWAARDEN ONTSTAAN SOFTWARE, ZELFS INDIEN GEADVISEERD DOOR DE MOGELIJKHEID VAN DERGELIJKE SCHADE.<o:p></o:p></span><p class=MsoNormal><b><span>3.jQuery Foundation - MIT Licentie</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation en andere bijdragers <a href=http://jquery.com/ >http://jquery.com/</a></span><p class=MsoNormal><span>DE SOFTWARE WORDT "ALS ZODANIG" GELEVERD, ZONDER ENIGE VORM VAN GARANTIE, UITDRUKKELIJK OF IMPLICIET, INCLUSIEF MAAR NIET BEPERKT TOT DE GARANTIES VAN VERKOOPBAARHEID, GESCHIKTHEID VOOR EEN BEPAALD DOEL EN NIET-INBREUK. IN GEEN GEVAL ZULLEN DE AUTEURS OF AUTEURSRECHTHOUDERS AANSPRAKELIJK ZIJN VOOR ENIGE CLAIM, SCHADE OF ANDERE AANSPRAKELIJKHEID, OOK IN EEN HANDELING VAN CONTRACT, SCHORT OF ANDERSZINS DIE VOORTVLOEIEN UIT, IN OF IN VERBAND MET DE SOFTWARE OF HET GEBRUIK OF ANDERE HANDELINGEN IN DE SOFTWARE.</span><p class=MsoNormal><b><span>4.jQuery Gebruikers Interface - MIT Licentie</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation en andere bijdragers, <a href=http://jqueryui.com/ >http://jqueryui.com/</a></span><p class=MsoNormal><span>This software consists of voluntary contributions made by many individuals (AUTHORS.txt, http://jqueryui.com/about ). For exact contribution history,see the revision history and logs, available at http://jquery-ui.googlecode.com/svn/<o:p></o:p></span><p class=MsoNormal><span>DE SOFTWARE WORDT "ALS ZODANIG" GELEVERD, ZONDER ENIGE VORM VAN GARANTIE, UITDRUKKELIJK OF IMPLICIET, INCLUSIEF MAAR NIET BEPERKT TOT DE GARANTIES VAN VERKOOPBAARHEID, GESCHIKTHEID VOOR EEN BEPAALD DOEL EN NIET-INBREUK. IN GEEN GEVAL ZULLEN DE AUTEURS OF AUTEURSRECHTHOUDERS AANSPRAKELIJK ZIJN VOOR ENIGE CLAIM, SCHADE OF ANDERE AANSPRAKELIJKHEID, OOK IN EEN HANDELING VAN CONTRACT, SCHORT OF ANDERSZINS DIE VOORTVLOEIEN UIT, IN OF IN VERBAND MET DE SOFTWARE OF HET GEBRUIK OF ANDERE HANDELINGEN IN DE SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>5.noVNC - Mozilla Public Licentie 2.0</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/kanaka/noVNC/blob/master/LICENSE.txt>https://github.com/kanaka/noVNC/blob/master/LICENSE.txt</a></span><p class=MsoNormal><span>Copyright (C) 2011 Joel Martin Dit broncodeformulier is onderworpen aan de voorwaarden van de Mozilla Public License, v. 2.0. Als een kopie van de MPL niet met dit bestand is verspreid, kunt u er een verkrijgen op http://mozilla.org/MPL/2.0/.<o:p></o:p></span><p class=MsoNormal><b><span>6.Rcarousel - MIT Licentie</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/ryrych/rcarousel/blob/master/widget/license>https://github.com/ryrych/rcarousel/blob/master/widget/license</a></span><p class=MsoNormal><span>Copyright (c) 2010 Wojciech 'RRH' Ryrych<o:p></o:p></span><p class=MsoNormal><span>DE SOFTWARE WORDT "ALS ZODANIG" GELEVERD, ZONDER ENIGE VORM VAN GARANTIE, UITDRUKKELIJK OF IMPLICIET, INCLUSIEF MAAR NIET BEPERKT TOT DE GARANTIES VAN VERKOOPBAARHEID, GESCHIKTHEID VOOR EEN BEPAALD DOEL EN NIET-INBREUK. IN GEEN GEVAL ZULLEN DE AUTEURS OF AUTEURSRECHTHOUDERS AANSPRAKELIJK ZIJN VOOR ENIGE CLAIM, SCHADE OF ANDERE AANSPRAKELIJKHEID, OOK IN EEN HANDELING VAN CONTRACT, SCHORT OF ANDERSZINS DIE VOORTVLOEIEN UIT, IN OF IN VERBAND MET DE SOFTWARE OF HET GEBRUIK OF ANDERE HANDELINGEN IN DE SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UK Licentie</span></b><span><o:p></o:p></span><p class=MsoNormal><span>Deze software maakt gebruik van code van <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a> onder licentie van de <a href=http://creativecommons.org/licenses/by/2.0/uk/legalcode>http://creativecommons.org/licenses/by/2.0/uk/legalcode</a> en de bron kan worden gedownload van <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a>.<o:p></o:p></span></p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Terug</a></table></div></div><script>'use strict';
2 + var uiMode = parseInt(getstore('uiMode', 1));
3 + var webPageStackMenu = false;
4 + var webPageFullScreen = true;
5 + var nightMode = (getstore('_nightMode', '0') == '1');
6 + var logoutControls = {{{logoutControls}}};
7 +
8 + var terms = '{{{terms}}}';
9 + if (terms != '') { QH('column_l', decodeURIComponent(terms)); }
10 + QV('column_l', true);
11 + userInterfaceSelectMenu();
12 +
13 + // Setup logout control
14 + var logoutControl = '';
15 + if (logoutControls.name != null) { logoutControl = format("Welkom {0}.", logoutControls.name); }
16 + if (logoutControls.logoutUrl != null) { logoutControl += format(' <a href=\"' + logoutControls.logoutUrl + '\" style="color:white">' + "Uitloggen" + '</a>'); }
17 + QH('logoutControl', logoutControl);
18 +
19 + // Toggle user interface menu
20 + function showUserInterfaceSelectMenu() {
21 + Q('uiViewButton1').classList.remove('uiSelectorSel');
22 + Q('uiViewButton2').classList.remove('uiSelectorSel');
23 + Q('uiViewButton3').classList.remove('uiSelectorSel');
24 + Q('uiViewButton4').classList.remove('uiSelectorSel');
25 + try { Q('uiViewButton' + uiMode).classList.add('uiSelectorSel'); } catch (ex) { }
26 + QV('uiMenu', (QS('uiMenu').display == 'none'));
27 + if (nightMode) { Q('uiViewButton4').classList.add('uiSelectorSel'); }
28 + }
29 +
30 + function userInterfaceSelectMenu(s) {
31 + if (s) { uiMode = s; putstore('uiMode', uiMode); }
32 + webPageFullScreen = (uiMode < 3);
33 + webPageStackMenu = true;//(uiMode > 1);
34 + toggleFullScreen(0);
35 + toggleStackMenu(0);
36 + QC('column_l').add('room4submenu');
37 + }
38 +
39 + function toggleNightMode() {
40 + nightMode = !nightMode;
41 + if (nightMode) { QC('body').add('night'); } else { QC('body').remove('night'); }
42 + putstore('_nightMode', nightMode ? '1' : '0');
43 + }
44 +
45 + // Toggle the web page to full screen
46 + function toggleFullScreen(toggle) {
47 + if (toggle === 1) { webPageFullScreen = !webPageFullScreen; putstore('webPageFullScreen', webPageFullScreen); }
48 + var hide = 0;
49 + //if (args.hide) { hide = parseInt(args.hide); }
50 + if (webPageFullScreen == false) {
51 + QC('body').remove('menu_stack');
52 + QC('body').remove('fullscreen');
53 + QC('body').remove('arg_hide');
54 + //if (xxcurrentView >= 10) QC('column_l').add('room4submenu');
55 + //QV('UserDummyMenuSpan', false);
56 + //QV('page_leftbar', false);
57 + } else {
58 + QC('body').add('fullscreen');
59 + if (hide & 16) QC('body').add('arg_hide'); // This is replacement for QV('page_leftbar', !(hide & 16));
60 + //QV('UserDummyMenuSpan', (xxcurrentView < 10) && webPageFullScreen);
61 + //QV('page_leftbar', true);
62 + }
63 + QV('body', true);
64 + }
65 +
66 + // If FullScreen, toggle menu to be horisontal or vertical
67 + function toggleStackMenu(toggle) {
68 + if (webPageFullScreen == true) {
69 + if (toggle === 1) {
70 + webPageStackMenu = !webPageStackMenu;
71 + putstore('webPageStackMenu', webPageStackMenu);
72 + }
73 + if (webPageStackMenu == false) {
74 + QC('body').remove('menu_stack');
75 + } else {
76 + QC('body').add('menu_stack');
77 + //if (xxcurrentView >= 10) QC('column_l').remove('room4submenu');
78 + }
79 + }
80 + }
81 +
82 + function putstore(name, val) { try { if (typeof (localStorage) === 'undefined') return; localStorage.setItem(name, val); } catch (e) { } }
83 + function getstore(name, val) { try { if (typeof (localStorage) === 'undefined') return val; var v = localStorage.getItem(name); if ((v == null) || (v == null)) return val; return v; } catch (e) { return val; } }
84 + function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };</script>
\ No newline at end of file
views/translations/terms-min_pt.handlebars
+1 -1
@@ -1,4 +1,4 @@
1 -<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Terms of use</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:20px;padding-top:8px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0"></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Seleção da interface do usuário"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Interface da barra esquerda"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Interface da barra superior"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface de largura fixa"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Alternar modo noturno"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Termos de uso</h1><p>Entre em contato com o administrador do site para obter os termos de uso.<hr><p class=MsoNormal>A seguir, são apresentadas as divulgações necessárias de componentes e software de código aberto incorporados neste software.<p class=MsoNormal><b><span>1.AJAX Control Toolkit - Nova licença BSD</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Direitos autorais (c) 2009, CodePlex Foundation.Todos os direitos reservados.<o:p></o:p></span><p class=MsoNormal><span>A redistribuição e uso nas formas de origem e binárias, com ou sem modificação, são permitidas desde que as seguintes condições sejam atendidas:<o:p></o:p></span><p class=MsoNormal><span>1.As redistribuições do código-fonte devem manter o aviso de direitos autorais acima, esta lista de condições e o aviso de isenção de responsabilidade a seguir.<o:p></o:p></span><p class=MsoNormal><span>2.As redistribuições em formato binário devem reproduzir o aviso de direitos autorais acima, esta lista de condições e o aviso de isenção de responsabilidade a seguir na documentação e / ou outros materiais fornecidos com a distribuição.<o:p></o:p></span><p class=MsoNormal><span>3.Nem o nome da CodePlex Foundation nem os nomes de seus colaboradores podem ser usados \u200b\u200bpara endossar ou promover produtos derivados deste software sem permissão prévia por escrito específica.<o:p></o:p></span><p class=MsoNormal><span>ESTE SOFTWARE É FORNECIDO PELOS TITULARES DE DIREITOS AUTORAIS E CONTRIBUIDORES "TAL COMO ESTÁ" E QUALQUER GARANTIA EXPRESSA OU IMPLÍCITA, INCLUINDO, MAS NÃO SE LIMITANDO A, AS GARANTIAS IMPLÍCITAS DE COMERCIALIZAÇÃO E ADEQUAÇÃO A UM PROPÓSITO ESPECÍFICO. EM NENHUM CASO O DIVISOR DE DIREITOS AUTORAIS OU OS CONTRIBUIDORES SERÃO RESPONSÁVEIS POR QUALQUER DANO DIRETO, INDIRETO, INCIDENTAL, ESPECIAL, EXEMPLAR OU CONSEQÜENCIAL (INCLUINDO, MAS NÃO SE LIMITANDO A, PROCURAÇÃO DE BENS OU SERVIÇOS SUBSTITUTOS; PERDA DE USO, DADOS, LUCROS DE USO); OU INTERRUPÇÃO DE NEGÓCIOS), CAUSADA E QUALQUER TEORIA DE RESPONSABILIDADE, CONTRATADA, RESPONSABILIDADE ESTIMATIVA OU ATRIBUIÇÃO (INCLUINDO NEGLIGÊNCIA OU DE OUTRA FORMA), surgindo de qualquer maneira fora do uso deste software, mesmo que seja aconselhável a possibilidade de tal conteúdo.<o:p></o:p></span><p class=MsoNormal><b><span>2.OpenSSL - Licença OpenSSL e SSLeay</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=http://www.openssl.org/source/license.html>http://www.openssl.org/source/license.html</a></span><p class=MsoNormal><span>Copyright (c) 1998-2011 O Projeto OpenSSL.Todos os direitos reservados.<o:p></o:p></span><p class=MsoNormal><span>A redistribuição e uso nas formas de origem e binárias, com ou sem modificação, são permitidas desde que as seguintes condições sejam atendidas:<o:p></o:p></span><p class=MsoNormal><span>1.As redistribuições do código-fonte devem manter o aviso de direitos autorais acima, esta lista de condições e o aviso de isenção de responsabilidade a seguir.<o:p></o:p></span><p class=MsoNormal><span>2.As redistribuições em formato binário devem reproduzir o aviso de direitos autorais acima, esta lista de condições e o aviso de isenção de responsabilidade a seguir na documentação e / ou outros materiais fornecidos com a distribuição.<o:p></o:p></span><p class=MsoNormal><span>3.Todos os materiais publicitários que mencionam os recursos ou o uso deste software devem exibir o seguinte reconhecimento: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)"<o:p></o:p></span><p class=MsoNormal><span>4.The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.<o:p></o:p></span><p class=MsoNormal><span>5.Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project.<o:p></o:p></span><p class=MsoNormal><span>6.As redistribuições de qualquer forma devem manter o seguinte reconhecimento: "Este produto inclui software desenvolvido pelo OpenSSL Project para uso no OpenSSL Toolkit (http://www.openssl.org/)".<o:p></o:p></span><p class=MsoNormal><span>ESTE SOFTWARE É FORNECIDO PELO PROJETO OpenSSL `` COMO ESTÁ '' E QUALQUER GARANTIA EXPRESSA OU IMPLÍCITA, INCLUINDO, MAS NÃO SE LIMITANDO A, AS GARANTIAS IMPLÍCITAS DE COMERCIALIZAÇÃO E ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. EM NENHUM CASO O PROJETO OpenSSL OU SEUS CONTRIBUIDORES SERÃO RESPONSÁVEIS POR QUALQUER DANO DIRETO, INDIRETO, INCIDENTAL, ESPECIAL, EXEMPLAR OU CONSEQÜENCIAL (INCLUINDO DANOS ESPECIAIS, EXEMPLARES OU CONSEQÜENCIAIS (INCLUINDO, PROCESSOS, MAS NÃO LIMITADOS OU SERVIÇOS; PERDA DE USO, DADOS OU LUCROS; OU INTERRUPÇÃO DE NEGÓCIOS), CAUSADOS E QUALQUER TEORIA DE RESPONSABILIDADE, CONTRATOS, RESPONSABILIDADE ESTIMATIVA OU ATORT (INCLUINDO NEGLIGÊNCIA OU DE OUTRA FORMA) QUE POSSUEM DE QUALQUER FORMA DESTE USO SOFTWARE, MESMO SE AVISADO DA POSSIBILIDADE DE TAIS DANOS.<o:p></o:p></span><p class=MsoNormal><b><span>3.jQuery Foundation - Licença MIT</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation e outros colaboradores <a href=http://jquery.com/ >http://jquery.com/</a></span><p class=MsoNormal><span>O SOFTWARE É FORNECIDO "TAL COMO ESTÁ", SEM GARANTIA DE QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, INCLUINDO MAS NÃO SE LIMITANDO A GARANTIAS DE COMERCIALIZAÇÃO, ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA E NÃO INFRACÇÃO. EM NENHUM CASO OS AUTORES OU TITULARES DE DIREITOS AUTORAIS RESPONSABILIZARÃO POR QUALQUER REIVINDICAÇÃO, DANOS OU OUTRA RESPONSABILIDADE, SEJA EM AÇÃO DE CONTRATO, TORT OU OUTRA FORMA, DECORRENTE DE, FORA OU EM CONEXÃO COM O SOFTWARE OU O USO OU OUTROS NEGÓCIOS NO PROGRAMAS.</span><p class=MsoNormal><b><span>4.Interface do Usuário jQuery - Licença MIT</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation e outros colaboradores, <a href=http://jqueryui.com/ >http://jqueryui.com/</a></span><p class=MsoNormal><span>Este software consiste em contribuições voluntárias feitas por muitos indivíduos (AUTORES.txt, http://jqueryui.com/about ). Para obter o histórico exato de contribuições, consulte o histórico de revisões e os logs, disponíveis em http://jquery-ui.googlecode.com/svn/<o:p></o:p></span><p class=MsoNormal><span>O SOFTWARE É FORNECIDO "TAL COMO ESTÁ", SEM GARANTIA DE QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, INCLUINDO MAS NÃO SE LIMITANDO A GARANTIAS DE COMERCIALIZAÇÃO, ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA E NÃO INFRACÇÃO. EM NENHUM CASO OS AUTORES OU TITULARES DE DIREITOS AUTORAIS RESPONSABILIZARÃO POR QUALQUER REIVINDICAÇÃO, DANOS OU OUTRA RESPONSABILIDADE, SEJA EM AÇÃO DE CONTRATO, TORT OU OUTRA FORMA, DECORRENTE DE, FORA OU EM CONEXÃO COM O SOFTWARE OU O USO OU OUTROS NEGÓCIOS NO PROGRAMAS.<o:p></o:p></span><p class=MsoNormal><b><span>5.noVNC - Licença Pública Mozilla 2.0 0</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/kanaka/noVNC/blob/master/LICENSE.txt>https://github.com/kanaka/noVNC/blob/master/LICENSE.txt</a></span><p class=MsoNormal><span>Copyright (C) 2011 Joel Martin Este formulário de código-fonte está sujeito aos termos da Licença Pública Mozilla, v.2.0 0.Se uma cópia da MPL não foi distribuída com este arquivo, você pode obter uma em http: // mozilla.org / MPL / 2.0 /.<o:p></o:p></span><p class=MsoNormal><b><span>6.Rcarousel - License MIT</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/ryrych/rcarousel/blob/master/widget/license>https://github.com/ryrych/rcarousel/blob/master/widget/license</a></span><p class=MsoNormal><span>Copyright (c) 2010 Wojciech 'RRH' Ryrych<o:p></o:p></span><p class=MsoNormal><span>O SOFTWARE É FORNECIDO "TAL COMO ESTÁ", SEM GARANTIA DE QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, INCLUINDO MAS NÃO SE LIMITANDO A GARANTIAS DE COMERCIALIZAÇÃO, ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA E NÃO INFRACÇÃO. EM NENHUM CASO OS AUTORES OU TITULARES DE DIREITOS AUTORAIS RESPONSABILIZARÃO POR QUALQUER REIVINDICAÇÃO, DANOS OU OUTRA RESPONSABILIDADE, SEJA EM AÇÃO DE CONTRATO, TORT OU OUTRA FORMA, DECORRENTE DE, FORA OU EM CONEXÃO COM O SOFTWARE OU O USO OU OUTROS NEGÓCIOS NO PROGRAMAS.<o:p></o:p></span><p class=MsoNormal><b><span>7.Webtoolkit Javascript Base 64 - Licença Creative Commons Attribution 2.0 UK</span></b><span><o:p></o:p></span><p class=MsoNormal><span>Este software usa código de <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a> licenciado sob o <a href=http://creativecommons.org/licenses/by/2.0/uk/legalcode>http://creativecommons.org/licenses/by/2.0/uk/legalcode</a> e sua fonte pode ser baixada de <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a>.<o:p></o:p></span></p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Voltar</a></table></div></div><script>'use strict';
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><title>{{{title}}} - Terms of use</title><body id=body onload='"undefined"!=typeof startup&&startup()'style=display:none;overflow:hidden><div id=container><div id=masthead class=noselect style="background:url(logo.png) 0 0;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden"><div style=float:left>{{{titlehtml}}}</div><div style=float:left;height:66px;color:#c8c8c8;padding-left:14px;padding-top:7px><strong><font style=font-size:46px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:14px><strong><font style=font-size:14px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div><p id=logoutControl style="color:#fff;font-size:11px;margin:10px 10px 0"></div><div id=page_leftbar><div style=height:16px></div></div><div id=topbar class="noselect style3"style=height:24px;position:relative><div id=uiMenuButton title="Seleção da interface do usuário"onclick=showUserInterfaceSelectMenu()>♦<div id=uiMenu style=display:none><div id=uiViewButton1 class=uiSelector onclick=userInterfaceSelectMenu(1) title="Interface da barra esquerda"><div class=uiSelector1></div></div><div id=uiViewButton2 class=uiSelector onclick=userInterfaceSelectMenu(2) title="Interface da barra superior"><div class=uiSelector2></div></div><div id=uiViewButton3 class=uiSelector onclick=userInterfaceSelectMenu(3) title="Interface de largura fixa"><div class=uiSelector3></div></div><div id=uiViewButton4 class=uiSelector onclick=toggleNightMode() title="Alternar modo noturno"><div class=uiSelector4></div></div></div></div></div><div id=column_l style="max-height:calc(100vh - 135px);overflow-y:auto"><h1>Termos de uso</h1><p>Entre em contato com o administrador do site para obter os termos de uso.<hr><p class=MsoNormal>A seguir, são apresentadas as divulgações necessárias de componentes e software de código aberto incorporados neste software.<p class=MsoNormal><b><span>1.AJAX Control Toolkit - Nova licença BSD</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Direitos autorais (c) 2009, CodePlex Foundation.Todos os direitos reservados.<o:p></o:p></span><p class=MsoNormal><span>A redistribuição e uso nas formas de origem e binárias, com ou sem modificação, são permitidas desde que as seguintes condições sejam atendidas:<o:p></o:p></span><p class=MsoNormal><span>1.As redistribuições do código-fonte devem manter o aviso de direitos autorais acima, esta lista de condições e o aviso de isenção de responsabilidade a seguir.<o:p></o:p></span><p class=MsoNormal><span>2.As redistribuições em formato binário devem reproduzir o aviso de direitos autorais acima, esta lista de condições e o aviso de isenção de responsabilidade a seguir na documentação e / ou outros materiais fornecidos com a distribuição.<o:p></o:p></span><p class=MsoNormal><span>3.Nem o nome da CodePlex Foundation nem os nomes de seus colaboradores podem ser usados \u200b\u200bpara endossar ou promover produtos derivados deste software sem permissão prévia por escrito específica.<o:p></o:p></span><p class=MsoNormal><span>ESTE SOFTWARE É FORNECIDO PELOS TITULARES DE DIREITOS AUTORAIS E CONTRIBUIDORES "TAL COMO ESTÁ" E QUALQUER GARANTIA EXPRESSA OU IMPLÍCITA, INCLUINDO, MAS NÃO SE LIMITANDO A, AS GARANTIAS IMPLÍCITAS DE COMERCIALIZAÇÃO E ADEQUAÇÃO A UM PROPÓSITO ESPECÍFICO. EM NENHUM CASO O DIVISOR DE DIREITOS AUTORAIS OU OS CONTRIBUIDORES SERÃO RESPONSÁVEIS POR QUALQUER DANO DIRETO, INDIRETO, INCIDENTAL, ESPECIAL, EXEMPLAR OU CONSEQÜENCIAL (INCLUINDO, MAS NÃO SE LIMITANDO A, PROCURAÇÃO DE BENS OU SERVIÇOS SUBSTITUTOS; PERDA DE USO, DADOS, LUCROS DE USO); OU INTERRUPÇÃO DE NEGÓCIOS), CAUSADA E QUALQUER TEORIA DE RESPONSABILIDADE, CONTRATADA, RESPONSABILIDADE ESTIMATIVA OU ATRIBUIÇÃO (INCLUINDO NEGLIGÊNCIA OU DE OUTRA FORMA), surgindo de qualquer maneira fora do uso deste software, mesmo que seja aconselhável a possibilidade de tal conteúdo.<o:p></o:p></span><p class=MsoNormal><b><span>2.OpenSSL - Licença OpenSSL e SSLeay</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=http://www.openssl.org/source/license.html>http://www.openssl.org/source/license.html</a></span><p class=MsoNormal><span>Copyright (c) 1998-2011 O Projeto OpenSSL.Todos os direitos reservados.<o:p></o:p></span><p class=MsoNormal><span>A redistribuição e uso nas formas de origem e binárias, com ou sem modificação, são permitidas desde que as seguintes condições sejam atendidas:<o:p></o:p></span><p class=MsoNormal><span>1.As redistribuições do código-fonte devem manter o aviso de direitos autorais acima, esta lista de condições e o aviso de isenção de responsabilidade a seguir.<o:p></o:p></span><p class=MsoNormal><span>2.As redistribuições em formato binário devem reproduzir o aviso de direitos autorais acima, esta lista de condições e o aviso de isenção de responsabilidade a seguir na documentação e / ou outros materiais fornecidos com a distribuição.<o:p></o:p></span><p class=MsoNormal><span>3.Todos os materiais publicitários que mencionam os recursos ou o uso deste software devem exibir o seguinte reconhecimento: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)"<o:p></o:p></span><p class=MsoNormal><span>4.The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.<o:p></o:p></span><p class=MsoNormal><span>5.Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project.<o:p></o:p></span><p class=MsoNormal><span>6.As redistribuições de qualquer forma devem manter o seguinte reconhecimento: "Este produto inclui software desenvolvido pelo OpenSSL Project para uso no OpenSSL Toolkit (http://www.openssl.org/)".<o:p></o:p></span><p class=MsoNormal><span>ESTE SOFTWARE É FORNECIDO PELO PROJETO OpenSSL `` COMO ESTÁ '' E QUALQUER GARANTIA EXPRESSA OU IMPLÍCITA, INCLUINDO, MAS NÃO SE LIMITANDO A, AS GARANTIAS IMPLÍCITAS DE COMERCIALIZAÇÃO E ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. EM NENHUM CASO O PROJETO OpenSSL OU SEUS CONTRIBUIDORES SERÃO RESPONSÁVEIS POR QUALQUER DANO DIRETO, INDIRETO, INCIDENTAL, ESPECIAL, EXEMPLAR OU CONSEQÜENCIAL (INCLUINDO DANOS ESPECIAIS, EXEMPLARES OU CONSEQÜENCIAIS (INCLUINDO, PROCESSOS, MAS NÃO LIMITADOS OU SERVIÇOS; PERDA DE USO, DADOS OU LUCROS; OU INTERRUPÇÃO DE NEGÓCIOS), CAUSADOS E QUALQUER TEORIA DE RESPONSABILIDADE, CONTRATOS, RESPONSABILIDADE ESTIMATIVA OU ATORT (INCLUINDO NEGLIGÊNCIA OU DE OUTRA FORMA) QUE POSSUEM DE QUALQUER FORMA DESTE USO SOFTWARE, MESMO SE AVISADO DA POSSIBILIDADE DE TAIS DANOS.<o:p></o:p></span><p class=MsoNormal><b><span>3.jQuery Foundation - Licença MIT</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation e outros colaboradores <a href=http://jquery.com/ >http://jquery.com/</a></span><p class=MsoNormal><span>O SOFTWARE É FORNECIDO "TAL COMO ESTÁ", SEM GARANTIA DE QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, INCLUINDO MAS NÃO SE LIMITANDO A GARANTIAS DE COMERCIALIZAÇÃO, ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA E NÃO INFRACÇÃO. EM NENHUM CASO OS AUTORES OU TITULARES DE DIREITOS AUTORAIS RESPONSABILIZARÃO POR QUALQUER REIVINDICAÇÃO, DANOS OU OUTRA RESPONSABILIDADE, SEJA EM AÇÃO DE CONTRATO, TORT OU OUTRA FORMA, DECORRENTE DE, FORA OU EM CONEXÃO COM O SOFTWARE OU O USO OU OUTROS NEGÓCIOS NO PROGRAMAS.</span><p class=MsoNormal><b><span>4.Interface do Usuário jQuery - Licença MIT</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation e outros colaboradores, <a href=http://jqueryui.com/ >http://jqueryui.com/</a></span><p class=MsoNormal><span>Este software consiste em contribuições voluntárias feitas por muitos indivíduos (AUTORES.txt, http://jqueryui.com/about ). Para obter o histórico exato de contribuições, consulte o histórico de revisões e os logs, disponíveis em http://jquery-ui.googlecode.com/svn/<o:p></o:p></span><p class=MsoNormal><span>O SOFTWARE É FORNECIDO "TAL COMO ESTÁ", SEM GARANTIA DE QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, INCLUINDO MAS NÃO SE LIMITANDO A GARANTIAS DE COMERCIALIZAÇÃO, ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA E NÃO INFRACÇÃO. EM NENHUM CASO OS AUTORES OU TITULARES DE DIREITOS AUTORAIS RESPONSABILIZARÃO POR QUALQUER REIVINDICAÇÃO, DANOS OU OUTRA RESPONSABILIDADE, SEJA EM AÇÃO DE CONTRATO, TORT OU OUTRA FORMA, DECORRENTE DE, FORA OU EM CONEXÃO COM O SOFTWARE OU O USO OU OUTROS NEGÓCIOS NO PROGRAMAS.<o:p></o:p></span><p class=MsoNormal><b><span>5.noVNC - Licença Pública Mozilla 2.0 0</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/kanaka/noVNC/blob/master/LICENSE.txt>https://github.com/kanaka/noVNC/blob/master/LICENSE.txt</a></span><p class=MsoNormal><span>Copyright (C) 2011 Joel Martin Este formulário de código-fonte está sujeito aos termos da Licença Pública Mozilla, v.2.0 0.Se uma cópia da MPL não foi distribuída com este arquivo, você pode obter uma em http: // mozilla.org / MPL / 2.0 /.<o:p></o:p></span><p class=MsoNormal><b><span>6.Rcarousel - License MIT</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/ryrych/rcarousel/blob/master/widget/license>https://github.com/ryrych/rcarousel/blob/master/widget/license</a></span><p class=MsoNormal><span>Copyright (c) 2010 Wojciech 'RRH' Ryrych<o:p></o:p></span><p class=MsoNormal><span>O SOFTWARE É FORNECIDO "TAL COMO ESTÁ", SEM GARANTIA DE QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, INCLUINDO MAS NÃO SE LIMITANDO A GARANTIAS DE COMERCIALIZAÇÃO, ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA E NÃO INFRACÇÃO. EM NENHUM CASO OS AUTORES OU TITULARES DE DIREITOS AUTORAIS RESPONSABILIZARÃO POR QUALQUER REIVINDICAÇÃO, DANOS OU OUTRA RESPONSABILIDADE, SEJA EM AÇÃO DE CONTRATO, TORT OU OUTRA FORMA, DECORRENTE DE, FORA OU EM CONEXÃO COM O SOFTWARE OU O USO OU OUTROS NEGÓCIOS NO PROGRAMAS.<o:p></o:p></span><p class=MsoNormal><b><span>7.Webtoolkit Javascript Base 64 - Licença Creative Commons Attribution 2.0 UK</span></b><span><o:p></o:p></span><p class=MsoNormal><span>Este software usa código de <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a> licenciado sob o <a href=http://creativecommons.org/licenses/by/2.0/uk/legalcode>http://creativecommons.org/licenses/by/2.0/uk/legalcode</a> e sua fonte pode ser baixada de <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a>.<o:p></o:p></span></p><br></div><div id=footer><table cellpadding=0 cellspacing=10 style=width:100%><tr><td style=text-align:left><td style=text-align:right><a href=/ >Voltar</a></table></div></div><script>'use strict';
2 var uiMode = parseInt(getstore('uiMode', 1));
3 var webPageStackMenu = false;
4 var webPageFullScreen = true;
views/translations/terms-mobile-min_nl.handlebars new
+1
@@ -0,0 +1 @@
1 +<!doctypehtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><title>{{{title}}} - Terms of use</title><style type=text/css>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;max-width:100%;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:4px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title1}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:7px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px><div id=column_l style=padding-left:10px;padding-right:10px><h1>Gebruiksvoorwaarden</h1><p>Neem contact op met de sitebeheerder voor gebruiksvoorwaarden.<hr><p class=MsoNormal>Hierna volgen de vereiste informatie over open source-componenten en software die in deze software is opgenomen.<p class=MsoNormal><b><span>1.AJAX Control Toolkit - Nieuwe BSD Licentie</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright (c) 2009, CodePlex Foundation. Alle rechten voorbehouden.<o:p></o:p></span><p class=MsoNormal><span>Herdistributie en gebruik in bron- en binaire vorm, met of zonder wijziging, zijn toegestaan mits aan de volgende voorwaarden wordt voldaan:<o:p></o:p></span><p class=MsoNormal><span>1. Herdistributies van broncode moeten de bovenstaande copyright kennisgeving en deze lijst met voorwaarden en de volgende disclaimer bevatten.<o:p></o:p></span><p class=MsoNormal><span>2. Herdistributies in binaire vorm moeten de bovenstaande copyright kennisgeving, deze lijst met voorwaarden en de volgende disclaimer reproduceren in de documentatie en / of andere materialen die bij de distributie worden geleverd.<o:p></o:p></span><p class=MsoNormal><span>3. Noch de naam van CodePlex Foundation, noch de namen van haar bijdragers mogen worden gebruikt om producten die zijn afgeleid van deze software te ondersteunen of promoten zonder specifieke voorafgaande schriftelijke toestemming.<o:p></o:p></span><p class=MsoNormal><span>DEZE SOFTWARE WORDT GELEVERD DOOR DE AUTEURSRECHTHOUDERS EN BIJDRAGERS "ALS ZODANIG" EN ENIGE EXPLICIETE OF IMPLICIETE GARANTIES, INCLUSIEF, MAAR NIET BEPERKT TOT, DE IMPLICIETE GARANTIES VAN VERKOOPBAARHEID EN GESCHIKTHEID VOOR EEN BEPAALD DOEL. IN GEEN GEVAL ZULLEN DE EIGENAAR VAN HET AUTEURSRECHT OF DE BIJDRAGERS AANSPRAKELIJK ZIJN VOOR ENIGE DIRECTE, INDIRECTE, INCIDENTELE, SPECIALE, UITZONDERLIJKE OF GEVOLGSCHADE (INCLUSIEF, MAAR NIET BEPERKT TOT, AANSCHAF VAN VERVANGENDE GOEDEREN OF DIENSTEN; VERLIES VAN GEBRUIK, GEGEVENS OF GEGEVENS; OF ONDERBREKING VAN HET BEDRIJF) EVENWEL VEROORZAAKT EN OP ENIGE AANSPRAAK VAN AANSPRAKELIJKHEID, OF IN CONTRACT, STRIKTE AANSPRAKELIJKHEID OF STORT (INCLUSIEF NALATIGHEID OF ANDERSZINS) DIE VOORTVLOEIT OP ENIGE MANIER UIT HET GEBRUIK VAN DEZE SOFTWARE, ZELFS ALS GEADVISEERD VAN DE MOGELIJKHEID.<o:p></o:p></span><p class=MsoNormal><b><span>2.OpenSSL – OpenSSL en SSLeay Licentie</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=http://www.openssl.org/source/license.html>http://www.openssl.org/source/license.html</a></span><p class=MsoNormal><span>Copyright (c) 1998-2011 The OpenSSL Project. Alle rechten voorbehouden.<o:p></o:p></span><p class=MsoNormal><span>Herdistributie en gebruik in bron- en binaire vorm, met of zonder wijziging, zijn toegestaan mits aan de volgende voorwaarden wordt voldaan:<o:p></o:p></span><p class=MsoNormal><span>1. Herdistributies van broncode moeten de bovenstaande copyright kennisgeving en deze lijst met voorwaarden en de volgende disclaimer bevatten.<o:p></o:p></span><p class=MsoNormal><span>2. Herdistributies in binaire vorm moeten de bovenstaande copyright kennisgeving, deze lijst met voorwaarden en de volgende disclaimer reproduceren in de documentatie en / of andere materialen die bij de distributie worden geleverd.<o:p></o:p></span><p class=MsoNormal><span>3.Alle advertentiematerialen die functies of gebruik van deze software maken, moeten de volgende tekst bevatten: "Dit product bevat software die is ontwikkeld door het OpenSSL-project voor gebruik in de OpenSSL Toolkit. (Http://www.openssl.org/)"<o:p></o:p></span><p class=MsoNormal><span>4. De namen "OpenSSL Toolkit" en "OpenSSL Project" mogen niet worden gebruikt om producten die zijn afgeleid van deze software te ondersteunen of promoten zonder voorafgaande schriftelijke toestemming. Neem voor schriftelijke toestemming contact op met openssl-core@openssl.org.<o:p></o:p></span><p class=MsoNormal><span>5. Producten die zijn afgeleid van deze software mogen niet "OpenSSL" worden genoemd, noch mag "OpenSSL" in hun naam worden weergegeven zonder voorafgaande schriftelijke toestemming van het OpenSSL-project.<o:p></o:p></span><p class=MsoNormal><span>6. Herdistributies in welke vorm dan ook moet de volgende tekst behouden: "Dit product bevat software die is ontwikkeld door het OpenSSL-project voor gebruik in de OpenSSL Toolkit (http://www.openssl.org/)".<o:p></o:p></span><p class=MsoNormal><span>DEZE SOFTWARE WORDT GELEVERD DOOR HET OpenSSL-PROJECT `` ZOALS HET IS '' EN ELKE UITDRUKKELIJKE OF IMPLICIETE GARANTIES, INCLUSIEF MAAR NIET BEPERKT TOT DE IMPLICIETE GARANTIES VAN VERKOOPBAARHEID EN GESCHIKTHEID VOOR EEN BEPAALD DOEL WORDEN AFGEWEZEN. IN GEEN GEVAL ZAL HET PROJECT VAN DE OpenSSL OF HAAR BIJDRAGERS AANSPRAKELIJK ZIJN VOOR ENIGE DIRECTE, INDIRECTE, INCIDENTELE, SPECIALE, UITZONDERLIJKE OF GEVOLGSCHADE (INCLUSIEF, MAAR SPECIALE, UITZONDERLIJKE OF GEVOLGSCHADE (INCLUSIEF, MAAR NIET BEPERKT TOT SCHULDEN) OF DIENSTEN; VERLIES VAN GEBRUIK, GEGEVENS OF WINST; OF ONDERBREKING VAN HET BEDRIJF) EVENWEL OORZAAKT EN OP ENIGE AANSPRAAK VAN AANSPRAKELIJKHEID, OF IN CONTRACT, STRIKTE AANSPRAKELIJKHEID, OF TORT (INCLUSIEF NALATIGHEID OF ANDERSZINS) DIE OP ENIGE MANIER UIT DE GEBRUIKSVOORWAARDEN ONTSTAAN SOFTWARE, ZELFS INDIEN GEADVISEERD DOOR DE MOGELIJKHEID VAN DERGELIJKE SCHADE.<o:p></o:p></span><p class=MsoNormal><b><span>3.jQuery Foundation - MIT Licentie</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation en andere bijdragers <a href=http://jquery.com/ >http://jquery.com/</a></span><p class=MsoNormal><span>DE SOFTWARE WORDT "ALS ZODANIG" GELEVERD, ZONDER ENIGE VORM VAN GARANTIE, UITDRUKKELIJK OF IMPLICIET, INCLUSIEF MAAR NIET BEPERKT TOT DE GARANTIES VAN VERKOOPBAARHEID, GESCHIKTHEID VOOR EEN BEPAALD DOEL EN NIET-INBREUK. IN GEEN GEVAL ZULLEN DE AUTEURS OF AUTEURSRECHTHOUDERS AANSPRAKELIJK ZIJN VOOR ENIGE CLAIM, SCHADE OF ANDERE AANSPRAKELIJKHEID, OOK IN EEN HANDELING VAN CONTRACT, SCHORT OF ANDERSZINS DIE VOORTVLOEIEN UIT, IN OF IN VERBAND MET DE SOFTWARE OF HET GEBRUIK OF ANDERE HANDELINGEN IN DE SOFTWARE.</span><p class=MsoNormal><b><span>4.jQuery Gebruikers Interface - MIT Licentie</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span>Copyright 2013 jQuery Foundation en andere bijdragers, <a href=http://jqueryui.com/ >http://jqueryui.com/</a></span><p class=MsoNormal><span>This software consists of voluntary contributions made by many individuals (AUTHORS.txt, http://jqueryui.com/about ). For exact contribution history,see the revision history and logs, available at http://jquery-ui.googlecode.com/svn/<o:p></o:p></span><p class=MsoNormal><span>DE SOFTWARE WORDT "ALS ZODANIG" GELEVERD, ZONDER ENIGE VORM VAN GARANTIE, UITDRUKKELIJK OF IMPLICIET, INCLUSIEF MAAR NIET BEPERKT TOT DE GARANTIES VAN VERKOOPBAARHEID, GESCHIKTHEID VOOR EEN BEPAALD DOEL EN NIET-INBREUK. IN GEEN GEVAL ZULLEN DE AUTEURS OF AUTEURSRECHTHOUDERS AANSPRAKELIJK ZIJN VOOR ENIGE CLAIM, SCHADE OF ANDERE AANSPRAKELIJKHEID, OOK IN EEN HANDELING VAN CONTRACT, SCHORT OF ANDERSZINS DIE VOORTVLOEIEN UIT, IN OF IN VERBAND MET DE SOFTWARE OF HET GEBRUIK OF ANDERE HANDELINGEN IN DE SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>5.noVNC - Mozilla Public Licentie 2.0</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/kanaka/noVNC/blob/master/LICENSE.txt>https://github.com/kanaka/noVNC/blob/master/LICENSE.txt</a></span><p class=MsoNormal><span>Copyright (C) 2011 Joel Martin Dit broncodeformulier is onderworpen aan de voorwaarden van de Mozilla Public License, v. 2.0. Als een kopie van de MPL niet met dit bestand is verspreid, kunt u er een verkrijgen op http://mozilla.org/MPL/2.0/.<o:p></o:p></span><p class=MsoNormal><b><span>6.Rcarousel - MIT Licentie</span></b><span style=font-size:10pt;font-family:&quot><o:p></o:p></span><p class=MsoNormal><span><a href=https://github.com/ryrych/rcarousel/blob/master/widget/license>https://github.com/ryrych/rcarousel/blob/master/widget/license</a></span><p class=MsoNormal><span>Copyright (c) 2010 Wojciech 'RRH' Ryrych<o:p></o:p></span><p class=MsoNormal><span>DE SOFTWARE WORDT "ALS ZODANIG" GELEVERD, ZONDER ENIGE VORM VAN GARANTIE, UITDRUKKELIJK OF IMPLICIET, INCLUSIEF MAAR NIET BEPERKT TOT DE GARANTIES VAN VERKOOPBAARHEID, GESCHIKTHEID VOOR EEN BEPAALD DOEL EN NIET-INBREUK. IN GEEN GEVAL ZULLEN DE AUTEURS OF AUTEURSRECHTHOUDERS AANSPRAKELIJK ZIJN VOOR ENIGE CLAIM, SCHADE OF ANDERE AANSPRAKELIJKHEID, OOK IN EEN HANDELING VAN CONTRACT, SCHORT OF ANDERSZINS DIE VOORTVLOEIEN UIT, IN OF IN VERBAND MET DE SOFTWARE OF HET GEBRUIK OF ANDERE HANDELINGEN IN DE SOFTWARE.<o:p></o:p></span><p class=MsoNormal><b><span>7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UK Licentie</span></b><span><o:p></o:p></span><p class=MsoNormal><span>Deze software maakt gebruik van code van <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a> onder licentie van de <a href=http://creativecommons.org/licenses/by/2.0/uk/legalcode>http://creativecommons.org/licenses/by/2.0/uk/legalcode</a> en de bron kan worden gedownload van <a href=http://www.webtoolkit.info/javascript-base64.html>http://www.webtoolkit.info/javascript-base64.html</a>.<o:p></o:p></span></p><br></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table cellpadding=0 cellspacing=6 style=width:100%><tr><td style=text-align:left;color:#fff>{{{footer}}}<td style=text-align:right>{{{rootCertLink}}}&nbsp;<a href=/ >Terug</a></table></div></div>
\ No newline at end of file
views/translations/terms-mobile_nl.handlebars new
+160
@@ -0,0 +1,160 @@
1 +<!DOCTYPE html><html><head>
2 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 + <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
4 + <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 + <meta name="apple-mobile-web-app-capable" content="yes">
6 + <meta name="format-detection" content="telephone=no">
7 + <title>{{{title}}} - Terms of use</title>
8 + <style type="text/css">
9 + a {
10 + color: #036;
11 + text-decoration: underline;
12 + }
13 +
14 + #footer a {
15 + color: #fff;
16 + text-decoration: underline;
17 + }
18 +
19 + #footer a:hover {
20 + color: #fff;
21 + text-decoration: none;
22 + }
23 + </style>
24 +</head>
25 +<body onload="if (typeof(startup) !== 'undefined') startup();" style="overflow-y:hidden;max-width:100%;margin:0;padding:0;border:0;color:black;font-size:13px;font-family:\'Trebuchet MS\', Arial, Helvetica, sans-serif">
26 + <div id="container">
27 + <!-- Begin Masthead -->
28 + <div id="masthead" style="background:url(logo.png) 0px 0px;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden">
29 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:4px">
30 + <strong><font style="font-size:36px;font-family:Arial,Helvetica,sans-serif">{{{title1}}}</font></strong>
31 + </div>
32 + <div style="float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:7px">
33 + <strong><font style="font-size:12px;font-family:Arial,Helvetica,sans-serif">{{{title2}}}</font></strong>
34 + </div>
35 + </div>
36 + <div id="page_content" style="overflow-y:scroll;position:absolute;bottom:32px;top:50px">
37 + <div id="column_l" style="padding-left:10px;padding-right:10px">
38 + <h1>Gebruiksvoorwaarden</h1>
39 + <p>Neem contact op met de sitebeheerder voor gebruiksvoorwaarden.</p>
40 + <hr>
41 + <p class="MsoNormal">
42 + Hierna volgen de vereiste informatie over open source-componenten en software die in deze software is opgenomen.
43 + </p>
44 + <p class="MsoNormal">
45 + <b><span>1.AJAX Control Toolkit - Nieuwe BSD Licentie</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;"><o:p></o:p></span>
46 + </p>
47 + <p class="MsoNormal">
48 + <span>Copyright (c) 2009, CodePlex Foundation. Alle rechten voorbehouden.<o:p></o:p></span>
49 + </p>
50 + <p class="MsoNormal">
51 + <span>Herdistributie en gebruik in bron- en binaire vorm, met of zonder wijziging, zijn toegestaan mits aan de volgende voorwaarden wordt voldaan:<o:p></o:p></span>
52 + </p>
53 + <p class="MsoNormal">
54 + <span>1. Herdistributies van broncode moeten de bovenstaande copyright kennisgeving en deze lijst met voorwaarden en de volgende disclaimer bevatten.<o:p></o:p></span>
55 + </p>
56 + <p class="MsoNormal">
57 + <span>2. Herdistributies in binaire vorm moeten de bovenstaande copyright kennisgeving, deze lijst met voorwaarden en de volgende disclaimer reproduceren in de documentatie en / of andere materialen die bij de distributie worden geleverd.<o:p></o:p></span>
58 + </p>
59 + <p class="MsoNormal">
60 + <span>3. Noch de naam van CodePlex Foundation, noch de namen van haar bijdragers mogen worden gebruikt om producten die zijn afgeleid van deze software te ondersteunen of promoten zonder specifieke voorafgaande schriftelijke toestemming.<o:p></o:p></span>
61 + </p>
62 + <p class="MsoNormal">
63 + <span>DEZE SOFTWARE WORDT GELEVERD DOOR DE AUTEURSRECHTHOUDERS EN BIJDRAGERS "ALS ZODANIG" EN ENIGE EXPLICIETE OF IMPLICIETE GARANTIES, INCLUSIEF, MAAR NIET BEPERKT TOT, DE IMPLICIETE GARANTIES VAN VERKOOPBAARHEID EN GESCHIKTHEID VOOR EEN BEPAALD DOEL. IN GEEN GEVAL ZULLEN DE EIGENAAR VAN HET AUTEURSRECHT OF DE BIJDRAGERS AANSPRAKELIJK ZIJN VOOR ENIGE DIRECTE, INDIRECTE, INCIDENTELE, SPECIALE, UITZONDERLIJKE OF GEVOLGSCHADE (INCLUSIEF, MAAR NIET BEPERKT TOT, AANSCHAF VAN VERVANGENDE GOEDEREN OF DIENSTEN; VERLIES VAN GEBRUIK, GEGEVENS OF GEGEVENS; OF ONDERBREKING VAN HET BEDRIJF) EVENWEL VEROORZAAKT EN OP ENIGE AANSPRAAK VAN AANSPRAKELIJKHEID, OF IN CONTRACT, STRIKTE AANSPRAKELIJKHEID OF STORT (INCLUSIEF NALATIGHEID OF ANDERSZINS) DIE VOORTVLOEIT OP ENIGE MANIER UIT HET GEBRUIK VAN DEZE SOFTWARE, ZELFS ALS GEADVISEERD VAN DE MOGELIJKHEID.<o:p></o:p></span>
64 + </p>
65 + <p class="MsoNormal">
66 + <b><span>2.OpenSSL – OpenSSL en SSLeay Licentie</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;"><o:p></o:p></span>
67 + </p>
68 + <p class="MsoNormal">
69 + <span><a href="http://www.openssl.org/source/license.html">http://www.openssl.org/source/license.html</a> </span>
70 + </p>
71 + <p class="MsoNormal">
72 + <span>Copyright (c) 1998-2011 The OpenSSL Project. Alle rechten voorbehouden.<o:p></o:p></span>
73 + </p>
74 + <p class="MsoNormal">
75 + <span>Herdistributie en gebruik in bron- en binaire vorm, met of zonder wijziging, zijn toegestaan mits aan de volgende voorwaarden wordt voldaan:<o:p></o:p></span>
76 + </p>
77 + <p class="MsoNormal">
78 + <span>1. Herdistributies van broncode moeten de bovenstaande copyright kennisgeving en deze lijst met voorwaarden en de volgende disclaimer bevatten.<o:p></o:p></span>
79 + </p>
80 + <p class="MsoNormal">
81 + <span>2. Herdistributies in binaire vorm moeten de bovenstaande copyright kennisgeving, deze lijst met voorwaarden en de volgende disclaimer reproduceren in de documentatie en / of andere materialen die bij de distributie worden geleverd. <o:p></o:p></span>
82 + </p>
83 + <p class="MsoNormal">
84 + <span>3.Alle advertentiematerialen die functies of gebruik van deze software maken, moeten de volgende tekst bevatten: "Dit product bevat software die is ontwikkeld door het OpenSSL-project voor gebruik in de OpenSSL Toolkit. (Http://www.openssl.org/)" <o:p></o:p></span>
85 + </p>
86 + <p class="MsoNormal">
87 + <span>4. De namen "OpenSSL Toolkit" en "OpenSSL Project" mogen niet worden gebruikt om producten die zijn afgeleid van deze software te ondersteunen of promoten zonder voorafgaande schriftelijke toestemming. Neem voor schriftelijke toestemming contact op met openssl-core@openssl.org.<o:p></o:p></span>
88 + </p>
89 + <p class="MsoNormal">
90 + <span>5. Producten die zijn afgeleid van deze software mogen niet "OpenSSL" worden genoemd, noch mag "OpenSSL" in hun naam worden weergegeven zonder voorafgaande schriftelijke toestemming van het OpenSSL-project.<o:p></o:p></span>
91 + </p>
92 + <p class="MsoNormal">
93 + <span>6. Herdistributies in welke vorm dan ook moet de volgende tekst behouden: "Dit product bevat software die is ontwikkeld door het OpenSSL-project voor gebruik in de OpenSSL Toolkit (http://www.openssl.org/)". <o:p></o:p></span>
94 + </p>
95 + <p class="MsoNormal">
96 + <span>DEZE SOFTWARE WORDT GELEVERD DOOR HET OpenSSL-PROJECT `` ZOALS HET IS '' EN ELKE UITDRUKKELIJKE OF IMPLICIETE GARANTIES, INCLUSIEF MAAR NIET BEPERKT TOT DE IMPLICIETE GARANTIES VAN VERKOOPBAARHEID EN GESCHIKTHEID VOOR EEN BEPAALD DOEL WORDEN AFGEWEZEN. IN GEEN GEVAL ZAL HET PROJECT VAN DE OpenSSL OF HAAR BIJDRAGERS AANSPRAKELIJK ZIJN VOOR ENIGE DIRECTE, INDIRECTE, INCIDENTELE, SPECIALE, UITZONDERLIJKE OF GEVOLGSCHADE (INCLUSIEF, MAAR SPECIALE, UITZONDERLIJKE OF GEVOLGSCHADE (INCLUSIEF, MAAR NIET BEPERKT TOT SCHULDEN) OF DIENSTEN; VERLIES VAN GEBRUIK, GEGEVENS OF WINST; OF ONDERBREKING VAN HET BEDRIJF) EVENWEL OORZAAKT EN OP ENIGE AANSPRAAK VAN AANSPRAKELIJKHEID, OF IN CONTRACT, STRIKTE AANSPRAKELIJKHEID, OF TORT (INCLUSIEF NALATIGHEID OF ANDERSZINS) DIE OP ENIGE MANIER UIT DE GEBRUIKSVOORWAARDEN ONTSTAAN SOFTWARE, ZELFS INDIEN GEADVISEERD DOOR DE MOGELIJKHEID VAN DERGELIJKE SCHADE.<o:p></o:p></span>
97 + </p>
98 + <p class="MsoNormal">
99 + <b><span>3.jQuery Foundation - MIT Licentie</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;"><o:p></o:p></span>
100 + </p>
101 + <p class="MsoNormal">
102 + <span>Copyright 2013 jQuery Foundation en andere bijdragers <a href="http://jquery.com/">http://jquery.com/</a></span>
103 + </p>
104 + <p class="MsoNormal">
105 + <span>DE SOFTWARE WORDT "ALS ZODANIG" GELEVERD, ZONDER ENIGE VORM VAN GARANTIE, UITDRUKKELIJK OF IMPLICIET, INCLUSIEF MAAR NIET BEPERKT TOT DE GARANTIES VAN VERKOOPBAARHEID, GESCHIKTHEID VOOR EEN BEPAALD DOEL EN NIET-INBREUK. IN GEEN GEVAL ZULLEN DE AUTEURS OF AUTEURSRECHTHOUDERS AANSPRAKELIJK ZIJN VOOR ENIGE CLAIM, SCHADE OF ANDERE AANSPRAKELIJKHEID, OOK IN EEN HANDELING VAN CONTRACT, SCHORT OF ANDERSZINS DIE VOORTVLOEIEN UIT, IN OF IN VERBAND MET DE SOFTWARE OF HET GEBRUIK OF ANDERE HANDELINGEN IN DE SOFTWARE.</span>
106 + </p>
107 + <p class="MsoNormal">
108 + <b><span>4.jQuery Gebruikers Interface - MIT Licentie</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;"><o:p></o:p></span>
109 + </p>
110 + <p class="MsoNormal">
111 + <span>Copyright 2013 jQuery Foundation en andere bijdragers, <a href="http://jqueryui.com/">http://jqueryui.com/</a></span>
112 + </p>
113 + <p class="MsoNormal">
114 + <span>This software consists of voluntary contributions made by many individuals (AUTHORS.txt, http://jqueryui.com/about ). For exact contribution history,see the revision history and logs, available at http://jquery-ui.googlecode.com/svn/ <o:p></o:p></span>
115 + </p>
116 + <p class="MsoNormal">
117 + <span>DE SOFTWARE WORDT "ALS ZODANIG" GELEVERD, ZONDER ENIGE VORM VAN GARANTIE, UITDRUKKELIJK OF IMPLICIET, INCLUSIEF MAAR NIET BEPERKT TOT DE GARANTIES VAN VERKOOPBAARHEID, GESCHIKTHEID VOOR EEN BEPAALD DOEL EN NIET-INBREUK. IN GEEN GEVAL ZULLEN DE AUTEURS OF AUTEURSRECHTHOUDERS AANSPRAKELIJK ZIJN VOOR ENIGE CLAIM, SCHADE OF ANDERE AANSPRAKELIJKHEID, OOK IN EEN HANDELING VAN CONTRACT, SCHORT OF ANDERSZINS DIE VOORTVLOEIEN UIT, IN OF IN VERBAND MET DE SOFTWARE OF HET GEBRUIK OF ANDERE HANDELINGEN IN DE SOFTWARE.<o:p></o:p></span>
118 + </p>
119 + <p class="MsoNormal">
120 + <b><span>5.noVNC - Mozilla Public Licentie 2.0</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;"><o:p></o:p></span>
121 + </p>
122 + <p class="MsoNormal">
123 + <span><a href="https://github.com/kanaka/noVNC/blob/master/LICENSE.txt">https://github.com/kanaka/noVNC/blob/master/LICENSE.txt</a></span>
124 + </p>
125 + <p class="MsoNormal">
126 + <span>Copyright (C) 2011 Joel Martin Dit broncodeformulier is onderworpen aan de voorwaarden van de Mozilla Public License, v. 2.0. Als een kopie van de MPL niet met dit bestand is verspreid, kunt u er een verkrijgen op http://mozilla.org/MPL/2.0/.<o:p></o:p></span>
127 + </p>
128 + <p class="MsoNormal">
129 + <b><span>6.Rcarousel - MIT Licentie</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;"><o:p></o:p></span>
130 + </p>
131 + <p class="MsoNormal">
132 + <span><a href="https://github.com/ryrych/rcarousel/blob/master/widget/license">https://github.com/ryrych/rcarousel/blob/master/widget/license</a></span>
133 + </p>
134 + <p class="MsoNormal">
135 + <span>Copyright (c) 2010 Wojciech 'RRH' Ryrych<o:p></o:p></span>
136 + </p>
137 + <p class="MsoNormal">
138 + <span>DE SOFTWARE WORDT "ALS ZODANIG" GELEVERD, ZONDER ENIGE VORM VAN GARANTIE, UITDRUKKELIJK OF IMPLICIET, INCLUSIEF MAAR NIET BEPERKT TOT DE GARANTIES VAN VERKOOPBAARHEID, GESCHIKTHEID VOOR EEN BEPAALD DOEL EN NIET-INBREUK. IN GEEN GEVAL ZULLEN DE AUTEURS OF AUTEURSRECHTHOUDERS AANSPRAKELIJK ZIJN VOOR ENIGE CLAIM, SCHADE OF ANDERE AANSPRAKELIJKHEID, OOK IN EEN HANDELING VAN CONTRACT, SCHORT OF ANDERSZINS DIE VOORTVLOEIEN UIT, IN OF IN VERBAND MET DE SOFTWARE OF HET GEBRUIK OF ANDERE HANDELINGEN IN DE SOFTWARE.<o:p></o:p></span>
139 + </p>
140 + <p class="MsoNormal">
141 + <b><span>7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UK Licentie</span></b><span><o:p></o:p></span>
142 + </p>
143 + <p class="MsoNormal">
144 + <span>Deze software maakt gebruik van code van <a href="http://www.webtoolkit.info/javascript-base64.html">http://www.webtoolkit.info/javascript-base64.html</a> onder licentie van de <a href="http://creativecommons.org/licenses/by/2.0/uk/legalcode">http://creativecommons.org/licenses/by/2.0/uk/legalcode</a> en de bron kan worden gedownload van <a href="http://www.webtoolkit.info/javascript-base64.html">http://www.webtoolkit.info/javascript-base64.html</a>.<o:p></o:p></span>
145 + </p>
146 + <br>
147 + </div>
148 + </div>
149 + <div id="footer" style="height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0px">
150 + <table cellpadding="0" cellspacing="6" style="width:100%">
151 + <tbody><tr>
152 + <td style="text-align:left;color:white">{{{footer}}}</td>
153 + <td style="text-align:right">{{{rootCertLink}}}&nbsp;<a href="/">Terug</a></td>
154 + </tr>
155 + </tbody></table>
156 + </div>
157 + </div>
158 +
159 +
160 +</body></html>
\ No newline at end of file
views/translations/terms_cs.handlebars
+1 -1
@@ -13,7 +13,7 @@
13 <!-- Begin Masthead -->
14 <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
15 <div style="float:left">{{{titlehtml}}}</div>
16 - <div style="float:left; height: 66px; color:#c8c8c8; padding-left:20px; padding-top:8px">
16 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:14px; padding-top:7px">
17 <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
18 </div>
19 <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">
views/translations/terms_fr.handlebars
+1 -1
@@ -13,7 +13,7 @@
13 <!-- Begin Masthead -->
14 <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
15 <div style="float:left">{{{titlehtml}}}</div>
16 - <div style="float:left; height: 66px; color:#c8c8c8; padding-left:20px; padding-top:8px">
16 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:14px; padding-top:7px">
17 <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
18 </div>
19 <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">
views/translations/terms_ja.handlebars
+1 -1
@@ -13,7 +13,7 @@
13 <!-- Begin Masthead -->
14 <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
15 <div style="float:left">{{{titlehtml}}}</div>
16 - <div style="float:left; height: 66px; color:#c8c8c8; padding-left:20px; padding-top:8px">
16 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:14px; padding-top:7px">
17 <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
18 </div>
19 <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">
views/translations/terms_nl.handlebars new
+247
@@ -0,0 +1,247 @@
1 +<!DOCTYPE html><html><head>
2 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 + <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
4 + <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 + <meta name="apple-mobile-web-app-capable" content="yes">
6 + <meta name="format-detection" content="telephone=no">
7 + <link type="text/css" href="styles/style.css" media="screen" rel="stylesheet" title="CSS">
8 + <script type="text/javascript" src="scripts/common-0.0.1.js"></script>
9 + <title>{{{title}}} - Terms of use</title>
10 +</head>
11 +<body id="body" onload="if (typeof(startup) !== 'undefined') startup();" style="display:none;overflow:hidden">
12 + <div id="container">
13 + <!-- Begin Masthead -->
14 + <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
15 + <div style="float:left">{{{titlehtml}}}</div>
16 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:14px; padding-top:7px">
17 + <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
18 + </div>
19 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">
20 + <strong><font style="font-size:14px; font-family: Arial, Helvetica, sans-serif;">{{{title2}}}</font></strong>
21 + </div>
22 + <p id="logoutControl" style="color:white;font-size:11px;margin: 10px 10px 0;"></p>
23 + </div>
24 + <div id="page_leftbar">
25 + <div style="height:16px"></div>
26 + </div>
27 + <div id="topbar" class="noselect style3" style="height:24px;position:relative">
28 + <div id="uiMenuButton" title="Selectie gebruikersinterface" onclick="showUserInterfaceSelectMenu()">
29 + ♦
30 + <div id="uiMenu" style="display:none">
31 + <div id="uiViewButton1" class="uiSelector" onclick="userInterfaceSelectMenu(1)" title="Linkerbalk interface"><div class="uiSelector1"></div></div>
32 + <div id="uiViewButton2" class="uiSelector" onclick="userInterfaceSelectMenu(2)" title="Boven werkbalk interface"><div class="uiSelector2"></div></div>
33 + <div id="uiViewButton3" class="uiSelector" onclick="userInterfaceSelectMenu(3)" title="Interface met vaste breedte"><div class="uiSelector3"></div></div>
34 + <div id="uiViewButton4" class="uiSelector" onclick="toggleNightMode()" title="Wissel nachtmodus"><div class="uiSelector4"></div></div>
35 + </div>
36 + </div>
37 + </div>
38 + <div id="column_l" style="max-height:calc(100vh - 135px);overflow-y:auto">
39 + <h1>Gebruiksvoorwaarden</h1>
40 + <p>Neem contact op met de sitebeheerder voor gebruiksvoorwaarden.</p>
41 + <hr>
42 + <p class="MsoNormal">
43 + Hierna volgen de vereiste informatie over open source-componenten en software die in deze software is opgenomen.
44 + </p>
45 + <p class="MsoNormal">
46 + <b><span>1.AJAX Control Toolkit - Nieuwe BSD Licentie</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;"><o:p></o:p></span>
47 + </p>
48 + <p class="MsoNormal">
49 + <span>Copyright (c) 2009, CodePlex Foundation. Alle rechten voorbehouden.<o:p></o:p></span>
50 + </p>
51 + <p class="MsoNormal">
52 + <span>Herdistributie en gebruik in bron- en binaire vorm, met of zonder wijziging, zijn toegestaan mits aan de volgende voorwaarden wordt voldaan:<o:p></o:p></span>
53 + </p>
54 + <p class="MsoNormal">
55 + <span>1. Herdistributies van broncode moeten de bovenstaande copyright kennisgeving en deze lijst met voorwaarden en de volgende disclaimer bevatten.<o:p></o:p></span>
56 + </p>
57 + <p class="MsoNormal">
58 + <span>2. Herdistributies in binaire vorm moeten de bovenstaande copyright kennisgeving, deze lijst met voorwaarden en de volgende disclaimer reproduceren in de documentatie en / of andere materialen die bij de distributie worden geleverd.<o:p></o:p></span>
59 + </p>
60 + <p class="MsoNormal">
61 + <span>3. Noch de naam van CodePlex Foundation, noch de namen van haar bijdragers mogen worden gebruikt om producten die zijn afgeleid van deze software te ondersteunen of promoten zonder specifieke voorafgaande schriftelijke toestemming.<o:p></o:p></span>
62 + </p>
63 + <p class="MsoNormal">
64 + <span>DEZE SOFTWARE WORDT GELEVERD DOOR DE AUTEURSRECHTHOUDERS EN BIJDRAGERS "ALS ZODANIG" EN ENIGE EXPLICIETE OF IMPLICIETE GARANTIES, INCLUSIEF, MAAR NIET BEPERKT TOT, DE IMPLICIETE GARANTIES VAN VERKOOPBAARHEID EN GESCHIKTHEID VOOR EEN BEPAALD DOEL. IN GEEN GEVAL ZULLEN DE EIGENAAR VAN HET AUTEURSRECHT OF DE BIJDRAGERS AANSPRAKELIJK ZIJN VOOR ENIGE DIRECTE, INDIRECTE, INCIDENTELE, SPECIALE, UITZONDERLIJKE OF GEVOLGSCHADE (INCLUSIEF, MAAR NIET BEPERKT TOT, AANSCHAF VAN VERVANGENDE GOEDEREN OF DIENSTEN; VERLIES VAN GEBRUIK, GEGEVENS OF GEGEVENS; OF ONDERBREKING VAN HET BEDRIJF) EVENWEL VEROORZAAKT EN OP ENIGE AANSPRAAK VAN AANSPRAKELIJKHEID, OF IN CONTRACT, STRIKTE AANSPRAKELIJKHEID OF STORT (INCLUSIEF NALATIGHEID OF ANDERSZINS) DIE VOORTVLOEIT OP ENIGE MANIER UIT HET GEBRUIK VAN DEZE SOFTWARE, ZELFS ALS GEADVISEERD VAN DE MOGELIJKHEID.<o:p></o:p></span>
65 + </p>
66 + <p class="MsoNormal">
67 + <b><span>2.OpenSSL – OpenSSL en SSLeay Licentie</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;"><o:p></o:p></span>
68 + </p>
69 + <p class="MsoNormal">
70 + <span><a href="http://www.openssl.org/source/license.html">http://www.openssl.org/source/license.html</a> </span>
71 + </p>
72 + <p class="MsoNormal">
73 + <span>Copyright (c) 1998-2011 The OpenSSL Project. Alle rechten voorbehouden.<o:p></o:p></span>
74 + </p>
75 + <p class="MsoNormal">
76 + <span>Herdistributie en gebruik in bron- en binaire vorm, met of zonder wijziging, zijn toegestaan mits aan de volgende voorwaarden wordt voldaan:<o:p></o:p></span>
77 + </p>
78 + <p class="MsoNormal">
79 + <span>1. Herdistributies van broncode moeten de bovenstaande copyright kennisgeving en deze lijst met voorwaarden en de volgende disclaimer bevatten.<o:p></o:p></span>
80 + </p>
81 + <p class="MsoNormal">
82 + <span>2. Herdistributies in binaire vorm moeten de bovenstaande copyright kennisgeving, deze lijst met voorwaarden en de volgende disclaimer reproduceren in de documentatie en / of andere materialen die bij de distributie worden geleverd. <o:p></o:p></span>
83 + </p>
84 + <p class="MsoNormal">
85 + <span>3.Alle advertentiematerialen die functies of gebruik van deze software maken, moeten de volgende tekst bevatten: "Dit product bevat software die is ontwikkeld door het OpenSSL-project voor gebruik in de OpenSSL Toolkit. (Http://www.openssl.org/)" <o:p></o:p></span>
86 + </p>
87 + <p class="MsoNormal">
88 + <span>4. De namen "OpenSSL Toolkit" en "OpenSSL Project" mogen niet worden gebruikt om producten die zijn afgeleid van deze software te ondersteunen of promoten zonder voorafgaande schriftelijke toestemming. Neem voor schriftelijke toestemming contact op met openssl-core@openssl.org.<o:p></o:p></span>
89 + </p>
90 + <p class="MsoNormal">
91 + <span>5. Producten die zijn afgeleid van deze software mogen niet "OpenSSL" worden genoemd, noch mag "OpenSSL" in hun naam worden weergegeven zonder voorafgaande schriftelijke toestemming van het OpenSSL-project.<o:p></o:p></span>
92 + </p>
93 + <p class="MsoNormal">
94 + <span>6. Herdistributies in welke vorm dan ook moet de volgende tekst behouden: "Dit product bevat software die is ontwikkeld door het OpenSSL-project voor gebruik in de OpenSSL Toolkit (http://www.openssl.org/)". <o:p></o:p></span>
95 + </p>
96 + <p class="MsoNormal">
97 + <span>DEZE SOFTWARE WORDT GELEVERD DOOR HET OpenSSL-PROJECT `` ZOALS HET IS '' EN ELKE UITDRUKKELIJKE OF IMPLICIETE GARANTIES, INCLUSIEF MAAR NIET BEPERKT TOT DE IMPLICIETE GARANTIES VAN VERKOOPBAARHEID EN GESCHIKTHEID VOOR EEN BEPAALD DOEL WORDEN AFGEWEZEN. IN GEEN GEVAL ZAL HET PROJECT VAN DE OpenSSL OF HAAR BIJDRAGERS AANSPRAKELIJK ZIJN VOOR ENIGE DIRECTE, INDIRECTE, INCIDENTELE, SPECIALE, UITZONDERLIJKE OF GEVOLGSCHADE (INCLUSIEF, MAAR SPECIALE, UITZONDERLIJKE OF GEVOLGSCHADE (INCLUSIEF, MAAR NIET BEPERKT TOT SCHULDEN) OF DIENSTEN; VERLIES VAN GEBRUIK, GEGEVENS OF WINST; OF ONDERBREKING VAN HET BEDRIJF) EVENWEL OORZAAKT EN OP ENIGE AANSPRAAK VAN AANSPRAKELIJKHEID, OF IN CONTRACT, STRIKTE AANSPRAKELIJKHEID, OF TORT (INCLUSIEF NALATIGHEID OF ANDERSZINS) DIE OP ENIGE MANIER UIT DE GEBRUIKSVOORWAARDEN ONTSTAAN SOFTWARE, ZELFS INDIEN GEADVISEERD DOOR DE MOGELIJKHEID VAN DERGELIJKE SCHADE.<o:p></o:p></span>
98 + </p>
99 + <p class="MsoNormal">
100 + <b><span>3.jQuery Foundation - MIT Licentie</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;"><o:p></o:p></span>
101 + </p>
102 + <p class="MsoNormal">
103 + <span>Copyright 2013 jQuery Foundation en andere bijdragers <a href="http://jquery.com/">http://jquery.com/</a></span>
104 + </p>
105 + <p class="MsoNormal">
106 + <span>DE SOFTWARE WORDT "ALS ZODANIG" GELEVERD, ZONDER ENIGE VORM VAN GARANTIE, UITDRUKKELIJK OF IMPLICIET, INCLUSIEF MAAR NIET BEPERKT TOT DE GARANTIES VAN VERKOOPBAARHEID, GESCHIKTHEID VOOR EEN BEPAALD DOEL EN NIET-INBREUK. IN GEEN GEVAL ZULLEN DE AUTEURS OF AUTEURSRECHTHOUDERS AANSPRAKELIJK ZIJN VOOR ENIGE CLAIM, SCHADE OF ANDERE AANSPRAKELIJKHEID, OOK IN EEN HANDELING VAN CONTRACT, SCHORT OF ANDERSZINS DIE VOORTVLOEIEN UIT, IN OF IN VERBAND MET DE SOFTWARE OF HET GEBRUIK OF ANDERE HANDELINGEN IN DE SOFTWARE.</span>
107 + </p>
108 + <p class="MsoNormal">
109 + <b><span>4.jQuery Gebruikers Interface - MIT Licentie</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;"><o:p></o:p></span>
110 + </p>
111 + <p class="MsoNormal">
112 + <span>Copyright 2013 jQuery Foundation en andere bijdragers, <a href="http://jqueryui.com/">http://jqueryui.com/</a></span>
113 + </p>
114 + <p class="MsoNormal">
115 + <span>This software consists of voluntary contributions made by many individuals (AUTHORS.txt, http://jqueryui.com/about ). For exact contribution history,see the revision history and logs, available at http://jquery-ui.googlecode.com/svn/ <o:p></o:p></span>
116 + </p>
117 + <p class="MsoNormal">
118 + <span>DE SOFTWARE WORDT "ALS ZODANIG" GELEVERD, ZONDER ENIGE VORM VAN GARANTIE, UITDRUKKELIJK OF IMPLICIET, INCLUSIEF MAAR NIET BEPERKT TOT DE GARANTIES VAN VERKOOPBAARHEID, GESCHIKTHEID VOOR EEN BEPAALD DOEL EN NIET-INBREUK. IN GEEN GEVAL ZULLEN DE AUTEURS OF AUTEURSRECHTHOUDERS AANSPRAKELIJK ZIJN VOOR ENIGE CLAIM, SCHADE OF ANDERE AANSPRAKELIJKHEID, OOK IN EEN HANDELING VAN CONTRACT, SCHORT OF ANDERSZINS DIE VOORTVLOEIEN UIT, IN OF IN VERBAND MET DE SOFTWARE OF HET GEBRUIK OF ANDERE HANDELINGEN IN DE SOFTWARE.<o:p></o:p></span>
119 + </p>
120 + <p class="MsoNormal">
121 + <b><span>5.noVNC - Mozilla Public Licentie 2.0</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;"><o:p></o:p></span>
122 + </p>
123 + <p class="MsoNormal">
124 + <span><a href="https://github.com/kanaka/noVNC/blob/master/LICENSE.txt">https://github.com/kanaka/noVNC/blob/master/LICENSE.txt</a></span>
125 + </p>
126 + <p class="MsoNormal">
127 + <span>Copyright (C) 2011 Joel Martin Dit broncodeformulier is onderworpen aan de voorwaarden van de Mozilla Public License, v. 2.0. Als een kopie van de MPL niet met dit bestand is verspreid, kunt u er een verkrijgen op http://mozilla.org/MPL/2.0/.<o:p></o:p></span>
128 + </p>
129 + <p class="MsoNormal">
130 + <b><span>6.Rcarousel - MIT Licentie</span></b><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;"><o:p></o:p></span>
131 + </p>
132 + <p class="MsoNormal">
133 + <span><a href="https://github.com/ryrych/rcarousel/blob/master/widget/license">https://github.com/ryrych/rcarousel/blob/master/widget/license</a></span>
134 + </p>
135 + <p class="MsoNormal">
136 + <span>Copyright (c) 2010 Wojciech 'RRH' Ryrych<o:p></o:p></span>
137 + </p>
138 + <p class="MsoNormal">
139 + <span>DE SOFTWARE WORDT "ALS ZODANIG" GELEVERD, ZONDER ENIGE VORM VAN GARANTIE, UITDRUKKELIJK OF IMPLICIET, INCLUSIEF MAAR NIET BEPERKT TOT DE GARANTIES VAN VERKOOPBAARHEID, GESCHIKTHEID VOOR EEN BEPAALD DOEL EN NIET-INBREUK. IN GEEN GEVAL ZULLEN DE AUTEURS OF AUTEURSRECHTHOUDERS AANSPRAKELIJK ZIJN VOOR ENIGE CLAIM, SCHADE OF ANDERE AANSPRAKELIJKHEID, OOK IN EEN HANDELING VAN CONTRACT, SCHORT OF ANDERSZINS DIE VOORTVLOEIEN UIT, IN OF IN VERBAND MET DE SOFTWARE OF HET GEBRUIK OF ANDERE HANDELINGEN IN DE SOFTWARE.<o:p></o:p></span>
140 + </p>
141 + <p class="MsoNormal">
142 + <b><span>7.Webtoolkit Javascript Base 64 – Creative Commons Attribution 2.0 UK Licentie</span></b><span><o:p></o:p></span>
143 + </p>
144 + <p class="MsoNormal">
145 + <span>Deze software maakt gebruik van code van <a href="http://www.webtoolkit.info/javascript-base64.html">http://www.webtoolkit.info/javascript-base64.html</a> onder licentie van de <a href="http://creativecommons.org/licenses/by/2.0/uk/legalcode">http://creativecommons.org/licenses/by/2.0/uk/legalcode</a> en de bron kan worden gedownload van <a href="http://www.webtoolkit.info/javascript-base64.html">http://www.webtoolkit.info/javascript-base64.html</a>.<o:p></o:p></span>
146 + </p>
147 + <br>
148 + </div>
149 + <div id="footer">
150 + <table cellpadding="0" cellspacing="10" style="width: 100%">
151 + <tbody><tr>
152 + <td style="text-align:left"></td>
153 + <td style="text-align:right"><a href="/">Terug</a></td>
154 + </tr>
155 + </tbody></table>
156 + </div>
157 + </div>
158 + <script>
159 + 'use strict';
160 + var uiMode = parseInt(getstore('uiMode', 1));
161 + var webPageStackMenu = false;
162 + var webPageFullScreen = true;
163 + var nightMode = (getstore('_nightMode', '0') == '1');
164 + var logoutControls = {{{logoutControls}}};
165 +
166 + var terms = '{{{terms}}}';
167 + if (terms != '') { QH('column_l', decodeURIComponent(terms)); }
168 + QV('column_l', true);
169 + userInterfaceSelectMenu();
170 +
171 + // Setup logout control
172 + var logoutControl = '';
173 + if (logoutControls.name != null) { logoutControl = format("Welkom {0}.", logoutControls.name); }
174 + if (logoutControls.logoutUrl != null) { logoutControl += format(' <a href=\"' + logoutControls.logoutUrl + '\" style="color:white">' + "Uitloggen" + '</a>'); }
175 + QH('logoutControl', logoutControl);
176 +
177 + // Toggle user interface menu
178 + function showUserInterfaceSelectMenu() {
179 + Q('uiViewButton1').classList.remove('uiSelectorSel');
180 + Q('uiViewButton2').classList.remove('uiSelectorSel');
181 + Q('uiViewButton3').classList.remove('uiSelectorSel');
182 + Q('uiViewButton4').classList.remove('uiSelectorSel');
183 + try { Q('uiViewButton' + uiMode).classList.add('uiSelectorSel'); } catch (ex) { }
184 + QV('uiMenu', (QS('uiMenu').display == 'none'));
185 + if (nightMode) { Q('uiViewButton4').classList.add('uiSelectorSel'); }
186 + }
187 +
188 + function userInterfaceSelectMenu(s) {
189 + if (s) { uiMode = s; putstore('uiMode', uiMode); }
190 + webPageFullScreen = (uiMode < 3);
191 + webPageStackMenu = true;//(uiMode > 1);
192 + toggleFullScreen(0);
193 + toggleStackMenu(0);
194 + QC('column_l').add('room4submenu');
195 + }
196 +
197 + function toggleNightMode() {
198 + nightMode = !nightMode;
199 + if (nightMode) { QC('body').add('night'); } else { QC('body').remove('night'); }
200 + putstore('_nightMode', nightMode ? '1' : '0');
201 + }
202 +
203 + // Toggle the web page to full screen
204 + function toggleFullScreen(toggle) {
205 + if (toggle === 1) { webPageFullScreen = !webPageFullScreen; putstore('webPageFullScreen', webPageFullScreen); }
206 + var hide = 0;
207 + //if (args.hide) { hide = parseInt(args.hide); }
208 + if (webPageFullScreen == false) {
209 + QC('body').remove('menu_stack');
210 + QC('body').remove('fullscreen');
211 + QC('body').remove('arg_hide');
212 + //if (xxcurrentView >= 10) QC('column_l').add('room4submenu');
213 + //QV('UserDummyMenuSpan', false);
214 + //QV('page_leftbar', false);
215 + } else {
216 + QC('body').add('fullscreen');
217 + if (hide & 16) QC('body').add('arg_hide'); // This is replacement for QV('page_leftbar', !(hide & 16));
218 + //QV('UserDummyMenuSpan', (xxcurrentView < 10) && webPageFullScreen);
219 + //QV('page_leftbar', true);
220 + }
221 + QV('body', true);
222 + }
223 +
224 + // If FullScreen, toggle menu to be horisontal or vertical
225 + function toggleStackMenu(toggle) {
226 + if (webPageFullScreen == true) {
227 + if (toggle === 1) {
228 + webPageStackMenu = !webPageStackMenu;
229 + putstore('webPageStackMenu', webPageStackMenu);
230 + }
231 + if (webPageStackMenu == false) {
232 + QC('body').remove('menu_stack');
233 + } else {
234 + QC('body').add('menu_stack');
235 + //if (xxcurrentView >= 10) QC('column_l').remove('room4submenu');
236 + }
237 + }
238 + }
239 +
240 + function putstore(name, val) { try { if (typeof (localStorage) === 'undefined') return; localStorage.setItem(name, val); } catch (e) { } }
241 + function getstore(name, val) { try { if (typeof (localStorage) === 'undefined') return val; var v = localStorage.getItem(name); if ((v == null) || (v == null)) return val; return v; } catch (e) { return val; } }
242 + function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
243 +
244 + </script>
245 +
246 +
247 +</body></html>
\ No newline at end of file
views/translations/terms_pt.handlebars
+1 -1
@@ -13,7 +13,7 @@
13 <!-- Begin Masthead -->
14 <div id="masthead" class="noselect" style="background:url(logo.png) 0px 0px;background-color:#036;background-repeat:no-repeat;height:66px;width:100%;overflow:hidden;">
15 <div style="float:left">{{{titlehtml}}}</div>
16 - <div style="float:left; height: 66px; color:#c8c8c8; padding-left:20px; padding-top:8px">
16 + <div style="float:left; height: 66px; color:#c8c8c8; padding-left:14px; padding-top:7px">
17 <strong><font style="font-size:46px; font-family: Arial, Helvetica, sans-serif;">{{{title1}}}</font></strong>
18 </div>
19 <div style="float:left; height: 66px; color:#c8c8c8; padding-left:5px; padding-top:14px">