Retain custom case image across reboot.

This commit is contained in:
Tom Mortensen
2019-08-17 13:05:56 -07:00
parent e53074a8bc
commit 5bb4ebc7e7
3 changed files with 1 additions and 5 deletions
-4
View File
@@ -231,10 +231,6 @@ form[name=boot]{display:none}
<?if (substr($mycase,-4)!='.png'):?>
<i id='mycase' class='case-<?=$mycase?>'></i><br>
<?else:?>
<?
if ( ! is_link("/usr/local/emhttp/webGui/images/case-model.png") && is_file("/boot/config/plugins/dynamix/case-model.png") )
symlink("/boot/config/plugins/dynamix/case-model.png","/usr/local/emhttp/webGui/images/case-model.png");
?>
<img id='mycase' src='<?=autov("/webGui/images/$mycase")?>'><br>
<?endif;?>
<?else:?>
+1
View File
@@ -0,0 +1 @@
/boot/config/plugins/dynamix/case-model.png
-1
View File
@@ -33,7 +33,6 @@ case 'file':
$name = 'case-model.png';
file_put_contents("$boot/$file",$name);
file_put_contents("$boot/$name",base64_decode(str_replace('data:image/png;base64,','',$_POST['data'])));
symlink("$boot/$name","$docroot/webGui/images/$name");
exit;
}
$casemodel = $exist ? file_get_contents("$boot/$file") : '';