daily pastebin goal
63%
SHARE
TWEET

elements

prettysweetly Nov 5th, 2013 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. include 'header.php';
  3. define('VALID_INC', TRUE); include 'func.php';
  4. include 'navi.php';
  5. if (!$_SERVER['QUERY_STRING']) { ?>
  6. <h1>Elements</h1>
  7. <table width="100%"><tr><td width="33%" valign="middle" align="center">
  8. <a href="http://elements.neo-romance.net/" target="_blank"><img src="http://elements.neo-romance.net/images/badges/<?php echo get_additional('Elements','level'); ?>.png" alt="" /></a></td>
  9. <td width="33%" valign="middle" align="center">
  10. <strong>Card Count:</strong> <?php echo cardcount('Elements'); ?><br>
  11. <strong>Card Worth:</strong> <?php echo cardcount('Elements','worth'); ?><br>
  12. <strong>Last Updated:</strong> <?php $database = new Database;
  13.         $tcginfo = $database->get_assoc("SELECT * FROM `tcgs` WHERE `name`='Elements'");
  14.         echo date('j M y', strtotime($tcginfo['lastupdated'])); ?><br>
  15. <strong># Trades:</strong> <?php echo get_additional('Elements','trades'); ?>
  16. </td>
  17. <td width="33%" valign="middle" align="center"><a href="?alog">activity log</a><br>
  18. <a href="?tlog">trade log</a><br>
  19. <a href="alogs/elements_alog.txt">activity archive</a><br>
  20. <a href="alogs/elements_tlog.txt">trade archive</a></td></tr></table>
  21.  
  22. <h2>Misc. Items</h2>
  23. <table width="100%">
  24. <tr><td width="20%" valign="middle" style="text-align: center">
  25. <h3>Berries</h3>
  26. <center><img src="http://elements.neo-romance.net/images/pixels/blackberry.gif" alt="" /> x <?php echo get_additional('Elements','blackberry'); ?> &nbsp;<img src="http://elements.neo-romance.net/images/pixels/raspberry.gif" alt="" /> x <?php echo get_additional('Elements','raspberry'); ?></center></td>
  27.  
  28. <td width="20%" valign="middle" style="text-align: center"><h3>Stars</h3>
  29. <center><img src="http://elements.neo-romance.net/images/pixels/star1.png" alt="" /> x <?php echo get_additional('Elements','largestar'); ?> <img src="http://elements.neo-romance.net/images/pixels/star2.png" alt="" /> x <?php echo get_additional('Elements','mediumstar'); ?> <img src="http://elements.neo-romance.net/images/pixels/star3.png" alt="" /> x <?php echo get_additional('Elements','smallstar'); ?></center></td>
  30.  
  31. <td width="25%" valign="middle" style="text-align: center">
  32. <h3><?php echo get_additional('Elements','choice'); ?> Coupons</h3>
  33. <center><img src="http://elements.neo-romance.net/images/coupon.gif" alt="" /></center></td>
  34. </tr></table>
  35.  
  36. <h3>Orbs</h3>
  37. <p class="center"><?php show_cards('Elements','orbs'); ?></p>
  38.  
  39. <h3>Star Charts</h3>
  40. <p class="center"><?php show_cards('Elements','charts'); ?></p>
  41.  
  42. <h3>Milestones</h3>
  43. <p class="center"><?php show_cards('Elements','milestones'); ?></p>
  44.  
  45. <?php } elseif ($_SERVER['QUERY_STRING'] == "alog") { ?>
  46. <h1>Activity Log</h1>
  47. <?php echo str_replace("\n","<br />",get_logs('Elements','activitylog')); ?>
  48. <?php } elseif ($_SERVER['QUERY_STRING'] == "tlog") { ?>
  49. <h1>Trade Log</h1>
  50. <?php echo str_replace("\n","<br />",get_logs('Elements','tradelog')); ?>
  51. <?php } elseif ($_SERVER['QUERY_STRING'] == "collecting") { ?>
  52. <center><form action onSubmit="return false;">
  53.         <input name="search" id="search" />
  54.         <input value="Search" type="submit" onClick="highlightImage();"/>
  55.         <input value="Clear" type="submit" onClick="clearHighlight();"/>
  56. </form>
  57. <div id="cardlist"></div></center>
  58.  
  59. <h1>Collecting</h1>
  60. <h2><?php echo cardcount('Elements','','member'); ?> Member Cards</h2>
  61. <p class="center"><?php show_cards('Elements','member'); ?></p>
  62.  
  63. <?php show_collecting('Elements'); ?>
  64.  
  65. <?php } elseif ($_SERVER['QUERY_STRING'] == "future") { ?>
  66. <center><form action onSubmit="return false;">
  67.         <input name="search" id="search" />
  68.         <input value="Search" type="submit" onClick="highlightImage();"/>
  69.         <input value="Clear" type="submit" onClick="clearHighlight();"/>
  70. </form>
  71. <div id="cardlist"></div></center>
  72. <h1>Future Decks (<?php echo cardcount('Elements','','future'); ?>)</h1>
  73. <p class="center"><?php show_cards('Elements','future'); ?></p>
  74.  
  75. <?php } elseif ($_SERVER['QUERY_STRING'] == "trading") { ?>
  76. <center><form action onSubmit="return false;">
  77.         <input name="search" id="search" />
  78.         <input value="Search" type="submit" onClick="highlightImage();"/>
  79.         <input value="Clear" type="submit" onClick="clearHighlight();"/>
  80. </form>
  81. <div id="cardlist"></div></center>
  82.  
  83. <h1>Trading (<?php echo cardcount('Elements','','trading'); ?>)</h1>
  84. <p class="center"><?php show_cards('Elements','trading'); ?></p>
  85.  
  86. <?php } elseif ($_SERVER['QUERY_STRING'] == "pending") { ?>
  87. <h1>Pending Trades</h1>
  88. <?php show_pending('Elements'); ?>
  89. <?php } elseif ($_SERVER['QUERY_STRING'] == "mastered") { ?>
  90. <h1>Mastered Decks</h1>
  91. <?php if ( isset($_GET['mastered']) && $_GET['mastered'] !== '' ) { $deckid = intval($_GET['mastered']);
  92.  
  93.     $tcginfo = $database->get_assoc("SELECT * FROM `tcgs` WHERE `name`='Elements' LIMIT 1");
  94.  
  95.     if ( $database->num_rows("SELECT * FROM `collecting` WHERE `id`='$deckid' AND `tcg`='".$tcginfo['id']."' LIMIT 1") > 0 ) {
  96.  
  97.         $deckinfo = $database->get_assoc("SELECT * FROM `collecting` WHERE `id`='$deckid' AND `tcg`='".$tcginfo['id']."' LIMIT 1");
  98.         $cards = explode(',',$deckinfo['cards']);
  99.         array_walk($cards, 'trim_value');
  100.  
  101.         $count = count($cards);    
  102.  
  103.         echo '<h1>mastered</h1>';
  104.         echo '<p align="center">';
  105.         echo '<strong>'.$deckinfo['deck'].'</strong> - <em>'.date('F d, Y',strtotime($deckinfo['mastereddate'])).'</em><br />';
  106.  
  107.         for ( $i = 1; $i <= $deckinfo['count']; $i++ ) {
  108.             $number = $i;
  109.  
  110.             if ( $number < 10 ) { $number = "0$number"; }
  111.             $card = "".$deckinfo['deck']."$number";
  112.             $pending = $database->num_rows("SELECT * FROM `trades` WHERE `tcg`='$id' AND `receiving` LIKE '%$card%'");
  113.  
  114.             if ( in_array($card, $cards) ) echo '<img src="'.$tcginfo['cardsurl'].''.$card.'.'.$tcginfo['format'].'" alt="" />';
  115.             else if ( $pending > 0 ) { echo '<img src="'.$tcginfo['cardsurl'].''.$deckinfo['pending'].'.'.$tcginfo['format'].'" alt="" />'; }
  116.             else { echo '<img src="'.$tcginfo['cardsurl'].''.$deckinfo['filler'].'.'.$tcginfo['format'].'" alt="" />'; }
  117.  
  118.             if ( $deckinfo['puzzle'] == 0 ) { echo ' '; }
  119.             if ( $deckinfo['break'] !== '0' && $i % $deckinfo['break'] == 0 ) { echo '<br />'; }
  120.  
  121.         }
  122.  
  123.         echo '</p>';
  124.  
  125.     }
  126.    
  127. }
  128.  
  129. ?>
  130.  
  131. <?php }  
  132. include 'footer.php'; ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top