annotate BoosterPack/.svn/text-base/cards.pl.svn-base @ 0:0d795f02a8bb tip

initial committ. what was I thinking?
author Robert McIntyre <rlm@mit.edu>
date Mon, 27 Sep 2010 16:57:26 -0400
parents
children
rev   line source
rlm@0 1 #!C:/strawberry/perl/bin/perl.exe
rlm@0 2
rlm@0 3
rlm@0 4 use CGI::Ajax;
rlm@0 5 use CGI;
rlm@0 6
rlm@0 7 my $q = new CGI;
rlm@0 8
rlm@0 9
rlm@0 10 my %hash = ( 'card_list' => \&CardList, 'display_card' => \&DisplayCard , 'tags' => \&getAllTags);
rlm@0 11
rlm@0 12
rlm@0 13
rlm@0 14
rlm@0 15 my $pjx = CGI::Ajax->new(%hash);
rlm@0 16 $pjx->JSDEBUG(1);
rlm@0 17 $pjx->DEBUG(1);
rlm@0 18 print $pjx->build_html($q,\&gen); # this outputs the html for the page
rlm@0 19
rlm@0 20
rlm@0 21
rlm@0 22
rlm@0 23
rlm@0 24 sub getAllTags
rlm@0 25 {
rlm@0 26 return 14;
rlm@0 27 };
rlm@0 28
rlm@0 29
rlm@0 30
rlm@0 31 sub DisplayCard
rlm@0 32 {
rlm@0 33 return 13;
rlm@0 34 };
rlm@0 35
rlm@0 36
rlm@0 37 sub CardList
rlm@0 38 {
rlm@0 39
rlm@0 40 return 15;
rlm@0 41
rlm@0 42 };
rlm@0 43
rlm@0 44
rlm@0 45 sub gen
rlm@0 46 {
rlm@0 47 open FILE, "<cards.html";
rlm@0 48 return do { local $/; <FILE> };
rlm@0 49 };