showing all pictures on home open

This commit is contained in:
Václav Šmejkal 2024-05-24 19:10:03 +02:00
parent 51278caac3
commit ded5e7e207
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -8,8 +8,26 @@
<div><input type="file" name="file_upload" id="file_upload" style="display:none;"></div> <div><input type="file" name="file_upload" id="file_upload" style="display:none;"></div>
<div><button onclick="upload()" type="submit" class="btn" id="upload_popup_sub">Zveřejnit</button></div> <div><button onclick="upload()" type="submit" class="btn" id="upload_popup_sub">Zveřejnit</button></div>
</div> </div>
<div id="posts"></div>
<script> <script>
$.ajax
({
url: "./res/forum/api/get_posts.php",
success: function(result)
{
for (let i in result)
{
$("#posts").append
(
"<div class=\"post\">" +
"<img src=\"" + "./user_content/" + result[i].author + "/" + result[i].photo_id + "\"></img>" +
"</div>"
);
}
}
});
function show_upload_popup() function show_upload_popup()
{ {
if ($("#upload_popup").css("display") == "flex") if ($("#upload_popup").css("display") == "flex")