global_search_view.php 8.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php include 'header.php' ?>
  2. <section id="smallslider">
  3. <div class="subpage-head agent-head">
  4. <h1>Találatok</h1>
  5. </div>
  6. </section>
  7. <section id="content">
  8. <div class="text-wrap">
  9. <div class="breadcrumb"><a href="/">Home</a> &raquo; <a href="/search/index/?keyword=<?=$keyword?>">Találatok</a></div>
  10. <div class="menu-block">
  11. <ul>
  12. <?php if (!empty($properties)) : ?><li <?php if ($section=='properties') : ?>class="active-submenu-item"<?php endif; ?>><a href="/search/index/properties/?keyword=<?=$keyword?>">Ingatlanok</a></li><?php endif; ?>
  13. <?php if (!empty($offices)) : ?><li <?php if ($section=='offices') : ?>class="active-submenu-item"<?php endif; ?>><a href="/search/index/offices/?keyword=<?=$keyword?>">Irodák</a></li><?php endif; ?>
  14. <?php if (!empty($agents)) : ?><li <?php if ($section=='agents') : ?>class="active-submenu-item"<?php endif; ?>><a href="/search/index/agents/?keyword=<?=$keyword?>">Értékesítők</a></li><?php endif; ?>
  15. <?php if (!empty($pages)) : ?><li <?php if ($section=='pages') : ?>class="active-submenu-item"<?php endif; ?>><a href="/search/index/pages/?keyword=<?=$keyword?>">Tartalmak</a></li><?php endif; ?>
  16. </ul>
  17. <br><br>
  18. </div>
  19. <div class="text-block">
  20. <?php if (empty($properties) && empty($offices) && empty($agents) && empty($pages) && $section=='') : ?>
  21. <p>Nincs találat a keresett kifejezésre...</p>
  22. <?php endif; ?>
  23. <?php if (!empty($properties) && ($section=='' || $section=='properties')) : ?>
  24. <h2>Ingatlanok</h2>
  25. <p>
  26. <?php foreach ($properties as $property) : ?>
  27. <?php $min = strtolower($keyword); $max = strtoupper($keyword); $property->iranyitoszam = str_replace($keyword,"<span style='color: lightgreen; font-weight: bold;'>".$keyword."</span>",$property->iranyitoszam); $property->iranyitoszam = str_replace($min,"<span style='color: lightgreen; font-weight: bold;'>".$min."</span>",$property->iranyitoszam); $property->iranyitoszam = str_replace($max,"<span style='color: lightgreen; font-weight: bold;'>".$max."</span>",$property->iranyitoszam); ?>
  28. <?php $min = strtolower($keyword); $max = strtoupper($keyword); $property->telepules = str_replace($keyword,"<span style='color: lightgreen; font-weight: bold;'>".$keyword."</span>",$property->telepules); $property->telepules = str_replace($min,"<span style='color: lightgreen; font-weight: bold;'>".$min."</span>",$property->telepules); $property->telepules = str_replace($max,"<span style='color: lightgreen; font-weight: bold;'>".$max."</span>",$property->telepules); ?>
  29. <?php $min = strtolower($keyword); $max = strtoupper($keyword); $property->utcanev = str_replace($keyword,"<span style='color: lightgreen; font-weight: bold;'>".$keyword."</span>",$property->utcanev); $property->utcanev = str_replace($min,"<span style='color: lightgreen; font-weight: bold;'>".$min."</span>",$property->utcanev); $property->utcanev = str_replace($max,"<span style='color: lightgreen; font-weight: bold;'>".$max."</span>",$property->utcanev); ?>
  30. <?php $min = strtolower($keyword); $max = strtoupper($keyword); $property->hazszam = str_replace($keyword,"<span style='color: lightgreen; font-weight: bold;'>".$keyword."</span>",$property->hazszam); $property->hazszam = str_replace($min,"<span style='color: lightgreen; font-weight: bold;'>".$min."</span>",$property->hazszam); $property->hazszam = str_replace($max,"<span style='color: lightgreen; font-weight: bold;'>".$max."</span>",$property->hazszam); ?>
  31. <?php $min = strtolower($keyword); $max = strtoupper($keyword); $property->regszam = str_replace($keyword,"<span style='color: lightgreen; font-weight: bold;'>".$keyword."</span>",$property->regszam); $property->regszam = str_replace($min,"<span style='color: lightgreen; font-weight: bold;'>".$min."</span>",$property->regszam); $property->regszam = str_replace($max,"<span style='color: lightgreen; font-weight: bold;'>".$max."</span>",$property->regszam); ?>
  32. <?php $min = strtolower($keyword); $max = strtoupper($keyword); $property->korzet = str_replace($keyword,"<span style='color: lightgreen; font-weight: bold;'>".$keyword."</span>",$property->korzet); $property->korzet = str_replace($min,"<span style='color: lightgreen; font-weight: bold;'>".$min."</span>",$property->korzet); $property->korzet = str_replace($max,"<span style='color: lightgreen; font-weight: bold;'>".$max."</span>",$property->korzet); ?>
  33. <a href="/property/show/<?=$property->id?>" title="Hirdetés megtekintése"><?=$property->iranyitoszam?> <?=$property->telepules?> (<?=$property->korzet?>), <?=$property->utcanev?> <?=$property->hazszam?>. (<?=$property->regszam?>)</a><br>
  34. <?php endforeach; ?>
  35. </p>
  36. <?php elseif (empty($properties) && $section=='properties') : ?>
  37. <p>Nincs találat a keresett kifejezésre...</p>
  38. <?php endif; ?>
  39. <?php if (!empty($offices) && ($section=='' || $section=='offices')) : ?>
  40. <h2>Irodák</h2>
  41. <p>
  42. <?php foreach ($offices as $office) : ?>
  43. <?php $min = strtolower($keyword); $max = strtoupper($keyword); $office->nev = preg_replace("/($keyword)/i","<span style='color: lightgreen; font-weight: bold;'>".$keyword."</span>",$office->nev); $office->nev = preg_replace("/($min)/i","<span style='color: lightgreen; font-weight: bold;'>".$keyword."</span>",$office->nev); $office->nev = preg_replace("/($max)/i","<span style='color: lightgreen; font-weight: bold;'>".$keyword."</span>",$office->nev); ?>
  44. <a href="/offices/show/<?=$office->id?>" title="Iroda megtekintése"><?=$office->nev?> - <?=$office->iranyitoszam?> <?=$office->varos?>. <?=$office->utca_hazszam?></a><br>
  45. <?php endforeach; ?>
  46. </p>
  47. <?php elseif (empty($offices) && $section=='offices') : ?>
  48. <p>Nincs találat a keresett kifejezésre...</p>
  49. <?php endif; ?>
  50. <?php if (!empty($agents) && ($section=='' || $section=='agents')) : ?>
  51. <h2>Értékesítők</h2>
  52. <p>
  53. <?php foreach ($agents as $agent) : ?>
  54. <?php $min = strtolower($keyword); $max = strtoupper($keyword); $agent->nev = preg_replace("/($keyword)/i","<span style='color: lightgreen; font-weight: bold;'>".$keyword."</span>",$agent->nev); $agent->nev = preg_replace("/($min)/i","<span style='color: lightgreen; font-weight: bold;'>".$keyword."</span>",$agent->nev); $agent->nev = preg_replace("/($max)/i","<span style='color: lightgreen; font-weight: bold;'>".$keyword."</span>",$agent->nev); ?>
  55. <a href="/agents/show/<?=$agent->id?>" title="Értékesítő megtekintése"><?=$agent->nev?></a><br>
  56. <?php endforeach; ?>
  57. </p>
  58. <?php elseif (empty($agents) && $section=='agents') : ?>
  59. <p>Nincs találat a keresett kifejezésre...</p>
  60. <?php endif; ?>
  61. <?php if (!empty($pages) && ($section=='' || $section=='pages')) : ?>
  62. <h2>Tartalmak</h2>
  63. <p>
  64. <?php foreach ($pages as $page) : ?>
  65. <?php $min = strtolower($keyword); $max = strtoupper($keyword); $page->page_title = str_replace($keyword,"<span style='color: lightgreen; font-weight: bold;'>".$keyword."</span>",$page->page_title); $page->page_title = str_replace($min,"<span style='color: lightgreen; font-weight: bold;'>".$min."</span>",$page->page_title); $page->page_title = str_replace($max,"<span style='color: lightgreen; font-weight: bold;'>".$max."</span>",$page->page_title); ?>
  66. <a href="pages/show/<?=$page->page_slug?>" title="Oldal megtekintése"><?=$page->page_title?></a><br>
  67. <?php endforeach; ?>
  68. </p>
  69. <?php elseif (empty($pages) && $section=='pages') : ?>
  70. <p>Nincs találat a keresett kifejezésre...</p>
  71. <?php endif; ?>
  72. </div>
  73. <div class="clear"></div>
  74. </div>
  75. </section>
  76. <?php include 'footer.php' ?>