search_user.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php include ('header.php'); ?>
  2. <main id="main">
  3. <?php include dirname(__FILE__).('/widgets/search_header.php'); ?>
  4. <div class="article_wrap">
  5. <aside class="left_column">
  6. <?php include dirname(__FILE__).('/widgets/side_who_to_follow.php'); ?>
  7. <?php include dirname(__FILE__).('/widgets/side_trending.php'); ?>
  8. <?php include dirname(__FILE__).('/widgets/side_firefox_addon.php'); ?>
  9. <?php include dirname(__FILE__).('/widgets/side_footer.php'); ?>
  10. </aside>
  11. <article class="center_column">
  12. <div id="js-follows_profile">
  13. </div>
  14. <footer id="js-follows_footer">
  15. <i class="fa fa-spin fa-circle-o-notch" aria-hidden="true"></i>
  16. </footer>
  17. </article>
  18. </div>
  19. </main>
  20. <script>
  21. current_file = location.pathname+location.search;
  22. <?php if(isset($_GET['q'])): ?>
  23. const query = "<?= htmlspecialchars((string)filter_input(INPUT_GET, 'q'), ENT_QUOTES) ?>";
  24. if(query.length > 0) {
  25. $('title').text(query+' - Halcyon Search');
  26. $('#js-header_title_box > h1').text(query);
  27. $('#js-search_nav_peoples').toggleClass('view');
  28. $('#js-search_nav_toots a ').attr('href','/search'+location.search);
  29. $('#js-search_nav_peoples a ').attr('href','/search/users'+location.search);
  30. setUserSearch(query);
  31. }
  32. else {
  33. history.go(-2);
  34. }
  35. <?php endif; ?>
  36. </script>
  37. <?php include ('footer.php'); ?>