From e8fcf9abaacf8fc9989567ab2b69c95a40b0c889 Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Sun, 9 Mar 2014 23:20:32 +0100 Subject: [PATCH 1/1] Made site name dynamic. --- flipacoin.cgi | 3 +-- templates/_head.html | 2 +- templates/_header.html | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/flipacoin.cgi b/flipacoin.cgi index 3c35620..15ac6a4 100755 --- a/flipacoin.cgi +++ b/flipacoin.cgi @@ -19,6 +19,7 @@ sub printpage { $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; } @@ -85,7 +86,6 @@ elsif ( length($requestedcoinid) == 0 && $requestedaction eq "create" ) { $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} ) { @@ -98,7 +98,6 @@ elsif ( length($requestedcoinid) > 0 ) { $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 "" ) { diff --git a/templates/_head.html b/templates/_head.html index fc24ee7..9e423cd 100644 --- a/templates/_head.html +++ b/templates/_head.html @@ -1,3 +1,3 @@ - flipacoin.org + <!-- TMPL_VAR NAME=HTTP_HOST --> diff --git a/templates/_header.html b/templates/_header.html index 8d71572..f26ddec 100644 --- a/templates/_header.html +++ b/templates/_header.html @@ -9,4 +9,4 @@ patchme@flipacoin.org.
-

flipacoin.org - The Internet's first coinflipping service.

+

- The Internet's first coinflipping service.

-- 2.39.5