<?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>theUniverse.name</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" />
        <script src="ajax.js" language="javascript"></script>

    </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'; ?>
<hr>
<br><br>
 <form action="confirm.php" method="POST">
                            <?php echo "<h2>Select the elements to buy ".$tid."</h2>"; ?>
                            <select name="share">
                                <?php
                                $result=mysql_query("SELECT name FROM share");
                                for($i=0;$i <mysql_num_rows($result);$i++ )
                                {
                                    $name= mysql_result($result, $i , "name");
                                    echo'<option>'.$name.' </option>';

                                }
                                ?>
                                </select><select name="qty">
                                   <option>5</option>
                                   <option>10</option>
                                   <option>20</option>
                                   <option>25</option>
                                   <option>50 </option>
                                   <br><br>
                                   <input type="submit" value="GO" /> </form>


<br /><br />

<?php
$roll1 = rand(1,6);
$roll2 = rand(1,6);
$sum = $roll1+$roll2;
print "You rolled a $sum ";
print "<br>";

$special = rand(1,12);
$special_sum = $special;


if ($sum == $special_sum){
  print "<h1>Great! $sum Hydrogen storage units found.</h1>";
} else {
  print "$sum Hydrogen atoms was added to your account.";
} // end if

print "<br>";
print "<img src = images/dice$roll1.png>&nbsp;";
print "<img src = images/dice$roll2.png>";
?>


<form action="insert.php" method="POST">
<input name="sum2" type="text" value="<? echo $roll1+$roll2 ?>">
<input type="submit" value="Make Hydrogen" onclick="javascript: refresh();">
</form>
<div id="insert_response"></div>

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

                    <!-- end div#welcome -->

                </div>
                <!-- end div#content -->
                <div id="sidebar">
                    <ul>
                    <?php
if(isset($_COOKIE['ID_my_site']))
{
?>


        <?php include 'include/nav.php'; ?>
            <!-- end div#header -->
            <?php
}
else
{
    ?>

        <?php include 'include/nav2.php'; ?>
            <!-- end div#header -->
<?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>
