This commit is contained in:
2023-04-12 14:38:04 +08:00
parent 4ee8dd8118
commit b96e5f8dcb
2 changed files with 27 additions and 22 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+26 -21
View File
@@ -64,30 +64,34 @@ function show_index()
<input type="file" class="input-file" id="file" name="file" style="display: none" multiple="multiple" accept="image/png, image/jpeg, image/jpg, image/gif"> <input type="file" class="input-file" id="file" name="file" style="display: none" multiple="multiple" accept="image/png, image/jpeg, image/jpg, image/gif">
</form> </form>
<div class="grid grid-cols-1 w-full space-y-2"> <div class="grid grid-cols-1 w-full space-y-10">
<div class="text-2xl w-full">1.选择图片&上传</div> <div>
<div class="text-2xl w-full">1.选择图片&上传</div>
<div class="flex space-x-5"> <div class="flex space-x-5 py-3">
<button class="h-10 w-20 bg-red-300" id="choosePic">选择图片</button> <button class="h-10 w-20 bg-red-300" id="choosePic">选择图片</button>
<button class="h-10 w-20 bg-blue-300" id="submitBtn">开始上传</button> <button class="h-10 w-20 bg-blue-300" id="submitBtn">开始上传</button>
</div>
</div> </div>
<div class="text-2xl w-full">2.图片链接</div> <div>
<div class="text-2xl w-full">2.图片链接</div>
<div class=""> <div class="">
<table class="table-fixed border-collapse border border-green-800"> <table class="table-fixed border-collapse border border-green-800">
<thead> <thead>
<tr class="border border-green-600"> <tr class="border border-green-600">
<th class="border border-green-600 w-100 text-center">名称</th> <th class="border border-green-600 w-100 text-center">名称</th>
<th class="border border-green-600 w-30 text-center">大小</th> <th class="border border-green-600 w-30 text-center">大小</th>
<th class="border border-green-600 w-40 text-center">状态</th> <th class="border border-green-600 w-40 text-center">状态</th>
<th class="border border-green-600 w-200 text-center">链接</th> <th class="border border-green-600 w-200 text-center">链接</th>
</tr> </tr>
</thead> </thead>
<tbody id="tbodyId"> <tbody id="tbodyId">
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
</div> </div>
@@ -177,7 +181,7 @@ function show_index()
<div class=""> <div class="">
<p class="text-2xl"> <p class="text-2xl">
this is about about
</p> </p>
</div> </div>
@@ -360,7 +364,8 @@ function inti_db()
exec_db('CREATE TABLE IF NOT EXISTS files (id INTEGER PRIMARY KEY, uuid TEXT, src TEXT)'); exec_db('CREATE TABLE IF NOT EXISTS files (id INTEGER PRIMARY KEY, uuid TEXT, src TEXT)');
} }
function uniqidReal($lenght = 13) { function uniqidReal($lenght = 13)
{
// uniqid gives 13 chars, but you could adjust it to your needs. // uniqid gives 13 chars, but you could adjust it to your needs.
if (function_exists("random_bytes")) { if (function_exists("random_bytes")) {
$bytes = random_bytes(ceil($lenght / 2)); $bytes = random_bytes(ceil($lenght / 2));