showing all pictures on home open
This commit is contained in:
parent
51278caac3
commit
ded5e7e207
@ -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")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user