commit | author | age
|
175a52
|
1 |
<?php |
JK |
2 |
include('./includes/std.php'); |
|
3 |
|
|
4 |
validate::MSC($_POST['regal'], $_POST['polka'], $_POST['rzad']); |
|
5 |
|
|
6 |
$kody = explode("\n", $_POST['kody']); |
|
7 |
$and = array('OR' => NULL); |
|
8 |
foreach($kody as $kod) { |
|
9 |
$kod = trim($kod); |
|
10 |
if(($pos=strpos($kod, '-'))!==FALSE) { |
|
11 |
$from = trim(substr($kod, 0, $pos)); |
|
12 |
$to = trim(substr($kod, $pos+1)); |
|
13 |
|
|
14 |
validate::KOD($from); |
|
15 |
validate::KOD($to); |
|
16 |
|
|
17 |
for($from=(int)$from; $from<=$to; $from++) { |
|
18 |
$and['id'][] = $from; |
|
19 |
} |
|
20 |
} |
|
21 |
elseif($kod != '') { |
|
22 |
validate::KOD($kod); |
|
23 |
$and['id'][] = (int)$kod; |
|
24 |
} |
|
25 |
} |
|
26 |
|
|
27 |
ksiazki::miejsce($_POST['regal'], $_POST['polka'], $_POST['rzad'], $and); |
|
28 |
|
|
29 |
$title = 'Położenie książki'; |
|
30 |
include('design/top.php'); |
|
31 |
|
|
32 |
echo '<p>Ustalono położenie następujących książek:</p> |
|
33 |
|
|
34 |
<ul> |
|
35 |
'; |
|
36 |
|
|
37 |
foreach($and['id'] as $kod) { |
|
38 |
echo '<li>'.$kod.'</li>'."\n"; |
|
39 |
} |
|
40 |
|
|
41 |
echo '</ul>'; |
|
42 |
|
|
43 |
include('design/bottom.php'); |
|
44 |
?> |