Transfer to git
This commit is contained in:
16
includes/chat_reading_view.inc.php
Normal file
16
includes/chat_reading_view.inc.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
function render_history(array $chat_history){
|
||||
$chat_history = array_reverse($chat_history,true); // Reverse display order to fix scroll direction
|
||||
foreach ($chat_history as $message) {
|
||||
?>
|
||||
<div class="message">
|
||||
<span class="user"><?php echo htmlspecialchars($message["username"]); ?></span>
|
||||
<span class="content"><?php echo htmlspecialchars($message["content"]); ?></span>
|
||||
<p class="date_sent"><?php echo htmlspecialchars($message["date_sent"]); ?></p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user