diff buy.pl @ 40:1ac1409ea68c laserkard

[svn r41] implemented dynamic text.
author rlm
date Mon, 25 Jan 2010 03:42:08 -0500
parents 021a9ab1ed5b
children ef8615de8a9c
line wrap: on
line diff
     1.1 --- a/buy.pl	Sun Jan 24 15:06:22 2010 -0500
     1.2 +++ b/buy.pl	Mon Jan 25 03:42:08 2010 -0500
     1.3 @@ -84,27 +84,59 @@
     1.4  {
     1.5  	
     1.6  $all = shift;
     1.7 -$all =~ m/_(.*)/;
     1.8 +$all =~ m/([^_]*)_(.*)/;
     1.9  
    1.10 -$materialcolor = $1;
    1.11 +$materialcolor = $2;
    1.12 +$style = $1;
    1.13 +#here is where we handle important drawing commands relating to the cards.
    1.14 +
    1.15  
    1.16  	
    1.17  $r =  <<HERE;
    1.18  <div id = "i_templates"><div class = 'ttyl'> <titletron>Select Style.</titletron></div>
    1.19  <div id = 'stupid'>
    1.20 -<input TYPE="image" src = "./images/templates/big_$materialcolor.jpg" 	onmouseover="pokedex(['args__big'],['pokedex']);" 	onclick="display(['template2'], ['display']); inputbox(['template2'], ['inputbox']);material(['template2'], ['materials']);" ID="template2" NAME="template2" VALUE="big_$materialcolor"        > <br>
    1.21 +
    1.22 +
    1.23 +<input TYPE="image" src = "./images/templates/big_$materialcolor.jpg" 	onmouseover="pokedex(['args__big'],['pokedex']);" 	onclick="display(['template2'], ['display']); inputbox(['template2'], ['inputbox']);material(['template2'], ['materials']);redraw('bold');" ID="template2" NAME="template2" VALUE="big_$materialcolor"        > <br>
    1.24 +
    1.25    
    1.26 -<input TYPE="image" src = "./images/templates/basic_$materialcolor.jpg"  onmouseover="pokedex(['args__basic'],['pokedex']);"	onclick="display(['template3'], ['display']); inputbox(['template3'], ['inputbox']);material(['template3'], ['materials']);" ID="template3" NAME="template3" VALUE="basic_$materialcolor"          ><br>
    1.27 -  
    1.28 -<input TYPE="image" src = "./images/templates/classic_$materialcolor.jpg"  onmouseover="pokedex(['args__classic'],['pokedex']);"	onclick="display(['template1'], ['display']); inputbox(['template1'], ['inputbox']);material(['template1'], ['materials']);" ID="template1" NAME="template1" VALUE="classic_$materialcolor"    ><br>
    1.29 +
    1.30 +<input TYPE="image" src = "./images/templates/basic_$materialcolor.jpg"  onmouseover="pokedex(['args__basic'],['pokedex']);"	onclick="display(['template3'], ['display']); inputbox(['template3'], ['inputbox']);material(['template3'], ['materials']);redraw('arrow');" ID="template3" NAME="template3" VALUE="basic_$materialcolor"          ><br>
    1.31 +
    1.32   
    1.33 -<input TYPE="image" src = "./images/templates/lines_$materialcolor.jpg"  onmouseover="pokedex(['args__lines'],['pokedex']);"	onclick="display(['template4'], ['display']); inputbox(['template4'], ['inputbox']);material(['template4'], ['materials']);" ID="template4" NAME="template4" VALUE="lines_$materialcolor"           > 
    1.34 +
    1.35 +<input TYPE="image" src = "./images/templates/classic_$materialcolor.jpg"  onmouseover="pokedex(['args__classic'],['pokedex']);"	onclick="display(['template1'], ['display']); inputbox(['template1'], ['inputbox']);material(['template1'], ['materials']);redraw('classic');" ID="template1" NAME="template1" VALUE="classic_$materialcolor"    ><br>
    1.36 +
    1.37 + 
    1.38 +
    1.39 +<input TYPE="image" src = "./images/templates/lines_$materialcolor.jpg"  onmouseover="pokedex(['args__lines'],['pokedex']);"	onclick="display(['template4'], ['display']); inputbox(['template4'], ['inputbox']);material(['template4'], ['materials']);redraw('direct');" ID="template4" NAME="template4" VALUE="lines_$materialcolor"           > 
    1.40 +
    1.41  	</div>
    1.42  	</div>
    1.43  
    1.44  HERE
    1.45  
    1.46  
    1.47 +%shankHash = 
    1.48 +(
    1.49 +
    1.50 +big => template2,  
    1.51 +basic => template3,
    1.52 +classic => template1,
    1.53 +lines  => template4
    1.54 +);
    1.55 +
    1.56 +$target = $shankHash{$style};
    1.57 +
    1.58 +
    1.59 +
    1.60 +
    1.61 +#$r =~ s/inputbox\(\['$target'\], \['inputbox'\]\)\;//;
    1.62 +
    1.63 +
    1.64 +
    1.65 +
    1.66 +
    1.67  return $r;
    1.68  }
    1.69  
    1.70 @@ -157,9 +189,23 @@
    1.71  	$all = shift;
    1.72  	
    1.73  	
    1.74 -	
    1.75 +	#~ 
    1.76 +	#~ $t = <<HERE;
    1.77 +	#~ <image src = "./images/display/PERL::PIC.jpg" 	onmouseover="pokedex(['args__PERL::PIC'],['pokedex']);">
    1.78 +	#~ 
    1.79 +	#~ <div id = overlay>
    1.80 +#~ 
    1.81 +#~ 
    1.82 +	#~ </div>
    1.83 +	#~ 
    1.84 +#~ HERE
    1.85 +#~ 
    1.86 +#~ 
    1.87 +#~ 
    1.88 +#~ $t =~ s/PERL::PIC/$all/g;
    1.89 +
    1.90  	$t = <<HERE;
    1.91 -	<image src = "./images/display/PERL::PIC.jpg" 	onmouseover="pokedex(['args__PERL::PIC'],['pokedex']);">
    1.92 +	<image src = "./images/display/blank.jpg" 	onmouseover="pokedex(['args__PERL::PIC'],['pokedex']);">
    1.93  	
    1.94  	<div id = overlay>
    1.95  
    1.96 @@ -167,12 +213,6 @@
    1.97  	</div>
    1.98  	
    1.99  HERE
   1.100 -
   1.101 -
   1.102 -
   1.103 -$t =~ s/PERL::PIC/$all/g;
   1.104 -
   1.105 -
   1.106  	
   1.107  	return $t;
   1.108  	
   1.109 @@ -197,13 +237,15 @@
   1.110  
   1.111  
   1.112  
   1.113 +
   1.114 +
   1.115  $a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to <?php include("top_menu.html"); ?>, but in perl and with more memory problems :)
   1.116  $b = &material("void_acrylic_clear",1);
   1.117  $a =~ s/PERL-REPLACE::MATERIALS/$b/; #let's do it again!!! :)
   1.118  $b = &template("big_acrylic_clear");
   1.119  
   1.120 -#$a =~ s/PERL-REPLACE::TEMPLATES//; 
   1.121 -$a =~ s/PERL-REPLACE::TEMPLATES/$b/; #comment out one or the other!
   1.122 +
   1.123 +$a =~ s/PERL-REPLACE::TEMPLATES/$b/; 
   1.124  
   1.125  $b = &display("big_acrylic_clear");
   1.126  $a =~ s/PERL-REPLACE::DISPLAY/$b/;