| <!-- BOF: Keepalive for Session --> |
|
|
|
|
|
|
|
| <!-- timeout warning alert --> |
|
|
|
|
|
|
|
|
| <div id="keepalivetimer" title="Your session is about to expire!" style="display: none"> |
|
|
| <p class="ui-state-error-text"> |
|
|
|
|
|
|
|
| <span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 50px 0;"></span> |
|
|
| You will be logged off in <span id="keepalivetimer-countdown" style="font-weight:bold"></span> minutes. |
| </p> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| <p>Do you want to continue your session?</p> |
|
|
|
|
|
|
| </div> |
|
|
|
|
|
|
|
|
|
|
| <link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css" type="text/css" rel="stylesheet" /> |
| <script type="text/javascript"> |
|
|
|
|
|
|
|
| if (typeof jQuery == "undefined") {//no jquery yet |
|
|
|
|
|
|
| document.write('<scr'+'ipt type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">'); |
| document.write('</scr' + 'ipt>'); |
|
|
|
|
|
|
|
| } |
|
|
|
|
|
|
|
|
|
|
| </script> |
|
|
|
|
|
|
|
|
|
|
| <script type="text/javascript"> |
|
|
|
|
|
|
|
| if (!jQuery.ui) { |
|
|
|
|
|
|
|
|
|
| document.write('<scr'+'ipt type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js">'); |
| document.write('</scr' + 'ipt>'); |
|
|
|
|
|
|
|
| } |
|
|
|
|
|
|
|
|
|
|
| </script> |
|
|
|
|
|
|
|
|
|
|
| <script src="includes/javascript/jquery.idletimer.js?t=1405472253" type="text/javascript"></script> |
|
| <script src="includes/javascript/jquery.idletimeout.js?t=1405472253" type="text/javascript"></script> |
|
| <style type="text/css"> |
|
|
|
|
|
|
|
|
| a.ui-dialog-titlebar-close {display:none;} |
|
|
|
|
|
|
| .ui-widget-overlay { background: green; opacity: .40;filter:Alpha(Opacity=40); } |
|
|
|
| </style> |
|
|
|
|
|
|
|
|
|
|
| <script type="text/javascript"> |
|
|
|
|
|
|
|
| //setup the dialog |
|
|
|
|
|
|
|
|
|
| $("#keepalivetimer").dialog({ |
|
|
|
|
|
|
|
|
| autoOpen: false, |
|
|
|
|
|
|
|
|
|
| modal: true, |
|
|
|
|
|
|
|
|
|
| width: 430, |
|
|
|
|
|
|
|
|
|
| height: 250, |
|
|
|
|
|
|
|
|
|
| closeOnEscape: false, |
|
|
|
|
|
|
|
|
| draggable: false, |
|
|
|
|
|
|
|
|
|
| resizable: false, |
|
|
|
|
|
|
|
|
|
| position: "top", |
|
|
|
|
|
|
|
|
|
| buttons: { |
|
|
|
|
|
|
|
|
|
| 'Yes, Keep Working': function(){ |
|
|
|
|
|
|
|
| $(this).dialog('close'); |
|
|
|
|
|
|
|
|
| }, |
|
|
|
|
|
|
|
|
|
|
| 'No, Logoff': function(){ |
|
|
|
|
|
|
|
|
| $.idleTimeout.options.onLogoffClick.call(this); |
|
|
|
|
|
|
| } |
|
|
|
|
|
|
|
|
|
|
| } |
|
|
|
|
|
|
|
|
|
|
| }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| // start the idle timer monitor |
|
|
|
|
|
|
|
|
| var $countdown = $("#keepalivetimer-countdown"); |
|
|
|
|
|
| $.idleTimeout('#keepalivetimer', 'div.ui-dialog-buttonpane button:first', { |
|
|
|
| idleAfter: 600, // 600 user is considered idle after 10 minutes of no movement in this browser window/tab |
| warningLength: 250, // 250 countdown timer starts at this many seconds (250sec=4:50min) |
|
|
| pollingInterval: 60, //60 check for server connection every minute; if it fails or user is logged out, keepalive scripts will abort |
| keepAliveURL: 'keepalive.php', serverResponseEquals: 'OK', |
|
|
|
|
|
| titleMessage: 'Warning: %s seconds until log out | ', |
|
|
|
|
|
| onTimeout: function(){ |
|
|
|
|
|
|
|
|
| document.title = '!!Expired Session'; |
|
|
|
|
|
|
|
| $(this).html('<p class="ui-state-error-text"><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 50px 0;"></span>Sorry, you have been logged out due to inactivity.</p><p>Any unsaved work was lost. If you were composing content which you wish to save, click Close and copy that content to your clipboard. Then refresh the page to login again.</p><p>To continue, please login again.</p>'); |
| $(this).dialog("option", "title", 'Your session has expired'); |
|
|
|
|
|
| $(this).dialog("option", "minWidth", "450"); |
|
|
|
|
|
|
| $(this).dialog("option", "buttons", {'Close': function(){$(this).dialog('close');},'Login': function(){window.location.reload();}}); |
| //$(this).dialog("option", "buttons", {'Login': function(){window.location.reload();} }); |
|
|
| }, |
|
|
|
|
|
|
|
|
|
|
| onAbort: function(){ |
|
|
|
|
|
|
|
|
| // TODO: another modal dialog would be more friendly |
|
|
|
|
|
| alert('We are unable to connect to the server. Your work may be lost. Please review your work and perhaps copy information to your clipboard if you had any work in progress which you do not wish to lose.'); |
| }, |
|
|
|
|
|
|
|
|
|
|
| onIdle: function(){ |
|
|
|
|
|
|
|
|
|
| $(this).dialog("open"); |
|
|
|
|
|
|
|
|
| }, |
|
|
|
|
|
|
|
|
|
|
| onLogoffClick: function(){ |
|
|
|
|
|
|
|
|
| window.location = "logoff.php"; |
|
|
|
|
|
|
|
| }, |
|
|
|
|
|
|
|
|
|
|
| onCountdown: function(counter){ |
|
|
|
|
|
|
|
| var sec = counter % 60; |
|
|
|
|
|
|
|
|
| var min = Math.floor(counter/60); |
|
|
|
|
|
|
|
| if (sec < 0) { |
|
|
|
|
|
|
|
|
|
| sec = 59; |
|
|
|
|
|
|
|
|
|
| min = min - 1; |
|
|
|
|
|
|
|
|
|
| } |
|
|
|
|
|
|
|
|
|
|
| if (sec<=9) { sec = "0" + sec; } |
|
|
|
|
|
|
|
|
| var time = (min<=9 ? "0" + min : min) + ":" + sec; |
|
|
|
|
|
|
| $countdown.html(time); |
|
|
|
|
|
|
|
|
| } |
|
|
|
|
|
|
|
|
|
|
| }); |
|
|
|
|
|
|
|
|
|
|
| </script> |
|
|
|
|
|
|
|
|
|
|
| <!-- EOF: Keepalive for Session --> |
|
|
|
|
|
|
|
| Status |
OID |
Date purchased |
Name |
E-mail |
Product name |
Qty |
Options |
Values |
Comments |
ENDOFROW |
| Processing |
EDITED |
######## |
EDITED |
Bronze |
0.5 |
Wire |
Square |
|
ENDOFROW |
|
|
|
|
|
0.5 |
Mandrel |
3.50 |
|
ENDOFROW |
|
|
|
|
|