+
+
+HERE
+
+
+%shankHash =
+(
+
+big => template2,
+basic => template3,
+classic => template1,
+lines => template4
+);
+
+$target = $shankHash{$style};
+
+
+
+
+#$r =~ s/inputbox\(\['$target'\], \['inputbox'\]\)\;//;
+
+
+
+
+
+return $r;
+}
+
+
+
+
+sub inputbox
+{
+
+#grab the type of template we'll be using <<<<
+ $type = shift;
+
+ $hashString = shift;
+ #return $hashString;
+
+ $perl_hash = decode_json $hashString;
+
+ %fieldHash = %$perl_hash;
+
+
+# we have to care about both the type of template and the material and the color. these are stored in $type>>>>
+
+#Then, update with a special custon paypal form, taken from the paypal folder and specially designed for that particular template.
+#will probaly eventually create a script to automate the generation of these files.
+
+
+#take care of everythign but acrylic clear type
+
+ {
+ local( $/, *FH ) ;
+ open( FH, "<./paypal/$type.paylist" ) or die "sudden flaming death\n";
+ $z = ;
+ }
+
+
+#every type has it's own associated paylist file the contains the things we need
+
+$z = <
+HERE
+
+
+
+
+$z = $z.'';
+
+
+foreach my $key ( keys %fieldHash )
+{
+
+my $replace = $fieldHash{$key};
+
+#id="Name" value = "PERL::NAME"
+
+
+$z =~ s/id="$key"/id="$key" value = "$replace"/g;
+
+
+}
+
+
+return $z;
+
+
+
+
+
+}
+
+
+
+
+sub display
+{
+ $all = shift;
+
+
+ #~
+ #~ $t = <
+ #~
+ #~
-
-HERE
-
-
-%shankHash =
-(
-
-big => template2,
-basic => template3,
-classic => template1,
-lines => template4
-);
-
-$target = $shankHash{$style};
-
-
-
-
-#$r =~ s/inputbox\(\['$target'\], \['inputbox'\]\)\;//;
-
-
-
-
-
-return $r;
-}
-
-
-
-
-sub inputbox
-{
-
-#grab the type of template we'll be using <<<<
- $type = shift;
-
- $hashString = shift;
- #return $hashString;
-
- $perl_hash = decode_json $hashString;
-
- %fieldHash = %$perl_hash;
-
-
-# we have to care about both the type of template and the material and the color. these are stored in $type>>>>
-
-#Then, update with a special custon paypal form, taken from the paypal folder and specially designed for that particular template.
-#will probaly eventually create a script to automate the generation of these files.
-
-
-#take care of everythign but acrylic clear type
-
- {
- local( $/, *FH ) ;
- open( FH, "<./paypal/$type.paylist" ) or die "sudden flaming death\n";
- $z = ;
- }
-
-
-#every type has it's own associated paylist file the contains the things we need
-
-$z = <
-HERE
-
-
-
-
-$z = $z.'';
-
-
-foreach my $key ( keys %fieldHash )
-{
-
-my $replace = $fieldHash{$key};
-
-#id="Name" value = "PERL::NAME"
-
-
-$z =~ s/id="$key"/id="$key" value = "$replace"/g;
-
-
-}
-
-
-return $z;
-
-
-
-
-
-}
-
-
-
-
-sub display
-{
- $all = shift;
-
-
- #~
- #~ $t = <
- #~
- #~
-
-HERE
-
- return $t;
-
-}
-
-
-
-
-sub gen
-{
- {
- local( $/, *FH ) ;
- open( FH, "<./buy.html" ) or die "sudden flaming death\n";
- $a = ;
- }
-
- {
- local( $/, *FH ) ;
- open( FH, "<./top_menu.include" ) or die "sudden flaming death\n";
- $b = ;
- }
-
- {
- local( $/, *FH ) ;
- open( FH, "<./cardDefinitions.JSON" ) or die "sudden flaming death\n";
- $c = ;
- }
-
-$a =~s/PERL::DEFS/$c/;
-
-
-
-$a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to , but in perl and with more memory problems :)
-$b = &material("void_acrylic_clear",1);
-$a =~ s/PERL-REPLACE::MATERIALS/$b/; #let's do it again!!! :)
-
-
-
-$b = "big_acrylic_clear";
-$a =~ s/PERL::INITIALCARD/$b/;
-$b = &template("big_acrylic_clear");
-$a =~ s/PERL-REPLACE::TEMPLATES/$b/;
-
-$b = &display("big_acrylic_clear");
-$a =~ s/PERL-REPLACE::DISPLAY/$b/;
-
-$initials = <The Classic LaserKard.
-Balanced and Complete. The original LaserKard. For those that wish to leave no stone unturned. It's all there.
-HERE
-
-$bold = <The Bold Kard.
-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.
-HERE
-
-$arrow = <The Arrow Kard.
-Precise and Straightforward. For those that seek to make a statement while being clear and concise. Straight as an arrow.
-HERE
-
-$direct = <The Direct Kard.
-Thorough and Distinct. For those that aim to demonstrate their professionalism with style. Push the envelope. Be Direct.
-HERE
-
-
-
-my %megahash =
-(
-
-'big' => $bold,
-
-'basic' => $arrow,
-
-'lines' => $direct,
-
-'classic' => $classic,
-
-'big_acrylic_clear' => $bold,
-
-'classic_acrylic_clear' => $classic,
-
-'basic_acrylic_clear' => $arrow,
-
-'lines_acrylic_clear' => $direct
-);
-
-
-
-my $key = shift;
-
-
-if (!$megahash{$key}){return $key;}
-
-return $megahash{$key};
-
-
-
-
-}
-
-
-
-
-
-
-
-
-# this here function makes the paypal button go away so people know it's working!
-sub vanish
-{
-return "";
-
-
-}
-
+# it's a refrence to a function, not a function itself.
diff -r 1b5417799713 -r 95fa4bcc5d67 cardOrders/RobertMcIntyre.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cardOrders/RobertMcIntyre.txt Wed Feb 03 03:14:09 2010 -0500
@@ -0,0 +1,57 @@
+{
+
+"bold":
+
+ {
+ "style" : "bold",
+ "number" : "7",
+ "fields":
+ {
+ "Name" : "Robert McIntyre",
+ "Email" : "rlm@mit.edu",
+ },
+ },
+"arrow":
+
+ {
+ "style" : "arrow",
+ "number" : "8",
+ "fields":
+ {
+ "Name" : "Robert McIntyre",
+ "Email" : "rlm@mit.edu",
+ "Company" : "MIT",
+ "Occupation" : "Course 6 & 9",
+ },
+ },
+"classic":
+
+ {
+ "style" : "classic",
+ "number" : "7",
+ "fields":
+ {
+ "Name" : "Robert McIntyre",
+ "Email" : "rlm@mit.edu",
+ "Company" : "MIT",
+ "Occupation" : "Course 6 & 9",
+ "Phone" : "617.821.9129",
+ "Website" : "http://www.rlmcintyre.com",
+ },
+ },
+"direct":
+
+ {
+ "style" : "direct",
+ "number" : "8",
+ "fields":
+ {
+ "Name" : "Robert McIntyre",
+ "Email" : "rlm@mit.edu",
+ "Company" : "MIT",
+ "Occupation" : "Course 6 & 9",
+ "Phone" : "617.821.9129",
+ "Website" : "http://www.rlmcintyre.com",
+ },
+ },
+}
diff -r 1b5417799713 -r 95fa4bcc5d67 echo.css
--- a/echo.css Mon Feb 01 02:54:59 2010 -0500
+++ b/echo.css Wed Feb 03 03:14:09 2010 -0500
@@ -6,11 +6,100 @@
div#output
{
-background-color: #585;
+/*background-color: #585;*/
}
div#disp_contain
{
-background-color: #aab;
+/*background-color: #aab;*/
}
+
+div#perlClick
+{
+position:absolute;
+
+top:240px;
+right:25px;
+
+width: 120px;
+text-align: center;
+
+background-color: #4ff; /*sky blue*/
+
+}
+
+
+div#sendTo
+{
+background-color: #000000;
+color:white;
+}
+div#i_inputbox
+{
+
+padding-left:10px;
+padding-top:10px;
+padding-right:0px;
+border-style:solid;
+border-color:#ffffff;
+border-width:1px;
+padding-bottom:10px;
+
+font: bold 22px "helvetica","arial", "sans-serif";
+color: white;
+
+float:left;
+width:520px;
+}
+
+
+div#formValues
+
+{
+color:white;
+position: absolute;
+top:30px;
+left: 15px;
+display:none;
+}
+
+div#cardDefs
+{
+color:green;
+position: absolute;
+width: 200px;
+top: 90px;
+left: 10px;
+display:none;
+}
+
+div#currentSpec
+{
+color:red;
+position: absolute;
+width: 200px;
+top: 90px;
+right: 10px;
+display:none;
+}
+
+div#output
+{
+color:#fbafcd;
+position: absolute;
+width: 200px;
+top: 130px;
+right: 10px;
+/*display:none;*/
+}
+div#perlClick
+{
+color:red;
+position: absolute;
+width: 200px;
+top: 90px;
+right: 10px;
+display:none;
+}
+
diff -r 1b5417799713 -r 95fa4bcc5d67 echo.html
--- a/echo.html Mon Feb 01 02:54:59 2010 -0500
+++ b/echo.html Wed Feb 03 03:14:09 2010 -0500
@@ -3,15 +3,15 @@
-
+
+
-
-Laserkard | Design Studio
+Laserkard | Echo
-
-
+
+
@@ -21,39 +21,201 @@
-
+
-
+PERL-REPLACE::TOP_MENU
+
+
+
+
+
+
+
PERL-REPLACE::DISPLAY
+
+
+
PERL-REPLACE::POKEDEX
+
+
+
+
+Fill In your email:
+
+
+
+
+
+
+ ^-- Click here to send SVG file to yourself.
+ (don't click multiple times)
+
+
+
+________________________________________
+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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
PERL-REPLACE::MATERIALS
+
+
+
+
+
+
PERL::INITIALVALUES
+
+
PERL::INITIALCARD
+
+
PERL::DEFS
+
+
OUTPUT
+
+
+
+
+
+
Send this shiz!
+
+
+
+
@@ -61,9 +223,6 @@
-
-
-
diff -r 1b5417799713 -r 95fa4bcc5d67 echo.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/echo.js Wed Feb 03 03:14:09 2010 -0500
@@ -0,0 +1,1 @@
+
diff -r 1b5417799713 -r 95fa4bcc5d67 echo.pl
--- a/echo.pl Mon Feb 01 02:54:59 2010 -0500
+++ b/echo.pl Wed Feb 03 03:14:09 2010 -0500
@@ -14,6 +14,8 @@
$Data::Dumper::Indent = 1;
use Storable;
use SVG;
+use Laserkard;
+
my $q = new CGI;
@@ -21,6 +23,14 @@
my %hash =
(
+'material' => \&Laserkard::material,
+'template' => \&Laserkard::template,
+'inputbox' => \&Laserkard::inputbox,
+'display' => \&Laserkard::display,
+'change_rules' => \&Laserkard::change_rules,
+'vanish' => \&Laserkard::vanish,
+'updateForm' => \&Laserkard::updateForm,
+'cardType' => \&Laserkard::cardType,
'echo' => \&echo
);
@@ -36,21 +46,13 @@
sub gen
{
- {
- local( $/, *FH ) ;
- open( FH, "<./echo.html" ) or die "sudden flaming death\n";
- $a = ;
- }
- {
- local( $/, *FH ) ;
- open( FH, "<./top_menu.include" ) or die "sudden flaming death\n";
- $b = ;
- }
-$a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to , but in perl and with more memory problems :)
+
+$a = Laserkard::genEcho();
+
@@ -64,26 +66,48 @@
sub echo
{
-
-my $svg = $_[0];
-
-my $destination = 'rlm@mit.edu';
-
-
-
-
-$svg = &impose($svg);
-
-
-
-&mail($svg, $destination);
+my $svg = shift;
+#my $destination = 'rlm@mit.edu';
-return "done.";
+
+
+
+
+
+
+my @cards = split (/S3ntinEL/, $svg);
+my $emmmm = shift;
+#return $emmmm;
+
+$cardsPerMail = 30;
+##### ok, now we have this awesome array with all the cards we need to print.
+# the numbers are right, so now we really just have to impose them.
+for $mails(0..int(($#cards) / $cardsPerMail))
+{
+
+
+my $start = $mails * $cardsPerMail;
+
+my $end = ($#cards >($start + $cardsPerMail)) ? ($start + $cardsPerMail) : $#cards;
+
+$svg = &impose(@cards[$start..$end]);
+#$svg = &impose($cards[$end]);
+
+&mail($svg, $emmmm);
+}
+
+
+
+return "done";
+
+return $svg;
+
+
}
@@ -96,16 +120,84 @@
#out purpose here is to take that one card, size it correctly, and make appropiate copies
#so that our supplier can simply import the file and print.
-$sss = $_[0];
-$sss =~ s/^/\n\n\n/;
-$sss =~ s/$/\n\n\n/;
+my $xml = new XML::Simple;
+my @cards = @_;
+
+
+for (0..$#cards)
+{
+
+$cards[$_] =~ s/^/\n\n\n/;
+$cards[$_] =~ s/$/\n\n\n/;
# you fucking bitch!
-$sss =~ s/Created wit........//;
-
+$cards[$_] =~ s/Created wit........//;
+}
# read XML file
-my $xml = new XML::Simple;
-my $data = $xml->XMLin($sss, ForceArray => 1);
+
+
+
+
+#print Dumper(%juzz);
+
+
+my $svg= SVG->new(width=>"18in",height=>"14in");
+
+#print Dumper($juzz{'path'}[2]);
+#print "\n***************************\n";
+#print Dumper($pathData);
+
+
+
+
+my $base = "scale(0.6057),matrix(1 0 0 -1 0 317), rotate(180),translate(-514,-317)";
+
+
+my @cardCollection;
+
+for $name(0..$#cards) #22 letters for 22 cards
+{
+
+ #calcuate the thing's place in the grid:
+
+ $cardsToARow = 5;
+ $cardsToAColumn = 5;
+
+ my $row = int($name/$cardsToARow); # cards to a row
+ my $column = int($name % $cardsToAColumn);
+
+ $margin = 25;
+ $cardWidth = 514*0.6057;
+ $cardHeight = 317*0.6057;
+
+
+ $transX = 40 + ($margin + $cardWidth ) * $column;
+ $transY = 40 + ($margin + $cardHeight) * $row;
+
+
+
+ ${"group_".$name} =
+ $svg->group(
+ id => "group_".$name,
+ transform => "translate($transX,$transY),"."$base"
+ );
+
+ push @cardCollection, ${"group_".$name};
+}
+
+
+
+
+
+
+
+
+
+for ($i = 0; $i <= $#cardCollection; $i++)
+{
+
+
+my $data = $xml->XMLin($cards[$i], ForceArray => 1);
my %data = %$data;
@@ -123,65 +215,6 @@
);
-
-
-#print Dumper(%juzz);
-
-
-my $svg= SVG->new(width=>"18in",height=>"12in");
-
-#print Dumper($juzz{'path'}[2]);
-#print "\n***************************\n";
-#print Dumper($pathData);
-
-
-
-
-my $base = "scale(0.6057),matrix(1 0 0 -1 0 317), rotate(180),translate(-514,-317)";
-
-
-my @cardCollection;
-
-for $name(0..21) #22 letters for 22 cards
-{
-
- #calcuate the thing's place in the grid:
-
- $cardsToARow = 5;
- $cardsToAColumn = 5;
-
- my $row = int($name/$cardsToARow); # cards to a row
- my $column = int($name % $cardsToAColumn);
-
- $margin = 25;
- $cardWidth = 514*0.6057;
- $cardHeight = 317*0.6057;
-
-
- $transX = 40 + ($margin + $cardWidth ) * $column;
- $transY = 40 + ($margin + $cardHeight) * $row;
-
-
-
- ${"group_".$name} =
- $svg->group(
- id => "group_".$name,
- transform => "translate($transX,$transY),"."$base"
- );
-
- push @cardCollection, ${"group_".$name};
-}
-
-
-
-
-
-
-
-
-for ($i = 0; $i <= $#cardCollection; $i++)
-{
-
for $pathData(@{$juzz{'path'}})
{
$cardCollection[$i]->tag('path', %{$pathData});
@@ -319,12 +352,7 @@
$attach1
-$boundary
-Content-Type: application/octet-stream; name="huh.txt"
-Content-Transfer-Encoding: base64
-Content-Disposition: attachment; filename="huh.txt"
-$attach2
$boundary--
END_OF_BODY
diff -r 1b5417799713 -r 95fa4bcc5d67 images/LaserKard Home Image - blue.eps
Binary file images/LaserKard Home Image - blue.eps has changed
diff -r 1b5417799713 -r 95fa4bcc5d67 images/LaserKard Home Image - cyan.eps
Binary file images/LaserKard Home Image - cyan.eps has changed
diff -r 1b5417799713 -r 95fa4bcc5d67 images/LaserKard Home Image - green.eps
Binary file images/LaserKard Home Image - green.eps has changed
diff -r 1b5417799713 -r 95fa4bcc5d67 images/LaserKard Home Image - orange.eps
Binary file images/LaserKard Home Image - orange.eps has changed
diff -r 1b5417799713 -r 95fa4bcc5d67 images/LaserKard Home Image - purple.eps
Binary file images/LaserKard Home Image - purple.eps has changed
diff -r 1b5417799713 -r 95fa4bcc5d67 images/bl_sm.jpg
Binary file images/bl_sm.jpg has changed
diff -r 1b5417799713 -r 95fa4bcc5d67 images/cy_sm.jpg
Binary file images/cy_sm.jpg has changed
diff -r 1b5417799713 -r 95fa4bcc5d67 images/gr_sm.jpg
Binary file images/gr_sm.jpg has changed
diff -r 1b5417799713 -r 95fa4bcc5d67 images/olbl_sm.jpg
Binary file images/olbl_sm.jpg has changed
diff -r 1b5417799713 -r 95fa4bcc5d67 images/olgr_sm.jpg
Binary file images/olgr_sm.jpg has changed
diff -r 1b5417799713 -r 95fa4bcc5d67 images/olor_sm.jpg
Binary file images/olor_sm.jpg has changed
diff -r 1b5417799713 -r 95fa4bcc5d67 images/or_sm.jpg
Binary file images/or_sm.jpg has changed
diff -r 1b5417799713 -r 95fa4bcc5d67 images/pr_sm.jpg
Binary file images/pr_sm.jpg has changed
diff -r 1b5417799713 -r 95fa4bcc5d67 index.php
--- a/index.php Mon Feb 01 02:54:59 2010 -0500
+++ b/index.php Wed Feb 03 03:14:09 2010 -0500
@@ -19,7 +19,7 @@
-
+
diff -r 1b5417799713 -r 95fa4bcc5d67 log/error_log.log
--- a/log/error_log.log Mon Feb 01 02:54:59 2010 -0500
+++ b/log/error_log.log Wed Feb 03 03:14:09 2010 -0500
@@ -357,3 +357,63 @@
[Mon Feb 01 01:34:50 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
[Mon Feb 01 02:25:11 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
[Mon Feb 01 02:25:18 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
+[Mon Feb 01 09:56:05 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
+[Mon Feb 01 09:56:08 2010] [error] [client 18.236.1.40] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
+[Mon Feb 01 12:17:52 2010] [error] [client 18.111.53.219] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
+[Mon Feb 01 12:17:55 2010] [error] [client 18.111.53.219] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
+[Mon Feb 01 16:23:29 2010] [error] [client 18.238.1.90] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
+[Mon Feb 01 16:23:33 2010] [error] [client 18.238.1.90] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
+[Mon Feb 01 17:12:24 2010] [error] [client 18.238.1.90] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
+[Mon Feb 01 17:12:27 2010] [error] [client 18.238.1.90] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
+[Mon Feb 01 17:12:27 2010] [error] [client 18.238.1.90] File does not exist: /home/rlm/Desktop/web/laserkard/favicon.ico
+[Mon Feb 01 19:58:24 2010] [error] [client 18.238.1.90] malformed header from script. Bad header=