Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'header.php';
- define('VALID_INC', TRUE); include 'func.php';
- include 'navi.php';
- if (!$_SERVER['QUERY_STRING']) { ?>
- <h1>Elements</h1>
- <table width="100%"><tr><td width="33%" valign="middle" align="center">
- <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>
- <td width="33%" valign="middle" align="center">
- <strong>Card Count:</strong> <?php echo cardcount('Elements'); ?><br>
- <strong>Card Worth:</strong> <?php echo cardcount('Elements','worth'); ?><br>
- <strong>Last Updated:</strong> <?php $database = new Database;
- $tcginfo = $database->get_assoc("SELECT * FROM `tcgs` WHERE `name`='Elements'");
- echo date('j M y', strtotime($tcginfo['lastupdated'])); ?><br>
- <strong># Trades:</strong> <?php echo get_additional('Elements','trades'); ?>
- </td>
- <td width="33%" valign="middle" align="center"><a href="?alog">activity log</a><br>
- <a href="?tlog">trade log</a><br>
- <a href="alogs/elements_alog.txt">activity archive</a><br>
- <a href="alogs/elements_tlog.txt">trade archive</a></td></tr></table>
- <h2>Misc. Items</h2>
- <table width="100%">
- <tr><td width="20%" valign="middle" style="text-align: center">
- <h3>Berries</h3>
- <center><img src="http://elements.neo-romance.net/images/pixels/blackberry.gif" alt="" /> x <?php echo get_additional('Elements','blackberry'); ?> <img src="http://elements.neo-romance.net/images/pixels/raspberry.gif" alt="" /> x <?php echo get_additional('Elements','raspberry'); ?></center></td>
- <td width="20%" valign="middle" style="text-align: center"><h3>Stars</h3>
- <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>
- <td width="25%" valign="middle" style="text-align: center">
- <h3><?php echo get_additional('Elements','choice'); ?> Coupons</h3>
- <center><img src="http://elements.neo-romance.net/images/coupon.gif" alt="" /></center></td>
- </tr></table>
- <h3>Orbs</h3>
- <p class="center"><?php show_cards('Elements','orbs'); ?></p>
- <h3>Star Charts</h3>
- <p class="center"><?php show_cards('Elements','charts'); ?></p>
- <h3>Milestones</h3>
- <p class="center"><?php show_cards('Elements','milestones'); ?></p>
- <?php } elseif ($_SERVER['QUERY_STRING'] == "alog") { ?>
- <h1>Activity Log</h1>
- <?php echo str_replace("\n","<br />",get_logs('Elements','activitylog')); ?>
- <?php } elseif ($_SERVER['QUERY_STRING'] == "tlog") { ?>
- <h1>Trade Log</h1>
- <?php echo str_replace("\n","<br />",get_logs('Elements','tradelog')); ?>
- <?php } elseif ($_SERVER['QUERY_STRING'] == "collecting") { ?>
- <center><form action onSubmit="return false;">
- <input name="search" id="search" />
- <input value="Search" type="submit" onClick="highlightImage();"/>
- <input value="Clear" type="submit" onClick="clearHighlight();"/>
- </form>
- <div id="cardlist"></div></center>
- <h1>Collecting</h1>
- <h2><?php echo cardcount('Elements','','member'); ?> Member Cards</h2>
- <p class="center"><?php show_cards('Elements','member'); ?></p>
- <?php show_collecting('Elements'); ?>
- <?php } elseif ($_SERVER['QUERY_STRING'] == "future") { ?>
- <center><form action onSubmit="return false;">
- <input name="search" id="search" />
- <input value="Search" type="submit" onClick="highlightImage();"/>
- <input value="Clear" type="submit" onClick="clearHighlight();"/>
- </form>
- <div id="cardlist"></div></center>
- <h1>Future Decks (<?php echo cardcount('Elements','','future'); ?>)</h1>
- <p class="center"><?php show_cards('Elements','future'); ?></p>
- <?php } elseif ($_SERVER['QUERY_STRING'] == "trading") { ?>
- <center><form action onSubmit="return false;">
- <input name="search" id="search" />
- <input value="Search" type="submit" onClick="highlightImage();"/>
- <input value="Clear" type="submit" onClick="clearHighlight();"/>
- </form>
- <div id="cardlist"></div></center>
- <h1>Trading (<?php echo cardcount('Elements','','trading'); ?>)</h1>
- <p class="center"><?php show_cards('Elements','trading'); ?></p>
- <?php } elseif ($_SERVER['QUERY_STRING'] == "pending") { ?>
- <h1>Pending Trades</h1>
- <?php show_pending('Elements'); ?>
- <?php } elseif ($_SERVER['QUERY_STRING'] == "mastered") { ?>
- <h1>Mastered Decks</h1>
- <?php if ( isset($_GET['mastered']) && $_GET['mastered'] !== '' ) { $deckid = intval($_GET['mastered']);
- $tcginfo = $database->get_assoc("SELECT * FROM `tcgs` WHERE `name`='Elements' LIMIT 1");
- if ( $database->num_rows("SELECT * FROM `collecting` WHERE `id`='$deckid' AND `tcg`='".$tcginfo['id']."' LIMIT 1") > 0 ) {
- $deckinfo = $database->get_assoc("SELECT * FROM `collecting` WHERE `id`='$deckid' AND `tcg`='".$tcginfo['id']."' LIMIT 1");
- $cards = explode(',',$deckinfo['cards']);
- array_walk($cards, 'trim_value');
- $count = count($cards);
- echo '<h1>mastered</h1>';
- echo '<p align="center">';
- echo '<strong>'.$deckinfo['deck'].'</strong> - <em>'.date('F d, Y',strtotime($deckinfo['mastereddate'])).'</em><br />';
- for ( $i = 1; $i <= $deckinfo['count']; $i++ ) {
- $number = $i;
- if ( $number < 10 ) { $number = "0$number"; }
- $card = "".$deckinfo['deck']."$number";
- $pending = $database->num_rows("SELECT * FROM `trades` WHERE `tcg`='$id' AND `receiving` LIKE '%$card%'");
- if ( in_array($card, $cards) ) echo '<img src="'.$tcginfo['cardsurl'].''.$card.'.'.$tcginfo['format'].'" alt="" />';
- else if ( $pending > 0 ) { echo '<img src="'.$tcginfo['cardsurl'].''.$deckinfo['pending'].'.'.$tcginfo['format'].'" alt="" />'; }
- else { echo '<img src="'.$tcginfo['cardsurl'].''.$deckinfo['filler'].'.'.$tcginfo['format'].'" alt="" />'; }
- if ( $deckinfo['puzzle'] == 0 ) { echo ' '; }
- if ( $deckinfo['break'] !== '0' && $i % $deckinfo['break'] == 0 ) { echo '<br />'; }
- }
- echo '</p>';
- }
- }
- ?>
- <?php }
- include 'footer.php'; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement