Mercurial > laserkard
annotate BASE.pl @ 103:52297178e0eb laserkard
implemented automatic text resize
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 28 Jul 2010 06:36:39 -0400 |
parents | 7742910e0479 |
children |
rev | line source |
---|---|
rlm@29 | 1 #!/usr/bin/perl |
rlm@29 | 2 |
rlm@29 | 3 |
rlm@29 | 4 use List::Util qw(first max maxstr min minstr reduce shuffle sum); |
rlm@29 | 5 use Storable; |
rlm@29 | 6 use CGI::Ajax; |
rlm@29 | 7 use CGI; |
rlm@29 | 8 |
rlm@29 | 9 |
rlm@29 | 10 |
rlm@29 | 11 my $q = new CGI; |
rlm@29 | 12 |
rlm@29 | 13 |
rlm@29 | 14 |
rlm@29 | 15 my %hash = ( |
rlm@29 | 16 |
rlm@29 | 17 'material' => \&material, |
rlm@29 | 18 'pokedex' => \&pokedex, |
rlm@29 | 19 'template' => \&template, |
rlm@29 | 20 'inputbox' => \&inputbox, |
rlm@29 | 21 'display' => \&display, |
rlm@29 | 22 'change_rules' => \&change_rules, |
rlm@29 | 23 'vanish' => \&vanish |
rlm@29 | 24 ); |
rlm@29 | 25 |
rlm@29 | 26 |
rlm@29 | 27 |
rlm@29 | 28 my $pjx = CGI::Ajax->new(%hash); |
rlm@29 | 29 #$pjx->JSDEBUG(1); |
rlm@29 | 30 #$pjx->DEBUG(1); |
rlm@29 | 31 |
rlm@29 | 32 print $pjx->build_html($q,\&gen,{-Cache_Control => 'no-store, no-cache, must-revalidate', -Pragma => 'no-cache'}); # this outputs the html for the page |
rlm@29 | 33 |
rlm@29 | 34 |
rlm@29 | 35 |
rlm@29 | 36 |
rlm@29 | 37 |
rlm@29 | 38 |
rlm@29 | 39 |
rlm@29 | 40 |
rlm@29 | 41 |
rlm@29 | 42 |
rlm@29 | 43 |
rlm@29 | 44 |
rlm@29 | 45 |
rlm@29 | 46 |
rlm@29 | 47 |
rlm@29 | 48 |
rlm@29 | 49 |
rlm@29 | 50 |
rlm@29 | 51 |
rlm@29 | 52 sub gen |
rlm@29 | 53 { |
rlm@29 | 54 |
rlm@29 | 55 $a = <<HERE; |
rlm@29 | 56 |
rlm@29 | 57 |
rlm@29 | 58 <html> |
rlm@29 | 59 |
rlm@29 | 60 |
rlm@29 | 61 <TABLE border="2"> |
rlm@29 | 62 <TR bgcolor="#FFFFFF" onMouseOver="this.bgColor='gold';" onMouseOut="this.bgColor='#FFFFFF';"> |
rlm@29 | 63 <TD>Mauritania</td> |
rlm@29 | 64 <TD>21N</TD> |
rlm@29 | 65 <TD>24N</TD> |
rlm@29 | 66 <TD> </TD> |
rlm@29 | 67 <TD> </TD> |
rlm@29 | 68 </TR> |
rlm@29 | 69 <TR bgcolor="#FFFFFF" onMouseOver="this.bgColor='gold';" onMouseOut="this.bgColor='#FFFFFF';"> |
rlm@29 | 70 <TD>Myanmar</td> |
rlm@29 | 71 <TD> </TD> |
rlm@29 | 72 <TD>M TBA</TD> |
rlm@29 | 73 <TD>M TBA</TD> |
rlm@29 | 74 <TD> </TD> |
rlm@29 | 75 </TR> |
rlm@29 | 76 <TR bgcolor="#FFFFFF" onClick="parent.location='index.html'" onMouseOver="this.bgColor='gold';" onMouseOut="this.bgColor='#FFFFFF';" > |
rlm@29 | 77 <TD>Nepal</td> |
rlm@29 | 78 <TD> </TD> |
rlm@29 | 79 <TD> </TD> |
rlm@29 | 80 <TD> </TD> |
rlm@29 | 81 <TD>M TBA</TD> |
rlm@29 | 82 </TR> |
rlm@29 | 83 </TABLE> |
rlm@29 | 84 </html> |
rlm@29 | 85 HERE |
rlm@29 | 86 |
rlm@29 | 87 return $a; |
rlm@29 | 88 |
rlm@29 | 89 |
rlm@29 | 90 } |
rlm@29 | 91 |
rlm@29 | 92 |
rlm@29 | 93 |