public function executeCartOrder() { $this->setLayout(false); $orderPage = Document::getDocumentByExclusiveTag("order_page"); if ($orderPage) { $orderPageUrl = $orderPage->getHref(); } $referer = $_SERVER['HTTP_REFERER']; if ($referer == $orderPageUrl) { $c = new Criteria(); $cat = CategoryI18nPeer::doSelectOne($c); if ($cat) { $referer = UtilsHelper::cleanURL($cat); } } $this->referer = $referer; /*$this->count = 0; if(array_key_exists("cart", $_SESSION)) { $this->count = count($_SESSION["cart"]); $products = array(); foreach ($_SESSION["cart"] as $item) { $doc = Document::getDocumentInstance($item); if($doc) $products[] = $doc; } $this->products = $products; }*/ }
<?php $count = $pager->getNbResults(); foreach ($pager->getResults() as $n) { $url = UtilsHelper::cleanURL($n); ?> <div class="news"> <h2><?php echo $n->getLabel(); ?> </h2> <?php echo UtilsHelper::Date($n->getStartDate(), "H:i | d.m.Y"); ?> | Прочетена: <strong><?php echo $n->getRds(); ?> пъти</strong> <?php $img = $n->getImage(); if ($image = Document::getDocumentInstance($img)) { ?> <img width="528" src="/media/upload/<?php echo $img; ?> " class="news_im" title="<?php echo $image->getDescription(); ?> "/> <?php } ?>
<div class="qfRepImpSsItem"> <div class="qfRepImpSsCol qfRepImpSsLeft"> <div class="qfRepImpSsColInn"> <div class="check_delete"><input type="checkbox" name="del[]" value="<?php echo $doc->getId(); ?> "></div> <!--<a href="import-session-report.html?is=<?php echo $sf_params->get('is') . "&del=" . $doc->getId(); ?> " class="qfSessCtrlBtn qfSessCtrlDark" style="float: left;"></a>--> <a href="<?php echo UtilsHelper::cleanURL(Document::getDocumentInstance($doc->getId())); ?> "> <!--<div class="qfRepImpSsColInnImg"><img alt="trade name" src="images/trade-mark-sm01.jpg"></div>--> <div class="qfRepImpSsColInnName"><h3><?php $tm = Document::getDocumentInstance($doc->getTrademark()); if ($tm) { $tmimg = $tm->getImage(); if ($tmimg) { ?> <img alt="trade mark" src="/media/display/id/<?php echo $tmimg; ?> "> <?php } else {
<div class="tree-col-l"> <h4><?php echo UtilsHelper::Localize("website.frontend.Latest-news-subfooter"); ?> </h4> <ul class="latest-news"> <?php foreach ($news as $n) { if (Document::getStatus($n->getId()) != UtilsHelper::STATUS_ACTIVE) { continue; } ?> <li> <h5 class="serif-bold"><a href="<?php echo UtilsHelper::cleanURL($n); ?> " title="<?php echo $n->getLabel(); ?> "><?php echo $n->getLabel(); ?> </a></h5> <p class="date">Date: <?php echo UtilsHelper::Date($n->getStartDate(), "M. j, Y"); ?> </p> </li> <?php } ?>
<?php if ($gallery) { $url = UtilsHelper::cleanURL($gallery, true); $label = $gallery->getLabel(); $cnt = count($images); ?> <div class="box_700_inter"> <h2><?php echo $label; ?> </h2> Photos: <strong><?php echo $cnt; ?> </strong> | Seen: <strong><?php echo $gallery->getRds(); ?> times</strong> <br><br> <ul class="gallerito"> <?php $i = 0; foreach ($images as $img) { $i++; $class = $i == 4 ? ' class="last"' : ''; $pic = Document::getDocumentInstance($img); ?> <li <?php echo $class; ?>
?> <img width="528" src="/media/upload/<?php echo $img; ?> " class="news_im" title="<?php echo $image->getDescription(); ?> "/> <?php } ?> <br /><br /> <?php echo $news->getContent(); ?> <div class="clearfix"></div> <div class="related"> <?php $related = explode(';', $news->getRelated()); $relatedArr = array(); foreach ($related as $id) { if ($user = Document::getDocumentInstance($id)) { $relatedArr[] = '<a href="' . UtilsHelper::cleanURL($user) . '">' . $user->getLabel() . '</a>'; } } echo implode(', ', $relatedArr); ?> </div> <?php }