Exemplo n.º 1
0
<?php

require './functions.php';
//Obtain seconds
$farol = lerSegundos($arquivo, 2);
if ($farol == 0) {
    $segFaltantes = lerSegundos($arquivo, 1);
    $segundos = time() + $segFaltantes;
} else {
    if ($farol == 1) {
        $segundos = lerSegundos($arquivo);
    }
}
escreveHeader("continue");
$timeWatch = secondsToTime($segundos);
?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Battlehack Time Counter - Stopwatch</title>
        <script>
            
        </script>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="bhtimecounter.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div id="spacer"></div>
        <div id="container">
            <div id="stopwatch">
Exemplo n.º 2
0
        verde();
    } else {
        if ($action == "stop") {
            escreveSegundos($arquivo, time(), $segundos - time(), 0);
            escreveHeader();
            desliga();
        } else {
            if ($action == "continue" && time() < $segundos) {
                if ($segundos - time() <= 15) {
                    amarelo();
                }
                escreveHeader("continue");
            } else {
                escreveSegundos($arquivo, time(), -1, 0);
                vermelho();
                escreveHeader();
            }
        }
    }
}
$timeWatch = secondsToTime($segundos);
?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Battlehack's Presentations - Countdown</title>
        <script>
            
        </script>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">