コード例 #1
0
ファイル: index.php プロジェクト: slim/floos
<?php

require "../../lib/compte.php";
Compte::$db = new PDO('sqlite:../../floos.db');
Compte::$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
$compte = Compte::charger($_POST['compte']);
$compte->debiter($_POST['montant'], $_POST['categorie'], $_POST['libelle']);
header("Location: " . $_POST['c'], TRUE, 303);
コード例 #2
0
ファイル: index.php プロジェクト: slim/floos
<?php

require "../../lib/compte.php";
Compte::$db = new PDO('sqlite:../../floos.db');
Compte::$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
$compte = Compte::charger($_GET['compte']);
$ecritures = $compte->journal($_GET['debut'], $_GET['fin']);
$ecritures->setFetchMode(PDO::FETCH_ASSOC);
$html = <<<EOT
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Journal comptable</title>
<style type="text/css">

table, tr, td, th {
       margin: 0px;
\t   padding: 5px;
       border-width: 0px;
       border-spacing: 0px;
       border-collapse: collapse;
\t   font-style: fixed;
\t   white-space: nowrap;
}
table tr td {border: solid 1px silver;}
table tr th {border: solid 1px grey;}
#error {
\tbackground-color: yellow;
\tborder: 2px solid red;
\tpadding: 10px;
\tmargin: 10px;
}
pre {