Advertisement
Guest User

Untitled

a guest
Oct 8th, 2011
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.94 KB | None | 0 0
  1. <?php
  2.     session_start();
  3.     if (!isset($_SESSION['User'])){
  4.         header("Location: login.php");
  5.     }
  6.     $user = $_SESSION['User'];
  7.     require 'scripts/config.php';
  8.     require 'scripts/itemInfo.php';
  9.     $isAdmin = $_SESSION['Admin'];
  10.     $queryAuctions=mysql_query("SELECT * FROM WA_Auctions");
  11.     if ($useMySQLiConomy){
  12.         $queryiConomy=mysql_query("SELECT * FROM $iConTableName WHERE username='$user'");
  13.         $iConRow = mysql_fetch_row($queryiConomy);
  14.     }
  15.     $queryMarket=mysql_query("SELECT * FROM WA_MarketPrices ORDER BY id DESC");
  16.  
  17.     $playerQuery = mysql_query("SELECT * FROM WA_Players WHERE name='$user'");
  18.     $playerRow = mysql_fetch_row($playerQuery);
  19.     $mailQuery = mysql_query("SELECT * FROM WA_Mail WHERE player='$user'");
  20.     $mailCount = mysql_num_rows($mailQuery);
  21. ?>
  22. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  23. <html>
  24.     <head>
  25.         <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  26.         <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/media/images/favicon.ico" />
  27.        
  28.         <title>ECC Market</title>
  29.         <style type="text/css" title="currentStyle">
  30.             @import "css/table_jui.css";
  31.             @import "css/<?php echo $uiPack?>/jquery-ui-1.8.16.custom.css";
  32.         </style>
  33.         <link rel="stylesheet" type="text/css" href="css/<?php echo $cssFile?>.css" />
  34.         <script type="text/javascript" language="javascript" src="js/jquery.js"></script>
  35.         <script type="text/javascript" language="javascript" src="js/jquery.dataTables.js"></script>
  36.         <script type="text/javascript" charset="utf-8">
  37.             $(document).ready(function() {
  38.                 oTable = $('#example').dataTable({
  39.                     "bJQueryUI": true,
  40.                     "sPaginationType": "full_numbers"
  41.                 });
  42.             } );
  43.         </script>
  44.     </head>
  45.     <div id="holder">
  46.         <?php include("topBoxes.php"); ?>
  47.         <h1>ECC Market</h1>
  48.             <br/>
  49.         <h2>Item Info</h2>
  50. </p>
  51.            
  52.       <div class="demo_jui">
  53. <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
  54.     <thead>
  55.         <tr>
  56.             <th>Item</th>
  57.             <th>Number Sold</th>
  58.             <th>Market Price</th>
  59.             <th>Value Graph</th>          
  60.         </tr>
  61.     </thead>
  62.     <tbody>
  63.     <?php
  64.     $marketNames = array();
  65.     while(list($id, $name, $damage, $time, $price, $ref)= mysql_fetch_row($queryMarket))
  66.     {
  67.         $keyName = in_array($name.":".$damage, $marketNames);
  68.         if (!$keyName == false){
  69.           //found this item id
  70.          
  71.         }else{
  72.             $marketNames[] = $name.":".$damage;
  73.             $fullName = getItemName($name, $damage);
  74.             ?>
  75.             <tr class="gradeC">
  76.                 <td><img src="<?php echo getItemImage($name, $damage) ?>" alt="<?php echo $fullName ?>"/><br/><?php echo $fullName ?></td>
  77.                 <td><? echo $ref ?></td>
  78.                 <td><?php echo $price ?></td>
  79.                 <td><a href="graph.php?name=<?php echo $name ?>&damage=<? echo $damage ?>">View Graph</a></td>
  80.             </tr>
  81.             <?php
  82.         }
  83.     ?>
  84.        
  85.     <?php } ?>
  86.     </tbody>
  87. </table>
  88.             </div>
  89.             <div class="spacer"></div>
  90.            
  91.             <?php include("footer.php"); ?>
  92.         </div>
  93.    
  94.     </body>
  95. </html>
  96.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement