1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110: | <?php
session_start();
// --> Start Variablendefinition
$st = $_REQUEST["st"];
$suchweiter = $_REQUEST["suchweiter"];
$suchwort = $_POST["suchwort"];
$suchkrit = $_REQUEST["suchkrit"];
$basket = $_POST["basket"];
$geloescht = $_REQUEST["geloescht"];
$aend = $_REQUEST["aend"];
$rb = $_REQUEST["rb"];
$nav = $_REQUEST["nav"];
$left = $_REQUEST["left"];
$waren = $_SESSION["array('waren')"];
$bestellnummer = $_REQUEST["bestellnummer"];
// <-- Ende Variablendefinition
function ArtikelListe ($suchwort, $suchkrit, $rb, $nav)
{
include("includes/config.inc.php");
$db = mysql_connect($host, $user, $pass);
if ($suchwort == '')
$res = mysql_db_query($dbase, "select * from artikel where rubrik = '$rb' order by artikel_id");
if ($suchwort != '' and $suchkrit == 'art_nr')
$res = mysql_db_query($dbase, "select * from artikel where art_nr = '$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%' order by artikel_id");
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++)
{
$art_nr = mysql_result($res, $i, "art_nr");
$titel = mysql_result($res, $i, "titel");
$inhalt = mysql_result($res, $i, "untertitel");
$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");
$mwst = mysql_result($res, $i, "mwst");
$preis = sprintf('%.2f', $preis);
if ($image != '')
$image = "<img border=0 src=\"images/artikel/thumb/$image\">";
$artikelListe = $artikelListe."<div>
<form action=\"show.php\" method=\"post\" enctype=\"multipart/form-data\">
<input name=\"bestellnummer\" type=\"hidden\" value=\"$artikel_id\">
<input name=\"rb\" type=\"hidden\" id=\"art_id2\" value=\"$rb\">
<input name=\"nav\" type=\"hidden\" id=\"art_id2\" value=\"$nav\">
<input name=\"basket\" type=\"hidden\" id=\"art_id2\" value=\"j\">
<table width=\"100%\">
<tr>
<td width=\"50%\" align=\"center\" valign=\"middle\"><a href=\"show_det.php?det=<?=$artikel_id ?>&nav=<?=$nav ?>\"><a href=\"show_det.php?det=$artikel_id&nav=$nav&rb=$rb\">$image</a></td>
<td width=\"50%\"><table width=\"100%\">
<tr>
<td colspan=\"2\" class=\"showArtikel\">$titel</td>
</tr>
<tr>
<td colspan=\"2\" class=\"showtext\">$kurztext</td>
</tr>
<tr>
<td colspan=\"2\" class=\"showArtnr\">Art.-Nr.: $art_nr</td>
</tr>
<tr>
<td colspan=\"2\" class=\"showPreis\">$preis €</td>
</tr>
<tr>
<td colspan=\"2\" class=\"showMwSt\">( incl. $mwst% MwSt. )</td>
</tr>
<tr>
<td colspan=\"2\" class=\"showArtnr\">$inhalt</td>
</tr>
<tr>
<td><img src=\"template/back/abstandT.png\" width=\"5\" height=\"10\"><br /><div align=\"left\"><input type=\"image\" src=\"template/button/korb.jpg\" name=\"senden\" alt=\"In den Warenkorb legen\"></div></td>
<td align=\"left\"><a href=\"show_det.php?det=$artikel_id&nav=$nav&rb=$rb\"><img src=\"template/button/infos.jpg\"></a></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan=\"2\" class=\"showline\" valign=\"middle\">
</td>
</tr>
</table>
</form></div>";
}
return $artikelListe;
}
echo ArtikelListe ($suchwort, $suchkrit, $rb, $nav); |