mam pewien problem, a mianowicie:
Mam wyszukiwarkę która wyświetla dane za pomocą skryptu:
Kod
[/b]
<?php
include('ep3gate.class.php');
$ep3gate=new ep3gate(
'2284',
'Szablon1',
'ep3'
);
$ep3gate->printContents();
?>
[b]
<?php
include('ep3gate.class.php');
$ep3gate=new ep3gate(
'2284',
'Szablon1',
'ep3'
);
$ep3gate->printContents();
?>
[b]
następnie chciał bym aby z tej bazy były wyświetlane 10 wyników zdefinowanych przeze mnie, z tym że wyniki te powinny wyświetlać się w taki sam sposób jak w/w wyszukiwarka. poniżej kod to owych 10 wyników.
Kod
[/b]
$out = $ep3gate->getPlainData('?sp=3&a=2&sd=*1&ed=*22',true);
print '<table>';
foreach($out['V'] AS $row)
{
print '<tr><td rowspan="2" ><img src="'.$row['hotelimage'].'"
width="100px" height="70px" /></td>';
print '<td valign="top"><strong>'.$row['htlName'].'</strong>';
for ($i=1; $i<=$row['htlCat']; $i++)
print '<img src="images/star1.gif" />';
print '<br/>'.$row['htlCountry'].' /
'.$row['htlRegion'].'</td></tr>';
print
'<tr><td>'.$row['htlRoomDesc'].','.$row['htlSrvDesc'].'</td>';
print '<td align="right"><a href="'.$row['URL'].'">od
<strong>'.$row['minprice'].'</strong> PLN</a></td></tr>';
}
print '</table>';
[b]
$out = $ep3gate->getPlainData('?sp=3&a=2&sd=*1&ed=*22',true);
print '<table>';
foreach($out['V'] AS $row)
{
print '<tr><td rowspan="2" ><img src="'.$row['hotelimage'].'"
width="100px" height="70px" /></td>';
print '<td valign="top"><strong>'.$row['htlName'].'</strong>';
for ($i=1; $i<=$row['htlCat']; $i++)
print '<img src="images/star1.gif" />';
print '<br/>'.$row['htlCountry'].' /
'.$row['htlRegion'].'</td></tr>';
'<tr><td>'.$row['htlRoomDesc'].','.$row['htlSrvDesc'].'</td>';
print '<td align="right"><a href="'.$row['URL'].'">od
<strong>'.$row['minprice'].'</strong> PLN</a></td></tr>';
}
print '</table>';
[b]
Gryf napisał:
Cytat
wszystko ładnie po prostu przerób funkcję printContents z klasy ep3gate.
ale chciał bym wiedzieć w jaki sposób mam przerobić w/w funkcję printContent

pozdrawiam,