Skip to content

Commit

Permalink
修复:登录后自动导出 t.gz
Browse files Browse the repository at this point in the history
  • Loading branch information
taksssss committed Sep 3, 2024
1 parent 9e96974 commit cc6d534
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions epg/manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ function showChangePasswordForm() {
}

// 导入配置
if (!empty($_FILES['importFile']['tmp_name'])) {
elseif (!empty($_FILES['importFile']['tmp_name'])) {
$zip = new ZipArchive();
$importFile = $_FILES['importFile']['tmp_name'];
$message = "";
Expand All @@ -398,7 +398,7 @@ function showChangePasswordForm() {
}

// 导出配置
if ($_SERVER['REQUEST_METHOD'] === 'POST' && empty($_FILES['importFile']['tmp_name'])) {
elseif ($requestMethod === 'POST' && isset($_POST['action']) && empty($_FILES['importFile']['tmp_name'])) {
$zip = new ZipArchive();
$zipFileName = 't.gz';

Expand Down Expand Up @@ -633,6 +633,7 @@ function showChangePasswordForm() {
</select>
<form id="importForm" method="post" enctype="multipart/form-data" style="display: inline-block;">
<input type="file" name="importFile" id="importFile" style="display: none;" accept=".gz" onchange="document.getElementById('importForm').submit();">
<input type="hidden" name="action" id="formAction" value="">
<span id="import" onclick="document.getElementById('importFile').click()" style="color: blue; cursor: pointer; margin-right: 20px;">数据导入</span>
<span id="export" onclick="document.getElementById('importForm').submit()" style="color: blue; cursor: pointer;">数据导出</span>
</form>
Expand Down

0 comments on commit cc6d534

Please sign in to comment.