Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- window.addEventListener("load", function(){
- var load_screen = document.getElementById("load_screen");
- document.body.removeChild(load_screen);
- });
- </script>
- <?php
- if ($harfor >0) {sleep(120);}
- ?>
- <div id="load_screen"><div id="loading"><img src='images/loader.jpg' height=''></div></div>
- <?php
- if ($harfor <0)
- echo "<img src='images/temp.gif' height='1000px'>";
- ?>
- <?php
- include_once('includes/header.php');
- include_once('includes/footer.php');
- ?>
- <ul>
- <div style='max-width:192px;max-height:192px;width:auto;height:50%;margin:0 auto 0 auto;'>
- <li><a href="index.php"><img src='images/fuzzy.jpg'></a></li>
- </div>
- <?php
- date_default_timezone_set("Europe/Copenhagen");
- $tid = date("H.i");
- $dag = date("D");
- // Menu
- if ($tid >= 09.15 and $tid <= 17.15 and $dag != "Sat" and $dag != "Sun") {
- echo "<li><a class='active' href='index.php'>Aktier aktive</a> </li>" ;
- }
- else {
- echo "<li><a class='active' href='index.php'>Aktier offline </a> </li>";
- }
- ?>
- <li><a href="faq.php">Spørsmål</a></li>
- <li><a href='omkring.php'>Omkring aktierne</a></li>
- <li><a href='hjelp.php'>Tilkald IT hjælp</a></li>
- </ul>
- <?php
- include_once('includes/php.php');
- ?>
- <div class="center">
- <table>
- <?php
- foreach ($stockData as $key => $stock){
- echo "<tr> <th>" . "<div id='keyvar'>" . $key . "</div>" .
- //Titles for the tables
- "</th>" . "<th>" . "<div class='overskrift'>" . "Kurs" . "</div>" .
- "</th>" . "<th>" . "<div class='overskrift'>" . "Værdi" . "</div>" .
- "</th>" . "<th>". "<div class='overskrift'>" . "Ændring". "</div>" .
- "</th>" . "<th>". "<div class='overskrift'>" . "Procent" . "</div>" .
- "</th>" . "<th>" ."<div class='overskrift'>" . "Afkast" . "</div>" .
- "<tr> <td></td>" .
- //Values for the tables
- "<td>" . "<div class='values'>" . $stock['data']['value'] . "</div>" . "</td>" .
- "<td>" . "<div class='values'>" . ($stock['data']['value'] * $stock['amount']) . "</div>" . "</td>";
- //Make the background red
- if($stock['data']['change'] < 0){
- echo "<td>" . "<div class='values1'>" . @($stock['data']['change'] * $stock['amount']) . "</div>" . "</td>" .
- "<td>" . "<div class='values'>" . $stock['data']['pp'] . "</div>" . "</td>";
- }
- //Make the background green
- if($stock['data']['change'] > 0){
- echo "<td>" . "<div class='values2'>" . @($stock['data']['change'] * $stock['amount']) . "</div>" . "</td>" .
- "<td>" . "<div class='values'>" . $stock['data']['pp'] . "</div>" . "</td>";
- }
- //Make the background neutral
- if($stock['data']['change'] == 0){
- echo "<td>" . "<div class='values'>" . @($stock['data']['change'] * $stock['amount']) . "</div>" . "</td>" .
- "<td>" . "<div class='values'>" . $stock['data']['pp'] . "</div>" . "</td>";
- }
- echo "<td>" . "<div class='values'>" . (($stock['data']['value'] - $stock['bought'])* $stock['amount']) . "</div>" . "</td>" . "</tr>";
- }
- $minstart = (14492.60);
- $minnu = 0;
- foreach ($stockData as $key => $stock)
- {
- $minnu += $stock['data']['value'] * $stock['amount'];
- }
- $idag = 0;
- foreach ($stockData as $key => $stock)
- {
- @$idag += $stock['data']['change'] * $stock['amount'];
- }
- $harfor = ($minnu - $minstart);
- echo "<div id='value-container'>";
- echo "Total ". $minnu . " " . "|" . " ";
- echo "Total i dag ". $idag . " " . "|" . " ";
- if ($harfor < 0) {
- echo "Mistet " . $harfor;
- }
- elseif ($harfor > 0) {
- echo "Tjent " . $harfor;
- }
- echo "</div>";
- ?>
- <?php
- /*
- // Sende $idag til databasse
- $servername = "localhost";
- $username = "mike1989_getinfo";
- $password = "";
- $dbname = "mike1989_DayToDay";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "INSERT INTO money (date, money)
- VALUES ($dato, $harfor)";
- while ($tid == 17.15 and $dag != Sat and $dag != Sun) {
- if (mysqli_query($conn, $sql)) {
- echo "New record created successfully";
- sleep(60);
- }
- else {
- echo "Error: " . $sql . "<br>" . mysqli_error($conn);
- }
- }
- //Katte
- */
- ?>
- </table>
- </div>
- <div id="cats">
- <?php
- //temp
- ?>
- <?php
- if ($harfor >0) {
- echo "<iframe width='600' height='410' src='https://www.youtube.com/embed/3GwjfUFyY6M?autoplay=1'>";
- echo "</iframe>";
- }
- if ($idag < 0 and $idag >= -80 ){
- echo "<img src='images/sad.jpg' height='410px'>";
- }
- elseif ($dag == 'Sat' or $dag == 'Sun') {
- echo "<img src='images/weekend.jpg' height='410px'>";
- }
- elseif ($idag == 0) {
- echo "<img src='images/soon.jpg' height='410px'>";
- }
- elseif ($idag >= 80 && $idag < 150) {
- echo "<img src='images/goddag.jpg' height='410px'>";
- }
- elseif ($idag >= 150) {
- echo "<img src='images/win.jpg' height='410px'>";
- }
- elseif ($idag <= -80 and $idag >= -150) {
- echo "<img src='images/shit.jpg' height='410px'>";
- }
- elseif ($idag <= -150) {
- echo "<img src='images/fuck.jpg' height='410px'>";
- }
- elseif ($idag > 0 and $idag < 80 ) {
- echo "<img src='images/happy.jpg' height='410px'>";
- }
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement