From 3882025b6c83fa9dd169a7dfcba047a608c18985 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Sat, 30 Mar 2013 14:18:30 +0000
Subject: [PATCH] Moduł OPAC - wersja stworzona na podstawie głównego modułu
---
CHANGELOG | 86 ++----------
/dev/null | 17 --
index.php | 10 -
includes/gotowe.php | 131 ------------------
design/top.php | 12 -
BUILD | 7 -
includes/ksiazki.php | 98 --------------
includes/pozycz.php | 24 ---
8 files changed, 23 insertions(+), 362 deletions(-)
diff --git a/BUILD b/BUILD
index a77948d..c5b8b1f 100644
--- a/BUILD
+++ b/BUILD
@@ -3,13 +3,6 @@
REMOVEGLOB /.git/*
REMOVEDIR /.git
-REMOVE /covers/own/.emptydir
-REMOVE /covers_big/own/.emptydir
-
-REMOVE /includes/MARC21_opisy.php
-
-REMOVEGLOB /help/*
-REMOVEDIR /help
VERSION
diff --git a/CHANGELOG b/CHANGELOG
index 92301af..59cfdd1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,90 +1,34 @@
-System Biblioteczny - CHANGELOG
+System Biblioteczny - Moduł OPAC - CHANGELOG
1.4 Stable
-- Przeniesienie ustawień skryptu do osobnego pliku (includes/config.php)
-- Zmiana modułu do połączeń z MySQL z mysql na pdo_mysql
-- Rozdzielenie tabeli pozycz na dwie: pozycz i pozycz_historia
-- Wydzielenie pokazywania historii wypożyczeń do klasy gotowe
-- Zmiany w wielu miejscach w kodzie związane z tabelą pozycz
-- Poprawki w pliku test.php w związku z w/w zmianami
-- Dodanie pliku UPGRADE z instrukcją aktualizacji
-
-1.3 Stable
-- Poprawienie okładek - getimagesize() zwraca IMAGETYPE_XXX, a nie IMG_XXX
-- Zmiana add_search.php w związku z nowym sposobem wywoływania
- metod klasy ibd (przeładowanie __call)
-- Naprawienie pokazywania trafności przy wyszukiwaniu pełnotekstowym
-- Dodanie wyświetlania ISBN-10 oraz ISSN-8 dla pojedynczych woluminów
-- Zalążek interfejsu do synchronizacji danych (sync.php)
-- Zalążek system inwentaryzacji (zobacz katalog inwentaryzacja)
-- Dodanie wywołania metody db2::escape_data() przy niestandardowym
- zapytaniu w funkcji ksiazki::cache_update()
+- Wersja zbudowana na podstawie wersji 1.4 głównego modułu Systemu.
1.2 Stable
+- Dodanie wywołania metody db2::escape_data() przy dodawaniu do
+ cache'a danych przy pomocy funkcji ksiazki::cache_update()
- Dodanie wywołania metody db2::escape_data() przy niestandardowym
zapytaniu w funkcji ksiazki::szukaj_info()
-- Przebudowa systemu okładek (Bug #2)
-
-1.1 Stable
-- Modułowy system pobierania informacji ze źródeł zewnętrznych
-- Poprawka wyszukiwania po miejscu wraz z podaną półką/rzędem
-- Możliwość usuwania własnych okładek
-
-1.03 Stable
-- Poprawienie wyszukiwania po ISSN
-- Dodanie wyglądu wydruku w CSS
-- Poprawienie drobnych błędów w kodzie HTML
-- Skrypt sprawdzający spełnienie wymagań systemu - test.php
-- Poprawienie skryptów JavaScript, ktore wymagały, by system znajdował się
- w głównej scieżce serwera/vHosta (/)
1.02 Stable
-- Możliwość dodawania własnych okładek (także do książek bez ISBN) oraz
- podmieniania nimi obrazków pobranych z LibraryThing.
+- Poprawione błędne informowanie o wypożyczeniu książki spowodowane
+ złą nazwą zmiennej.
+- Okienko pop-up z powiększonymi okładkami.
+- Przystosowanie skryptu do własnych okładek.
1.01 Stable
-- Zmniejszono częstotliwość odświeżania informacji o nieistniejących
- miniaturach.
-- Poprawienie nazwy pola (`od2` na `od`) w odpowiedzi z bazy danych już przy
- cache'owaniu danych.
+- Zmniejszono częstotliwość odświeżania informacji
+ o nieistniejących miniaturach.
1.0 Stable
-- Poprawiono informowanie o stanie książki po więcej niż jednym wypożyczeniu
-- Dodano pobieranie okładek książek
-
-1.0 RC
-- Dodano możliwość zmiany nazwy półki/regału.
-- Prosta historia wypożyczeń.
-- Poprawiono błąd w formularzu wyszukiwania książek
- (po pożyczeniu/oddaniu woluminów).
-- Możliwość wyszukiwania książek bez podania półki/rzędu.
-
-0.94 Beta
-- Poprawiono informowanie o stanie książki tuż po wypożyczeniu/zwrocie.
-- Poprawienie cache'owania danych o książkach.
-
-0.93 Beta
-- Drobne zmiany wizualne (<fieldset> dla wypożyczania).
+- Poprawiono informowanie o stanie ksiazki po więcej niź jednym wypożyczeniu.
+- Poprawiono cache'owanie danych o woluminach.
+- Dodano pobieranie okładek książek.
0.92 Beta
-- Poprawiono konwersję ISBN-13 do ISBN-10. Funkcja sprawdzająca
- poczatek ISBN-13 (978) wkradła się do konwersji ISSNu.
-- Usunięto możliwość podania ISBNu w miejsce ISSNu i na odwrót przy
- dodawaniu i edycji książek.
-- Przy wyświetlaniu danych książki ISSN jest już podawany poprawnie.
+- Przy wyświetlaniu danych ksiązki ISSN jest już podawany poprawnie.
0.91 Beta
-- Poprawa błędnej jednostki w stopce (ms => s).
-- Wykrywanie brakujących rozszerzeń PHP.
-- Jeżeli wyszukiwanie nie zwraca rekordów (SELECT COUNT(*)=='0'),
- zapytanie o dane nie jest już wykonywane
-- Przy wyszukiwaniu w bazach Biblioteki Narodowej ISBN-13 nie jest
- konwertowany na ISBN-10, jeśli nie zaczyna się od 978.
-- Poprawiono błąd przy wyszukiwaniu wg. podanych informacji
- (wynik funkcji ksiazki::szukaj_info() nie był tablicą rekordów).
-- Przygotowania do utworzenia systemu automatycznego budowania
- wersji skryptów (dodawanie nagłówków do plików,
- usuwanie zbędnych plików przez system).
+- Przystosowanie do systemu budowania wersji.
0.9 Beta
- Pierwsza wersja publiczna.
diff --git a/add.php b/add.php
deleted file mode 100644
index fe493d6..0000000
--- a/add.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-$title = 'Dodawanie książki';
-include('./design/top.php');
-?>
-
-<h3> Krok 1 - podaj podstawowe informacje o egzemplarzu </h3>
-
-<table class="main">
-<tr>
-<th> Wyszukiwanie </th>
-<th> Dodawanie wg. podanych informacji </th>
-</tr>
-
-<tr>
-<td>
-
-<form action="add_isbn.php" method="post" onsubmit="return ffalse('step1')">
-<p>KOD: <input type="text" name="kod" id="step11" required="required" accesskey="1" /><br />
-IS*N: <input type="text" name="isn" id="step12" required="required" /></p>
-<p><input type="submit" value="Znajdź i zapisz" /></p>
-</form>
-
-<script type="text/javascript">
-document.getElementById('step11').focus();
-</script>
-
-</td>
-<td>
-
-<form action="add_file.php" method="post" enctype="multipart/form-data" onsubmit="return ffalse('step3')">
-<p>KOD: <input type="text" name="kod" id="step31" required="required" accesskey="3" /><br />
-Plik MARC21: <input type="file" name="marc" id="step32" required="required" /></p>
-<p><input type="submit" value="Wyślij i zapisz" /></p>
-</form>
-
-</td>
-</tr>
-<tr>
-<td>
-
-<form action="add_search.php" method="post" onsubmit="return ffalse('step2')">
-<p>KOD: <input type="text" name="kod" id="step21" required="required" accesskey="2" /><br />
-Tytuł: <input type="text" name="tytul" id="step22" required="required" /><br />
-Autor: <input type="text" name="autor" /><br />
-Wydawnictwo: <input type="text" name="wydawnictwo" /></p>
-<p><input type="submit" value="Znajdź i zapisz" /></p>
-</form>
-
-</td>
-<td rowspan="2">
-
-<form action="add_book.php" method="post" onsubmit="return ffalse('step4')" enctype="multipart/form-data">
-<p>KOD: <input type="text" name="id" id="step41" required="required" accesskey="4" /><br />
-Tytuł: <input type="text" name="tytul" id="step42" required="required" /><br />
-Autor: <input type="text" name="autor" id="step43" required="required" /><br />
-Język: <input type="text" name="jezyk" id="step44" required="required" /><br />
-Wydanie: <input type="text" name="wydanie" /></p>
-<p>Miejsce: <input type="text" name="miejsce" /><br />
-Rok: <input type="text" name="rok" /><br />
-Wydawnictwo: <input type="text" name="wydawnictwo" /></p>
-<p>ISBN: <input type="text" name="ISBN" /><br />
-ISSN: <input type="text" name="ISSN" /></p>
-<p>Okładka: <input type="file" name="okladka" /></p>
-<p><input type="submit" value="Zapisz" /></p>
-</form>
-
-</td>
-</tr>
-<tr>
-<td>
-
-<form action="add_similar.php" method="post" onsubmit="return ffalse('step5')">
-<p>KOD: <input type="text" name="kod" id="step51" required="required" accesskey="5" /><br />
-KOD podobnej książki: <input type="text" name="kod2" id="step52" required="required" /></p>
-<p><input type="submit" name="Znajdź i zapisz" value="Zapisz" /></p>
-</form>
-
-</td>
-</tr>
-</table>
-
-<?php
-include('./design/bottom.php');
-?>
diff --git a/add_book.php b/add_book.php
deleted file mode 100644
index 4a2cfc0..0000000
--- a/add_book.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-include('./includes/std.php');
-
-if($_POST['id']=='' OR empty($_POST['autor']) OR empty($_POST['tytul']) OR empty($_POST['jezyk'])) {
- error::add('Brak wymaganych danych o książce (kod, autor, tytuł, język)');
-}
-
-ksiazki::dodaj($_POST);
-
-$title = 'Dodawanie książki';
-include('./design/top.php');
-?>
-
-<h3> Książka została dodana! </h3>
-
-<p>Informacje o dodanym egzemplarzu:</p>
-
-<?php
-gotowe::informacje($_POST['id']);
-
-include('./design/bottom.php');
-?>
diff --git a/add_file.php b/add_file.php
deleted file mode 100644
index 1fa4075..0000000
--- a/add_file.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-include('./includes/std.php');
-
-validate::KOD($_POST['kod'], FALSE);
-
-if(!is_uploaded_file($_FILES['marc']['tmp_name'])) {
- error::add('Nie wysłano pliku!');
-}
-
-$szukaj = array( MARC21::to_array( MARC21::from_string( file_get_contents( $_FILES['marc']['tmp_name'] ) ) ) );
-$i = 0;
-
-$title = 'Dodawanie książki';
-include('./design/top.php');
-?>
-
-<h3> Krok 2 - wybierz żądaną książkę </h3>
-
-<?php
-gotowe::dodaj_lista($_POST['kod'], $szukaj);
-?>
-
-<?php
-include('./design/bottom.php');
-?>
diff --git a/add_isbn.php b/add_isbn.php
deleted file mode 100644
index 0b93bfa..0000000
--- a/add_isbn.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-include('./includes/std.php');
-
-validate::KOD($_POST['kod'], FALSE);
-
-$ibd = new ibd;
-
-switch( validate::type($_POST['isn']) ) {
- case 'ISBN':
- $szukaj1 = ksiazki::szukaj_ISBN($_POST['isn']);
- $szukaj2 = $ibd->szukaj_ISBN($_POST['isn']);
- break;
- case 'ISSN':
- $szukaj1 = ksiazki::szukaj_ISSN($_POST['isn']);
- $szukaj2 = $ibd->szukaj_ISSN($_POST['isn']);
- break;
-}
-
-$i = 0;
-
-$title = 'Dodawanie książki';
-include('./design/top.php');
-?>
-
-<h3> Krok 2 - wybierz żądaną książkę </h3>
-
-<?php
-gotowe::dodaj_lista($_POST['kod'], $szukaj1, $szukaj2);
-
-include('./design/bottom.php');
-?>
diff --git a/add_search.php b/add_search.php
deleted file mode 100644
index c9b80d0..0000000
--- a/add_search.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-include('./includes/std.php');
-
-validate::KOD($_POST['kod']);
-
-list(,$szukaj1) = ksiazki::szukaj_info($_POST);
-$ibd = new ibd;
-$szukaj2 = $ibd->szukaj_info($_POST['tytul'], $_POST['autor'], $_POST['wydawnictwo']);
-
-$i = 0;
-
-$title = 'Dodawanie książki';
-include('./design/top.php');
-?>
-
-<h3> Krok 2 - wybierz żądaną książkę </h3>
-
-<?php
-gotowe::dodaj_lista($_POST['kod'], $szukaj1, $szukaj2);
-?>
-
-<?php
-include('./design/bottom.php');
-?>
diff --git a/add_similar.php b/add_similar.php
deleted file mode 100644
index d0b1854..0000000
--- a/add_similar.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-include('./includes/std.php');
-
-validate::KOD($_POST['kod'], FALSE);
-
-$szukaj = ksiazki::szukaj_KOD($_POST['kod2']);
-
-$i = 0;
-
-$title = 'Dodawanie książki';
-include('./design/top.php');
-?>
-
-<h3> Krok 2 - wybierz żądaną książkę </h3>
-
-<?php
-gotowe::dodaj_lista($_POST['kod'], array($szukaj) );
-?>
-
-<?php
-include('./design/bottom.php');
-?>
diff --git a/biblioteka.sql b/biblioteka.sql
deleted file mode 100644
index c36324e..0000000
--- a/biblioteka.sql
+++ /dev/null
@@ -1,40 +0,0 @@
-CREATE TABLE `ksiazki` (
- `id` mediumint(8) unsigned NOT NULL,
- `tytul` varchar(255) COLLATE utf8_polish_ci NOT NULL,
- `autor` varchar(255) COLLATE utf8_polish_ci NOT NULL,
- `jezyk` varchar(255) COLLATE utf8_polish_ci NOT NULL,
- `rok` year(4) DEFAULT NULL,
- `miejsce` varchar(255) COLLATE utf8_polish_ci DEFAULT NULL,
- `wydawnictwo` varchar(255) COLLATE utf8_polish_ci DEFAULT NULL,
- `wydanie` varchar(255) COLLATE utf8_polish_ci DEFAULT NULL,
- `ISBN` decimal(13,0) unsigned DEFAULT NULL,
- `ISSN` decimal(13,0) unsigned DEFAULT NULL,
- `regal` char(5) COLLATE utf8_polish_ci DEFAULT NULL,
- `polka` decimal(2,0) unsigned DEFAULT NULL,
- `rzad` decimal(2,0) unsigned DEFAULT NULL,
- `wycofana` enum('0','1') CHARACTER SET ascii NOT NULL DEFAULT '0',
- `powod` varchar(255) COLLATE utf8_polish_ci DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `ISBN` (`ISBN`),
- KEY `wycofana` (`wycofana`),
- KEY `ISSN` (`ISSN`),
- FULLTEXT KEY `tytul` (`tytul`),
- FULLTEXT KEY `autor` (`autor`),
- FULLTEXT KEY `wydawnictwo` (`wydawnictwo`)
-);
-
-CREATE TABLE `pozycz` (
- `id` mediumint(8) unsigned NOT NULL,
- `kto` varchar(255) COLLATE utf8_polish_ci NOT NULL,
- `od` int(11) NOT NULL,
- PRIMARY KEY (`id`,`od`)
-);
-
-CREATE TABLE `pozycz_historia` (
- `id` mediumint(8) unsigned NOT NULL,
- `kto` varchar(255) COLLATE utf8_polish_ci NOT NULL,
- `od` int(11) NOT NULL,
- `do` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`,`od`),
- KEY `do` (`do`)
-);
diff --git a/borrow_back.php b/borrow_back.php
deleted file mode 100644
index 51c362e..0000000
--- a/borrow_back.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-include('./includes/std.php');
-
-pozycz::zwrot($_POST['kod']);
-
-$title = 'Wypożyczanie książki';
-include('./design/top.php');
-
-gotowe::informacje($_POST['kod']);
-
-echo '<form action="search.php" method="get" onsubmit="return ffalse(\'step2\')">
-<p>KOD/IS*N: <input type="text" name="id" id="step21" required="required" /></p>
-<p><input type="submit" value="Znajdź" /></p>
-
-<script type="text/javascript">
-document.getElementById(\'step21\').focus();
-</script>
-</form>';
-
-include('./design/bottom.php');
-?>
diff --git a/borrow_book.php b/borrow_book.php
deleted file mode 100644
index e48e520..0000000
--- a/borrow_book.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-include('./includes/std.php');
-
-pozycz::wypozyczenie($_POST['kod'], $_POST['kto']);
-
-$title = 'Wypożyczanie książki';
-include('./design/top.php');
-
-gotowe::informacje($_POST['kod']);
-
-echo '<form action="search.php" method="get" onsubmit="return ffalse(\'step2\')">
-<p>KOD/IS*N: <input type="text" name="id" id="step21" required="required" /></p>
-<p><input type="submit" value="Znajdź" /></p>
-
-<script type="text/javascript">
-document.getElementById(\'step21\').focus();
-</script>
-</form>';
-
-include('./design/bottom.php');
-?>
diff --git a/borrow_history.php b/borrow_history.php
deleted file mode 100644
index caa8f34..0000000
--- a/borrow_history.php
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-include('./includes/std.php');
-
-validate::KOD($_GET['kod']);
-
-$title = 'Historia wypożyczeń książki';
-include('./design/top.php');
-
-gotowe::informacje($_GET['kod']);
-gotowe::historia($_GET['kod']);
-
-include('./design/bottom.php');
-?>
\ No newline at end of file
diff --git a/covers/own/.emptydir b/covers/own/.emptydir
deleted file mode 100644
index e69de29..0000000
--- a/covers/own/.emptydir
+++ /dev/null
diff --git a/covers_big/own/.emptydir b/covers_big/own/.emptydir
deleted file mode 100644
index e69de29..0000000
--- a/covers_big/own/.emptydir
+++ /dev/null
diff --git a/del.php b/del.php
deleted file mode 100644
index 21e3e86..0000000
--- a/del.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-include('./includes/std.php');
-
-validate::KOD($_GET['kod']);
-
-$ksiazka = ksiazki::szukaj_KOD($_GET['kod']);
-
-if(empty($ksiazka)) {
- error::add('Wybrana książka nie istnieje');
-}
-
-$title = 'Usuwanie książki';
-include('./design/top.php');
-?>
-
-<h3>Czy na pewno chcesz usunąć poniższą książkę?</h3>
-
-<form action="del_book.php" method="post" onsubmit="return ffalse('step4')">
-<p>KOD: <input type="text" name="kod" id="step41" value="<?php echo $_GET['kod']; ?>" readonly="readonly" required="required" /><br />
-Tytuł: <?php echo $ksiazka['tytul']; ?><br />
-Autor: <?php echo $ksiazka['autor']; ?><br />
-Wydanie: <?php echo $ksiazka['wydanie']; ?></p>
-
-<p><?php echo $ksiazka['wydawnictwo']; ?></p>
-<p><input type="submit" value="Usuń" /></p>
-</form>
-
-<?php
-include('./design/bottom.php');
-?>
diff --git a/del_book.php b/del_book.php
deleted file mode 100644
index 1445b91..0000000
--- a/del_book.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-include('./includes/std.php');
-
-ksiazki::usun($_POST['kod']);
-
-$title = 'Usuwanie książki';
-include('./design/top.php');
-?>
-
-<h3> Książka została usunięta </h3>
-
-<?php
-include('./design/bottom.php');
-?>
diff --git a/design/top.php b/design/top.php
index 4fc12bc..17b8407 100644
--- a/design/top.php
+++ b/design/top.php
@@ -15,16 +15,8 @@
<h1> System biblioteczny </h1>
<ul id="menu">
-<li><a href="index.php">Wypożyczanie/wyszukiwanie</a></li>
-
-<li> </li>
-
-<li><a href="add.php">Dodaj książkę</a></li>
-<li><a href="place.php">Ustaw położenie</a></li>
-
-<li> </li>
-
-<li><a href="generate.php">Etykiety</a></li>
+<li><a href="index.php">Wyszukiwanie</a></li>
+<li><a href="list_all.php">Pełna lista książek</a></li>
</ul>
<h2> <?php echo $title; ?> </h2>
diff --git a/edit.php b/edit.php
deleted file mode 100644
index f55fd05..0000000
--- a/edit.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-include('./includes/std.php');
-
-$ksiazka = ksiazki::szukaj_KOD($_GET['kod']);
-
-$cover = ksiazki::okladka($ksiazka['id'], $ksiazka['ISBN']);
-
-$title = 'Edytowanie książki';
-include('./design/top.php');
-?>
-
-<table cellspacing="10" class="main">
-<tr>
-<td>
-
-<form action="edit_book.php" method="post" onsubmit="return ffalse('step4')" enctype="multipart/form-data">
-<p>KOD: <input type="text" name="id" id="step41" value="<?php echo $ksiazka['id']; ?>" readonly="readonly" required="required" /><br />
-Nowy KOD: <input type="text" name="nid" /><br />
-Tytuł: <input type="text" name="tytul" id="step42" value="<?php echo $ksiazka['tytul']; ?>" required="required" /><br />
-Autor: <input type="text" name="autor" id="step43" value="<?php echo $ksiazka['autor']; ?>" required="required" /><br />
-Język: <input type="text" name="jezyk" id="step44" value="<?php echo $ksiazka['jezyk']; ?>" required="required" /><br />
-Wydanie: <input type="text" name="wydanie" value="<?php echo $ksiazka['wydanie']; ?>" /></p>
-<p>Miejsce: <input type="text" name="miejsce" value="<?php echo $ksiazka['miejsce']; ?>" /><br />
-Rok: <input type="text" name="rok" value="<?php echo $ksiazka['rok']; ?>" /><br />
-Wydawnictwo: <input type="text" name="wydawnictwo" value="<?php echo $ksiazka['wydawnictwo']; ?>" /></p>
-<p>ISBN: <input type="text" name="ISBN" value="<?php echo $ksiazka['ISBN']; ?>" /><br />
-ISSN: <input type="text" name="ISSN" value="<?php echo $ksiazka['ISSN']; ?>" /></p>
-<p>Miejsce (regał/półka/rząd): <br />
- <input type="text" name="regal" value="<?php echo $ksiazka['regal']; ?>" size="5" maxsize="5" />
- / <input type="text" name="polka" value="<?php echo $ksiazka['polka']; ?>" size="3" maxsize="3" />
- / <input type="text" name="rzad" value="<?php echo $ksiazka['rzad']; ?>" size="3" maxsize="3" /></p>
-<p>Wycofana? <input type="checkbox" name="wycofana" value="1" <?php if($ksiazka['wycofana']) {echo 'checked="checked" ';} ?>/><br />
-Powód: <input type="text" name="powod" value="<?php echo $ksiazka['powod']; ?>" /></p>
-
-<p>Okładka: <br />
-<?php echo ($cover ? '<a href="cover.php?KOD='.$ksiazka['id'].'&ISBN='.$ksiazka['ISBN'].'"><img src="'.$cover.'" alt="Okładka" /></a> <br /> <label><input type="checkbox" name="okladka_del" value="1" /> Usuń</label>' : 'brak'); ?> <br />
-<input type="file" name="okladka" /></p>
-<p><input type="submit" value="Zapisz" /></p>
-</form>
-
-</td>
-</tr>
-</table>
-
-<?php
-include('./design/bottom.php');
-?>
diff --git a/edit_book.php b/edit_book.php
deleted file mode 100644
index 0f75fef..0000000
--- a/edit_book.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-include('./includes/std.php');
-
-ksiazki::edytuj($_POST);
-
-$title = 'Dodawanie książki';
-include('./design/top.php');
-?>
-
-<h3> Książka została zmieniona! </h3>
-
-<p>Informacje o zmienionym egzemplarzu:</p>
-
-<?php
-gotowe::informacje($_POST['id']);
-
-include('./design/bottom.php');
-?>
diff --git a/generate.php b/generate.php
deleted file mode 100644
index 318944b..0000000
--- a/generate.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-$title = 'Etykiety';
-include('./design/top.php');
-?>
-
-<table class="main">
-<tr>
-<td>
-
-<form action="generate_page.php" method="post" onsubmit="return ffalse('step1')">
-<p>Kody od numeru: <input type="text" name="from" id="step11" required="required" /></p>
-
-<p>Zaznacz brakujące etykiety (<a href="javascript:uc_all('no_a', true)">wszystkie</a> <a href="javascript:uc_all('no_a', false)">żadna</a>):</p>
-<table class="no" id="no_a">
-<tr>
-<?php
-for($i=0; $i<11; $i++) {
- for($j=0; $j<4; $j++) {
- echo ' <td><input type="checkbox" name="no_'.$i.'_'.$j.'" /></td>'."\n";
- }
- if($i<10) {
- echo '
-</tr>
-<tr>
-';
- }
-}
-?>
-</tr>
-</table>
-<p><input type="submit" value="Utwórz" /></p>
-</form>
-
-</td>
-<td>
-
-<form action="generate_list.php" method="post" onsubmit="return ffalse('step2')">
-<p>Lista potrzebnych kodów:<br />
-<textarea name="kody" id="step21" cols="18" rows="4" required="required"></textarea></p>
-
-<p>Zaznacz brakujące etykiety (<a href="javascript:uc_all('no_b', true)">wszystkie</a> <a href="javascript:uc_all('no_b', false)">żadna</a>):</p>
-<table class="no" id="no_b">
-<tr>
-<?php
-for($i=0; $i<11; $i++) {
- for($j=0; $j<4; $j++) {
- echo ' <td><input type="checkbox" name="no_'.$i.'_'.$j.'" /></td>'."\n";
- }
- if($i<10) {
- echo '
-</tr>
-<tr>
-';
- }
-}
-?>
-</tr>
-</table>
-
-<p><input type="submit" value="Utwórz" /></p>
-</form>
-
-</td>
-<td>
-
-<form action="generate39_list.php" method="post" onsubmit="return ffalse('step3')">
-<p>Lista potrzebnych identyfikatorów: <br />
-Format: REGAŁ/<i>PÓŁKA</i>/<i>RZĄD</i> <br />
-<textarea name="kody" id="step31" cols="14" rows="3" required="required"></textarea></p>
-
-<p>Zaznacz brakujące etykiety (<a href="javascript:uc_all('no_c', true)">wszystkie</a> <a href="javascript:uc_all('no_c', false)">żadna</a>):</p>
-<table class="no" id="no_c">
-<tr>
-<?php
-for($i=0; $i<11; $i++) {
- for($j=0; $j<4; $j++) {
- echo ' <td><input type="checkbox" name="no_'.$i.'_'.$j.'" /></td>'."\n";
- }
- if($i<10) {
- echo '
-</tr>
-<tr>
-';
- }
-}
-?>
-</tr>
-</table>
-
-
-<p><input type="submit" value="Utwórz" /></p>
-</form>
-
-</td>
-</tr>
-</table>
-
-<?php
-include('./design/bottom.php');
-?>
diff --git a/generate39_list.php b/generate39_list.php
deleted file mode 100644
index 36f05eb..0000000
--- a/generate39_list.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-include('./includes/std.php');
-
-require_once('includes/generate_html.php');
-require_once('includes/generate_code39.php');
-
-echo GENERATE_STYLE;
-
-echo '<table cellspacing="0">
-<tr>';
-
-$column = 0;
-$row = 0;
-foreach(explode("\n", $_POST['kody']) as $i) {
- $i = trim($i);
-
- if(empty($i)) {
- continue;
- }
-
- $i = explode('/', $i);
- validate::MSC($i[0], $i[1], $i[2]);
- $i = $i[0].'/'.$i[1].'/'.$i[2];
-
- while(true) {
- if(!$_POST['no_'.$row.'_'.$column]) {
- break;
- }
- else
- {
- echo '<td></td>';
- column($column, $row);
- continue;
- }
- };
-
- echo '<td style="padding-left: '.margin($column%4).'mm;">
-<img src="data:image/gif;base64,'.base64_encode(kod(str_replace('/', '$I', $i))).'" alt=""><br>'.$i.'
-</td>
-';
-
- column($column, $row);
-}
-
-while($row != 10 OR $column != 3) {
- echo '<td></td>';
- column($column, $row);
-}
-
-column($column, $row);
-
-echo GENERATE_END;
-?>
\ No newline at end of file
diff --git a/generate_list.php b/generate_list.php
deleted file mode 100644
index af68bf3..0000000
--- a/generate_list.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-include('./includes/std.php');
-
-require_once('includes/generate_html.php');
-require_once('includes/generate_codabar.php');
-
-foreach(explode("\n", $_POST['kody']) as $i) {
- $i = trim($i);
-
- if($i=='') {
- continue;
- }
-
- if(($pos=strpos($i, '-'))!==FALSE) {
- $from = trim(substr($i, 0, $pos));
- $to = trim(substr($i, $pos+1));
-
- validate::KOD($from);
- validate::KOD($to);
-
- for($from=(int)$from; $from<=$to; $from++) {
- $kody[] = $from;
- }
- }
- else
- {
- validate::KOD($i);
-
- $kody[] = $i;
- }
-}
-
-echo GENERATE_STYLE;
-
-echo '<table cellspacing="0">
-<tr>';
-
-$column = 0;
-$row = 0;
-foreach($kody as $i) {
- while(true) {
- if(!$_POST['no_'.$row.'_'.$column]) {
- break;
- }
- else
- {
- echo '<td></td>';
- column($column, $row);
- continue;
- }
- }
-
- $kod = str_pad($i, 8, '0', STR_PAD_LEFT);
-
- echo '<td style="padding-left: '.margin($column%4).'mm;">
-<img src="data:image/gif;base64,'.base64_encode(kod($kod)).'" alt=""><br>'.$kod.'
-</td>
-';
-
- column($column, $row);
-}
-
-while($row != 10 OR $column != 3) {
- echo '<td></td>';
- column($column, $row);
-}
-
-column($column, $row);
-
-echo GENERATE_END;
-?>
diff --git a/generate_page.php b/generate_page.php
deleted file mode 100644
index 8eec749..0000000
--- a/generate_page.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-include('./includes/std.php');
-
-require_once('includes/generate_html.php');
-require_once('includes/generate_codabar.php');
-
-echo GENERATE_STYLE;
-
-echo '<table cellspacing="0">
-<tr>';
-
-$column = 0;
-$row = 0;
-for($i=$_POST['from']; $i<$_POST['from']+44; $i++) {
- $i = trim($i);
-
- if(!ctype_digit($i) OR empty($i) OR strlen($i)>8) {
- continue;
- }
-
- validate::KOD($i);
-
- while(true) {
- if(!$_POST['no_'.$row.'_'.$column]) {
- break;
- }
- else
- {
- echo '<td></td>';
- column($column, $row);
- continue;
- }
- }
-
- $kod = str_pad($i, 8, '0', STR_PAD_LEFT);
-
- echo '<td style="padding-left: '.margin($column%4).'mm;">
-<img src="data:image/gif;base64,'.base64_encode(kod($kod)).'" alt=""><br>'.$kod.'
-</td>
-';
-
- column($column, $row);
-}
-
-while(true) {
- column($column, $row);
-}
-
-echo GENERATE_END;
-?>
diff --git a/help/db2_php.png b/help/db2_php.png
deleted file mode 100644
index 799c565..0000000
--- a/help/db2_php.png
+++ /dev/null
Binary files differ
diff --git a/help/db2_php.xcf b/help/db2_php.xcf
deleted file mode 100644
index 59e160a..0000000
--- a/help/db2_php.xcf
+++ /dev/null
Binary files differ
diff --git a/help/db2_php2.png b/help/db2_php2.png
deleted file mode 100644
index ccfabe4..0000000
--- a/help/db2_php2.png
+++ /dev/null
Binary files differ
diff --git a/help/db2_php3.png b/help/db2_php3.png
deleted file mode 100644
index 2dca7c0..0000000
--- a/help/db2_php3.png
+++ /dev/null
Binary files differ
diff --git a/help/pma1.png b/help/pma1.png
deleted file mode 100644
index 481c72f..0000000
--- a/help/pma1.png
+++ /dev/null
Binary files differ
diff --git a/help/pma1.xcf b/help/pma1.xcf
deleted file mode 100644
index a126171..0000000
--- a/help/pma1.xcf
+++ /dev/null
Binary files differ
diff --git a/help/pma2.png b/help/pma2.png
deleted file mode 100644
index 220a6d0..0000000
--- a/help/pma2.png
+++ /dev/null
Binary files differ
diff --git a/help/pma2.xcf b/help/pma2.xcf
deleted file mode 100644
index f8c3a51..0000000
--- a/help/pma2.xcf
+++ /dev/null
Binary files differ
diff --git a/help/podrecznik.odt b/help/podrecznik.odt
deleted file mode 100644
index cb6dec8..0000000
--- a/help/podrecznik.odt
+++ /dev/null
Binary files differ
diff --git a/help/podrecznik_orig.pdf b/help/podrecznik_orig.pdf
deleted file mode 100644
index b47965d..0000000
--- a/help/podrecznik_orig.pdf
+++ /dev/null
Binary files differ
diff --git a/includes/MARC21.php b/includes/MARC21.php
deleted file mode 100644
index 3205a64..0000000
--- a/includes/MARC21.php
+++ /dev/null
@@ -1,186 +0,0 @@
-<?php
-define('RECORD_SEPERATOR', chr(0x1e));
-define('UNIT_SEPERATOR', chr(0x1f));
-
-class MARC21 {
- static function from_string($data) {
- $lead_len = 24;
- $lead = substr($data, 0, $lead_len);
-
- $file_length = substr($lead, 0, 5);
- $head_len = substr($lead, 12, 5);
-
- $cat_record_lof = substr($lead, 20, 1);
- $cat_record_scp = substr($lead, 21, 1);
- $cat_record_imp = substr($lead, 22, 1);
- $cat_record_len = 3 + $cat_record_lof + $cat_record_scp + $cat_record_imp;
- $cat_len = $head_len-$lead_len-1;
-
- $cat = substr($data, $lead_len, $cat_len);
- $info = substr($data, $head_len);
-
- $unit = FALSE;
- for($i=0; $i<$cat_len; $i += $cat_record_len) {
- $rec_num = substr($cat, $i, 3);
-
- if($rec_num>899) {
- continue;
- }
-
- $rec_len = substr($cat, $i+3, $cat_record_lof);
- $rec_start = substr($cat, $i+3+$cat_record_lof, $cat_record_scp);
- $rec = substr($info, $rec_start, $rec_len-1);
-
- $temp = array();
- $unit = FALSE;
- $unit_letter = 'a';
-
- for($j=0; $j<$rec_len; $j++) {
- $char = substr($rec, $j, 1);
-
- if(($j==0 || $j==1) && $rec_num>9 && $char!=' ') {
- if($j==0) {
- $temp['f0'] = $char;
- }
- elseif($j==1) {
- $temp['f1'] = $char;
- }
- }
- elseif($char == UNIT_SEPERATOR) {
- $unit = TRUE;
- }
- elseif($unit === TRUE) {
- $temp[$unit_letter] = trim($collect, ' :;,/');
- $unit = FALSE;
- $unit_letter = $char;
- $collect = '';
- }
- else
- {
- $collect .= $char;
- }
- }
-
- $temp[$unit_letter] = trim($collect, ' :;,/');
- $collect = '';
-
- $return[$rec_num][] = $temp;
- }
-
- return $return;
- }
-
- static function to_array($MARC) {
- if(!$MARC['020']) {
- $MARC['020'] = array();
- }
- foreach($MARC['020'] as $value) {
- $value = (string)$value['a'];
- if(strlen($value)==9 AND strlen($value)!=13) {
- $value .= checksum::ISBN($value);
- }
- if( strlen($value) > strlen($ISBN) ) {
- $ISBN = $value;
- }
- }
-
- if(!$MARC['022']) {
- $MARC['022'] = array();
- }
- foreach($MARC['022'] as $value) {
- $value = (int)$value['a'];
- if( strlen($value) > strlen($ISSN) ) {
- $ISSN = $value;
- }
- }
-
- if($MARC['100'][0]['f0']==1) {
- $autor = explode(', ', $MARC['100'][0]['a'], 2);
- $MARC['100'][0]['a'] = str_replace('.', '', $autor[1]).' '.$autor[0];
- }
-
- if(empty($MARC['100'][0]['a'])) {
- $MARC['100'][0]['a'] = 'Praca zbiorowa';
- }
-
- $MARC['260'][0]['b'] = str_replace(
- array(
- 'Wydaw.',
- 'Państ.',
- 'Państw.',
- 'PK',
- 'Min.',
- ),
- array(
- 'Wydawnictwo',
- 'Państwowy',
- 'Państwowe',
- 'Politechnika Krakowska',
- 'Ministerstwa',
- ),
- $MARC['260'][0]['b']);
-
- if($MARC['041'][0]['a'] == 'pol') {
- $MARC['041'][0]['a'] = 'polski';
- }
-
-
- if(empty($MARC['041'][0]['a'])) {
- $MARC['041'][0]['a'] = 'polski';
- }
-
- if(!empty($MARC['245'][0]['b'])) {
- $MARC['245'][0]['a'] = trim($MARC['245'][0]['a'], '().,\\/"\' ').'. '.ucfirst(trim($MARC['245'][0]['b'], '().,\\/"\' '));
- }
-
- return array(
- 'tytul' => trim($MARC['245'][0]['a'], '().,\\/"\' '),
- 'autor' => trim($MARC['100'][0]['a'], '().,\\/"\' '),
- 'rok' => trim($MARC['260'][0]['c'], '().,\\/"\' '),
- 'miejsce' => trim($MARC['260'][0]['a'], '().,\\/"\' '),
- 'wydawnictwo' => trim($MARC['260'][0]['b'], '().,\\/"\' '),
- 'wydanie' => trim($MARC['250'][0]['a'], '().,\\/"\' '),
- 'jezyk' => $MARC['041'][0]['a'],
- 'ISBN' => $ISBN,
- 'ISSN' => $ISSN,
- /* stan */
- );
- }
-
- static function to_database($kod, $MARC) {
- if(!$MARC['020']) {
- $MARC['020'] = array();
- }
- foreach($MARC['020'] as $value) {
- $value = (int)$value['a'];
- if( strlen($value) > strlen($ISBN) ) {
- $ISBN = $value;
- }
- }
-
- if(!$MARC['022']) {
- $MARC['022'] = array();
- }
- foreach($MARC['022'] as $value) {
- $value = (int)$value['a'];
- if( strlen($value) > strlen($ISSN) ) {
- $ISSN = $value;
- }
- }
-
- db2::add('ksiazki', array(
- 'id' => $kod,
- 'tytul' => $MARC['245'][0]['a'],
- 'autor' => $MARC['100'][0]['a'],
- 'rok' => $MARC['260'][0]['c'],
- 'miejsce' => $MARC['260'][0]['a'],
- 'wydawnictwo' => $MARC['260'][0]['b'],
- 'wydanie' => $MARC['250'][0]['a'],
- 'jezyk' => $MARC['041'][0]['a'],
- 'ISBN' => $ISBN,
- 'ISSN' => $ISSN,
- /* stan */
- ));
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/MARC21_opisy.php b/includes/MARC21_opisy.php
deleted file mode 100644
index 6b8843e..0000000
--- a/includes/MARC21_opisy.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-$MARC21_opis = array(
- '001' => array(
- 'Numer kontrolny',
- 'a' => '^'
- ),
- '003' => array(
- 'Instytucja nadająca num. kontrolny',
- 'a' => '^',
- ),
- '005' => array(
- // rrmmddggmmss.0
- 'Data ostatniej modyfikacji',
- 'a' => '^',
- ),
- '015' => array(
- 'Numer bibliografii narodowej',
- 'a' => '^'
- ),
- '020' => array(
- 'ISBN',
- 'a' => 'ISBN',
- 'z' => 'Błędny/unieważniony'
- ),
- '100' => array(
- 'Główny autor',
-
- )
-);
-?>
\ No newline at end of file
diff --git a/includes/YAZ.php b/includes/YAZ.php
deleted file mode 100644
index 068945f..0000000
--- a/includes/YAZ.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-if(!extension_loaded('yaz')) {
- error::add('Brak rozszerzenia YAZ. Wyszukiwanie w bazach Biblioteki Narodowej niemożliwe.');
-}
-
-class YAZ {
- private static $connection;
- static $timeout = 10;
-
- static function connect($host) {
- self::$connection = yaz_connect($host, array('charset' => 'UTF-8'));
- yaz_syntax(self::$connection, 'marc21');
- }
-
- static function search($query, $start=1, $num=10) {
- yaz_search(self::$connection, 'rpn', $query);
- yaz_range(self::$connection, $start, $num);
- yaz_wait();
- self::is_error();
- }
-
- static function scan($query) {
- yaz_scan(self::$connection, 'rpn', $query);
- yaz_wait();
- self::is_error();
- }
-
- static function scan_result() {
- return yaz_scan_result(self::$connection);
- }
-
- static function scan_get($start=1, $num=10) {
- yaz_range(self::$connection, $start, $num);
- yaz_present(self::$connection);
- yaz_wait();
- self::is_error();
- }
-
- static function hits() {
- return yaz_hits(self::$connection);
- }
-
- static function return_MARCs() {
- $hits = self::hits();
-
- $records = array();
-
- $time = time();
-
- for($i=1; $i<=$hits; $i++) {
- if($time+self::$timeout <= time()) {
- break;
- }
- $record = yaz_record(self::$connection, $i, 'raw');
- $records[] = MARC21::from_string($record);
- }
-
- return $records;
- }
-
- static function return_arrays() {
- $return = array();
-
- $MARCs = self::return_MARCs();
-
- foreach($MARCs as $MARC) {
- $return[] = MARC21::to_array( $MARC );
- }
-
- return $return;
- }
-
- static function is_error() {
- if($e = yaz_error(self::$connection)) {
- error::add('Błąd YAZ: '.$e);
- }
- else
- {
- return FALSE;
- }
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/YAZ_ibd.php b/includes/YAZ_ibd.php
deleted file mode 100644
index a080dc8..0000000
--- a/includes/YAZ_ibd.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-__autoload('ibd');
-
-class YAZ_ibd implements ibd_module {
- var $name, $yaz_server;
-
- function __construct($name, $server) {
- $this->name = $name;
- $this->yaz_server = $server;
- }
-
- function zapytanie_info($ISBN=NULL, $ISSN=NULL, $tytul=NULL, $autor=NULL, $wydawnictwo=NULL) {
- if(!empty($ISBN)) {
- $attrs[] = '@attr 1=7 "'.$ISBN.'"';
- }
- if(!empty($ISSN)) {
- $attrs[] = '@attr 1=8 "'.$ISSN.'"';
- }
- if(!empty($tytul)) {
- $attrs[] = '@attr 1=4 "'.$tytul.'"';
- }
- if(!empty($autor)) {
- $attrs[] = '@attr 1=1003 "'.$autor.'"';
- }
- if(!empty($wydawnictwo)) {
- $attrs[] = '@attr 1=1018 "'.$wydawnictwo.'"';
- }
-
- if(count($attrs)==1) {
- return $attrs[0];
- }
- elseif(count($attrs)>1) {
- $return = '@and '.array_pop($attrs).' '.array_pop($attrs);
- }
-
- if(count($attrs)>0) {
- foreach($attrs as $value) {
- $return = '@and '.$value.' '.$return;
- }
- }
-
- return $return;
- }
-
- function szukaj_info($tytul=NULL, $autor=NULL, $wydawnictwo=NULL) {
- YAZ::connect( $this->yaz_server );
- YAZ::search( self::zapytanie_info( NULL, NULL, $tytul, $autor, $wydawnictwo ) );
-
- return YAZ::return_arrays();
- }
-
- function szukaj_ISBN($kod) {
- YAZ::connect( $this->yaz_server );
- YAZ::search( self::zapytanie_info( $kod ) );
- if(substr($kod, 0, 3)=='978') {
- YAZ::search( self::zapytanie_info( convert::ISBN13_to_ISBN10( $kod ) ) );
- }
-
- return YAZ::return_arrays();
- }
-
- function szukaj_ISSN($kod) {
- YAZ::connect( $this->yaz_server );
- YAZ::search( self::zapytanie_info( convert::ISSN13_to_ISSN8( $kod ) ) );
-
- return YAZ::return_arrays();
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/generate_codabar.php b/includes/generate_codabar.php
deleted file mode 100644
index 16e2548..0000000
--- a/includes/generate_codabar.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-if(!extension_loaded('gd')) {
- error::add('Brak rozszerzenia GD/GD2. Generowanie kodów kreskowych jest niemożliwe.');
-}
-
-$code = array(
- 'SS' => '1011110000100001',
- 'BT' => '0',
- '0' => '1010100001111',
- '1' => '1010111100001',
- '2' => '1010000101111',
- '3' => '1111000010101',
- '4' => '1011110100001',
- '5' => '1111010100001',
- '6' => '1000010101111',
- '7' => '1000010111101',
- '8' => '1000011110101',
- '9' => '1111010000101',
- '-' => '1010000111101',
- '$' => '1011110000101',
- ':' => '1111010111101111',
- '/' => '1111011110101111',
- '.' => '1111011110111101',
- '+' => '1011110111101111'
-);
-
-function gen_binary($kod) {
- global $code;
-
- $kod = str_split($kod);
- $ret = '';
- foreach($kod as $key => $val) {
- $ret .= $code[$val].$code['BT'];
- }
-
- return $ret;
-}
-function print_code($kod, $img, $b, $w) {
- $kod = str_split($kod);
- foreach($kod as $val) {
- if($val==1) {
- imageline($img, $now, 0, $now, 40, $b);
- $now++;
- }
- elseif($val==0) {
- $now++;
- }
- }
-}
-
-function kod($kod) {
- global $code;
- $kod = $code['SS'].$code['BT'].gen_binary($kod).$code['SS'];
-
- $i = imagecreate(strlen($kod), 40);
- $w = imagecolorallocate($i, 255, 255, 255);
- $b = imagecolorallocate($i, 0, 0, 0);
-
- print_code($kod, $i, $b, $w);
-
- ob_start();
- imagegif($i);
- $img = ob_get_contents();
- ob_end_clean();
-
- return $img;
-}
-?>
\ No newline at end of file
diff --git a/includes/generate_code39.php b/includes/generate_code39.php
deleted file mode 100644
index 62c95a6..0000000
--- a/includes/generate_code39.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-if(!extension_loaded('gd')) {
- error::add('Brak rozszerzenia GD/GD2. Generowanie kodów kreskowych jest niemożliwe.');
-}
-
-$code = array(
- 'SS' => '100101101101',
- 'BT' => '0',
- '0' => '101001101101',
- '1' => '110100101011',
- '2' => '101100101011',
- '3' => '110110010101',
- '4' => '101001101011',
- '5' => '110100110101',
- '6' => '101100110101',
- '7' => '101001011011',
- '8' => '110100101101',
- '9' => '101100101101',
- 'A' => '110101001011',
- 'B' => '101101001011',
- 'C' => '110110100101',
- 'D' => '101011001011',
- 'E' => '110101100101',
- 'F' => '101101100101',
- 'G' => '101010011011',
- 'H' => '110101001101',
- 'I' => '101101001101',
- 'J' => '101011001101',
- 'K' => '110101010011',
- 'L' => '101101010011',
- 'M' => '110110101001',
- 'N' => '101011010011',
- 'O' => '110101101001',
- 'P' => '101101101001',
- 'Q' => '101010110011',
- 'R' => '110101011001',
- 'S' => '101101011001',
- 'T' => '101011011001',
- 'U' => '110010101011',
- 'V' => '100110101011',
- 'W' => '110011010101',
- 'X' => '100101101011',
- 'Y' => '110010110101',
- 'Z' => '100110110101',
- '-' => '100101011011',
- '.' => '110010101101',
- ' ' => '100110101101',
- '$' => '100100100101',
- '/' => '100100101001',
- '+' => '100101001001',
- '%' => '101001001001',
-);
-
-function gen_binary($kod) {
- global $code;
-
- $kod = str_split($kod);
- $ret = '';
- foreach($kod as $key => $val) {
- $ret .= $code[$val].$code['BT'];
- }
-
- return $ret;
-}
-function print_code($kod, $img, $b, $w) {
- $kod = str_split($kod);
- foreach($kod as $val) {
- if($val==1) {
- imageline($img, $now, 0, $now, 40, $b);
- $now++;
- }
- elseif($val==0) {
- $now++;
- }
- }
-}
-
-function kod($kod) {
- global $code;
-
- if(trim($kod, '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $')!='') {
- error::add('Znaki inne niż cyfry, litery, pauza, kropka, spacja, ukośnik');
- }
-
- $kod = $code['SS'].$code['BT'].gen_binary($kod).$code['SS'];
-
- $i = imagecreate(strlen($kod), 40);
- $w = imagecolorallocate($i, 255, 255, 255);
- $b = imagecolorallocate($i, 0, 0, 0);
-
- print_code($kod, $i, $b, $w);
-
- ob_start();
- imagegif($i);
- $img = ob_get_contents();
- ob_end_clean();
-
- return $img;
-}
-?>
\ No newline at end of file
diff --git a/includes/generate_html.php b/includes/generate_html.php
deleted file mode 100644
index c7cb4b9..0000000
--- a/includes/generate_html.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-define('GENERATE_STYLE', '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<title>System biblioteczny - Wygenerowane etykiety</title>
-<style type="text/css">
-html, body, table, * {
- margin:0;
- padding:0;
- font-size: 4mm;
-}
-table {
- margin-top:7mm; border:0;
- width: 100%;
-}
-td {
- border: 0;
- text-align: center;
- width: 25%;
- height: 25mm;
-}
-</style>
-</head>
-<body>
-');
-define('GENERATE_END', '
-</body>
-</html>
-');
-
-function column(&$column, &$row) {
- if($column == 3) {
- if($row == 10) {
- $row = 0;
- echo '</tr> </table> </body> </html>';
- die();
- }
- else
- {
- $row++;
- echo '</tr> <tr>';
- }
- }
-
- $column++;
- if($column == 4) {
- $column = 0;
- }
-}
-
-function margin($i) {
- switch($i) {
- default:
- return 0;
- break;
- case 1:
- return 0;
- break;
- case 2:
- return 0;
- break;
- case 3:
- return 0;
- break;
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/gotowe.php b/includes/gotowe.php
index b81299c..e7da1fe 100644
--- a/includes/gotowe.php
+++ b/includes/gotowe.php
@@ -5,69 +5,6 @@
static $add = '';
static $default = FALSE;
- static function dodaj_lista($kod, $wlasne, $znalezione=array()) {
- validate::KOD($kod, FALSE);
-
- echo '<p>KOD: <input type="text" name="kod" value="'.$kod.'" readonly="readonly" /></p>
-
-';
-
- $i = 0;
-?>
-
-<table>
-<tr> <th>Autor</th> <th>Tytuł</th> <th>Wydanie</th> <th>Miejsce</th> <th>Rok</th> <th>Wydawnictwo</th> <th>Język</th> <th>ISBN</th> <th>ISSN</th> <th>Zapisz</th> </tr>
-<?php
- if(!empty($wlasne)) {
-?>
-<tr> <th colspan="10">Zasoby własne</th> </tr>
-
-<?php
-foreach($wlasne as $value) {
- echo '<tr> <form action="add_book.php" method="post">
-';
- foreach(self::$pola as $v) {
- echo '<td> <input type="text" name="'.$v.'" value="'.htmlspecialchars($value[$v]).'" /> </td>
-';
- }
- echo '<td> <input type="hidden" name="id" value="'.$kod.'" readonly="readonly" /> <input type="submit" value="Zapisz" /> </td>
-</form> </tr>
-';
-}
- }
-
-foreach($znalezione as $nazwa => $dane) {
- echo '<tr> <th colspan="10">'.$nazwa.'</th> </tr>';
- foreach($dane as $value) {
- echo '<tr> <form action="add_book.php" method="post">
-';
- foreach(self::$pola as $v) {
- echo '<td> <input type="text" name="'.$v.'" value="'.htmlspecialchars($value[$v]).'" /> </td>
-';
- }
- echo '<td> <input type="hidden" name="id" value="'.$kod.'" readonly="readonly" /> <input type="submit" value="Zapisz" /> </td>
-</form> </tr>
-';
- }
-}
-?>
-
-<tr> <th colspan="10">Dodaj własną</th> </tr>
-
-<?php
-echo '<tr> <form action="add_book.php" method="post">
-';
-foreach(self::$pola as $v) {
- echo '<td> <input type="text" name="'.$v.'" /> </td>
-';
-}
-echo '<td> <input type="hidden" name="id" value="'.$kod.'" readonly="readonly" /> <input type="submit" value="Zapisz" /> </td>
-</form> </tr>
-
-</table>
-';
- }
-
static function sort($by=NULL, $strona=NULL) {
if($strona === NULL) {
$strona = 0;
@@ -112,26 +49,6 @@
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);
@@ -139,7 +56,7 @@
if($dane['wycofana']) {
$class = 'wyc';
- $info = '<p>Książka wycofana'.($dane['powod'] ? ' <br /> '.$dane['powod'] : '').'</p>';
+ $info = '<p>Książka wycofana</p>';
}
else
{
@@ -147,19 +64,7 @@
$class = 'norm';
$info = '
-<fieldset>
-<legend>Wypożyczanie</legend>
-<p>Książka w bibliotece</p>
-<form action="borrow_book.php" method="post" onsubmit="return ffalse(\'step1\')">
-<p>Pożycz <input type="text" name="kod" value="'.$dane['id'].'" readonly="readonly" /><br />
-Komu? <input type="text" name="kto" id="step11" required="required" /></p>
-<p><input type="submit" value="Pożycz" /></p>
-
-<script type="text/javascript">
-document.getElementById(\'step11\').focus();
-</script>
-</form>
-</fieldset>
+<p>Książka w dostępna</p>
';
}
@@ -168,18 +73,7 @@
$class = 'poz';
$info = '
-<fieldset>
-<legend>Wypożyczanie</legend>
-<p>Wypożyczył(a) '.$dane['kto'].' w dniu '.date('d.m.Y', $dane['od']).'</p>
-
-<form action="borrow_back.php" method="post">
-<p><input type="hidden" name="kod" value="'.$dane['id'].'" /> <input type="submit" value="Zwrot" id="step11" /></p>
-
-<script type="text/javascript">
-document.getElementById(\'step11\').focus();
-</script>
-</form>
-</fieldset>
+<p>Książka wypożyczona</p>
';
}
@@ -200,17 +94,6 @@
ISSN-13: '.$dane['ISSN'].'<br />
ISSN-10: '.convert::ISSN13_to_ISSN8($dane['ISSN']) : '').'</p>
'.$info.'
-<form action="edit.php" method="get" style="float:left;">
-<p><input type="hidden" name="kod" value="'.$dane['id'].'" /> <input type="submit" value="Edytuj" /></p>
-</form>
-
-<form action="del.php" method="get" style="float:left;">
-<p><input type="hidden" name="kod" value="'.$dane['id'].'" /> <input type="submit" value="Usuń" /></p>
-</form>
-'.($dane['od'] ? '
-<form action="borrow_history.php" method="get" style="float:right;">
-<p><input type="hidden" name="kod" value="'.$dane['id'].'" /> <input type="submit" value="Historia wypożyczeń" /></p>
-</form>' : '').'
</div>';
}
@@ -228,8 +111,6 @@
if($_GET['id']) {
self::add('id', 13);
- self::add('polka', 3);
- self::add('rzad', 3);
}
else
{
@@ -277,7 +158,7 @@
else
{
$class = 'poz';
- $info = $ksiazka['kto'];
+ $info = 'Książka wypożyczona';
$pozycz = TRUE;
}
}
@@ -306,9 +187,7 @@
<td>'.min(100, (int)($ksiazka['revelance']*10)).'% </td>' : '').'
<td class="n">
'.$info.' <br />
- <a href="info.php?kod='.$ksiazka['id'].'">Więcej</a>
- <a href="edit.php?kod='.$ksiazka['id'].'">Edycja</a>
- <a href="del.php?kod='.$ksiazka['id'].'">Usuń</a>
+ <a href="info.php?kod='.$ksiazka['id'].'">Więcej...</a>
</td>
</tr>
';
diff --git a/includes/ibd.php b/includes/ibd.php
deleted file mode 100644
index 42cb20c..0000000
--- a/includes/ibd.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-interface ibd_module {
- //static $name;
- function szukaj_info($tytul=NULL, $autor=NULL, $wydawnictwo=NULL);
- function szukaj_ISBN($ISBN);
- function szukaj_ISSN($ISSN);
-}
-
-class ibd implements Countable {
- static $providers = array(
- 'ibd_BN',
- );
-
- static $timelimit = 25;
-
- function __call($function, $args) {
- $stop = time() + self::$timelimit;
- $return = array();
-
- foreach(self::$providers as $provider) {
- if(time() >= $stop) break;
-
- $name = new $provider;
- if(!method_exists($name, $function)) {
- continue;
- }
-
- $results = call_user_func_array(array($name, $function), $args);
-
- if(!empty($results)) {
- $return[$name->name] = $results;
- }
- }
-
- return $return;
- }
-
- function count() {
- return count(self::$providers);
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/ibd_BN.php b/includes/ibd_BN.php
deleted file mode 100644
index 8fc81cd..0000000
--- a/includes/ibd_BN.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-class ibd_BN extends YAZ_ibd {
- function __construct() {
- parent::__construct('Biblioteka Narodowa', 'alpha.bn.org.pl/innopac');
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/ksiazki.php b/includes/ksiazki.php
index 705c3ac..1cdced5 100644
--- a/includes/ksiazki.php
+++ b/includes/ksiazki.php
@@ -47,34 +47,6 @@
return okladki::znajdz($KOD, $ISBN, 'covers_big');
}
- static function dodaj(&$dane) {
- validate::KOD($dane['id'], FALSE);
-
- if($dane['ISBN']) {
- $t = validate::type($dane['ISBN']);
- if($t!='ISBN') {
- error::add('W polu ISBN znajduje się '.$t);
- }
- }
- if($dane['ISSN']) {
- $t = validate::type($dane['ISSN']);
- if($t!='ISSN') {
- error::add('W polu ISSN znajduje się '.$t);
- }
- }
-
- if($dane['jezyk']=='pol') {
- $dane['jezyk'] = 'polski';
- }
-
- unset($_POST['okladka']);
-
- okladki::upload($_FILES['okladka'], $dane['id'], $dane['ISBN']);
-
- db2::add('ksiazki', $dane);
- self::cache_update($dane['id']);
- }
-
static function exists($kod) {
$info = self::cache_get($kod);
if(isset($info['id'])) {
@@ -84,76 +56,6 @@
{
return FALSE;
}
- }
-
- static function edytuj(&$dane) {
- validate::KOD($dane['id']);
- $kod = $dane['id'];
-
- $old = self::szukaj_KOD($kod);
-
- if($dane['id']=='' OR empty($dane['autor']) OR empty($dane['tytul']) OR empty($dane['jezyk'])) {
- error::add('Brak wymaganych danych o książce (kod, autor, tytuł, język)');
- }
-
- if($dane['nid']!='') {
- validate::KOD($dane['nid']);
- $dane['id'] = $dane['nid'];
- }
-
- unset($dane['nid']);
-
- if($dane['ISBN']) {
- $t = validate::type($dane['ISBN']);
- if($t!='ISBN') {
- error::add('W polu ISBN znajduje się '.$t);
- }
- }
- if($dane['ISSN']) {
- $t = validate::type($dane['ISSN']);
- if($t!='ISSN') {
- error::add('W polu ISSN znajduje się '.$t);
- }
- }
-
- if(!$dane['wycofana']) {
- $dane['wycofana'] = 0;
- $dane['powod'] = NULL;
- }
-
- okladki::przenies($old['id'], $old['ISBN'], $dane['id'], $dane['ISBN']);
-
- unset($_POST['okladka']);
-
- // Nowa okładka
- if(isset($_POST['okladka_del']) || (isset($_FILES['okladka']) && is_uploaded_file($_FILES['okladka']['tmp_name']))) {
- okladki::usun($dane['id'], $dane['ISBN']);
- unset($_POST['okladka_del']);
- }
-
- okladki::upload($_FILES['okladka'], $dane['id'], $dane['ISBN']);
-
- db2::edit('ksiazki', $dane, array('id' => $kod));
- self::cache_update($kod);
- if($dane['id']!=$kod) {
- self::cache_update($dane['id']);
- }
- }
-
- static function miejsce($regal, $polka, $rzad, $where) {
- db2::edit('ksiazki', array('regal' => strtoupper($regal), 'polka' => $polka, 'rzad' => $rzad), $where);
- self::cache_clear();
- }
-
- static function usun(&$kod) {
- validate::KOD($kod);
-
- $dane = self::szukaj_KOD($kod);
-
- okladki::usun($dane['id'], $dane['ISBN']);
-
- db2::del('ksiazki', array('id' => $kod));
- self::cache_clear($kod);
}
static function szukaj_KOD($kod) {
diff --git a/includes/pozycz.php b/includes/pozycz.php
index 6adb5b5..d5bd5cf 100644
--- a/includes/pozycz.php
+++ b/includes/pozycz.php
@@ -1,29 +1,5 @@
<?php
class pozycz {
- static function wypozyczenie($kod, $kto) {
- if(self::pozyczona($kod)!==FALSE) {
- error::add('Książka jest już wypożyczona!');
- }
-
- db2::add('pozycz', array('id' => $kod, 'kto' => $kto, 'od' => time()));
- ksiazki::cache_clear($kod);
- }
-
- static function zwrot($kod) {
- if(self::pozyczona($kod)===FALSE) {
- error::add('Książka nie jest wypożyczona!');
- }
-
- $st = PDOO::Singleton()->prepare('INSERT INTO pozycz_historia (id, kto, od, do)
- SELECT id, kto, od, ? FROM pozycz WHERE id=?');
- $st->execute(array(time(), $kod));
-
- $st = PDOO::Singleton()->prepare('DELETE FROM pozycz WHERE id=?');
- $st->execute(array($kod));
-
- ksiazki::cache_update($kod);
- }
-
static function pozyczona($kod) {
$ksiazka = ksiazki::szukaj_KOD($kod);
return $ksiazka['od'] != NULL;
diff --git a/index.php b/index.php
index 27a4753..7976bd1 100644
--- a/index.php
+++ b/index.php
@@ -8,9 +8,7 @@
<td>
<form action="search.php" method="get" onsubmit="return ffalse('step1')">
-<p>KOD/IS*N: <input type="text" name="id" id="step11" required="required" /><br />
-Półka, rząd: <input type="text" name="polka" size="3" maxlength="3" />
-/ <input type="text" name="rzad" size="3" maxlength="3" /></p>
+<p>KOD/IS*N: <input type="text" name="id" id="step11" required="required" /></p>
<p><input type="submit" value="Znajdź" /></p>
<p><i>Przy ręcznym wpisywaniu ośmiocyfrowego <br /> numeru ISSN, poprzedź go zerem</i></p>
@@ -19,12 +17,6 @@
<script type="text/javascript">
document.getElementById('step11').focus();
</script>
-
-<hr />
-
-<a href="list_all.php">Pełna lista książek</a> <br />
-<a href="list_borrowed.php">Wypożyczone</a> <br />
-<a href="list_repulsed.php">Wycofane</a>
</td>
<td>
diff --git a/inwentaryzacja/begin.php b/inwentaryzacja/begin.php
deleted file mode 100644
index 3370176..0000000
--- a/inwentaryzacja/begin.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-$title = 'Inwentaryzacja - rozpoczęcie';
-include('design/top.php');
-?>
-
-<h3>Krok 1 z 3: Przygotowanie listy książek</h3>
-
-<p>Ten krok służy do przygotowania listy książek, które zostaną objęte inwentaryzacją. Na liście nie znajdą się książki wycofane. W przypadku książki wypożyczonej, informacja o zwrocie (w przypadku jej zainwentaryzowania) nie zostanie zapisana w bazie!</p>
-
-<p>W trakcie inwentaryzacji zaleca się nie zmieniać położenia książek za pomocą interfejsu, gdyż dane te mogą zostać nadpisane po zakończeniu procesu (krok 3).</p>
-
-<p>Z interfejsu inwentaryzacji w danej chwili powinna korzystać tylko jedna osoba, w przeciwnym wypadku osoby inwentaryzujące mogą wzajemnie nadpisywać zgromadzone dane.</p>
-
-<?php
-if(file_exists('list.xml')) {
-?>
-<p><strong>Dane z poprzedniej (niedokończonej) inwentaryzacji zostaną usunięte!</strong></p>
-
-<?php
-}
-?>
-<form action="make.php">
-<p><input type="submit" value="Utwórz listę" /></p>
-</form>
-
-<?php
-include('design/bottom.php');
-?>
\ No newline at end of file
diff --git a/inwentaryzacja/design/bottom.php b/inwentaryzacja/design/bottom.php
deleted file mode 100644
index e9b8131..0000000
--- a/inwentaryzacja/design/bottom.php
+++ /dev/null
@@ -1,7 +0,0 @@
-
-<p class="footer"> Copyrights © 2008, 2009 by Jacek Kowalski | Covers by <a href="http://www.librarything.com">LibraryThing</a> <?php
-if(defined('STANDARD')) { echo '<br /> Zapytań SQL: '.sql::$queries.' | Czas wykonywania: '.(microtime(TRUE)-error::$time).' s '; } ?></p>
-
-<script type="text/javascript" src="design/script.js"></script>
-</body>
-</html>
diff --git a/inwentaryzacja/design/script.js b/inwentaryzacja/design/script.js
deleted file mode 100644
index 8fbbf47..0000000
--- a/inwentaryzacja/design/script.js
+++ /dev/null
@@ -1,85 +0,0 @@
-function keypress(e) {
- if(!e) {
- e = window.event;
- }
-
- switch(e.keyCode) {
- case 112:
- setTimeout('window.location.replace("index.php");', 10);
- return false;
- break;
- case 113:
- setTimeout('window.location.replace("add.php");', 10);
- return false;
- break;
- case 114:
- setTimeout('window.location.replace("place.php");', 10);
- return false;
- break;
- case 115:
- setTimeout('window.location.replace("generate.php");', 10);
- return false;
- break;
- }
-}
-
-function ffalse(ids) {
- i=1;
- while(true) {
- obj = document.getElementById(ids+i);
- if(!obj) break;
-
- if((obj.hasAttribute('required') || obj.className=='focus') && obj.value=='') {
- obj.focus();
- return false;
- }
- i++;
- }
-
- return true;
-}
-
-function ffalse_focus() {
- el = document.getElementsByClassName('focus');
-
- for(i=0; i<el.length; i++) {
- el.item(i).onfocus = "this.className=''";
- }
-}
-
-function uc_all(ids, check) {
- list = document.getElementById(ids).getElementsByTagName('input');
-
- for(i=0; i<list.length; i++) {
- box = list.item(i);
- if(box.type == 'checkbox') {
- box.checked = check;
- }
- }
-}
-
-function pups_init() {
- an = document.getElementsByTagName('a');
-
- for(i=0; i<an.length; i++) {
- if((an.item(i).href+'').match('cover.php\?')) {
- an[i].onclick = pups;
- }
- }
-}
-
-function pups(an) {
- an = an.target.parentNode;
- if(an) {
- win = window.open(an.href+'&pop', '_blank', 'dependent=yes,toolbar=no,resizable=yes');
- return false;
- }
-}
-
-function on_loaded() {
- ffalse_focus();
- pups_init();
-}
-
-document.onkeydown = keypress;
-window.onload = on_loaded();
diff --git a/inwentaryzacja/design/style.css b/inwentaryzacja/design/style.css
deleted file mode 100644
index 4c75aea..0000000
--- a/inwentaryzacja/design/style.css
+++ /dev/null
@@ -1,105 +0,0 @@
-html, body {
- font: 14px Verdana, Helvetica, sans-serif;
- background: #ffd;
-}
-
-table {border: 2px solid black;}
-a img {border: none;}
-
-/* TABELE AKCJI */
-.width {width: 100%;}
-.width span, #book span {
- font-size: 80%;
- padding-left: 10px;
-}
-table.main {
- border: 0;
- border-spacing: 10px;
-}
-.main td {
- vertical-align: top;
- border: 2px solid black;
- padding: 5px 10px;
- margin: 10px;
-}
-
-/* STYLE MENU */
-#menu { padding: 0px;
- text-align: center;
- background: #dda;
-}
-#menu li {
- margin: 0px 2px;
- padding: 0px;
- display: inline;
- list-style: inside none;
-}
-#menu a {
- background: #fd6;
- padding: 3px 15px;
- margin: 0px;
- text-decoration: none;
- color: #000;
-}
-#menu a:hover {
- background: #fea;
- text-decoration: underline;
-}
-
-/* Brakujące etykiety */
-table.no td {
- border: 1px solid black;
- padding: 0px 10px;
-}
-.or {
- display: block;
- padding: 5px 0px;
-}
-.or * {
- vertical-align: middle;
- display: inline-block;
- width: 30%;
-}
-.width td { vertical-align: top;
- padding: 5px;}
-td p:first-child, td h3:first-child {margin-top: 0;}
-td p:last-child {margin-bottom: 3px;}
-.width tr td:first-child {padding:0;}
-/* BEZ ZAWIJANIA WIERSZY */
-.n { white-space: nowrap;}
-/* KOLORY PRZY WYSZUKIWANIU (książki wycofane, wypożyczone itp.) */
-.wyc { background: #ddd;}
-.poz { background: #fdd;}
-.norm { background: #dfd;}
-
-/* TEKSTY POCHYLONE */
-i { font-size: 75%;}
-
-/* POJEDYNCZA KSIĄŻKA */
-#book { border: 2px solid black;
- padding: 5px;
- display: inline-block;
-}
-#book h4, #book h5, #book p {margin: 2px;}
-#book p {margin-top: 0.5em;}
-#bhist {margin: 0.5em; float:right;}
-#book a {
- float: left;
- margin: 10px;
- margin-left: 0px;
-}
-fieldset {margin: 0.5em auto;}
-
-@media print {
- * {color: black; background: white;}
- h1, ul, .footer, img {display: none;}
- a {text-decoration: none;}
- form {margin:0; padding:0;}
- input[type=submit] {display: none;}
- #bhist {float:none; margin-left:0;}
- /* OKŁADKI */
- .width td {padding: 1mm;}
- .width tr td:first-child, .width tr th:first-child {display: none;}
- /* OPCJE */
- .width tr th:last-child, .width tr td:last-child {display: none;}
-}
diff --git a/inwentaryzacja/design/top.php b/inwentaryzacja/design/top.php
deleted file mode 100644
index 3b4f6ba..0000000
--- a/inwentaryzacja/design/top.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-if(!defined('TOP_SEND')) {
- header('Content-type: text/html; charset=utf-8');
- header('Pragma: no-cache');
- header('Cache-control: private, no-cache, must-revalidate');
-?>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
-<head>
-<title>System biblioteczny - Inwentaryzacja</title>
-<link rel="stylesheet" type="text/css" href="design/style.css" />
-</head>
-<body>
-
-<h1> System biblioteczny </h1>
-
-<ul id="menu">
-<li><a href="../index.php">Wypożyczanie/wyszukiwanie</a></li>
-
-<li> </li>
-
-<li><a href="../add.php">Dodaj książkę</a></li>
-<li><a href="../place.php">Ustaw położenie</a></li>
-
-<li> </li>
-
-<li><a href="../generate.php">Etykiety</a></li>
-</ul>
-
-<h2> Inwentaryzacja </h2>
-
-<?php
- define('TOP_SEND', TRUE);
-}
-?>
\ No newline at end of file
diff --git a/inwentaryzacja/end.php b/inwentaryzacja/end.php
deleted file mode 100644
index 4eaeda0..0000000
--- a/inwentaryzacja/end.php
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-$title = 'Inwentaryzacja - zakończenie';
-include('design/top.php');
-?>
-
-<h3>Krok 3 z 3: Zakończenie inwentaryzacji</h3>
-
-<?php
-if(!is_file('list.xml')) {
- echo '<p>Wystąpił błąd: plik z danymi nie istnieje!</p>';
-
- include('design/bottom.php');
- die();
-}
-?>
-
-<p>Poniżej znajduje się lista zmian do wykonania. Aby nie dokonywać danej zmiany należy odznaczyć odpowiednie pole wyboru.</p>
-
-<form action="finish.php" method="post">
-<table class="width">
-<tr> <th> <b>Kod</b> <br /> Wyd. </th> <th> Autor <br /> <b>Tytuł</b> </th> <th> Miejsce, rok <br /> Wydawnictwo </th> <th> Akcje </th> </tr>
-<?php
-$doc = new DOMDocument;
-if(!$doc->load('list.xml')) {
- echo '<p>Wystąpił błąd: plik z danymi nie jest poprawnym arkuszem XML!</p>';
-
- include('design/bottom.php');
- die();
-}
-
-foreach($doc->documentElement->childNodes as $loc) {
- if(!($loc instanceof DOMElement) || $loc->tagName != 'lokalizacja') {
- continue;
- }
-
- $location = $loc->getAttribute('regal').'/'.$loc->getAttribute('polka').'/'.$loc->getAttribute('rzad');
-
- foreach($loc->childNodes as $node) {
- if(!($node instanceof DOMElement) || $node->tagName != 'ksiazka') {
- continue;
- }
- if($node->hasAttribute('status') && $node->getAttribute('status') == 'ok') {
- continue;
- }
-
- $dane = array(
- 'id' => substr($node->getAttribute('id'), 1),
- 'status' => $node->getAttribute('status'),
- );
-
- foreach($node->childNodes as $attr) {
- if($node instanceof DOMElement) {
- $dane[$attr->tagName] = htmlspecialchars($attr->textContent);
- }
- }
-
- echo '<tr class="'.($dane['status'] == 'moved' ? 'poz' : 'wyc').'"> <td> <b>'.$dane['id'].'</b> <br /> </td> <td>'.$dane['autor'].' <br /> <b>'.$dane['tytul'].'</b></td> <td>'.$dane['miejsce'].' '.$dane['rok'].' <br /> '.$dane['wydawnictwo'].'</td> <td>';
- if($dane['status'] == 'moved') {
- echo '<label><input type="checkbox" name="move['.$dane['id'].']" value="'.htmlspecialchars($location).'" checked="checked" />Przenieś do '.htmlspecialchars($location).'</label>';
- }
- else
- {
- echo '<label><input type="checkbox" name="repulse['.$dane['id'].']" value="1" checked="checked" />Wycofaj</label>';
- }
- echo '</td> </tr>'."\n";
- }
-}
-?>
-</table>
-
-<p><input type="submit" value="Wykonaj wybrane operacje" /> <a href="locate.htm">Kontynuuj inwentaryzację</a> <a href="begin.php">Zacznij inwentaryzację od nowa</a></p>
-</form>
-
-<?php
-include('design/bottom.php');
-?>
\ No newline at end of file
diff --git a/inwentaryzacja/error.wav b/inwentaryzacja/error.wav
deleted file mode 100644
index b2dc9e9..0000000
--- a/inwentaryzacja/error.wav
+++ /dev/null
Binary files differ
diff --git a/inwentaryzacja/finish.php b/inwentaryzacja/finish.php
deleted file mode 100644
index 368dbfb..0000000
--- a/inwentaryzacja/finish.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-$title = 'Inwentaryzacja - zakończenie';
-include('design/top.php');
-
-require('../includes/config.php');
-require('../includes/PDOO.php');
-$PDO = PDOO::Singleton();
-?>
-
-<h3>Krok 3 z 3: Zakończenie inwentaryzacji</h3>
-
-<p>Wykonano następujące operacje:</p>
-
-<ul>
-<?php
-$st = $PDO->prepare('UPDATE ksiazki SET regal=?, polka=?, rzad=? WHERE id=?');
-foreach($_POST['move'] as $id => $placed) {
- if(strlen($placed) == 0) continue;
-
- $place = explode('/', $placed, 3);
- if($place[2] == '') {
- $place[2] = NULL;
- if($place[1] == '') {
- $place[1] = NULL;
- if($place[0] == '') {
- $place[0] = NULL;
- }
- }
- }
-
- echo '<li>Zmiana miejsca '.$id.' na '.htmlspecialchars($placed).'</li>'."\n";
- $st->execute(array($place[0], $place[1], $place[2], $id));
-}
-
-$date = date('d.m.Y H:i');
-$st = $PDO->prepare('UPDATE ksiazki SET wycofana=\'1\', powod=\'Inwentaryzacja '.$date.'\' WHERE id=?');
-
-foreach($_POST['repulse'] as $id => $placed) {
- if(!$placed) continue;
-
- echo '<li>Wycofanie '.$id.'</li>'."\n";
- $st->execute(array($id));
-}
-
-echo '<li>Usunięcie listy książek do inwentaryzacji</li>'."\n";
-unlink('list.xml');
-?>
-</ul>
-
-<?php
-include('design/bottom.php');
-?>
\ No newline at end of file
diff --git a/inwentaryzacja/index.php b/inwentaryzacja/index.php
deleted file mode 100644
index b576f00..0000000
--- a/inwentaryzacja/index.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-if(is_file('list.xml')) {
- header('Location: locate.htm');
-}
-else
-{
- header('Location: begin.php');
-}
-?>
\ No newline at end of file
diff --git a/inwentaryzacja/locate.css b/inwentaryzacja/locate.css
deleted file mode 100644
index 525c876..0000000
--- a/inwentaryzacja/locate.css
+++ /dev/null
@@ -1,65 +0,0 @@
-body { font: 12px Verdana;}
-.error {color: red; font-weight: bold;}
-
-table, table caption {
- border: 1px solid black;
- border-radius: 12px;
- padding: 8px 10px;}
-table caption {
- margin: 0 15px;
- font-size: 250%;
- font-weight: bold;}
-table.current, table.current caption {
- border: 10px solid orange;
- border-radius: 12px;}
-table.current caption {
- margin-left: 30px;}
-
-table caption, table.current caption {
- border-bottom: none;
- -webkit-border-bottom-left-radius: 0;
- -moz-border-radius-bottomleft: 0;
- border-bottom-left-radius: 0;
- -webkit-border-bottom-right-radius: 0;
- -moz-border-radius-bottomright: 0;
- border-bottom-right-radius: 0;}
-
-table { margin: 15px 10px; border-spacing: 0 3px;}
-tr td { border-width: 7px; border-style: solid;}
-tr td:first-child {
- -webkit-border-top-left-radius: 8px;
- -webkit-border-bottom-left-radius: 8px;
- -moz-border-radius-topleft: 8px;
- -moz-border-radius-bottomleft: 8px;
- border-top-left-radius: 8px;
- border-bottom-left-radius: 8px;
-}
-tr td:last-child {
- -webkit-border-top-right-radius: 8px;
- -webkit-border-bottom-right-radius: 8px;
- -moz-border-radius-topright: 8px;
- -moz-border-radius-bottomright: 8px;
- border-top-right-radius: 8px;
- border-bottom-right-radius: 8px;
-}
-tr.ok td { background: #afa; border-color: #afa;}
-tr.err td { background: #faa; border-color: #faa;}
-tr td { background: #ffa; border-color: #ffa;}
-
-#data { margin-bottom: 120px;}
-#status {
- background: #ddd;
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- height: 100px;
- padding: 5px 10px;
-}
-#status p {
- margin: 5px;
- padding: 0;
-}
-#result1 { opacity: .4;}
-#result2 { opacity: .6;}
-#input { display: none;}
diff --git a/inwentaryzacja/locate.htm b/inwentaryzacja/locate.htm
deleted file mode 100644
index d8b404c..0000000
--- a/inwentaryzacja/locate.htm
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>Inwentaryzacja</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<link rel="stylesheet" type="text/css" href="locate.css" />
-<script type="text/javascript" src="locate.js"></script>
-</head>
-<body>
-
-<noscript>
-Narzędzie wymaga JavaScriptu.
-</noscript>
-
-<div id="data">
-</div>
-
-<div id="status">
-<p id="result1">(puste)</p>
-<p id="result2">(puste)</p>
-<p id="result3">Proszę czekać...</p>
-<p id="input"><input type="text" name="i1" id="i1" size="8" tabindex="1" /> <input type="text" name="i2" id="i2" size="3" tabindex="2" /> <input type="text" name="i3" id="i3" size="3" tabindex="3" /> <input type="button" id="i4" value="Wprowadź" tabindex="4" /> <input type="button" id="i5" value="Zapisz dane na serwerze" tabindex="5" /> <input type="button" id="i6" value="Zakończ inwentaryzację" tabindex="6" /> </p>
-</div>
-
-<audio src="error.wav" id="audio"></audio>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/inwentaryzacja/locate.js b/inwentaryzacja/locate.js
deleted file mode 100644
index 64a84de..0000000
--- a/inwentaryzacja/locate.js
+++ /dev/null
@@ -1,359 +0,0 @@
-var xml;
-var ajax;
-var loc = false;
-
-function ajax() {
- try {
- ajax = new XMLHttpRequest();
- return;
- }
- catch(e) {
- var activex = ['Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP'];
- for(var i=0; i<activex.length; i++) {
- try {
- ajax = new ActiveXObject(activex[i]);
- return;
- }
- catch(e) {
- }
- }
- }
-
- fatalError('Przeglądarka nie obsługuje XMLHttpRequest');
-}
-
-function status(msg) {
- document.getElementById('result1').innerHTML = document.getElementById('result2').innerHTML
- document.getElementById('result2').innerHTML = document.getElementById('result3').innerHTML;
- document.getElementById('result3').innerHTML = msg;
-}
-
-function error(msg) {
- status('<span class="error">'+msg+'</span>');
- document.getElementById('audio').play();
-}
-
-function fatalError(msg) {
- status('<span class="error">'+msg+'</span>');
- throw new Exception('Błąd krytyczny: '+msg);
-}
-
-function changeLocation(element) {
- while(element && element.parentNode!=document && element.tagName != 'TABLE') {
- element = element.parentNode
- }
-
- if(!element || element.tagName != 'TABLE') {
- error('Podana lokalizacja nie istnieje lub jest nieznana.');
- return;
- }
-
- if(loc) {
- loc.className = '';
- }
-
- loc = element;
- loc.className = 'current';
- loc.scrollIntoView();
-}
-
-function makeCaption(regal, polka, rzad) {
- var caption = document.createElement('caption');
- caption.appendChild(document.createTextNode('Półka: '+regal+'/'+polka+'/'+rzad));
- caption.onclick = 'changeLocation(this)';
- return caption;
-}
-
-function textValue(element) {
- var text = '';
-
- for(var i=0; i<element.childNodes.length; i++) {
- if(element.childNodes.item(i) instanceof String) {
- text += element.childNodes.item(i);
- }
- else if(element.childNodes.item(i) instanceof Text) {
- text += element.childNodes.item(i).nodeValue;
- }
- else
- {
- text += textValue(element.childNodes.item(i));
- }
- }
-
- return text;
-}
-
-function makeHeader(caption) {
- var tr = document.createElement('tr');
- var th = document.createElement('th');
- th.appendChild(document.createTextNode('ID'));
- th.appendChild(document.createElement('br'));
- th.appendChild(document.createTextNode('status'));
- tr.appendChild(th);
- var th = document.createElement('th');
- th.appendChild(document.createTextNode('Autor'));
- th.appendChild(document.createElement('br'));
- th.appendChild(document.createTextNode('Tytuł'));
- tr.appendChild(th);
- var th = document.createElement('th');
- th.appendChild(document.createTextNode('Miejsce, rok'));
- th.appendChild(document.createElement('br'));
- th.appendChild(document.createTextNode('Wydawnictwo'));
- tr.appendChild(th);
-
- return tr;
-}
-
-function processBook(book) {
- var tr = document.createElement('tr');
- tr.id = book.attributes['id'].nodeValue;
- tr.onclick = 'changeBook(this)';
-
- var th = document.createElement('td');
- th.appendChild(document.createTextNode(book.attributes['id'].nodeValue.substr(1)));
- th.appendChild(document.createElement('br'));
- if(!book.hasAttribute('status')) {
- th.appendChild(document.createTextNode('Nieznany'));
- }
- else if(book.getAttribute('status') == 'ok') {
- tr.className = 'ok';
- th.appendChild(document.createTextNode('Na miejscu'));
- }
- else
- {
- tr.className = 'ok';
- th.appendChild(document.createTextNode('Przeniesiona'));
- }
- tr.appendChild(th);
- var th = document.createElement('td');
- th.appendChild(document.createTextNode(textValue(book.getElementsByTagName('autor').item(0))));
- th.appendChild(document.createElement('br'));
- th.appendChild(document.createTextNode(textValue(book.getElementsByTagName('tytul').item(0))));
- tr.appendChild(th);
- var th = document.createElement('td');
- th.appendChild(document.createTextNode(textValue(book.getElementsByTagName('miejsce').item(0))+' '+textValue(book.getElementsByTagName('rok').item(0))));
- th.appendChild(document.createElement('br'));
- th.appendChild(document.createTextNode(textValue(book.getElementsByTagName('wydawnictwo').item(0))));
- tr.appendChild(th);
-
- return tr;
-}
-
-function changeBook(book) {
- if(document.getElementById('input').style.display != 'block') {
- return false;
- }
-
- if(book.parentNode == loc) {
- xml.getElementById(book.id).setAttribute('status', 'ok');
-
- book.className = 'ok';
- book.childNodes[0].childNodes[2].data = 'Na miejscu';
- book.scrollIntoView();
- }
- else
- {
- xml.getElementById(loc.id).appendChild(xml.getElementById(book.id));
- xml.getElementById(book.id).setAttribute('status', 'moved');
-
- var book2 = book.cloneNode(true);
- book2.className = 'ok';
- book2.childNodes[0].childNodes[2].data = 'Przeniesiona';
-
- if(document.getElementById('e'+book.id)) {
- document.getElementById('e'+book.id).parentNode.removeChild(document.getElementById('e'+book.id));
- }
-
- book.className = 'err';
- book.id = 'e'+book.id;
- book.childNodes[0].childNodes[2].data = 'Przeniesiona';
-
- loc.appendChild(book2);
- book2.scrollIntoView();
- }
-}
-
-function clearInput() {
- document.getElementById('i1').value = document.getElementById('i2').value = document.getElementById('i3').value = '';
- document.getElementById('i1').focus();
-}
-
-function processInput() {
- if(document.getElementById('input').style.display != 'block') {
- return false;
- }
-
- var reg = /^([0-9]{1,8})$/;
- var i1 = document.getElementById('i1').value;
- var i2 = document.getElementById('i2').value;
- var i3 = document.getElementById('i3').value;
-
- if(i2 != '' || i3 != '') {
- if(!document.getElementById('m_'+i1+'_'+i2+'_'+i3)) {
- error('Podane regał/półka/rząd nie istnieją!');
- clearInput();
- return false;
- }
-
- changeLocation(document.getElementById('m_'+i1+'_'+i2+'_'+i3));
- status('Wybrano '+i1+'/'+i2+'/'+i3);
- clearInput();
- return true;
- }
-
- if(reg.test(i1)) {
- i1 = parseInt(i1, 10);
- if(!document.getElementById('k'+i1)) {
- error('Wybrana książka nie istnieje!');
- clearInput();
- return false;
- }
-
- changeBook(document.getElementById('k'+i1));
- status('OK - książka '+i1);
- clearInput();
- return true;
- }
-
- error('Nieznany typ (książka - 8 cyfr; regał - tekst; półka/rząd - liczby)!');
- clearInput();
- return false;
-}
-
-function keyEvent(e) {
- if(!e) e = window.event;
-
- if(e.keyCode == 13) {
- processInput();
- clearInput();
- return false;
- }
-}
-
-function saveWithCallback(callback) {
- ajax.open('POST', 'save.php', true);
- ajax.onreadystatechange = callback;
- ajax.send(xml);
-}
-
-function save() {
- document.getElementById('input').style.display = 'none';
- status('Zapisywanie. Proszę czekać...');
-
- saveWithCallback(function() {
- if(ajax.readyState == 3) {
- status('Wysyłanie danych...');
- }
- else if(ajax.readyState == 4) {
- if(ajax.status == 200) {
- status('Dane zostały zapisane. '+ajax.status);
- }
- else
- {
- error('Zapis nie powiódł się. Błąd HTTP '+ajax.status);
- }
-
- document.getElementById('input').style.display = 'block';
- }
- });
-}
-
-function end() {
- document.getElementById('input').style.display = 'none';
- status('Zapisywanie. Proszę czekać...');
-
- saveWithCallback(function() {
- if(ajax.readyState == 3) {
- status('Wysyłanie danych...');
- }
- else if(ajax.readyState == 4) {
- if(ajax.status == 200) {
- status('Dane zostały zapisane. '+ajax.status);
- status('Przekierowywanie... Proszę czekać...');
- window.location.replace('end.php');
- }
- else
- {
- error('Zapis nie powiódł się. Błąd HTTP '+ajax.status);
- document.getElementById('input').style.display = 'block';
- }
- }
- });
-}
-
-function process() {
- var number = 0;
- var header = makeHeader();
-
- xml = ajax.responseXML;
- if(!(xml instanceof XMLDocument)) {
- fatalError('Pobrany dokument nie jest poprawnym arkuszem XML');
- }
-
- var total = xml.getElementsByTagName('ksiazka').length;
-
- if(!xml.getElementById) {
- fatalError('Przeglądarka nie wspiera XMLDocument.getElementById');
- }
-
- status('Książek do przetworzenia: '+total);
- var miejsca = xml.getElementsByTagName('lokalizacja');
- for(var i=0; i<miejsca.length; i++) {
- var table = document.createElement('table');
- if(loc == false) {
- loc = table;
- }
- table.id = 'm_'+miejsca[i].attributes['regal'].nodeValue+'_'+miejsca[i].attributes['polka'].nodeValue+'_'+miejsca[i].attributes['rzad'].nodeValue;
- table.appendChild(makeCaption(miejsca[i].attributes['regal'].nodeValue, miejsca[i].attributes['polka'].nodeValue, miejsca[i].attributes['rzad'].nodeValue));
- table.appendChild(header.cloneNode(true));
-
- for(var j=0; j<miejsca[i].childNodes.length; j++) {
- if(!miejsca[i].childNodes[j].tagName) continue;
- table.appendChild(processBook(miejsca[i].childNodes[j]));
-
- if((++number % 100) == 0) {
- status('Przetworzono: '+Math.floor(number*100/total)+'% ('+number+' z '+total+')');
- }
- }
-
- document.getElementById('data').appendChild(table);
- }
-
- status('Przetworzono: 100% ('+total+' z '+total+')');
-
- changeLocation(loc);
-
- document.getElementById('input').style.display = 'block';
-
- document.getElementById('i1').onkeydown = document.getElementById('i2').onkeydown = document.getElementById('i3').onkeydown = keyEvent;
- document.getElementById('i4').onclick = processInput;
- document.getElementById('i5').onclick = save;
- document.getElementById('i6').onclick = end;
- document.getElementById('i1').focus();
-
- status('Gotowy do pracy.');
-}
-
-function getData() {
- status('Inicjowanie transferu...');
- ajax();
- ajax.open('GET', 'list.xml?time='+((new Date()).getTime())+'&rand='+Math.random(), true);
- ajax.onreadystatechange = function() {
- if(ajax.readyState == 3) {
- status('Pobieranie danych...');
- }
- else if(ajax.readyState == 4) {
- if(ajax.status == 200 || ajax.status == 304) {
- status('Przetwarzanie danych...');
- process();
- }
- else
- {
- fatalError('Kod HTTP '+ajax.status+'. Nie udało się pobrać danych. Spróbuj przeładować stronę.');
- }
- }
- };
- ajax.send();
-}
-
-window.onload = getData;
diff --git a/inwentaryzacja/make.php b/inwentaryzacja/make.php
deleted file mode 100644
index 5544aab..0000000
--- a/inwentaryzacja/make.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-$title = 'Inwentaryzacja - rozpoczęcie';
-include('design/top.php');
-include('../includes/config.php');
-include('../includes/db2.php');
-
-$fields = array('tytul', 'autor', 'miejsce', 'rok', 'wydawnictwo');
-
-$data = sql::query('SELECT * FROM `ksiazki` WHERE `wycofana`=\'0\' ORDER BY `regal` ASC, `polka` ASC, `rzad` ASC');
-
-$fp = fopen('list.xml', 'w');
-fwrite($fp, '<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE inwentaryzacja [
-<!ENTITY % quot """>
-<!ENTITY % amp "&">
-<!ENTITY % lt "<">
-<!ENTITY % gt ">">
-<!ELEMENT inwentaryzacja (lokalizacja)*>
-<!ELEMENT lokalizacja (ksiazka)*>
-<!ATTLIST lokalizacja
- id ID #IMPLIED
- regal CDATA #IMPLIED
- polka CDATA #IMPLIED
- rzad CDATA #IMPLIED>
-<!ELEMENT ksiazka (tytul | autor | miejsce | rok | wydawnictwo)*>
-<!ATTLIST ksiazka
- id ID #IMPLIED
- status CDATA #IMPLIED>
-<!ELEMENT tytul (#PCDATA)>
-<!ELEMENT autor (#PCDATA)>
-<!ELEMENT miejsce (#PCDATA)>
-<!ELEMENT rok (#PCDATA)>
-<!ELEMENT wydawnictwo (#PCDATA)>
-]>
-<inwentaryzacja>
-');
-
-$lastplace = NULL;
-
-while( ($entry = sql::fetchone($data)) !== FALSE ) {
- if($lastplace != $entry['regal'].'/'.$entry['polka'].'/'.$entry['rzad']) {
- if($lastplace !== NULL) {
- fwrite($fp, '</lokalizacja>'."\n");
- }
- fwrite($fp, '<lokalizacja id="m_'.$entry['regal'].'_'.$entry['polka'].'_'.$entry['rzad'].'" regal="'.$entry['regal'].'" polka="'.$entry['polka'].'" rzad="'.$entry['rzad'].'">'."\n");
- $lastplace = $entry['regal'].'/'.$entry['polka'].'/'.$entry['rzad'];
- }
-
- fwrite($fp, '<ksiazka id="k'.$entry['id'].'">'."\n");
- foreach($fields as $key) {
- fwrite($fp, '<'.$key.'>'.htmlspecialchars($entry[$key]).'</'.$key.'>'."\n");
- }
- fwrite($fp, '</ksiazka>'."\n");
-}
-
-if($lastplace !== NULL) {
- fwrite($fp, '</lokalizacja>'."\n");
-}
-
-fwrite($fp, '</inwentaryzacja>'."\n");
-
-?>
-
-<h3>Krok 1 z 3: Przygotowanie listy książek</h3>
-
-<p>Jeżeli nie widzisz błędów powyżej to krok pierwszy został pomyślnie zakończony.</p>
-
-<form action="locate.htm">
-<p>Możesz: <input type="submit" value="Rozpocząć inwentaryzację" /></p>
-</form>
-
-<?php
-include('design/bottom.php');
-?>
\ No newline at end of file
diff --git a/inwentaryzacja/save.php b/inwentaryzacja/save.php
deleted file mode 100644
index f71f668..0000000
--- a/inwentaryzacja/save.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-function errorHandler($errno, $errstr, $errfile, $errline) {
- header('HTTP/1.1 500 Internal Server Error');
-}
-
-set_error_handler('errorHandler');
-
-file_put_contents('list.xml', strtr(
- file_get_contents('php://input'),
- array( '<!DOCTYPE inwentaryzacja>' => '<!DOCTYPE inwentaryzacja [
-<!ENTITY % quot """>
-<!ENTITY % amp "&">
-<!ENTITY % lt "<">
-<!ENTITY % gt ">">
-<!ELEMENT inwentaryzacja (lokalizacja)*>
-<!ELEMENT lokalizacja (ksiazka)*>
-<!ATTLIST lokalizacja
- id ID #IMPLIED
- regal CDATA #IMPLIED
- polka CDATA #IMPLIED
- rzad CDATA #IMPLIED>
-<!ELEMENT ksiazka (tytul | autor | miejsce | rok | wydawnictwo)*>
-<!ATTLIST ksiazka
- id ID #IMPLIED
- status CDATA #IMPLIED>
-<!ELEMENT tytul (#PCDATA)>
-<!ELEMENT autor (#PCDATA)>
-<!ELEMENT miejsce (#PCDATA)>
-<!ELEMENT rok (#PCDATA)>
-<!ELEMENT wydawnictwo (#PCDATA)>
-]>')
-));
-?>
\ No newline at end of file
diff --git a/list_borrowed.php b/list_borrowed.php
deleted file mode 100644
index 5689ae2..0000000
--- a/list_borrowed.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-include('./includes/std.php');
-
-$title = 'Książki wypożyczone';
-include('./design/top.php');
-
-$_GET['do'] = TRUE;
-gotowe::lista();
-
-include('./design/bottom.php');
-?>
diff --git a/list_repulsed.php b/list_repulsed.php
deleted file mode 100644
index 4d05b44..0000000
--- a/list_repulsed.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-include('./includes/std.php');
-
-$title = 'Książki wycofane';
-include('./design/top.php');
-
-$_GET['wycofana'] = 1;
-gotowe::lista();
-
-include('./design/bottom.php');
-?>
diff --git a/place.php b/place.php
deleted file mode 100644
index 2fdb68a..0000000
--- a/place.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-$title = 'Położenie książki';
-include('design/top.php');
-?>
-
-<table class="main">
-<tr>
-<td>
-
-<h3>Ustawianie</h3>
-
-<form action="place_set.php" method="post" onsubmit="return ffalse('step1')">
-<p>Miejsce (regał/półka/rząd): <br />
-<input type="text" name="regal" id="step11" size="5" maxlength="5" required="required" />
-/ <input type="text" name="polka" id="step12" class="focus" size="3" maxlength="3" />
-/ <input type="text" name="rzad" id="step13" class="focus" size="3" maxlength="3" /></p>
-<p>KODY książek: <br /> <textarea name="kody" id="step14" cols="18" rows="8" required="required"></textarea></p>
-<p><input type="submit" value="Zastosuj" /></p>
-</form>
-
-<script type="text/javascript">
-document.getElementById('step11').focus();
-</script>
-
-</td>
-<td>
-
-<h3>Zmiana</h3>
-
-<form action="place_change.php" method="post" onsubmit="return ffalse('step2')">
-<p>Miejsce (regał/półka/rząd): <br />
-<input type="text" name="regal" id="step21" size="5" maxlength="5" required="required" />
-/ <input type="text" name="polka" id="step22" class="focus" size="3" maxlength="3" />
-/ <input type="text" name="rzad" id="step23" class="focus" size="3" maxlength="3" /></p>
-<p>Nowe miejsce (zostaw puste, aby usunąć): <br />
-<input type="text" name="regal2" id="step24" class="focus" size="5" maxlength="5" />
-/ <input type="text" name="polka2" id="step25" class="focus" size="3" maxlength="3" />
-/ <input type="text" name="rzad2" id="step26" class="focus" size="3" maxlength="3" /></p>
-<p><input type="submit" value="Zastosuj" /></p>
-</form>
-
-</td>
-</tr>
-
-<tr><td colspan="2"><p><i>Można pomijać argumenty półka i rząd, jeśli jest taka potrzeba.</i></p></td></tr>
-</table>
-
-<?php
-include('design/bottom.php');
-?>
diff --git a/place_change.php b/place_change.php
deleted file mode 100644
index 0d54718..0000000
--- a/place_change.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-include('./includes/std.php');
-
-validate::MSC($_POST['regal'], $_POST['polka'], $_POST['rzad']);
-if(!empty($_POST['regal2']) || !empty($_POST['polka2']) || !empty($_POST['rzad2'])) {
- validate::MSC($_POST['regal2'], $_POST['polka2'], $_POST['rzad2']);
-}
-
-$arr = array();
-
-if(!empty($_POST['regal'])) {
- $arr['regal'] = $_POST['regal'];
-}
-if(!empty($_POST['polka'])) {
- $arr['polka'] = $_POST['polka'];
-}
-if(!empty($_POST['rzad'])) {
- $arr['rzad'] = $_POST['rzad'];
-}
-
-$aff = ksiazki::miejsce($_POST['regal2'], $_POST['polka2'], $_POST['rzad2'], $arr);
-
-$title = 'Położenie książki';
-include('design/top.php');
-
-echo '<p>Ustalono położenie '.$aff.' książek.</p>';
-
-include('design/bottom.php');
-?>
diff --git a/place_set.php b/place_set.php
deleted file mode 100644
index edebd04..0000000
--- a/place_set.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-include('./includes/std.php');
-
-validate::MSC($_POST['regal'], $_POST['polka'], $_POST['rzad']);
-
-$kody = explode("\n", $_POST['kody']);
-$and = array('OR' => NULL);
-foreach($kody as $kod) {
- $kod = trim($kod);
- if(($pos=strpos($kod, '-'))!==FALSE) {
- $from = trim(substr($kod, 0, $pos));
- $to = trim(substr($kod, $pos+1));
-
- validate::KOD($from);
- validate::KOD($to);
-
- for($from=(int)$from; $from<=$to; $from++) {
- $and['id'][] = $from;
- }
- }
- elseif($kod != '') {
- validate::KOD($kod);
- $and['id'][] = (int)$kod;
- }
-}
-
-ksiazki::miejsce($_POST['regal'], $_POST['polka'], $_POST['rzad'], $and);
-
-$title = 'Położenie książki';
-include('design/top.php');
-
-echo '<p>Ustalono położenie następujących książek:</p>
-
-<ul>
-';
-
-foreach($and['id'] as $kod) {
- echo '<li>'.$kod.'</li>'."\n";
-}
-
-echo '</ul>';
-
-include('design/bottom.php');
-?>
diff --git a/sync.php b/sync.php
deleted file mode 100644
index 4cfb87a..0000000
--- a/sync.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-ini_set('zlib.output_compression', TRUE);
-
-include('./includes/std.php');
-
-$query = sql::query('SELECT * FROM ksiazki');
-
-$row = sql::fetchonea($query);
-
-echo implode("\0", array_keys($row))."\n";
-
-do {
- echo implode("\0", $row)."\n";
-
- $row = sql::fetchonea($query);
-} while($row !== FALSE);
-?>
--
Gitblit v1.9.1