コード例 #1
0
ファイル: top10view.class.php プロジェクト: Kufirc/Gazelle
    private static function render_list($Url, $Name, $Image)
    {
        if (!empty($Image)) {
            $UseTooltipster = !isset(G::$LoggedUser['Tooltipster']) || G::$LoggedUser['Tooltipster'];
            $Image = ImageTools::process($Image);
            $Title = "title=\"<img class="large_tile" src="{$Image}" alt="" />\"";
            $Name = display_str($Name);
            ?>
			<li>
				<a class="tooltip_image" data-title-plain="<?php 
            echo $Name;
            ?>
" <?php 
            echo $Title;
            ?>
 href="<?php 
            echo $Url;
            echo $Name;
            ?>
"><?php 
            echo $Name;
            ?>
</a>
			</li>
<?php 
        }
    }
コード例 #2
0
ファイル: ajax_new_report.php プロジェクト: Kufirc/Gazelle
    ?>
						</td>
					</tr>
<?php 
}
if ($Images) {
    ?>
					<tr>
						<td class="label">Relevant images:</td>
						<td colspan="3">
<?php 
    $Images = explode(' ', $Images);
    foreach ($Images as $Image) {
        ?>
							<img style="max-width: 200px;" onclick="lightbox.init(this, 200);" src="<?php 
        echo ImageTools::process($Image);
        ?>
" alt="Relevant image" />
<?php 
    }
    ?>
						</td>
					</tr>
<?php 
}
?>
					<tr>
						<td class="label">User comment:</td>
						<td colspan="3"><?php 
echo Text::full_format($UserComment);
?>
コード例 #3
0
ファイル: torrent_collage.php プロジェクト: Kufirc/Gazelle
    $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);
        ?>
" alt="<?php 
        echo $DisplayName;
        ?>
" title="<?php 
        echo $DisplayName;
        ?>
 <br /> <?php 
        echo $Tags;
        ?>
" data-title-plain="<?php 
        echo "{$DisplayName} ({$PlainTags})";
        ?>
" width="118" />
<?php 
コード例 #4
0
ファイル: user.php プロジェクト: Kufirc/Gazelle
        $Group = Torrents::get_groups(array($C['GroupID']), true, true, false);
        extract(Torrents::array_group($Group[$C['GroupID']]));
        $Name = '';
        $Name .= Artists::display_artists(array('1' => $Artists), false, true);
        $Name .= $GroupName;
        ?>
			<td>
				<a href="torrents.php?id=<?php 
        echo $GroupID;
        ?>
">
					<img class="tooltip" title="<?php 
        echo $Name;
        ?>
" src="<?php 
        echo ImageTools::process($C['WikiImage'], true);
        ?>
" alt="<?php 
        echo $Name;
        ?>
" width="107" />
				</a>
			</td>
<?php 
    }
    ?>
		</tr>
	</table>
<?php 
    $FirstCol = false;
}
コード例 #5
0
ファイル: users.class.php プロジェクト: Kufirc/Gazelle
 /**
  * Generate HTML for a user's avatar or just return the avatar URL
  * @param unknown $Avatar
  * @param unknown $UserID
  * @param unknown $Username
  * @param unknown $Setting
  * @param number $Size
  * @param string $ReturnHTML
  * @return string
  */
 public static function show_avatar($Avatar, $UserID, $Username, $Setting, $Size = 150, $ReturnHTML = True)
 {
     $Avatar = ImageTools::process($Avatar, false, 'avatar', $UserID);
     $Style = 'style="max-height: 400px;"';
     $AvatarMouseOverText = '';
     $SecondAvatar = '';
     $Class = 'class="double_avatar"';
     $EnabledRewards = Donations::get_enabled_rewards($UserID);
     if ($EnabledRewards['HasAvatarMouseOverText']) {
         $Rewards = Donations::get_rewards($UserID);
         $AvatarMouseOverText = $Rewards['AvatarMouseOverText'];
     }
     if (!empty($AvatarMouseOverText)) {
         $AvatarMouseOverText = "title=\"{$AvatarMouseOverText}\" alt=\"{$AvatarMouseOverText}\"";
     } else {
         $AvatarMouseOverText = "alt=\"{$Username}'s avatar\"";
     }
     if ($EnabledRewards['HasSecondAvatar'] && !empty($Rewards['SecondAvatar'])) {
         $SecondAvatar = ' data-gazelle-second-avatar="' . ImageTools::process($Rewards['SecondAvatar'], false, 'avatar2', $UserID) . '"';
     }
     // case 1 is avatars disabled
     switch ($Setting) {
         case 0:
             if (!empty($Avatar)) {
                 $ToReturn = $ReturnHTML ? "<div><img src=\"{$Avatar}\" width=\"{$Size}\" {$Style} {$AvatarMouseOverText}{$SecondAvatar} {$Class} /></div>" : $Avatar;
             } else {
                 $URL = STATIC_SERVER . 'common/avatars/default.png';
                 $ToReturn = $ReturnHTML ? "<div><img src=\"{$URL}\" width=\"{$Size}\" {$Style} {$AvatarMouseOverText}{$SecondAvatar} /></div>" : $URL;
             }
             break;
         case 2:
             $ShowAvatar = true;
             // Fallthrough
         // Fallthrough
         case 3:
             switch (G::$LoggedUser['Identicons']) {
                 case 0:
                     $Type = 'identicon';
                     break;
                 case 1:
                     $Type = 'monsterid';
                     break;
                 case 2:
                     $Type = 'wavatar';
                     break;
                 case 3:
                     $Type = 'retro';
                     break;
                 case 4:
                     $Type = '1';
                     $Robot = true;
                     break;
                 case 5:
                     $Type = '2';
                     $Robot = true;
                     break;
                 case 6:
                     $Type = '3';
                     $Robot = true;
                     break;
                 default:
                     $Type = 'identicon';
             }
             $Rating = 'pg';
             if (!$Robot) {
                 $URL = 'https://secure.gravatar.com/avatar/' . md5(strtolower(trim($Username))) . "?s={$Size}&amp;d={$Type}&amp;r={$Rating}";
             } else {
                 $URL = 'https://robohash.org/' . md5($Username) . "?set=set{$Type}&amp;size={$Size}x{$Size}";
             }
             if ($ShowAvatar == true && !empty($Avatar)) {
                 $ToReturn = $ReturnHTML ? "<div><img src=\"{$Avatar}\" width=\"{$Size}\" {$Style} {$AvatarMouseOverText}{$SecondAvatar} {$Class} /></div>" : $Avatar;
             } else {
                 $ToReturn = $ReturnHTML ? "<div><img src=\"{$URL}\" width=\"{$Size}\" {$Style} {$AvatarMouseOverText}{$SecondAvatar} {$Class} /></div>" : $URL;
             }
             break;
         default:
             $URL = STATIC_SERVER . 'common/avatars/default.png';
             $ToReturn = $ReturnHTML ? "<div><img src=\"{$URL}\" width=\"{$Size}\" {$Style} {$AvatarMouseOverText}{$SecondAvatar} {$Class}/></div>" : $URL;
     }
     return $ToReturn;
 }
コード例 #6
0
ファイル: request.php プロジェクト: Kufirc/Gazelle
    ?>
		<div class="box box_image box_image_albumart box_albumart"><!-- .box_albumart deprecated -->
			<div class="head"><strong>Cover</strong></div>
			<div id="covers">
				<div class="pad">
<?php 
    if (!empty($Request['Image'])) {
        ?>
					<p align="center"><img style="width: 100%;" src="<?php 
        echo ImageTools::process($Request['Image'], true);
        ?>
" alt="<?php 
        echo $FullName;
        ?>
" onclick="lightbox.init('<?php 
        echo ImageTools::process($Request['Image']);
        ?>
', 220);" /></p>
<?php 
    } else {
        ?>
					<p align="center"><img style="width: 100%;" src="<?php 
        echo STATIC_SERVER;
        ?>
common/noartwork/<?php 
        echo $CategoryIcons[$Request['CategoryID'] - 1];
        ?>
" alt="<?php 
        echo $CategoryName;
        ?>
" class="tooltip" title="<?php 
コード例 #7
0
ファイル: artist_collage.php プロジェクト: Kufirc/Gazelle
    $ArtistTable .= ob_get_clean();
    ob_start();
    ?>
				<li class="image_group_<?php 
    echo $Artist['ArtistID'];
    ?>
">
					<a href="artist.php?id=<?php 
    echo $Artist['ArtistID'];
    ?>
">
<?php 
    if ($Artist['Image']) {
        ?>
						<img class="tooltip" src="<?php 
        echo ImageTools::process($Artist['Image'], true);
        ?>
" alt="<?php 
        echo $Artist['Name'];
        ?>
" title="<?php 
        echo $Artist['Name'];
        ?>
" width="118" />
<?php 
    } else {
        ?>
						<span style="width: 107px; padding: 5px;"><?php 
        echo $Artist['Name'];
        ?>
</span>
コード例 #8
0
ファイル: text.class.php プロジェクト: Kufirc/Gazelle
 private static function to_html($Array)
 {
     global $SSL;
     self::$Levels++;
     /*
      * Hax prevention
      * That's the original comment on this.
      * Most likely this was implemented to avoid anyone nesting enough
      * elements to reach PHP's memory limit as nested elements are
      * solved recursively.
      * Original value of 10, it is now replaced in favor of
      * $MaximumNests.
      * If this line is ever executed then something is, infact
      * being haxed as the if before the block type switch for different
      * tags should always be limiting ahead of this line.
      * (Larger than vs. smaller than.)
      */
     if (self::$Levels > self::$MaximumNests) {
         return $Block['Val'];
         // Hax prevention, breaks upon exceeding nests.
     }
     $Str = '';
     foreach ($Array as $Block) {
         if (is_string($Block)) {
             $Str .= self::smileys($Block);
             continue;
         }
         if (self::$Levels < self::$MaximumNests) {
             switch ($Block['Type']) {
                 case 'b':
                     $Str .= '<strong>' . self::to_html($Block['Val']) . '</strong>';
                     break;
                 case 'u':
                     $Str .= '<span style="text-decoration: underline;">' . self::to_html($Block['Val']) . '</span>';
                     break;
                 case 'i':
                     $Str .= '<span style="font-style: italic;">' . self::to_html($Block['Val']) . "</span>";
                     break;
                 case 's':
                     $Str .= '<span style="text-decoration: line-through;">' . self::to_html($Block['Val']) . '</span>';
                     break;
                 case 'important':
                     $Str .= '<strong class="important_text">' . self::to_html($Block['Val']) . '</strong>';
                     break;
                 case 'user':
                     $Str .= '<a href="user.php?action=search&amp;search=' . urlencode($Block['Val']) . '">' . $Block['Val'] . '</a>';
                     break;
                 case 'artist':
                     $Str .= '<a href="artist.php?artistname=' . urlencode(Format::undisplay_str($Block['Val'])) . '">' . $Block['Val'] . '</a>';
                     break;
                 case 'rule':
                     $Rule = trim(strtolower($Block['Val']));
                     if ($Rule[0] != 'r' && $Rule[0] != 'h') {
                         $Rule = 'r' . $Rule;
                     }
                     $Str .= '<a href="rules.php?p=upload#' . urlencode(Format::undisplay_str($Rule)) . '">' . preg_replace('/[aA-zZ]/', '', $Block['Val']) . '</a>';
                     break;
                 case 'torrent':
                     $Pattern = '/(' . NONSSL_SITE_URL . '\\/torrents\\.php.*[\\?&]id=)?(\\d+)($|&|\\#).*/i';
                     $Matches = array();
                     if (preg_match($Pattern, $Block['Val'], $Matches)) {
                         if (isset($Matches[2])) {
                             $GroupID = $Matches[2];
                             $Groups = Torrents::get_groups(array($GroupID), true, true, false);
                             if ($Groups[$GroupID]) {
                                 $Group = $Groups[$GroupID];
                                 $Str .= Artists::display_artists($Group['ExtendedArtists']) . '<a href="torrents.php?id=' . $GroupID . '">' . $Group['Name'] . '</a>';
                             } else {
                                 $Str .= '[torrent]' . str_replace('[inlineurl]', '', $Block['Val']) . '[/torrent]';
                             }
                         }
                     } else {
                         $Str .= '[torrent]' . str_replace('[inlineurl]', '', $Block['Val']) . '[/torrent]';
                     }
                     break;
                 case 'wiki':
                     $Str .= '<a href="wiki.php?action=article&amp;name=' . urlencode($Block['Val']) . '">' . $Block['Val'] . '</a>';
                     break;
                 case 'tex':
                     $Str .= '<img style="vertical-align: middle;" src="' . STATIC_SERVER . 'blank.gif" onload="if (this.src.substr(this.src.length - 9, this.src.length) == \'blank.gif\') { this.src = \'https://chart.googleapis.com/chart?cht=tx&amp;chf=bg,s,FFFFFF00&amp;chl=' . urlencode(mb_convert_encoding($Block['Val'], 'UTF-8', 'HTML-ENTITIES')) . '&amp;chco=\' + hexify(getComputedStyle(this.parentNode, null).color); }" alt="' . $Block['Val'] . '" />';
                     break;
                 case 'plain':
                     $Str .= $Block['Val'];
                     break;
                 case 'pre':
                     $Str .= '<pre>' . $Block['Val'] . '</pre>';
                     break;
                 case 'code':
                     $Str .= '<code>' . $Block['Val'] . '</code>';
                     break;
                 case 'list':
                     $Str .= "<{$Block['ListType']} class=\"postlist\">";
                     foreach ($Block['Val'] as $Line) {
                         $Str .= '<li>' . self::to_html($Line) . '</li>';
                     }
                     $Str .= '</' . $Block['ListType'] . '>';
                     break;
                 case 'align':
                     $ValidAttribs = array('left', 'center', 'right');
                     if (!in_array($Block['Attr'], $ValidAttribs)) {
                         $Str .= '[align=' . $Block['Attr'] . ']' . self::to_html($Block['Val']) . '[/align]';
                     } else {
                         $Str .= '<div style="text-align: ' . $Block['Attr'] . ';">' . self::to_html($Block['Val']) . '</div>';
                     }
                     break;
                 case 'color':
                 case 'colour':
                     $ValidAttribs = array('aqua', 'black', 'blue', 'fuchsia', 'green', 'grey', 'lime', 'maroon', 'navy', 'olive', 'purple', 'red', 'silver', 'teal', 'white', 'yellow');
                     if (!in_array($Block['Attr'], $ValidAttribs) && !preg_match('/^#[0-9a-f]{6}$/', $Block['Attr'])) {
                         $Str .= '[color=' . $Block['Attr'] . ']' . self::to_html($Block['Val']) . '[/color]';
                     } else {
                         $Str .= '<span style="color: ' . $Block['Attr'] . ';">' . self::to_html($Block['Val']) . '</span>';
                     }
                     break;
                 case 'headline':
                     $text = self::to_html($Block['Val']);
                     $raw = self::raw_text($Block['Val']);
                     if (!in_array($Block['Attr'], self::$HeadlineLevels)) {
                         $Str .= sprintf('%1$s%2$s%1$s', str_repeat('=', $Block['Attr'] + 1), $text);
                     } else {
                         $id = '_' . crc32($raw . self::$HeadlineID);
                         if (self::$InQuotes === 0) {
                             self::$Headlines[] = array($Block['Attr'], $raw, $id);
                         }
                         $Str .= sprintf('<h%1$d id="%3$s">%2$s</h%1$d>', $Block['Attr'] + 2, $text, $id);
                         self::$HeadlineID++;
                     }
                     break;
                 case 'inlinesize':
                 case 'size':
                     $ValidAttribs = array('1', '2', '3', '4', '5', '6', '7', '8', '9', '10');
                     if (!in_array($Block['Attr'], $ValidAttribs)) {
                         $Str .= '[size=' . $Block['Attr'] . ']' . self::to_html($Block['Val']) . '[/size]';
                     } else {
                         $Str .= '<span class="size' . $Block['Attr'] . '">' . self::to_html($Block['Val']) . '</span>';
                     }
                     break;
                 case 'quote':
                     self::$NoImg++;
                     // No images inside quote tags
                     self::$InQuotes++;
                     if (self::$InQuotes == self::$NestsBeforeHide) {
                         //Put quotes that are nested beyond the specified limit in [hide] tags.
                         $Str .= '<strong>Older quotes</strong>: <a href="javascript:void(0);" onclick="BBCode.spoiler(this);">Show</a>';
                         $Str .= '<blockquote class="hidden spoiler">';
                     }
                     if (!empty($Block['Attr'])) {
                         $Exploded = explode('|', self::to_html($Block['Attr']));
                         if (isset($Exploded[1]) && (is_numeric($Exploded[1]) || in_array($Exploded[1][0], array('a', 't', 'c', 'r')) && is_numeric(substr($Exploded[1], 1)))) {
                             // the part after | is either a number or starts with a, t, c or r, followed by a number (forum post, artist comment, torrent comment, collage comment or request comment, respectively)
                             $PostID = trim($Exploded[1]);
                             $Str .= '<a href="#" onclick="QuoteJump(event, \'' . $PostID . '\'); return false;"><strong class="quoteheader">' . $Exploded[0] . '</strong> wrote: </a>';
                         } else {
                             $Str .= '<strong class="quoteheader">' . $Exploded[0] . '</strong> wrote: ';
                         }
                     }
                     $Str .= '<blockquote>' . self::to_html($Block['Val']) . '</blockquote>';
                     if (self::$InQuotes == self::$NestsBeforeHide) {
                         //Close quote the deeply nested quote [hide].
                         $Str .= '</blockquote><br />';
                         // Ensure new line after quote train hiding
                     }
                     self::$NoImg--;
                     self::$InQuotes--;
                     break;
                 case 'hide':
                     $Str .= '<strong>' . ($Block['Attr'] ? $Block['Attr'] : 'Hidden text') . '</strong>: <a href="javascript:void(0);" onclick="BBCode.spoiler(this);">Show</a>';
                     $Str .= '<blockquote class="hidden spoiler">' . self::to_html($Block['Val']) . '</blockquote>';
                     break;
                 case 'mature':
                     if (G::$LoggedUser['EnableMatureContent']) {
                         if (!empty($Block['Attr'])) {
                             $Str .= '<strong class="mature" style="font-size: 1.2em;">Mature content:</strong><strong> ' . $Block['Attr'] . '</strong><br /> <a href="javascript:void(0);" onclick="BBCode.spoiler(this);">Show</a>';
                             $Str .= '<blockquote class="hidden spoiler">' . self::to_html($Block['Val']) . '</blockquote>';
                         } else {
                             $Str .= '<strong>Use of the [mature] tag requires a description.</strong> The correct format is as follows: <strong>[mature=description] ...content... [/mature]</strong>, where "description" is a mandatory description of the post. Misleading descriptions will be penalized. For further information on our mature content policies, please refer to this <a href="wiki.php?action=article&amp;id=1063">wiki</a>.';
                         }
                     } else {
                         $Str .= '<span class="mature_blocked" style="font-style: italic;"><a href="wiki.php?action=article&amp;id=1063">Mature content</a> has been blocked. You can choose to view mature content by editing your <a href="user.php?action=edit&amp;userid=' . G::$LoggedUser['ID'] . '">settings</a>.</span>';
                     }
                     break;
                 case 'img':
                     if (self::$NoImg > 0 && self::valid_url($Block['Val'])) {
                         $Str .= '<a rel="noreferrer" target="_blank" href="' . $Block['Val'] . '">' . $Block['Val'] . '</a> (image)';
                         break;
                     }
                     if (!self::valid_url($Block['Val'], '\\.(jpe?g|gif|png|bmp|tiff)')) {
                         $Str .= '[img]' . $Block['Val'] . '[/img]';
                     } else {
                         $LocalURL = self::local_url($Block['Val']);
                         if ($LocalURL) {
                             $Str .= '<img class="scale_image" onclick="lightbox.init(this, $(this).width());" alt="' . $Block['Val'] . '" src="' . $LocalURL . '" />';
                         } else {
                             $Str .= '<img class="scale_image" onclick="lightbox.init(this, $(this).width());" alt="' . $Block['Val'] . '" src="' . ImageTools::process($Block['Val']) . '" />';
                         }
                     }
                     break;
                 case 'aud':
                     if (self::$NoImg > 0 && self::valid_url($Block['Val'])) {
                         $Str .= '<a rel="noreferrer" target="_blank" href="' . $Block['Val'] . '">' . $Block['Val'] . '</a> (audio)';
                         break;
                     }
                     if (!self::valid_url($Block['Val'], '\\.(mp3|ogg|wav)')) {
                         $Str .= '[aud]' . $Block['Val'] . '[/aud]';
                     } else {
                         //TODO: Proxy this for staff?
                         $Str .= '<audio controls="controls" src="' . $Block['Val'] . '"><a rel="noreferrer" target="_blank" href="' . $Block['Val'] . '">' . $Block['Val'] . '</a></audio>';
                     }
                     break;
                 case 'url':
                     // Make sure the URL has a label
                     if (empty($Block['Val'])) {
                         $Block['Val'] = $Block['Attr'];
                         $NoName = true;
                         // If there isn't a Val for this
                     } else {
                         $Block['Val'] = self::to_html($Block['Val']);
                         $NoName = false;
                     }
                     if (!self::valid_url($Block['Attr'])) {
                         $Str .= '[url=' . $Block['Attr'] . ']' . $Block['Val'] . '[/url]';
                     } else {
                         $LocalURL = self::local_url($Block['Attr']);
                         if ($LocalURL) {
                             if ($NoName) {
                                 $Block['Val'] = substr($LocalURL, 1);
                             }
                             $Str .= '<a href="' . $LocalURL . '">' . $Block['Val'] . '</a>';
                         } else {
                             $Str .= '<a rel="noreferrer" target="_blank" href="' . $Block['Attr'] . '">' . $Block['Val'] . '</a>';
                         }
                     }
                     break;
                 case 'inlineurl':
                     if (!self::valid_url($Block['Attr'], '', true)) {
                         $Array = self::parse($Block['Attr']);
                         $Block['Attr'] = $Array;
                         $Str .= self::to_html($Block['Attr']);
                     } else {
                         $LocalURL = self::local_url($Block['Attr']);
                         if ($LocalURL) {
                             $Str .= '<a href="' . $LocalURL . '">' . substr($LocalURL, 1) . '</a>';
                         } else {
                             $Str .= '<a rel="noreferrer" target="_blank" href="' . $Block['Attr'] . '">' . $Block['Attr'] . '</a>';
                         }
                     }
                     break;
             }
         }
     }
     self::$Levels--;
     return $Str;
 }
コード例 #9
0
ファイル: donor_rewards.php プロジェクト: Kufirc/Gazelle
</td>
			<td><?php 
    echo time_diff($User['DonationTime']);
    ?>
</td>
			<td style="word-wrap: break-word;">
				<?php 
    echo $User['IconMouseOverText'];
    ?>
			</td>
			<td style="word-wrap: break-word;">
<?php 
    if (!empty($User['CustomIcon'])) {
        ?>
				<img src="<?php 
        echo ImageTools::process($User['CustomIcon'], false, 'donoricon', $User['UserID']);
        ?>
" width="15" height="13" alt="" />
<?php 
    }
    ?>
			</td>
			<td style="word-wrap: break-word;">
				<?php 
    echo $User['CustomIconLink'];
    ?>
			</td>
			<td style="word-wrap: break-word;">
				<?php 
    echo $User['AvatarMouseOverText'];
    ?>
コード例 #10
0
ファイル: feat_album.php プロジェクト: Kufirc/Gazelle
    ?>
</a>
			</div>
			<div class="center pad">
				<a href="torrents.php?id=<?php 
    echo $FeaturedAlbum['GroupID'];
    ?>
" class="tooltip" title="<?php 
    echo Artists::display_artists($Artists, false, false);
    ?>
 - <?php 
    echo $FeaturedAlbum['Name'];
    ?>
">
					<img src="<?php 
    echo ImageTools::process($FeaturedAlbum['WikiImage'], true);
    ?>
" alt="<?php 
    echo Artists::display_artists($Artists, false, false);
    ?>
 - <?php 
    echo $FeaturedAlbum['Name'];
    ?>
" width="100%" />
				</a>
			</div>
			<div class="center pad">
				<a href="forums.php?action=viewthread&amp;threadid=<?php 
    echo $FeaturedAlbum['ThreadID'];
    ?>
"><em>Read the interview with the artist, discuss here</em></a>
コード例 #11
0
ファイル: feat_merch.php プロジェクト: Kufirc/Gazelle
			WHERE Ended = 0');
    $FeaturedMerch = $DB->next_record(MYSQLI_ASSOC);
    $Cache->cache_value('featured_merch', $FeaturedMerch, 0);
}
if ($FeaturedMerch != null) {
    ?>
<div id="merchbox" class="box">
	<div class="head colhead_dark">
		<strong>Featured Product</strong>
	</div>
	<div class="center pad">
		<a href="http://anonym.to/?<?php 
    echo $FeaturedMerchURL . $FeaturedMerch['ProductID'];
    ?>
"><img src="<?php 
    echo ImageTools::process($FeaturedMerch['Image']);
    ?>
" width="100%" alt="Featured Product Image" /></a>
	</div>
	<div class="center pad">
		<a href="http://anonym.to/?<?php 
    echo $FeaturedMerchURL . $FeaturedMerch['ProductID'];
    ?>
"><em>Product Page</em></a>
<?php 
    if ($FeaturedMerch['ArtistID'] > 0) {
        $UserInfo = Users::user_info($FeaturedMerch['ArtistID']);
        ?>
		- Artist: <a href="user.php?id=<?php 
        echo $FeaturedMerch['ArtistID'];
        ?>