]> git.treefish.org Git - wirbrennen/flipacoin.git/blobdiff - flipacoin.cgi
Inserted link to starting page.
[wirbrennen/flipacoin.git] / flipacoin.cgi
index 95bf6c1761af28a8e3c1d4cd2dc36d32801f68fe..3c35620aed2482cfea1b9b93755c4d54434cb2da 100755 (executable)
@@ -102,18 +102,19 @@ elsif ( length($requestedcoinid) > 0 ) {
     $template->param(COINCREATIONTIME => localtime($coininfo[0])."");
 
     if ( $coininfosize == 1 && $requestedaction eq "" ) {
     $template->param(COINCREATIONTIME => localtime($coininfo[0])."");
 
     if ( $coininfosize == 1 && $requestedaction eq "" ) {
-       $template->param(NOTYETFLIPPED => 1);
+       $template->param(STATUS_NOTYETFLIPPED => 1);
     }
     elsif ( $coininfosize == 1 && $requestedaction eq "flip" ) {
        $result = int(rand(2));
        $coins_db{$requestedcoinid} = $coins_db{$requestedcoinid} .
            "," . time .
            "," . $result;
     }
     elsif ( $coininfosize == 1 && $requestedaction eq "flip" ) {
        $result = int(rand(2));
        $coins_db{$requestedcoinid} = $coins_db{$requestedcoinid} .
            "," . time .
            "," . $result;
-       $template->param(COINSTATUS => "Just flipped");
+       $template->param(STATUS_JUSTFLIPPED => 1);
        $template->param(COINRESULT => translateresult($result));
     }
     elsif ( $coininfosize == 3 ) {
        $template->param(COINRESULT => translateresult($result));
     }
     elsif ( $coininfosize == 3 ) {
-       $template->param(COINSTATUS => "Flipped @ " . localtime($coininfo[1]));
+       $template->param(STATUS_FLIPPED => 1);
+       $template->param(COINFLIPPEDTIME => localtime($coininfo[1])."");
        $template->param(COINRESULT => translateresult($coininfo[2]));
     }
 }
        $template->param(COINRESULT => translateresult($coininfo[2]));
     }
 }