예제 #1
0
                    <ul>
                        <li><a href="articles.php?cat=1">Alte Waffen</a></li>
                        <li><a href="articles.php?cat=2">Alter Schmuck</a></li>
                        <li><a href="articles.php?cat=3">Alte M&ouml;bel</a></li>
                    </ul>                       
                </li>
            </ul>
        </div>
		<!-- /#sidebar-wrapper -->
		
		<div id="page-content-wrapper">
		<?php 
include_once 'controller/antiquitaetcontroller.php';
include_once 'model/antiquitaet.php';
echo '<table>';
$Controller = new AntiquitaetController();
if (isset($_GET['cat'])) {
    $list = $Controller->Liste($_GET['cat']);
} else {
    $list = $Controller->Liste();
}
$starter = '<tr class="article"><td><img class="smallpreview" width="200" height="200" alt="Artikelbild" src="';
$middle = '" alt="Artikelbild"></td><td>';
$end = '</td></tr>';
foreach ($list as $element) {
    echo $starter . $element->getImage() . $middle . $element->getName() . ': ' . $element->getDescription() . '<br>' . $element->getPrice() . $end;
}
echo '</table>';
?>
    </div>
    <!-- /#wrapper -->
예제 #2
0
파일: article.php 프로젝트: TheRobidog/M133
			}

			$starter = '<tr class="article"><td><img class="smallpreview" src="images/';
			$middle = '" alt="Artikelbild"></td><td>';
			$end = '</td></tr>';

			foreach($list as $element){
				echo $starter . $element->getImage() . $middle . $element->getName() . ': ' . $element->getDescription() . '<br>' . $element->getPrice() . $end;
			}

			echo '</table>';
*/
include_once 'controller/antiquitaetcontroller.php';
include_once 'model/antiquitaet.php';
if (isset($_GET['article'])) {
    $controller = new AntiquitaetController();
    $oneart = $controller->ShowOne($_GET['article']);
    echo '<table>';
    echo '<tr>';
    echo '<td colspan="2">' . $oneart->GetName() . '</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<td rowspan="2"><img class="preview" src="' . $oneart->getImage() . '"></td>';
    echo '<td>' . $oneart->getDescription() . '</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<td>' . $oneart->getPrice() . '</td>';
    echo '</tr>';
    echo '</table>';
}
?>