Skip to content

Commit

Permalink
- added the other woman
Browse files Browse the repository at this point in the history
  • Loading branch information
Cupidr Live committed Feb 11, 2015
1 parent cc27b36 commit c6c0b5e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/ImageTool.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function getPasteCoords($template){
}

public function getNumchars($template){
$default = 40;
$default = 39;
$config = $this->getConfig( $template );

if( !$config || !array_key_exists("max-width", $config) ){
Expand Down
15 changes: 12 additions & 3 deletions bin/templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
"color": "#ffffff"
}
},
{
"template":"otherwoman.jpg",
"styles":{
"top":"280px",
"max-height":"190px",
"color": "#ffffff"
}
},
{
"template":"asgood.jpg",
"styles":{
Expand Down Expand Up @@ -52,15 +60,16 @@
"template":"notebook.jpg",
"styles":{
"max-height":"140px",
"top":"330px",
"top":"300px",
"color":"#ffffff"
}
},
{
"template":"officespace.jpg",
"styles":{
"max-width": "600px",
"max-height":"150px",
"top":"320px",
"top":"300px",
"color":"#ffffff"
}
},
Expand Down Expand Up @@ -97,4 +106,4 @@
"color":"#ffffff"
}
}
]
]
6 changes: 4 additions & 2 deletions web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@
$rm = new ImageTool(Config::$LOB_LIVE_KEY);
$result = $rm->sendPostcard($formData["address"]["to"], $formData["address"]["from"], $urls);

$stmt = $pdo->prepare("UPDATE card SET lob_result = :result, is_sent = true WHERE filename = :filename");
$stmt->execute(["filename" => $fname, "result" => json_encode($result)]);
if( count($result["errors"]) == 0 ){
$stmt = $pdo->prepare("UPDATE card SET lob_result = :result, is_sent = true WHERE filename = :filename");
$stmt->execute(["filename" => $fname, "result" => json_encode($result)]);
}

return $app['twig']->render("approve.html.twig", ["result" => print_r($result, true)]);
})->bind("approve");
Expand Down
Binary file added web/templates/otherwoman.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/templates/otherwoman_small.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c6c0b5e

Please sign in to comment.