Guest User

Untitled

a guest
Apr 8th, 2011
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 15.37 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="ru">
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=windows-1251" />
  5. <meta name="keywords" content="<?=($this->category->getKeywords()
  6.                                       ? strip_tags($this->category->getKeywords())
  7.                                       : $this->lang['meta']['keywords'])?>" />
  8. <meta name="description" content="<?=($this->category->getDescription()
  9.                                       ? strip_tags($this->category->getDescription())
  10.                                       : $this->lang['meta']['description'])?>" />
  11. <link rel="stylesheet" href="/http/css/frontend/main.css" type="text/css" />
  12. <link rel="shortcut icon" sizes="16x16" href="/favicon.ico" />
  13. <!--[if IE]>
  14.     <link rel="stylesheet" type="text/css" href="/http/css/frontend/all-ie.css" />
  15.     <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  16. <![endif]-->
  17. <script type="text/javascript" src="/http/js/library/index.js"></script>
  18. <script type="text/javascript" src="/http/js/library/locations.js"></script>
  19. <script type="text/javascript" src="/http/js/tooltip.js"></script>
  20. <script type="text/javascript" src="/http/js/jquery-1.4.2.min.js"></script>
  21. <script type="text/javascript" src="/http/js/jquery.corner.js"></script>
  22. <script type="text/javascript" src="/http/js/modules/common/scripts.js"></script>
  23. <?=$this->getHelper('Html_Title')->getHtml()?>
  24. </head><body>
  25.  
  26. <? include $this->getRealTemplatePath('Common/FrontendTop') ?>
  27.  
  28. <div id="advert_frontend-category-list" class="content">
  29.  
  30. <h2 class="header">
  31.     <a href="/categories/">Категории</a>
  32.     <?=$this->getHelper('Module_Category_Helper_BreadCrumbs', $this->path_to_category, '/categories')->getHtml()?>
  33. </h2>
  34.  
  35. <? include $this->getRealTemplatePath('Common/FrontendNotification') ?>
  36.  
  37. <?php if ($this->subcategories && $this->subcategories->count()): ?>
  38.     <div class="subcategories">
  39.         <h3 class="header">Подкатегории категории &laquo;<?=$this->category->getName()?>&raquo;:</h3>
  40.  
  41.         <? if ($this->category->getDescription()): ?>
  42.             <div id="category_description"><?=$this->category->getDescription()?></div>
  43.         <? endif;?>
  44.  
  45.         <?=$this->getHelper('Module_Category_Helper_Subcategories', $this->subcategories, '/categories')->getHtml()?>
  46.     </div>
  47. <?php endif; ?>
  48.  
  49. <div class="subcategories div-clear">
  50.     <h3 class="header">
  51.         <span title="Фильтр <?=($this->filter_search ? 'включён' : 'выключен. Для включения фильтра отметьте критерии поиска и нажимте кнопку &laquo;Запомнить&raquo;')?>" id="filter_<?=($this->filter_search ? 'online' : 'offline')?>">Фильтр по объявлениям:</span><sup><span title="Фильтрация объявлений позволяет выделить объявления подходящие конкретно вам по географическому признаку, а также по типу сделки. Фильтр запоминает введенные вами настройки и использует их на всех страницах сайта до тех пор, пока вы их не измените. Для работоспособности фильтра не отключайте cookie-файлы в вашем обозревателе." class="help">?</span></sup>
  52.     </h3>
  53.  
  54.     <form id="filter" method="get" action="<?=$this->hsc_request_uri?>">
  55.         <table>
  56.         <tbody>
  57.             <tr>
  58.                 <td>Вас интересуют:</td>
  59.                 <td>
  60.                     <?php foreach ($this->lang->advert_types_form_2 as $type => $value): ?>
  61.                         <span class="button_switch_advert_type" id="cover_<?=$type?>"><?=$this->getHelper('Helper_Form')->inputRadio('type', $type, $this->type, array('id'=>'label_'.$type))->getHtml()?><?=$this->getHelper('Helper_Form')->Label($value, 'label_'.$type, array('onclick'=>'switch_advert_type(\'cover_'.$type.'\', \'button_switch_advert_type\')'))->getHtml()?></span>
  62.                     <?php endforeach; ?>
  63.                         <span class="button_switch_advert_type" id="cover_"><?=$this->getHelper('Helper_Form')->inputRadio('type', '', (string)$this->type, array('id'=>'label_all'))->getHtml()?><?=$this->getHelper('Helper_Form')->Label('всё', 'label_all', array('onclick'=>'switch_advert_type(\'cover_\', \'button_switch_advert_type\')'))->getHtml()?></span>
  64.                 </td>
  65.             </tr>
  66.             <tr>
  67.                 <td>Местоположение:</td>
  68.                 <td>
  69.                     <? $select = $this->getHelper('Helper_Form')->inputSelect('id_country', $this->id_country, array('onchange'=>'locations_next_operation(this)', 'id'=>'country', 'class' => 'form_element_block'));
  70.                        $select->addOption( $this->getHelper('Helper_Form')->inputOption(0, 'не имеет значения', array('style'=>'font-weight:bold; color:#994015;')) );
  71.                     ?>
  72.                     <?=$select->getHtml();?>
  73.  
  74.                     <? $select = $this->getHelper('Helper_Form')->inputSelect('id_region', $this->id_region, array('onchange'=>'locations_next_operation(this)', 'id'=>'region', 'class' => 'form_element_block', 'style'=>"display:none"));
  75.                        $select->addOption( $this->getHelper('Helper_Form')->inputOption(0, 'не имеет значения', array('style'=>'font-weight:bold; color:#994015;')) );
  76.                     ?>
  77.                     <?=$select->getHtml();?>
  78.  
  79.                     <?
  80.                     $select = $this->getHelper('Helper_Form')->inputSelect('id_city', $this->id_city, array('onchange'=>'locations_next_operation(this)', 'id'=>'city', 'style'=>"display:none"));
  81.                     $select->addOption( $this->getHelper('Helper_Form')->inputOption(0, 'не имеет значения', array('style'=>'font-weight:bold; color:#994015;')) );
  82.                     ?>
  83.                     <?=$select->getHtml();?>
  84.  
  85.                     <input type="submit" name="submit" value="запомнить" />
  86.                 </td>
  87.             </tr>
  88.         </tbody>
  89.         </table>
  90.     </form>
  91. </div>
  92.  
  93. <script type="text/javascript">
  94. //<![CDATA[
  95. window.switch_advert_type = function(id, collection_class_name)
  96. {
  97.     var col = getElementsByTagClassName('span', collection_class_name);
  98.  
  99.     for (var i=0; i<col.length; i++)
  100.     {
  101.         col[i].className = collection_class_name;
  102.     }
  103.  
  104.     document.getElementById(id).className = collection_class_name + ' active';
  105. }
  106.  
  107. // выделяем при загрузке страницы активный эдемент
  108. window.switch_advert_type('cover_' + '<?=$this->type?>', 'button_switch_advert_type');
  109.  
  110. var checked_user_locations = new Array();
  111. checked_user_locations['country'] = '<?=$this->id_country?>';
  112. checked_user_locations['region'] = '<?=$this->id_region?>';
  113. checked_user_locations['city'] = '<?=$this->id_city?>';
  114.  
  115. locations_chain = new Array('country', 'region', 'city');
  116.  
  117. locations_create('country', 0);
  118.  
  119. <? if ($this->id_country): ?>
  120. locations_create('region', <?=$this->id_country?>);
  121. locations_visibility('region');
  122. <? endif; ?>
  123.  
  124. <? if ($this->id_region): ?>
  125. locations_create('city', <?=$this->id_region?>);
  126. locations_visibility('city');
  127. <? endif; ?>
  128. // ]]>
  129. </script>
  130.  
  131. <?php if($this->adverts && $this->adverts->count()): ?>
  132.     <?php foreach ($this->adverts as $row): ?>
  133.     <div class="advert_cover">
  134.         <div class="advert_content_outer">
  135.             <article class="advert_content">
  136.                 <div class="advert_text">
  137.                     <table class="table-structure">
  138.                        <tr>
  139.                            <td colspan="2">
  140.                                <header>
  141.                                    <h3 class="advert_header">
  142.                                        <a href="/categories<?=$row->category->getUrl()?><?=$row->advert->getId()?>.xhtml" id="advert<?=$row->advert->getId()?>"><?=$this->getHelper('Helper_Format')->userDataOutput($row->advert->getHeader())?></a>
  143.                                    </h3>
  144.                                </header>
  145.                            </td>
  146.                            <td class="right-col" rowspan="<?=$this->subcategories->count() ? 5 : 4?>">
  147.                                 <span class="advert_price space_nowrap">
  148.                                 <?php if (!$row->advert->getPrice()): ?>
  149.                                     <!--noindex-->Договорная<!--/noindex-->
  150.                                 <?php else:?>
  151.                                     <strong><?=number_format($row->advert->getPrice(),0,"."," ")?></strong> <?=$row->advert->getPriceType()->getAsSymbol()?>
  152.                                 <?php endif;?>
  153.                                 </span>
  154.                             </td>
  155.                        </tr>
  156.  
  157.                         <?php if ($row->category->getUrl() !== $this->category_url): ?>
  158.                         <tr>
  159.                             <td class="left-col description_td"><!--noindex-->Категория:<!--/noindex--></td>
  160.                             <td><p><a title="Показать все объявления в категории &laquo;<?=$row->category->getName()?>&raquo;" href="/categories<?=$row->category->getUrl()?>"><?=$row->category->getName()?></a></p></td>
  161.                         </tr>
  162.                         <?php endif; ?>
  163.  
  164.                        <tr>
  165.                            <td class="left-col description_td"><!--noindex-->Тип объявления:<!--/noindex--></td>
  166.                            <td><p><a title="Показать все объявления <?=$this->lang->advert_types_form_3->item($row->advert->getType()->getValue())?> в категории &laquo;<?=$row->category->getName()?>&raquo;" href="/categories<?=$row->category->getUrl()?>?type=<?=$row->advert->getType()->getValue()?>"><?=$row->advert->getType()->getAsText()?></a></p></td>
  167.                        </tr>
  168.  
  169.                         <tr>
  170.                             <td class="left-col description_td"><!--noindex-->Регион:<!--/noindex--></td>
  171.                             <td><p>
  172.                                 <?php if ($row->user_city->getId() || $row->user_region->getId() || $row->user_country->getId()): ?>
  173.                                     <? if ($row->user_city->getId()): ?><a title="Показать все объявления <?=$this->lang->advert_types_form_3->item($row->advert->getType()->getValue())?> в категории &laquo;<?=$row->category->getName()?>&raquo; в регионе <?=$row->user_city->getNameRu()?>, <?=$row->user_region->getNameRu()?>, <?=$row->user_country->getNameRu()?>" href="/categories<?=$row->category->getUrl()?>?type=<?=$row->advert->getType()->getValue()?>&amp;id_city=<?=$row->user_city->getId()?>&amp;id_region=<?=$row->user_city->getIdRegion()?>&amp;id_country=<?=$row->user_city->getIdCountry()?>"><?=$row->user_city->getNameRu()?></a>,<?php endif; ?>
  174.                                     <? if ($row->user_region->getId()): ?><a title="Показать все объявления <?=$this->lang->advert_types_form_3->item($row->advert->getType()->getValue())?> в категории &laquo;<?=$row->category->getName()?>&raquo; в регионе <?=$row->user_region->getNameRu()?>, <?=$row->user_country->getNameRu()?>" href="/categories<?=$row->category->getUrl()?>?type=<?=$row->advert->getType()->getValue()?>&amp;id_region=<?=$row->user_region->getId()?>&amp;id_country=<?=$row->user_region->getIdCountry()?>"><?=$row->user_region->getNameRu()?></a>,<?php endif; ?>
  175.                                     <? if ($row->user_country->getId()): ?><a title="Показать все объявления <?=$this->lang->advert_types_form_3->item($row->advert->getType()->getValue())?> в категории &laquo;<?=$row->category->getName()?>&raquo; в регионе <?=$row->user_country->getNameRu()?>" href="/categories<?=$row->category->getUrl()?>?type=<?=$row->advert->getType()->getValue()?>&amp;id_country=<?=$row->user_country->getId()?>"><?=$row->user_country->getNameRu()?></a><?php endif; ?>
  176.                                 <?php else: ?>
  177.                                     <!--noindex-->не указан<!--/noindex-->
  178.                                 <?php endif; ?>
  179.                             </p></td>
  180.                         </tr>
  181.                         <tr>
  182.                             <td class="text" colspan="2">
  183.                                 <p>
  184.                                  <?php
  185.                                  $advert_text = Helper_Format::getPreviewStr($row->advert->getText(), 200, '...');
  186.                                  echo $this->getHelper('Helper_Format')->run($advert_text, 'strip_tags', 'hsc', 'entDec', 'bb2html', 'bb2html2strip');
  187.                                  ?>
  188.                                 </p>
  189.                             </td>
  190.                         </tr>
  191.                     </table>
  192.                 </div>
  193.  
  194.                 <nav>
  195.                     <ul class="my-adverts--ul-advert-manager">
  196.                         <li class="zoom_link"><a class="space_nowrap" href="/categories<?=$row->category->getUrl()?><?=$row->advert->getId()?>.xhtml">Посмотреть объявление</a></li>
  197.                         <li class="advert_date space_nowrap">
  198.                             <!--noindex-->Размещено:<!--/noindex-->
  199.                             <time datetime="<?=$row->advert->getCreateDate()->format(DateTime::ATOM)?>" pubdate="pubdate"><?=$row->advert->getCreateDate()->formatDateForPeople()?></time></li>
  200.                     </ul>
  201.                 </nav>
  202.  
  203.                 <div class="div-clear"></div>
  204.             </article>
  205.         </div>
  206.     </div>
  207.     <?php endforeach; ?>
  208. <?php else: ?>
  209.     <div class="advert_cover">
  210.         <div class="advert_content_outer">
  211.             <article class="advert_content">
  212.                 <div class="advert_text robot">
  213.                     Привет, меня зовут Поисковый Робот.<br /><br />Мне очень не приятно тебе об этом говорить, но в этой категории я ничего не нашел по твоему запросу :(<br />Но это не моя вина, поверь. Просто <em>объявлений, удовлетворяющих критериям поиска</em>, на сайте пока нет.<br /><br />Попробуй <em>изменить параметры фильтра</em> и я обязательно постараюсь найти для тебя что-нибудь хорошее.<br /><br />Обещаю :)
  214.                 </div>
  215.  
  216.                 <ul class="my-adverts--ul-advert-manager">
  217.                     <li class="advert_date space_nowrap">Попробуйте изменить параметры фильтра</li>
  218.                 </ul>
  219.  
  220.                 <div class="div-clear"></div>
  221.  
  222.             </article>
  223.         </div>
  224.     </div>
  225. <?php endif; ?>
  226.  
  227. <?php
  228. $navigation = $this->getHelper('Pagination_Helper', $this->navigation)
  229.                    ->setCssNormalLinkClass('navigation_normal_link')
  230.                    ->setCssActiveLinkClass('navigation_open_link')
  231.                    ->setRequestUriParameter('id_city', $this->id_city)
  232.                    ->setRequestUriParameter('id_region', $this->id_region)
  233.                    ->setRequestUriParameter('id_country', $this->id_country)
  234.                    ->setRequestUriParameter('type', $this->type)
  235.                    ->setViewLastPageLabel(false);
  236. ?>
  237.  
  238. <div class="navigation_list">
  239.     Всего объявлений: <strong><?=$this->navigation->getCount()?></strong>
  240.     <? if ($navigation->getNavigation()->getCount()): ?>
  241.         <br /><br /><span class="navigation_title">Страницы:</span> <?=$navigation->getHtml()?>
  242.     <? endif; ?>
  243. </div>
  244.  
  245. <? if($this->category->getDescription() && !$this->subcategories->count()): ?>
  246. <div id="bottom_annotation"><p><?=$this->category->getDescription()?></p></div>
  247. <? endif; ?>
  248.  
  249. </div>
  250. <? include $this->getRealTemplatePath('Common/FrontendBottom') ?>
  251. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment