From f23f382afa93ca5d6a2ba8acb01de087be4cfc63 Mon Sep 17 00:00:00 2001 From: bibliotekarz Date: Sat, 20 Mar 2021 17:14:42 +0100 Subject: [PATCH] Version 1.0.0 beta --- librarycabinet.db | Bin 20480 -> 20480 bytes reader.php | 41 ++++++++++++++++++++--------------------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/librarycabinet.db b/librarycabinet.db index 4fd5d515da036e83b87e9333e9acf3ffe2fcadb7..19905fdd73b769213376afc205c7401c56374452 100644 GIT binary patch delta 218 zcmZozz}T>Wae_3X>O>i5R#gT)`0q^AC9r0{~ARGwc8W delta 141 zcmZozz}T>Wae_3X+(a2?RyhVe=ffLQ=JKoZsxgRh$FcJ7=kMe*=2zjn%{P-TmHRvI zYu+=wb9u}8V|hJzo@`bV*vG?S&(Fay`Gt)9 powyżej post


"; - +*/ class MyDB extends SQLite3 { @@ -30,7 +30,6 @@ function unit_name($db, $user_id_sanitized) $user_box = $rows['user_box']; $user_code = $rows['user_code']; if (strlen($user_code) > 0) { - // echo "Skrytka nr ".$user_box." w ". $library_name ." ". $library_address ." ".$user_code . "
"; $unit_data = array("box" => $user_box, "name" => $library_name, "address" => $library_address); array_push($unit_data_all, $unit_data); } else { @@ -62,18 +61,13 @@ function unit_name($db, $user_id_sanitized) $unit_data_all = unit_name($db, $user_id_sanitized); } - -// echo strlen($user_id_sanitized) . " strlen user_id_sanitized
"; - - //if (is_array($unit_data_all)) { - if (count($unit_data_all) > 0) { - + + if (isset($unit_data_all[0]['box'])) { // user has the book in the locker - $status = "statusoff"; - $status1 = "statuson"; + $status = "statuson"; + $status1 = "statusoff"; - echo count($unit_data_all) . " count
"; $i = 0; $user_message_all = ""; while ($i < count($unit_data_all)) { @@ -88,25 +82,30 @@ function unit_name($db, $user_id_sanitized) } $tresc = "

" . $info['box_found'] . $user_id_sanitized . "

\n
    " . $user_message_all . "
"; + + $header_info = $library_name; + } elseif (strlen($user_id_sanitized) > 5) { // user good locker no $status = "statuson"; $status1 = "statuson"; - $tresc = "

" . $info['no_user_id'] . $user_id_sanitized . "

"; - + $tresc = "

" . $info['no_user_id'] . $user_id_sanitized . "

"; + $header_info = $info['login_message']; } else { // user has not passed validation / empty / letter / fewer digits than 6 $status = "statuson"; $status1 = "statuson"; - $tresc = "

" . $info['bad_user'] . "

"; + $tresc = "

" . $info['bad_user'] . "

"; + $header_info = $info['login_message']; } } else { // no post variable - $status = "statuson"; + $status = "statusoff"; $status1 = "statuson"; $tresc = "

" . $info['start_user'] . "

"; + $header_info = $info['login_message']; } echo $page_head . "\n\t\t" . $info['title_info']; ?> @@ -114,16 +113,16 @@ function unit_name($db, $user_id_sanitized) -
-
+
+
-
+