<?php
session_start();
session_register('hits');
include("includes/config.inc.php");
$db = mysql_connect($host, $user, $pass);
if ($suchwort == '')
{
$res = mysql_db_query($dbase, "select * from rubrik where rubrik_id = '$rb'");
$num = mysql_num_rows($res);
for ($i=0; $i<$num; $i++)
{
$ueberschrift = mysql_result($res, $i, "rubrik");
}
}
else
$ueberschrift = 'Ihr Suchergebnis';
if ($suchkrit == 'neu')
$ueberschrift = 'Neuerscheinungen';
if ($suchkrit == 'angebot')
$ueberschrift = 'Angebote';
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="includes/style.css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<?php
include("header.php");
?>
<table width="100%" border="0" cellpadding="0" cellspacing="10">
<tr>
<td width="101" valign="top">
<?php include("left.inc.php"); ?>
</td>
<td></td>
<td width="100%" valign="top"><table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="20"><img src="images/leer.gif" width="20" height="20"></td>
<p class=textHeadline><?php echo $ueberschrift; ?></p>
<p>
<?php
if ($suchwort == '')
$res = mysql_db_query($dbase, "select * from artikel where rubrik = '$rb' order by artikel_id");
if ($suchwort != '' and $suchkrit == 'isbn')
$res = mysql_db_query($dbase, "select * from artikel where isbn = '$suchwort' order by artikel_id");
if ($suchwort != '' and $suchkrit == 'wort')
$res = mysql_db_query($dbase, "select * from artikel where titel like '%$suchwort%' or untertitel like '%$suchwort%' or kurztext like '%$suchwort%' or langtext like '%$suchwort%' order by artikel_id");
if ($suchwort != '' and $suchkrit == 'wort')
$res = mysql_db_query($dbase, "select * from artikel where titel like '%$suchwort%' or untertitel like '%$suchwort%' or kurztext like '%$suchwort%' or langtext like '%$suchwort%'");
if ($suchkrit == 'neu')
$res = mysql_db_query($dbase, "select * from artikel where neu != '' order by artikel_id");
if ($suchkrit == 'angebot')
$res = mysql_db_query($dbase, "select * from artikel where angebot != '' order by artikel_id");
$num = mysql_num_rows($res);
$total = 0;
for ($i=0; $i<$num; $i++)
{
$isbn = mysql_result($res, $i, "isbn");
$titel = mysql_result($res, $i, "titel");
$kurztext = mysql_result($res, $i, "kurztext");
$langtext = mysql_result($res, $i, "langtext");
$preis = mysql_result($res, $i, "preis");
$image = mysql_result($res, $i, "image");
$artikel_id = mysql_result($res, $i, "artikel_id");
$untertitel = mysql_result($res, $i, "untertitel");
$pos = strpos($preis, ".");
if ($pos === false)
$preis = $preis.".00";
if ($image == '')
$image = "images/dummy.gif";
if ($isbn != '')
$isbn = "ISBN: ".$isbn;
?>
</p>
<td><form action="warenkorb.php" method="post" enctype="multipart/form-data"><input name="bestellnummer" type="hidden" value="<?=$artikel_id ?>"><table width="183" border="0" cellspacing="0" cellpadding="0"><tr><td valign="bottom"><img src="tableobenlinks.gif"></td><td valign="bottom"><img src="temptrumb.gif"></td><td valign="bottom"><img src="tableobenrechts.gif"></td></tr><tr><td valign="top" bgcolor="#f8f8f8"><img src="tablelinie.gif" height="100%" width="1" ></td><td height="100%" valign="top" bgcolor="#f8f8f8"><br><CENTER><a href="show_det.php?det=<?=$artikel_id ?>"><img border=0 src="images/artikel/thumb/<?=$image ?>"></a></CENTER><br><span style="font-family:Verdana;font-size:10pt;">Preis: <?=$preis ?>€</span><br><span style="font-family:Verdana;font-size:10pt;"> Inklusive: <?=$untertitel ?></span><br><br><CENTER><input type="image" src="warenkorb.jpg" value="In den Warenkorb" name="senden"></CENTER></td><td valign="top" bgcolor="#f8f8f8"align="right"><img src="tablelinie.gif" height="100%" width="1" align="center"></td></tr><td width="1"><img src="tableuntenlinks.gif"></td><td bgcolor="f8f8f8"><img src="tableuntenmitte.gif"width="100%" height="15"></td><td align="right"><img src="tableuntenrechts.gif"></td> </table></form>
<?php } ?>