Merge pull request #688 from bergware/mutli-language

Multi-language support
This commit is contained in:
tom mortensen
2020-05-17 17:27:32 -07:00
committed by GitHub
27 changed files with 93 additions and 48 deletions

View File

@@ -945,7 +945,7 @@ it may cause an avalance of notifcations if inappropriate SMART attributes are c
This section is used to set the global settings for all disks. It is possible to adjust settings for individual disks.
:end
:docker_repostiroties_help:
:docker_repositories_help:
Use this field to add template repositories.
Docker templates are used to facilitate the creation and re-creation of Docker containers. Please setup one per line.

View File

@@ -17,9 +17,10 @@ $_SERVER['REQUEST_URI'] = 'docker';
require_once "$docroot/webGui/include/Translations.php";
require_once "$docroot/webGui/include/Helpers.php";
extract(parse_plugin_cfg('dynamix',true));
?>
<!DOCTYPE html>
<html lang="en">
<html <?=$display['rtl']?>lang="<?=strtok($locale,'_')?:'en'?>">
<head>
<title><?=_('Container Size')?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -16,6 +16,9 @@ $docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
libxml_use_internal_errors(false); # Enable xml errors
require_once "$docroot/webGui/include/Helpers.php";
extract(parse_plugin_cfg('dynamix',true));
$var = parse_ini_file('state/var.ini');
ignore_user_abort(true);
@@ -906,6 +909,13 @@ _(Privileged)_:
# ╚════╝ ╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝
?>
<div markdown="1" id="templatePopupConfig" style="display:none">
<html <?=$display['rtl']?>lang="<?=strtok($locale,'_')?:'en'?>">
<head>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<meta name="referrer" content="same-origin">
</head>
<body>
_(Config Type)_:
: <select name="Type" onchange="toggleMode(this,false)">
<option value="Path">_(Path)_</option>
@@ -959,9 +969,18 @@ _(Password Mask)_:
<option value="true">_(Yes)_</option>
</select>
</div>
</body>
</html>
</div>
<div markdown="1" id="templateDisplayConfig" style="display:none">
<html <?=$display['rtl']?>lang="<?=strtok($locale,'_')?:'en'?>">
<head>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<meta name="referrer" content="same-origin">
</head>
<body>
<input type="hidden" name="confName[]" value="{0}">
<input type="hidden" name="confTarget[]" value="{1}">
<input type="hidden" name="confDefault[]" value="{2}">
@@ -973,6 +992,8 @@ _(Password Mask)_:
<input type="hidden" name="confMask[]" value="{8}">
{0}:
: <span class="boxed"><input type="text" name="confValue[]" default="{2}" value="{9}" autocomplete="off" {11}>{10}<br><span class="orange-text">{4}</span></span>
</body>
</html>
</div>
<div markdown="1" id="templateAllocations" style="display:none">

View File

@@ -133,7 +133,7 @@ foreach ($containers as $ct) {
echo "<td class='advanced'><span class='cpu-$id'>0%</span><div class='usage-disk mm'><span id='cpu-$id' style='width:0'></span><span></span></div>";
echo "<br><span class='mem-$id'>0 / 0</span></td>";
echo "<td><input type='checkbox' id='$id-auto' class='autostart' container='".htmlspecialchars($name)."'".($info['autostart'] ? ' checked':'').">";
echo "<span id='$id-wait' style='float:right;display:none'>"._('wait')."<input class='wait' container='".htmlspecialchars($name)."' type='number' value='$wait' placeholder='0' title='"._('seconds')."'></span></td>";
echo "<span id='$id-wait' style='float:right;display:none'>"._('wait')."<input class='wait' container='".htmlspecialchars($name)."' type='number' value='$wait' placeholder='0' title=\""._('seconds')."\"></span></td>";
echo "<td><a class='log' onclick=\"containerLogs('".addslashes(htmlspecialchars($name))."','$id',false,false)\"><img class='basic' src='/plugins/dynamix/icons/log.png'><div class='advanced'>";
echo htmlspecialchars(str_replace('Up',_('Uptime'),my_lang_log($ct['Status'])))."</div><div class='advanced' style='margin-top:4px'>"._('Created')." ".htmlspecialchars(my_lang($ct['Created']))."</div></a></td></tr>";
}

View File

@@ -18,9 +18,10 @@ require_once "$docroot/webGui/include/Translations.php";
require_once "$docroot/webGui/include/Markdown.php";
require_once "$docroot/webGui/include/Helpers.php";
extract(parse_plugin_cfg('dynamix',true));
?>
<!DOCTYPE HTML>
<html lang="en">
<html <?=$display['rtl']?>lang="<?=strtok($locale,'_')?:'en'?>">
<head>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">

View File

@@ -138,7 +138,7 @@ foreach (glob($plugins,GLOB_NOSORT) as $plugin_link) {
if ($changes !== false) {
$txtfile = "/tmp/plugins/".basename($plugin_file,'.plg').".txt";
file_put_contents($txtfile,$changes);
$version .= "&nbsp;<a href='#' title='"._('View Release Notes')."' onclick=\"openBox('/plugins/dynamix.plugin.manager/include/ShowChanges.php?file=".urlencode($txtfile)."','"._('Release Notes')."',600,900); return false\"><span class='fa fa-info-circle fa-fw big blue-text'></span></a>";
$version .= "&nbsp;<a href='#' title=\""._('View Release Notes')."\" onclick=\"openBox('/plugins/dynamix.plugin.manager/include/ShowChanges.php?file=".urlencode($txtfile)."',\""._('Release Notes')."\",600,900); return false\"><span class='fa fa-info-circle fa-fw big blue-text'></span></a>";
}
//write plugin information
$empty = false;

View File

@@ -114,7 +114,7 @@ foreach ($vms as $vm) {
echo "<td>$mem</td>";
echo "<td title='$diskdesc'>$disks</td>";
echo "<td>$graphics</td>";
echo "<td><input class='autostart' type='checkbox' name='auto_{$vm}' title='"._('Toggle VM auostart')."' uuid='$uuid' $auto></td></tr>";
echo "<td><input class='autostart' type='checkbox' name='auto_{$vm}' title=\""._('Toggle VM auostart')."\" uuid='$uuid' $auto></td></tr>";
/* Disk device information */
echo "<tr child-id='$i' id='name-$i".(in_array('name-'.$i++,$show) ? "'>" : "' style='display:none'>");

View File

@@ -46,7 +46,7 @@ if (!empty($_GET['uuid'])) {
$res = $lv->domain_get_domain_by_uuid($_GET['uuid']);
if ($res === false) {
echo "<p class='notice'>"._('Invalid VM to edit').".</p><input type='button' value='"._('Done')."' onclick='done()'>";
echo "<p class='notice'>"._('Invalid VM to edit').".</p><input type='button' value=\""._('Done')."\" onclick='done()'>";
return;
}

View File

@@ -43,7 +43,7 @@ function check_encryption() {
echo mk_option(1,'text',_('Passphrase'));
echo mk_option(1,'file',_('Keyfile'));
echo "</select></td></tr>";
echo "<tr id='text'><td></td><td class='gap'>"._('Passphrase').":</td><td><input type='password' name='text' maxlength='512' value='' onkeyup='selectInput(this.form)' placeholder='"._('use printable characters only')."'><input name='showPass' type='checkbox' onchange='selectInput(this.form)'>"._('show passphrase')."</td></tr>";
echo "<tr id='text'><td></td><td class='gap'>"._('Passphrase').":</td><td><input type='password' name='text' maxlength='512' value='' onkeyup='selectInput(this.form)' placeholder=\""._('use printable characters only')."\"><input name='showPass' type='checkbox' onchange='selectInput(this.form)'>"._('show passphrase')."</td></tr>";
echo "<tr id='copy'><td></td><td class='gap'>"._('Retype passphrase').":</td><td><input type='password' name='copy' maxlength='512' value='' onkeyup='selectInput(this.form)'></td></tr>";
echo "<tr id='file'><td></td><td class='gap'>"._('Keyfile').":</td><td><input type='file' name='local' onchange='getFileContent(event,this.form)'></td></tr>";
}
@@ -79,7 +79,7 @@ span#pass{display:none;margin-left:20px}
</style>
<script src="<?autov('/webGui/javascript/jquery.base64.js')?>"></script>
<script>
var ctrl = '<span class="status <?=$tabbed?'':'vhshift'?>"><a style="cursor:pointer" class="tooltip_diskio" title="_(Toggle reads/writes display)_" onclick="toggle_diskio();return false"><i class="toggle fa"></i></a></span>';
var ctrl = '<span class="status <?=$tabbed?"":"vhshift"?>"><a style="cursor:pointer" class="tooltip_diskio" title="_(Toggle reads/writes display)_" onclick="toggle_diskio();return false"><i class="toggle fa"></i></a></span>';
function selectInput(form) {
<?if ($wrong && $keyfile):?>
@@ -152,7 +152,7 @@ function prepareInput(form) {
form.file.disabled = false;
form.text.disabled = false;
form.copy.disabled = false;
swal({title:"_(Printable Characters Only)_",text:"_(Use <b>ASCII</b> characters from space " " to tilde "~")_<br>_(Otherwise use the <b>keyfile</b> method for UTF8 input)_",html:true,type:'error',confirmButtonText:"_(Ok)_"});
swal({title:"_(Printable Characters Only)_",text:"_(Use <b>ASCII</b> characters from space ' ' to tilde '~')_<br>_(Otherwise use the <b>keyfile</b> method for UTF8 input)_",html:true,type:'error',confirmButtonText:"_(Ok)_"});
}
return;
}

View File

@@ -115,6 +115,13 @@ pool_status();
<div id="dialogAddPool" style="display:none"></div>
<div id="templatePopupPool" style="display:none">
<html <?=$display['rtl']?>lang="<?=strtok($locale,'_')?:'en'?>">
<head>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
<meta name="referrer" content="same-origin">
</head>
<body>
<form markdown="1" method="POST" action="/update.htm" target="progressFrame" onsubmit="return validate(this.poolName.value)">
<input type="hidden" name="changeSlots" value="apply">
_(Name)_:
@@ -128,6 +135,8 @@ _(Slots)_:
</select>
</form>
</body>
</html>
</div>
<?endif;?>

View File

@@ -60,10 +60,13 @@ function presetRefresh(form) {
function presetPassive(index) {
if (index==0) $('#passive').hide(); else $('#passive').show();
}
function saveFontSize() {
$.cookie('fontSize',$('#font option:selected').val(),{path:'/',expires:3650});
}
function updateDirection(lang) {
var rtl = ['ar_AR','fa_FA'].includes(lang) ? "dir='rtl' " : "";
$('input[name="rtl"]').val(rtl);
}
$(function() {
var dropbox = $('#dropbox');
@@ -125,8 +128,9 @@ $(function() {
<form markdown="1" name="display_settings" method="POST" action="/update.php" target="progressFrame" onsubmit="saveFontSize();upload();">
<input type="hidden" name="#file" value="dynamix/dynamix.cfg">
<input type="hidden" name="#section" value="display">
<input type="hidden" name="rtl" value="<?=$display['rtl']?>">
_(Language)_:
: <select name="locale">
: <select name="locale" onchange="updateDirection(this.value)">
<?echo mk_option($display['locale'], "","English");
foreach (glob("$plugins/lang-*.xml",GLOB_NOSORT) as $xml_file) {
$lang = language('Language', $xml_file);

View File

@@ -35,7 +35,7 @@ if ($name == "") {
$share = $shares[$name];
} else {
/* handle share deleted case */
echo "<p class='notice'>"._('Share')." '".htmlspecialchars($name)."' "._('has been deleted').".</p><input type='button' value='"._('Done')."' onclick='done()'>";
echo "<p class='notice'>"._('Share')." '".htmlspecialchars($name)."' "._('has been deleted').".</p><input type='button' value=\""._('Done')."\" onclick='done()'>";
return;
}

View File

@@ -26,6 +26,7 @@ max="55"
theme="white"
locale=""
raw=""
rtl=""
[parity]
mode="0"
hour="0 0"

View File

@@ -17,11 +17,12 @@ $_SERVER['REQUEST_URI'] = '';
require_once "$docroot/webGui/include/Translations.php";
require_once "$docroot/webGui/include/Helpers.php";
extract(parse_plugin_cfg('dynamix',true));
$var = parse_ini_file("/var/local/emhttp/var.ini");
?>
<!DOCTYPE HTML>
<html lang="en">
<html <?=$display['rtl']?>lang="<?=strtok($locale,'_')?:'en'?>">
<head>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">

View File

@@ -13,14 +13,15 @@
<?
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/webGui/include/Helpers.php";
extract(parse_plugin_cfg('dynamix',true));
list($luks,$size,$hash,$rng) = explode(',',exec("/usr/sbin/cryptsetup --help|tail -1"));
[$luks,$size,$hash,$rng] = explode(',',exec("/usr/sbin/cryptsetup --help|tail -1"));
$luks = str_replace('-plain64','',trim(explode(':',$luks)[1]));
$size = str_replace(' bits','',trim(explode(':',$size)[1]));
$hash = trim(explode(':',$hash)[1]);
?>
<!DOCTYPE html>
<html lang="en">
<html <?=$display['rtl']?>lang="<?=strtok($locale,'_')?:'en'?>">
<head>
<title>Benchmark</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -19,7 +19,7 @@ $themes1 = in_array($theme,['black','white']);
$themes2 = in_array($theme,['gray','azure']);
?>
<!DOCTYPE html>
<html lang="en">
<html <?=$display['rtl']?>lang="<?=strtok($locale,'_')?:'en'?>">
<head>
<title><?=$var['NAME']?>/<?=$myPage['name']?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -72,7 +72,7 @@ if ($themes2) {
}
$notes = '/var/tmp/unRAIDServer.txt';
if (!file_exists($notes)) file_put_contents($notes,shell_exec("$docroot/plugins/dynamix.plugin.manager/scripts/plugin changes $docroot/plugins/unRAIDServer/unRAIDServer.plg"));
$notes = "&nbsp;<a href='#' title='"._('View Release Notes')."' onclick=\"openBox('/plugins/dynamix.plugin.manager/include/ShowChanges.php?tmp=1&file=$notes','"._('Release Notes')."',600,900);return false\"><span class='fa fa-info-circle fa-fw'></span></a>"
$notes = "&nbsp;<a href='#' title=\""._('View Release Notes')."\" onclick=\"openBox('/plugins/dynamix.plugin.manager/include/ShowChanges.php?tmp=1&file=$notes',\""._('Release Notes')."\",600,900);return false\"><span class='fa fa-info-circle fa-fw'></span></a>"
?>
</style>
@@ -170,7 +170,7 @@ function done(key) {
location.replace(path);
}
function chkDelete(form, button) {
button.value = form.confirmDelete.checked ? '<?=_('Delete')?>' : '<?=_('Apply')?>';
button.value = form.confirmDelete.checked ? "<?=_('Delete')?>" : "<?=_('Apply')?>";
button.disabled = false;
}
function openBox(cmd,title,height,width,load,func,id) {
@@ -295,8 +295,8 @@ function hideUpgrade(set) {
}
function openUpgrade() {
hideUpgrade();
swal({title:'<?=_("Update")?> Unraid OS',text:'<?=_("Do you want to update to the new version")?>?',type:'warning',showCancelButton:true,confirmButtonText:'<?=_("Proceed")?>',cancelButtonText:'<?=_("Cancel")?>'},function(){
openBox('/plugins/dynamix.plugin.manager/scripts/plugin&arg1=update&arg2=unRAIDServer.plg','<?=_("Update")?> Unraid OS',600,900,true);
swal({title:"<?=_('Update')?> Unraid OS",text:"<?=_('Do you want to update to the new version')?>?",type:'warning',showCancelButton:true,confirmButtonText:"<?=_('Proceed')?>",cancelButtonText:"<?=_('Cancel')?>"},function(){
openBox("/plugins/dynamix.plugin.manager/scripts/plugin&arg1=update&arg2=unRAIDServer.plg","<?=_('Update')?> Unraid OS",600,900,true);
});
}
function notifier() {
@@ -446,7 +446,7 @@ foreach ($buttons as $button) {
if (substr($icon,0,3)!='fa-') $icon = "fa-$icon";
$icon = "<i class='fa $icon system'></i>";
}
$title = $themes2 ? "" : " title='"._($button['Title'])."'";
$title = $themes2 ? "" : " title=\""._($button['Title'])."\"";
echo "<div id='nav-item' class='{$button['name']} util'><a href='".($button['Href'] ?? '#')."' onclick='{$button['name']}();return false;'{$title}>$icon<span>"._($button['Title'])."</span></a></div>";
} else
echo "<div id='{$button['Link']}'></div>";
@@ -535,7 +535,7 @@ default:
}
echo "</span></span><span id='countdown'></span><span id='user-notice' class='red-text'></span>";
echo "<span id='copyright'>Unraid&reg; webGui &copy;2020, Lime Technology, Inc.";
echo " <a href='http://lime-technology.com/wiki/index.php/Official_Documentation' target='_blank' title='"._('Online manual')."'><i class='fa fa-book'></i> "._('manual')."</a>";
echo " <a href='http://lime-technology.com/wiki/index.php/Official_Documentation' target='_blank' title=\""._('Online manual')."\"><i class='fa fa-book'></i> "._('manual')."</a>";
echo "</span></div>";
?>
<script>
@@ -636,14 +636,14 @@ $(function() {
$('form').find('select,input[type=text],input[type=number],input[type=password],input[type=checkbox],input[type=radio],input[type=file],textarea').each(function(){$(this).on('input change',function() {
var form = $(this).parentsUntil('form').parent();
form.find('input[value="<?=_("Apply")?>"],input[value="Apply"],input[name="cmdEditShare"],input[name="cmdUserEdit"]').not('input.lock').prop('disabled',false);
form.find('input[value="<?=_("Done")?>"],input[value="Done"]').not('input.lock').val('<?=_("Reset")?>').prop('onclick',null).off('click').click(function(){refresh(form.offset().top)});
form.find('input[value="<?=_("Done")?>"],input[value="Done"]').not('input.lock').val("<?=_('Reset')?>").prop('onclick',null).off('click').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:'/'});
<?if ($safemode):?>
showNotice('<?=_("System running in")?> <b><?=("safe mode")?></b>');
showNotice("<?=_('System running in')?> <b><?=('safe mode')?></b>");
<?else:?>
<?$readme = @file_get_contents("$docroot/plugins/unRAIDServer/README.md",false,null,0,20);?>
<?if (strpos($readme,'REBOOT REQUIRED')!==false):?>
@@ -654,35 +654,35 @@ $(function() {
showUpgrade("Unraid OS v<?=$version?> <?=_('is available')?>. <a><?=_('Update Now')?></a>");
<?endif;?>
<?if (!$notify['system']):?>
addBannerWarning('<?=_("System notifications are")?> <b><?=_("disabled")?></b>. <?=_("Click")?> <a href="/Settings/Notifications" style="cursor:pointer"><?=_("here")?></a> <?=_("to change notification settings")?>.',true,true);
addBannerWarning("<?=_('System notifications are')?> <b><?=_('disabled')?></b>. <?=_('Click')?> <a href='/Settings/Notifications' style='cursor:pointer'><?=_('here')?></a> <?=_('to change notification settings')?>.",true,true);
<?endif;?>
<?endif;?>
<?if ($notify['display']):?>
var opts = [];
context.init({preventDoubleContext:false,left:true,above:false});
opts.push({text:'<?=_("View")?>',icon:'fa-folder-open-o',action:function(e){e.preventDefault();openNotifier('alert');}});
opts.push({text:"<?=_('View')?>",icon:'fa-folder-open-o',action:function(e){e.preventDefault();openNotifier('alert');}});
opts.push({divider:true});
opts.push({text:'<?=_("History")?>',icon:'fa-file-text-o',action:function(e){e.preventDefault();viewHistory('alert');}});
opts.push({text:"<?=_('History')?>",icon:'fa-file-text-o',action:function(e){e.preventDefault();viewHistory('alert');}});
opts.push({divider:true});
opts.push({text:'<?=_("Acknowledge")?>',icon:'fa-check-square-o',action:function(e){e.preventDefault();closeNotifier('alert');}});
opts.push({text:"<?=_('Acknowledge')?>",icon:'fa-check-square-o',action:function(e){e.preventDefault();closeNotifier('alert');}});
context.attach('#nav-tub1',opts);
var opts = [];
context.init({preventDoubleContext:false,left:true,above:false});
opts.push({text:'<?=_("View")?>',icon:'fa-folder-open-o',action:function(e){e.preventDefault();openNotifier('warning');}});
opts.push({text:"<?=_('View')?>",icon:'fa-folder-open-o',action:function(e){e.preventDefault();openNotifier('warning');}});
opts.push({divider:true});
opts.push({text:'<?=_("History")?>',icon:'fa-file-text-o',action:function(e){e.preventDefault();viewHistory('warning');}});
opts.push({text:"<?=_('History')?>",icon:'fa-file-text-o',action:function(e){e.preventDefault();viewHistory('warning');}});
opts.push({divider:true});
opts.push({text:'<?=_("Acknowledge")?>',icon:'fa-check-square-o',action:function(e){e.preventDefault();closeNotifier('warning');}});
opts.push({text:"<?=_('Acknowledge')?>",icon:'fa-check-square-o',action:function(e){e.preventDefault();closeNotifier('warning');}});
context.attach('#nav-tub2',opts);
var opts = [];
context.init({preventDoubleContext:false,left:true,above:false});
opts.push({text:'<?=_("View")?>',icon:'fa-folder-open-o',action:function(e){e.preventDefault();openNotifier('normal');}});
opts.push({text:"<?=_('View')?>",icon:'fa-folder-open-o',action:function(e){e.preventDefault();openNotifier('normal');}});
opts.push({divider:true});
opts.push({text:'<?=_("History")?>',icon:'fa-file-text-o',action:function(e){e.preventDefault();viewHistory('normal');}});
opts.push({text:"<?=_('History')?>",icon:'fa-file-text-o',action:function(e){e.preventDefault();viewHistory('normal');}});
opts.push({divider:true});
opts.push({text:'<?=_("Acknowledge")?>',icon:'fa-check-square-o',action:function(e){e.preventDefault();closeNotifier('normal');}});
opts.push({text:"<?=_('Acknowledge')?>",icon:'fa-check-square-o',action:function(e){e.preventDefault();closeNotifier('normal');}});
context.attach('#nav-tub3',opts);
<?endif;?>
if (location.pathname.search(/\/(AddVM|UpdateVM|AddContainer|UpdateContainer)/)==-1) {

View File

@@ -114,7 +114,7 @@ function device_desc(&$disk) {
default : $type = 'disk'; break;
}
$log = $var['fsState']=='Started'
? "<a class='info hand' onclick=\"openBox('/webGui/scripts/disk_log&arg1={$disk['device']}','"._('Disk Log Information')."',600,900,false);return false\"><i class='icon-$type icon'></i><span>"._('Disk Log Information')."</span></a>"
? "<a class='info hand' onclick=\"openBox('/webGui/scripts/disk_log&arg1={$disk['device']}',\""._('Disk Log Information')."\",600,900,false);return false\"><i class='icon-$type icon'></i><span>"._('Disk Log Information')."</span></a>"
: "<a class='nohand' style='color:grey'><i class='icon-$type icon'></i></a>";
return $log."<span style='font-family:bitstream'>".my_id($disk['id'])."</span> - $size $unit ({$disk['device']})";
}

View File

@@ -16,6 +16,7 @@ $_SERVER['REQUEST_URI'] = '';
require_once "$docroot/webGui/include/Translations.php";
require_once "$docroot/webGui/include/Helpers.php";
extract(parse_plugin_cfg('dynamix',true));
$var = parse_ini_file('state/var.ini');
$unraid = parse_ini_file('/etc/unraid-version');
@@ -31,7 +32,7 @@ if (array_key_exists('getdiagnostics', $_GET)) {
}
?>
<!DOCTYPE html>
<html lang="en">
<html <?=$display['rtl']?>lang="<?=strtok($locale,'_')?:'en'?>">
<head>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">

View File

@@ -41,7 +41,7 @@ foreach ($files as $file) {
$tag = ($c<4) ? "" : " data='".str_replace(['alert','warning','normal'],['0','1','2'],$text)."'";
echo (!$c++) ? "<tr>".str_replace('*',$text,$td_).date($dynamix['notify']['date'].' '.$dynamix['notify']['time'],$text)."$_td" : "<td$tag>"._($text)."</td>";
}
echo "<td><a href='#' onclick='$.post(\"/webGui/include/DeleteLogFile.php\",{log:\"$archive\"},function(){archiveList();});return false' title='"._('Delete notification')."'><i class='fa fa-trash-o'></i></a></td></tr>";
echo "<td><a href='#' onclick='$.post(\"/webGui/include/DeleteLogFile.php\",{log:\"$archive\"},function(){archiveList();});return false' title=\""._('Delete notification')."\"><i class='fa fa-trash-o'></i></a></td></tr>";
if ($extra) {
$text = explode('=',$field,2)[1];
echo "<tr class='tablesorter-childRow row$row'><td colspan='4'>$text</td><td></td></tr><tr class='tablesorter-childRow row$row'><td colspan='5'></td></tr>";

View File

@@ -17,6 +17,7 @@ $_SERVER['REQUEST_URI'] = 'main';
require_once "$docroot/webGui/include/Translations.php";
require_once "$docroot/webGui/include/Helpers.php";
extract(parse_plugin_cfg('dynamix',true));
$month = [' Jan '=>'-01-',' Feb '=>'-02-',' Mar '=>'-03-',' Apr '=>'-04-',' May '=>'-05-',' Jun '=>'-06-',' Jul '=>'-07-',' Aug '=>'-08-',' Sep '=>'-09-',' Oct '=>'-10-',' Nov '=>'-11-',' Dec '=>'-12-'];
@@ -34,7 +35,7 @@ function his_duration($time) {
}
?>
<!DOCTYPE html>
<html lang="en">
<html <?=$display['rtl']?>lang="<?=strtok($locale,'_')?:'en'?>">
<head>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">

View File

@@ -16,12 +16,13 @@ $_SERVER['REQUEST_URI'] = 'tools';
require_once "$docroot/webGui/include/Translations.php";
require_once "$docroot/webGui/include/Helpers.php";
extract(parse_plugin_cfg('dynamix',true));
$var = parse_ini_file('state/var.ini');
$keyfile = base64_encode(file_get_contents($var['regFILE']));
?>
<!DOCTYPE html>
<html lang="en">
<html <?=$display['rtl']?>lang="<?=strtok($locale,'_')?:'en'?>">
<head>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">

View File

@@ -17,6 +17,7 @@ $_SERVER['REQUEST_URI'] = 'dashboard';
require_once "$docroot/webGui/include/Translations.php";
require_once "$docroot/webGui/include/Helpers.php";
extract(parse_plugin_cfg('dynamix',true));
$boot = "/boot/config/plugins/dynamix";
$file = $_GET['file'] ?? $_POST['file'];
@@ -42,7 +43,7 @@ case 'file':
$casemodel = $exist ? file_get_contents("$boot/$file") : '';
?>
<!DOCTYPE html>
<html lang="en">
<html <?=$display['rtl']?>lang="<?=strtok($locale,'_')?:'en'?>">
<head>
<title><?=_('Select Case Model')?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

View File

@@ -101,7 +101,7 @@ foreach ($shares as $name => $share) {
echo "<td>$cache</td>";
echo "<td>".my_scale($ssz1[$name]['disk.total']*1024, $unit)." $unit</td>";
echo "<td>".my_scale($share['free']*1024, $unit)." $unit</td>";
echo "<td><a href='/$path/Browse?dir=/mnt/user/".urlencode($name)."'><img src='/webGui/images/explore.png' title='"._('Browse')." /mnt/user/".urlencode($name)."'></a></td>";
echo "<td><a href='/$path/Browse?dir=/mnt/user/".urlencode($name)."'><img src='/webGui/images/explore.png' title=\""._('Browse')." /mnt/user/".urlencode($name)."\"></a></td>";
echo "</tr>";
foreach ($ssz1[$name] as $diskname => $disksize) {
if ($diskname=='disk.total') continue;
@@ -122,7 +122,7 @@ foreach ($shares as $name => $share) {
echo "<td>$cache</td>";
echo "<td><a href='/update.htm?cmd=$cmd&csrf_token={$var['csrf_token']}' target='progressFrame' onclick=\"$.cookie('ssz','ssz',{path:'/'});$(this).text('"._('Please wait')."...')\">"._('Compute')."...</a></td>";
echo "<td>".my_scale($share['free']*1024, $unit)." $unit</td>";
echo "<td><a href='$path/Browse?dir=/mnt/user/".urlencode($name)."'><img src='/webGui/images/explore.png' title='"._('Browse')." /mnt/user/".urlencode($name)."'></a></td>";
echo "<td><a href='$path/Browse?dir=/mnt/user/".urlencode($name)."'><img src='/webGui/images/explore.png' title=\""._('Browse')." /mnt/user/".urlencode($name)."\"></a></td>";
echo "</tr>";
}
}

View File

@@ -175,7 +175,7 @@ case "stop":
case "update":
if (!exec("hdparm -C ".escapeshellarg("/dev/$port")."|grep -Pom1 'active|unknown'")) {
$cmd = $_POST['type']=='New' ? "cmd=/webGui/scripts/hd_parm&arg1=up&arg2=$name" : "cmdSpinup=$name";
echo "<a href='/update.htm?$cmd&csrf_token={$_POST['csrf']}' class='info' target='progressFrame'><input type='button' value='"._('Spin Up')."'></a><span class='big orange-text'>"._('Unavailable - disk must be spun up')."</span>";
echo "<a href='/update.htm?$cmd&csrf_token={$_POST['csrf']}' class='info' target='progressFrame'><input type='button' value=\""._('Spin Up')."\"></a><span class='big orange-text'>"._('Unavailable - disk must be spun up')."</span>";
break;
}
$progress = exec("smartctl -c $type ".escapeshellarg("/dev/$port")."|grep -Pom1 '\d+%'");

View File

@@ -18,6 +18,7 @@ $_SERVER['REQUEST_URI'] = '';
require_once "$docroot/webGui/include/Translations.php";
require_once "$docroot/webGui/include/Helpers.php";
extract(parse_plugin_cfg('dynamix',true));
$var = parse_ini_file('state/var.ini');
@@ -36,7 +37,7 @@ function dmidecode($key,$n,$all=true) {
}
?>
<!DOCTYPE html>
<html lang="en">
<html <?=$display['rtl']?>lang="<?=strtok($locale,'_')?:'en'?>">
<head>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">

View File

@@ -16,6 +16,7 @@ $_SERVER['REQUEST_URI'] = 'tools';
require_once "$docroot/webGui/include/Translations.php";
require_once "$docroot/webGui/include/Helpers.php";
extract(parse_plugin_cfg('dynamix',true));
$var = parse_ini_file('state/var.ini');
@@ -25,7 +26,7 @@ if (!empty($_POST['trial'])) {
}
?>
<!DOCTYPE html>
<html lang="en">
<html <?=$display['rtl']?>lang="<?=strtok($locale,'_')?:'en'?>">
<head>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
@@ -58,7 +59,7 @@ function startTrial() {
$.post('https://keys.lime-technology.com/account/trial',{timestamp:timestamp,guid:guid},function(data) {
$.post('/webGui/include/TrialRequest.php',{trial:data.trial,csrf_token:'<?=$var['csrf_token']?>'},function(data2) {
$('#spinner_image,#status_panel').fadeOut('fast');
parent.swal({title:"<?=_('Trial')?> <?=(strstr($var['regTy'], 'expired')?_('extended'):_('started'))?>",text:"<?=_('Thank you for registering USB Flash GUID')?> "+guid+".",type:'success',confirmButtonText:'<?=_("Ok")?>'},function(){parent.window.location='/Main';});
parent.swal({title:"<?=_('Trial')?> <?=(strstr($var['regTy'], 'expired')?_('extended'):_('started'))?>",text:"<?=_('Thank you for registering USB Flash GUID')?> "+guid+".",type:'success',confirmButtonText:"<?=_('Ok')?>"},function(){parent.window.location='/Main';});
});
}).fail(function(data) {
$('#trial_form').find('input').prop('disabled', false);

View File

@@ -42,6 +42,6 @@ if ($index < count($tests)) {
elseif (strpos($text,'LUKS1:')!==false) echo str_replace("\t"," ",$text);
}
pclose($bm);
echo "<div style='text-align:center;margin-top:12px'><input type='button' value='"._('Done')."' onclick='top.Shadowbox.close()'></div>";
echo "<div style='text-align:center;margin-top:12px'><input type='button' value=\""._('Done')."\" onclick='top.Shadowbox.close()'></div>";
}
?>