Files
webgui/plugins/dynamix/FlashInfo.page
2018-08-22 17:57:45 +02:00

73 lines
2.3 KiB
Plaintext

Menu="Flash"
Title="Flash Device Settings"
Tag="usb"
---
<?PHP
/* Copyright 2005-2017, Lime Technology
* Copyright 2012-2017, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
?>
<script>
function cleanUp(zip) {
if (document.hasFocus()) {
$('input[value="Creating Flash backup..."]').val('Flash backup').prop('disabled',false);
$('div.spinner').hide('slow');
$('#pleaseWait').hide('slow');
$.post('/webGui/include/Download.php',{cmd:'unlink',file:zip});
} else {
setTimeout(function(){cleanUp(zip);},2000);
}
}
function backup() {
$('input[value="Flash backup"]').val('Creating Flash backup...').prop('disabled',true);
$('div.spinner').show('slow');
$('#pleaseWait').show('slow');
$.post('/webGui/include/Download.php',{cmd:'backup'},function(zip) {
if (zip) {
location = '/'+zip;
setTimeout(function(){cleanUp(zip);},6000);
} else {
$('input[value="Creating Flash backup..."]').val('Flash backup');
$('div.spinner').hide('slow');
$('#pleaseWait').hide('slow');
swal('Creation error','Insufficient free disk space available','error');
}
});
}
</script>
<div class="spinner" style="display:none"></div>
<div id="pleaseWait" style="display:none;text-align:center;margin-bottom:24px"><span class="red-text strong">Please wait... creating Flash backup zip file (this may take several minutes)</span></div>
Flash Vendor:
: <?=$var['flashVendor'];?>
Flash Product:
: <?=$var['flashProduct'];?>&nbsp;
Flash GUID:
: <?=$var['flashGUID'];?>&nbsp;
<?if (strstr($var['regTy'], "blacklisted")):?>
&nbsp;
: **Blacklisted** - <a href="http://lime-technology.com/contact" target="_blank">Contact Support</a>
<?else:?>
&nbsp;
: [Registration Key Manager](/Tools/Registration)
<?endif;?>
> Use *Flash backup* to create a single zip file of the current contents of the flash device and store it locally on your computer.
&nbsp;
: <input type="button" value="Flash backup" onclick="backup()"><input type="button" value="Done" onclick="done()">