Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 13.76 KB | None | 0 0
  1.  
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <link rel="icon" type="image/x-icon" href="/favicon.ico" />
  6. <link rel="icon" type="image/vnd.microsoft.icon" href="/favicon.ico" />
  7. <link rel="shortcut icon" href="/favicon.ico" />
  8. <link rel="icon" sizes="192x192" href="/android-icon-192x192.png" />
  9. <link rel="icon" type="image/png" href="/opera-icon-160x160.png" />
  10. <link rel="icon" sizes="228x228" href="/opera-icon-228x228.png" />
  11. <link rel="apple-touch-icon-precomposed" sizes="180x180" href="/apple-touch-icon-180x180-precomposed.png">
  12. <link rel="apple-touch-icon-precomposed" sizes="152x152" href="/apple-touch-icon-152x152-precomposed.png">
  13. <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144x144-precomposed.png">
  14. <link rel="apple-touch-icon-precomposed" sizes="120x120" href="/apple-touch-icon-120x120-precomposed.png">
  15. <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/apple-touch-icon-114x114-precomposed.png">
  16. <link rel="apple-touch-icon-precomposed" sizes="76x76" href="/apple-touch-icon-76x76-precomposed.png">
  17. <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/apple-touch-icon-72x72-precomposed.png">
  18. <link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-precomposed.png">
  19. <meta name="msapplication-TileImage" content="/windows-icon-144x144.png">
  20. <meta name="msapplication-square150x150logo" content="/windows-icon-150x150.png">
  21. <meta name="msapplication-square310x310logo" content="/windows-icon-310x310.png">
  22. <meta name="msapplication-TileColor" content="#c41a00">
  23. <title>AIDA64 RemoteSensor</title>
  24. <style>
  25. body
  26. {
  27.  background-color: #FFFFFF;
  28.  background-repeat:no-repeat;
  29.  background-attachment:fixed;
  30.  background-position:center;
  31.  padding:0;
  32.  margin:0;
  33. }
  34. .clearfix:after
  35. {
  36.  clear: both;
  37.  content: ".";
  38.  display: block;
  39.  height: 0;
  40.  visibility: hidden;
  41. }
  42. #propertyUpdate
  43. {
  44.  display:none;
  45. }
  46. .prop
  47. {
  48.  display:none;
  49. }
  50. </style>
  51. </head>
  52. <body onload="MyOnLoad()">
  53. <span id="Simple0" style="position:absolute; left:371px; top:0px; font-size:20pt; color:#000000; font-family:Calibri; font-weight: bold">16:52:36</span>
  54. </body>
  55. <script>
  56.  
  57. var DrawGraph = function(dst, grapharray, gridoffset, gtype, step, thick, griddensity, minval, maxval, autoscale, bo_100, showbg, bgcolor, showframe, framecolor, showgrid, gridcolor, graphcolor, showscale, fontfamily, fontcolor, fontsize, fontstyle, fontvariant, fontweight, rightalign)
  58. {
  59.  var canvas = document.getElementById(dst);
  60.  var ctx = canvas.getContext("2d");
  61.  var W = canvas.width;
  62.  var H = canvas.height;
  63.  var x1 = 0;
  64.  var y1 = 0;
  65.  var x2 = W - 1;
  66.  var y2 = H - 1;
  67.  var gtype_ag = (gtype == "AG");
  68.  var gtype_hg = (gtype == "HG");
  69.  ctx.clearRect(0, 0, W, H);
  70.  if (showframe)
  71.  {
  72.   x1++;
  73.   y1++;
  74.   x2--;
  75.   y2--;
  76.   W = W - 2;
  77.   H = H - 2;
  78.  }
  79.  var r_minval;
  80.  var r_maxval;
  81.  var i_graph_width_half = (W / 2) + 1;
  82.  if (autoscale)
  83.  {
  84.   r_minval = +1e9;
  85.   r_maxval = -1e9;
  86.   var i_minval;
  87.   var i_maxval;
  88.   var value_x = x2;
  89.   var bo_break = false;
  90.   for (i = 0; i < i_graph_width_half; i++)
  91.  if (i < grapharray.length)
  92.  {
  93.   if (grapharray[i] < r_minval) r_minval = grapharray[i];
  94.   if (grapharray[i] > r_maxval) r_maxval = grapharray[i];
  95.    if (bo_break) break;
  96.    if (gtype_hg)
  97.    {
  98.     value_x -= (thick + step);
  99.     if (value_x < x1) break;
  100.   }
  101.   else
  102.   {
  103.    value_x -= (step + 1);
  104.    if (value_x < x1) bo_break = true;
  105.   }
  106.  }
  107.  if (r_minval == +1e9) r_minval = 0;
  108.  if (r_maxval == -1e9) r_maxval = 0;
  109.  if (bo_100)
  110.  {
  111.   i_minval = Math.round(r_minval * 0.009) * 100;
  112.   i_maxval = Math.round(r_maxval * 0.011) * 100;
  113.   if (i_minval > r_minval) i_minval = Math.floor(r_minval) * 100;
  114.    while (i_maxval <= i_minval) i_maxval = i_maxval + 100;
  115.  }
  116.  else
  117.  {
  118.   i_minval = Math.round(r_minval * 0.9);
  119.   i_maxval = Math.round(r_maxval * 1.1);
  120.   if (i_minval > r_minval) i_minval = Math.floor(r_minval);
  121.    if (i_maxval < r_maxval) i_maxval++;
  122.   while (i_maxval <= i_minval) i_maxval += 2;
  123.  }
  124.  r_minval = i_minval;
  125.  r_maxval = i_maxval;
  126. }
  127. else
  128. {
  129.  r_minval = minval;
  130.  r_maxval = maxval;
  131. }
  132. if (showbg)
  133. {
  134.  ctx.fillStyle = bgcolor;
  135.  ctx.fillRect(x1, y1, W, H);
  136. }
  137. if (showgrid)
  138. {
  139.  ctx.fillStyle = gridcolor;
  140.  if (!gtype_hg)
  141.  for (i = 0; i < W; i++)
  142.  if ((i % griddensity) == gridoffset) ctx.fillRect(x1 + i, y1, 1, y2 - y1 + 1)
  143.  for (i = H-1; i >= 0; i--)
  144.   if ((i % griddensity) == 0)
  145.   if ((!showframe) || (i)) ctx.fillRect(x1, y2 - i, x2 - x1 + 1, 1)
  146.  }
  147.  var val_range = r_maxval - r_minval;
  148.  var value_x = x2;
  149.  if (gtype_hg)
  150.  {
  151.   ctx.fillStyle = graphcolor;
  152.   for (i = 0; i < i_graph_width_half; i++)
  153.  if (i < grapharray.length)
  154.  {
  155.   var value_y = y2 - Math.floor((grapharray[i] - r_minval) / val_range * H);
  156.   ctx.fillRect(value_x - (thick - 1), value_y, thick, y2 - value_y + 1);
  157.   value_x -= (thick + step);
  158.   if (value_x < x1) break;
  159.  }
  160. }
  161. else
  162. {
  163.  var bo_first = true;
  164.  var bo_break = false;
  165.  var first_y = y2;
  166.  var prev_x = value_x;
  167.  for (i = 0; i < i_graph_width_half; i++)
  168.  if (i < grapharray.length)
  169.  {
  170.   var value_y = y2 - Math.floor((grapharray[i] - r_minval) / val_range * H);
  171.   if (bo_first)
  172.   {
  173.     ctx.fillStyle = graphcolor;
  174.     ctx.fillRect(value_x, value_y, 1, 1);
  175.     bo_first = false;
  176.     first_y = value_y;
  177.     ctx.strokeStyle = graphcolor;
  178.     ctx.lineWidth = thick;
  179.     ctx.beginPath();
  180.     ctx.moveTo(value_x, value_y);
  181.   }
  182.   else ctx.lineTo(value_x, value_y);
  183.   prev_x = value_x;
  184.   if (bo_break) break;
  185.   value_x -= (step + 1);
  186.   if (value_x < x1) bo_break = true;
  187.  }
  188.  if (!bo_first)
  189.  {
  190.   ctx.stroke();
  191.   if (gtype_ag)
  192.   {
  193.    ctx.save();
  194.    if (value_x < x1) ctx.lineTo(x1, y2 + 1);
  195.    else ctx.lineTo(prev_x, y2 + 1);
  196.    ctx.lineTo(x2 + 1, y2 + 1);
  197.    ctx.lineTo(x2 + 1, first_y);
  198.    ctx.clip();
  199.    ctx.fillStyle = graphcolor;
  200.    ctx.globalCompositeOperation = "lighter";
  201.    ctx.globalAlpha = 0.33;
  202.    ctx.fillRect(0, 0, canvas.width, canvas.height);
  203.    ctx.restore();
  204.   }
  205.  }
  206. }
  207. if (showscale)
  208. {
  209.  ctx.fillStyle = fontcolor;
  210.  ctx.font = fontstyle + " " + fontvariant + " " + fontweight + " " + fontsize + " " + fontfamily;
  211.  if (rightalign)
  212.  {
  213.   ctx.textBaseline = "alphabetic";
  214.   ctx.fillText(r_minval, x2 - ctx.measureText(r_minval).width, y2);
  215.   ctx.textBaseline = "hanging";
  216.   ctx.fillText(r_maxval, x2 - ctx.measureText(r_maxval).width, y1 + 1);
  217.  }
  218.  else
  219.  {
  220.   ctx.textBaseline = "alphabetic";
  221.   ctx.fillText(r_minval, x1 + 1, y2);
  222.   ctx.textBaseline = "hanging";
  223.   ctx.fillText(r_maxval, x1 + 1, y1 + 1);
  224.  }
  225. }
  226. if (showframe)
  227. {
  228.  ctx.fillStyle = framecolor;
  229.  ctx.fillRect(0, 0, 1, canvas.height);
  230.  ctx.fillRect(0, canvas.height - 1, canvas.width, 1);
  231.  ctx.fillRect(canvas.width - 1, 0, 1, canvas.height - 1);
  232.  ctx.fillRect(0, 0, canvas.width, 1);
  233. }
  234. };
  235. var DrawArcGauge = function(dst, thickness, startangle, perc, bgcolor, color, fill, fillcolor, showtext, text, fontfamily, fontcolor, fontsize, fontstyle, fontvariant, fontweight)
  236. {
  237. var canvas = document.getElementById(dst);
  238. var ctx = canvas.getContext("2d");
  239. var W = canvas.width;
  240. var H = canvas.height;
  241. var startradians = startangle * Math.PI / 180;
  242. var endradians   = (startangle + 360 * perc / 100) * Math.PI / 180;
  243. ctx.clearRect(0, 0, W, H);
  244. if (fill)
  245. {
  246.  ctx.beginPath();
  247.  ctx.strokeStyle = fillcolor;
  248.  ctx.lineWidth = thickness/2;
  249.  ctx.arc(W/2, H/2, (W-thickness*1.5)/2, 0, Math.PI*2, false);
  250.  ctx.fillStyle = fillcolor;
  251.  ctx.fill();
  252.  ctx.stroke();
  253. }
  254. ctx.beginPath();
  255. ctx.strokeStyle = bgcolor;
  256. ctx.lineWidth = thickness;
  257. if (perc == 0) ctx.arc(W/2, H/2, (W-thickness)/2, 0, Math.PI*2, false);
  258. else ctx.arc(W/2, H/2, (W-thickness)/2, endradians - Math.PI/2, startradians - Math.PI/2, false);
  259. ctx.stroke();
  260. if (perc > 0)
  261.  {
  262.   ctx.beginPath();
  263.   ctx.strokeStyle = color;
  264.   ctx.lineWidth = thickness;
  265.   ctx.arc(W/2, H/2, (W-thickness)/2, startradians - Math.PI/2, endradians - Math.PI/2, false);
  266.   ctx.stroke();
  267.  }
  268.  if (showtext)
  269.  {
  270.   ctx.fillStyle = fontcolor;
  271.   ctx.font = fontstyle + " " + fontvariant + " " + fontweight + " " + fontsize + " " + fontfamily;
  272.   ctx.textBaseline = "middle";
  273.   ctx.fillText(text, W/2 - ctx.measureText(text).width / 2, H/2);
  274.  }
  275. };
  276.  
  277.  var bo_webkit = navigator.userAgent.toLowerCase().indexOf("webkit") > -1;
  278.  var s_webkit = "";
  279.  var s_barp = "";
  280. (function (global) {if ("EventSource" in global) return;var reTrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g;var EventSource = function (url) {  var eventsource = this,      interval = 500,      lastEventId = null,      cache = "";  if (!url || typeof url != "string") {    throw new SyntaxError("Not enough arguments");  }  this.URL = url;  this.readyState = this.CONNECTING;  this._pollTimer = null;  this._xhr = null;  function pollAgain(interval) {    eventsource._pollTimer = setTimeout(function () {      poll.call(eventsource);    }, interval);  }  function poll() {    try {      if (eventsource.readyState == eventsource.CLOSED) return;      var xhr = new XMLHttpRequest();      xhr.open("GET", eventsource.URL, true);      xhr.setRequestHeader("Accept", "text/event-stream");      xhr.setRequestHeader("Cache-Control", ":no-cache");      xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");      if (lastEventId != null) xhr.setRequestHeader("Last-Event-ID", lastEventId);      cache = "";      xhr.timeout = 50000;      xhr.onreadystatechange = function () {        if (this.readyState == 3 || (this.readyState == 4 && this.status == 200)) {          if (eventsource.readyState == eventsource.CONNECTING) {            eventsource.readyState = eventsource.OPEN;            eventsource.dispatchEvent("open", { type: "open" });          }          var responseText = "";          try {            responseText = this.responseText || "";          } catch (e) {}          var parts = responseText.substr(cache.length).split("\n"),              eventType = "message",              data = [],              i = 0,              line = "";          cache = responseText;          for (; i < parts.length; i++) {            line = parts[i].replace(reTrim, "");            if (line.indexOf("event") == 0) {              eventType = line.replace(/event:?\s*/, "");             } else if (line.indexOf("retry") == 0) {               retry = parseInt(line.replace(/retry:?\s*/, ""));               if(!isNaN(retry)) { interval = retry; }             } else if (line.indexOf("data") == 0) {               data.push(line.replace(/data:?\s*/, ""));             } else if (line.indexOf("id:") == 0) {               lastEventId = line.replace(/id:?\s*/, "");             } else if (line.indexOf("id") == 0) {               lastEventId = null;             } else if (line == "") {               if (data.length) {                 var event = new MessageEvent(data.join("\n"), eventsource.url, lastEventId);                 eventsource.dispatchEvent(eventType, event);                 data = [];                 eventType = "message";               }             }           }          if (this.readyState == 4) pollAgain(interval);        } else if (eventsource.readyState !== eventsource.CLOSED) {          if (this.readyState == 4) {            eventsource.readyState = eventsource.CONNECTING;            eventsource.dispatchEvent("error", { type: "error" });            pollAgain(interval);          } else if (this.readyState == 0) {            pollAgain(interval);          } else {          }         }       };       xhr.send();       setTimeout(function () {         if (true || xhr.readyState == 3) xhr.abort();       }, xhr.timeout);       eventsource._xhr = xhr;     } catch (e) {       eventsource.dispatchEvent("error", { type: "error", data: e.message });     }   };   poll();};EventSource.prototype = {  close: function () {    this.readyState = this.CLOSED;    clearInterval(this._pollTimer);    this._xhr.abort();  },  CONNECTING: 0,  OPEN: 1,  CLOSED: 2,  dispatchEvent: function (type, event) {    var handlers = this["_" + type + "Handlers"];    if (handlers) {      for (var i = 0; i < handlers.length; i++) {        handlers[i].call(this, event);      }    }    if (this["on" + type]) {      this["on" + type].call(this, event);    }  },  addEventListener: function (type, handler) {    if (!this["_" + type + "Handlers"]) {      this["_" + type + "Handlers"] = [];    }    this["_" + type + "Handlers"].push(handler);  },  removeEventListener: function (type, handler) {    var handlers = this["_" + type + "Handlers"];    if (!handlers) {      return;    }    for (var i = handlers.length - 1; i >= 0; --i) {      if (handlers[i] === handler) {        handlers.splice(i, 1);        break;      }    }  },  onerror: null,  onmessage: null,  onopen: null,  readyState: 0,  URL: ""};var MessageEvent = function (data, origin, lastEventId) {  this.data = data;  this.origin = origin;  this.lastEventId = lastEventId || "";};MessageEvent.prototype = {  data: null,  type: "message",  lastEventId: "",  origin: ""};if ("module" in global) module.exports = EventSource;global.EventSource = EventSource;})(this);
  281. var source = new EventSource("/sse");
  282. source.onmessage = function(event)
  283. {
  284.  var s_data = event.data;
  285.  var s_item;
  286.  var s_items;
  287.  var i_idx;
  288.  if (s_data.substr(0, 6) == "ReLoad") setTimeout(function () { window.location.reload(); }, 500);
  289.  while (s_data.indexOf("{|}") > -1)
  290.  {
  291.   i_idx = s_data.indexOf("{|}");
  292.   s_item = s_data.substr(0, i_idx);
  293.   if (s_item.indexOf("Bar") == 0)
  294.   {
  295.    s_items = s_item.split("|", 4);
  296.  
  297.   }
  298.   else
  299.   if (s_item.indexOf("Gph") == 0)
  300.   {
  301.    s_items = s_item.split("|", 3);
  302.  
  303.   }
  304.   else
  305.   if (s_item.indexOf("Arc") == 0)
  306.   {
  307.    s_items = s_item.split("|", 5);
  308.  
  309.   }
  310.   else
  311.   {
  312.    s_items = s_item.split("|", 2);
  313.  
  314. if (s_items[0] == "Simple0") document.getElementById("Simple0").innerHTML = s_items[1];
  315.  
  316.   }
  317.   s_data = s_data.substr(i_idx + 3);
  318.  }
  319. };
  320.  
  321. </script>
  322. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement