echo "<div class='col-xs-12'>"; // Display total replys // Display total topic replys echo "<div class='btn btn-info btn-xs'>"; echo "Replies <span class='badge'>{$row2->total_topic_replys}</span>"; echo "</div>"; // Display total sweets echo Sweets::getTotalSweets($f_p_id, 'Forum_Topic', 'Forum_Topic_Reply'); // Display total views echo "<div class='btn btn-info btn-xs'> Views <span class='badge'>"; echo PageViews::views('false', $f_p_id, 'Forum_Topic', $data['current_userID']); echo "</span></div>"; // Check to see if there has been a reply for this topic. If not then don't show anything. if (isset($row2->LR_UserID)) { // Display Last Reply User Name $rp_user_name2 = CurrentUserData::getUserName($row2->LR_UserID); //Display how long ago this was posted echo "<Br> Last Reply by <a href='" . DIR . "Profile/{$row2->LR_UserID}/' style='font-weight: bold'>{$rp_user_name2}</a> " . TimeDiff::dateDiff("now", "{$row2->LR_TimeStamp}", 1) . " ago "; } echo "</div>"; echo "</div>"; echo "</div></td></tr>"; } // End query echo "</table>"; // Display Create New Topic Button if user is logged in if (isset($data['current_userID'])) { echo "<a class='btn btn-sm btn-success' href='" . DIR . "NewTopic/" . $data['current_topic_id'] . "'>"; echo "Create New Topic"; echo "</a>"; }
if (!isset($rp_timestamp2)) { echo "<ul class='list-group-item'>"; echo "<a href='" . DIR . "Profile/{$f_p_user_id}/'>{$f_p_user_name}</a> created.. <br>"; echo "<strong>"; echo "<a href='" . DIR . "Topic/{$f_p_id}/' title='{$f_p_title}' ALT='{$f_p_title}'>{$f_p_title}</a>"; echo "</strong>"; echo "<br>"; //Display how long ago this was posted $timestart = $f_p_timestamp; //Time of post echo " <font color=green> " . TimeDiff::dateDiff("now", "{$timestart}", 1) . " ago</font> "; //echo "($f_p_timestamp)"; // Test timestamp unset($timestart, $f_p_timestamp); echo "</ul>"; } else { $rp_user_name2 = CurrentUserData::getUserName($rp_user_id2); //If reply show the following echo "<ul class='list-group-item'>"; echo "<a href='" . DIR . "Profile/{$rp_user_id2}/'>{$rp_user_name2}</a> posted on.. <br>"; echo "<strong>"; echo "<a href='" . DIR . "Topic/{$f_p_id}/' title='{$f_p_title}' ALT='{$f_p_title}'>{$f_p_title}</a>"; echo "</strong>"; //Display how long ago this was posted $timestart = $rp_timestamp2; //Time of post echo "<br><font color=green> " . TimeDiff::dateDiff("now", "{$timestart}", 1) . " ago</font> "; unset($timestart, $rp_timestamp2); echo "</ul>"; } // End reply check }
echo "</div>"; } foreach ($data['topic_replys'] as $row) { $rf_p_main_id = $row->id; $rf_p_id = $row->fpr_post_id; $rf_p_id_cat = $row->fpr_id; $rf_p_content = $row->fpr_content; $rf_p_edit_date = $row->fpr_edit_date; $rf_p_timestamp = $row->fpr_timestamp; $rf_p_user_id = $row->fpr_user_id; $rf_p_allow = $row->allow; $rf_p_hide_userID = $row->hide_userID; $rf_p_hide_reason = $row->hide_reason; $rf_p_hide_timestamp = $row->hide_timestamp; $rf_p_user_name = CurrentUserData::getUserName($rf_p_user_id); $rf_p_hide_user_name = CurrentUserData::getUserName($rf_p_hide_userID); //$rf_p_content = stripslashes($rf_p_content); echo "<a class='anchor' name='topicreply{$rf_p_main_id}'></a>"; // Reply Topic Display echo "<div class='panel panel-info'>"; echo "<div class='panel-heading'>"; echo "<div class='row'>"; echo "<div class='col-lg-6 col-md-6 col-sm-6'>"; echo " Reply By: "; // Show user main pic echo " <a href='" . DIR . "Profile/{$rf_p_user_id}/'>{$rf_p_user_name}</a> "; echo "</div>"; echo "<div class='col-lg-6 col-md-6 col-sm-6' style='text-align:right'>"; // Display how long ago this was posted $timestart = "{$rf_p_timestamp}"; //Time of post
echo "</div>"; echo "<table class='table table-hover responsive'><tr><th>"; echo "Reply ID"; echo "</th><th class='hidden-xs'>"; echo "Poster"; echo "</th><th class='hidden-xs'>"; echo "Blocker"; echo "</th><th class='hidden-xs'>"; echo "Block DateTime"; echo "</th></tr>"; foreach ($data['blocked_replies'] as $row) { echo "<tr><td>"; echo "<a href='" . DIR . "Topic/{$row->fpr_post_id}#topicreply{$row->id}' target='_blank'>{$row->id}</a>"; echo "</td><td class='hidden-xs'>"; $poster_user_name = CurrentUserData::getUserName($row->fpr_user_id); echo "{$poster_user_name}"; echo "</td><td class='hidden-xs'>"; $hide_user_name = CurrentUserData::getUserName($row->hide_userID); echo "{$hide_user_name}"; echo "</td><td class='hidden-xs'>"; echo "{$row->hide_timestamp}"; echo "</td></tr>"; } echo "</table>"; echo "</div>"; } ?> </div> </div> </div>