diff buy.pl @ 2:e2e7c63a0a08 laserkard

[svn r3] Cleaned up graphics.
author rlm
date Thu, 31 Dec 2009 22:49:06 -0500
parents 599d0315537d
children c96cb4e773e5
line wrap: on
line diff
     1.1 --- a/buy.pl	Wed Dec 30 02:10:57 2009 -0500
     1.2 +++ b/buy.pl	Thu Dec 31 22:49:06 2009 -0500
     1.3 @@ -15,6 +15,7 @@
     1.4  my %hash = ( 
     1.5  
     1.6  'material' => \&material,
     1.7 +'pokedex'  => \&pokedex,
     1.8  'template'	=> \&template, 
     1.9  'inputbox'	=> \&inputbox,
    1.10  'display'	=> \&display,
    1.11 @@ -44,28 +45,31 @@
    1.12  	#return (($t =~ m/_acrylic_green/) ? 'CHECKED' : 'notchecked');
    1.13  	
    1.14  	#$y = "$t<br>".(($t =~ m/_acrylic_green/) ? 'CHECKED' : 'notchecked')."
    1.15 -	$y = ""."
    1.16 -	<form id=\"radiobuttons\">
    1.17 -		<h3>PICK your Materials?:&nbsp;</h3>
    1.18 +	
    1.19 +	{
    1.20 +    local( $/, *FH ) ;
    1.21 +    open( FH, "<./buy_pieces/materials2.html" ) or die "sudden flaming death\n";
    1.22 +    $y = <FH>;
    1.23 +	}
    1.24 +	
    1.25 +	@symbols = qw(PERL::ACRYLIC_CLEAR PERL::ACRYLIC_BLUE PERL::ACRYLIC_GREEN PERL::ALUMINUM_RED PERL::ALUMINUM_BLUE PERL::ALUMINUM_GREEN PERL::ALUMINUM_BLACK);
    1.26 +	
    1.27 +	for (@symbols)
    1.28 +	{
    1.29 +	$c = $_;
    1.30 +	$c =~ s/PERL:://;
    1.31 +	$c =~ tr/[A-Z]/[a-z]/;
    1.32 +	$c =~ s/^/_/;
    1.33 +	
    1.34 +	$b = '"'.$newvar.$c.'"'.(($t =~ m/$c/) ? '  CHECKED ' : '');
    1.35 +	$y =~ s/$_/$b/; 
    1.36 +	}
    1.37 +	
    1.38 +
    1.39 +	$first = shift;
    1.40 +	if ($first){  $y =~ s/display[^;]*;//g; }
    1.41 +	
    1.42  		
    1.43 -		<div class = \"Acrylic\">
    1.44 -		Acrylic:
    1.45 -		<input TYPE=\"radio\" onclick=\"template([\'radio1\'], [\'templates\']);display([\'radio1\'], [\'display\']); inputbox([\'radio1\'], [\'inputbox\']);  \" ID=\"radio1\" NAME=\"radio1\" VALUE=\"".$newvar."_acrylic_clear\"".(($t =~ m/_acrylic_clear/) ? 'CHECKED' : '')."><a href=\"\#\">Clear</a>
    1.46 -		<input TYPE=\"radio\" onclick=\"template([\'radio1\'], [\'templates\']);display([\'radio1\'], [\'display\']); inputbox([\'radio1\'], [\'inputbox\']);  \" ID=\"radio1\" NAME=\"radio1\" VALUE=\"".$newvar."_acrylic_blue\"".(($t =~ m/_acrylic_blue/) ? 'CHECKED' : '')."><a href=\"\#\">Blue</a>
    1.47 -		<input TYPE=\"radio\" onclick=\"template([\'radio1\'], [\'templates\']);display([\'radio1\'], [\'display\']); inputbox([\'radio1\'], [\'inputbox\']);  \" ID=\"radio1\" NAME=\"radio1\" VALUE=\"".$newvar."_acrylic_green\"".(($t =~ m/_acrylic_green/) ? 'CHECKED' : '')."><a href=\"\#\">Green</a>
    1.48 -		</div>
    1.49 -		
    1.50 -		<div class = \"Aluminum\">
    1.51 -		Aluminum:
    1.52 -		<input TYPE=\"radio\" onclick=\"template([\'radio1\'], [\'templates\']);display([\'radio1\'], [\'display\']); inputbox([\'radio1\'], [\'inputbox\']); \" ID=\"radio1\" NAME=\"radio1\" VALUE=\"".$newvar."_aluminum_red\"".(($t =~ m/_aluminum_red/) ? 'CHECKED' : '')."><a href=\"\#\">Red</a>
    1.53 -		<input TYPE=\"radio\" onclick=\"template([\'radio1\'], [\'templates\']);display([\'radio1\'], [\'display\']); inputbox([\'radio1\'], [\'inputbox\']); \" ID=\"radio1\" NAME=\"radio1\" VALUE=\"".$newvar."_aluminum_blue\"".(($t =~ m/_aluminum_blue/) ? 'CHECKED' : '')."><a href=\"\#\">Blue</a>
    1.54 -		<input TYPE=\"radio\" onclick=\"template([\'radio1\'], [\'templates\']);display([\'radio1\'], [\'display\']); inputbox([\'radio1\'], [\'inputbox\']); \" ID=\"radio1\" NAME=\"radio1\" VALUE=\"".$newvar."_aluminum_green\"".(($t =~ m/_aluminum_green/) ? 'CHECKED' : '')."><a href=\"\#\">Green</a>
    1.55 -		<input TYPE=\"radio\" onclick=\"template([\'radio1\'], [\'templates\']);display([\'radio1\'], [\'display\']); inputbox([\'radio1\'], [\'inputbox\']); \" ID=\"radio1\" NAME=\"radio1\" VALUE=\"".$newvar."_aluminum_black\"".(($t =~ m/_aluminum_black/) ? 'CHECKED' : '')."><a href=\"\#\">Black</a>
    1.56 -		</div>
    1.57 -		
    1.58 -	
    1.59 -		</form>
    1.60 -	";
    1.61  	
    1.62  	return $y;
    1.63  		
    1.64 @@ -83,11 +87,11 @@
    1.65  $materialcolor = $1;
    1.66  
    1.67  	
    1.68 -$r = "	
    1.69 -   <input TYPE=\"image\" src = \"./templates/thumbnails/classic_$materialcolor.jpg\" 	onclick=\"display([\'template1\'], [\'display\']); inputbox([\'template1\'], [\'inputbox\']);material([\'template1\'], [\'materials\']);\" ID=\"template1\" NAME=\"template1\" VALUE=\"classic_$materialcolor\">
    1.70 -   <input TYPE=\"image\" src = \"./templates/thumbnails/big_$materialcolor.jpg\" 		onclick=\"display([\'template2\'], [\'display\']); inputbox([\'template2\'], [\'inputbox\']);material([\'template2\'], [\'materials\']);\" ID=\"template2\" NAME=\"template2\" VALUE=\"big_$materialcolor\">
    1.71 -   <input TYPE=\"image\" src = \"./templates/thumbnails/basic_$materialcolor.jpg\" 	onclick=\"display([\'template3\'], [\'display\']); inputbox([\'template3\'], [\'inputbox\']);material([\'template3\'], [\'materials\']);\" ID=\"template3\" NAME=\"template3\" VALUE=\"basic_$materialcolor\"> 
    1.72 -   <input TYPE=\"image\" src = \"./templates/thumbnails/lines_$materialcolor.jpg\" 	onclick=\"display([\'template4\'], [\'display\']); inputbox([\'template4\'], [\'inputbox\']);material([\'template4\'], [\'materials\']);\" ID=\"template4\" NAME=\"template4\" VALUE=\"lines_$materialcolor\"> 
    1.73 +$r = "Templates:<br>
    1.74 +   <input TYPE=\"image\" src = \"./templates/thumbnails/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\"    >
    1.75 +   <input TYPE=\"image\" src = \"./templates/thumbnails/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\"        >
    1.76 +   <input TYPE=\"image\" src = \"./templates/thumbnails/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\"          > 
    1.77 +   <input TYPE=\"image\" src = \"./templates/thumbnails/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.78   
    1.79  
    1.80  ";
    1.81 @@ -111,15 +115,22 @@
    1.82  
    1.83  
    1.84  #take care of everythign but acrylic clear type
    1.85 -if (not($type =~ m/acrylic_clear/))
    1.86 -{
    1.87 -return "comming soon!";
    1.88 -}
    1.89 +
    1.90 +
    1.91 +
    1.92 +  {
    1.93 +    local( $/, *FH ) ;
    1.94 +    open( FH, "<./paypal/$type.paylist" ) or die "sudden flaming death\n";
    1.95 +    $z = <FH>;
    1.96 +  }
    1.97  
    1.98  
    1.99  #every type has it's own associated paylist file the contains the things we need
   1.100 -open FILE, "<./paypal/$type.paylist";
   1.101 -return do { local $/; <FILE> };
   1.102 +
   1.103 +$z = '<div id = "whatever" onmouseover='."\"pokedex([\'args__$type\'],[\'pokedex\']);\"".$z.'oh yeah'.'</div>';
   1.104 +return $z;
   1.105 +
   1.106 +
   1.107  
   1.108  
   1.109  
   1.110 @@ -138,8 +149,8 @@
   1.111  	
   1.112  	
   1.113  	
   1.114 -	$t ="$all
   1.115 -	<input TYPE=\"image\" src = \"./templates/display/$all.jpg\" onclick=\"template([\'radio1\'], [\'templates\']);display([\'radio1\'], [\'display\']); \" ID=\"temp1\" NAME=\"temp1\" VALUE=\"\">
   1.116 +	$t ="
   1.117 +	<input TYPE=\"image\" src = \"./templates/display/$all.jpg\" >
   1.118  	";
   1.119  	return $t;
   1.120  	
   1.121 @@ -162,11 +173,31 @@
   1.122      $b = <FH>;
   1.123     }
   1.124  
   1.125 -$a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to <?php include("top_menu.html"); ?>, but in perl with more memory problems :)
   1.126 +
   1.127 +
   1.128 +$a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to <?php include("top_menu.html"); ?>, but in perl and with more memory problems :)
   1.129 +$b = &material("void_acrylic_clear",1);
   1.130 +$a =~ s/PERL-REPLACE::MATERIALS/$b/; #let's do it again!!! :)
   1.131 +$b = &template("classic_acrylic_clear");
   1.132 +
   1.133 +#$a =~ s/PERL-REPLACE::TEMPLATES//; 
   1.134 +$a =~ s/PERL-REPLACE::TEMPLATES/$b/; #comment out one or the other!
   1.135 +
   1.136 +
   1.137  
   1.138  return $a
   1.139  
   1.140  
   1.141 -};
   1.142 +}
   1.143  
   1.144  
   1.145 +
   1.146 +sub pokedex
   1.147 +{
   1.148 +
   1.149 +my $key = shift;
   1.150 +
   1.151 +return $key;
   1.152 +
   1.153 +
   1.154 +}