View gist:d800debea4536b957c069e290d45fe91
/ mock data | |
$__categories = array(1 => new Category(1, "Mobile & Wireless Computing"), | |
2 => new Category(2, "Functional Programming"), | |
3 => new Category(3, "C / C++"), | |
4 => new Category(4, "<< New Publications >>")); | |
$__books = array(1 => new Book(1, 1, "Hello, Android:\nIntroducing Google's Mobile Development Platform", "Ed Burnette", 19.97), | |
2 => new Book(2, 1, "Android Wireless Application Development", "Shane Conder, Lauren Darcey", 31.22), | |
5 => new Book(5, 1, "Professional Flash Mobile Development", "Richard Wagner", 19.90), |
View gist:2161ab2dfac71d7d9a59af6bbc2b472e
<table class="table"> | |
<thead> | |
<tr> | |
<th> | |
Title | |
</th> | |
<th> | |
Author | |
</th> | |
<th> |
View Page.config.t3s
config { | |
debug = 1 | |
doctype = html5 | |
htmlTag_setParams = none | |
View Util.php
<?php | |
class Util extends BaseObject { | |
/** | |
* bereinigt den output | |
* | |
* @param string $string der string | |
* @return string | |
*/ | |
public static function escape($string) { |
View gist:3d450f195cf2c2c1a2c5dbbe7c2e0aca
<?php | |
if (AuthenticationManager::isAuthenticated()) { | |
Util::redirect("index.php"); | |
} | |
$userName = isset($_REQUEST['userName']) ? $_REQUEST['userName'] : null; | |
?> | |
<?php | |
require_once('views/partials/header.php'); | |
?> |
View bookshop.sql
DROP DATABASE fh_scm4_bookshop; | |
CREATE DATABASE fh_scm4_bookshop; | |
USE fh_scm4_bookshop; | |
CREATE TABLE books ( | |
id int(11) NOT NULL AUTO_INCREMENT, |
View controller.php
<?php | |
/** | |
* Controller | |
* | |
* class handles POST requests and redirects | |
* the client after processing | |
* - demo of singleton pattern | |
*/ | |
class Controller extends BaseObject { |
View User.php
<?php | |
/** | |
* User | |
* | |
* | |
* @extends Entity | |
* @package | |
* @subpackage | |
* @author John Doe <jd@fbi.gov> |
View DataManager_mock.php
<?php | |
// mock data | |
$__categories = array(1 => new Category(1, "Mobile & Wireless Computing"), | |
2 => new Category(2, "Functional Programming"), | |
3 => new Category(3, "C / C++"), | |
4 => new Category(4, "<< New Publications >>")); | |
$__books = array(1 => new Book(1, 1, "Hello, Android:\nIntroducing Google's Mobile Development Platform", "Ed Burnette", 19.97), |
View checkout.php
<?php | |
$nameOnCard = isset($_REQUEST['nameOnCard']) ? $_REQUEST['nameOnCard'] : null; | |
$cardNumber = isset($_REQUEST['cardNumber']) ? $_REQUEST['cardNumber'] : null; | |
require_once('views/partials/header.php'); | |
$cartSize = ShoppingCart::size(); | |
?> | |
OlderNewer