]> ruin.nu Git - ndwebbie.git/commitdiff
intel link on check page, and red background for untaken calls
authorMichael Andreen <harv@ruin.nu>
Thu, 28 Dec 2006 20:55:09 +0000 (20:55 +0000)
committerMichael Andreen <harv@ruin.nu>
Thu, 28 Dec 2006 20:55:09 +0000 (20:55 +0000)
calls.pl
templates/calls.tmpl
templates/check.tmpl

index 5fa57dff1ae9809ab5055664b5d511812379263f..ce708fc0df83aa37c90a9c33988111e3bb2bd815 100644 (file)
--- a/calls.pl
+++ b/calls.pl
@@ -181,7 +181,7 @@ ORDER BY p.x,p.y,p.z});
        my ($maxpoints) = $DBH->selectrow_array($pointlimits,undef,'DEFMAX');
 
        my $query = $DBH->prepare(qq{
-SELECT c.id, coords(p.x,p.y,p.z), u.defense_points, c.landing_tick, 
+SELECT c.id, coords(p.x,p.y,p.z), u.defense_points, c.landing_tick, c.dc,
        TRIM('/' FROM concat(p2.race||' /')) AS race, TRIM('/' FROM concat(i.amount||' /')) AS amount,
        TRIM('/' FROM concat(i.eta||' /')) AS eta, TRIM('/' FROM concat(i.shiptype||' /')) AS shiptype,
        TRIM('/' FROM concat(c.landing_tick - tick() ||' /')) AS curreta,
@@ -193,7 +193,7 @@ FROM calls c
        JOIN current_planet_stats p ON u.planet = p.id
        JOIN current_planet_stats p2 ON i.sender = p2.id
 WHERE $where
-GROUP BY c.id, p.x,p.y,p.z, u.username, c.landing_tick, c.info,u.defense_points
+GROUP BY c.id, p.x,p.y,p.z, u.username, c.landing_tick, c.info,u.defense_points,c.dc
 ORDER BY c.landing_tick DESC
                })or $error .= $DBH->errstr;
        $query->execute or $error .= $DBH->errstr;
@@ -213,6 +213,7 @@ ORDER BY c.landing_tick DESC
                        push @calls,{};
                        $i = 0;
                }
+               $call->{dc} = 'Hostile' unless defined $call->{dc};
                $i++;
                $call->{ODD} = $i % 2;
                $call->{shiptype} = escapeHTML($call->{shiptype});
index 07155a5650ee3c30354b6fc5adb5f722e29fcee7..892ee1051ac5bce5521d76b8e54e8377ea08b1b3 100644 (file)
@@ -74,7 +74,7 @@
        <tr><th>Call</th><th>Member (def points)</th><th>Landing tick</th><th>Races</th><th>Amount</th><th>Shiptypes</th><th>Current eta</th><th>Inital eta</th><th>Alliance</th><th>Attackers</th></tr>
 <TMPL_LOOP Calls>
        <tr align="center" class="<TMPL_IF ODD>odd<TMPL_ELSE>even</TMPL_IF>">
-               <td><a href="<TMPL_VAR NAME=PAGE>?call=<TMPL_VAR NAME=Id>"><TMPL_VAR NAME=Id></a></td>
+               <td class="<TMPL_VAR NAME=DC>"><a href="<TMPL_VAR NAME=PAGE>?call=<TMPL_VAR NAME=Id>"><TMPL_VAR NAME=Id></a></td>
                <td class='<TMPL_VAR NAME=DefPrio>'><TMPL_VAR NAME=Coords> <TMPL_IF Id>(<TMPL_VAR NAME=Defense_points>)<TMPL_ELSE>-New Day-</TMPL_IF></td>
                <td><TMPL_VAR NAME=Landing_tick></td>
                <td><TMPL_VAR NAME=Race></td>
index 0310ea4d53bcdb98100976cf49947874880ccfda..87341c84ce2a8bb5191b65779ddd4e79975a2e5a 100644 (file)
@@ -8,7 +8,7 @@
                <td><a href="<TMPL_VAR NAME=PAGE>?coords=<TMPL_VAR NAME=Coords>"><TMPL_VAR NAME=Coords></a></td>
                <td><TMPL_VAR NAME=Planet></td><td><TMPL_VAR NAME=Race></td><td><TMPL_VAR NAME=Size></td>
                <td><TMPL_VAR NAME=Score></td><td><TMPL_VAR NAME=Value></td><td><TMPL_VAR NAME=XP></td>
-               <td><TMPL_VAR NAME=FleetValue></td><TMPL_IF isBC><td class="<TMPL_VAR NAME=PlanetStatus>"><TMPL_VAR NAME=Nick></td><td><TMPL_VAR NAME=HitUs></td>
+               <td><TMPL_VAR NAME=FleetValue></td><TMPL_IF isBC><td class="<TMPL_VAR NAME=PlanetStatus>"><a href="intel?coords=<TMPL_VAR NAME=Coords>"><TMPL_VAR NAME=Nick></a></td><td><TMPL_VAR NAME=HitUs></td>
                <td class="<TMPL_VAR NAME=Relationship>"><TMPL_VAR NAME=Alliance></td></TMPL_IF>
        </tr>