]> git.treefish.org Git - wirbrennen/flipacoin.git/blobdiff - flipacoin.cgi
Made site name dynamic.
[wirbrennen/flipacoin.git] / flipacoin.cgi
index 3c35620aed2482cfea1b9b93755c4d54434cb2da..15ac6a46ea8c7c667aef4fcfb8cd4fa79a605401 100755 (executable)
@@ -19,6 +19,7 @@ sub printpage {
     $template->param(COINLIFETIME => $COINLIFETIME);
     $template->param(FLIPPEDCOINSINDB => $flippedcoinsindb);
     $template->param(COINSINDB => $coinsindb);
     $template->param(COINLIFETIME => $COINLIFETIME);
     $template->param(FLIPPEDCOINSINDB => $flippedcoinsindb);
     $template->param(COINSINDB => $coinsindb);
+    $template->param(HTTP_HOST => $ENV{HTTP_HOST});
     print "Content-type: text/html\n\n", $template->output;
 }
 
     print "Content-type: text/html\n\n", $template->output;
 }
 
@@ -85,7 +86,6 @@ elsif ( length($requestedcoinid) == 0 && $requestedaction eq "create" ) {
 
     $template = HTML::Template->new(filename => 'created.html');
     $template->param(NEWCOINID => $newcoinid);
 
     $template = HTML::Template->new(filename => 'created.html');
     $template->param(NEWCOINID => $newcoinid);
-    $template->param(HTTP_HOST => $ENV{HTTP_HOST});
 }
 elsif ( length($requestedcoinid) > 0 ) {
     if ( ! exists $coins_db{$requestedcoinid} ) {
 }
 elsif ( length($requestedcoinid) > 0 ) {
     if ( ! exists $coins_db{$requestedcoinid} ) {
@@ -98,7 +98,6 @@ elsif ( length($requestedcoinid) > 0 ) {
     $template = HTML::Template->new(filename => 'usecoin.html');
 
     $template->param(REQUESTEDCOINID => $requestedcoinid);
     $template = HTML::Template->new(filename => 'usecoin.html');
 
     $template->param(REQUESTEDCOINID => $requestedcoinid);
-    $template->param(HTTP_HOST => $ENV{HTTP_HOST});
     $template->param(COINCREATIONTIME => localtime($coininfo[0])."");
 
     if ( $coininfosize == 1 && $requestedaction eq "" ) {
     $template->param(COINCREATIONTIME => localtime($coininfo[0])."");
 
     if ( $coininfosize == 1 && $requestedaction eq "" ) {