Oppaitime's version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

feat_merch.php 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?
  2. $FeaturedMerchURL = '';
  3. $FeaturedMerch = $Cache->get_value('featured_merch');
  4. if ($FeaturedMerch === false) {
  5. $DB->query('
  6. SELECT ProductID, Title, Image, ArtistID
  7. FROM featured_merch
  8. WHERE Ended = 0');
  9. $FeaturedMerch = $DB->next_record(MYSQLI_ASSOC);
  10. $Cache->cache_value('featured_merch', $FeaturedMerch, 0);
  11. }
  12. if ($FeaturedMerch != null) {
  13. ?>
  14. <div id="merchbox" class="box">
  15. <div class="head colhead_dark">
  16. <strong>Featured Product</strong>
  17. </div>
  18. <div class="center pad">
  19. <a href="http://anonym.to/?<?=$FeaturedMerchURL . $FeaturedMerch['ProductID']?>"><img src="<?=ImageTools::process($FeaturedMerch['Image'])?>" width="100%" alt="Featured Product Image" /></a>
  20. </div>
  21. <div class="center pad">
  22. <a href="http://anonym.to/?<?=$FeaturedMerchURL . $FeaturedMerch['ProductID']?>"><em>Product Page</em></a>
  23. <? if ($FeaturedMerch['ArtistID'] > 0) {
  24. $UserInfo = Users::user_info($FeaturedMerch['ArtistID']);
  25. ?> - Artist: <a href="user.php?id=<?=$FeaturedMerch['ArtistID']?>"><?=$UserInfo['Username']?></a>
  26. <? } ?>
  27. </div>
  28. </div>
  29. <? } else { //Disabled mystery box ?>
  30. <div class="box" style="display: none;">
  31. <div class="head colhead_dark">
  32. <strong>It's a mystery!</strong>
  33. </div>
  34. <div class="center pad">
  35. You may want to put an image here.
  36. </div>
  37. </div>
  38. <?
  39. }
  40. ?>