Exemple #1
0
            break;
        case 6:
            return MARKSMAN_LEVEL_6;
            break;
        case 7:
            return MARKSMAN_LEVEL_7;
            break;
        case 8:
            return MARKSMAN_LEVEL_8;
            break;
    }
}
/*
 * Getting all arrrays to show in bottom notifications
 */
$myComments = Comments::getUserComments($user->getID());
$battleHistory = User::getBattleHistory($_SESSION['userID']);
$broadcastmsg = $user->getBroadcastMessages();
// this function needs to be change
function displayComment($index)
{
    global $myComments;
    $sender = User::getUser($myComments[$index]->getSenderID());
    $senderName = $sender->getName();
    $commentID = $myComments[$index]->getCommentID();
    $content = $myComments[$index]->getContent();
    $html = '<div class="newsinfo">
                <p class="infonews"><strong><a href="#">' . $senderName . '</a> commented</strong><br />
                    "' . $content . '"
                </p>	
            </div>';
Exemple #2
0
 case validateRoute('PATCH', 'users/\\d+'):
     $response = $user->update((int) $params[1], $postdata);
     httpResponse();
     break;
 case validateRoute('GET', 'users/\\d+/torrents'):
     $arr = $user->getUserTorrents((int) $params[1], (int) $_GET["requests"]);
     httpResponse($arr);
     break;
 case validateRoute('GET', 'users/\\d+/torrent-comments'):
     $comments = new Comments($db, $user);
     list($result, $totalCount) = $comments->getCommentsForUserTorrents((int) $params[1], (int) $_GET["limit"] ?: 10, (int) $_GET["index"] ?: 0);
     httpResponse($result, $totalCount);
     break;
 case validateRoute('GET', 'users/\\d+/comments'):
     $comments = new Comments($db, $user);
     list($result, $totalCount) = $comments->getUserComments((int) $params[1], (int) $_GET["limit"] ?: 10, (int) $_GET["index"] ?: 0);
     httpResponse($result, $totalCount);
     break;
 case validateRoute('GET', 'users/\\d+/peers'):
     list($seeding, $leeching) = $user->getPeers($params[1] ?: 0);
     httpResponse(array("seeding" => $seeding, "leeching" => $leeching));
     break;
 case validateRoute('GET', 'users/\\d+/invitees'):
     $invitees = $user->getInvitees($params[1] ?: 0);
     httpResponse($invitees);
     break;
 case validateRoute('GET', 'users/\\d+/bonuslog'):
     $bonuslog = $user->getBonusLog($params[1] ?: 0, (int) $_GET["limit"] ?: 10);
     httpResponse($bonuslog);
     break;
 case validateRoute('GET', 'users/\\d+/iplog'):
    <div id="two">
        <a class="inlinecontent abshide" href="#inline1"> </a>
        <form method="POST" action="backend/commentactions.php?action=post&screen=externalProfile"  onsubmit="return validateComment();"  >
            <textarea id ="coment" class="comment" name="content" maxlength = "250"></textarea>
            <input type="submit" class="commentbutton" value="Post Comment" />
            <input type="hidden" value="<?php 
echo $_SESSION['userID'];
?>
" name="sender_id" >
            <input type="hidden" value="<?php 
echo $userID;
?>
" name="receiver_id" >
        </form>
<?php 
$myComments = Comments::getUserComments($userID);
foreach ($myComments as $comment) {
    $sender = User::getUser($comment->getSenderID());
    ?>
            <div class="commentpost">
                <a href="profile.php"><?php 
    echo $sender->getName();
    ?>
</a>

            <?php 
    if ($comment->getSenderID() == $_SESSION['userID']) {
        ?>
                    <a class="commentdelete" href="backend/commentactions.php?action=delete&receiver_id=<?php 
        echo $userID;
        ?>