garancia-pharmaciens/httpdocs/admin/forum_dialog.php
2017-05-30 17:55:38 +02:00

27 lines
791 B
PHP
Executable File

<?php
include_once("_inc/config.php");
$posts = getForumPosts(0,100);
foreach($posts as $post){
//get user infos
$query = "SELECT * FROM `".$GLOBALS['sql_prefixe']."core_administrator` WHERE `id` = '".$post -> user_id."' ";
$result = mysql_query($query);
$userInfos = mysql_fetch_object($result);
echo '<div class="post">';
echo ' <div class="arrow"></div>';
echo ' <div class="userInfos">';
echo ' <img src="_users/'.$post -> user_id.'.jpg" alt="avatar" />';
echo ' <strong>'.$userInfos -> name.'</strong>';
echo ' </div>';
echo ' <div class="content">';
echo ' <div class="date">'.$post -> date.'</div>';
echo ' <div class="message">' . $post -> content . '</div>';
echo ' </div>';
echo '</div>';
echo '<div class="clear"></div>';
}
?>