forked from Adleraci/adlerka.top
MEME
This commit is contained in:
parent
3074bfc502
commit
2cdac31673
@ -47,14 +47,13 @@ function renderMemeGallery(): string
|
||||
// Bind the result variables
|
||||
$stmtlist->bind_result($memeID, $title, $textContent, $createdAt, $filePath, $fileType, $userNickname);
|
||||
$stmtlist->execute();
|
||||
$stmtlist->fetch();
|
||||
|
||||
$meme_gallery_template = file_get_contents($routerConfig['template_dir'] . 'meme_gallery.html');
|
||||
|
||||
// Fetch the results
|
||||
$memes_out = '';
|
||||
while ($stmtlist->fetch()) {
|
||||
if ($fileType == 'image') {
|
||||
if (str_starts_with($fileType, 'image')) {
|
||||
$memes_out .= renderMeme($title, $textContent, $createdAt, $filePath, $userNickname);
|
||||
}
|
||||
}
|
||||
|
@ -20,10 +20,9 @@ foreach ($articles as $article){
|
||||
$articleTitle = htmlspecialchars($article["Title"]);
|
||||
$articleBody = htmlspecialchars($article["Body"]);
|
||||
//$articleFileList = $article["FileList"];
|
||||
$articleWrittenBy = $article["WrittenBy"];
|
||||
//$articleWrittenBy = $article["WrittenBy"];
|
||||
$articleWrittenAt = htmlspecialchars($article["WrittenAt"]);
|
||||
$articleWrittenByName = htmlspecialchars($article["WrittenByName"]);
|
||||
|
||||
$articleTemplate = str_replace("__TEMPLATE_ARTICLE_TITLE__", $articleTitle, $articleTemplate);
|
||||
$articleTemplate = str_replace("__TEMPLATE_ARTICLE_AUTHOR__", $articleWrittenByName, $articleTemplate);
|
||||
$articleTemplate = str_replace("__TEMPLATE_ARTICLE_DATE__", $articleWrittenAt, $articleTemplate);
|
||||
|
Loading…
Reference in New Issue
Block a user