fix: can not edit disk when disktag is 'home'

pull/302/head
qkqpttgf 2021-04-20 19:11:38 +08:00 committed by GitHub
parent b545056787
commit 1da82abb95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 15 deletions

View File

@ -1221,7 +1221,7 @@ function EnvOpt($needUpdate = 0)
$html .= ' $html .= '
<a href="' . $preurl . '">' . getconstStr('Back') . '</a><br> <a href="' . $preurl . '">' . getconstStr('Back') . '</a><br>
'; ';
if (isset($_GET['frame'])&&$_GET['frame']=='platform') { if ($_GET['setup']==='platform') {
$frame .= ' $frame .= '
<table border=1 width=100%> <table border=1 width=100%>
<form name="common" action="" method="post">'; <form name="common" action="" method="post">';
@ -1274,8 +1274,8 @@ function EnvOpt($needUpdate = 0)
<tr><td><input type="submit" name="submit1" value="' . getconstStr('Setup') . '"></td><td></td></tr> <tr><td><input type="submit" name="submit1" value="' . getconstStr('Setup') . '"></td><td></td></tr>
</form> </form>
</table><br>'; </table><br>';
} elseif (isset($_GET['frame'])&&in_array($_GET['frame'], $disktags)) { } elseif (isset($_GET['disktag'])&&in_array($_GET['disktag'], $disktags)) {
$disktag = $_GET['frame']; $disktag = $_GET['disktag'];
$disk_tmp = null; $disk_tmp = null;
$diskok = driveisfine($disktag, $disk_tmp); $diskok = driveisfine($disktag, $disk_tmp);
$frame .= ' $frame .= '
@ -1382,7 +1382,7 @@ function EnvOpt($needUpdate = 0)
} }
</script>'; </script>';
} else { } else {
$_GET['frame'] = 'home'; //$_GET['disktag'] = '';
$Driver_arr = scandir(__DIR__ . $slash . 'disk'); $Driver_arr = scandir(__DIR__ . $slash . 'disk');
if (count($disktags)>1) { if (count($disktags)>1) {
$frame .= ' $frame .= '
@ -1686,20 +1686,22 @@ function EnvOpt($needUpdate = 0)
</style> </style>
<table border=0> <table border=0>
<tr class="tabs">'; <tr class="tabs">';
if ($_GET['frame']=='home') $html .= ' if ($_GET['disktag']=='') {
<td>' . getconstStr('Home') . '</td>'; if ($_GET['setup']==='platform') $html .= '
else $html .= ' <td><a href="?setup">' . getconstStr('Home') . '</a></td>
<td><a href="?setup&frame=home">' . getconstStr('Home') . '</a></td>'; <td>' . getconstStr('PlatformConfig') . '</td>';
if ($_GET['frame']=='platform') $html .= ' else $html .= '
<td>' . getconstStr('PlatformConfig') . '</td>'; <td>' . getconstStr('Home') . '</td>
else $html .= ' <td><a href="?setup=platform">' . getconstStr('PlatformConfig') . '</a></td>';
<td><a href="?setup&frame=platform">' . getconstStr('PlatformConfig') . '</a></td>'; } else $html .= '
<td><a href="?setup">' . getconstStr('Home') . '</a></td>
<td><a href="?setup=platform">' . getconstStr('PlatformConfig') . '</a></td>';
foreach ($disktags as $disktag) { foreach ($disktags as $disktag) {
if ($disktag!='') { if ($disktag!='') {
if ($_GET['frame']==$disktag) $html .= ' if ($_GET['disktag']==$disktag) $html .= '
<td>' . $disktag . '</td>'; <td>' . $disktag . '</td>';
else $html .= ' else $html .= '
<td><a href="?setup&frame=' . $disktag . '">' . $disktag . '</a></td>'; <td><a href="?setup&disktag=' . $disktag . '">' . $disktag . '</a></td>';
} }
} }
$html .= ' $html .= '