├── .htaccess ├── app.php ├── cache └── volt │ └── .gitignore ├── config ├── bootstrap.php ├── config.php ├── loader.php └── services.php ├── index.html ├── public ├── .htaccess ├── css │ └── style.css ├── favicon.ico ├── img │ ├── logo-small-sp.png │ └── phalcon-22.png └── index.php └── views ├── errors └── 404.volt ├── index ├── cancel.volt ├── index.volt └── thanks.volt └── layouts └── main.volt /.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine on 3 | RewriteRule ^$ public/ [L] 4 | RewriteRule (.*) public/$1 [L] 5 | -------------------------------------------------------------------------------- /app.php: -------------------------------------------------------------------------------- 1 | get('/', function () use ($app) { 7 | echo $app->render('index/index'); 8 | }); 9 | 10 | /** 11 | * Add your routes here 12 | */ 13 | $app->get('/thanks', function () use ($app) { 14 | echo $app->render('index/thanks'); 15 | }); 16 | 17 | /** 18 | * Add your routes here 19 | */ 20 | $app->get('/success', function () use ($app) { 21 | echo $app->render('index/thanks'); 22 | }); 23 | 24 | /** 25 | * Add your routes here 26 | */ 27 | $app->get('/cancel', function () use ($app) { 28 | echo $app->render('index/cancel'); 29 | }); 30 | 31 | /** 32 | * Not found handler 33 | */ 34 | $app->notFound(function () use ($app) { 35 | $app->response->setStatusCode(404, "Not Found")->sendHeaders(); 36 | echo $app->render('errors/404'); 37 | }); 38 | -------------------------------------------------------------------------------- /cache/volt/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore -------------------------------------------------------------------------------- /config/bootstrap.php: -------------------------------------------------------------------------------- 1 | setDI($di); 12 | } 13 | 14 | public function render($path, $params=null) 15 | { 16 | 17 | $config = function($view) { 18 | $view->setRenderLevel(View::LEVEL_ACTION_VIEW); 19 | }; 20 | 21 | $paths = explode('/', $path, 2); 22 | if (isset($paths[1])) { 23 | return $this['view']->getRender($paths[0], $paths[1], $params, $config); 24 | } else { 25 | return $this['view']->getRender($paths[0], 'index', $params, $config); 26 | } 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /config/config.php: -------------------------------------------------------------------------------- 1 | array( 5 | 'modelsDir' => __DIR__ . '/../models/', 6 | 'viewsDir' => __DIR__ . '/../views/', 7 | 'baseUri' => '/store/', 8 | ) 9 | )); 10 | 11 | -------------------------------------------------------------------------------- /config/loader.php: -------------------------------------------------------------------------------- 1 | registerDirs( 9 | array( 10 | $config->application->modelsDir 11 | ) 12 | )->register(); -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | setViewsDir($config->application->viewsDir); 18 | 19 | $view->registerEngines(array( 20 | '.volt' => function($view, $di) use ($config) { 21 | $volt = new Volt($view, $di); 22 | $volt->setOptions( 23 | array( 24 | 'compiledPath' => __DIR__ . '/../cache/volt/', 25 | 'compiledExtension' => '.php', 26 | 'compiledSeparator' => '_', 27 | //'compileAlways' => true 28 | ) 29 | ); 30 | return $volt; 31 | } 32 | )); 33 | 34 | return $view; 35 | }; 36 | 37 | /** 38 | * The URL component is used to generate all kind of urls in the application 39 | */ 40 | $di['url'] = function() use ($config) { 41 | $url = new UrlResolver(); 42 | $url->setBaseUri($config->application->baseUri); 43 | return $url; 44 | }; 45 | 46 | /** 47 | * Database connection is created based in the parameters defined in the configuration file 48 | */ 49 | $di['db'] = function() use ($config) { 50 | return new DbAdapter(array( 51 | "host" => $config->database->host, 52 | "username" => $config->database->username, 53 | "password" => $config->database->password, 54 | "dbname" => $config->database->dbname 55 | )); 56 | }; 57 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 |

Mod-Rewrite is not enabled

Please enable rewrite module on your web server to continue -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | AddDefaultCharset UTF-8 2 | 3 | 4 | RewriteEngine On 5 | RewriteCond %{REQUEST_FILENAME} !-f 6 | RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L] 7 | -------------------------------------------------------------------------------- /public/css/style.css: -------------------------------------------------------------------------------- 1 | 2 | h1 { 3 | margin-top: 50px; 4 | font-size: 48px; 5 | } 6 | 7 | div.product-container { 8 | width: 600px; 9 | padding: 20px; 10 | margin: 30px; 11 | margin-top: 20px; 12 | padding-top: 10px; 13 | } 14 | 15 | img.img-sticker { 16 | width: 300px; 17 | padding: 20px; 18 | height: 300px; 19 | background: #fff; 20 | border: 1px solid #ababab; 21 | float: left; 22 | -moz-box-shadow: 2px 2px 5px #dadada; 23 | -webkit-box-shadow: 2px 2px 5px #dadada; 24 | box-shadow: 2px 2px 5px #dadada; 25 | } 26 | 27 | div.sell-tip { 28 | background: #fafafa; 29 | border: 1px solid #ababab; 30 | width: 670px; 31 | color: #363435; 32 | text-shadow: #dadada 0.1em 0.1em 0.1em; 33 | border-radius: 10px; 34 | padding: 20px; 35 | font-size: 18px; 36 | padding-top: 25px; 37 | padding-bottom: 17px; 38 | padding-right: 30px; 39 | padding-left: 0px; 40 | height: 200px; 41 | } 42 | 43 | div.sell-tip span.d { 44 | font-weight: bold; 45 | font-size: 19px; 46 | } 47 | 48 | div.sell-tip span.info { 49 | font-size: 12px; 50 | } 51 | 52 | .btn-success { 53 | margin: 10px; 54 | background: #58A400; 55 | width: 250px; 56 | font-size: 20px; 57 | margin-left: 10px; 58 | text-transform: uppercase; 59 | } 60 | 61 | .btn-success:hover { 62 | background: #58A400; 63 | } 64 | 65 | .share { 66 | margin-top: 40px; 67 | border-radius: 5px; 68 | background: #dadada; 69 | } 70 | 71 | .share td { 72 | padding: 5px; 73 | } -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phalcon-orphanage/store-deprecated/3d2829d10e9f9e48252b7a51a547447ccdd6a953/public/favicon.ico -------------------------------------------------------------------------------- /public/img/logo-small-sp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phalcon-orphanage/store-deprecated/3d2829d10e9f9e48252b7a51a547447ccdd6a953/public/img/logo-small-sp.png -------------------------------------------------------------------------------- /public/img/phalcon-22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phalcon-orphanage/store-deprecated/3d2829d10e9f9e48252b7a51a547447ccdd6a953/public/img/phalcon-22.png -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | handle(); 41 | 42 | } catch (Phalcon\Exception $e) { 43 | echo $e->getMessage(); 44 | } catch (PDOException $e){ 45 | echo $e->getMessage(); 46 | } 47 | -------------------------------------------------------------------------------- /views/errors/404.volt: -------------------------------------------------------------------------------- 1 | {% extends "layouts/main.volt" -%} 2 | 3 | {% block content %} 4 | 5 |

Not found :(

6 | 7 |

8 | This page was removed or does not exist 9 |

10 | 11 |

12 | {{ link_to('', 'Go back to Home', 'class': 'btn btn-large') }} 13 |

14 | 15 | {% endblock %} -------------------------------------------------------------------------------- /views/index/cancel.volt: -------------------------------------------------------------------------------- 1 | {% extends "layouts/main.volt" -%} 2 | 3 | {% block content %} 4 | 5 |

Boo :(

6 | 7 | Hope to see you soon! 8 | 9 |

10 | {{ link_to('', 'Go back to Home', 'class': 'btn btn-large') }} 11 |

12 | 13 | {% endblock %} -------------------------------------------------------------------------------- /views/index/index.volt: -------------------------------------------------------------------------------- 1 | {% extends "layouts/main.volt" -%} 2 | 3 | {% block content %} 4 | 5 |
6 |

Phalcon Stickers

7 | We’ve prepared some gorgeous Phalcon stickers for you! 8 |
9 | 10 |
11 | 12 | 13 | 14 | 15 |
16 |
17 | 18 |
19 |
20 | 21 |
22 |
23 | For just 5 USD + delivery costs you got a set of 24 | 5 amazing stickers! 25 |
26 | 27 |
28 | 29 | Stickers are delivered to any part of the world in just a few days. 30 | Spread the word about Phalcon by gifting stickers to your friends! 31 | 32 |
33 |
34 | 35 | 36 |
37 | 38 |
39 | 40 | 41 | 42 | 43 | 44 |
45 |
46 | 47 | 48 | 49 | 50 | {% endblock %} -------------------------------------------------------------------------------- /views/index/thanks.volt: -------------------------------------------------------------------------------- 1 | {% extends "layouts/main.volt" -%} 2 | 3 | {% block content %} 4 | 5 |

Thank you very much!

6 | 7 | Wait for your stickers in the next days! 8 | 9 |

10 | {{ link_to('', 'Go back to Home', 'class': 'btn btn-large') }} 11 |

12 | 13 | {% endblock %} -------------------------------------------------------------------------------- /views/layouts/main.volt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Phalcon PHP | High performance PHP framework 9 | 10 | 11 | {{ stylesheet_link("css/style.css") }} 12 | 13 | 14 | 15 |
16 | 17 | 36 |
37 | 38 |
39 |
40 |
41 | {% block content %} {% endblock %} 42 |
43 |
44 |
45 |
46 | 47 | 48 | --------------------------------------------------------------------------------