예제 #1
0
파일: all.php 프로젝트: kdexter/oscommerce
<?php 
echo osc_image(DIR_WS_IMAGES . $OSCOM_Template->getPageImage(), $OSCOM_Template->getPageTitle(), HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT, 'id="pageIcon"');
?>

<h1><?php 
echo $OSCOM_Template->getPageTitle();
?>
</h1>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php 
$OSCOM_Products = new Products();
$OSCOM_Products->setSortBy('date_added', '-');
$Qproducts = $OSCOM_Products->execute();
if ($Qproducts->numberOfRows() > 0) {
    while ($Qproducts->next()) {
        $OSCOM_Product = new Product($Qproducts->valueInt('products_id'));
        ?>

  <tr>
    <td width="<?php 
        echo $OSCOM_Image->getWidth('thumbnails') + 10;
        ?>
" valign="top" align="center">

<?php 
        if ($OSCOM_Product->hasImage()) {
            echo osc_link_object(OSCOM::getLink(null, null, $OSCOM_Product->getKeyword()), $OSCOM_Image->show($OSCOM_Product->getImage(), $OSCOM_Product->getTitle()));
        }
예제 #2
0
use osCommerce\OM\Core\PDO;
use osCommerce\OM\Core\Site\Shop\Product;
use osCommerce\OM\Core\Site\Shop\Products;
?>

<h1><?php 
echo $OSCOM_Template->getPageTitle();
?>
</h1>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php 
$OSCOM_Products = new Products();
$OSCOM_Products->setSortBy('date_added', '-');
$products_listing = $OSCOM_Products->execute();
if ($products_listing['total'] > 0) {
    foreach ($products_listing['entries'] as $p) {
        $OSCOM_Product = new Product($p['products_id']);
        ?>

  <tr>
    <td width="<?php 
        echo $OSCOM_Image->getWidth('thumbnails') + 10;
        ?>
" valign="top" align="center">

<?php 
        if ($OSCOM_Product->hasImage()) {
            echo HTML::link(OSCOM::getLink(null, null, $OSCOM_Product->getKeyword()), $OSCOM_Image->show($OSCOM_Product->getImage(), $OSCOM_Product->getTitle()));
        }