search_user.php 1.1 KB

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