<?
include("include/gora.php");
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-2\"
</head>
<body>
<CENTER>
<form action=\"rezultaty.php\" method=\"post\">
Szukaj wg:
</BR>
</BR>
<select name=\"metoda_szukania\">
<option value=\"przedmiot\">Przedmiot
<option value=\"autor\">Autor
<option value=\"kat\">Kategoria
<option value=\"nr_inw\">Nr. inw
</select>
</BR>
</BR>
WprowadĽ poszukiwane wyrażenie:<br />
<input name=\"wyrazenie\" type=\"text\">
</BR>
</BR>
<input type=\"submit\" value=\"Szukaj\">
</form>
</center>
</body>
</html>
";
?>
<html>
<head>
<title>Karta eksponatów - wyniki wyszukiwania</title>
<script language="Javascript">
<!--
function nowe_okno(url,tytul,opis)
{
var okno;
if (okno){
okno.close();
}
if (url==''){
okno = window.open('',tytul,'toolbar=no, location=no, directories=no, status=no, menubar=no, width=200, height=200, scrollbars=no, resizable=no');
okno.document.open();
okno.document.write('<body bgcolor="navy">');
okno.document.write('<center><b><font color="yellow">'+opis+'</b></center<');
} else {
okno = window.open('',tytul,'toolbar=no, location=no, directories=no, status=no, menubar=no, width=200, height=200, scrollbars=no, resizable=no');
okno.document.open();
okno.document.write("<HEAD><title>"+tytul+"</title></head><BODY leftmargin=1 topmargin=1><IMG src="+url+"></body>");
okno.document.write('<body bgcolor="navy">');
okno.document.write('<center><b><font color="yellow">'+opis+'</b></center<');
}
okno.document.close();
okno.focus();
}
//-->
</script>
<meta http-equiv="Content-Type" content="text/html; CHARSET=ISO-8859-2"
</head>
<body>
<table align="center" border="" width="95%" cellspacing="0" cellpadding="0" >
<tr>
<td width="91%" colspan="7" bgcolor="#C0C0C0">
<p align="center"><b><font size="2">Wykaz kart eksponatów</font></b></td>
</tr>
<tr>
<td width="4%" align="center" bgcolor="#E0E0E0"><p align="center"><font size="2">ID</font></td>
<td width="10%" align="center" bgcolor="#E0E0E0"><p align="center"><font size="2">Przedmiot</font></td>
<td width="8%" align="center" bgcolor="#E0E0E0"><font size="2">Fotografia i nr inw.</font></td>
<td width="10%" align="center" bgcolor="#E0E0E0"><font size="2">Autor</font></td>
<td width="8%" align="center" bgcolor="#E0E0E0"><font size="2">Kategoria</font></td>
<td width="18%" align="center" bgcolor="#E0E0E0"><font size="2">Opis</font></td>
<td width="8%" align="center" bgcolor="#E0E0E0"><p align="center"><font size="2">Działanie</font></td>
</body>
</HTML>
<?
include("include/globals.php");
require("paging_class.php");
$paging=new paging(8,3);
require("../config.php");
$qw=explode_keyword($_GET[keyword]);
$paging->query("select * from historia where $qw order by karta_id asc");
$page=$paging->print_info();
if (!empty($page["keyword"])) echo "Keyword : <b>$page[keyword]</b><br>\n";
if (empty($page["total"])) { echo "<u>Not Found</u>\n"; } else {
echo "Rekord $page[start] - $page[end] z $page[total] [wszystkich $page[total_pages] stron]<br>\n"; }
include("include/zajawka.php");
while ($result=$paging->result_assoc())
{
$color=$paging->print_color("#999999","#999999")
?>
<?
{
echo "<tr><div align=\"center\"> <td width=\"4%\">".$result['karta_id']."</td>
<td width=\"16%\">".$result['przedmiot']."</td>
<td width=\"10%\"><center><img src=../../../upload/hi/".$result['obrazek'].".jpg width='160'><br>".$result['nr_inw']." </center></td>
<td width=\"14%\">".$result['autor']."</td>
<td width=\"8%\">".$result['kat']."</td>
// tutaj próbuje wywołać skrypt i nie wychodzi
<td width=\"8%\">".zajawka($result['opis'], 200)." <a href='onclick="java script: nowe_okno('','Pełny opis','całkowity opis lub zdjęcie')"> [więcej]</a></td>
<td width=\"8%\"><center><a href=\"karta.php?id=".$result['karta_id']."\">Pokaż kartę</a></center></td>
</tr></div>";
}
}
echo "<A HREF=\"szukaj.php?&page=1\">pierwsza </A>"; echo $paging->print_link();
//FUNCTION
function explode_keyword($q)
{
//trim
$mode="AND";
for ($i=0;$i<count($q2);$i++) {
$condition=$condition."nr_inw"." like '%".$q2["$i"]."%' ".$mode." ";
}
$condition=substr($condition,0
,-4
); return $condition;
}
?>
<?
echo "<A HREF=\"szukaj.php?&page=$page[total_pages]\">ostatnia</A>"; ?>
<?php
include("count.php")
?>