A search interface for data from the Politics of Patents case study (part of Copim WP6): this parses data from the archive of RTF files and provides additional data from the European Patent Office API. https://patents.copim.ac.uk
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

2 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?php
  2. # @name: search.php
  3. # @version: 0.1
  4. # @creation_date: 2021-09-30
  5. # @license: The MIT License <https://opensource.org/licenses/MIT>
  6. # @author: Simon Bowie <ad7588@coventry.ac.uk>
  7. # @purpose: Searches the Solr index
  8. include '../solr.php';
  9. include '../text_functions.php';
  10. ?>
  11. <!DOCTYPE html>
  12. <html lang="en">
  13. <head>
  14. <title>Performing Patents Otherwise: Archival conversations with 320.000 clothing inventions</title>
  15. <meta charset="utf-8">
  16. <meta name="viewport" content="width=device-width, initial-scale=1">
  17. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
  18. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
  19. <link rel="stylesheet" type="text/css" href="css/style.css">
  20. </head>
  21. <body>
  22. <div class="container">
  23. <?php
  24. $search_results = solr_search($_POST["search"], $_POST["searchopt"], $_POST["sort"]);
  25. if(is_array($search_results)):
  26. foreach($search_results as $result):
  27. $result = highlight_search_terms($result, $_POST["search"]);
  28. ?>
  29. Application ID:
  30. <a href="id_search.php?id=<? echo $result['id']; ?>&core=<? echo $_POST['searchopt']; ?>">
  31. <?php
  32. echo $result['application_id'];
  33. ?>
  34. </a>
  35. <br><br>
  36. Year:
  37. <?php
  38. echo $result['year'];
  39. ?>
  40. <br><br>
  41. EPO publication:
  42. <a href=<?php echo $result['epo_publication_url']; ?>>
  43. <?php
  44. echo $result['epo_publication_url'];
  45. ?>
  46. </a>
  47. <br><br>
  48. IPC publication:
  49. <a href=<?php echo $result['ipc_publication_url']; ?>>
  50. <?php
  51. echo $result['ipc_publication_url'];
  52. ?>
  53. </a>
  54. <br><br>
  55. <?php
  56. if (isset($result['title'])):
  57. ?>
  58. Title:
  59. <?php
  60. echo $result['title'];
  61. ?>
  62. <br><br>
  63. <?
  64. endif;
  65. ?>
  66. <?php
  67. if (isset($result['abstract'])):
  68. ?>
  69. Abstract:
  70. <?php
  71. echo $result['abstract'];
  72. ?>
  73. <br><br>
  74. <?
  75. endif;
  76. ?>
  77. <hr>
  78. <?php
  79. endforeach;
  80. else:
  81. echo $search_results;
  82. endif;
  83. ?>
  84. </div>
  85. <script>
  86. let text = "<?php echo $_POST["search"]; ?>";
  87. upperText = text.toUpperCase();
  88. result = "<span style='color:orange'>" + upperText + "</span>";
  89. const collection = document.getElementsByClassName("search_term");
  90. for (let i = 0; i < collection.length; i++) {
  91. collection[i].innerHTML = result;
  92. }
  93. </script>
  94. </body>
  95. </html>