From adfb2d2afab2b017db7006fcb7808d66aa2ef411 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Mon, 28 Aug 2017 10:35:37 +0000
Subject: [PATCH] Fixes for PHP 7.0 compatibility

---
 borrow_history.php |   39 ++-------------------------------------
 1 files changed, 2 insertions(+), 37 deletions(-)

diff --git a/borrow_history.php b/borrow_history.php
index 3913c10..caa8f34 100644
--- a/borrow_history.php
+++ b/borrow_history.php
@@ -6,43 +6,8 @@
 $title = 'Historia wypożyczeń książki';
 include('./design/top.php');
 
-$nastrone = 5;
-
-if(ctype_digit($_GET['strona'])) {
-	$strona = $nastrone*($strona-1);
-}
-else
-{
-	$strona = 0;
-}
-
 gotowe::informacje($_GET['kod']);
-
-$num = db2::num('pozycz', '*', array('id' => $_GET['kod']));
-$dane = db2::get('pozycz', '*', array('id' => $_GET['kod']), array('do' => 'DESC'), $strona, $nastrone);
-
-echo '
-
-<table id="bhist">
-<tr> <th>Pożyczający</th> <th>Od</th> <th>Do</th> </tr>
-';
-
-foreach($dane as $o) {
-	echo '<tr> <td>'.$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 '</table>
-
-<p>';
-
-for($i=0; $i<$num; $i+=$nastrone) {
-	$str = ($i/$nastrone)+1;
-	if($i>=$strona && $i<$strona+$nastrone)
-		echo '<b> [ '.$str.' ] </b> ';
-	else
-		echo '<a href="borrow_history.php?kod='.$_GET['kod'].'&amp;strona='.$str.'"> [ '.$str.' ] </a> ';
-}
-
+gotowe::historia($_GET['kod']);
 
 include('./design/bottom.php');
-?>
+?>
\ No newline at end of file

--
Gitblit v1.9.1