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
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

119 Zeilen
2.4KB

  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. ?>
  10. <!DOCTYPE html>
  11. <html lang="en">
  12. <head>
  13. <meta charset="utf-8">
  14. <meta name="viewport" content="width=device-width, initial-scale=1">
  15. <link rel="stylesheet" type="text/css" href="css/style.css">
  16. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
  17. <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>
  18. </head>
  19. <body>
  20. <div class="container">
  21. <?php
  22. $search_results = solr_search($_POST["search"], $_POST["searchopt"], $_POST["sort"]);
  23. if(is_array($search_results)):
  24. foreach($search_results as $result):
  25. ?>
  26. Application ID:
  27. <a href="id_search.php?id=<? echo $result['id']; ?>&core=<? echo $_POST['searchopt']; ?>">
  28. <?php
  29. echo $result['application_id'];
  30. ?>
  31. </a>
  32. <br><br>
  33. Year:
  34. <?php
  35. echo $result['year'];
  36. ?>
  37. <br><br>
  38. EPO publication:
  39. <a href=<?php echo $result['epo_publication_url']; ?>>
  40. <?php
  41. echo $result['epo_publication_url'];
  42. ?>
  43. </a>
  44. <br><br>
  45. IPC publication:
  46. <a href=<?php echo $result['ipc_publication_url']; ?>>
  47. <?php
  48. echo $result['ipc_publication_url'];
  49. ?>
  50. </a>
  51. <br><br>
  52. <?php
  53. if (isset($result['title'])):
  54. ?>
  55. Title:
  56. <?php
  57. echo $result['title'];
  58. ?>
  59. <br><br>
  60. <?
  61. endif;
  62. ?>
  63. <?php
  64. if (isset($result['abstract'])):
  65. ?>
  66. Abstract:
  67. <?php
  68. echo $result['abstract'];
  69. ?>
  70. <br><br>
  71. <?
  72. endif;
  73. ?>
  74. <hr>
  75. <?php
  76. endforeach;
  77. else:
  78. echo $search_results;
  79. endif;
  80. ?>
  81. </div>
  82. </body>
  83. </html>