
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
  
<?php
session_start();
header("Content-type: text/html; charset=windows-1251");
define('MinRating', 300);
function __autoload($name){ include("../classes/_class.".$name.".php");}
$config = new config;
$db = new db($config->HostDB, $config->UserDB, $config->PassDB, $config->BaseDB); ?>
<div style="margin-bottom: 20px;">

                            <input type="hidden" id="filter0" placeholder="">
                            <input type="text" id="filter1" placeholder="filter by username">
                            <input type="text" id="filter2" placeholder="filter by quantity">

                        </div>
<table translate="no" id= "filter" class="table table-striped">
                    <thead class="text-center">
                       <th>       </th>
                        <th>Username</th>
                        <th>Quantiy and metal</th>
						<th>Price <div class="ic-gold3"></div></th>
                        <th>Order</th>
                    </thead>
                    <?PHP
					$uname = $_GET["name"];
					//$uname='alex25' ;
					
					$db->Query("SELECT * FROM db_selling where seller = '$uname' ORDER BY id ASC ");
                    if($db->NumRows() > 0){
                        while($bon1 = $db->FetchArray()){
                            ?>
                            <tr class="text-center">
							
                                <td><img src="<?php echo("/images/avatars/".$bon1["avatar"]) ;?>" width="40"></td>
								
                                <td><i class="fa fa-user"></i> <?php echo $bon1["seller"]; ?></td>
                                <td> <?php echo $bon1["quantity"]; ?> <?php if ($bon1["metal"]=='gold') echo ('<span class="ic-gold2"></span>'); else echo ('<span class="ic-gold1"></span>' ); ?></td>
                                <td><?php echo $bon1["price"]; ?></td>
								<td><form action="" method="post"><input type="hidden" name="selling" value="<?php echo $bon1["id"]; ?>" ><button type="submit" name="buy"  id="buy_coins" class="btn btn-small mt5">BUY</button></form></td>
								
                            </tr>
                            <?PHP
                        }
						
                    }
                    $db->Query("SELECT * FROM db_selling ORDER BY id ASC limit 100 ");
					
                    if($db->NumRows() > 0){
                        while($bon = $db->FetchArray()){
                            ?>
                            <tr class="text-center">
							
                                <td><img src="<?php echo("/images/avatars/".$bon["avatar"]) ;?>" width="40"></td>
								
                                <td><i class="fa fa-user"></i> <?php echo $bon["seller"]; ?></td>
                                <td> <?php echo $bon["quantity"]; ?> <?php if ($bon["metal"]=='gold') echo ('<span class="ic-gold2"></span>'); else echo ('<span class="ic-gold1"></span>' ); ?></td>
                                <td><?php echo $bon["price"]; ?></td>
								<td><form action="" method="post"><input type="hidden" name="selling" value="<?php echo $bon["id"]; ?>" ><button type="submit" name="buy"  id="buy_coins" class="btn btn-small mt5">BUY</button></form></td>
								
                            </tr>
                            <?PHP
                        }
						
                    }
					
					
					
					
					if ($db->NumRows() < 1){
						echo('   ');
						 file_get_contents("https://cashempire.cc/botselling.php");
						
					}
                ?>
                </table>
                      <script src="/TableFilter.min.js" defer></script>
       