mirror of
https://github.com/unraid/api.git
synced 2026-01-15 13:10:01 -06:00
fix(plg): store and send email to reg wizard
This commit is contained in:
@@ -817,7 +817,7 @@ response_complete($httpcode, '{}');
|
||||
function showRegWizard() {
|
||||
<? $license_state = strtoupper(empty($var['regCheck']) ? $var['regTy'] : $var['regCheck']); ?>
|
||||
Shadowbox.open({
|
||||
content:'https://dev.d1eohvtyc6gnee.amplifyapp.com/?ts=<?=time()?>&guid=<?=$var['flashGUID']?>&state=<?=$license_state?>&keyfile=<?=str_replace(['+','/','='], ['-','_',''], trim(base64_encode(@file_get_contents($var['regFILE']))))?>®gen=<?=$var['regGen']?>&flashproduct=<?=$var['flashProduct']?>&flashvendor=<?=$var['flashVendor']?>®istered=<?=empty($remote['apikey'])||empty($var['regFILE'])?0:1?>&servername=<?=$var['NAME']?>&serverip=<?=$_SERVER['SERVER_ADDR']?>&internalport=<?=$_SERVER['SERVER_PORT']?>&protocol=<?=$_SERVER['REQUEST_SCHEME']?>&site='+location.origin,
|
||||
content:'https://dev.d1eohvtyc6gnee.amplifyapp.com/?ts=<?=time()?>&guid=<?=$var['flashGUID']?>&state=<?=$license_state?>&keyfile=<?=str_replace(['+','/','='], ['-','_',''], trim(base64_encode(@file_get_contents($var['regFILE']))))?>®gen=<?=$var['regGen']?>&flashproduct=<?=$var['flashProduct']?>&flashvendor=<?=$var['flashVendor']?>®istered=<?=empty($remote['apikey'])||empty($var['regFILE'])?0:1?>&servername=<?=$var['NAME']?>&serverip=<?=$_SERVER['SERVER_ADDR']?>&internalport=<?=$_SERVER['SERVER_PORT']?>&protocol=<?=$_SERVER['REQUEST_SCHEME']?>&site='+location.origin+'&email=<?=$remote['email']?>',
|
||||
player: 'iframe',
|
||||
options: {modal: true, animate: false, displayNav: false, overlayOpacity: 0.8, viewportPadding: 0, showMovieControls: false}
|
||||
});
|
||||
@@ -844,7 +844,11 @@ function handleMessage(e) {
|
||||
break;
|
||||
case "REG_WIZARD":
|
||||
if (data.apikey) {
|
||||
$.post('/update.php', {'#file': 'dynamix/dynamix.cfg', '#section': 'remote', apikey: data.apikey}, function() {
|
||||
var postargs = {'#file': 'dynamix/dynamix.cfg', '#section': 'remote', apikey: data.apikey};
|
||||
if (data.email) {
|
||||
postargs['email'] = data.email;
|
||||
}
|
||||
$.post('/update.php', postargs, function() {
|
||||
console.log('dynamix/dynamix.cfg: Updated apikey under [remote] section');
|
||||
}).fail(function() {
|
||||
console.error('Failed to update apikey under [remote] section');
|
||||
|
||||
Reference in New Issue
Block a user