<?php
include 'includes/dash_header.php';
include 'includes/dash_links.php';
include 'includes/db_connection.php';
?>


<div class="span8">
                    <div class="row-fluid">
                      <div class="span9">

                        <?php

                        if (isset($_POST['Download']) and isset($_POST['7'])) {
                          $id = $_POST['7'];

                          
                        } 
                        


                        ?>
                        

                      	<form>
                      		<fieldset>
                      			<legend>GAME STORE</legend>
                      			
                      		</fieldset>
                      	</form>


                      	

                        <?php

                        $query = "SELECT * FROM `app_store` WHERE `application` = 'Games' ORDER BY `app_id` DESC";
                        $result = mysql_query($query);
                        while ($row = mysql_fetch_array($result)) {
                          echo "<ul class='thumbnails'>";
                          echo "<li class='span7 offset2'>";
                          echo "<article class='thumbnail'>";
                          echo "<img src='{$row['source_link']}' width=200>";
                         
			 echo "<h4>{$row['App_Name']}</h4>";
                          echo "<p><strong>Description : </strong></p>";
                          echo "<p>{$row['App_Description']}</p>";
                                                  echo "<a href='download.php?id={$row['app_id']}&link={$row['download_Link']}' onclick='return confirm(\"Are sure you want do download\")'><button class='btn btn-primary'>Download</button></a>";
                          /*
                          echo "<p><a href='{$row['download_Link']}' class='btn btn-primary' onclick='return confirm(\"Are sure you want do download\")'>Download</a></p>";
                          /*
                          echo "<form action='Games.php' method='post' onsubmit='return confirm(\"Are You Sure You Want Download ?\")'>";
                          echo "<input type='hidden' name='{$row['App_Id']}' />";
                          echo "<input type='submit' name='Download' value='Download' class='btn btn-primary'>";
                          echo "</form>";
                          */
                          echo "</article>";
                          echo "</li>";
                          echo "</ul>";
                        }


                        ?>     


                        
                        

                      </div>

<?php
include 'includes/dash_footer.php';
?>
