当前位置: 首页>>代码示例>>PHP>>正文


PHP Users::format_username方法代码示例

本文整理汇总了PHP中Users::format_username方法的典型用法代码示例。如果您正苦于以下问题:PHP Users::format_username方法的具体用法?PHP Users::format_username怎么用?PHP Users::format_username使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Users的用法示例。


在下文中一共展示了Users::format_username方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: make_staff_row

/**
 * Generate a table row for a staff member on staff.php
 *
 * @param $Row used for alternating row colors
 * @param $ID the user ID of the staff member
 * @param $Paranoia the user's paranoia
 * @param $Class the user class
 * @param $LastAccess datetime the user last browsed the site
 * @param $Remark the "Staff remark" or FLS' "Support for" text
 * @param $HiddenBy the text that is displayed when a staff member's
 *                  paranoia hides their LastAccess time
 * @return string $Row
 */
function make_staff_row($Row, $ID, $Paranoia, $Class, $LastAccess, $Remark = '', $HiddenBy = 'Hidden by user')
{
    $Row = $Row === 'a' ? 'b' : 'a';
    echo "\t\t\t<tr class=\"row{$Row}\">\n\t\t\t\t<td class=\"nobr\">\n\t\t\t\t\t" . Users::format_username($ID, false, false, false) . "\n\t\t\t\t</td>\n\t\t\t\t<td class=\"nobr\">\n\t\t\t\t\t";
    //used for proper indentation of HTML
    if (check_paranoia('lastseen', $Paranoia, $Class)) {
        echo time_diff($LastAccess);
    } else {
        echo "{$HiddenBy}";
    }
    echo "\n\t\t\t\t</td>\n\t\t\t\t<td class=\"nobr\">" . Text::full_format($Remark) . "</td>\n\t\t\t</tr>\n";
    // the "\n" is needed for pretty HTML
    // the foreach loop that calls this function needs to know the new value of $Row
    return $Row;
}
开发者ID:karamanolev,项目名称:Gazelle,代码行数:28,代码来源:functions.php

示例2: render_revision_history

    /**
     * Render the revision history
     * @param array $RevisionHistory see RevisionHistory::get_revision_history
     * @param string $BaseURL
     */
    public static function render_revision_history($RevisionHistory, $BaseURL)
    {
        ?>
	<table cellpadding="6" cellspacing="1" border="0" width="100%" class="border">
		<tr class="colhead">
			<td>Revision</td>
			<td>Date</td>
			<td>User</td>
			<td>Summary</td>
		</tr>
<?php 
        $Row = 'a';
        foreach ($RevisionHistory as $Entry) {
            list($RevisionID, $Summary, $Time, $UserID) = $Entry;
            $Row = $Row == 'a' ? 'b' : 'a';
            ?>
		<tr class="row<?php 
            echo $Row;
            ?>
">
			<td>
				<?php 
            echo "<a href=\"{$BaseURL}&amp;revisionid={$RevisionID}\">#{$RevisionID}</a>";
            ?>
			</td>
			<td>
				<?php 
            echo $Time;
            ?>
			</td>
			<td>
				<?php 
            echo Users::format_username($UserID, false, false, false);
            ?>
			</td>
			<td>
				<?php 
            echo $Summary ? $Summary : '(empty)';
            ?>
			</td>
		</tr>
<?php 
        }
        ?>
	</table>
<?php 
    }
开发者ID:Kufirc,项目名称:Gazelle,代码行数:52,代码来源:revisionhistoryview.class.php

示例3: user_dupes_table

function user_dupes_table($UserID)
{
    global $DB, $LoggedUser;
    if (!check_perms('users_mod')) {
        error(403);
    }
    if (!is_number($UserID)) {
        error(403);
    }
    $DB->query("\n\t\tSELECT d.ID, d.Comments, SHA1(d.Comments) AS CommentHash\n\t\tFROM dupe_groups AS d\n\t\t\tJOIN users_dupes AS u ON u.GroupID = d.ID\n\t\tWHERE u.UserID = {$UserID}");
    if (list($GroupID, $Comments, $CommentHash) = $DB->next_record()) {
        $DB->query("\n\t\t\tSELECT m.ID\n\t\t\tFROM users_main AS m\n\t\t\t\tJOIN users_dupes AS d ON m.ID = d.UserID\n\t\t\tWHERE d.GroupID = {$GroupID}\n\t\t\tORDER BY m.ID ASC");
        $DupeCount = $DB->record_count();
        $Dupes = $DB->to_array();
    } else {
        $DupeCount = 0;
        $Dupes = array();
    }
    ?>
		<form class="manage_form" name="user" method="post" id="linkedform" action="">
			<input type="hidden" name="action" value="dupes" />
			<input type="hidden" name="dupeaction" value="update" />
			<input type="hidden" name="userid" value="<?php 
    echo $UserID;
    ?>
" />
			<input type="hidden" id="auth" name="auth" value="<?php 
    echo $LoggedUser['AuthKey'];
    ?>
" />
			<input type="hidden" id="form_comment_hash" name="form_comment_hash" value="<?php 
    echo $CommentHash;
    ?>
" />
			<div class="box box2" id="l_a_box">
				<div class="head">
					Linked Accounts (<?php 
    echo max($DupeCount - 1, 0);
    ?>
) <a href="#" onclick="$('.linkedaccounts').gtoggle(); return false;" class="brackets">View</a>
				</div>
				<table width="100%" class="layout hidden linkedaccounts">
					<?php 
    echo $DupeCount ? "<tr>\n" : '';
    $i = 0;
    foreach ($Dupes as $Dupe) {
        $i++;
        list($DupeID) = $Dupe;
        $DupeInfo = Users::user_info($DupeID);
        ?>
						<td align="left"><?php 
        echo Users::format_username($DupeID, true, true, true, true);
        ?>
							<a href="user.php?action=dupes&amp;dupeaction=remove&amp;auth=<?php 
        echo $LoggedUser['AuthKey'];
        ?>
&amp;userid=<?php 
        echo $UserID;
        ?>
&amp;removeid=<?php 
        echo $DupeID;
        ?>
" onclick="return confirm('Are you sure you wish to remove <?php 
        echo $DupeInfo['Username'];
        ?>
 from this group?');" class="brackets tooltip" title="Remove linked account">X</a>
						</td>
<?php 
        if ($i == 4) {
            $i = 0;
            echo "\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n";
        }
    }
    if ($DupeCount) {
        if ($i !== 0) {
            for ($j = $i; $j < 4; $j++) {
                echo "\t\t\t\t\t\t<td>&nbsp;</td>\n";
            }
        }
        ?>
					</tr>
<?php 
    }
    ?>
					<tr>
						<td colspan="5" align="left" style="border-top: thin solid;"><strong>Comments:</strong></td>
					</tr>
					<tr>
						<td colspan="5" align="left">
							<div id="dupecomments" class="<?php 
    echo $DupeCount ? '' : 'hidden';
    ?>
"><?php 
    echo Text::full_format($Comments);
    ?>
</div>
							<div id="editdupecomments" class="<?php 
    echo $DupeCount ? 'hidden' : '';
    ?>
">
//.........这里部分代码省略.........
开发者ID:Kufirc,项目名称:Gazelle,代码行数:101,代码来源:linkedfunctions.php

示例4: count

    if ($HasDupe) {
        $HideMe = count($UserIDs) > 10;
        foreach ($UserIDs as $Key => $Val) {
            if (!$UserEndTimes[$Key]) {
                $UserEndTimes[$Key] = sqltime();
            }
            ?>
		<tr class="rowb<?php 
            echo $HideMe ? ' hidden' : '';
            ?>
" name="<?php 
            echo $Index;
            ?>
">
			<td>&nbsp;&nbsp;&#187;&nbsp;<?php 
            echo Users::format_username($Val, true, true, true);
            ?>
</td>
			<td><?php 
            echo time_diff($UserStartTimes[$Key]);
            ?>
</td>
			<td class="hidden"><?php 
            echo $UserStartTimes[$Key];
            ?>
</td>
			<td><?php 
            echo time_diff($UserEndTimes[$Key]);
            ?>
</td>
			<td class="hidden"><?php 
开发者ID:karamanolev,项目名称:Gazelle,代码行数:31,代码来源:ip_history.php

示例5: foreach

}
?>
<table>
	<tr class="colhead_dark" style="font-weight: bold;">
		<td>User</td>
		<td>Time</td>

		<td>User</td>
		<td>Time</td>
	</tr>
	<tr>
<?php 
$i = 0;
foreach ($Results as $ID => $Data) {
    list($SnatcherID, $Timestamp) = array_values($Data);
    $User = Users::format_username($SnatcherID, true, true, true, true);
    if (!array_key_exists($SnatcherID, $Snatched) && $SnatcherID != $UserID) {
        $User = '<span style="font-style: italic;">' . $User . '</span>';
        if (array_key_exists($SnatcherID, $Seeding)) {
            $User = '<strong>' . $User . '</strong>';
        }
    }
    if ($i % 2 == 0 && $i > 0) {
        ?>
	</tr>
	<tr>
<?php 
    }
    ?>
		<td><?php 
    echo $User;
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:downloadlist.php

示例6: build_torrents_table


//.........这里部分代码省略.........
        ?>
</td>
					<td class="number_column"><?php 
        echo number_format($Seeders);
        ?>
</td>
					<td class="number_column"><?php 
        echo number_format($Leechers);
        ?>
</td>
				</tr>
				<tr class="releases_<?php 
        echo $ReleaseType;
        ?>
 groupid_<?php 
        echo $GroupID;
        ?>
 edition_<?php 
        echo $EditionID;
        ?>
 torrentdetails pad<?php 
        if (!isset($_GET['torrentid']) || $_GET['torrentid'] != $TorrentID) {
            ?>
 hidden<?php 
        }
        ?>
" id="torrent_<?php 
        echo $TorrentID;
        ?>
">
					<td colspan="5">
						<blockquote>
							Uploaded by <?php 
        echo Users::format_username($UserID, false, false, false);
        ?>
 <?php 
        echo time_diff($TorrentTime);
        if ($Seeders == 0) {
            if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 1209600) {
                ?>
								<br /><strong>Last active: <?php 
                echo time_diff($LastActive);
                ?>
</strong>
<?php 
            } else {
                ?>
								<br />Last active: <?php 
                echo time_diff($LastActive);
            }
            if ($LastActive != '0000-00-00 00:00:00' && time() - strtotime($LastActive) >= 345678 && time() - strtotime($LastReseedRequest) >= 864000) {
                ?>
								<br /><a href="torrents.php?action=reseed&amp;torrentid=<?php 
                echo $TorrentID;
                ?>
&amp;groupid=<?php 
                echo $GroupID;
                ?>
" class="brackets">Request re-seed</a>
<?php 
            }
        }
        ?>
						</blockquote>
<?php 
        if (check_perms('site_moderate_requests')) {
开发者ID:karamanolev,项目名称:Gazelle,代码行数:67,代码来源:functions.php

示例7: foreach

    die;
}
Text::$TOC = true;
$UserID = (int) $_GET['userid'];
$UserIDSQL = "";
if (!empty($UserID)) {
    $UserIDSQL = " AND UserID != '{$UserID}' ";
}
G::$DB->query("\n\t\tSELECT UserID, Answer, Date\n\t\tFROM staff_answers\n\t\tWHERE QuestionID = '{$ID}'\n\t\t\t{$UserIDSQL}\n\t\tORDER BY DATE DESC");
$Answers = G::$DB->to_array(false, MYSQLI_ASSOC);
foreach ($Answers as $Answer) {
    ?>
	<div class="box box2">
		<div class="head">
			<span>
				Answer by <?php 
    echo Users::format_username($Answer['UserID']);
    ?>
 - <?php 
    echo time_diff($Answer['Date']);
    ?>
			</span>
		</div>
		<div class="pad">
<?php 
    echo Text::full_format($Answer['Answer']);
    ?>
		</div>
	</div>
<?php 
}
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:ajax_get_answers.php

示例8: render_donation_history

    public static function render_donation_history($DonationHistory)
    {
        if (empty($DonationHistory)) {
            return;
        }
        ?>
		<div class="box box2" id="donation_history_box">
			<div class="head">
				Donation History <a href="#" onclick="$('#donation_history').gtoggle(); return false;" class="brackets">View</a>
			</div>
<?php 
        $Row = 'b';
        ?>
			<div class="hidden" id="donation_history">
				<table cellpadding="6" cellspacing="1" border="0" class="border" width="100%">
					<tbody>
					<tr class="colhead_dark">
						<td>
							<strong>Source</strong>
						</td>
						<td>
							<strong>Date</strong>
						</td>
						<td>
							<strong>Amount (EUR)</strong>
						</td>
						<td>
							<strong>Added Points</strong>
						</td>
						<td>
							<strong>Total Points</strong>
						</td>
						<td>
							<strong>Email</strong>
						</td>
						<td style="width: 30%;">
							<strong>Reason</strong>
						</td>
					</tr>
<?php 
        foreach ($DonationHistory as $Donation) {
            ?>
					<tr class="row<?php 
            echo $Row;
            ?>
">
						<td>
							<?php 
            echo display_str($Donation['Source']);
            ?>
 (<?php 
            echo Users::format_username($Donation['AddedBy']);
            ?>
)
						</td>
						<td>
							<?php 
            echo $Donation['Time'];
            ?>
						</td>
						<td>
							<?php 
            echo $Donation['Amount'];
            ?>
						</td>
						<td>
							<?php 
            echo $Donation['Rank'];
            ?>
						</td>
						<td>
							<?php 
            echo $Donation['TotalRank'];
            ?>
						</td>
						<td>
							<?php 
            echo display_str($Donation['Email']);
            ?>
						</td>
						<td>
							<?php 
            echo display_str($Donation['Reason']);
            ?>
						</td>
					</tr>
<?php 
            $Row = $Row === 'b' ? 'a' : 'b';
        }
        ?>
					</tbody>
				</table>
			</div>
		</div>
<?php 
    }
开发者ID:Kufirc,项目名称:Gazelle,代码行数:96,代码来源:donationsview.class.php

示例9: while

			</tr>
<?php 
$DB->query("\n\tSELECT\n\t\tRevision,\n\t\tTitle,\n\t\tAuthor,\n\t\tDate\n\tFROM wiki_revisions\n\tWHERE ID = '{$ArticleID}'\n\tORDER BY Revision DESC");
while (list($Revision, $Title, $AuthorID, $Date) = $DB->next_record()) {
    ?>
			<tr>
				<td><?php 
    echo $Revision;
    ?>
</td>
				<td><?php 
    echo $Title;
    ?>
</td>
				<td><?php 
    echo Users::format_username($AuthorID, false, false, false);
    ?>
</td>
				<td><?php 
    echo time_diff($Date);
    ?>
</td>
				<td><input type="radio" name="old" value="<?php 
    echo $Revision;
    ?>
" /></td>
				<td><input type="radio" name="new" value="<?php 
    echo $Revision;
    ?>
" /></td>
			</tr>
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:revisions.php

示例10: while

	<br />
	<br />
	<div id="inbox">
<?php 
    // Get messages
    $StaffPMs = $DB->query("\n\t\tSELECT UserID, SentDate, Message, ID\n\t\tFROM staff_pm_messages\n\t\tWHERE ConvID = {$ConvID}");
    while (list($UserID, $SentDate, $Message, $MessageID) = $DB->next_record()) {
        // Set user string
        if ($UserID == $OwnerID) {
            // User, use prepared string
            $UserString = $UserStr;
            $Username = $OwnerName;
        } else {
            // Staff/FLS
            $UserInfo = Users::user_info($UserID);
            $UserString = Users::format_username($UserID, true, true, true, true);
            $Username = $UserInfo['Username'];
        }
        ?>
		<div class="box vertical_space" id="post<?php 
        echo $MessageID;
        ?>
">
			<div class="head">
<?php 
        // TODO: the inline style in the <a> tag is an ugly hack. get rid of it.
        ?>
				<a class="postid" href="staffpm.php?action=viewconv&amp;id=<?php 
        echo $ConvID;
        ?>
#post<?php 
开发者ID:Atmos01,项目名称:Gazelle,代码行数:31,代码来源:viewconv.php

示例11: error

$DB->query("\n\tSELECT InInbox, InSentbox\n\tFROM pm_conversations_users\n\tWHERE UserID = '{$UserID}'\n\t\tAND ConvID = '{$ConvID}'");
if (!$DB->has_results()) {
    error(403);
}
list($InInbox, $InSentbox) = $DB->next_record();
if (!$InInbox && !$InSentbox) {
    error(404);
}
// Get information on the conversation
$DB->query("\n\tSELECT\n\t\tc.Subject,\n\t\tcu.Sticky,\n\t\tcu.UnRead,\n\t\tcu.ForwardedTo\n\tFROM pm_conversations AS c\n\t\tJOIN pm_conversations_users AS cu ON c.ID = cu.ConvID\n\tWHERE c.ID = '{$ConvID}'\n\t\tAND UserID = '{$UserID}'");
list($Subject, $Sticky, $UnRead, $ForwardedID) = $DB->next_record();
$DB->query("\n\tSELECT um.ID, Username\n\tFROM pm_messages AS pm\n\t\tJOIN users_main AS um ON um.ID = pm.SenderID\n\tWHERE pm.ConvID = '{$ConvID}'");
$ConverstionParticipants = $DB->to_array();
foreach ($ConverstionParticipants as $Participant) {
    $PMUserID = (int) $Participant['ID'];
    $Users[$PMUserID]['UserStr'] = Users::format_username($PMUserID, true, true, true, true);
    $Users[$PMUserID]['Username'] = $Participant['Username'];
}
$Users[0]['UserStr'] = 'System';
// in case it's a message from the system
$Users[0]['Username'] = 'System';
if ($UnRead == '1') {
    $DB->query("\n\t\tUPDATE pm_conversations_users\n\t\tSET UnRead = '0'\n\t\tWHERE ConvID = '{$ConvID}'\n\t\t\tAND UserID = '{$UserID}'");
    // Clear the caches of the inbox and sentbox
    $Cache->decrement("inbox_new_{$UserID}");
}
View::show_header("View conversation {$Subject}", 'comments,inbox,bbcode,jquery.validate,form_validate');
// Get messages
$DB->query("\n\tSELECT SentDate, SenderID, Body, ID\n\tFROM pm_messages\n\tWHERE ConvID = '{$ConvID}'\n\tORDER BY ID");
?>
<div class="thin">
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:conversation.php

示例12: make_tree

    function make_tree()
    {
        $QueryID = G::$DB->get_query_id();
        $UserID = $this->UserID;
        ?>
		<div class="invitetree pad">
<?php 
        G::$DB->query("\n\t\t\tSELECT TreePosition, TreeID, TreeLevel\n\t\t\tFROM invite_tree\n\t\t\tWHERE UserID = {$UserID}");
        list($TreePosition, $TreeID, $TreeLevel) = G::$DB->next_record(MYSQLI_NUM, false);
        if (!$TreeID) {
            return;
        }
        G::$DB->query("\n\t\t\tSELECT TreePosition\n\t\t\tFROM invite_tree\n\t\t\tWHERE TreeID = {$TreeID}\n\t\t\t\tAND TreeLevel = {$TreeLevel}\n\t\t\t\tAND TreePosition > {$TreePosition}\n\t\t\tORDER BY TreePosition ASC\n\t\t\tLIMIT 1");
        if (G::$DB->has_results()) {
            list($MaxPosition) = G::$DB->next_record(MYSQLI_NUM, false);
        } else {
            $MaxPosition = false;
        }
        $TreeQuery = G::$DB->query("\n\t\t\tSELECT\n\t\t\t\tit.UserID,\n\t\t\t\tEnabled,\n\t\t\t\tPermissionID,\n\t\t\t\tDonor,\n\t\t\t\tUploaded,\n\t\t\t\tDownloaded,\n\t\t\t\tParanoia,\n\t\t\t\tTreePosition,\n\t\t\t\tTreeLevel\n\t\t\tFROM invite_tree AS it\n\t\t\t\tJOIN users_main AS um ON um.ID = it.UserID\n\t\t\t\tJOIN users_info AS ui ON ui.UserID = it.UserID\n\t\t\tWHERE TreeID = {$TreeID}\n\t\t\t\tAND TreePosition > {$TreePosition}" . ($MaxPosition ? " AND TreePosition < {$MaxPosition}" : '') . "\n\t\t\t\tAND TreeLevel > {$TreeLevel}\n\t\t\tORDER BY TreePosition");
        $PreviousTreeLevel = $TreeLevel;
        // Stats for the summary
        $MaxTreeLevel = $TreeLevel;
        // The deepest level (this changes)
        $OriginalTreeLevel = $TreeLevel;
        // The level of the user we're viewing
        $BaseTreeLevel = $TreeLevel + 1;
        // The level of users invited by our user
        $Count = 0;
        $Branches = 0;
        $DisabledCount = 0;
        $DonorCount = 0;
        $ParanoidCount = 0;
        $TotalUpload = 0;
        $TotalDownload = 0;
        $TopLevelUpload = 0;
        $TopLevelDownload = 0;
        $ClassSummary = array();
        global $Classes;
        foreach ($Classes as $ClassID => $Val) {
            $ClassSummary[$ClassID] = 0;
        }
        // We store this in an output buffer, so we can show the summary at the top without having to loop through twice
        ob_start();
        while (list($ID, $Enabled, $Class, $Donor, $Uploaded, $Downloaded, $Paranoia, $TreePosition, $TreeLevel) = G::$DB->next_record(MYSQLI_NUM, false)) {
            // Do stats
            $Count++;
            if ($TreeLevel > $MaxTreeLevel) {
                $MaxTreeLevel = $TreeLevel;
            }
            if ($TreeLevel == $BaseTreeLevel) {
                $Branches++;
                $TopLevelUpload += $Uploaded;
                $TopLevelDownload += $Downloaded;
            }
            $ClassSummary[$Class]++;
            if ($Enabled == 2) {
                $DisabledCount++;
            }
            if ($Donor) {
                $DonorCount++;
            }
            // Manage tree depth
            if ($TreeLevel > $PreviousTreeLevel) {
                for ($i = 0; $i < $TreeLevel - $PreviousTreeLevel; $i++) {
                    echo "\n\n<ul class=\"invitetree\">\n\t<li>\n";
                }
            } elseif ($TreeLevel < $PreviousTreeLevel) {
                for ($i = 0; $i < $PreviousTreeLevel - $TreeLevel; $i++) {
                    echo "\t</li>\n</ul>\n";
                }
                echo "\t</li>\n\t<li>\n";
            } else {
                echo "\t</li>\n\t<li>\n";
            }
            $UserClass = $Classes[$Class]['Level'];
            ?>
		<strong><?php 
            echo Users::format_username($ID, true, true, $Enabled != 2 ? false : true, true);
            ?>
</strong>
<?php 
            if (check_paranoia(array('uploaded', 'downloaded'), $Paranoia, $UserClass)) {
                $TotalUpload += $Uploaded;
                $TotalDownload += $Downloaded;
                ?>
		&nbsp;Uploaded: <strong><?php 
                echo Format::get_size($Uploaded);
                ?>
</strong>
		&nbsp;Downloaded: <strong><?php 
                echo Format::get_size($Downloaded);
                ?>
</strong>
		&nbsp;Ratio: <strong><?php 
                echo Format::get_ratio_html($Uploaded, $Downloaded);
                ?>
</strong>
<?php 
            } else {
                $ParanoidCount++;
//.........这里部分代码省略.........
开发者ID:Kufirc,项目名称:Gazelle,代码行数:101,代码来源:invite_tree.class.php

示例13: foreach

		</tr>
<?php 
        }
        if (isset($IPMatchesIgnored[$IP])) {
            foreach ($IPMatchesIgnored[$IP] as $OtherUserID => $MatchCount) {
                ?>
		<tr class="rowb otherusers<?php 
                echo $Index;
                echo $HideMe ? ' hidden' : '';
                ?>
">
			<td colspan="4">&nbsp;&nbsp;&#187;&nbsp;<?php 
                echo $MatchCount;
                ?>
 matches skipped for <?php 
                echo Users::format_username($OtherUserID, false, false, false);
                ?>
</td>
		</tr>
<?php 
            }
        }
    }
}
?>
	</table>
	<div class="linkbox">
		<?php 
echo $Pages;
?>
	</div>
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:ip_history.php

示例14: generate_user_table

function generate_user_table($Caption, $Tag, $Details, $Limit)
{
    global $Time;
    ?>
	<h3>Top <?php 
    echo $Limit . ' ' . $Caption;
    ?>
		<small class="top10_quantity_links">
<?php 
    switch ($Limit) {
        case 100:
            ?>
			- <a href="top10.php?type=users&amp;details=<?php 
            echo $Tag;
            ?>
" class="brackets">Top 10</a>
			- <span class="brackets">Top 100</span>
			- <a href="top10.php?type=users&amp;limit=250&amp;details=<?php 
            echo $Tag;
            ?>
" class="brackets">Top 250</a>
		<?php 
            break;
        case 250:
            ?>
			- <a href="top10.php?type=users&amp;details=<?php 
            echo $Tag;
            ?>
" class="brackets">Top 10</a>
			- <a href="top10.php?type=users&amp;limit=100&amp;details=<?php 
            echo $Tag;
            ?>
" class="brackets">Top 100</a>
			- <span class="brackets">Top 250</span>
		<?php 
            break;
        default:
            ?>
			- <span class="brackets">Top 10</span>
			- <a href="top10.php?type=users&amp;limit=100&amp;details=<?php 
            echo $Tag;
            ?>
" class="brackets">Top 100</a>
			- <a href="top10.php?type=users&amp;limit=250&amp;details=<?php 
            echo $Tag;
            ?>
" class="brackets">Top 250</a>
<?php 
    }
    ?>
		</small>
	</h3>
	<table class="border">
	<tr class="colhead">
		<td class="center">Rank</td>
		<td>User</td>
		<td style="text-align: right;">Uploaded</td>
		<td style="text-align: right;">UL speed</td>
		<td style="text-align: right;">Downloaded</td>
		<td style="text-align: right;">DL speed</td>
		<td style="text-align: right;">Uploads</td>
		<td style="text-align: right;">Ratio</td>
		<td style="text-align: right;">Joined</td>
	</tr>
<?php 
    // in the unlikely event that query finds 0 rows...
    if (empty($Details)) {
        echo '
		<tr class="rowb">
			<td colspan="9" class="center">
				Found no users matching the criteria
			</td>
		</tr>
		</table><br />';
        return;
    }
    $Rank = 0;
    foreach ($Details as $Detail) {
        $Rank++;
        $Highlight = $Rank % 2 ? 'a' : 'b';
        ?>
	<tr class="row<?php 
        echo $Highlight;
        ?>
">
		<td class="center"><?php 
        echo $Rank;
        ?>
</td>
		<td><?php 
        echo Users::format_username($Detail['ID'], false, false, false);
        ?>
</td>
		<td class="number_column"><?php 
        echo Format::get_size($Detail['Uploaded']);
        ?>
</td>
		<td class="number_column tooltip" title="Upload speed is reported in base 2 in bytes per second, not bits per second."><?php 
        echo Format::get_size($Detail['UpSpeed']);
        ?>
//.........这里部分代码省略.........
开发者ID:Kufirc,项目名称:Gazelle,代码行数:101,代码来源:users.php

示例15: time_diff

		<td></td>
		<td><?php 
            echo time_diff($Time);
            ?>
</td>
		<td><?php 
            echo display_str($IP);
            ?>
</td>
<?php 
            $UserURL = site_url() . "user.php?id={$UserID2}";
            $DB->query("\n\t\t\t\tSELECT Enabled\n\t\t\t\tFROM users_main\n\t\t\t\tWHERE ID = {$UserID2}");
            list($Enabled) = $DB->next_record();
            $DB->set_query_id($ueQuery);
            ?>
		<td><a href="<?php 
            echo display_str($UserURL);
            ?>
"><?php 
            echo Users::format_username($UserID2, false, false, true);
            ?>
</a></td>
	</tr>
<?php 
        }
    }
}
?>
</table>
<?php 
View::show_footer();
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:email_history.php


注:本文中的Users::format_username方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。