2 /*------begin------ This protection code was suggested by Luki R. luki@karet.org ---- */
3 if (eregi("inc_products_search_result_mod.php",$PHP_SELF))
4 die('<meta http-equiv="refresh" content="0; url=../">');
7 # If smarty object is not available create one
11 * param 2 = FALSE = dont initialize
12 * param 3 = FALSE = show no copyright
13 * param 4 = FALSE = load no javascript code
15 include_once($root_path.'gui/smarty_template/smarty_care.class.php');
16 $smarty = new smarty_care('common',FALSE,FALSE,FALSE);
18 # Set a flag to display this page as standalone
22 if($bcat) $LDMSRCindex['']=""; // if parent is order catalog add one empty column at the end
23 if($update||
($mode=="search")){
28 $imgpath=$root_path."pharma/img/";
31 $imgpath=$root_path."med_depot/img/";
36 if($saveok||
(!$update)) $statik=true;
40 # Assign form elements
41 $smarty->assign('LDOrderNr',$LDOrderNr);
42 $smarty->assign('LDArticleName',$LDArticleName);
43 $smarty->assign('LDGeneric',$LDGeneric);
44 $smarty->assign('LDDescription',$LDDescription);
45 $smarty->assign('LDPacking',$LDPacking);
46 $smarty->assign('LDCAVE',$LDCAVE);
47 $smarty->assign('LDCategory',$LDCategory);
48 $smarty->assign('LDMinOrder',$LDMinOrder);
49 $smarty->assign('LDMaxOrder',$LDMaxOrder);
50 $smarty->assign('LDPcsProOrder',$LDPcsProOrder);
51 $smarty->assign('LDIndustrialNr',$LDIndustrialNr);
52 $smarty->assign('LDLicenseNr',$LDLicenseNr);
53 $smarty->assign('LDPicFile',$LDPicFile);
58 $zeile=$ergebnis->FetchRow();
60 # Assign the preview picture
62 if(($statik||
$update)&&($zeile['picfile']!="")){
63 $smarty->assign('LDPreview',$LDPreview);
64 $sTemp = '<img src="'.$imgpath.$zeile['picfile'].'" border=0 name="prevpic" ';
67 if(file_exists($imgpath.$zeile['picfile']))
69 $imgsize=GetImageSize($imgpath.$zeile['picfile']);
70 $sTemp =$sTemp.$imgsize[3];
73 $smarty->assign('sProductImage',$sTemp.'>');
75 $smarty->assign('sProductImage','<img src="../../gui/img/common/default/pixel.gif" border=0 name="prevpic">');
78 # Assign form inputs (or values)
80 if ($statik||
$update) $smarty->assign('sOrderNrInput',$zeile['bestellnum'].'</b><input type="hidden" name="bestellnum" value="'.$zeile['bestellnum'].'">');
81 else $smarty->assign('sOrderNrInput','<input type="text" name="bestellnum" value="'.$zeile['bestellnum'].'" size=20 maxlength=20>');
85 $smarty->assign('sArticleNameInput',$zeile['artikelname'].'<input type="hidden" name="artname" value="'.$zeile['artikelname'].'">');
86 $smarty->assign('sGenericInput',$zeile['generic'].'<input type="hidden" name="generic" value="'.$zeile['generic'].'">');
87 $smarty->assign('sDescriptionInput',nl2br($zeile['description']).'<input type="hidden" name="besc" value="'.$zeile['description'].'">');
88 $smarty->assign('sPackingInput',$zeile['packing'].'<input type="hidden" name="pack" value="'.$zeile['packing'].'">');
89 $smarty->assign('sCAVEInput',$zeile['cave'].'<input type="hidden" name="caveflag" value="'.$zeile['cave'].'">');
90 $smarty->assign('sCategoryInput',$zeile['medgroup'].'<input type="hidden" name="medgroup" value="'.$zeile['medgroup'].'">');
91 $smarty->assign('sMinOrderInput',$zeile['minorder'].'<input type="hidden" name="minorder" value="'.$zeile['minorder'].'">');
92 $smarty->assign('sMaxOrderInput',$zeile['maxorder'].'<input type="hidden" name="maxorder" value="'.$zeile['maxorder'].'">');
93 $smarty->assign('sPcsProOrderInput',$zeile['proorder'].'<input type="hidden" name="proorder" value="'.$zeile['proorder'].'">');
94 $smarty->assign('sIndustrialNrInput',$zeile['artikelnum'].'<input type="hidden" name="artnum" value="'.$zeile['artikelnum'].'">');
95 $smarty->assign('sLicenseNrInput',$zeile['industrynum'].'<input type="hidden" name="indusnum" value="'.$zeile['industrynum'].'">');
96 $smarty->assign('sPicFileInput',$zeile['picfile'].'<input type="hidden" name="bild" value="'.$zeile['picfile'].'">');
98 $smarty->assign('sArticleNameInput','<input type="text" name="artname" value="'.$zeile['artikelname'].'" size=40 maxlength=40>');
99 $smarty->assign('sGenericInput','<input type="text" name="generic" value="'.$zeile['generic'].'" size=40 maxlength=60>');
100 $smarty->assign('sDescriptionInput','<textarea name="besc" cols=35 rows=4>'.$zeile['description'].'</textarea>');
101 $smarty->assign('sPackingInput','<input type="text" name="pack" value="'.$zeile['packing'].'" size=40 maxlength=40>');
102 $smarty->assign('sCAVEInput','<input type="text" name="caveflag" value="'.$zeile['cave'].'" size=40 maxlength=80>');
103 $smarty->assign('sCategoryInput','<input type="text" name="medgroup" value="'.$zeile['medgroup'].'" size=20 maxlength=40>');
104 $smarty->assign('sMinOrderInput','<input type="text" name="minorder" value="'.$zeile['minorder'].'" size=20 maxlength=9>');
105 $smarty->assign('sMaxOrderInput','<input type="text" name="maxorder" value="'.$zeile['maxorder'].'" size=20 maxlength=9>');
106 $smarty->assign('sPcsProOrderInput','<input type="text" name="proorder" value="'.$zeile['proorder'].'" size=20 maxlength=40>');
107 $smarty->assign('sIndustrialNrInput','<input type="text" name="artnum" value="'.$zeile['industrynum'].'" size=20 maxlength=20>');
108 $smarty->assign('sLicenseNrInput','<input type="text" name="indusnum" value="'.$zeile['artikelname'].'" size=20 maxlength=20>');
109 $smarty->assign('sPicFileInput','<input type="file" name="bild" onChange="getfilepath(this)">');
113 <table border=0 cellspacing=2 cellpadding=3 >
115 <td align=right width=140 bgcolor="#ffffdd"><FONT face="Verdana,Helvetica,Arial" size=2 color="#000080">'.$LDOrderNr.'</td>
119 <td width=320 bgcolor="#ffffdd"><FONT face="Verdana,Helvetica,Arial" size=3><b>'.$zeile['bestellnum'].'</b><input type="hidden" name="bestellnum" value="'.$zeile['bestellnum'].'">
122 <td width=320 bgcolor="#ffffdd"><input type="text" name="bestellnum" value="'.$zeile['bestellnum'].'" size=20 maxlength=20>
126 <td rowspan=13 valign=top >';
127 if($zeile['picfile']!="")
130 <FONT face="Verdana,Helvetica,Arial" size=2 color="#800000">'.$LDPreview.':<br>
131 <img src="'.$imgpath.$zeile['picfile'].'" border=0 name="prevpic" ';
132 if(!$update||$statik)
134 if(file_exists($imgpath.$zeile['picfile']))
136 $imgsize=GetImageSize($imgpath.$zeile['picfile']);
142 else echo '<img src="'.$root_path.'gui/img/common/default/pixel.gif" border=0 name="prevpic" >';
146 <tr bgcolor="#ffffdd">
147 <td align=right><FONT face="Verdana,Helvetica,Arial" size=2 color="#000080">'.$LDArticleName.'</td>
151 <td><FONT face="Verdana,Helvetica,Arial" size=2 color="#800000"><b>'.$zeile['artikelname'].'</b><input type="hidden" name="artname" value="'.$zeile['artikelname'].'">
154 <td width=320 bgcolor="#ffffdd"><input type="text" name="artname" value="'.$zeile['artikelname'].'" size=20 maxlength=40>
158 <tr bgcolor="#ffffdd">
159 <td align=right><FONT face="Verdana,Helvetica,Arial" size=2 color="#000080">'.$LDGeneric.'</td>
163 <td><FONT face="Verdana,Helvetica,Arial" size=2>'.$zeile['generic'].'<input type="hidden" name="generic" value="'.$zeile['generic'].'">
166 <td width=320 bgcolor="#ffffdd"><input type="text" name="generic" value="'.$zeile['generic'].'" size=40 maxlength=60>
170 <tr bgcolor="#ffffdd">
171 <td align=right><FONT face="Verdana,Helvetica,Arial" size=2 color="#000080">'.$LDDescription.'</td>
175 <td><FONT face="Verdana,Helvetica,Arial" size=2>'.nl2br($zeile['description']).'<input type="hidden" name="besc" value="'.$zeile['desription'].'">
179 <td width=320 bgcolor="#ffffdd"><textarea name="besc" cols=35 rows=4>'.$zeile['description'].'</textarea>
183 <tr bgcolor="#ffffdd">
184 <td align=right><FONT face="Verdana,Helvetica,Arial" size=2 color="#000080">'.$LDPacking.'</td>
188 <td><FONT face="Verdana,Helvetica,Arial" size=2>'.$zeile['packing'].'<input type="hidden" name="pack" value="'.$zeile['packing'].'">
191 <td width=320 bgcolor="#ffffdd"><input type="text" name="pack" value="'.$zeile['packing'].'" size=40 maxlength=40>
195 <tr bgcolor="#ffffdd">
196 <td align=right><FONT face="Verdana,Helvetica,Arial" size=2 color="#000080">'.$LDCAVE.'</td>
200 <td><FONT face="Verdana,Helvetica,Arial" size=2>'.$zeile['cave'].'<input type="hidden" name="caveflag" value="'.$zeile['cave'].'">
203 <td width=320 bgcolor="#ffffdd"><input type="text" name="caveflag" value="'.$zeile['cave'].'" size=40 maxlength=80>
207 <tr bgcolor="#ffffdd">
208 <td align=right><FONT face="Verdana,Helvetica,Arial" size=2 color="#000080">'.$LDCategory.'</td>
212 <td><FONT face="Verdana,Helvetica,Arial" size=2>'.$zeile['medgroup'].'<input type="hidden" name="medgroup" value="'.$zeile['medgroup'].'">
215 <td width=320 bgcolor="#ffffdd"><input type="text" name="medgroup" value="'.$zeile['medgroup'].'" size=20 maxlength=40>
219 <tr bgcolor="#ffffdd">
220 <td align=right><FONT face="Verdana,Helvetica,Arial" size=2 color="#000080">'.$LDMinOrder.'</td>
224 <td><FONT face="Verdana,Helvetica,Arial" size=2>'.$zeile['minorder'].'<input type="hidden" name="minorder" value="'.$zeile['minorder'].'">
227 <td width=320 bgcolor="#ffffdd"><input type="text" name="minorder" value="'.$zeile['minorder'].'" size=20 maxlength=9>
231 <tr bgcolor="#ffffdd">
232 <td align=right><FONT face="Verdana,Helvetica,Arial" size=2 color="#000080">'.$LDMaxOrder.'</td>
236 <td><FONT face="Verdana,Helvetica,Arial" size=2>'.$zeile['maxorder'].'<input type="hidden" name="maxorder" value="'.$zeile['maxorder'].'">
239 <td width=320 bgcolor="#ffffdd"><input type="text" name="maxorder" value="'.$zeile['maxorder'].'" size=20 maxlength=9>
243 <tr bgcolor="#ffffdd">
244 <td align=right><FONT face="Verdana,Helvetica,Arial" size=2 color="#000080">'.$LDPcsProOrder.'</td>
248 <td><FONT face="Verdana,Helvetica,Arial" size=2>'.$zeile['proorder'].'<input type="hidden" name="proorder" value="'.$zeile['proorder'].'"></td>
251 <td width=320 bgcolor="#ffffdd"><input type="text" name="proorder" value="'.$zeile['proorder'].'" size=20 maxlength=40>
255 <tr bgcolor="#ffffdd">
256 <td align=right><FONT face="Verdana,Helvetica,Arial" size=2 color="#000080">'.$LDIndustrialNr.'</td>
260 <td><FONT face="Verdana,Helvetica,Arial" size=2>'.$zeile['artikelnum'].'<input type="hidden" name="artnum" value="'.$zeile['artikelnum'].'">
263 <td width=320 bgcolor="#ffffdd"><input type="text" name="artnum" value="'.$zeile['artikelnum'].'" size=20 maxlength=20>
267 <tr bgcolor="#ffffdd">
268 <td align=right><FONT face="Verdana,Helvetica,Arial" size=2 color="#000080">'.$LDLicenseNr.'</td>
272 <td><FONT face="Verdana,Helvetica,Arial" size=2>'.$zeile['industrynum'].'<input type="hidden" name="indusnum" value="'.$zeile['industrynum'].'">
275 <td width=320 bgcolor="#ffffdd"><input type="text" name="indusnum" value="'.$zeile['industrynum'].'" size=20 maxlength=20>
280 <tr bgcolor="#ffffdd">
281 <td align=right><FONT face="Verdana,Helvetica,Arial" size=2 color="#000080">'.$LDPicFile.'</td>
285 <td><FONT face="Verdana,Helvetica,Arial" size=2>'.$zeile['picfile'].'<input type="hidden" name="bild" value="'.$zeile['picfile'].'"></td>
288 <td width=320 bgcolor="#ffffdd"><input type="file" name="bild" onChange="getfilepath(this)">
296 # If display is forced
297 if($bShowThisForm) $smarty->display('products/form.tpl');
300 echo "<p>".str_replace("~nr~",$linecount,$LDFoundNrData)."<br>$LDClk2SeeInfo<p>";
302 echo "<table border=0 cellpadding=3 cellspacing=1> ";
304 echo '<tr class="wardlisttitlerow">';
306 for($i=0;$i<sizeof($LDMSRCindex)-1;$i++
)
308 echo '<td>'.$LDMSRCindex[$i].'</td>';
312 /* Load common icons */
313 $img_info=createComIcon($root_path,'info3.gif','0');
314 $img_arrow=createComIcon($root_path,'dwnarrowgrnlrg.gif','0');
316 while($zeile=$ergebnis->FetchRow())
319 if($toggle) { echo "wardlistrow2>"; $toggle=0;} else {echo "wardlistrow1>"; $toggle=1;};
321 <td valign="top"><a href="'.$thisfile.URL_APPEND
.'&dept_nr='.$dept_nr.'&keyword='.$zeile['bestellnum'].'&mode=search&from=multiple&cat='.$cat.'&userck='.$userck.'"><img '.$img_info.' alt="'.$LDOpenInfo.$zeile['artikelname'].'"></a></td>
322 <td valign="top"><font size=1>'.$zeile['bestellnum'].'</td>
323 <td valign="top"><font size=1>'.$zeile['artikelnum'].'</td>
324 <td valign="top"><font size=1>'.$zeile['industrynum'].'</td>
325 <td valign="top"><a href="'.$thisfile.URL_APPEND
.'&dept_nr='.$dept_nr.'&keyword='.$zeile['bestellnum'].'&mode=search&from=multiple&cat='.$cat.'&userck='.$userck.'"><font size=2 color="#800000"><b>'.$zeile['artikelname'].'</b></font></a></td>
326 <td valign="top"><font size=1>'.$zeile['generic'].'</td>
327 <td valign="top"><font size=1>'.$zeile['description'].'</td>
329 // if parent is order catalog add this option column at the end
331 <td valign="top"><a href="'.$thisfile.URL_APPEND
.'&dept_nr='.$dept_nr.'&mode=save&artikelname='.str_replace("&","%26",strtr($zeile['artikelname']," ","+")).'&bestellnum='.$zeile['bestellnum'].'&proorder='.str_replace(" ","+",$zeile['proorder']).'&hit=0&cat='.$cat.'&userck='.$userck.'"><img '.$img_arrow.' alt="'.$LDPut2Catalog.'"></a></td>';
339 <a href="#pagetop">'.$LDPageTop.'</a>';
340 }//end of if $linecount>15
345 <p><img '.createMascot($root_path,'mascot1_r.gif','0','middle').'>