Skip to content

Commit

Permalink
update git action
Browse files Browse the repository at this point in the history
  • Loading branch information
linh0804 committed Jun 3, 2024
1 parent 75df6f7 commit 3fcd533
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 26 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ jobs:
- name: zip repo
run: zip -r file-manager.zip . -x ".git/*" ".github/*"

- name: zip full
run: |
wget https://getcomposer.org/download/latest-stable/composer.phar
php composer.phar install
zip -r file-manager-full.zip . -x ".git/*" ".github/*"
- name: bump tag
uses: anothrNick/github-tag-action@v1
env:
Expand All @@ -34,4 +41,6 @@ jobs:
with:
tag_name: ${{ env.VERSION }}
generate_release_notes: true
files: file-manager.zip
files: |
file-manager.zip
file-manager-full.zip
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,23 @@ Nếu có lỗi các bạn cứ báo trên repo này (phần `Issues`), hoặc l

Tạo một file php, dán code ở [file này](https://raw.githubusercontent.com/ngatngay/file-manager/main/install.txt) vào và chạy nó.

Bản nhẹ

```bash
curl -O https://raw.githubusercontent.com/ngatngay/file-manager/main/install.txt
php install.txt
```

Bản full (cài sẵn mấy công cụ như WebDAV)

```bash
mkdir file-manager
cd file-manager

wget https://github.com/ngatngay/file-manager/releases/latest/download/file-manager-full.zip
unzip file-manager-full.zip
```

## Hướng dẫn cài đặt

- Tải code về và giải nén vào 1 thư mục không phải thư mục gốc (`DOCUMENT_ROOT`)!
Expand Down
46 changes: 24 additions & 22 deletions run_command.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@

$title = 'Chạy lệnh hệ thống';

require_once 'header.php';
require 'header.php';

echo '<style>
input[type="text"] {
width: 100%;
}
pre {
padding: 6px;
border: 0.5px solid #cecece;
white-space: pre-wrap;
}
pre#output {
overflow-x: scroll;
white-space: pre;
}
input[type="text"] {
width: 100%;
}
pre {
padding: 6px;
border: 0.5px solid #cecece;
white-space: pre-wrap;
}
pre#output {
overflow-x: scroll;
white-space: pre;
}
</style>';

echo '<div class="title">' . $title . '</div>';
Expand All @@ -38,19 +38,19 @@
echo '<div class="list">';

echo '<form method="post">
<span>Thư mục:</span><br />
<input type="text" name="folder" value="' . htmlspecialchars($folder) . '" /><br />
<span>Thư mục:</span><br />
<input type="text" name="folder" value="' . htmlspecialchars($folder) . '" /><br />
<span>Lệnh:</span><br />
<input type="text" name="command" value="' . htmlspecialchars($command) . '" /><br />
<span>Lệnh:</span><br />
<input type="text" name="command" value="' . htmlspecialchars($command) . '" /><br />
<input type="submit" name="submit" value="OK" />
<input type="submit" name="submit" value="OK" />
</form>';

// OK
if (isset($_POST['submit'])) {
if ($folder) {
$command = "cd $folder && $command";
$command = "cd $folder; $command";
}

// RUN
Expand All @@ -75,8 +75,10 @@

echo 'Kết quả:';
echo '<pre id="output">' . htmlspecialchars(implode("\n", $output)) . '</pre>';

//var_dump($output);
}

echo '</div>';

require_once 'footer.php';
require 'footer.php';
6 changes: 3 additions & 3 deletions version.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"repo": "file-manager-main",
"major": 1,
"minor": 0,
"patch": 39,
"version": "1.0.39",
"message": "thêm chức năng webdav"
"patch": 40,
"version": "1.0.40",
"message": "sửa lỗi"
}

0 comments on commit 3fcd533

Please sign in to comment.