Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. <?php defined('C5_EXECUTE') or die('Access Denied.');
  2.  
  3. if (isset($error)) {
  4. ?><?php echo $error?><br/><br/><?php
  5. }
  6.  
  7. if (!isset($query) || !is_string($query)) {
  8. $query = '';
  9. }
  10.  
  11. ?><form action="<?php echo $view->url($resultTargetURL)?>" method="get" class="ccm-search-block-form"><?php
  12. if (isset($title) && ($title !== '')) {
  13. ?><h3><?php echo h($title)?></h3><?php
  14. }?>
  15. <!-- 追加した部分です ------------------------------------------------------------- -->
  16. <h4>食事ジャンル</h4>
  17. <div>
  18. <?php
  19. Loader::model('attribute/categories/collection');
  20. $ak = CollectionAttributeKey::getByHandle('meal_genre');
  21. $ak->render('search'); ?>
  22. </div>
  23.  
  24. <h4>場所</h4>
  25. <div>
  26. <?php
  27. Loader::model('attribute/categories/collection');
  28. $ak = CollectionAttributeKey::getByHandle('meal_area');
  29. $ak->render('search'); ?>
  30. </div>
  31. <!-- 追加した部分ここまで ------------------------------------------------------------- -->
  32.  
  33. <?php if ($query === '') {
  34. ?><input name="search_paths[]" type="hidden" value="<?php echo htmlentities($baseSearchPath, ENT_COMPAT, APP_CHARSET) ?>" /><?php
  35. } elseif (isset($_REQUEST['search_paths']) && is_array($_REQUEST['search_paths'])) {
  36. foreach ($_REQUEST['search_paths'] as $search_path) {
  37. ?><input name="search_paths[]" type="hidden" value="<?php echo htmlentities($search_path, ENT_COMPAT, APP_CHARSET) ?>" /><?php
  38. }
  39. }
  40. ?><input name="query" type="text" value="<?php echo htmlentities($query, ENT_COMPAT, APP_CHARSET)?>" class="ccm-search-block-text" /><?php
  41. if (isset($buttonText) && ($buttonText !== '')) {
  42. ?> <input name="submit" type="submit" value="<?php echo h($buttonText)?>" class="btn btn-default ccm-search-block-submit" /><?php
  43. }
  44.  
  45. if (isset($do_search) && $do_search) {
  46. if (count($results) == 0) {
  47. ?><h4 style="margin-top:32px"><?php echo t('There were no results found. Please try another keyword or phrase.')?></h4><?php
  48. } else {
  49. $tt = Core::make('helper/text');
  50. ?><div id="searchResults"><?php
  51. foreach ($results as $r) {
  52. $currentPageBody = $this->controller->highlightedExtendedMarkup($r->getPageIndexContent(), $query);
  53. ?><div class="searchResult">
  54. <h3><a href="<?php echo $r->getCollectionLink()?>"><?php echo $r->getCollectionName()?></a></h3>
  55. <p><?php
  56. if ($r->getCollectionDescription()) {
  57. echo $this->controller->highlightedMarkup($tt->shortText($r->getCollectionDescription()), $query);
  58. ?><br/><?php
  59.  
  60. }
  61. echo $currentPageBody;
  62. ?> <br/><a href="<?php echo $r->getCollectionLink()?>" class="pageLink"><?php echo $this->controller->highlightedMarkup($r->getCollectionLink(), $query)?></a>
  63. </p>
  64. </div><?php
  65. }
  66. ?></div><?php
  67. $pages = $pagination->getCurrentPageResults();
  68. if ($pagination->getTotalPages() > 1 && $pagination->haveToPaginate()) {
  69. $showPagination = true;
  70. echo $pagination->renderDefaultView();
  71. }
  72. }
  73. }
  74. ?></form><?php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement