Rearranged files
So, now it all works standalone without any dependencies on external resources.
This commit is contained in:
parent
f63cb6cb59
commit
309521897b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,2 @@
|
|||||||
/files
|
/files
|
||||||
*.log
|
*.log
|
||||||
/counter.txt
|
|
||||||
7
css/bootstrap.min.css
vendored
Normal file
7
css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -16,7 +16,7 @@ body {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-image: url(./images/bg.webp);
|
background-image: url(../images/bg.webp);
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
header {
|
header {
|
||||||
@ -4,11 +4,11 @@ $file = $_FILES['file'];
|
|||||||
if (!is_dir('./files')) {
|
if (!is_dir('./files')) {
|
||||||
mkdir('./files');
|
mkdir('./files');
|
||||||
}
|
}
|
||||||
if (!file_exists('./counter.txt')){
|
if (!file_exists('./files/counter.txt')){
|
||||||
file_put_contents('./counter.txt', '0');
|
file_put_contents('./files/counter.txt', '0');
|
||||||
}
|
}
|
||||||
$id = (int)file_get_contents('./counter.txt');
|
$id = (int)file_get_contents('./files/counter.txt');
|
||||||
file_put_contents('./counter.txt', (string)($id+1));
|
file_put_contents('./files/counter.txt', (string)($id+1));
|
||||||
$path = "./files/{$id}__".basename($file['name']);
|
$path = "./files/{$id}__".basename($file['name']);
|
||||||
move_uploaded_file($file['tmp_name'], $path);
|
move_uploaded_file($file['tmp_name'], $path);
|
||||||
$result = json_decode((string)shell_exec(dirname(__file__)."/huffman.py -".($mode == 'compress' ? 'c' : 'd')." \"{$path}\""));
|
$result = json_decode((string)shell_exec(dirname(__file__)."/huffman.py -".($mode == 'compress' ? 'c' : 'd')." \"{$path}\""));
|
||||||
|
|||||||
@ -5,9 +5,9 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>HuffPress</title>
|
<title>HuffPress</title>
|
||||||
<link rel="shortcut icon" href="./favicon.ico" />
|
<link rel="shortcut icon" href="./favicon.ico" />
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous" />
|
<link rel="stylesheet" href="./css/bootstrap.min.css" />
|
||||||
<link rel="stylesheet" href="./style.css" />
|
<link rel="stylesheet" href="./css/style.css" />
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
<script src="./js/jquery-3.6.0.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
@ -56,6 +56,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="./script.js"></script>
|
<script src="./js/script.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
2
js/jquery-3.6.0.min.js
vendored
Normal file
2
js/jquery-3.6.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user