Skip to content

Instantly share code, notes, and snippets.

View elmarputz's full-sized avatar

Elmar Putz elmarputz

  • Studio Mitte Digital Media GmbH
  • Linz, Austria
View GitHub Profile
/ 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),
<table class="table">
<thead>
<tr>
<th>
Title
</th>
<th>
Author
</th>
<th>
config {
debug = 1
doctype = html5
htmlTag_setParams = none
<?php
class Util extends BaseObject {
/**
* bereinigt den output
*
* @param string $string der string
* @return string
*/
public static function escape($string) {
<?php
if (AuthenticationManager::isAuthenticated()) {
Util::redirect("index.php");
}
$userName = isset($_REQUEST['userName']) ? $_REQUEST['userName'] : null;
?>
<?php
require_once('views/partials/header.php');
?>
@elmarputz
elmarputz / bookshop.sql
Created December 16, 2016 08:33
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,
@elmarputz
elmarputz / controller.php
Created December 16, 2016 08:41
Controller.php
<?php
/**
* Controller
*
* class handles POST requests and redirects
* the client after processing
* - demo of singleton pattern
*/
class Controller extends BaseObject {
@elmarputz
elmarputz / User.php
Created December 16, 2016 08:50
User.php
<?php
/**
* User
*
*
* @extends Entity
* @package
* @subpackage
* @author John Doe <jd@fbi.gov>
@elmarputz
elmarputz / DataManager_mock.php
Created December 16, 2016 08:51
DataManager.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),
@elmarputz
elmarputz / checkout.php
Created December 16, 2016 09:06
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();
?>