From 6cba3f7a45bef8753536a47c1d282dcdcdfde68f Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Fri, 17 May 2013 15:35:03 +0000 Subject: [PATCH] Poprawki w systemie inwentaryzacji - dodanie m.in. brakującego require() --- includes/gotowe.php | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/includes/gotowe.php b/includes/gotowe.php index 5b66686..b81299c 100644 --- a/includes/gotowe.php +++ b/includes/gotowe.php @@ -112,6 +112,26 @@ return $ord; } + static function historia($kod) { + $st = PDOO::Singleton()->prepare( + 'SELECT * FROM pozycz_historia WHERE id=?'."\n" + .'UNION'."\n" + .'SELECT *, \'\' AS do FROM pozycz WHERE id=? ORDER BY od ASC' + ); + $st->execute(array($kod, $kod)); + $dane = $st->fetchAll(); + + $info = '<table id="bhist"> +<tr> <th>Pożyczający</th> <th>Od</th> <th>Do</th> </tr> +'; + + foreach($dane as $o) { + $info .= '<tr> <td>'.htmlspecialchars($o['kto']).'</td> <td>'.date('Y-m-d H:i:s', $o['od']).'</td> <td>'.($o['do'] ? date('Y-m-d H:i:s', $o['do']) : '').'</td> </tr>'."\n"; + } + + echo $info.'</table>'; + } + static function informacje($kod, $dane=NULL) { if(is_null($dane)) { $dane = ksiazki::szukaj_KOD($kod); -- Gitblit v1.9.1