Mercurial > laserkard
diff BASE.pl @ 29:7742910e0479 laserkard
[svn r30] implemented drawing text on the picture dynamically. still need to center stuff
author | rlm |
---|---|
date | Sat, 16 Jan 2010 12:25:43 -0500 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/BASE.pl Sat Jan 16 12:25:43 2010 -0500 1.3 @@ -0,0 +1,93 @@ 1.4 +#!/usr/bin/perl 1.5 + 1.6 + 1.7 +use List::Util qw(first max maxstr min minstr reduce shuffle sum); 1.8 +use Storable; 1.9 +use CGI::Ajax; 1.10 +use CGI; 1.11 + 1.12 + 1.13 + 1.14 +my $q = new CGI; 1.15 + 1.16 + 1.17 + 1.18 +my %hash = ( 1.19 + 1.20 +'material' => \&material, 1.21 +'pokedex' => \&pokedex, 1.22 +'template' => \&template, 1.23 +'inputbox' => \&inputbox, 1.24 +'display' => \&display, 1.25 +'change_rules' => \&change_rules, 1.26 +'vanish' => \&vanish 1.27 +); 1.28 + 1.29 + 1.30 + 1.31 +my $pjx = CGI::Ajax->new(%hash); 1.32 +#$pjx->JSDEBUG(1); 1.33 +#$pjx->DEBUG(1); 1.34 + 1.35 +print $pjx->build_html($q,\&gen,{-Cache_Control => 'no-store, no-cache, must-revalidate', -Pragma => 'no-cache'}); # this outputs the html for the page 1.36 + 1.37 + 1.38 + 1.39 + 1.40 + 1.41 + 1.42 + 1.43 + 1.44 + 1.45 + 1.46 + 1.47 + 1.48 + 1.49 + 1.50 + 1.51 + 1.52 + 1.53 + 1.54 + 1.55 +sub gen 1.56 +{ 1.57 + 1.58 +$a = <<HERE; 1.59 + 1.60 + 1.61 +<html> 1.62 + 1.63 + 1.64 +<TABLE border="2"> 1.65 + <TR bgcolor="#FFFFFF" onMouseOver="this.bgColor='gold';" onMouseOut="this.bgColor='#FFFFFF';"> 1.66 + <TD>Mauritania</td> 1.67 + <TD>21N</TD> 1.68 + <TD>24N</TD> 1.69 + <TD> </TD> 1.70 + <TD> </TD> 1.71 + </TR> 1.72 + <TR bgcolor="#FFFFFF" onMouseOver="this.bgColor='gold';" onMouseOut="this.bgColor='#FFFFFF';"> 1.73 + <TD>Myanmar</td> 1.74 + <TD> </TD> 1.75 + <TD>M TBA</TD> 1.76 + <TD>M TBA</TD> 1.77 + <TD> </TD> 1.78 + </TR> 1.79 + <TR bgcolor="#FFFFFF" onClick="parent.location='index.html'" onMouseOver="this.bgColor='gold';" onMouseOut="this.bgColor='#FFFFFF';" > 1.80 + <TD>Nepal</td> 1.81 + <TD> </TD> 1.82 + <TD> </TD> 1.83 + <TD> </TD> 1.84 + <TD>M TBA</TD> 1.85 + </TR> 1.86 +</TABLE> 1.87 +</html> 1.88 +HERE 1.89 + 1.90 +return $a; 1.91 + 1.92 + 1.93 +} 1.94 + 1.95 + 1.96 +