From: Michael Andreen Date: Tue, 26 Dec 2006 11:06:27 +0000 (+0000) Subject: global_vars and instead of hardcoded page values X-Git-Url: https://ruin.nu/git/?a=commitdiff_plain;h=9ab3c27fa22249c34adbb268ec45bd905648a28d;p=ndwebbie.git global_vars and instead of hardcoded page values --- diff --git a/index.pl b/index.pl index ecb27a2..f9a5345 100755 --- a/index.pl +++ b/index.pl @@ -34,7 +34,7 @@ our $DBH = undef; our $USER = $ENV{'REMOTE_USER'}; my $error; -our $TEMPLATE = HTML::Template->new(filename => 'templates/skel.tmpl'); +our $TEMPLATE = HTML::Template->new(filename => 'templates/skel.tmpl', global_vars => 1); for my $file ("db.pl","include.pl"){ unless (my $return = do $file){ @@ -79,7 +79,8 @@ if ($XML){ $ND::TEMPLATE = HTML::Template->new(filename => "templates/xml.tmpl"); $ND::BODY = HTML::Template->new(filename => "templates/${page}.xml.tmpl"); }else{ - $ND::BODY = HTML::Template->new(filename => "templates/${page}.tmpl"); + $ND::BODY = HTML::Template->new(filename => "templates/${page}.tmpl", global_vars => 1); + $ND::BODY->param(PAGE => $page); } diff --git a/templates/addintel.tmpl b/templates/addintel.tmpl index 2082a7f..b6e004c 100644 --- a/templates/addintel.tmpl +++ b/templates/addintel.tmpl @@ -7,7 +7,7 @@

Paste scan urls and intel from gal status here

- +
Tick: @@ -17,6 +17,6 @@

Write other messages to intel dept here (sms numbers, relay channels, bots etc) (NOT gal status):

- +
diff --git a/templates/alliances.tmpl b/templates/alliances.tmpl index b090cf0..a7cd793 100644 --- a/templates/alliances.tmpl +++ b/templates/alliances.tmpl @@ -1,7 +1,7 @@
Alliances: - +
@@ -24,15 +24,15 @@
- + - + - - - - - + + + + + @@ -80,16 +80,16 @@ - - - - - - + + + + + + - + diff --git a/templates/calls.tmpl b/templates/calls.tmpl index b1f4f0d..3946024 100644 --- a/templates/calls.tmpl +++ b/templates/calls.tmpl @@ -1,7 +1,7 @@
Call details, call# - +

Current DC:

Member:

@@ -34,7 +34,7 @@

Attackers:

- +
CoordsCoords NickHit usHit us PlanetRaceSize (rank)Score (rank)Value (rank)XP (rank)RaceSize (rank)Score (rank)Value (rank)XP (rank)
User Known members Total membersScore (known planets)Avg Score (known planets)Size (known planets)Avg Size (known planets)XP (avg)Value (avg)Score (known planets)Avg Score (known planets)Size (known planets)Avg Size (known planets)XP (avg)Value (avg)
()
@@ -72,7 +72,7 @@ - + diff --git a/templates/check.tmpl b/templates/check.tmpl index a3b2560..6dfe3d3 100644 --- a/templates/check.tmpl +++ b/templates/check.tmpl @@ -1,11 +1,11 @@ -

Do arbiter check on gal

+

Do arbiter check on gal

CallMember (def points)Landing tickRacesAmountShiptypesCurrent etaInital etaAllianceAttackers
()
- + diff --git a/templates/covop.tmpl b/templates/covop.tmpl index aef3e6a..a6d2b4f 100644 --- a/templates/covop.tmpl +++ b/templates/covop.tmpl @@ -4,7 +4,7 @@ - + @@ -12,7 +12,7 @@ -
CoordsPlanetRaceSize (rank)Score (rank)Value (rank) XP (rank)Fleet (Resouce) valueNickHit usAlliance
()Did CovOp this tick + Did CovOp this tick
diff --git a/templates/defrequest.tmpl b/templates/defrequest.tmpl index 78cbfd4..b560a47 100644 --- a/templates/defrequest.tmpl +++ b/templates/defrequest.tmpl @@ -5,7 +5,7 @@ channel

Message to def channel (like a line from gal status):

- +
diff --git a/templates/editRaid.tmpl b/templates/editRaid.tmpl index 4a656cc..46b48ed 100644 --- a/templates/editRaid.tmpl +++ b/templates/editRaid.tmpl @@ -1,14 +1,14 @@
Edit raidNew raid - +
-

raid.

-

coords.

-

Remove raid

+

raid.

+

coords.

+

Remove raid

@@ -55,12 +55,12 @@

Sort by: - Coords - Race - Size - Score - Value - XP + Coords + Race + Size + Score + Value + XP

Target: # @@ -80,7 +80,7 @@
- + @@ -90,7 +90,7 @@

 
-

Remove

+

Remove

diff --git a/templates/intel.tmpl b/templates/intel.tmpl index 7233ff2..902c9b4 100644 --- a/templates/intel.tmpl +++ b/templates/intel.tmpl @@ -2,17 +2,17 @@

- +

-

Show all ticks

+

Show all ticks

- + @@ -24,7 +24,7 @@ - +
CoordsAlliance
@@ -68,7 +68,7 @@ - + @@ -87,7 +87,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -117,7 +117,7 @@ - +
removeremove
@@ -126,6 +126,6 @@

Paste a list of coords here

- +
diff --git a/templates/launchConfirmation.tmpl b/templates/launchConfirmation.tmpl index 2fc5ead..1d5a4a2 100644 --- a/templates/launchConfirmation.tmpl +++ b/templates/launchConfirmation.tmpl @@ -16,7 +16,7 @@

Paste all (ctrl+a should be ok, but try with just single mission if you get an error, save the ctrl+a output and contact harv) information from missions page here (NOT from news page, and not overview, nor gal status). It's ok to paste when prelaunched, as long as you're sure you won't change your plans.

- +
diff --git a/templates/main.tmpl b/templates/main.tmpl index 5ba2dc7..36eaaae 100644 --- a/templates/main.tmpl +++ b/templates/main.tmpl @@ -22,7 +22,7 @@
  • XP:
  • -
    +

    We need your planet's coordinates: @@ -50,16 +50,18 @@

    -
    +
    Fleet

    Paste your total fleet from ships section on overview here (do it daily to see the menus):

    +
    -
    +
    Change password +

    Old password: New password: diff --git a/templates/memberIntel.tmpl b/templates/memberIntel.tmpl index b6a3c57..b3cea94 100644 --- a/templates/memberIntel.tmpl +++ b/templates/memberIntel.tmpl @@ -1,5 +1,5 @@ -

    Show all ticks

    +

    Show all ticks

    diff --git a/templates/points.tmpl b/templates/points.tmpl index 2441baf..b45635c 100644 --- a/templates/points.tmpl +++ b/templates/points.tmpl @@ -1,12 +1,12 @@
    - - - - - - + + + + + + diff --git a/templates/raids.tmpl b/templates/raids.tmpl index 3fd7ac5..6bbb87b 100644 --- a/templates/raids.tmpl +++ b/templates/raids.tmpl @@ -1,5 +1,5 @@ -

    +

    Edit Close raid. @@ -34,9 +34,9 @@

    + onclick = "update('index.pl?page=&xml=1&raid=')"/> + onclick = "listTargets('index.pl?page=&xml=1&raid=')"/>

    @@ -73,12 +73,12 @@ + onclick = "claim('index.pl?page=&xml=1&raid=',,,'Claim')"/> - wave () - NJ + wave () + NJ @@ -89,7 +89,7 @@
    diff --git a/templates/resources.tmpl b/templates/resources.tmpl index 5010c65..2030dad 100644 --- a/templates/resources.tmpl +++ b/templates/resources.tmpl @@ -2,13 +2,13 @@
    UserTotalDefensesAttacksScansHumorND RankTotalDefensesAttacksScansHumorND Rank
    - - - - - - - + + + + + + + diff --git a/templates/top100.tmpl b/templates/top100.tmpl index 20f7303..d07be51 100644 --- a/templates/top100.tmpl +++ b/templates/top100.tmpl @@ -1,20 +1,20 @@ -

    Previous 100 - Next 100

    +

    Previous 100 + Next 100

    NameRelationshipMembers (in res calc)ScoreSizeResourcesResources / PlanetRes score (gain)[1]Avg res score (gain)[2]Estimated score[3]ScoreSizeResourcesResources / PlanetRes score (gain)[1]Avg res score (gain)[2]Estimated score[3]
    - - - - + + + + - + - + @@ -22,12 +22,12 @@ - +
    CoordsPlanetRaceSize (rank)Score (rank)Value (rank)XP (rank)Size (rank)Score (rank)Value (rank)XP (rank) NickHit usHit us Alliance
    -

    Previous 100 - Next 100

    +

    Previous 100 + Next 100

    diff --git a/templates/users.tmpl b/templates/users.tmpl index e63f4df..8565c8a 100644 --- a/templates/users.tmpl +++ b/templates/users.tmpl @@ -1,7 +1,7 @@
    User details - + @@ -65,7 +65,7 @@ - +
    User