Mercurial > laserkard
comparison 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 |
comparison
equal
deleted
inserted
replaced
1:388bd7feec61 | 2:e2e7c63a0a08 |
---|---|
13 | 13 |
14 | 14 |
15 my %hash = ( | 15 my %hash = ( |
16 | 16 |
17 'material' => \&material, | 17 'material' => \&material, |
18 'pokedex' => \&pokedex, | |
18 'template' => \&template, | 19 'template' => \&template, |
19 'inputbox' => \&inputbox, | 20 'inputbox' => \&inputbox, |
20 'display' => \&display, | 21 'display' => \&display, |
21 'change_rules' => \&change_rules); | 22 'change_rules' => \&change_rules); |
22 | 23 |
42 $newvar = $1; | 43 $newvar = $1; |
43 | 44 |
44 #return (($t =~ m/_acrylic_green/) ? 'CHECKED' : 'notchecked'); | 45 #return (($t =~ m/_acrylic_green/) ? 'CHECKED' : 'notchecked'); |
45 | 46 |
46 #$y = "$t<br>".(($t =~ m/_acrylic_green/) ? 'CHECKED' : 'notchecked')." | 47 #$y = "$t<br>".(($t =~ m/_acrylic_green/) ? 'CHECKED' : 'notchecked')." |
47 $y = ""." | 48 |
48 <form id=\"radiobuttons\"> | 49 { |
49 <h3>PICK your Materials?: </h3> | 50 local( $/, *FH ) ; |
51 open( FH, "<./buy_pieces/materials2.html" ) or die "sudden flaming death\n"; | |
52 $y = <FH>; | |
53 } | |
54 | |
55 @symbols = qw(PERL::ACRYLIC_CLEAR PERL::ACRYLIC_BLUE PERL::ACRYLIC_GREEN PERL::ALUMINUM_RED PERL::ALUMINUM_BLUE PERL::ALUMINUM_GREEN PERL::ALUMINUM_BLACK); | |
56 | |
57 for (@symbols) | |
58 { | |
59 $c = $_; | |
60 $c =~ s/PERL:://; | |
61 $c =~ tr/[A-Z]/[a-z]/; | |
62 $c =~ s/^/_/; | |
63 | |
64 $b = '"'.$newvar.$c.'"'.(($t =~ m/$c/) ? ' CHECKED ' : ''); | |
65 $y =~ s/$_/$b/; | |
66 } | |
67 | |
68 | |
69 $first = shift; | |
70 if ($first){ $y =~ s/display[^;]*;//g; } | |
71 | |
50 | 72 |
51 <div class = \"Acrylic\"> | |
52 Acrylic: | |
53 <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> | |
54 <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> | |
55 <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> | |
56 </div> | |
57 | |
58 <div class = \"Aluminum\"> | |
59 Aluminum: | |
60 <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> | |
61 <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> | |
62 <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> | |
63 <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> | |
64 </div> | |
65 | |
66 | |
67 </form> | |
68 "; | |
69 | 73 |
70 return $y; | 74 return $y; |
71 | 75 |
72 | 76 |
73 } | 77 } |
81 $all =~ m/_(.*)/; | 85 $all =~ m/_(.*)/; |
82 | 86 |
83 $materialcolor = $1; | 87 $materialcolor = $1; |
84 | 88 |
85 | 89 |
86 $r = " | 90 $r = "Templates:<br> |
87 <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\"> | 91 <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\" > |
88 <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\"> | 92 <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\" > |
89 <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\"> | 93 <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\" > |
90 <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\"> | 94 <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\" > |
91 | 95 |
92 | 96 |
93 "; | 97 "; |
94 | 98 |
95 return $r; | 99 return $r; |
109 #Then, update with a special custon paypal form, taken from the paypal folder and specially designed for that particular template. | 113 #Then, update with a special custon paypal form, taken from the paypal folder and specially designed for that particular template. |
110 #will probaly eventually create a script to automate the generation of these files. | 114 #will probaly eventually create a script to automate the generation of these files. |
111 | 115 |
112 | 116 |
113 #take care of everythign but acrylic clear type | 117 #take care of everythign but acrylic clear type |
114 if (not($type =~ m/acrylic_clear/)) | 118 |
115 { | 119 |
116 return "comming soon!"; | 120 |
117 } | 121 { |
122 local( $/, *FH ) ; | |
123 open( FH, "<./paypal/$type.paylist" ) or die "sudden flaming death\n"; | |
124 $z = <FH>; | |
125 } | |
118 | 126 |
119 | 127 |
120 #every type has it's own associated paylist file the contains the things we need | 128 #every type has it's own associated paylist file the contains the things we need |
121 open FILE, "<./paypal/$type.paylist"; | 129 |
122 return do { local $/; <FILE> }; | 130 $z = '<div id = "whatever" onmouseover='."\"pokedex([\'args__$type\'],[\'pokedex\']);\"".$z.'oh yeah'.'</div>'; |
131 return $z; | |
132 | |
133 | |
123 | 134 |
124 | 135 |
125 | 136 |
126 } | 137 } |
127 | 138 |
136 { | 147 { |
137 $all = shift; | 148 $all = shift; |
138 | 149 |
139 | 150 |
140 | 151 |
141 $t ="$all | 152 $t =" |
142 <input TYPE=\"image\" src = \"./templates/display/$all.jpg\" onclick=\"template([\'radio1\'], [\'templates\']);display([\'radio1\'], [\'display\']); \" ID=\"temp1\" NAME=\"temp1\" VALUE=\"\"> | 153 <input TYPE=\"image\" src = \"./templates/display/$all.jpg\" > |
143 "; | 154 "; |
144 return $t; | 155 return $t; |
145 | 156 |
146 } | 157 } |
147 | 158 |
160 local( $/, *FH ) ; | 171 local( $/, *FH ) ; |
161 open( FH, "<./top_menu.include" ) or die "sudden flaming death\n"; | 172 open( FH, "<./top_menu.include" ) or die "sudden flaming death\n"; |
162 $b = <FH>; | 173 $b = <FH>; |
163 } | 174 } |
164 | 175 |
165 $a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to <?php include("top_menu.html"); ?>, but in perl with more memory problems :) | 176 |
177 | |
178 $a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to <?php include("top_menu.html"); ?>, but in perl and with more memory problems :) | |
179 $b = &material("void_acrylic_clear",1); | |
180 $a =~ s/PERL-REPLACE::MATERIALS/$b/; #let's do it again!!! :) | |
181 $b = &template("classic_acrylic_clear"); | |
182 | |
183 #$a =~ s/PERL-REPLACE::TEMPLATES//; | |
184 $a =~ s/PERL-REPLACE::TEMPLATES/$b/; #comment out one or the other! | |
185 | |
186 | |
166 | 187 |
167 return $a | 188 return $a |
168 | 189 |
169 | 190 |
170 }; | 191 } |
171 | 192 |
172 | 193 |
194 | |
195 sub pokedex | |
196 { | |
197 | |
198 my $key = shift; | |
199 | |
200 return $key; | |
201 | |
202 | |
203 } |