コード例 #1
0
ファイル: user.php プロジェクト: Yoyoyozo/webDiplomacy
    }
    unset($tablMutedThreads);
    if (count($mutedThreads) > 0) {
        print '<li class="formlisttitle"><a name="threadmutes"></a>Muted threads:</li>';
        print '<li class="formlistdesc">The threads which you muted.</li>';
        $unmuteThreadID = 0;
        if (isset($_GET['unmuteThreadID'])) {
            $unmuteThreadID = (int) $_GET['unmuteThreadID'];
            $User->toggleThreadMute($unmuteThreadID);
            print '<li class="formlistfield"><strong>Thread <a class="light" href="forum.php?threadID=' . $unmuteThreadID . '#' . $unmuteThreadID . '">#' . $unmuteThreadID . '</a> unmuted.</strong></li>';
        }
        print '<li class="formlistfield"><ul>';
        foreach ($mutedThreads as $mutedThread) {
            if ($unmuteThreadID == $mutedThread['muteThreadID']) {
                continue;
            }
            print '<li>' . '<a class="light" href="forum.php?threadID=' . $mutedThread['muteThreadID'] . '#' . $mutedThread['muteThreadID'] . '">' . $mutedThread['subject'] . '</a> ' . libHTML::muted('usercp.php?unmuteThreadID=' . $mutedThread['muteThreadID'] . '#threadmutes') . '<br />' . $mutedThread['username'] . ' (' . $mutedThread['replies'] . ' replies)<br />' . '</li>';
        }
        print '</ul></li>';
    }
}
/*
 * This is done in PHP because Eclipse complains about HTML syntax errors otherwise
 * because the starting <form><ul> is elsewhere
 */
print '</ul>

<div class="hr"></div>

<input type="submit" class="form-submit notice" value="Update">
</form>';
コード例 #2
0
ファイル: member.php プロジェクト: Yoyoyozo/webDiplomacy
 private function muteIcon()
 {
     global $User;
     $buf = '';
     if ($User->type['User'] && $this->userID != $User->id) {
         $isMuted = $User->isCountryMuted($this->gameID, $this->countryID);
         if (isset($_REQUEST['toggleMute']) && $_REQUEST['toggleMute'] == $this->countryID) {
             $this->muteMember();
             $isMuted = !$isMuted;
         }
         $toggleMuteURL = 'board.php?gameID=' . $this->gameID . '&toggleMute=' . $this->countryID . '&rand=' . rand(1, 99999) . '#chatboxanchor';
         $buf .= '<br />' . ($isMuted ? libHTML::muted($toggleMuteURL) : libHTML::unmuted($toggleMuteURL));
     }
     return $buf;
 }
コード例 #3
0
ファイル: profile.php プロジェクト: Yoyoyozo/webDiplomacy
    if ($rankingDetails['takenOver']) {
        print '<li>' . l_t('Left and taken over: <strong>%s</strong>', $rankingDetails['takenOver']) . '(<a href="profile.php?detail=civilDisorders&userID=' . $UserProfile->id . '">' . l_t('View details') . '</a>)</li>';
    }
    print '</ul></li>';
}
print '</ul></div>';
print "<h2>" . $UserProfile->username;
if ($User->type['User'] && $UserProfile->type['User'] && !($User->id == $UserProfile->id || $UserProfile->type['Moderator'] || $UserProfile->type['Guest'] || $UserProfile->type['Admin'])) {
    $userMuted = $User->isUserMuted($UserProfile->id);
    print '<a name="mute"></a>';
    if (isset($_REQUEST['toggleMute'])) {
        $User->toggleUserMute($UserProfile->id);
        $userMuted = !$userMuted;
    }
    $muteURL = 'profile.php?userID=' . $UserProfile->id . '&toggleMute=on&rand=' . rand(0, 99999) . '#mute';
    print ' ' . ($userMuted ? libHTML::muted($muteURL) : libHTML::unmuted($muteURL));
}
print '</h2>';
// Regular user info starts here:
print '<div class="leftHalf" style="width:50%">';
if ($UserProfile->type['Banned']) {
    print '<p><strong>' . l_t('Banned') . '</strong></p>';
}
if ($UserProfile->comment) {
    print '<p class="profileComment">"' . $UserProfile->comment . '"</p>';
}
print '<p><ul class="formlist">';
if ($UserProfile->type['Moderator'] || $UserProfile->type['ForumModerator'] || $UserProfile->type['Admin']) {
    print '<li><strong>' . l_t('Mod/Admin team') . '</strong></li>';
    print '<li>&nbsp;</li>';
}