示例#1
0
<?php

include './includes/std.php';
$title = 'Książki wycofane';
include './design/top.php';
$_GET['wycofana'] = 1;
gotowe::lista();
include './design/bottom.php';
示例#2
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';
示例#3
0
文件: gotowe.php 项目: Alambos/books
    static function lista()
    {
        if (!in_array($_GET['sort'], array('id', 'autor', 'tytul', 'miejsce', 'rok', 'wydawnictwo'))) {
            $_GET['sort'] = 'tytul';
            self::$default = TRUE;
        }
        if ($_GET['ord'] != 'desc') {
            $_GET['ord'] = 'asc';
        }
        if (!ctype_digit($_GET['strona'])) {
            $_GET['strona'] = 0;
        }
        if ($_GET['id']) {
            self::add('id', 13);
            self::add('polka', 3);
            self::add('rzad', 3);
        } else {
            self::add('tytul');
            self::add('autor');
            self::add('wydanie', 25);
            self::add('miejsce');
            self::add('rok', 4);
            self::add('wydawnictwo');
        }
        if (self::$default) {
            $sort = array('revelance' => self::invert_sort($_GET['ord']), $_GET['sort'] => $_GET['ord']);
        } else {
            $sort = array($_GET['sort'] => $_GET['ord']);
        }
        list($num, $ksiazki, $revelance) = ksiazki::szukaj_info($_GET, $sort, $_GET['strona'] * self::$nastrone, self::$nastrone);
        if ($num == 0) {
            error::add('Brak książek spełniających podane kryteria');
        } elseif ($num == 1 and !$revelance) {
            self::informacje(NULL, $ksiazki[0]);
            return TRUE;
        }
        echo '<table class="width">
<tr> <th>Okł.</th> <th> <b><a href="' . self::sort('id') . '">Kod</a></b> <br /> Wyd. </th> <th> <a href="' . self::sort('autor') . '">Autor</a> <br /> <b><a href="' . self::sort('tytul') . '">Tytuł</a></b> </th> <th> <a href="' . self::sort('miejsce') . '">Miejsce</a>, <a href="' . self::sort('rok') . '">rok</a> <br /> <a href="' . self::sort('wydawnictwo') . '">Wydawnictwo</a> </th>' . ($revelance ? ' <th><a href="' . self::sort('default') . '">Trafność</a></th>' : '') . ' <th> Wypożyczenie <br /> Opcje </th> </tr>
';
        foreach ($ksiazki as $ksiazka) {
            if ($ksiazka['wycofana']) {
                $info = 'Książka wycofana';
                $class = 'wyc';
            } else {
                if ($ksiazka['do'] !== NULL or $ksiazka['od'] === NULL) {
                    $class = 'norm';
                    $info = 'Książka w bibliotece';
                } else {
                    $class = 'poz';
                    $info = $ksiazka['kto'];
                    $pozycz = TRUE;
                }
            }
            $cover = ksiazki::okladka($ksiazka['id'], $ksiazka['ISBN']);
            echo '<tr' . ($class ? ' class="' . $class . '"' : '') . '>
	<td>
 		' . ($cover ? '<a href="cover.php?KOD=' . $ksiazka['id'] . '&amp;ISBN=' . $ksiazka['ISBN'] . '"><img src="' . $cover . '" alt="Okładka" /></a>' : '') . '
	</td>
	<td>
		<b>' . $ksiazka['id'] . '</b> <br />
		' . ($ksiazka['wydanie'] ? 'W. ' . $ksiazka['wydanie'] : '') . '
	</td>
	<td>
		' . $ksiazka['autor'] . ($ksiazka['regal'] ? ' <span>(' . $ksiazka['regal'] . ($ksiazka['polka'] ? '/' . $ksiazka['polka'] : '') . ($ksiazka['rzad'] ? '/' . $ksiazka['rzad'] : '') . ')</span>' : '') . ' <br />
		<b>' . $ksiazka['tytul'] . '</b> </td>
	<td>
		' . $ksiazka['miejsce'] . ' ' . $ksiazka['rok'] . ' <br />
		' . $ksiazka['wydawnictwo'] . ' 
	</td>' . ($revelance ? '
	<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>
	</td>
</tr>
';
        }
        echo '</table>

';
        self::strony($num);
    }
示例#4
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';
示例#5
0
文件: info.php 项目: Alambos/books
<?php

include './includes/std.php';
$title = 'Wypożyczanie książki';
include './design/top.php';
gotowe::informacje($_GET['kod']);
include './design/bottom.php';
示例#6
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';
示例#7
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';