コード例 #1
0
ファイル: friends.php プロジェクト: karamanolev/Gazelle
// Main query
$DB->query("\n\tSELECT\n\t\tSQL_CALC_FOUND_ROWS\n\t\tf.FriendID,\n\t\tf.Comment,\n\t\tm.Username,\n\t\tm.Uploaded,\n\t\tm.Downloaded,\n\t\tm.PermissionID,\n\t\tm.Paranoia,\n\t\tm.LastAccess,\n\t\ti.Avatar\n\tFROM friends AS f\n\t\tJOIN users_main AS m ON f.FriendID = m.ID\n\t\tJOIN users_info AS i ON f.FriendID = i.UserID\n\tWHERE f.UserID = '{$UserID}'\n\tORDER BY Username\n\tLIMIT {$Limit}");
$Friends = $DB->to_array(false, MYSQLI_BOTH, array(6, 'Paranoia'));
// Number of results (for pagination)
$DB->query('SELECT FOUND_ROWS()');
list($Results) = $DB->next_record();
// Start printing stuff
?>
<div class="thin">
	<div class="header">
		<h2>Friends List</h2>
	</div>
	<div class="linkbox">
<?php 
// Pagination
$Pages = Format::get_pages($Page, $Results, FRIENDS_PER_PAGE, 9);
echo $Pages;
?>
	</div>
	<div class="box pad">
<?php 
if ($Results == 0) {
    echo '<p>You have no friends! :(</p>';
}
// Start printing out friends
foreach ($Friends as $Friend) {
    list($FriendID, $Comment, $Username, $Uploaded, $Downloaded, $Class, $Paranoia, $LastAccess, $Avatar) = $Friend;
    ?>
<form class="manage_form" name="friends" action="friends.php" method="post">
	<input type="hidden" name="auth" value="<?php 
    echo $LoggedUser['AuthKey'];
コード例 #2
0
ファイル: questions.php プロジェクト: Kufirc/Gazelle
if (!check_perms("users_mod")) {
    error(404);
}
Text::$TOC = true;
define('QUESTIONS_PER_PAGE', 25);
list($Page, $Limit) = Format::page_limit(QUESTIONS_PER_PAGE);
$DB->query("\n\t\tSELECT\n\t\t\tuq.ID,\n\t\t\tuq.Question,\n\t\t\tuq.UserID,\n\t\t\tuq.Date,\n\t\t\t(\n\t\t\t\tSELECT COUNT(1)\n\t\t\t\tFROM staff_answers AS sa\n\t\t\t\tWHERE sa.QuestionID = uq.ID\n\t\t\t) AS Responses\n\t\tFROM user_questions AS uq\n\t\tWHERE uq.ID NOT IN\n\t\t\t\t(\n\t\t\t\t\tSELECT siq.QuestionID\n\t\t\t\t\tFROM staff_ignored_questions AS siq\n\t\t\t\t\tWHERE siq.UserID = '{$LoggedUser['ID']}'\n\t\t\t\t)\n\t\t\tAND uq.ID NOT IN\n\t\t\t\t(\n\t\t\t\t\tSELECT sq.QuestionID\n\t\t\t\t\tFROM staff_answers AS sq\n\t\t\t\t\tWHERE sq.UserID = '{$LoggedUser['ID']}'\n\t\t\t\t)\n\t\tORDER BY uq.Date DESC\n\t\tLIMIT {$Limit}");
$Questions = $DB->to_array();
$DB->query("\n\tSELECT COUNT(1)\n\tFROM user_questions");
list($TotalQuestions) = $DB->next_record();
View::show_header('Ask the Staff', 'questions,bbcode');
if ($TotalQuestions > QUESTIONS_PER_PAGE) {
    ?>
	<div class="linkbox">
<?php 
    $Pages = Format::get_pages($Page, $TotalQuestions, QUESTIONS_PER_PAGE);
    echo $Pages;
    ?>
	</div>
<?php 
}
?>
<div class="thin">
	<div class="header">
		<h2>User Questions</h2>
		<h3><?php 
echo number_format($TotalQuestions);
?>
 questions asked; <?php 
echo number_format(count($Questions));
?>
コード例 #3
0
ファイル: notify.php プロジェクト: Kufirc/Gazelle
    $Results = $DB->to_array(false, MYSQLI_ASSOC, false);
} else {
    $DB->query("\n\t\tSELECT\n\t\t\tSQL_CALC_FOUND_ROWS\n\t\t\tunt.TorrentID,\n\t\t\tunt.UnRead,\n\t\t\tunt.FilterID,\n\t\t\tt.GroupID\n\t\tFROM users_notify_torrents AS unt\n\t\t\tJOIN torrents AS t ON t.ID = unt.TorrentID\n\t\tWHERE unt.UserID = {$UserID}" . ($FilterID ? " AND unt.FilterID = {$FilterID}" : '') . "\n\t\tORDER BY {$OrderCol} {$OrderWay}\n\t\tLIMIT {$Limit}");
    $Results = $DB->to_array(false, MYSQLI_ASSOC, false);
    $DB->query('SELECT FOUND_ROWS()');
    list($TorrentCount) = $DB->next_record();
}
$GroupIDs = $FilterIDs = $UnReadIDs = array();
foreach ($Results as $Torrent) {
    $GroupIDs[$Torrent['GroupID']] = 1;
    $FilterIDs[$Torrent['FilterID']] = 1;
    if ($Torrent['UnRead']) {
        $UnReadIDs[] = $Torrent['TorrentID'];
    }
}
$Pages = Format::get_pages($Page, $TorrentCount, NOTIFICATIONS_PER_PAGE, 9);
if (!empty($GroupIDs)) {
    $GroupIDs = array_keys($GroupIDs);
    $FilterIDs = array_keys($FilterIDs);
    $TorrentGroups = Torrents::get_groups($GroupIDs);
    // Get the relevant filter labels
    $DB->query('
		SELECT ID, Label, Artists
		FROM users_notify_filters
		WHERE ID IN (' . implode(',', $FilterIDs) . ')');
    $Filters = $DB->to_array('ID', MYSQLI_ASSOC, array('Artists'));
    foreach ($Filters as &$Filter) {
        $Filter['Artists'] = explode('|', trim($Filter['Artists'], '|'));
        foreach ($Filter['Artists'] as &$FilterArtist) {
            $FilterArtist = mb_strtolower($FilterArtist, 'UTF-8');
        }
コード例 #4
0
ファイル: advancedsearch.php プロジェクト: Kufirc/Gazelle
	</form>
</div>
<?php 
if ($RunQuery) {
    $Results = $DB->query($SQL);
    $DB->query('SELECT FOUND_ROWS()');
    list($NumResults) = $DB->next_record();
    $DB->set_query_id($Results);
} else {
    $DB->query('SET @nothing = 0');
    $NumResults = 0;
}
?>
<div class="linkbox">
<?php 
$Pages = Format::get_pages($Page, $NumResults, USERS_PER_PAGE, 11);
echo $Pages;
?>
</div>
<div class="box pad center">
	<h2><?php 
echo number_format($NumResults);
?>
 results</h2>
	<table width="100%">
		<tr class="colhead">
			<td>Username</td>
			<td>Ratio</td>
			<td>IP address</td>
			<td>Email</td>
			<td>Joined</td>
コード例 #5
0
ファイル: staff_inbox.php プロジェクト: Kufirc/Gazelle
        }
        break;
}
list($Page, $Limit) = Format::page_limit(MESSAGES_PER_PAGE);
// Get messages
$StaffPMs = $DB->query("\n\tSELECT\n\t\tSQL_CALC_FOUND_ROWS\n\t\tID,\n\t\tSubject,\n\t\tUserID,\n\t\tStatus,\n\t\tLevel,\n\t\tAssignedToUser,\n\t\tDate,\n\t\tUnread,\n\t\tResolverID\n\tFROM staff_pm_conversations\n\t{$WhereCondition}\n\tORDER BY {$SortStr} Level DESC, Date DESC\n\tLIMIT {$Limit}\n");
$DB->query('SELECT FOUND_ROWS()');
list($NumResults) = $DB->next_record();
$DB->set_query_id($StaffPMs);
$CurURL = Format::get_url();
if (empty($CurURL)) {
    $CurURL = 'staffpm.php?';
} else {
    $CurURL = "staffpm.php?{$CurURL}&";
}
$Pages = Format::get_pages($Page, $NumResults, MESSAGES_PER_PAGE, 9);
$Row = 'a';
// Start page
?>
<div class="thin">
	<div class="header">
		<h2><?php 
echo $ViewString;
?>
 Staff PMs</h2>
		<div class="linkbox">
<?php 
if ($IsStaff) {
    ?>
			<a href="staffpm.php" class="brackets">View your unanswered</a>
<?php 
コード例 #6
0
ファイル: thread.php プロジェクト: mohirt/Gazelle
						<tr>
							<td><strong>Posted by:</strong></td>
							<td><input type="search" id="username" name="user" placeholder="Username" size="70" /></td>
						</tr>
						<tr>
							<td colspan="2" style="text-align: center;">
								<input type="submit" name="submit" value="Search" />
							</td>
						</tr>
					</table>
				</form>
				<br />
			</div>
		</div>
<?php 
$Pages = Format::get_pages($Page, $ThreadInfo['Posts'], $PerPage, 9);
echo $Pages;
?>
	</div>
<?php 
if ($ThreadInfo['NoPoll'] == 0) {
    if (!(list($Question, $Answers, $Votes, $Featured, $Closed) = $Cache->get_value("polls_{$ThreadID}"))) {
        $DB->query("\n\t\t\tSELECT Question, Answers, Featured, Closed\n\t\t\tFROM forums_polls\n\t\t\tWHERE TopicID = '{$ThreadID}'");
        list($Question, $Answers, $Featured, $Closed) = $DB->next_record(MYSQLI_NUM, array(1));
        $Answers = unserialize($Answers);
        $DB->query("\n\t\t\tSELECT Vote, COUNT(UserID)\n\t\t\tFROM forums_polls_votes\n\t\t\tWHERE TopicID = '{$ThreadID}'\n\t\t\tGROUP BY Vote");
        $VoteArray = $DB->to_array(false, MYSQLI_NUM);
        $Votes = array();
        foreach ($VoteArray as $VoteSet) {
            list($Key, $Value) = $VoteSet;
            $Votes[$Key] = $Value;
コード例 #7
0
ファイル: user.php プロジェクト: Kufirc/Gazelle
    $SQL = "\n\t\tSELECT\n\t\t\tSQL_CALC_FOUND_ROWS\n\t\t\tGroupID,\n\t\t\tTorrentID,\n\t\t\tTime,\n\t\t\tCategoryID\n\t\tFROM temp_sections_torrents_user";
    if (!empty($Words)) {
        $SQL .= "\n\t\tWHERE Name LIKE '%" . implode("%' AND Name LIKE '%", $Words) . "%'";
    }
    $SQL .= "\n\t\tORDER BY {$Order} {$Way}\n\t\tLIMIT {$Limit}";
}
$DB->query($SQL);
$GroupIDs = $DB->collect('GroupID');
$TorrentsInfo = $DB->to_array('TorrentID', MYSQLI_ASSOC);
$DB->query('SELECT FOUND_ROWS()');
list($TorrentCount) = $DB->next_record();
$Results = Torrents::get_groups($GroupIDs);
$Action = display_str($_GET['type']);
$User = Users::user_info($UserID);
View::show_header($User['Username'] . "'s {$Action} torrents", 'voting');
$Pages = Format::get_pages($Page, $TorrentCount, TORRENTS_PER_PAGE);
?>
<div class="thin">
	<div class="header">
		<h2><a href="user.php?id=<?php 
echo $UserID;
?>
"><?php 
echo $User['Username'];
?>
</a><?php 
echo "'s {$Action} torrents";
?>
</h2>
	</div>
	<div>
コード例 #8
0
ファイル: request.php プロジェクト: Kufirc/Gazelle
}
?>
		</table>
		<div class="box box2 box_request_desc">
			<div class="head"><strong>Description</strong></div>
			<div class="pad">
<?php 
echo Text::full_format($Request['Description']);
?>
			</div>
		</div>
	<div id="request_comments">
		<div class="linkbox">
			<a name="comments"></a>
<?php 
$Pages = Format::get_pages($Page, $NumComments, TORRENT_COMMENTS_PER_PAGE, 9, '#comments');
echo $Pages;
?>
		</div>
<?php 
//---------- Begin printing
CommentsView::render_comments($Thread, $LastRead, "requests.php?action=view&amp;id={$RequestID}");
if ($Pages) {
    ?>
		<div class="linkbox pager"><?php 
    echo $Pages;
    ?>
</div>
<?php 
}
View::parse('generic/reply/quickreply.php', array('InputName' => 'pageid', 'InputID' => $RequestID, 'Action' => 'comments.php?page=requests', 'InputAction' => 'take_post', 'SubscribeBox' => true));
コード例 #9
0
ファイル: bans.php プロジェクト: Kufirc/Gazelle
if (!empty($_REQUEST['notes'])) {
    $sql .= "WHERE Reason LIKE '%" . db_string($_REQUEST['notes']) . "%' ";
}
if (!empty($_REQUEST['ip']) && preg_match('/' . IP_REGEX . '/', $_REQUEST['ip'])) {
    if (!empty($_REQUEST['notes'])) {
        $sql .= "AND '" . Tools::ip_to_unsigned($_REQUEST['ip']) . "' BETWEEN FromIP AND ToIP ";
    } else {
        $sql .= "WHERE '" . Tools::ip_to_unsigned($_REQUEST['ip']) . "' BETWEEN FromIP AND ToIP ";
    }
}
$sql .= "ORDER BY FromIP ASC";
$sql .= " LIMIT " . $Limit;
$Bans = $DB->query($sql);
$DB->query('SELECT FOUND_ROWS()');
list($Results) = $DB->next_record();
$PageLinks = Format::get_pages($Page, $Results, BANS_PER_PAGE, 11);
View::show_header('IP Address Bans');
$DB->set_query_id($Bans);
?>

<div class="header">
	<h2>IP Address Bans</h2>
</div>
<div>
	<form class="search_form" name="bans" action="" method="get">
		<table cellpadding="6" cellspacing="1" border="0" class="layout border" width="100%">
			<tr>
				<td class="label"><label for="ip">IP address:</label></td>
				<td>
					<input type="hidden" name="action" value="ip_ban" />
					<input type="search" id="ip" name="ip" size="20" value="<?php 
コード例 #10
0
ファイル: donor_rewards.php プロジェクト: Kufirc/Gazelle
if (!check_perms('users_mod')) {
    error(403);
}
define('USERS_PER_PAGE', 50);
list($Page, $Limit) = Format::page_limit(USERS_PER_PAGE);
$SearchQuery = '';
if ($_GET['username']) {
    $SearchString = db_string($_GET['username']);
    $SearchQuery = " WHERE Username LIKE '%{$SearchString}%' ";
}
$Title = "Donor Rewards";
$DB->query("\n\tSELECT\n\t\tSQL_CALC_FOUND_ROWS\n\t\tu.Username,\n\t\td.UserID,\n\t\td.Rank,\n\t\td.Hidden,\n\t\td.DonationTime,\n\t\tr.IconMouseOverText,\n\t\tr.AvatarMouseOverText,\n\t\tr.CustomIcon,\n\t\tr.SecondAvatar,\n\t\tr.CustomIconLink\n\tFROM users_donor_ranks AS d\n\t\tLEFT JOIN users_main AS u ON u.ID = d.UserID\n\t\tLEFT JOIN donor_rewards AS r ON r.UserID = d.UserID\n\t{$SearchQuery}\n\tORDER BY d.Rank DESC\n\tLIMIT {$Limit}");
$Users = $DB->to_array();
$DB->query('SELECT FOUND_ROWS()');
list($Results) = $DB->next_record();
$Pages = Format::get_pages($Page, $Results, USERS_PER_PAGE, 9);
View::show_header($Title);
?>
<div class="header">
	<h2><?php 
echo $Title;
?>
</h2>
	<div class="linkbox">
		<?php 
echo $Pages;
?>
	</div>
</div>

<form action="" method="get">
コード例 #11
0
ファイル: search.php プロジェクト: Kufirc/Gazelle
        $SQL .= " AND t.AuthorID = '{$AuthorID}' ";
    }
    if (!empty($ThreadAfterDate)) {
        $SQL .= " AND t.CreatedTime >= '{$ThreadAfterDate}'";
    }
    if (!empty($ThreadBeforeDate)) {
        $SQL .= " AND t.CreatedTime <= '{$ThreadBeforeDate}'";
    }
    $SQL .= "\n\t\tORDER BY t.LastPostTime DESC\n\t\tLIMIT {$Limit}";
}
// Perform the query
$Records = $DB->query($SQL);
$DB->query('SELECT FOUND_ROWS()');
list($Results) = $DB->next_record();
$DB->set_query_id($Records);
$Pages = Format::get_pages($Page, $Results, POSTS_PER_PAGE, 9);
echo $Pages;
?>
	</div>
	<table cellpadding="6" cellspacing="1" border="0" class="forum_list border" width="100%">
	<tr class="colhead">
		<td>Forum</td>
		<td><?php 
echo !empty($ThreadID) ? 'Post begins' : 'Topic';
?>
</td>
		<td>Topic creation time</td>
		<td>Last post time</td>
	</tr>
<?php 
if (!$DB->has_results()) {
コード例 #12
0
ファイル: user_flow.php プロジェクト: Kufirc/Gazelle
    echo $Max;
    ?>
&amp;chd=t:<?php 
    echo implode(',', $InFlow);
    ?>
|<?php 
    echo implode(',', $OutFlow);
    ?>
&amp;chls=2,4,0&amp;chdl=New+Registrations|Disabled+Users&amp;chf=bg,s,FFFFFF00" alt="User Flow vs. Time" />
	</div>
<?php 
}
?>
	<div class="linkbox">
<?php 
$Pages = Format::get_pages($Page, $Results, DAYS_PER_PAGE, 11);
echo $Pages;
?>
	</div>
	<table width="100%">
		<tr class="colhead">
			<td>Date</td>
			<td>(+) Joined</td>
			<td>(-) Manual</td>
			<td>(-) Ratio</td>
			<td>(-) Inactivity</td>
			<td>(-) Total</td>
			<td>Net Growth</td>
		</tr>
<?php 
while (list($Date, $Month, $Joined, $Manual, $Ratio, $Inactivity) = $DB->next_record()) {
コード例 #13
0
ファイル: search.php プロジェクト: Kufirc/Gazelle
}
?>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="4" class="center">
						<input type="submit" value="Search" />
					</td>
				</tr>
			</table>
		</form>
	</div>
	<br />
<?php 
$Pages = Format::get_pages($Page, $NumResults, ARTICLES_PER_PAGE);
if ($Pages) {
    ?>
	<div class="linkbox pager"><?php 
    echo $Pages;
    ?>
</div>
<?php 
}
?>
<table width="100%">
	<tr class="colhead">
		<td>Article</td>
		<td>Last updated on</td>
		<td>Last edited by</td>
	</tr>
コード例 #14
0
<?php 
if ($UnreadSQL) {
    ?>
			<a href="userhistory.php?action=quote_notifications&amp;showall=1" class="brackets">Show all quotes</a>&nbsp;&nbsp;&nbsp;
<?php 
} else {
    ?>
			<a href="userhistory.php?action=quote_notifications" class="brackets">Show unread quotes</a>&nbsp;&nbsp;&nbsp;
<?php 
}
?>
			<a href="userhistory.php?action=subscriptions" class="brackets">Show subscriptions</a>&nbsp;&nbsp;&nbsp;
			<a href="userhistory.php?action=quote_notifications&amp;catchup=1" class="brackets">Catch up</a>&nbsp;&nbsp;&nbsp;
			<br /><br />
<?php 
$Pages = Format::get_pages($Page, $NumResults, TOPICS_PER_PAGE, 9);
echo $Pages;
?>
		</div>
	</div>
<?php 
if (!$NumResults) {
    ?>
	<div class="center">No<?php 
    echo $UnreadSQL ? ' new' : '';
    ?>
 quotes.</div>
<?php 
}
?>
	<br />
コード例 #15
0
ファイル: subscriptions.php プロジェクト: karamanolev/Gazelle
		</div>
	</div>
<?php 
if (!$NumResults) {
    ?>
	<div class="center">
		No subscriptions<?php 
    echo $ShowUnread ? ' with unread posts' : '';
    ?>
	</div>
<?php 
} else {
    ?>
	<div class="linkbox">
<?php 
    $Pages = Format::get_pages($Page, $NumResults, $PerPage, 11);
    echo $Pages;
    ?>
	</div>
<?php 
    foreach ($Results as $Result) {
        switch ($Result['Page']) {
            case 'artist':
                $Links = 'Artist: <a href="artist.php?id=' . $Result['PageID'] . '">' . display_str($Result['Name']) . '</a>';
                $JumpLink = 'artist.php?id=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
                break;
            case 'collages':
                $Links = 'Collage: <a href="collages.php?id=' . $Result['PageID'] . '">' . display_str($Result['Name']) . '</a>';
                $JumpLink = 'collages.php?action=comments&collageid=' . $Result['PageID'] . '&amp;postid=' . $Result['PostID'] . '#post' . $Result['PostID'];
                break;
            case 'requests':
コード例 #16
0
ファイル: index.php プロジェクト: Kufirc/Gazelle
?>
 />
						&nbsp;
						<input type="submit" value="Search log" />
					</td>
				</tr>
			</table>
		</form>
	</div>

<?php 
if ($TotalMatches > LOG_ENTRIES_PER_PAGE) {
    ?>
	<div class="linkbox">
<?php 
    $Pages = Format::get_pages($Page, $TotalMatches, LOG_ENTRIES_PER_PAGE, 9);
    echo $Pages;
    ?>
	</div>
<?php 
}
?>
	<table cellpadding="6" cellspacing="1" border="0" class="log_table border" id="log_table" width="100%">
		<tr class="colhead">
			<td style="width: 180px;"><strong>Time</strong></td>
			<td><strong>Message</strong></td>
		</tr>
<?php 
if ($QueryStatus) {
    ?>
	<tr class="nobr"><td colspan="2">Search request failed (<?php 
コード例 #17
0
ファイル: token_history.php プロジェクト: Kufirc/Gazelle
    }
    $DB->query("\n\t\tSELECT info_hash\n\t\tFROM torrents\n\t\tWHERE ID = {$TorrentID}");
    if (list($InfoHash) = $DB->next_record(MYSQLI_NUM, FALSE)) {
        $DB->query("\n\t\t\tUPDATE users_freeleeches\n\t\t\tSET Expired = TRUE\n\t\t\tWHERE UserID = {$UserID}\n\t\t\t\tAND TorrentID = {$TorrentID}");
        $Cache->delete_value("users_tokens_{$UserID}");
        Tracker::update_tracker('remove_token', array('info_hash' => rawurlencode($InfoHash), 'userid' => $UserID));
    }
    header("Location: userhistory.php?action=token_history&userid={$UserID}");
}
View::show_header('Freeleech token history');
list($Page, $Limit) = Format::page_limit(25);
$DB->query("\n\tSELECT\n\t\tSQL_CALC_FOUND_ROWS\n\t\tf.TorrentID,\n\t\tt.GroupID,\n\t\tf.Time,\n\t\tf.Expired,\n\t\tf.Downloaded,\n\t\tf.Uses,\n\t\tg.Name,\n\t\tt.Format,\n\t\tt.Encoding\n\tFROM users_freeleeches AS f\n\t\tLEFT JOIN torrents AS t ON t.ID = f.TorrentID\n\t\tLEFT JOIN torrents_group AS g ON g.ID = t.GroupID\n\tWHERE f.UserID = {$UserID}\n\tORDER BY f.Time DESC\n\tLIMIT {$Limit}");
$Tokens = $DB->to_array();
$DB->query('SELECT FOUND_ROWS()');
list($NumResults) = $DB->next_record();
$Pages = Format::get_pages($Page, $NumResults, 25);
?>
<div class="header">
	<h2>Freeleech token history for <?php 
echo Users::format_username($UserID, false, false, false);
?>
</h2>
</div>
<div class="linkbox"><?php 
echo $Pages;
?>
</div>
<table>
	<tr class="colhead_dark">
		<td>Torrent</td>
		<td>Time</td>
コード例 #18
0
ファイル: requests.php プロジェクト: Kufirc/Gazelle
} else {
    $Page = 1;
    $SphQL->limit(0, REQUESTS_PER_PAGE, REQUESTS_PER_PAGE);
}
$SphQLResult = $SphQL->query();
$NumResults = (int) $SphQLResult->get_meta('total_found');
if ($NumResults > 0) {
    $SphRequests = $SphQLResult->to_array('id');
    if ($OrderBy === 'random') {
        $NumResults = count($SphRequests);
    }
    if ($NumResults > REQUESTS_PER_PAGE) {
        if (($Page - 1) * REQUESTS_PER_PAGE > $NumResults) {
            $Page = 0;
        }
        $PageLinks = Format::get_pages($Page, $NumResults, REQUESTS_PER_PAGE);
    }
}
$CurrentURL = Format::get_url(array('order', 'sort', 'page'));
View::show_header($Title, 'requests');
?>
<div class="thin">
	<div class="header">
		<h2><?php 
echo $Title;
?>
</h2>
	</div>
	<div class="linkbox">
<?php 
if (!$BookmarkView) {
コード例 #19
0
ファイル: browse.php プロジェクト: nguyenducduy/Gazelle
, but the search returned only <?php 
echo number_format($LastPage);
?>
 pages.</p>
</div>
<div class="linkbox">Go to page <?php 
echo $Pages;
?>
</div>
</div>
<?
View::show_footer();die();
}

// List of pages
$Pages = Format::get_pages($Page, $NumResults, TORRENTS_PER_PAGE);

$Bookmarks = Bookmarks::all_bookmarks('torrent');
?>

<div class="linkbox"><?php 
echo $Pages;
?>
</div>

<table class="torrent_table cats <?php 
echo $GroupResults ? 'grouping' : 'no_grouping';
?>
" id="torrent_table">
	<tr class="colhead">
<?	if ($GroupResults) { ?>
コード例 #20
0
ファイル: reports.php プロジェクト: Kufirc/Gazelle
$DB->set_query_id($Reports);
// Start printing stuff
?>
<div class="thin">
	<div class="header">
		<h2>Active Reports</h2>
		<div class="linkbox">
			<a href="reports.php">New</a> |
			<a href="reports.php?view=old">Old</a> |
			<a href="reports.php?action=stats">Stats</a>
		</div>
	</div>
	<div class="linkbox">
<?php 
// pagination
$Pages = Format::get_pages($Page, $Results, REPORTS_PER_PAGE, 11);
echo $Pages;
?>
	</div>
<?php 
while (list($ReportID, $SnitchID, $SnitchName, $ThingID, $Short, $ReportedTime, $Reason, $Status, $ClaimerID, $Notes, $ResolverID) = $DB->next_record()) {
    $Type = $Types[$Short];
    $Reference = "reports.php?id={$ReportID}#report{$ReportID}";
    ?>
		<div id="report_<?php 
    echo $ReportID;
    ?>
" style="margin-bottom: 1em;" class="pending_report_v1">
			<table cellpadding="5" id="report_<?php 
    echo $ReportID;
    ?>
コード例 #21
0
ファイル: donation_log.php プロジェクト: Kufirc/Gazelle
					<input type="date" name="after_date" />
					<input type="date" name="before_date" />
				</td>
			</tr>
			<tr>
				<td>
					<input type="submit" value="Search donation log" />
				</td>
			</tr>
		</table>
	</form>
</div>
<br />
<div class="linkbox">
<?php 
$Pages = Format::get_pages($Page, $Results, DONATIONS_PER_PAGE, 11);
echo $Pages;
?>
</div>
<table width="100%">
	<tr class="colhead">
		<td>User</td>
		<td>Amount</td>
		<td>Email</td>
		<td>Source</td>
		<td>Reason</td>
		<td>Time</td>
	</tr>
<?php 
$PageTotal = 0;
foreach ($Donations as $Donation) {
コード例 #22
0
ファイル: forum.php プロジェクト: Kufirc/Gazelle
        echo $ThreadIDs;
        ?>
" class="brackets"><?php 
        echo display_str($Thread['Title']);
        ?>
</a>
<?php 
    }
    ?>
	</div>
<?php 
}
?>
	<div class="linkbox pager">
<?php 
$Pages = Format::get_pages($Page, $Forums[$ForumID]['NumTopics'], TOPICS_PER_PAGE, 9);
echo $Pages;
?>
	</div>
	<table class="forum_index" width="100%">
		<tr class="colhead">
			<td style="width: 2%;"></td>
			<td>Latest</td>
			<td style="width: 7%;">Replies</td>
			<td style="width: 14%;">Author</td>
		</tr>
<?php 
// Check that we have content to process
if (count($Forum) === 0) {
    ?>
		<tr>
コード例 #23
0
ファイル: invite_pool.php プロジェクト: Kufirc/Gazelle
					<td>
						<input type="hidden" name="action" value="invite_pool" />
						<input type="email" name="search" size="60" value="<?php 
echo display_str($Search);
?>
" />
						&nbsp;
						<input type="submit" value="Search log" />
					</td>
				</tr>
			</table>
		</form>
	</div>
	<div class="linkbox">
<?php 
$Pages = Format::get_pages($Page, $Results, INVITES_PER_PAGE, 11);
echo $Pages;
?>
	</div>
	<table width="100%">
		<tr class="colhead">
			<td>Inviter</td>
			<td>Email address</td>
			<td>IP address</td>
			<td>InviteCode</td>
			<td>Expires</td>
<?php 
if (check_perms('users_edit_invites')) {
    ?>
			<td>Controls</td>
<?php