本文整理汇总了PHP中display_str函数的典型用法代码示例。如果您正苦于以下问题:PHP display_str函数的具体用法?PHP display_str怎么用?PHP display_str使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了display_str函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display_array
function display_array($Array, $Escape = array()) {
foreach ($Array as $Key => $Val) {
if((!is_array($Escape) && $Escape == true) || !in_array($Key, $Escape)) {
$Array[$Key] = display_str($Val);
}
}
return $Array;
}
示例2: strip_bbcode
function strip_bbcode($Str)
{
$Str = display_str($Str);
//Inline links
$Str = preg_replace('/(?<!(\\[url\\]|\\[url\\=|\\[img\\=|\\[img\\]))http(s)?:\\/\\//i', '$1[inlineurl]http$2://', $Str);
$Str = $this->parse($Str);
$Str = $this->raw_text($Str);
$Str = nl2br($Str);
return $Str;
}
示例3: retrieve
function retrieve($CacheKey,$AuthKey,$PassKey) {
global $Cache;
$Entries = $Cache->get_value($CacheKey);
if(!$Entries){
$Entries = array();
} else {
foreach($Entries as $Item){
echo str_replace(array('[[PASSKEY]]','[[AUTHKEY]]'),array(display_str($PassKey),display_str($AuthKey)),$Item);
}
}
}
示例4: make_concert_link
function make_concert_link($Event)
{
// The event doesn't have a start date (this should never happen)
if ($Event['startDate'] == '') {
return;
}
$Date = get_date_title($Event['startDate']);
$ConcertTitle = $Date . ' - ' . $Event['venue']['name'] . ' at ' . $Event['venue']['location']['city'] . ', ' . $Event['venue']['location']['country'];
$Concert = "<a href=\"" . $Event['url'] . "\">{$ConcertTitle}</a>";
?>
<form class="hidden" action="" id="concert<?php
echo $Event['id'];
?>
" method="post">
<input type="hidden" name="action" value="concert_thread" />
<input type="hidden" name="concert_title" value="<?php
echo '[Concert] ' . display_str($Name) . " - {$ConcertTitle}";
?>
" />
<input type="hidden" name="concert_id" value="<?php
echo $Event['id'];
?>
" />
<input type="hidden" name="concert_template" value="<?php
echo get_concert_post_template($Name, $Event);
?>
" />
</form>
<li><?php
echo $Concert;
?>
- <a href="#" class="brackets" onclick="$('#concert<?php
echo $Event['id'];
?>
').raw().submit(); return false;">Go to thread</a></li>
<?php
}
示例5: elseif
break;
case 'torrents_vinyl':
$Feed->channel('Vinyl Sourced Torrents', 'RSS feed for all new vinyl sourced torrents.');
$Feed->retrieve('torrents_vinyl',$_GET['authkey'],$_GET['passkey']);
break;
case 'torrents_lossless':
$Feed->channel('Lossless Torrents', 'RSS feed for all new lossless uploads.');
$Feed->retrieve('torrents_lossless',$_GET['authkey'],$_GET['passkey']);
break;
case 'torrents_lossless24':
$Feed->channel('24bit Lossless Torrents', 'RSS feed for all new 24bit uploads.');
$Feed->retrieve('torrents_lossless24',$_GET['authkey'],$_GET['passkey']);
break;
default:
// Personalized torrents
if(empty($_GET['name']) && substr($_GET['feed'], 0, 16) == 'torrents_notify_'){
// All personalized torrent notifications
$Feed->channel('Personalized torrent notifications', 'RSS feed for personalized torrent notifications.');
$Feed->retrieve($_GET['feed'],$_GET['authkey'],$_GET['passkey']);
} elseif(!empty($_GET['name']) && substr($_GET['feed'], 0, 16) == 'torrents_notify_'){
// Specific personalized torrent notification channel
$Feed->channel(display_str($_GET['name']), 'Personal RSS feed: '.display_str($_GET['name']));
$Feed->retrieve($_GET['feed'],$_GET['authkey'],$_GET['passkey']);
} else {
$Feed->channel('All Torrents', 'RSS feed for all new torrent uploads.');
$Feed->retrieve('torrents_all',$_GET['authkey'],$_GET['passkey']);
}
}
$Feed->close_feed();
?>
示例6: format_username
<td><?php
echo format_username($UserID, $Username, $Donor, $Warned, $Enabled, $PermissionID);
?>
</td>
<td><span style="float:left;"><?php
echo display_str($IP);
?>
</span><span style="float:right;">[<a href="userhistory.php?action=ips&userid=<?php
echo $UserID;
?>
" title="History">H</a>|<a href="user.php?action=search&ip_history=on&ip=<?php
echo display_str($IP);
?>
" title="Search">S</a>]</span></td>
<td><?php
echo display_str($Uses);
?>
</td>
<td><?php
echo time_diff($Joined);
?>
</td>
</tr>
<? } ?>
</table>
<div class="linkbox">
<? echo $Pages; ?>
</div>
<? } else { ?>
<h2 align="center">There are currently no users with more then <?php
echo IP_OVERLAPS;
示例7: get_pages
<div class="thin">
<h3>Search results</h3>
<div class="linkbox">
<?php
$Pages = get_pages($Page, $NumResults, USERS_PER_PAGE, 9);
echo $Pages;
?>
</div>
<form action="user.php" method="get">
<input type="hidden" name="action" value="search" />
<table width="100%">
<tr>
<td class="label nobr">Username:</td>
<td>
<input type="text" name="username" size="60" value="<?php
echo display_str($_GET['username']);
?>
" />
<input type="submit" value="Search users" />
</td>
</tr>
</table>
</form>
<br />
<div class="box pad center">
<table style="width:400px;margin:0px auto;">
<tr class="colhead">
<td width="50%">Username</td>
<td>Class</td>
</tr>
示例8: edition_string
public static function edition_string(array $Torrent, array $Group)
{
if ($Torrent['Remastered'] && $Torrent['RemasterYear'] != 0) {
$EditionName = $Torrent['RemasterYear'];
$AddExtra = ' - ';
if ($Torrent['RemasterRecordLabel']) {
$EditionName .= $AddExtra . display_str($Torrent['RemasterRecordLabel']);
$AddExtra = ' / ';
}
if ($Torrent['RemasterCatalogueNumber']) {
$EditionName .= $AddExtra . display_str($Torrent['RemasterCatalogueNumber']);
$AddExtra = ' / ';
}
if ($Torrent['RemasterTitle']) {
$EditionName .= $AddExtra . display_str($Torrent['RemasterTitle']);
$AddExtra = ' / ';
}
$EditionName .= $AddExtra . display_str($Torrent['Media']);
} else {
$AddExtra = ' / ';
if (!$Torrent['Remastered']) {
$EditionName = 'Original Release';
if ($Group['RecordLabel']) {
$EditionName .= $AddExtra . $Group['RecordLabel'];
$AddExtra = ' / ';
}
if ($Group['CatalogueNumber']) {
$EditionName .= $AddExtra . $Group['CatalogueNumber'];
$AddExtra = ' / ';
}
} else {
$EditionName = 'Unknown Release(s)';
}
$EditionName .= $AddExtra . display_str($Torrent['Media']);
}
return $EditionName;
}
示例9: display_str
?>
">
<?php
$OpenGroup = true;
}
?>
<option value="<?php
echo $Forum['ID'];
?>
"<?php
if ($ThreadInfo['ForumID'] == $Forum['ID']) {
echo ' selected="selected"';
}
?>
><?php
echo display_str($Forum['Name']);
?>
</option>
<?php
}
?>
</optgroup>
</select>
</td>
</tr>
<?php
if (check_perms('site_admin_forums')) {
?>
<tr>
<td class="label"><label for="delete_thread_checkbox">Delete thread</label></td>
<td>
示例10: list
case 'collage':
$DB->query("\n\t\t\t\t\t\t\t\t\t\tSELECT Name\n\t\t\t\t\t\t\t\t\t\tFROM collages\n\t\t\t\t\t\t\t\t\t\tWHERE ID = {$ThingID}");
if (!$DB->has_results()) {
echo 'No collage with the reported ID found';
} else {
list($Name) = $DB->next_record();
echo "<a href=\"collages.php?id={$ThingID}\">" . display_str($Name) . '</a>';
}
break;
case 'thread':
$DB->query("\n\t\t\t\t\t\t\t\t\t\tSELECT Title\n\t\t\t\t\t\t\t\t\t\tFROM forums_topics\n\t\t\t\t\t\t\t\t\t\tWHERE ID = {$ThingID}");
if (!$DB->has_results()) {
echo 'No forum thread with the reported ID found';
} else {
list($Title) = $DB->next_record();
echo "<a href=\"forums.php?action=viewthread&threadid={$ThingID}\">" . display_str($Title) . '</a>';
}
break;
case 'post':
if (isset($LoggedUser['PostsPerPage'])) {
$PerPage = $LoggedUser['PostsPerPage'];
} else {
$PerPage = POSTS_PER_PAGE;
}
$DB->query("\n\t\t\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\t\t\tp.ID,\n\t\t\t\t\t\t\t\t\t\t\tp.Body,\n\t\t\t\t\t\t\t\t\t\t\tp.TopicID,\n\t\t\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t\t\tSELECT COUNT(p2.ID)\n\t\t\t\t\t\t\t\t\t\t\t\tFROM forums_posts AS p2\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE p2.TopicID = p.TopicID\n\t\t\t\t\t\t\t\t\t\t\t\t\tAND p2.ID <= p.ID\n\t\t\t\t\t\t\t\t\t\t\t) AS PostNum\n\t\t\t\t\t\t\t\t\t\tFROM forums_posts AS p\n\t\t\t\t\t\t\t\t\t\tWHERE p.ID = {$ThingID}");
if (!$DB->has_results()) {
echo 'No forum post with the reported ID found';
} else {
list($PostID, $Body, $TopicID, $PostNum) = $DB->next_record();
echo "<a href=\"forums.php?action=viewthread&threadid={$TopicID}&post={$PostNum}#post{$PostID}\">FORUM POST ID #{$PostID}</a>";
}
示例11: format_username
list($UserID, $Amount, $Email, $Username, $PermissionID, $Enabled, $Donor, $Warned, $DonationTime) = $Donation;
?>
<tr>
<td><?php
echo format_username($UserID, $Username, $Donor, $Warned, $Enabled, $PermissionID);
?>
</td>
<td><?php
echo PAYPAL_SYMBOL;
?>
<?php
echo display_str($Amount);
?>
</td>
<td><?php
echo display_str($Email);
?>
</td>
<td><?php
echo time_diff($DonationTime);
?>
</td>
</tr>
<? } ?>
</table>
<div class="linkbox">
<?php
echo $Pages;
?>
</div>
<? show_footer(); ?>
示例12: display_str
<input type="hidden" name="auth" value="<?php
echo $LoggedUser['AuthKey'];
?>
" />
<input type="hidden" name="id" value="<?php
echo $ID;
?>
" />
<input type="text" name="email" value="<?php
echo display_str($Email);
?>
" size="30" />
</td>
<td>
<input type="text" name="comment" value="<?php
echo display_str($Comment);
?>
" size="60" />
</td>
<td>
<?php
echo format_username($UserID, $Username);
?>
<br />
<?php
echo time_diff($Time, 1);
?>
</td>
<td>
<input type="submit" name="submit" value="Edit" />
<input type="submit" name="submit" value="Delete" />
示例13: ob_get_clean
$TorrentTable .= ob_get_clean();
// Album art
ob_start();
$DisplayName = '';
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5]) || !empty($ExtendedArtists[6])) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
$DisplayName .= Artists::display_artists($ExtendedArtists, false);
} elseif (count($GroupArtists) > 0) {
$DisplayName .= Artists::display_artists(array('1' => $GroupArtists), false);
}
$DisplayName .= $GroupName;
if ($GroupYear > 0) {
$DisplayName = "{$DisplayName} [{$GroupYear}]";
}
$Tags = display_str($TorrentTags->format());
$PlainTags = implode(', ', $TorrentTags->get_tags());
?>
<li class="image_group_<?php
echo $GroupID;
?>
">
<a href="torrents.php?id=<?php
echo $GroupID;
?>
">
<?php
if ($WikiImage) {
?>
<img class="tooltip_interactive" src="<?php
echo ImageTools::process($WikiImage, true);
示例14: display_ip
/**
* Format an IP address with links to IP history.
*
* @param string IP
* @return string The HTML
*/
public static function display_ip($IP)
{
$Line = display_str($IP) . ' (' . Tools::get_country_code_by_ajax($IP) . ') ';
$Line .= '<a href="user.php?action=search&ip_history=on&ip=' . display_str($IP) . '&matchtype=strict" title="Search" class="brackets tooltip">S</a>';
return $Line;
}
示例15: while
?>
</a></h2>
<table width="100%">
<tr class="colhead">
<td>Changed</td>
<td>IP [<a href="/userhistory.php?action=ips&userid=<?php
echo $UserID;
?>
">H</a>]</td>
</tr>
<? while(list($ChangeTime, $ChangerIP) = $DB->next_record()){ ?>
<tr class="rowa">
<td><?php
echo time_diff($ChangeTime);
?>
</td>
<td><?php
echo display_str($ChangerIP);
?>
[<a href="/user.php?action=search&ip_history=on&ip=<?php
echo display_str($ChangerIP);
?>
" title="Search">S</a>]<br /><?php
echo get_host($ChangerIP);
?>
</td>
</tr>
<? } ?>
</table>
<? show_footer(); ?>