changeset 10:de10d02dc715

Using item images for non-IGB browsers
author Dominic Cleal <dominic@computerkb.co.uk>
date Sun, 25 Jan 2009 13:14:07 +0000
parents 6b98a17fbe22
children f749981ad862
files reproctool.cgi
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/reproctool.cgi	Sun Jan 25 13:06:33 2009 +0000
+++ b/reproctool.cgi	Sun Jan 25 13:14:07 2009 +0000
@@ -122,6 +122,8 @@
 <table>
 END
 
+my $igb = ($ENV{HTTP_USER_AGENT} =~ /EVE-minibrowser/i);
+
 for my $item (@output)
 {
     if ($col == $cols)
@@ -135,8 +137,16 @@
     if (defined $item->{id})
     {
         $style = "meta$item->{meta}";
-        $img = "typeicon:$item->{id}";
-        $link = "showinfo:$item->{id}";
+        if ($igb)
+        {
+            $img = "typeicon:$item->{id}";
+            $link = "showinfo:$item->{id}";
+        }
+        else
+        {
+            $img = "$img_http_path/icons/icons_items_png/64_64/icon$item->{icon}.png";
+        }
+        
         if ($item->{meta} == 4)
         {
             $text = $item->{name};