本文整理汇总了PHP中Format::get_url方法的典型用法代码示例。如果您正苦于以下问题:PHP Format::get_url方法的具体用法?PHP Format::get_url怎么用?PHP Format::get_url使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Format
的用法示例。
在下文中一共展示了Format::get_url方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header_link
function header_link($SortKey, $DefaultWay = 'desc') {
global $OrderBy, $OrderWay;
if ($SortKey == $OrderBy) {
if ($OrderWay == 'desc') {
$NewWay = 'asc';
} else {
$NewWay = 'desc';
}
} else {
$NewWay = $DefaultWay;
}
return "torrents.php?order_way=$NewWay&order_by=$SortKey&".Format::get_url(array('order_way', 'order_by'));
}
示例2: header_link
function header_link($SortKey, $DefaultWay = 'DESC')
{
global $Order, $Way;
if ($SortKey == $Order) {
if ($Way == 'DESC') {
$NewWay = 'ASC';
} else {
$NewWay = 'DESC';
}
} else {
$NewWay = $DefaultWay;
}
return "torrents.php?way={$NewWay}&order={$SortKey}&" . Format::get_url(array('way', 'order'));
}
示例3: header_link
function header_link($SortKey, $DefaultWay = 'desc')
{
global $OrderWay;
if ($SortKey == $_GET['order_by']) {
if ($OrderWay == 'DESC') {
$NewWay = 'asc';
} else {
$NewWay = 'desc';
}
} else {
$NewWay = $DefaultWay;
}
return "?action=notify&order_way={$NewWay}&order_by={$SortKey}&" . Format::get_url(array('page', 'order_way', 'order_by'));
}
示例4: list
$ViewString = 'Your Unanswered';
$WhereCondition = "\n\t\t\t\tWHERE (Level = {$UserLevel} OR AssignedToUser = '" . $LoggedUser['ID'] . "')\n\t\t\t\t\tAND Status = 'Unanswered'";
} else {
// FLS
$ViewString = 'Unanswered';
$WhereCondition = "\n\t\t\t\tWHERE (Level <= {$UserLevel} OR AssignedToUser = '" . $LoggedUser['ID'] . "')\n\t\t\t\t\tAND Status = 'Unanswered'";
}
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>
示例5: count
}
$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) {
if (check_perms('site_submit_requests')) {
?>
<a href="requests.php?action=new" class="brackets">New request</a>
示例6:
echo $UserInfo['Username'];
?>
</a></h2>
<div class="linkbox">
<?php
if ($UsersOnly) {
?>
<a href="userhistory.php?<?php
echo Format::get_url(array('usersonly'));
?>
" class="brackets">View all IP addresses</a>
<?php
} else {
?>
<a href="userhistory.php?<?php
echo Format::get_url();
?>
&usersonly=1" class="brackets">View IP addresses with users</a>
<?php
}
?>
</div>
<?php
if ($Pages) {
?>
<div class="linkbox pager"><?php
echo $Pages;
?>
</div>
<?php
}
示例7:
$OrderBy = "um.LastAccess";
break;
case 'uploaded':
$OrderBy = "um.Uploaded";
break;
case 'downloaded':
$OrderBy = "um.Downloaded";
break;
case 'ratio':
$OrderBy = "(um.Uploaded / um.Downloaded)";
break;
default:
$OrderBy = "um.ID";
break;
}
$CurrentURL = Format::get_url(array('action', 'order', 'sort'));
$DB->query("\n\tSELECT\n\t\tID,\n\t\tEmail,\n\t\tUploaded,\n\t\tDownloaded,\n\t\tJoinDate,\n\t\tLastAccess\n\tFROM users_main AS um\n\t\tLEFT JOIN users_info AS ui ON ui.UserID = um.ID\n\tWHERE ui.Inviter = '{$UserID}'\n\tORDER BY {$OrderBy} {$CurrentSort}");
$Invited = $DB->to_array();
View::show_header('Invites');
?>
<div class="thin">
<div class="header">
<h2><?php
echo Users::format_username($UserID, false, false, false);
?>
> Invites</h2>
<div class="linkbox">
<a href="user.php?action=invitetree<?php
if ($Sneaky) {
echo '&userid=' . $UserID;
}
示例8: db_string
$Search = db_string($_GET['search']);
if ($_GET['searchtype'] === 'user') {
$sql .= "um.Username LIKE '{$Search}' AND ";
} elseif ($_GET['searchtype'] === 'subject') {
$Words = explode(' ', $Search);
$sql .= "c.Subject LIKE '%" . implode("%' AND c.Subject LIKE '%", $Words) . "%' AND ";
} elseif ($_GET['searchtype'] === 'message') {
$Words = explode(' ', $Search);
$sql .= "m.Body LIKE '%" . implode("%' AND m.Body LIKE '%", $Words) . "%' AND ";
}
}
$sql .= $Section === 'sentbox' ? ' cu.InSentbox' : ' cu.InInbox';
$sql .= " = '1'";
$sql .= "\n\tGROUP BY c.ID\n\tORDER BY cu.Sticky, {$Sort}\n\tLIMIT {$Limit}";
$Results = $DB->query($sql);
$DB->query('SELECT FOUND_ROWS()');
list($NumResults) = $DB->next_record();
$DB->set_query_id($Results);
$CurURL = Format::get_url(array('sort'));
if (empty($CurURL)) {
$CurURL = "inbox.php?";
} else {
$CurURL = "inbox.php?" . $CurURL . "&";
}
$Pages = Format::get_pages($Page, $NumResults, MESSAGES_PER_PAGE, 9);
$JsonMessages = array();
while (list($ConvID, $Subject, $Unread, $Sticky, $ForwardedID, $ForwardedName, $SenderID, $Username, $Donor, $Warned, $Enabled, $Avatar, $Date) = $DB->next_record()) {
$JsonMessage = array('convId' => (int) $ConvID, 'subject' => $Subject, 'unread' => $Unread == 1, 'sticky' => $Sticky == 1, 'forwardedId' => (int) $ForwardedID, 'forwardedName' => $ForwardedName, 'senderId' => (int) $SenderID, 'username' => $Username, 'avatar' => $Avatar, 'donor' => $Donor == 1, 'warned' => $Warned == 1, 'enabled' => $Enabled == 2 ? false : true, 'date' => $Date);
$JsonMessages[] = $JsonMessage;
}
print json_encode(array('status' => 'success', 'response' => array('currentPage' => (int) $Page, 'pages' => ceil($NumResults / MESSAGES_PER_PAGE), 'messages' => $JsonMessages)));
示例9: array
Users::update_site_options($LoggedUser['ID'], array('DisableFreeTorrentTop10' => $DisableFreeTorrentTop10));
}
}
// Modify the Where query
if ($DisableFreeTorrentTop10) {
$Where[] = "t.FreeTorrent='0'";
}
// The link should say the opposite of the current setting
$FreeleechToggleName = $DisableFreeTorrentTop10 ? 'show' : 'hide';
$FreeleechToggleQuery = Format::get_url(array('freeleech', 'groups'));
if (!empty($FreeleechToggleQuery)) {
$FreeleechToggleQuery .= '&';
}
$FreeleechToggleQuery .= 'freeleech=' . $FreeleechToggleName;
$GroupByToggleName = $_GET['groups'] == 'show' ? 'hide' : 'show';
$GroupByToggleQuery = Format::get_url(array('freeleech', 'groups'));
if (!empty($GroupByToggleQuery)) {
$GroupByToggleQuery .= '&';
}
$GroupByToggleQuery .= 'groups=' . $GroupByToggleName;
$GroupBySum = '';
$GroupBy = '';
if ($_GET['groups'] == 'show') {
$GroupBy = ' GROUP BY g.ID ';
$GroupBySum = md5($GroupBy);
}
?>
<div style="text-align: right;" class="linkbox">
<a href="top10.php?<?php
echo $FreeleechToggleQuery;
?>