Registration page refinements

This commit is contained in:
Tom Mortensen
2017-05-13 12:19:36 -07:00
parent fbabf92f62
commit 0c223514d2
2 changed files with 275 additions and 183 deletions

View File

@@ -17,8 +17,8 @@ Type="xmenu"
function my_time2($time) {
return $time ? my_time($time) : "Anytime";
}
$device = my_word($var['deviceCount']);
$plural = $var['deviceCount']==1 ? '' : 's';
$attached_devices="This server has {$var['deviceCount']} attached storage device".($var['deviceCount']==1 ? "" : "s").".";
$contact_support="<a href='https://lime-technology.com/contact' target='_blank'>Contact Support</a>";
?>
<style>
span.thanks{padding-left:10px;color:#6FA239;font-weight:bold;}
@@ -27,139 +27,20 @@ span.device{font-weight:normal;font-style:italic;}
div.remark{padding:0 10px;text-align:justify;}
</style>
<?if (strstr($var['regTy'], "error")):?>
<span class='thanks red'>Error accessing your physical USB Flash boot device</span>
Flash GUID:
: <a href="https://lime-technology.com/contact" target="_blank">Contact Support</a>
<?endif;?>
<?if (strstr($var['regTy'], "blacklisted")):?>
<span class='thanks red'>Blacklisted USB Flash GUID</span>
Flash GUID:
: <?=$var['flashGUID'];?>
&nbsp;
: <a href="https://lime-technology.com/contact" target="_blank">Contact Support</a>
<div markdown="1" class="remark">
Your USB Flash boot device has been *blacklisted*. This can occur as a result of transfering your key to
a replacement USB Flash device.<br>
USB Flash devices may also be *blacklisted* when it is discovered the
GUID is not uninque (this is common with USB card readers).
</div>
<?endif;?>
<?if (strstr($var['regTy'], "invalid key")):?>
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID'];?>">
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
<span class='thanks red'>The registered GUID does not match the USB Flash boot device GUID</span>
Flash GUID:
: <?=$var['flashGUID'];?>
Registered GUID:
: <?=$var['regGUID'];?>
Registered to:
: <span class="big"><?=htmlspecialchars($var['regTo'])?></span>
Registered on:
: <?=my_time($var['regTm']);?>
<?if (strstr($var['regTy'], "Trial")):?>
Expiration:
: <?=my_time($var['regTm2']);?>
<span class="device">This system has <?=$device?> attached storage device<?=$plural?>.</span>
: <input type="submit" value="Purchase Key">
<?else:?>
Replaceable:
: <?=my_time2($var['regTm2']);?>
<?if ($var['regTm2']==0 || $var['regTm2']<time()):?>
<span class="device">This system has <?=$device?> attached storage device<?=$plural?>.</span>
: <input type="submit" value="Purchase Key"> <input type="button" value="Replace Key" onclick="openBox('/webGui/include/ReplaceKey.php','Replace Key',600,900);">
<?else:?>
<span class="device">This system has <?=$device?> attached storage device<?=$plural?>.</span>
: <input type="submit" value="Purchase Key"> <input type="button" value="Replace Key" disabled>
<?endif;?>
<?endif;?>
</form>
<?endif;?>
<?if (strstr($var['regTy'], "invalid installation")):?>
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID'];?>">
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
<span class='thanks red'>Invalid <em>Trial</em> Installation</span>
Flash GUID:
: <?=$var['flashGUID'];?>
Registered GUID:
: <?=$var['regGUID'];?>
Registered to:
: <span class="big"><?=htmlspecialchars($var['regTo'])?></span>
Registered on:
: <?=my_time($var['regTm']);?>
Expiration:
: <?=my_time($var['regTm2']);?>
<span class="device">This system has <?=$device?> attached storage device<?=$plural?>.</span>
: <input type="submit" value="Purchase Key">
</form>
<?endif;?>
<?if (strstr($var['regTy'], "missing")):?>
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID'];?>">
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
<span class='thanks red'>Wrong or Missing Key file.</span>
Flash GUID:
: <?=$var['flashGUID'];?>
Registered GUID:
: <?=$var['regGUID'];?>
<span class="device">This system has <?=$device?> attached storage device<?=$plural?>.</span>
: <input type="submit" value="Purchase Key">
</form>
<?endif;?>
<?if (strstr($var['regTy'], "unregistered")):?>
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID'];?>">
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID']?>">
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
<span class="thanks">Thank you for trying unRAID Server OS!</span>
<div markdown="1" class="remark">
Your server will not be usable until you purchase a registration key or install a <span class="big">**free** 30-day *Trial*</span> key.
<br>Registration keys are bound to your USB Flash boot device GUID (serial number). Please use a high-quality device
between 512MB and 32GB in size.
Your server will not be usable until you purchase a registration key or install a <span class="big">**free** 30-day *Pro Trial*</span> key.
Registration keys are bound to your USB Flash boot device serial number (GUID). Please use a high quality name brand device
between 1GB and 32GB in size.
Note: USB memory card readers are generally **not** supported because most do not present unique serial numbers.
<span class="red-text">Important:</span>
@@ -167,61 +48,107 @@ between 512MB and 32GB in size.
+ Please make sure there is a <u>[DNS server](NetworkSettings)</u> specified.
</div>
Flash GUID:
: <?=$var['flashGUID'];?>
Flash Vendor:
: <?=$var['flashVendor']?>
<span class="device">This system has <?=$device?> attached storage device<?=$plural?>.</span>
Flash Product:
: <?=$var['flashProduct']?>
Flash GUID:
: <?=$var['flashGUID']?>
<span class="device"><?=$attached_devices?></span>
: <input type="submit" value="Purchase Key"> <input type="button" value="Get Trial Key" onclick="openBox('/webGui/include/TrialRequest.php','Get Trial Key',600,900);">
</form>
<?endif;?>
<?if ($var['regTy']=="Trial"):?>
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID']?>">
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
<span class="thanks">Thank you for trying unRAID Server OS!</span>
<div markdown="1" class="remark">
Your *Trial* key includes all the functionality and device support of a *Pro* key.
After your *Trial* key has reached expiration, your server **still functions normally** until the next time you <code>Stop</code> the array.
At that point, you many either purchase a registration key, or request a *Trial* extension.
</div>
***Trial*** key expires on:
: <?=my_time($var['regTm2'])?>
Flash Vendor:
: <?=$var['flashVendor']?>
Flash Product:
: <?=$var['flashProduct']?>
Flash GUID:
: <?=$var['flashGUID']?>
<span class="device"><?=$attached_devices?></span>
: <input type="submit" value="Purchase Key"> <input type="button" value="Request Extension" disabled>
</form>
<?endif;?>
<?if (strstr($var['regTy'], "expired")):?>
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID'];?>">
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID']?>">
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
<span class="thanks">Thank you for trying unRAID Server OS!</span>
<div markdown="1" class="remark">
<span class='red-text'>Your *Trial* key has expired.</span>
To continue using unRAID Server OS you may purchase a registration key. Alternately, you may request a *Trial* extension key.
**Note:** most *Trial* extension requests are processed immediately but please allow up to one business day to receive your *Trial* extension key.
Most *Trial* extension requests are processed immediately but please allow up to one business day to receive your *Trial* extension key.
</div>
Flash GUID:
: <?=$var['flashGUID'];?>
Flash Vendor:
: <?=$var['flashVendor']?>
<span class="device">This system has <?=$device?> attached storage device<?=$plural?>.</span>
Flash Product:
: <?=$var['flashProduct']?>
Flash GUID:
: <?=$var['flashGUID']?>
<span class="device"><?=$attached_devices?></span>
: <input type="submit" value="Purchase Key"> <input type="button" value="Request Extension" onclick="openBox('/webGui/include/TrialRequest.php','Request Trial Extension Key',600,900);">
</form>
<?endif;?>
<?if ($var['regTy']=="Trial"):?>
<?if (strstr($var['regTy'], "invalid installation")):?>
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID'];?>">
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
<span class='thanks red'>Invalid <em>Trial</em> Installation</span>
<div markdown="1" class="remark">
It is not possible to use a *Trial* key with an existing unRAID OS configuration.
<span class="thanks">Thank you for trying unRAID Server OS!</span>
For more information, please <?=$contact_support?>.
</div>
***Trial*** key expires on:
: <?=my_time($var['regTm2']);?>&nbsp;
Flash Vendor:
: <?=$var['flashVendor']?>
Flash Product:
: <?=$var['flashProduct']?>
Flash GUID:
: <?=$var['flashGUID'];?>
: <?=$var['flashGUID']?>
<span class="device">This system has <?=$device?> attached storage device<?=$plural?>.</span>
: <input type="submit" value="Purchase Key">
</form>
<?endif;?>
<?if ($var['regTy']=="Basic"):?>
<span class="thanks">Thank you for choosing unRAID Server OS!</span>
Registered GUID:
: <?=$var['regGUID'];?>
Registered to:
: <span class="big"><?=htmlspecialchars($var['regTo'])?></span>
@@ -229,70 +156,233 @@ Registered to:
Registered on:
: <?=my_time($var['regTm']);?>
Replaceable:
: <?=my_time2($var['regTm2']);?>
Expiration:
: <?=my_time($var['regTm2']);?>
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
<input type="hidden" name="BasicGUID" value="<?=$var['flashGUID'];?>">
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
Flash GUID:
: <?=$var['flashGUID'];?>
<span class="device">This system has <?=$device?> attached storage device<?=$plural?>.</span>
: <input type="submit" value="Upgrade">
<span class="device"><?=$attached_devices?></span>
: <input type="submit" value="Purchase Key">
</form>
<?endif;?>
<?if ($var['regTy']=="Basic"):?>
<span class="thanks">Thank you for choosing unRAID Server OS!</span>
<div markdown="1" class="remark">
To support more storage devices as your server grows, click Upgrade Key below.
</div>
Registered to:
: <span class="big"><?=htmlspecialchars($var['regTo'])?></span>
Registered on:
: <?=my_time($var['regTm'])?>
Replaceable:
: <?=my_time2($var['regTm2'])?>
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
<input type="hidden" name="BasicGUID" value="<?=$var['flashGUID']?>">
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
Flash GUID:
: <?=$var['flashGUID']?>
<span class="device"><?=$attached_devices?></span>
: <input type="submit" value="Upgrade Key">
</form>
<?endif;?>
<?if ($var['regTy']=="Plus"):?>
<span class="thanks">Thank you for choosing unRAID Server OS!</span>
<div markdown="1" class="remark">
To support more storage devices as your server grows, click Upgrade Key below.
</div>
Registered to:
: <span class="big"><?=htmlspecialchars($var['regTo'])?></span>
Registered on:
: <?=my_time($var['regTm']);?>&nbsp;
: <?=my_time($var['regTm'])?>
Replaceable:
: <?=my_time2($var['regTm2']);?>
: <?=my_time2($var['regTm2'])?>
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
<input type="hidden" name="PlusGUID" value="<?=$var['flashGUID'];?>">
<input type="hidden" name="PlusGUID" value="<?=$var['flashGUID']?>">
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
Flash GUID:
: <?=$var['flashGUID'];?>
: <?=$var['flashGUID']?>
<span class="device">This system has <?=$device?> attached storage device<?=$plural?>.</span>
: <input type="submit" value="Upgrade">
<span class="device"><?=$attached_devices?></span>
: <input type="submit" value="Upgrade Key">
</form>
<?endif;?>
<?if ($var['regTy']=="Pro"):?>
<?if ($var['regTy']=="Pro"):?>
<span class="thanks">Thank you for choosing unRAID Server OS!</span>
Registered to:
: <span class="big"><?=htmlspecialchars($var['regTo'])?></span>
Registered on:
: <?=my_time($var['regTm']);?>&nbsp;
: <?=my_time($var['regTm'])?>
Replaceable:
: <?=my_time2($var['regTm2']);?>
: <?=my_time2($var['regTm2'])?>
Flash GUID:
: <?=$var['flashGUID'];?>
: <?=$var['flashGUID']?>
<span class="device">This system has <?=$device?> attached storage device<?=$plural?>.</span>
: <input type="button" value="Done" onclick="done()">
<span class="device"><?=$attached_devices?></span>
: <button type="button" onclick="done()">Done</button>
<?endif;?>
<?if (strstr($var['regTy'], "missing")):?>
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID']?>">
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
<span class='thanks red'>Missing Key File</span>
<div markdown="1" class="remark">
It appears that your registration key file is corrupted or missing. The key file should be located in the
[config](Registration/Browse?dir=/boot/config) directory
on your USB Flash boot device.
If you do not have a backup copy of your key file, <?=$contact_support?>.
If this was a <em>Trial</em> installation, you may purchase a key.
</div>
Flash Vendor:
: <?=$var['flashVendor']?>
Flash Product:
: <?=$var['flashProduct']?>
Flash GUID:
: <?=$var['flashGUID']?>
<span class="device"><?=$attached_devices?></span>
: <input type="submit" value="Purchase Key">
</form>
<?endif;?>
<?if (strstr($var['regTy'], "invalid key")):?>
<form markdown="1" method="GET" action="https://lime-technology.com/getkey" target="_blank">
<input type="hidden" name="TrialGUID" value="<?=$var['flashGUID']?>">
<input type="hidden" name="deviceCount" value="<?=$var['deviceCount']?>">
<span class='thanks red'>The registered GUID does not match the USB Flash boot device GUID</span>
<div markdown="1" class="remark">
The registration key file does not correspond to the USB Flash boot device. Please copy the correct key file to the [config](Registration/Browse?dir=/boot/config) directory
on your USB Flash boot device.
If you do not have a backup copy of your key file, <?=$contact_support?>.
</div>
<?if (!strstr($var['regTy'], "Trial")):?>
<div markdown="1" class="remark">
If you want to replace your registration key with a new key bound to this USB Flash device, click Replace Key below. An original key may be
replaced anytime. Thereafter, a replacement key may be replaced again after one year has passed. If you require
another replacement key sooner, <?=$contact_support?>.
**Note:** Replacing a registration key results in permanently *blacklisting* the previous USB Flash GUID.
</div>
<?endif;?>
Flash Vendor:
: <?=$var['flashVendor']?>
Flash Product:
: <?=$var['flashProduct']?>
Flash GUID:
: <?=$var['flashGUID']?>
Registered GUID:
: <?=$var['regGUID']?>
Registered to:
: <span class="big"><?=htmlspecialchars($var['regTo'])?></span>
Registered on:
: <?=my_time($var['regTm'])?>
<?if (strstr($var['regTy'], "Trial")):?>
Expiration:
: <?=my_time($var['regTm2'])?>
<span class="device"><?=$attached_devices?></span>
: <input type="submit" value="Purchase Key">
<?else:?>
&nbsp;
: <input type="button" value="Done" onclick="done()">
Replaceable:
: <?=my_time2($var['regTm2'])?>
<?if ($var['regTm2']==0 || $var['regTm2']<time()):?>
<span class="device"><?=$attached_devices?></span>
: <input type="submit" value="Purchase Key"> <input type="button" value="Replace Key" onclick="openBox('/webGui/include/ReplaceKey.php','Replace Key',600,900);">
<?else:?>
<span class="device"><?=$attached_devices?></span>
: <input type="submit" value="Purchase Key"> <input type="button" value="Replace Key" disabled>
<?endif;?>
<?endif;?>
</form>
<?endif;?>
<?if (strstr($var['regTy'], "blacklisted")):?>
<span class='thanks red'>Blacklisted USB Flash GUID</span>
<div markdown="1" class="remark">
This USB Flash boot device has been *blacklisted*. This can occur as a result of transfering your key to
a replacement USB Flash device, and you are currently booted from your old USB Flash device.
A USB Flash device may also be *blacklisted* if there is no serial number, or if we discover the serial number
is not unique (this is common with USB card readers).
For more information, please <?=$contact_support?>.
</div>
Flash Vendor:
: <?=$var['flashVendor']?>
Flash Product:
: <?=$var['flashProduct']?>
Flash GUID:
: <?=$var['flashGUID']?>
<?endif;?>
<?if (strstr($var['regTy'], "flash device error")):?>
<span class='thanks red'>Error accessing your physical USB Flash boot device</span>
<div markdown="1" class="remark">
There is a physical problem acessing your USB Flash boot device. Please <?=$contact_support?>.
</div>
Flash GUID:
: Error code: <?=$var['regCheck']?>
<?endif;?>

View File

@@ -43,7 +43,7 @@ Shadowbox.init({skipSetup:true});
// server uptime
var uptime = <?=strtok(exec("cat /proc/uptime"),' ')?>;
var expiretime = <?=($var['regTy']=='Trial')?$var['regTm2']:0?>;
var expiretime = <?=$var['regTy']=='Trial'||strstr($var['regTy'],'expired')?$var['regTm2']:0?>;
var before = new Date();
// Page refresh timer
@@ -79,12 +79,13 @@ function updateTime() {
if (expiretime > 0) {
var remainingtime = expiretime - now.getTime()/1000;
if (remainingtime <= 0) {
$('#licenseexpire').html(' - Expired').addClass('warning');
$('#licenseexpire').html('<em> (click here for details)</em>');
$('#licensetype').addClass('warning')
} else {
days = parseInt(remainingtime/86400);
hour = parseInt(remainingtime/3600%24);
mins = parseInt(remainingtime/60%60);
$('#licenseexpire').html(' - '+((days|hour|mins)?(days?plus(days,'day',true):(hour?plus(hour,'hour',true):plus(mins,'minute',true))):'less than a minute')+' remaining');
$('#licenseexpire').html(' - '+((days|hour|mins)?(days?plus(days,'day',true):(hour?plus(hour,'hour',true):plus(mins,'minute',true))):'less than a minute')+' remaining (click here for details)');
}
}
setTimeout(updateTime,1000);
@@ -286,7 +287,7 @@ $(document).ajaxSend(function(elm, xhr, s){
<div id="header" class="<?=$display['banner']?>">
<div class="logo">
<a href="#" onclick="openBox('/webGui/include/Feedback.php','Feedback',450,450,false);return false;"><img src="/webGui/images/limetech-logo-<?=$display['theme']?>.png" title="Feedback" border="0"/></a><br/>
<a href="/Tools/Registration"><strong>unRAID Server <em><?=$var['regTy']?></em><span id="licenseexpire"></span></strong></a>
<a href="/Tools/Registration"><span id="licensetype"><strong>unRAID Server <em><?=$var['regTy']?></em><span id="licenseexpire"></span></strong></span></a>
</div>
<div class="block">
<span class="text-left">Server<br/>Description<br/>Version<br/>Uptime</span>
@@ -404,6 +405,7 @@ $(function() {
form.find('input[value="Apply"],input[name="cmdEditShare"],input[name="cmdUserEdit"]').removeAttr('disabled');
form.find('input[value="Done"]').val('Reset').prop('onclick',null).click(function(){refresh(form.offset().top)});
});});
var top = ($.cookie('top')||0) - $('.tabs').offset().top - 75;
if (top>0) {$('html,body').scrollTop(top);}
$.removeCookie('top',{path:'/'});
@@ -476,4 +478,4 @@ $(function() {
});
</script>
</body>
</html>
</html>