changeset 51:95fa4bcc5d67 laserkard

[svn r52] implemented SVG backend
author rlm
date Wed, 03 Feb 2010 03:14:09 -0500
parents 1b5417799713
children 375225442677
files Laserkard.pm awesome_js/echo.js awesome_js/robert.js buy.html buy.pl cardOrders/RobertMcIntyre.txt echo.css echo.html echo.js echo.pl images/LaserKard Home Image - blue.eps images/LaserKard Home Image - cyan.eps images/LaserKard Home Image - green.eps images/LaserKard Home Image - orange.eps images/LaserKard Home Image - purple.eps images/bl_sm.jpg images/cy_sm.jpg images/gr_sm.jpg images/olbl_sm.jpg images/olgr_sm.jpg images/olor_sm.jpg images/or_sm.jpg images/pr_sm.jpg index.php log/error_log.log paypal/basic_acrylic_clear.paylist paypal/big_acrylic_clear.paylist paypal/classic_acrylic_clear.paylist paypal/lines_acrylic_clear.paylist paypal/make.pl testjson.txt top_menu.include
diffstat 32 files changed, 1196 insertions(+), 687 deletions(-) [+]
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Laserkard.pm	Wed Feb 03 03:14:09 2010 -0500
     1.3 @@ -0,0 +1,480 @@
     1.4 +package Laserkard;
     1.5 +
     1.6 +use List::Util qw(first max maxstr min minstr reduce shuffle sum);
     1.7 +use Storable;
     1.8 +use CGI::Ajax;
     1.9 +use CGI;
    1.10 +use JSON;
    1.11 +use Laserkard;
    1.12 +use base 'Exporter';
    1.13 +
    1.14 +our @EXPORT = 
    1.15 +qw(
    1.16 +material
    1.17 +template 
    1.18 +inputbox
    1.19 +display
    1.20 +change_rules
    1.21 +vanish
    1.22 +updateForm
    1.23 +cardType
    1.24 +);
    1.25 +
    1.26 +
    1.27 +
    1.28 +
    1.29 +
    1.30 +sub cardType
    1.31 +{
    1.32 +
    1.33 +return $_[0];
    1.34 +	
    1.35 +}
    1.36 +
    1.37 + 
    1.38 +
    1.39 +sub updateForm
    1.40 +
    1.41 +{
    1.42 +	
    1.43 +	
    1.44 +	$key = shift;
    1.45 +	$value = shift;
    1.46 +	$hashString = shift;
    1.47 +	
    1.48 +	$perl_hash  = decode_json $hashString;
    1.49 +
    1.50 +	%fieldHash = %$perl_hash;
    1.51 +
    1.52 +
    1.53 +	$fieldHash{$key} = $value;
    1.54 +	$ref = \%fieldHash;
    1.55 +	
    1.56 +	$utf8_encoded_json_text = encode_json  $ref ;
    1.57 +	return $utf8_encoded_json_text;
    1.58 +
    1.59 +}
    1.60 +
    1.61 +
    1.62 +
    1.63 +
    1.64 +sub material{
    1.65 +	
    1.66 +	$newvar = shift;
    1.67 +	
    1.68 +	my $t = $newvar;
    1.69 +	
    1.70 +	$newvar =~ m/([^_]*)_/;
    1.71 +	$newvar = $1;
    1.72 +	
    1.73 +	#return (($t =~ m/_acrylic_green/) ? 'CHECKED' : 'notchecked');
    1.74 +	
    1.75 +	#$y = "$t<br>".(($t =~ m/_acrylic_green/) ? 'CHECKED' : 'notchecked')."
    1.76 +	
    1.77 +	{
    1.78 +    local( $/, *FH ) ;
    1.79 +    open( FH, "<./buy_pieces/materials2.html" ) or die "sudden flaming death\n";
    1.80 +    $y = <FH>;
    1.81 +	}
    1.82 +	
    1.83 +	@symbols = qw(PERL::ACRYLIC_CLEAR PERL::ACRYLIC_BLUE PERL::ACRYLIC_GREEN PERL::ALUMINUM_RED PERL::ALUMINUM_BLUE PERL::ALUMINUM_GREEN PERL::ALUMINUM_BLACK);
    1.84 +	
    1.85 +	for (@symbols)
    1.86 +	{
    1.87 +	$c = $_;
    1.88 +	$c =~ s/PERL:://;
    1.89 +	$c =~ tr/[A-Z]/[a-z]/;
    1.90 +	$c =~ s/^/_/;
    1.91 +	
    1.92 +	$b = '"'.$newvar.$c.'"'.(($t =~ m/$c/) ? '  CHECKED ' : '');
    1.93 +	$y =~ s/$_/$b/; 
    1.94 +	}
    1.95 +	
    1.96 +
    1.97 +	$first = shift;
    1.98 +	if ($first){  $y =~ s/display[^;]*;//g; }
    1.99 +	
   1.100 +		
   1.101 +	
   1.102 +	return $y;
   1.103 +		
   1.104 +	
   1.105 +}
   1.106 +
   1.107 +
   1.108 +
   1.109 +sub template
   1.110 +{
   1.111 +	
   1.112 +$all = shift;
   1.113 +$all =~ m/([^_]*)_(.*)/;
   1.114 +
   1.115 +$materialcolor = $2;
   1.116 +$style = $1;
   1.117 +#here is where we handle important drawing commands relating to the cards.
   1.118 +
   1.119 +
   1.120 +	
   1.121 +$r =  <<HERE;
   1.122 +<div id = "i_templates"><div class = 'ttyl'> <titletron>Select Style.</titletron></div>
   1.123 +<div id = 'stupid'>
   1.124 +
   1.125 +
   1.126 +<input TYPE="image" src = "./images/templates/big_$materialcolor.jpg" 	
   1.127 +onmouseover="pokedex('big_$materialcolor');"
   1.128 +onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
   1.129 +
   1.130 +
   1.131 + 	
   1.132 +onclick=
   1.133 +"display(['template2'], ['display']); 
   1.134 +inputbox(['template2', 'formValues'], ['inputbox']);
   1.135 +material(['template2'], ['materials']);
   1.136 +cardType(['template2'], ['currentSpec']);
   1.137 +redraw('bold');" 
   1.138 +ID="template2" NAME="template2" VALUE="big_$materialcolor">
   1.139 +<br>
   1.140 +
   1.141 +  
   1.142 +
   1.143 +<input TYPE="image" src = "./images/templates/basic_$materialcolor.jpg"
   1.144 +onmouseover="pokedex('basic_$materialcolor');" 
   1.145 +onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
   1.146 +onclick=
   1.147 +"display(['template3'], ['display']); 
   1.148 +inputbox(['template3', 'formValues'], ['inputbox']);
   1.149 +material(['template3'], ['materials']);
   1.150 +cardType(['template3'], ['currentSpec']);
   1.151 +redraw('arrow');" 
   1.152 +ID="template3" NAME="template3" VALUE="basic_$materialcolor"          ><br>
   1.153 +
   1.154 + 
   1.155 +
   1.156 +<input TYPE="image" src = "./images/templates/classic_$materialcolor.jpg"  
   1.157 +onmouseover="pokedex('classic_$materialcolor');" 
   1.158 +onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
   1.159 +onclick=
   1.160 +"display(['template1'], ['display']); 
   1.161 +inputbox(['template1', 'formValues'], ['inputbox']);
   1.162 +material(['template1'], ['materials']);
   1.163 +cardType(['template1'], ['currentSpec']);
   1.164 +redraw('classic');" 
   1.165 +ID="template1" NAME="template1" VALUE="classic_$materialcolor"    ><br>
   1.166 +
   1.167 + 
   1.168 +
   1.169 +<input TYPE="image" src = "./images/templates/lines_$materialcolor.jpg" 
   1.170 +onmouseover="pokedex('lines_$materialcolor');" 	
   1.171 +onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
   1.172 +onclick=
   1.173 +"display(['template4'], ['display']); 
   1.174 +inputbox(['template4', 'formValues'], ['inputbox']);
   1.175 +material(['template4'], ['materials']);
   1.176 +cardType(['template4'], ['currentSpec']);
   1.177 +redraw('direct');" 
   1.178 +ID="template4" NAME="template4" VALUE="lines_$materialcolor"           > 
   1.179 +
   1.180 +	</div>
   1.181 +	</div>
   1.182 +
   1.183 +HERE
   1.184 +
   1.185 +
   1.186 +%shankHash = 
   1.187 +(
   1.188 +
   1.189 +big => template2,  
   1.190 +basic => template3,
   1.191 +classic => template1,
   1.192 +lines  => template4
   1.193 +);
   1.194 +
   1.195 +$target = $shankHash{$style};
   1.196 +
   1.197 +
   1.198 +
   1.199 +
   1.200 +#$r =~ s/inputbox\(\['$target'\], \['inputbox'\]\)\;//;
   1.201 +
   1.202 +
   1.203 +
   1.204 +
   1.205 +
   1.206 +return $r;
   1.207 +}
   1.208 +
   1.209 +
   1.210 +
   1.211 +
   1.212 +sub inputbox
   1.213 +{
   1.214 +
   1.215 +#grab the type of template we'll be using <<<<
   1.216 +	$type = shift;
   1.217 +	
   1.218 +	$hashString = shift;
   1.219 +	#return $hashString;
   1.220 +	
   1.221 +	$perl_hash  = decode_json $hashString;
   1.222 +
   1.223 +	%fieldHash = %$perl_hash;
   1.224 + 
   1.225 +
   1.226 +# we have to care about both the type of template and the material and the color. these are stored in $type>>>>
   1.227 +
   1.228 +#Then, update with a special custon paypal form, taken from the paypal folder and specially designed for that particular template.
   1.229 +#will probaly eventually create a script to automate the generation of these files.
   1.230 +
   1.231 +
   1.232 +#take care of everythign but acrylic clear type
   1.233 +
   1.234 +  {
   1.235 +    local( $/, *FH ) ;
   1.236 +    open( FH, "<./paypal/$type.paylist" ) or die "sudden flaming death\n";
   1.237 +    $z = <FH>;
   1.238 +  }
   1.239 +
   1.240 +
   1.241 +#every type has it's own associated paylist file the contains the things we need
   1.242 +
   1.243 +$z = <<HERE . $z;
   1.244 +<div id = "whatever" onmouseover = "pokedex(document.getElementById('currentSpec').innerHTML);">
   1.245 +HERE
   1.246 +
   1.247 +
   1.248 +
   1.249 +
   1.250 +$z = $z.'</div>';
   1.251 +
   1.252 +
   1.253 +foreach my $key ( keys %fieldHash )
   1.254 +{
   1.255 +
   1.256 +my $replace  = $fieldHash{$key};
   1.257 +
   1.258 +#id="Name" value = "PERL::NAME" 
   1.259 +
   1.260 +
   1.261 +$z =~ s/id="$key"/id="$key" value = "$replace"/g;
   1.262 +
   1.263 +
   1.264 +}
   1.265 +
   1.266 +
   1.267 +return $z;
   1.268 +
   1.269 +
   1.270 +
   1.271 +
   1.272 +
   1.273 +}
   1.274 +
   1.275 +
   1.276 +
   1.277 +
   1.278 +sub display
   1.279 +{
   1.280 +	$all = shift;
   1.281 +	
   1.282 +	
   1.283 +	#~ 
   1.284 +	#~ $t = <<HERE;
   1.285 +	#~ <image src = "./images/display/PERL::PIC.jpg" 	onmouseover="pokedex(['args__PERL::PIC'],['pokedex']);">
   1.286 +	#~ 
   1.287 +	#~ <div id = overlay>
   1.288 +#~ 
   1.289 +#~ 
   1.290 +	#~ </div>
   1.291 +	#~ 
   1.292 +#~ HERE
   1.293 +#~ 
   1.294 +#~ 
   1.295 +#~ 
   1.296 +#~ $t =~ s/PERL::PIC/$all/g;
   1.297 +
   1.298 +	$t = <<HERE;
   1.299 +	<image src = "./images/display/blank.jpg" 	
   1.300 +	onmouseover = "pokedex(document.getElementById('currentSpec').innerHTML);"
   1.301 +	>
   1.302 +	
   1.303 +	<div id = overlay>
   1.304 +
   1.305 +
   1.306 +	</div>
   1.307 +	
   1.308 +HERE
   1.309 +	
   1.310 +	return $t;
   1.311 +	
   1.312 +}
   1.313 +
   1.314 +
   1.315 +sub genBuy
   1.316 +
   1.317 +{
   1.318 +return gen("buy.html");	
   1.319 +	
   1.320 +}
   1.321 +
   1.322 +
   1.323 +sub genEcho
   1.324 +{
   1.325 +	
   1.326 +return gen("echo.html");
   1.327 +	
   1.328 +}
   1.329 +
   1.330 +
   1.331 +sub gen
   1.332 +{
   1.333 +	
   1.334 +	my $target = shift;
   1.335 +	
   1.336 +  {
   1.337 +    local( $/, *FH ) ;
   1.338 +    open( FH, "<./$target" ) or die "sudden flaming death\n";
   1.339 +    $a = <FH>;
   1.340 +   }
   1.341 +
   1.342 +  {
   1.343 +    local( $/, *FH ) ;
   1.344 +    open( FH, "<./top_menu.include" ) or die "sudden flaming death\n";
   1.345 +    $b = <FH>;
   1.346 +   }
   1.347 +
   1.348 +  {
   1.349 +    local( $/, *FH ) ;
   1.350 +    open( FH, "<./cardDefinitions.JSON" ) or die "sudden flaming death\n";
   1.351 +    $c = <FH>;
   1.352 +   }
   1.353 +
   1.354 +$a =~s/PERL::DEFS/$c/;
   1.355 +
   1.356 +
   1.357 +
   1.358 +$a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to <?php include("top_menu.html"); ?>, but in perl and with more memory problems :)
   1.359 +$b = &material("void_acrylic_clear",1);
   1.360 +$a =~ s/PERL-REPLACE::MATERIALS/$b/; #let's do it again!!! :)
   1.361 +
   1.362 +
   1.363 +
   1.364 +$b = "big_acrylic_clear";
   1.365 +$a =~ s/PERL::INITIALCARD/$b/;
   1.366 +$b = &template("big_acrylic_clear");
   1.367 +$a =~ s/PERL-REPLACE::TEMPLATES/$b/; 
   1.368 +
   1.369 +$b = &display("big_acrylic_clear");
   1.370 +$a =~ s/PERL-REPLACE::DISPLAY/$b/;
   1.371 +
   1.372 +$initials = <<HERE ;
   1.373 +{
   1.374 +"Name":"James Bond",
   1.375 +"Email":"jbond\@mi6.co.uk",
   1.376 +"Phone": "123.456.7890", 
   1.377 +"Company": "MI6",
   1.378 +"Website" : "http://jamesbond.com",
   1.379 +"Occupation" : "Secret Agent"
   1.380 +}
   1.381 +
   1.382 +HERE
   1.383 +
   1.384 +
   1.385 +
   1.386 +$b = &inputbox("big_acrylic_clear", $initials);
   1.387 +$a =~ s/PERL-REPLACE::INPUTBOX/$b/;
   1.388 +
   1.389 +$b = &pokedex('big');
   1.390 +$a =~ s/PERL-REPLACE::POKEDEX/$b/;
   1.391 +
   1.392 +
   1.393 +
   1.394 +#$b = &updateForm('fuck','12', '{}');
   1.395 +$a =~ s/PERL::INITIALVALUES/$initials/;
   1.396 +
   1.397 +
   1.398 +
   1.399 +return $a
   1.400 +
   1.401 +
   1.402 +}
   1.403 +
   1.404 +
   1.405 +
   1.406 +sub pokedex
   1.407 +{
   1.408 +
   1.409 +
   1.410 +$classic = <<HERE;
   1.411 +<h1>The Classic LaserKard.</h1>
   1.412 +Balanced and Complete.  The original LaserKard.  For those that wish to leave no stone unturned.  It's all there.
   1.413 +HERE
   1.414 +
   1.415 +$bold = <<HERE;
   1.416 +<h1>The Bold Kard.</h1>
   1.417 +Austere and Iconic.  For those that wish to leave an impression with the power of their name accompanied only by their main method of contact.  Bold, period.
   1.418 +HERE
   1.419 +
   1.420 +$arrow = <<HERE;
   1.421 +<h1>The Arrow Kard.</h1>
   1.422 +Precise and Straightforward.  For those that seek to make a statement while being clear and concise. Straight as an arrow.
   1.423 +HERE
   1.424 +
   1.425 +$direct = <<HERE;
   1.426 +<h1>The Direct Kard.</h1>
   1.427 +Thorough and Distinct.  For those that aim to demonstrate their professionalism with style.  Push the envelope.  Be Direct.
   1.428 +HERE
   1.429 +
   1.430 +
   1.431 +
   1.432 +my %megahash = 
   1.433 +(
   1.434 +
   1.435 +'big' => $bold,
   1.436 +
   1.437 +'basic' => $arrow,
   1.438 +
   1.439 +'lines' => $direct,
   1.440 +
   1.441 +'classic' => $classic,
   1.442 +
   1.443 +'big_acrylic_clear' => $bold,
   1.444 +
   1.445 +'classic_acrylic_clear' => $classic,
   1.446 +
   1.447 +'basic_acrylic_clear'  => $arrow,
   1.448 +
   1.449 +'lines_acrylic_clear' => $direct
   1.450 +);
   1.451 +
   1.452 +
   1.453 +
   1.454 +my $key = shift;
   1.455 +
   1.456 +
   1.457 +if (!$megahash{$key}){return $key;}
   1.458 +
   1.459 +return $megahash{$key};
   1.460 +
   1.461 +
   1.462 +
   1.463 +
   1.464 +}
   1.465 +
   1.466 +
   1.467 +
   1.468 +
   1.469 +
   1.470 +
   1.471 +
   1.472 +
   1.473 +# this here function makes the paypal button go away so people know it's working!
   1.474 +sub vanish
   1.475 +{
   1.476 +return "";
   1.477 +
   1.478 +
   1.479 +}
   1.480 +
   1.481 +1;
   1.482 +
   1.483 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/awesome_js/echo.js	Wed Feb 03 03:14:09 2010 -0500
     2.3 @@ -0,0 +1,57 @@
     2.4 +function js_process_func(input)
     2.5 +
     2.6 +{
     2.7 +	
     2.8 +	document.getElementById('perlClick').innerHTML = input;
     2.9 +	
    2.10 +}
    2.11 +
    2.12 +
    2.13 +
    2.14 +function parseFile()
    2.15 +{
    2.16 +	document.getElementById('output').innerHTML  = "function called";
    2.17 +	 
    2.18 +	var JSONtext = document.getElementById('textEntry').value;
    2.19 +	 
    2.20 +	 var hash = new Object();
    2.21 +	 hash = eval('(' + JSONtext + ')');
    2.22 +	 document.getElementById('output').innerHTML = "";
    2.23 +	 document.getElementById('perlClick').innerHTML = "";
    2.24 +	 
    2.25 +	 
    2.26 +	 for (card in hash)
    2.27 +	 {
    2.28 +	 document.getElementById('output').innerHTML = card;
    2.29 +	 clearAll();
    2.30 +	 lineDraw(eval("hash." + card + ".style"), "ff0000");
    2.31 +
    2.32 +	for (prop in eval( "hash." + card + ".fields"))
    2.33 +	 {
    2.34 +
    2.35 +
    2.36 +
    2.37 +			contentRedraw(eval("hash." + card + ".style"), prop, eval( "hash." + card + ".fields." + prop));
    2.38 +			
    2.39 +document.getElementById('output').innerHTML +=   "<br>" + eval( "hash." + card + ".fields." + prop);
    2.40 +
    2.41 + }
    2.42 + 
    2.43 +	for (var ii = 1; ii <= eval("hash." + card + ".number"); ii++)
    2.44 +	{
    2.45 +	
    2.46 +	document.getElementById('perlClick').innerHTML += document.getElementById('disp_contain').innerHTML + "S3ntinEL";
    2.47 +	 //echo(['disp_contain', 'perlClick', num], [js_process_func], 'POST');
    2.48 +	}
    2.49 +	}
    2.50 +	 
    2.51 +	 
    2.52 +	var emmm = document.getElementById('sendOff').value;
    2.53 +	
    2.54 +	
    2.55 +	
    2.56 +	echo(['perlClick', "args__" + emmm], ['output'], 'POST');
    2.57 +	
    2.58 +	
    2.59 +	
    2.60 +}
     3.1 --- a/awesome_js/robert.js	Mon Feb 01 02:54:59 2010 -0500
     3.2 +++ b/awesome_js/robert.js	Wed Feb 03 03:14:09 2010 -0500
     3.3 @@ -17,7 +17,7 @@
     3.4  descHash.lines_acrylic_clear = 
     3.5  "<h1>The Direct Kard.</h1>Thorough and Distinct.  For those that aim to demonstrate their professionalism with style.  Push the envelope.  Be Direct.";
     3.6  
     3.7 -
     3.8 +color = 'fefefe';
     3.9  
    3.10  
    3.11  
    3.12 @@ -74,14 +74,16 @@
    3.13  
    3.14  }
    3.15  
    3.16 -
    3.17 +//~ function smallRedraw(style,field)
    3.18 +//~ {
    3.19 +//~ //smallRedraw(style,field,"fefefe");
    3.20 +//~ sRedraw(style,field,'fefefe');
    3.21 +//~ }
    3.22  
    3.23  
    3.24  function smallRedraw(style,field)
    3.25  {
    3.26 -
    3.27 -
    3.28 -
    3.29 +	
    3.30  var JSONtext = document.getElementById('formValues').innerHTML;
    3.31  var hash = new Object();
    3.32  hash = eval('(' + JSONtext + ')');
    3.33 @@ -90,7 +92,22 @@
    3.34  
    3.35   content = unescape(content);
    3.36  
    3.37 -if (prevVal == content){return;}
    3.38 +//if (prevVal == content){return;}
    3.39 +
    3.40 +contentRedraw(style,field, content);
    3.41 +
    3.42 +	
    3.43 +}
    3.44 +
    3.45 +
    3.46 +
    3.47 +function contentRedraw(style,field, content)
    3.48 +{
    3.49 +
    3.50 +//var color = color;
    3.51 +
    3.52 +
    3.53 +
    3.54  
    3.55  posx = 10;
    3.56  posy = 10;
    3.57 @@ -158,7 +175,7 @@
    3.58  
    3.59  document.getElementById('output').innerHTML = sizzle;
    3.60  
    3.61 -eval ( target +".attr('stroke', '#fefefe');");
    3.62 +eval ( target +".attr('stroke', '#" + color + "');");
    3.63  //eval ( target +".attr('stroke', '#fbafcd');");
    3.64  
    3.65  eval ( target +".attr('fill', 'none');");
    3.66 @@ -200,6 +217,42 @@
    3.67  if(typeof d_lineArt != 'undefined' ){d_lineArt.remove();}	
    3.68  }
    3.69  
    3.70 +
    3.71 +function lineDraw(style, color)
    3.72 +{
    3.73 +
    3.74 +
    3.75 +
    3.76 +
    3.77 +
    3.78 +if (style == "bold")
    3.79 +{return;}
    3.80 +
    3.81 +
    3.82 +
    3.83 +if (style == "arrow")
    3.84 +{
    3.85 +d_lineArt = raphe.path("M 4 272 L 258 272");
    3.86 +d_lineArt.attr('stroke', "#" + color);
    3.87 +return;
    3.88 +}
    3.89 +
    3.90 +
    3.91 +if (style == "classic")
    3.92 +{return;}
    3.93 +
    3.94 +
    3.95 +if (style == "direct")
    3.96 +{
    3.97 +d_lineArt = raphe.path("M 350 165 L 512 165  M 350 173 L 512 173  M 350 181 L 512 181  M 350 189 L 512 189 M 350 197 L 512 197 M 350 213 L 512 213 M 350 205 L 512 205 M 350 221 L 512 221");
    3.98 +d_lineArt.attr('stroke', "#" + color);
    3.99 +return;
   3.100 +}
   3.101 +
   3.102 +}
   3.103 +
   3.104 +
   3.105 +
   3.106  function redraw(style)
   3.107  {
   3.108  
   3.109 @@ -229,9 +282,6 @@
   3.110  smallRedraw("arrow","Company");
   3.111  
   3.112  
   3.113 -d_lineArt = raphe.path("M 4 272 L 258 272");
   3.114 -d_lineArt.attr('stroke', '#fefefe');
   3.115 -
   3.116  }
   3.117  
   3.118  
   3.119 @@ -261,14 +311,10 @@
   3.120  smallRedraw("direct","Phone");
   3.121  smallRedraw("direct","Website");
   3.122  
   3.123 -d_lineArt = raphe.path("M 350 165 L 512 165  M 350 173 L 512 173  M 350 181 L 512 181  M 350 189 L 512 189 M 350 197 L 512 197 M 350 213 L 512 213 M 350 205 L 512 205 M 350 221 L 512 221");
   3.124 -d_lineArt.attr('stroke', '#fefefe');
   3.125 -
   3.126 -
   3.127  
   3.128  }
   3.129  
   3.130 -
   3.131 +lineDraw(style, "fefefe");
   3.132  
   3.133  
   3.134  
     4.1 --- a/buy.html	Mon Feb 01 02:54:59 2010 -0500
     4.2 +++ b/buy.html	Wed Feb 03 03:14:09 2010 -0500
     4.3 @@ -25,82 +25,32 @@
     4.4  
     4.5  
     4.6  
     4.7 +PERL-REPLACE::TOP_MENU
     4.8 +<div id="whole">
     4.9 +	<div id="templates" >PERL-REPLACE::TEMPLATES</div>
    4.10 +	<div id = "centerbox" >
    4.11 +		
    4.12 +		<div id= "trifold" >
    4.13 +			<div id = "disp_contain"></div>
    4.14 +			<div id="display">PERL-REPLACE::DISPLAY</div>
    4.15 +		</div>
    4.16 +		
    4.17 +		<div id="pokedex">PERL-REPLACE::POKEDEX</div>
    4.18 +	</div>
    4.19  
    4.20 -
    4.21 -
    4.22 -
    4.23 -
    4.24 -PERL-REPLACE::TOP_MENU
    4.25 -
    4.26 -
    4.27 -<div id="whole">
    4.28 -
    4.29 -<div id="templates" >PERL-REPLACE::TEMPLATES</div>
    4.30 -
    4.31 -
    4.32 -
    4.33 -<div id = "centerbox" >
    4.34 -
    4.35 -
    4.36 -
    4.37 -
    4.38 -
    4.39 -<div id= "trifold" >
    4.40 -
    4.41 -
    4.42 -
    4.43 -<div id = "disp_contain"></div>
    4.44 -	
    4.45 -<div id="display">PERL-REPLACE::DISPLAY</div>
    4.46 -
    4.47 -
    4.48 -
    4.49 -
    4.50 +	<div id="inputbox" >PERL-REPLACE::INPUTBOX</div>
    4.51 +	<div id="materials" onmouseover="pokedex(['args__materials'],['pokedex']);">PERL-REPLACE::MATERIALS</div>
    4.52  </div>
    4.53  
    4.54 -<div id="pokedex">PERL-REPLACE::POKEDEX</div>
    4.55 +<div id = "formValues">PERL::INITIALVALUES</div>
    4.56  
    4.57 +<div id = "currentSpec">PERL::INITIALCARD</div>
    4.58  
    4.59 +<div id = "cardDefs">PERL::DEFS</div>
    4.60  
    4.61 -</div>
    4.62 +<div id = "output">OUTPUT</div>
    4.63  
    4.64  
    4.65 -<div id="inputbox" >PERL-REPLACE::INPUTBOX</div>
    4.66 -
    4.67 -
    4.68 -
    4.69 -
    4.70 -
    4.71 -<div id="materials" onmouseover="pokedex(['args__materials'],['pokedex']);">PERL-REPLACE::MATERIALS</div>
    4.72 -
    4.73 -
    4.74 -</div>
    4.75 -
    4.76 -
    4.77 -
    4.78 -
    4.79 -
    4.80 -
    4.81 -
    4.82 -
    4.83 -<div id = "formValues">
    4.84 -PERL::INITIALVALUES
    4.85 -</div>
    4.86 -
    4.87 -<div id = "currentSpec">
    4.88 -PERL::INITIALCARD
    4.89 -</div>
    4.90 -
    4.91 -
    4.92 -<div id = "cardDefs">
    4.93 -PERL::DEFS
    4.94 -</div>
    4.95 -
    4.96 -
    4.97 -<div id = "output">
    4.98 -OUTPUT
    4.99 -</div>
   4.100 -
   4.101  
   4.102  <div id = "copyright">&copy; 2010 LaserKard, LLC</div>
   4.103  
     5.1 --- a/buy.pl	Mon Feb 01 02:54:59 2010 -0500
     5.2 +++ b/buy.pl	Wed Feb 03 03:14:09 2010 -0500
     5.3 @@ -1,29 +1,24 @@
     5.4  #!/usr/bin/perl
     5.5  
     5.6  
     5.7 -use List::Util qw(first max maxstr min minstr reduce shuffle sum);
     5.8 -use Storable;
     5.9 -use CGI::Ajax;
    5.10 -use CGI;
    5.11 -use JSON;
    5.12  
    5.13 +use Laserkard;
    5.14  
    5.15  
    5.16  my $q = new CGI;
    5.17  
    5.18 +#print Laserkard::gen();
    5.19  
    5.20 -
    5.21 -my %hash = ( 
    5.22 -
    5.23 -'material' => \&material,
    5.24 -
    5.25 -'template'	=> \&template, 
    5.26 -'inputbox'	=> \&inputbox,
    5.27 -'display'	=> \&display,
    5.28 -'change_rules' => \&change_rules,
    5.29 -'vanish'      => \&vanish,
    5.30 -'updateForm'  => \&updateForm,
    5.31 -'cardType'    => \&cardType
    5.32 +my %hash = 
    5.33 +( 
    5.34 +'material' => \&Laserkard::material,
    5.35 +'template'	=> \&Laserkard::template, 
    5.36 +'inputbox'	=> \&Laserkard::inputbox,
    5.37 +'display'	=> \&Laserkard::display,
    5.38 +'change_rules' => \&Laserkard::change_rules,
    5.39 +'vanish'      => \&Laserkard::vanish,
    5.40 +'updateForm'  => \&Laserkard::updateForm,
    5.41 +'cardType'    => \&Laserkard::cardType
    5.42  );
    5.43  
    5.44   
    5.45 @@ -32,441 +27,7 @@
    5.46  
    5.47  
    5.48  # this outputs the html for the page
    5.49 -print $pjx->build_html($q,\&gen,{-Cache_Control => 'no-store, no-cache, must-revalidate', -Pragma => 'no-cache'}); 
    5.50 +print $pjx->build_html($q,\&Laserkard::genBuy,{-Cache_Control => 'no-store, no-cache, must-revalidate', -Pragma => 'no-cache'}); 
    5.51  
    5.52  
    5.53 -
    5.54 -sub cardType
    5.55 -{
    5.56 -
    5.57 -return $_[0];
    5.58 -	
    5.59 -}
    5.60 -
    5.61 - 
    5.62 -
    5.63 -sub updateForm
    5.64 -
    5.65 -{
    5.66 -	
    5.67 -	
    5.68 -	$key = shift;
    5.69 -	$value = shift;
    5.70 -	$hashString = shift;
    5.71 -	
    5.72 -	$perl_hash  = decode_json $hashString;
    5.73 -
    5.74 -	%fieldHash = %$perl_hash;
    5.75 -
    5.76 -
    5.77 -	$fieldHash{$key} = $value;
    5.78 -	$ref = \%fieldHash;
    5.79 -	
    5.80 -	$utf8_encoded_json_text = encode_json  $ref ;
    5.81 -	return $utf8_encoded_json_text;
    5.82 -
    5.83 -}
    5.84 -
    5.85 -
    5.86 -
    5.87 -
    5.88 -sub material{
    5.89 -	
    5.90 -	$newvar = shift;
    5.91 -	
    5.92 -	my $t = $newvar;
    5.93 -	
    5.94 -	$newvar =~ m/([^_]*)_/;
    5.95 -	$newvar = $1;
    5.96 -	
    5.97 -	#return (($t =~ m/_acrylic_green/) ? 'CHECKED' : 'notchecked');
    5.98 -	
    5.99 -	#$y = "$t<br>".(($t =~ m/_acrylic_green/) ? 'CHECKED' : 'notchecked')."
   5.100 -	
   5.101 -	{
   5.102 -    local( $/, *FH ) ;
   5.103 -    open( FH, "<./buy_pieces/materials2.html" ) or die "sudden flaming death\n";
   5.104 -    $y = <FH>;
   5.105 -	}
   5.106 -	
   5.107 -	@symbols = qw(PERL::ACRYLIC_CLEAR PERL::ACRYLIC_BLUE PERL::ACRYLIC_GREEN PERL::ALUMINUM_RED PERL::ALUMINUM_BLUE PERL::ALUMINUM_GREEN PERL::ALUMINUM_BLACK);
   5.108 -	
   5.109 -	for (@symbols)
   5.110 -	{
   5.111 -	$c = $_;
   5.112 -	$c =~ s/PERL:://;
   5.113 -	$c =~ tr/[A-Z]/[a-z]/;
   5.114 -	$c =~ s/^/_/;
   5.115 -	
   5.116 -	$b = '"'.$newvar.$c.'"'.(($t =~ m/$c/) ? '  CHECKED ' : '');
   5.117 -	$y =~ s/$_/$b/; 
   5.118 -	}
   5.119 -	
   5.120 -
   5.121 -	$first = shift;
   5.122 -	if ($first){  $y =~ s/display[^;]*;//g; }
   5.123 -	
   5.124 -		
   5.125 -	
   5.126 -	return $y;
   5.127 -		
   5.128 -	
   5.129 -}
   5.130 -
   5.131 -
   5.132 -
   5.133 -sub template
   5.134 -{
   5.135 -	
   5.136 -$all = shift;
   5.137 -$all =~ m/([^_]*)_(.*)/;
   5.138 -
   5.139 -$materialcolor = $2;
   5.140 -$style = $1;
   5.141 -#here is where we handle important drawing commands relating to the cards.
   5.142 -
   5.143 -
   5.144 -	
   5.145 -$r =  <<HERE;
   5.146 -<div id = "i_templates"><div class = 'ttyl'> <titletron>Select Style.</titletron></div>
   5.147 -<div id = 'stupid'>
   5.148 -
   5.149 -
   5.150 -<input TYPE="image" src = "./images/templates/big_$materialcolor.jpg" 	
   5.151 -onmouseover="pokedex('big_$materialcolor');"
   5.152 -onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
   5.153 -
   5.154 -
   5.155 - 	
   5.156 -onclick=
   5.157 -"display(['template2'], ['display']); 
   5.158 -inputbox(['template2', 'formValues'], ['inputbox']);
   5.159 -material(['template2'], ['materials']);
   5.160 -cardType(['template2'], ['currentSpec']);
   5.161 -redraw('bold');" 
   5.162 -ID="template2" NAME="template2" VALUE="big_$materialcolor">
   5.163 -<br>
   5.164 -
   5.165 -  
   5.166 -
   5.167 -<input TYPE="image" src = "./images/templates/basic_$materialcolor.jpg"
   5.168 -onmouseover="pokedex('basic_$materialcolor');" 
   5.169 -onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
   5.170 -onclick=
   5.171 -"display(['template3'], ['display']); 
   5.172 -inputbox(['template3', 'formValues'], ['inputbox']);
   5.173 -material(['template3'], ['materials']);
   5.174 -cardType(['template3'], ['currentSpec']);
   5.175 -redraw('arrow');" 
   5.176 -ID="template3" NAME="template3" VALUE="basic_$materialcolor"          ><br>
   5.177 -
   5.178 - 
   5.179 -
   5.180 -<input TYPE="image" src = "./images/templates/classic_$materialcolor.jpg"  
   5.181 -onmouseover="pokedex('classic_$materialcolor');" 
   5.182 -onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
   5.183 -onclick=
   5.184 -"display(['template1'], ['display']); 
   5.185 -inputbox(['template1', 'formValues'], ['inputbox']);
   5.186 -material(['template1'], ['materials']);
   5.187 -cardType(['template1'], ['currentSpec']);
   5.188 -redraw('classic');" 
   5.189 -ID="template1" NAME="template1" VALUE="classic_$materialcolor"    ><br>
   5.190 -
   5.191 - 
   5.192 -
   5.193 -<input TYPE="image" src = "./images/templates/lines_$materialcolor.jpg" 
   5.194 -onmouseover="pokedex('lines_$materialcolor');" 	
   5.195 -onmouseout = "pokedex(document.getElementById('currentSpec').innerHTML);"
   5.196 -onclick=
   5.197 -"display(['template4'], ['display']); 
   5.198 -inputbox(['template4', 'formValues'], ['inputbox']);
   5.199 -material(['template4'], ['materials']);
   5.200 -cardType(['template4'], ['currentSpec']);
   5.201 -redraw('direct');" 
   5.202 -ID="template4" NAME="template4" VALUE="lines_$materialcolor"           > 
   5.203 -
   5.204 -	</div>
   5.205 -	</div>
   5.206 -
   5.207 -HERE
   5.208 -
   5.209 -
   5.210 -%shankHash = 
   5.211 -(
   5.212 -
   5.213 -big => template2,  
   5.214 -basic => template3,
   5.215 -classic => template1,
   5.216 -lines  => template4
   5.217 -);
   5.218 -
   5.219 -$target = $shankHash{$style};
   5.220 -
   5.221 -
   5.222 -
   5.223 -
   5.224 -#$r =~ s/inputbox\(\['$target'\], \['inputbox'\]\)\;//;
   5.225 -
   5.226 -
   5.227 -
   5.228 -
   5.229 -
   5.230 -return $r;
   5.231 -}
   5.232 -
   5.233 -
   5.234 -
   5.235 -
   5.236 -sub inputbox
   5.237 -{
   5.238 -
   5.239 -#grab the type of template we'll be using <<<<
   5.240 -	$type = shift;
   5.241 -	
   5.242 -	$hashString = shift;
   5.243 -	#return $hashString;
   5.244 -	
   5.245 -	$perl_hash  = decode_json $hashString;
   5.246 -
   5.247 -	%fieldHash = %$perl_hash;
   5.248 - 
   5.249 -
   5.250 -# we have to care about both the type of template and the material and the color. these are stored in $type>>>>
   5.251 -
   5.252 -#Then, update with a special custon paypal form, taken from the paypal folder and specially designed for that particular template.
   5.253 -#will probaly eventually create a script to automate the generation of these files.
   5.254 -
   5.255 -
   5.256 -#take care of everythign but acrylic clear type
   5.257 -
   5.258 -  {
   5.259 -    local( $/, *FH ) ;
   5.260 -    open( FH, "<./paypal/$type.paylist" ) or die "sudden flaming death\n";
   5.261 -    $z = <FH>;
   5.262 -  }
   5.263 -
   5.264 -
   5.265 -#every type has it's own associated paylist file the contains the things we need
   5.266 -
   5.267 -$z = <<HERE . $z;
   5.268 -<div id = "whatever" onmouseover = "pokedex(document.getElementById('currentSpec').innerHTML);">
   5.269 -HERE
   5.270 -
   5.271 -
   5.272 -
   5.273 -
   5.274 -$z = $z.'</div>';
   5.275 -
   5.276 -
   5.277 -foreach my $key ( keys %fieldHash )
   5.278 -{
   5.279 -
   5.280 -my $replace  = $fieldHash{$key};
   5.281 -
   5.282 -#id="Name" value = "PERL::NAME" 
   5.283 -
   5.284 -
   5.285 -$z =~ s/id="$key"/id="$key" value = "$replace"/g;
   5.286 -
   5.287 -
   5.288 -}
   5.289 -
   5.290 -
   5.291 -return $z;
   5.292 -
   5.293 -
   5.294 -
   5.295 -
   5.296 -
   5.297 -}
   5.298 -
   5.299 -
   5.300 -
   5.301 -
   5.302 -sub display
   5.303 -{
   5.304 -	$all = shift;
   5.305 -	
   5.306 -	
   5.307 -	#~ 
   5.308 -	#~ $t = <<HERE;
   5.309 -	#~ <image src = "./images/display/PERL::PIC.jpg" 	onmouseover="pokedex(['args__PERL::PIC'],['pokedex']);">
   5.310 -	#~ 
   5.311 -	#~ <div id = overlay>
   5.312 -#~ 
   5.313 -#~ 
   5.314 -	#~ </div>
   5.315 -	#~ 
   5.316 -#~ HERE
   5.317 -#~ 
   5.318 -#~ 
   5.319 -#~ 
   5.320 -#~ $t =~ s/PERL::PIC/$all/g;
   5.321 -
   5.322 -	$t = <<HERE;
   5.323 -	<image src = "./images/display/blank.jpg" 	
   5.324 -	onmouseover = "pokedex(document.getElementById('currentSpec').innerHTML);"
   5.325 -	>
   5.326 -	
   5.327 -	<div id = overlay>
   5.328 -
   5.329 -
   5.330 -	</div>
   5.331 -	
   5.332 -HERE
   5.333 -	
   5.334 -	return $t;
   5.335 -	
   5.336 -}
   5.337 -
   5.338 -
   5.339 -
   5.340 -
   5.341 -sub gen
   5.342 -{
   5.343 -  {
   5.344 -    local( $/, *FH ) ;
   5.345 -    open( FH, "<./buy.html" ) or die "sudden flaming death\n";
   5.346 -    $a = <FH>;
   5.347 -   }
   5.348 -
   5.349 -  {
   5.350 -    local( $/, *FH ) ;
   5.351 -    open( FH, "<./top_menu.include" ) or die "sudden flaming death\n";
   5.352 -    $b = <FH>;
   5.353 -   }
   5.354 -
   5.355 -  {
   5.356 -    local( $/, *FH ) ;
   5.357 -    open( FH, "<./cardDefinitions.JSON" ) or die "sudden flaming death\n";
   5.358 -    $c = <FH>;
   5.359 -   }
   5.360 -
   5.361 -$a =~s/PERL::DEFS/$c/;
   5.362 -
   5.363 -
   5.364 -
   5.365 -$a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to <?php include("top_menu.html"); ?>, but in perl and with more memory problems :)
   5.366 -$b = &material("void_acrylic_clear",1);
   5.367 -$a =~ s/PERL-REPLACE::MATERIALS/$b/; #let's do it again!!! :)
   5.368 -
   5.369 -
   5.370 -
   5.371 -$b = "big_acrylic_clear";
   5.372 -$a =~ s/PERL::INITIALCARD/$b/;
   5.373 -$b = &template("big_acrylic_clear");
   5.374 -$a =~ s/PERL-REPLACE::TEMPLATES/$b/; 
   5.375 -
   5.376 -$b = &display("big_acrylic_clear");
   5.377 -$a =~ s/PERL-REPLACE::DISPLAY/$b/;
   5.378 -
   5.379 -$initials = <<HERE ;
   5.380 -{
   5.381 -"Name":"James Bond",
   5.382 -"Email":"jbond\@mi6.co.uk",
   5.383 -"Phone": "123.456.7890", 
   5.384 -"Company": "MI6",
   5.385 -"Website" : "http://jamesbond.com",
   5.386 -"Occupation" : "Secret Agent"
   5.387 -}
   5.388 -
   5.389 -HERE
   5.390 -
   5.391 -
   5.392 -
   5.393 -$b = &inputbox("big_acrylic_clear", $initials);
   5.394 -$a =~ s/PERL-REPLACE::INPUTBOX/$b/;
   5.395 -
   5.396 -$b = &pokedex('big');
   5.397 -$a =~ s/PERL-REPLACE::POKEDEX/$b/;
   5.398 -
   5.399 -
   5.400 -
   5.401 -#$b = &updateForm('fuck','12', '{}');
   5.402 -$a =~ s/PERL::INITIALVALUES/$initials/;
   5.403 -
   5.404 -
   5.405 -
   5.406 -return $a
   5.407 -
   5.408 -
   5.409 -}
   5.410 -
   5.411 -
   5.412 -
   5.413 -sub pokedex
   5.414 -{
   5.415 -
   5.416 -
   5.417 -$classic = <<HERE;
   5.418 -<h1>The Classic LaserKard.</h1>
   5.419 -Balanced and Complete.  The original LaserKard.  For those that wish to leave no stone unturned.  It's all there.
   5.420 -HERE
   5.421 -
   5.422 -$bold = <<HERE;
   5.423 -<h1>The Bold Kard.</h1>
   5.424 -Austere and Iconic.  For those that wish to leave an impression with the power of their name accompanied only by their main method of contact.  Bold, period.
   5.425 -HERE
   5.426 -
   5.427 -$arrow = <<HERE;
   5.428 -<h1>The Arrow Kard.</h1>
   5.429 -Precise and Straightforward.  For those that seek to make a statement while being clear and concise. Straight as an arrow.
   5.430 -HERE
   5.431 -
   5.432 -$direct = <<HERE;
   5.433 -<h1>The Direct Kard.</h1>
   5.434 -Thorough and Distinct.  For those that aim to demonstrate their professionalism with style.  Push the envelope.  Be Direct.
   5.435 -HERE
   5.436 -
   5.437 -
   5.438 -
   5.439 -my %megahash = 
   5.440 -(
   5.441 -
   5.442 -'big' => $bold,
   5.443 -
   5.444 -'basic' => $arrow,
   5.445 -
   5.446 -'lines' => $direct,
   5.447 -
   5.448 -'classic' => $classic,
   5.449 -
   5.450 -'big_acrylic_clear' => $bold,
   5.451 -
   5.452 -'classic_acrylic_clear' => $classic,
   5.453 -
   5.454 -'basic_acrylic_clear'  => $arrow,
   5.455 -
   5.456 -'lines_acrylic_clear' => $direct
   5.457 -);
   5.458 -
   5.459 -
   5.460 -
   5.461 -my $key = shift;
   5.462 -
   5.463 -
   5.464 -if (!$megahash{$key}){return $key;}
   5.465 -
   5.466 -return $megahash{$key};
   5.467 -
   5.468 -
   5.469 -
   5.470 -
   5.471 -}
   5.472 -
   5.473 -
   5.474 -
   5.475 -
   5.476 -
   5.477 -
   5.478 -
   5.479 -
   5.480 -# this here function makes the paypal button go away so people know it's working!
   5.481 -sub vanish
   5.482 -{
   5.483 -return "";
   5.484 -
   5.485 -
   5.486 -}
   5.487 -
   5.488 +# it's a refrence to a function, not a function itself.
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/cardOrders/RobertMcIntyre.txt	Wed Feb 03 03:14:09 2010 -0500
     6.3 @@ -0,0 +1,57 @@
     6.4 +{
     6.5 +
     6.6 +"bold":
     6.7 +	
     6.8 +	{
     6.9 +	"style" : "bold",
    6.10 +	"number" : "7",
    6.11 +	"fields":
    6.12 +		{
    6.13 +		"Name"	: "Robert McIntyre",
    6.14 +		"Email"	: "rlm@mit.edu",
    6.15 +		},
    6.16 +	},
    6.17 +"arrow":
    6.18 +	
    6.19 +	{
    6.20 +	"style" : "arrow",
    6.21 +	"number" : "8",
    6.22 +	"fields":
    6.23 +		{
    6.24 +		"Name"	: "Robert McIntyre",
    6.25 +		"Email"	: "rlm@mit.edu",
    6.26 +		"Company" : "MIT",
    6.27 +		"Occupation" : "Course 6 & 9",
    6.28 +		},
    6.29 +	},
    6.30 +"classic":
    6.31 +	
    6.32 +	{
    6.33 +	"style" : "classic",
    6.34 +	"number" : "7",
    6.35 +	"fields":
    6.36 +		{
    6.37 +		"Name"	: "Robert McIntyre",
    6.38 +		"Email"	: "rlm@mit.edu",
    6.39 +		"Company" : "MIT",
    6.40 +		"Occupation" : "Course 6 & 9",
    6.41 +		"Phone"	: "617.821.9129",
    6.42 +		"Website" : "http://www.rlmcintyre.com",
    6.43 +		},
    6.44 +	},
    6.45 +"direct":
    6.46 +	
    6.47 +	{
    6.48 +	"style" : "direct",
    6.49 +	"number" : "8",
    6.50 +	"fields":
    6.51 +		{
    6.52 +		"Name"	: "Robert McIntyre",
    6.53 +		"Email"	: "rlm@mit.edu",
    6.54 +		"Company" : "MIT",
    6.55 +		"Occupation" : "Course 6 & 9",
    6.56 +		"Phone"	: "617.821.9129",
    6.57 +		"Website" : "http://www.rlmcintyre.com",
    6.58 +		},
    6.59 +	},
    6.60 +}
     7.1 --- a/echo.css	Mon Feb 01 02:54:59 2010 -0500
     7.2 +++ b/echo.css	Wed Feb 03 03:14:09 2010 -0500
     7.3 @@ -6,11 +6,100 @@
     7.4  
     7.5  div#output
     7.6  {
     7.7 -background-color: #585;
     7.8 +/*background-color: #585;*/
     7.9  }
    7.10  
    7.11  
    7.12  div#disp_contain
    7.13  {
    7.14 -background-color: #aab;
    7.15 +/*background-color: #aab;*/
    7.16  }
    7.17 +
    7.18 +div#perlClick
    7.19 +{
    7.20 +position:absolute;
    7.21 +
    7.22 +top:240px;
    7.23 +right:25px;
    7.24 +
    7.25 +width: 120px;
    7.26 +text-align: center;
    7.27 +
    7.28 +background-color: #4ff;  /*sky blue*/
    7.29 +
    7.30 +}
    7.31 +
    7.32 +
    7.33 +div#sendTo
    7.34 +{
    7.35 +background-color: #000000;
    7.36 +color:white;
    7.37 +}
    7.38 +div#i_inputbox
    7.39 +{
    7.40 +
    7.41 +padding-left:10px;
    7.42 +padding-top:10px;
    7.43 +padding-right:0px;
    7.44 +border-style:solid;
    7.45 +border-color:#ffffff;
    7.46 +border-width:1px;
    7.47 +padding-bottom:10px;
    7.48 +
    7.49 +font: bold 22px "helvetica","arial", "sans-serif";
    7.50 +color: white;
    7.51 +
    7.52 +float:left;
    7.53 +width:520px;
    7.54 +}
    7.55 +
    7.56 +
    7.57 +div#formValues
    7.58 +
    7.59 +{
    7.60 +color:white;
    7.61 +position: absolute;
    7.62 +top:30px;
    7.63 +left: 15px;
    7.64 +display:none;
    7.65 +}
    7.66 +
    7.67 +div#cardDefs
    7.68 +{
    7.69 +color:green;
    7.70 +position: absolute;
    7.71 +width: 200px;
    7.72 +top: 90px;
    7.73 +left: 10px;
    7.74 +display:none;
    7.75 +}
    7.76 +
    7.77 +div#currentSpec
    7.78 +{
    7.79 +color:red;
    7.80 +position: absolute;
    7.81 +width: 200px;
    7.82 +top: 90px;
    7.83 +right: 10px;
    7.84 +display:none;
    7.85 +}
    7.86 +
    7.87 +div#output
    7.88 +{
    7.89 +color:#fbafcd;
    7.90 +position: absolute;
    7.91 +width: 200px;
    7.92 +top: 130px;
    7.93 +right: 10px;
    7.94 +/*display:none;*/
    7.95 +}
    7.96 +div#perlClick
    7.97 +{
    7.98 +color:red;
    7.99 +position: absolute;
   7.100 +width: 200px;
   7.101 +top: 90px;
   7.102 +right: 10px;
   7.103 +display:none;
   7.104 +}
   7.105 +
     8.1 --- a/echo.html	Mon Feb 01 02:54:59 2010 -0500
     8.2 +++ b/echo.html	Wed Feb 03 03:14:09 2010 -0500
     8.3 @@ -3,15 +3,15 @@
     8.4  <head>
     8.5  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     8.6  
     8.7 -
     8.8 +<link href="./main.css" rel="stylesheet" type="text/css">
     8.9 +<link href="./sexy.css" rel="stylesheet" type="text/css">
    8.10  <link href="./echo.css" rel="stylesheet" type="text/css">
    8.11 -
    8.12 -<title>Laserkard | Design Studio</title>
    8.13 +<title>Laserkard | Echo</title>
    8.14  
    8.15  <script type="text/javascript" src="./buycode.js"></script>
    8.16  <script type="text/javascript" src="./awesome_js/raphael.js"></script>
    8.17 -
    8.18 -
    8.19 +<script type="text/javascript" src="./awesome_js/robert.js"></script>
    8.20 +<script type="text/javascript" src="./awesome_js/echo.js"></script>
    8.21  <script type="text/javascript" src="./awesome_js/cufon-yui.js"></script>
    8.22  <script type="text/javascript" src="./awesome_js/HelveticaNeue_LT_55_Roman_700-HelveticaNeue_LT_55_Roman_700-HelveticaNeue_LT_55_Roman_italic_700-HelveticaNeue_LT_55_Roman_italic_700.font.js"></script>
    8.23  
    8.24 @@ -21,39 +21,201 @@
    8.25  
    8.26  </head>
    8.27  
    8.28 -<body id = "buy">
    8.29 +<body id = "echo">
    8.30  
    8.31  
    8.32 -<div id = "disp_contain"></div>
    8.33 +PERL-REPLACE::TOP_MENU
    8.34 +<div id="whole">
    8.35 +	
    8.36 +	<div id = "centerbox" >
    8.37 +		
    8.38 +		<div id= "trifold" >
    8.39 +			<div id = "disp_contain"></div>
    8.40 +			<div id="display">PERL-REPLACE::DISPLAY</div>
    8.41 +		</div>
    8.42 +		
    8.43 +		<div id="pokedex">PERL-REPLACE::POKEDEX</div>
    8.44 +	</div>
    8.45 +
    8.46 +	<div id="inputbox" ><div id = "i_inputbox">
    8.47 +<div id = "sendTo">
    8.48 +Fill In your email:<br>
    8.49 +<textarea id = "sendOff" rows="1" cols="30">
    8.50 +rlm@mit.edu
    8.51 +</textarea>
    8.52 +</div>
    8.53 +<br>
    8.54 +<div id = "buttonButton">
    8.55 +<button id = "parseButton" onClick="parseFile();">GENERATE SVG</button>
    8.56 +</div>
    8.57 + ^--  Click here to send SVG file to yourself.<br>
    8.58 + (don't click multiple times)
    8.59 + <br>
    8.60 +
    8.61 +<br>
    8.62 +________________________________________<br>
    8.63 +This text area controls the svg file that will be generated.  Be sure to be careful with the quotation marks so that the data format is correct.  Please use this sample text as a template for filling out your own card.  You will be sent an email for every 30 cards you create.
    8.64 +<br>
    8.65 +
    8.66 +<div id = "textInput">
    8.67 +<textarea id = "textEntry" rows="60" cols="60">
    8.68 +{
    8.69 +
    8.70 +"bold":
    8.71 +	
    8.72 +	{
    8.73 +	"style" : "bold",
    8.74 +	"number" : "7",
    8.75 +	"fields":
    8.76 +		{
    8.77 +		"Name"	: "Robert McIntyre",
    8.78 +		"Email"	: "rlm@mit.edu",
    8.79 +		},
    8.80 +	},
    8.81 +"arrow":
    8.82 +	
    8.83 +	{
    8.84 +	"style" : "arrow",
    8.85 +	"number" : "8",
    8.86 +	"fields":
    8.87 +		{
    8.88 +		"Name"	: "Robert McIntyre",
    8.89 +		"Email"	: "rlm@mit.edu",
    8.90 +		"Company" : "MIT",
    8.91 +		"Occupation" : "Course 6 & 9",
    8.92 +		},
    8.93 +	},
    8.94 +"classic":
    8.95 +	
    8.96 +	{
    8.97 +	"style" : "classic",
    8.98 +	"number" : "7",
    8.99 +	"fields":
   8.100 +		{
   8.101 +		"Name"	: "Robert McIntyre",
   8.102 +		"Email"	: "rlm@mit.edu",
   8.103 +		"Company" : "MIT",
   8.104 +		"Occupation" : "Course 6 & 9",
   8.105 +		"Phone"	: "617.821.9129",
   8.106 +		"Website" : "http://www.rlmcintyre.com",
   8.107 +		},
   8.108 +	},
   8.109 +"direct":
   8.110 +	
   8.111 +	{
   8.112 +	"style" : "direct",
   8.113 +	"number" : "8",
   8.114 +	"fields":
   8.115 +		{
   8.116 +		"Name"	: "Robert McIntyre",
   8.117 +		"Email"	: "rlm@mit.edu",
   8.118 +		"Company" : "MIT",
   8.119 +		"Occupation" : "Course 6 & 9",
   8.120 +		"Phone"	: "617.821.9129",
   8.121 +		"Website" : "http://www.rlmcintyre.com",
   8.122 +		},
   8.123 +	},
   8.124 +}
   8.125 +</textarea>
   8.126 +</div>
   8.127 +
   8.128 +
   8.129 +
   8.130 +
   8.131 +
   8.132 +
   8.133 +
   8.134 +
   8.135 +
   8.136 +
   8.137 +
   8.138 +
   8.139 +
   8.140 +
   8.141 +
   8.142 +</div></div>
   8.143 +	<div id="materials" onmouseover="pokedex(['args__materials'],['pokedex']);">PERL-REPLACE::MATERIALS</div>
   8.144 +</div>
   8.145 +
   8.146 +
   8.147 +
   8.148 +
   8.149 +<div id = "formValues">PERL::INITIALVALUES</div>
   8.150 +
   8.151 +<div id = "currentSpec">PERL::INITIALCARD</div>
   8.152 +
   8.153 +<div id = "cardDefs">PERL::DEFS</div>
   8.154 +
   8.155 +<div id = "output">OUTPUT</div>
   8.156 +
   8.157 +
   8.158 +
   8.159 +
   8.160 +
   8.161 +
   8.162  
   8.163  
   8.164  
   8.165  <div id = "perlClick"  onClick = "echo(['disp_contain'], ['perlClick'], 'POST');">Send this shiz!</div>
   8.166  
   8.167 +<!--
   8.168  
   8.169  <script language="javascript">
   8.170  
   8.171  
   8.172 +//
   8.173 +//var raphe = Raphael("disp_contain", 515, 318);
   8.174 +//
   8.175 +//var c = raphe.rect(0, 0, 514, 317, 40);
   8.176 +//c.attr("stroke", "#00f");
   8.177 +//ta = raphe.print(10, 150, "Robert McIntyre", raphe.getFont("HelveticaNeue", 700), 63);
   8.178 +//ta.attr('stroke', '#f00');
   8.179 +//ta.attr('fill', 'TRANSPARENT');
   8.180 +//
   8.181 +//tb = raphe.print(300, 270, "rlm@mit.edu", raphe.getFont("HelveticaNeue", 700), 25);
   8.182 +//tb.attr('stroke', '#f00');
   8.183 +//tb.attr('fill', 'TRANSPARENT');
   8.184 +//
   8.185 +//tc = raphe.path("M 0 269 L 270 269");
   8.186 +//tc.attr('stroke', '#f00');
   8.187 +//
   8.188  
   8.189 +//
   8.190 +
   8.191 +
   8.192 +
   8.193 +
   8.194 +</script>
   8.195 +-->
   8.196 +
   8.197 +
   8.198 +<script language="javascript">
   8.199 +//this is the main painting object, established here and created with Initial painting values
   8.200 +
   8.201 +JSONtex = document.getElementById('cardDefs').innerHTML;
   8.202 +laserkard = new Object();
   8.203 +laserkard = eval('(' + JSONtex + ')');
   8.204 +color = 'ff0000';
   8.205  var raphe = Raphael("disp_contain", 515, 318);
   8.206 +redraw("bold");
   8.207  
   8.208  var c = raphe.rect(0, 0, 514, 317, 40);
   8.209  c.attr("stroke", "#00f");
   8.210 -ta = raphe.print(10, 150, "Robert McIntyre", raphe.getFont("HelveticaNeue", 700), 63);
   8.211 -ta.attr('stroke', '#f00');
   8.212 -ta.attr('fill', 'TRANSPARENT');
   8.213  
   8.214 -tb = raphe.print(300, 270, "rlm@mit.edu", raphe.getFont("HelveticaNeue", 700), 25);
   8.215 -tb.attr('stroke', '#f00');
   8.216 -tb.attr('fill', 'TRANSPARENT');
   8.217  
   8.218 -tc = raphe.path("M 0 269 L 270 269");
   8.219 -tc.attr('stroke', '#f00');
   8.220  
   8.221  
   8.222  
   8.223 +//ta = raphe.print(10, 150, "Robert McIntyre", raphe.getFont("HelveticaNeue", 700), 63);
   8.224 +//ta.attr('stroke', '#f00');
   8.225 +//ta.attr('fill', 'TRANSPARENT');
   8.226  
   8.227 +//tb = raphe.print(300, 270, "rlm@mit.edu", raphe.getFont("HelveticaNeue", 700), 25);
   8.228 +//tb.attr('stroke', '#f00');
   8.229 +//tb.attr('fill', 'TRANSPARENT');
   8.230  
   8.231 +//tc = raphe.path("M 0 269 L 270 269");
   8.232 +//tc.attr('stroke', '#f00');
   8.233  
   8.234  
   8.235  </script>
   8.236 @@ -61,9 +223,6 @@
   8.237  
   8.238  
   8.239  
   8.240 -
   8.241 -
   8.242 -
   8.243  </body>
   8.244  
   8.245  </html>
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/echo.js	Wed Feb 03 03:14:09 2010 -0500
     9.3 @@ -0,0 +1,1 @@
     9.4 +
    10.1 --- a/echo.pl	Mon Feb 01 02:54:59 2010 -0500
    10.2 +++ b/echo.pl	Wed Feb 03 03:14:09 2010 -0500
    10.3 @@ -14,6 +14,8 @@
    10.4  $Data::Dumper::Indent = 1;
    10.5  use Storable;
    10.6  use SVG;
    10.7 +use Laserkard;
    10.8 +
    10.9  
   10.10  my $q = new CGI;
   10.11  
   10.12 @@ -21,6 +23,14 @@
   10.13  
   10.14  my %hash = 
   10.15  ( 
   10.16 +'material' => \&Laserkard::material,
   10.17 +'template'	=> \&Laserkard::template, 
   10.18 +'inputbox'	=> \&Laserkard::inputbox,
   10.19 +'display'	=> \&Laserkard::display,
   10.20 +'change_rules' => \&Laserkard::change_rules,
   10.21 +'vanish'      => \&Laserkard::vanish,
   10.22 +'updateForm'  => \&Laserkard::updateForm,
   10.23 +'cardType'    => \&Laserkard::cardType,
   10.24  'echo' => \&echo
   10.25  );
   10.26  
   10.27 @@ -36,21 +46,13 @@
   10.28  
   10.29  sub gen
   10.30  {
   10.31 -  {
   10.32 -    local( $/, *FH ) ;
   10.33 -    open( FH, "<./echo.html" ) or die "sudden flaming death\n";
   10.34 -    $a = <FH>;
   10.35 -   }
   10.36  
   10.37 -  {
   10.38 -    local( $/, *FH ) ;
   10.39 -    open( FH, "<./top_menu.include" ) or die "sudden flaming death\n";
   10.40 -    $b = <FH>;
   10.41 -   }
   10.42  
   10.43  
   10.44  
   10.45 -$a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to <?php include("top_menu.html"); ?>, but in perl and with more memory problems :)
   10.46 +
   10.47 +$a = Laserkard::genEcho();
   10.48 +
   10.49  
   10.50  
   10.51  
   10.52 @@ -64,26 +66,48 @@
   10.53  sub echo 
   10.54  {
   10.55  	
   10.56 -	
   10.57 -my $svg = $_[0];
   10.58 -
   10.59 -my $destination = 'rlm@mit.edu';	
   10.60 -
   10.61 -
   10.62 -
   10.63 -
   10.64 -$svg = &impose($svg);
   10.65 -
   10.66 -
   10.67 -
   10.68  
   10.69  	
   10.70 -&mail($svg, $destination);
   10.71 +my $svg = shift;
   10.72  
   10.73  
   10.74  
   10.75 +#my $destination = 'rlm@mit.edu';	
   10.76  
   10.77 -return "done.";	
   10.78 +
   10.79 +
   10.80 +
   10.81 +
   10.82 +
   10.83 +
   10.84 +my @cards = split (/S3ntinEL/, $svg);
   10.85 +my $emmmm = shift;
   10.86 +#return $emmmm;
   10.87 +
   10.88 +$cardsPerMail = 30;
   10.89 +##### ok, now we have this awesome array with all the cards we need to print.
   10.90 +# the numbers are right, so now we really just have to impose them.
   10.91 +for $mails(0..int(($#cards) / $cardsPerMail))
   10.92 +{
   10.93 +
   10.94 +
   10.95 +my $start = $mails * $cardsPerMail;
   10.96 +
   10.97 +my $end =  ($#cards >($start + $cardsPerMail)) ?  ($start + $cardsPerMail)  :  $#cards;
   10.98 +
   10.99 +$svg = &impose(@cards[$start..$end]);
  10.100 +#$svg = &impose($cards[$end]);
  10.101 +	
  10.102 +&mail($svg, $emmmm);
  10.103 +}
  10.104 +
  10.105 +
  10.106 +
  10.107 +return "done";
  10.108 +
  10.109 +return $svg;
  10.110 +
  10.111 +	
  10.112  	
  10.113  }
  10.114  
  10.115 @@ -96,16 +120,84 @@
  10.116  #out purpose here is to take that one card, size it correctly, and make appropiate copies 
  10.117  #so that our supplier can simply import the file and print.
  10.118  
  10.119 -$sss =  $_[0];
  10.120 -$sss =~ s/^/\n\n\n/;
  10.121 -$sss =~ s/$/\n\n\n/;
  10.122 +my $xml = new XML::Simple;
  10.123 +my @cards = @_;
  10.124 +
  10.125 +
  10.126 +for (0..$#cards)
  10.127 +{
  10.128 +
  10.129 +$cards[$_] =~ s/^/\n\n\n/;
  10.130 +$cards[$_] =~ s/$/\n\n\n/;
  10.131  # you fucking bitch!
  10.132 -$sss =~ s/Created wit........//;
  10.133 -
  10.134 +$cards[$_] =~ s/Created wit........//;
  10.135 +}
  10.136  
  10.137  # read XML file
  10.138 -my $xml = new XML::Simple;
  10.139 -my $data = $xml->XMLin($sss, ForceArray => 1);
  10.140 +
  10.141 +
  10.142 +
  10.143 +
  10.144 +#print Dumper(%juzz);
  10.145 +
  10.146 +
  10.147 +my $svg= SVG->new(width=>"18in",height=>"14in");
  10.148 +
  10.149 +#print Dumper($juzz{'path'}[2]);
  10.150 +#print "\n***************************\n";
  10.151 +#print Dumper($pathData);
  10.152 +
  10.153 +
  10.154 +
  10.155 +
  10.156 +my $base = "scale(0.6057),matrix(1 0 0 -1 0 317), rotate(180),translate(-514,-317)";
  10.157 +
  10.158 +
  10.159 +my @cardCollection;
  10.160 +
  10.161 +for $name(0..$#cards)  #22 letters for 22 cards
  10.162 +{
  10.163 +	
  10.164 +	#calcuate the thing's place in the grid:
  10.165 +	
  10.166 +	$cardsToARow = 5;
  10.167 +	$cardsToAColumn =  5;
  10.168 +	
  10.169 +	my $row = int($name/$cardsToARow);  #  cards to a row 
  10.170 +	my $column = int($name %  $cardsToAColumn);
  10.171 +	
  10.172 +	$margin = 25;
  10.173 +	$cardWidth   =  514*0.6057;
  10.174 +	$cardHeight  = 	317*0.6057;
  10.175 +	
  10.176 +	
  10.177 +	$transX = 40 + ($margin + $cardWidth ) * $column;
  10.178 +	$transY = 40 + ($margin + $cardHeight) * $row;
  10.179 +	
  10.180 +	
  10.181 +	
  10.182 +	${"group_".$name} = 
  10.183 +	$svg->group(
  10.184 +    id    => "group_".$name,    
  10.185 +	transform => "translate($transX,$transY),"."$base"
  10.186 +	);
  10.187 +	
  10.188 +	push @cardCollection, ${"group_".$name};
  10.189 +}
  10.190 +
  10.191 +
  10.192 +
  10.193 +      
  10.194 +
  10.195 +
  10.196 +        
  10.197 +        
  10.198 +        
  10.199 +for ($i = 0; $i <= $#cardCollection; $i++)
  10.200 +{
  10.201 +
  10.202 +
  10.203 +my $data = $xml->XMLin($cards[$i], ForceArray => 1);
  10.204  
  10.205  
  10.206  my %data = %$data;
  10.207 @@ -123,65 +215,6 @@
  10.208  );
  10.209  
  10.210  
  10.211 -
  10.212 -
  10.213 -#print Dumper(%juzz);
  10.214 -
  10.215 -
  10.216 -my $svg= SVG->new(width=>"18in",height=>"12in");
  10.217 -
  10.218 -#print Dumper($juzz{'path'}[2]);
  10.219 -#print "\n***************************\n";
  10.220 -#print Dumper($pathData);
  10.221 -
  10.222 -
  10.223 -
  10.224 -
  10.225 -my $base = "scale(0.6057),matrix(1 0 0 -1 0 317), rotate(180),translate(-514,-317)";
  10.226 -
  10.227 -
  10.228 -my @cardCollection;
  10.229 -
  10.230 -for $name(0..21)  #22 letters for 22 cards
  10.231 -{
  10.232 -	
  10.233 -	#calcuate the thing's place in the grid:
  10.234 -	
  10.235 -	$cardsToARow = 5;
  10.236 -	$cardsToAColumn =  5;
  10.237 -	
  10.238 -	my $row = int($name/$cardsToARow);  #  cards to a row 
  10.239 -	my $column = int($name %  $cardsToAColumn);
  10.240 -	
  10.241 -	$margin = 25;
  10.242 -	$cardWidth   =  514*0.6057;
  10.243 -	$cardHeight  = 	317*0.6057;
  10.244 -	
  10.245 -	
  10.246 -	$transX = 40 + ($margin + $cardWidth ) * $column;
  10.247 -	$transY = 40 + ($margin + $cardHeight) * $row;
  10.248 -	
  10.249 -	
  10.250 -	
  10.251 -	${"group_".$name} = 
  10.252 -	$svg->group(
  10.253 -    id    => "group_".$name,    
  10.254 -	transform => "translate($transX,$transY),"."$base"
  10.255 -	);
  10.256 -	
  10.257 -	push @cardCollection, ${"group_".$name};
  10.258 -}
  10.259 -
  10.260 -
  10.261 -
  10.262 -      
  10.263 -  
  10.264 -        
  10.265 -        
  10.266 -        
  10.267 -for ($i = 0; $i <= $#cardCollection; $i++)
  10.268 -{
  10.269 -
  10.270  for $pathData(@{$juzz{'path'}})
  10.271  {
  10.272  $cardCollection[$i]->tag('path', %{$pathData});
  10.273 @@ -319,12 +352,7 @@
  10.274  
  10.275  $attach1
  10.276  
  10.277 -$boundary
  10.278 -Content-Type: application/octet-stream; name="huh.txt"
  10.279 -Content-Transfer-Encoding: base64
  10.280 -Content-Disposition: attachment; filename="huh.txt"
  10.281  
  10.282 -$attach2
  10.283  $boundary--
  10.284  
  10.285  END_OF_BODY
    11.1 Binary file images/LaserKard Home Image - blue.eps has changed
    12.1 Binary file images/LaserKard Home Image - cyan.eps has changed
    13.1 Binary file images/LaserKard Home Image - green.eps has changed
    14.1 Binary file images/LaserKard Home Image - orange.eps has changed
    15.1 Binary file images/LaserKard Home Image - purple.eps has changed
    16.1 Binary file images/bl_sm.jpg has changed
    17.1 Binary file images/cy_sm.jpg has changed
    18.1 Binary file images/gr_sm.jpg has changed
    19.1 Binary file images/olbl_sm.jpg has changed
    20.1 Binary file images/olgr_sm.jpg has changed
    21.1 Binary file images/olor_sm.jpg has changed
    22.1 Binary file images/or_sm.jpg has changed
    23.1 Binary file images/pr_sm.jpg has changed
    24.1 --- a/index.php	Mon Feb 01 02:54:59 2010 -0500
    24.2 +++ b/index.php	Wed Feb 03 03:14:09 2010 -0500
    24.3 @@ -19,7 +19,7 @@
    24.4    </div>
    24.5  
    24.6  <div class="center">
    24.7 -	<a href="./buy.pl"><img src="./images/wt_sm.jpg" border="0"></a>
    24.8 +	<a href="./buy.pl"><img src="./images/wt_sm.jpg" name="but" border="0"></a>
    24.9  <div class="text">
   24.10  
   24.11    
    25.1 --- a/log/error_log.log	Mon Feb 01 02:54:59 2010 -0500
    25.2 +++ b/log/error_log.log	Wed Feb 03 03:14:09 2010 -0500
    25.3 @@ -357,3 +357,63 @@
    25.4  [Mon Feb 01 01:34:50 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
    25.5  [Mon Feb 01 02:25:11 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
    25.6  [Mon Feb 01 02:25:18 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
    25.7 +[Mon Feb 01 09:56:05 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
    25.8 +[Mon Feb 01 09:56:08 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
    25.9 +[Mon Feb 01 12:17:52 2010] [error] [client 18.111.53.219] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.10 +[Mon Feb 01 12:17:55 2010] [error] [client 18.111.53.219] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.11 +[Mon Feb 01 16:23:29 2010] [error] [client 18.238.1.90] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.12 +[Mon Feb 01 16:23:33 2010] [error] [client 18.238.1.90] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.13 +[Mon Feb 01 17:12:24 2010] [error] [client 18.238.1.90] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.14 +[Mon Feb 01 17:12:27 2010] [error] [client 18.238.1.90] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.15 +[Mon Feb 01 17:12:27 2010] [error] [client 18.238.1.90] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.16 +[Mon Feb 01 19:58:24 2010] [error] [client 18.238.1.90] malformed header from script. Bad header=<html><head><script type="text: buy.pl, referer: http://laserkard.rlmcintyre.com/
   25.17 +[Mon Feb 01 19:58:36 2010] [error] [client 18.238.1.90] malformed header from script. Bad header=<html><head><script type="text: buy.pl, referer: http://laserkard.rlmcintyre.com/
   25.18 +[Mon Feb 01 19:59:03 2010] [error] [client 18.238.1.90] malformed header from script. Bad header=<html><head><script type="text: buy.pl, referer: http://laserkard.rlmcintyre.com/
   25.19 +[Mon Feb 01 19:59:13 2010] [error] [client 18.238.1.90] malformed header from script. Bad header=<html><head><script type="text: buy.pl, referer: http://laserkard.rlmcintyre.com/
   25.20 +[Mon Feb 01 22:13:16 2010] [error] [client 18.238.5.117] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.21 +[Tue Feb 02 13:02:18 2010] [error] [client 18.58.2.225] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.22 +[Tue Feb 02 13:02:22 2010] [error] [client 18.58.2.225] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.23 +[Tue Feb 02 20:16:27 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.24 +[Tue Feb 02 20:16:27 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.25 +[Tue Feb 02 20:16:30 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.26 +[Tue Feb 02 20:43:14 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.27 +[Tue Feb 02 20:43:17 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.28 +[Tue Feb 02 20:48:53 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.29 +[Tue Feb 02 20:48:54 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.30 +[Tue Feb 02 21:44:56 2010] [error] [client 18.111.94.16] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.31 +[Tue Feb 02 21:44:59 2010] [error] [client 18.111.94.16] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.32 +[Tue Feb 02 22:35:35 2010] [error] [client 70.138.229.243] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.33 +[Tue Feb 02 22:35:59 2010] [error] [client 70.138.229.243] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
   25.34 +[Wed Feb 03 01:41:22 2010] [error] [client 18.238.1.90] Problem with code: File does not exist: , referer: http://laserkard.rlmcintyre.com/echo.pl
   25.35 +[Wed Feb 03 01:41:22 2010] [error] [client 18.238.1.90] , referer: http://laserkard.rlmcintyre.com/echo.pl
   25.36 +[Wed Feb 03 01:41:22 2010] [error] [client 18.238.1.90] , referer: http://laserkard.rlmcintyre.com/echo.pl
   25.37 +[Wed Feb 03 01:41:22 2010] [error] [client 18.238.1.90] , referer: http://laserkard.rlmcintyre.com/echo.pl
   25.38 +[Wed Feb 03 01:41:22 2010] [error] [client 18.238.1.90] , referer: http://laserkard.rlmcintyre.com/echo.pl
   25.39 +[Wed Feb 03 01:41:22 2010] [error] [client 18.238.1.90] , referer: http://laserkard.rlmcintyre.com/echo.pl
   25.40 +[Wed Feb 03 01:41:22 2010] [error] [client 18.238.1.90]  at /home/rlm/Desktop/web/laserkard/echo.pl line 116, referer: http://laserkard.rlmcintyre.com/echo.pl
   25.41 +[Wed Feb 03 01:41:22 2010] [error] [client 18.238.1.90] , referer: http://laserkard.rlmcintyre.com/echo.pl
   25.42 +[Wed Feb 03 01:55:38 2010] [error] [client 18.238.1.90] Unmatched right curly bracket at /home/rlm/Desktop/web/laserkard/echo.pl line 107, at end of line
   25.43 +[Wed Feb 03 01:55:38 2010] [error] [client 18.238.1.90] syntax error at /home/rlm/Desktop/web/laserkard/echo.pl line 107, near "}"
   25.44 +[Wed Feb 03 01:55:38 2010] [error] [client 18.238.1.90] syntax error at /home/rlm/Desktop/web/laserkard/echo.pl line 242, near "}"
   25.45 +[Wed Feb 03 01:55:38 2010] [error] [client 18.238.1.90] syntax error at /home/rlm/Desktop/web/laserkard/echo.pl line 297, near "}"
   25.46 +[Wed Feb 03 01:55:38 2010] [error] [client 18.238.1.90] syntax error at /home/rlm/Desktop/web/laserkard/echo.pl line 349, near "}"
   25.47 +[Wed Feb 03 01:55:38 2010] [error] [client 18.238.1.90] Execution of /home/rlm/Desktop/web/laserkard/echo.pl aborted due to compilation errors.
   25.48 +[Wed Feb 03 01:55:38 2010] [error] [client 18.238.1.90] Premature end of script headers: echo.pl
   25.49 +[Wed Feb 03 01:55:40 2010] [error] [client 18.238.1.90] Unmatched right curly bracket at /home/rlm/Desktop/web/laserkard/echo.pl line 107, at end of line
   25.50 +[Wed Feb 03 01:55:40 2010] [error] [client 18.238.1.90] syntax error at /home/rlm/Desktop/web/laserkard/echo.pl line 107, near "}"
   25.51 +[Wed Feb 03 01:55:40 2010] [error] [client 18.238.1.90] syntax error at /home/rlm/Desktop/web/laserkard/echo.pl line 242, near "}"
   25.52 +[Wed Feb 03 01:55:40 2010] [error] [client 18.238.1.90] syntax error at /home/rlm/Desktop/web/laserkard/echo.pl line 297, near "}"
   25.53 +[Wed Feb 03 01:55:40 2010] [error] [client 18.238.1.90] syntax error at /home/rlm/Desktop/web/laserkard/echo.pl line 349, near "}"
   25.54 +[Wed Feb 03 01:55:40 2010] [error] [client 18.238.1.90] Execution of /home/rlm/Desktop/web/laserkard/echo.pl aborted due to compilation errors.
   25.55 +[Wed Feb 03 01:55:40 2010] [error] [client 18.238.1.90] Premature end of script headers: echo.pl
   25.56 +[Wed Feb 03 01:56:14 2010] [error] [client 18.238.1.90] Unmatched right curly bracket at /home/rlm/Desktop/web/laserkard/echo.pl line 107, at end of line
   25.57 +[Wed Feb 03 01:56:14 2010] [error] [client 18.238.1.90] syntax error at /home/rlm/Desktop/web/laserkard/echo.pl line 107, near "}"
   25.58 +[Wed Feb 03 01:56:14 2010] [error] [client 18.238.1.90] syntax error at /home/rlm/Desktop/web/laserkard/echo.pl line 242, near "}"
   25.59 +[Wed Feb 03 01:56:14 2010] [error] [client 18.238.1.90] syntax error at /home/rlm/Desktop/web/laserkard/echo.pl line 297, near "}"
   25.60 +[Wed Feb 03 01:56:14 2010] [error] [client 18.238.1.90] syntax error at /home/rlm/Desktop/web/laserkard/echo.pl line 349, near "}"
   25.61 +[Wed Feb 03 01:56:14 2010] [error] [client 18.238.1.90] Execution of /home/rlm/Desktop/web/laserkard/echo.pl aborted due to compilation errors.
   25.62 +[Wed Feb 03 01:56:14 2010] [error] [client 18.238.1.90] Premature end of script headers: echo.pl
   25.63 +[Wed Feb 03 02:04:39 2010] [error] [client 18.238.1.90] Problem with code: Could not find echo.xml in /home/rlm/Desktop/web/laserkard/ at /home/rlm/Desktop/web/laserkard/echo.pl line 195, referer: http://laserkard.rlmcintyre.com/echo.pl
   25.64 +[Wed Feb 03 02:04:39 2010] [error] [client 18.238.1.90] , referer: http://laserkard.rlmcintyre.com/echo.pl
   25.65 +[Wed Feb 03 02:05:33 2010] [error] [client 18.238.1.90] Problem with code: Could not find echo.xml in /home/rlm/Desktop/web/laserkard/ at /home/rlm/Desktop/web/laserkard/echo.pl line 195, referer: http://laserkard.rlmcintyre.com/echo.pl
   25.66 +[Wed Feb 03 02:05:33 2010] [error] [client 18.238.1.90] , referer: http://laserkard.rlmcintyre.com/echo.pl
    26.1 --- a/paypal/basic_acrylic_clear.paylist	Mon Feb 01 02:54:59 2010 -0500
    26.2 +++ b/paypal/basic_acrylic_clear.paylist	Wed Feb 03 03:14:09 2010 -0500
    26.3 @@ -79,20 +79,20 @@
    26.4      
    26.5      <input type="radio" name = "whatev"
    26.6  
    26.7 -	value="40 cards @125.00"   CHECKED
    26.8 +	value="30 cards @99.00"   CHECKED
    26.9  	onclick = "ReadForm (this.form, false);"
   26.10  	onload = "ReadForm (this.form, false);" >
   26.11 -	40 cards &mdash; $125
   26.12 +	30 cards &mdash; $99
   26.13  	
   26.14  	<br>
   26.15  	
   26.16      
   26.17      <input type="radio" name = "whatev"
   26.18  
   26.19 -	value="4 cards @30.00"   
   26.20 +	value="4 cards @29.00"   
   26.21  	onclick = "ReadForm (this.form, false);"
   26.22  	onload = "ReadForm (this.form, false);" >
   26.23 -	4 cards &mdash; $30
   26.24 +	4 cards &mdash; $29
   26.25  	
   26.26  	<br>
   26.27  	
   26.28 @@ -147,7 +147,7 @@
   26.29  
   26.30  <br>
   26.31  Total Cost:&nbsp; &nbsp;
   26.32 -<input class="nbor" type="text" name="tot" size="8" value="$125.00">
   26.33 +<input class="nbor" type="text" name="tot" size="8" value="$99.00">
   26.34  <br>(Free Shipping)
   26.35  <br><br>            
   26.36  <input name="accept" type="checkbox" value="0"><br>
    27.1 --- a/paypal/big_acrylic_clear.paylist	Mon Feb 01 02:54:59 2010 -0500
    27.2 +++ b/paypal/big_acrylic_clear.paylist	Wed Feb 03 03:14:09 2010 -0500
    27.3 @@ -79,20 +79,20 @@
    27.4      
    27.5      <input type="radio" name = "whatev"
    27.6  
    27.7 -	value="40 cards @125.00"   CHECKED
    27.8 +	value="30 cards @99.00"   CHECKED
    27.9  	onclick = "ReadForm (this.form, false);"
   27.10  	onload = "ReadForm (this.form, false);" >
   27.11 -	40 cards &mdash; $125
   27.12 +	30 cards &mdash; $99
   27.13  	
   27.14  	<br>
   27.15  	
   27.16      
   27.17      <input type="radio" name = "whatev"
   27.18  
   27.19 -	value="4 cards @30.00"   
   27.20 +	value="4 cards @29.00"   
   27.21  	onclick = "ReadForm (this.form, false);"
   27.22  	onload = "ReadForm (this.form, false);" >
   27.23 -	4 cards &mdash; $30
   27.24 +	4 cards &mdash; $29
   27.25  	
   27.26  	<br>
   27.27  	
   27.28 @@ -127,7 +127,7 @@
   27.29  
   27.30  <br>
   27.31  Total Cost:&nbsp; &nbsp;
   27.32 -<input class="nbor" type="text" name="tot" size="8" value="$125.00">
   27.33 +<input class="nbor" type="text" name="tot" size="8" value="$99.00">
   27.34  <br>(Free Shipping)
   27.35  <br><br>            
   27.36  <input name="accept" type="checkbox" value="0"><br>
    28.1 --- a/paypal/classic_acrylic_clear.paylist	Mon Feb 01 02:54:59 2010 -0500
    28.2 +++ b/paypal/classic_acrylic_clear.paylist	Wed Feb 03 03:14:09 2010 -0500
    28.3 @@ -79,20 +79,20 @@
    28.4      
    28.5      <input type="radio" name = "whatev"
    28.6  
    28.7 -	value="40 cards @125.00"   CHECKED
    28.8 +	value="30 cards @99.00"   CHECKED
    28.9  	onclick = "ReadForm (this.form, false);"
   28.10  	onload = "ReadForm (this.form, false);" >
   28.11 -	40 cards &mdash; $125
   28.12 +	30 cards &mdash; $99
   28.13  	
   28.14  	<br>
   28.15  	
   28.16      
   28.17      <input type="radio" name = "whatev"
   28.18  
   28.19 -	value="4 cards @30.00"   
   28.20 +	value="4 cards @29.00"   
   28.21  	onclick = "ReadForm (this.form, false);"
   28.22  	onload = "ReadForm (this.form, false);" >
   28.23 -	4 cards &mdash; $30
   28.24 +	4 cards &mdash; $29
   28.25  	
   28.26  	<br>
   28.27  	
   28.28 @@ -159,7 +159,7 @@
   28.29  
   28.30  <br>
   28.31  Total Cost:&nbsp; &nbsp;
   28.32 -<input class="nbor" type="text" name="tot" size="8" value="$125.00">
   28.33 +<input class="nbor" type="text" name="tot" size="8" value="$99.00">
   28.34  <br>(Free Shipping)
   28.35  <br><br>            
   28.36  <input name="accept" type="checkbox" value="0"><br>
    29.1 --- a/paypal/lines_acrylic_clear.paylist	Mon Feb 01 02:54:59 2010 -0500
    29.2 +++ b/paypal/lines_acrylic_clear.paylist	Wed Feb 03 03:14:09 2010 -0500
    29.3 @@ -79,20 +79,20 @@
    29.4      
    29.5      <input type="radio" name = "whatev"
    29.6  
    29.7 -	value="40 cards @125.00"   CHECKED
    29.8 +	value="30 cards @99.00"   CHECKED
    29.9  	onclick = "ReadForm (this.form, false);"
   29.10  	onload = "ReadForm (this.form, false);" >
   29.11 -	40 cards &mdash; $125
   29.12 +	30 cards &mdash; $99
   29.13  	
   29.14  	<br>
   29.15  	
   29.16      
   29.17      <input type="radio" name = "whatev"
   29.18  
   29.19 -	value="4 cards @30.00"   
   29.20 +	value="4 cards @29.00"   
   29.21  	onclick = "ReadForm (this.form, false);"
   29.22  	onload = "ReadForm (this.form, false);" >
   29.23 -	4 cards &mdash; $30
   29.24 +	4 cards &mdash; $29
   29.25  	
   29.26  	<br>
   29.27  	
   29.28 @@ -159,7 +159,7 @@
   29.29  
   29.30  <br>
   29.31  Total Cost:&nbsp; &nbsp;
   29.32 -<input class="nbor" type="text" name="tot" size="8" value="$125.00">
   29.33 +<input class="nbor" type="text" name="tot" size="8" value="$99.00">
   29.34  <br>(Free Shipping)
   29.35  <br><br>            
   29.36  <input name="accept" type="checkbox" value="0"><br>
    30.1 --- a/paypal/make.pl	Mon Feb 01 02:54:59 2010 -0500
    30.2 +++ b/paypal/make.pl	Wed Feb 03 03:14:09 2010 -0500
    30.3 @@ -15,9 +15,9 @@
    30.4  FIELDS      => ["Name", "Email"],
    30.5  DEFAULTS      => ['PERL::NAME','PERL::EMAIL'],
    30.6  
    30.7 -COSTS_NAMES   => ['40 cards &mdash; $125', '4 cards &mdash; $30'],
    30.8 -COSTS_CODE    => ['40 cards @125.00', '4 cards @30.00'],
    30.9 -INITIAL_PRICE => '$125.00',
   30.10 +COSTS_NAMES   => ['30 cards &mdash; $99', '4 cards &mdash; $29'],
   30.11 +COSTS_CODE    => ['30 cards @99.00', '4 cards @29.00'],
   30.12 +INITIAL_PRICE => '$99.00',
   30.13  
   30.14  ADD_PENNY       => 0,
   30.15  );
   30.16 @@ -36,9 +36,10 @@
   30.17  FIELDS      => ["Name", "Company","Occupation","Email"],
   30.18  DEFAULTS      => ['PERL::NAME','PERL::COMPANY','PERL::OCCUPATION','PERL::EMAIL'],
   30.19  
   30.20 -COSTS_NAMES   => ['40 cards &mdash; $125', '4 cards &mdash; $30'],
   30.21 -COSTS_CODE    => ['40 cards @125.00', '4 cards @30.00'],
   30.22 -INITIAL_PRICE => '$125.00',
   30.23 +COSTS_NAMES   => ['30 cards &mdash; $99', '4 cards &mdash; $29'],
   30.24 +COSTS_CODE    => ['30 cards @99.00', '4 cards @29.00'],
   30.25 +INITIAL_PRICE => '$99.00',
   30.26 +
   30.27  
   30.28  ADD_PENNY       => 1,
   30.29  );
   30.30 @@ -58,9 +59,10 @@
   30.31  FIELDS      => ["Email", "Phone","Name","Company","Occupation","Website"],
   30.32  DEFAULTS      => ['PERL::EMAIL','PERL::PHONE','PERL::NAME','PERL::COMPANY','PERL::OCCUPATION','PERL::WEBSITE'],
   30.33  
   30.34 -COSTS_NAMES   => ['40 cards &mdash; $125', '4 cards &mdash; $30'],
   30.35 -COSTS_CODE    => ['40 cards @125.00', '4 cards @30.00'],
   30.36 -INITIAL_PRICE => '$125.00',
   30.37 +COSTS_NAMES   => ['30 cards &mdash; $99', '4 cards &mdash; $29'],
   30.38 +COSTS_CODE    => ['30 cards @99.00', '4 cards @29.00'],
   30.39 +INITIAL_PRICE => '$99.00',
   30.40 +
   30.41  
   30.42  ADD_PENNY       => 0,
   30.43  );
   30.44 @@ -81,9 +83,10 @@
   30.45  FIELDS      => ["Name", "Occupation","Company","Phone","Email","Website"],
   30.46  DEFAULTS      => ['PERL::NAME','PERL::OCCUPATION','PERL::COMPANY','PERL::PHONE','PERL::EMAIL','PERL::WEBSITE'],
   30.47  
   30.48 -COSTS_NAMES   => ['40 cards &mdash; $125', '4 cards &mdash; $30'],
   30.49 -COSTS_CODE    => ['40 cards @125.00', '4 cards @30.00'],
   30.50 -INITIAL_PRICE => '$125.00',
   30.51 +COSTS_NAMES   => ['30 cards &mdash; $99', '4 cards &mdash; $29'],
   30.52 +COSTS_CODE    => ['30 cards @99.00', '4 cards @29.00'],
   30.53 +INITIAL_PRICE => '$99.00',
   30.54 +
   30.55  
   30.56  ADD_PENNY       => 0,
   30.57  );
    31.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.2 +++ b/testjson.txt	Wed Feb 03 03:14:09 2010 -0500
    31.3 @@ -0,0 +1,18 @@
    31.4 +
    31.5 +
    31.6 +{
    31.7 +
    31.8 +"unique_name":
    31.9 +	
   31.10 +	{
   31.11 +	"style" : "bold",
   31.12 +	"Name"	: "Robert McIntyre",
   31.13 +	"Email"	: "rlm@mit.edu",
   31.14 +	},
   31.15 +	
   31.16 +}
   31.17 +	
   31.18 +
   31.19 +
   31.20 +
   31.21 +
    32.1 --- a/top_menu.include	Mon Feb 01 02:54:59 2010 -0500
    32.2 +++ b/top_menu.include	Wed Feb 03 03:14:09 2010 -0500
    32.3 @@ -11,9 +11,9 @@
    32.4  
    32.5  		
    32.6  
    32.7 -		<li><a href="./faq.php" id = "faq" onmouseover="document.but.src='images/bl_sm.jpg'">faq</a></li>
    32.8 +		<li><a href="./faq.php" id = "faq" onmouseover="document.but.src='images/pr_sm.jpg'">faq</a></li>
    32.9  
   32.10 -		<li><a href="./contact.php" id = "contact" onmouseover="document.but.src='images/or_sm.jpg'">Contact</a></li>
   32.11 +		<li><a href="./contact.php" id = "contact" onmouseover="document.but.src='images/cy_sm.jpg'">Contact</a></li>
   32.12  	</ul>
   32.13  </div>
   32.14  </div>