]> ruin.nu Git - ndwebbie.git/blobdiff - lib/NDWeb/Include.pm
Replaced intelquery function with a view
[ndwebbie.git] / lib / NDWeb / Include.pm
index 8105dad2f89c54bbfaab521b540410fe83c8945b..e619a228d7506402b232975eebf5ac6155d7f58c 100644 (file)
@@ -27,7 +27,7 @@ use CGI qw/:standard/;
 our @ISA = qw/Exporter/;
 
 our @EXPORT = qw/parseMarkup
-       intelquery html_escape
+       html_escape
        comma_value array_expand/;
 
 sub html_escape($) {
@@ -56,6 +56,8 @@ my $bbc = Parse::BBCode->new({
                        code => 'block:<div class="bbcode-quote"><pre class="bbcode-code">%{html}s</pre></div>',
                        img   => 'url:<a href="%{link}A" rel="external">%s</a>',
                        li  => 'block:<li>%{parse}s</li>',
+                       size  => '<span style="font-size: %{num}a%">%s</span>',
+
                },
                close_open_tags   => 1,
        });
@@ -74,18 +76,6 @@ sub parseMarkup ($) {
        return $text;
 }
 
-sub intelquery {
-       my ($columns,$where) = @_;
-       return qq{
-SELECT $columns, i.mission, i.tick AS landingtick,MIN(i.eta) AS eta, i.amount, i.ingal, u.username
-FROM (intel i NATURAL JOIN users u)
-       JOIN current_planet_stats t ON i.target = t.id
-       JOIN current_planet_stats o ON i.sender = o.id
-WHERE $where 
-GROUP BY i.tick,i.mission,t.x,t.y,t.z,o.x,o.y,o.z,i.amount,i.ingal,u.username,t.alliance,o.alliance,t.nick,o.nick,i.sender,i.target
-ORDER BY i.tick DESC, i.mission};
-}
-
 sub array_expand ($) {
        my ($array) = @_;