comparison ally.pl @ 169:a60cf4d1a6dd

fixed url and axis
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Sun, 02 Nov 2008 02:21:05 +0800
parents 54ab0becd730
children dd3d76f43999
comparison
equal deleted inserted replaced
157:4b5e1d3a5198 169:a60cf4d1a6dd
57 border-collapse: collapse; 57 border-collapse: collapse;
58 background-color: white; 58 background-color: white;
59 } 59 }
60 </style></head><body><table border=1>"); 60 </style></head><body><table border=1>");
61 61
62 foreach my $x ($x1..$x2) 62 foreach my $y($y1..$y2)
63 { 63 {
64 print(OUT "<tr>"); 64 print(OUT "<tr>");
65 foreach my $y($y1..$y2) 65 foreach my $x ($x1..$x2)
66 { 66 {
67 # printf("<div stlye='float:left; background-color: black; padding: 0; Display:inline;'>o</div>"); 67 # printf("<div stlye='float:left; background-color: black; padding: 0; Display:inline;'>o</div>");
68 if(defined($maps{$x}{$y}{'density'})) { 68 if(defined($maps{$x}{$y}{'density'})) {
69 my $c = 255 - (15 * $maps{$x}{$y}{'density'}); 69 my $c = 255 - (15 * $maps{$x}{$y}{'density'});
70 printf(OUT "<td style=\"background-color: rgb(255,%d,%d);\"><a href=\"http://s2.ikariam.tw/index.php?view=island&id=%d\" title=\"[%d,%d] (%d)\">[%d,%d]</a></td>", 70 printf(OUT "<td style=\"background-color: rgb(255,%d,%d);\"><a href=\"http://%s/index.php?view=island&id=%d\" title=\"[%d,%d] (%d)\">[%d,%d]</a></td>",
71 $c, $c, $maps{$x}{$y}{'id'}, $x, $y, $maps{$x}{$y}{'density'}, $x, $y); 71 $c, $c, $::server, $maps{$x}{$y}{'id'}, $x, $y, $maps{$x}{$y}{'density'}, $x, $y);
72 } else { 72 } else {
73 printf(OUT "<td style=\"background-color: rgb(255,255,255);\">[%d,%d]</td>", $x, $y); 73 printf(OUT "<td style=\"background-color: rgb(255,255,255);\">[%d,%d]</td>", $x, $y);
74 } 74 }
75 } 75 }
76 print(OUT "</tr>"); 76 print(OUT "</tr>");