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
+9 -4
View File
@@ -64,15 +64,18 @@ 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>
<div class="text-2xl w-full">1.选择图片&上传</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>
<div class="text-2xl w-full">2.图片链接</div> <div class="text-2xl w-full">2.图片链接</div>
<div class=""> <div class="">
@@ -90,6 +93,7 @@ function show_index()
</table> </table>
</div> </div>
</div> </div>
</div>
<script type="text/javascript"> <script type="text/javascript">
const queue = []; const queue = [];
@@ -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));