<?php ob_start(); ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Home</title>
        <meta name="keywords" content="itinerary, list" />
        <meta name="description" content="This page provides a list of all itineraries" />
        <link href="css/default.css" rel="stylesheet" type="text/css" />
    </head>

<?php
if(isset($_COOKIE['ID_my_site']))
{
?>
    <body>
        <div id="wrapper">
        <?php include 'include/header2.php'; ?>
	<?php include ('include/db_conf.php'); ?>
            <!-- end div#header -->
            <div id="page">
                <div id="content">
                    <div id="welcome">
                        <!--body-->
       <?php include 'include/ticker.php'; ?><br><br>

<?php echo "<h2>By the way ".$tid." this section needs to be developed...</h2>"; ?>
<?php
$tid=$_COOKIE['ID_my_site'];


$all=mysql_query("SELECT * FROM elementsx");
 echo "<table><tr><td>Transaction ID</td><td>Element</td><td>Hydrogen</td><td>Total Buy</td><td>Total Sold</td><td>Volume</td></tr><tr></tr>";
 $total=0;
 for($i=0;$i <mysql_num_rows($all);$i++ )
      {
        $id=mysql_result($all,$i,"eid");
        $elem= mysql_result($all, $i , "element");
        $amount =mysql_result($all, $i, "amount");
       
     echo "<form action=sold.php method=post>" ;
     echo "<tr></td><td><input type=hidden name=qty value=".$id.">";
     echo $id;
     echo "</td><td><input type=hidden name=r value=".$elem.">";
     echo $elem;
     echo"</td><td><input type=hidden name=cost value=".$amount.">";
     echo $amount;
       echo"</td>";
         echo "<td></td><td></td><td></td></tr></form>"; 
     }
     echo "</table>";
     
     ?>


                        <!--body ends-->
                    </div>

                    <!-- end div#welcome -->

                </div>
                <!-- end div#content -->
                <div id="sidebar">
                    <ul>
                    <?php include 'include/nav.php'; ?>
                        <!-- end navigation -->
                        
                    </ul>
                </div>
                <!-- end div#sidebar -->
                <div style="clear: both; height: 1px"></div>
            </div>
            <?php include 'include/footer.php'; ?>
        </div>
        <!-- end div#wrapper -->
    </body>
    <?php
}
else
header("Location: login.php");
?>
</html>
