Esempio n. 1
0
    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>";
}
Esempio n. 2
0
<?php

use Helpers\CurrentUserData, Helpers\Url;
// Get user data if logged in
$cur_userID = CUR_LOGGED_USERID;
// Make sure user is logged in
if (isset($cur_userID)) {
    // Get user's group status
    $current_user_groups = CurrentUserData::getCUGroups($cur_userID);
    foreach ($current_user_groups as $user_group_data) {
        $cu_groupID[] = $user_group_data->groupID;
    }
    // Get User Data From Array
    // Get user data from user's database
    $current_user_data = CurrentUserData::getCUD($cur_userID);
    foreach ($current_user_data as $user_data) {
        $cu_username = $user_data->username;
        $cu_first_name = $user_data->firstName;
        $cu_gender = $user_data->gender;
        $cu_email = $user_data->email;
        $cu_lastlogin = date("F d, Y", strtotime($user_data->LastLogin));
        $cu_signup = date("F d, Y", strtotime($user_data->SignUp));
        $cu_img = $user_data->userImage;
        $cu_aboutme = $user_data->aboutme;
        $cu_website = $user_data->website;
    }
}
// Check to make sure user can view admin panel
if (!ctype_digit($cur_userID) && !ctype_digit($cu_groupID)) {
    // Redirect member to home page
    Url::redirect();
    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
}
Esempio n. 4
0
         echo Form::open(array('method' => 'post', 'action' => '#topicreply' . $rf_p_main_id));
         echo Form::textBox(array('type' => 'text', 'name' => 'fpr_content', 'class' => 'form-control', 'value' => $rf_p_content, 'placeholder' => 'Topic Reply Content', 'rows' => '6'));
         // Topic Reply Edit True
         echo "<input type='hidden' name='action' value='update_reply' />";
         // Topic Reply ID for editing
         echo "<input type='hidden' name='edit_reply_id' value='" . $rf_p_main_id . "' />";
         // CSRF Token
         echo "<input type='hidden' name='csrf_token' value='" . $data['csrf_token'] . "' />";
         // Display Submit Button
         echo "<button class='btn btn-xs btn-success' name='submit' type='submit'>Update Reply</button>";
         echo Form::close();
     } else {
         // Display Topic Reply Content
         echo "{$rf_p_content_bb}";
         // Get user's Signature
         $user_signature = CurrentUserData::getUserSignature($rf_p_user_id);
         if (!empty($user_signature)) {
             echo "<hr style='margin-bottom: 0px'><font size='1'><i>Signature</i></font><hr style='margin-top: 0px'> {$user_signature}";
         }
     }
     // Check to see if there are any images attaced to this post
     $check_for_image = Images::getForumImagesTopicReply($rf_p_id, $rf_p_main_id);
     if (isset($check_for_image)) {
         echo "<hr style='margin-bottom: 0px'><font size='1'><i>Image Attachments</i></font>";
         echo "<hr style='margin-top: 0px'>";
         echo "<div align='center' style='margin-bottom: 8px'><a href='" . DIR . "{$check_for_image}' target='_blank'><img src='" . DIR . "{$check_for_image}' height='100px'></a></div>";
     }
 } else {
     // Mod/Admin has disallowed this reply.  Show message
     echo " <strong><font color='red'>This Reply Has Been Disabled By Mod/Admin.  Contact Mod/Admin for more information.</font></strong> ";
     echo "<hr>";
    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>