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
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

168 lines
2.9KB

  1. <?php
  2. # @name: id_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 by ID for one particular record
  8. include '../solr.php';
  9. include '../ops_api.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_id($_GET["id"], $_GET["core"]);
  25. if(is_array($search_results)):
  26. foreach($search_results as $result):
  27. $publication_details = get_publication_details($result['doc_ref']);
  28. ?>
  29. Application ID:
  30. <?php
  31. echo $result['application_id'];
  32. ?>
  33. <br><br>
  34. Year:
  35. <?php
  36. echo $result['year'];
  37. ?>
  38. <br><br>
  39. EPO publication:
  40. <a href=<?php echo $result['epo_publication_url']; ?>>
  41. <?php
  42. echo $result['epo_publication_url'];
  43. ?>
  44. </a>
  45. <br><br>
  46. IPC publication:
  47. <a href=<?php echo $result['ipc_publication_url']; ?>>
  48. <?php
  49. echo $result['ipc_publication_url'];
  50. ?>
  51. </a>
  52. <br><br>
  53. <?php
  54. if (isset($result['title'])):
  55. ?>
  56. Title:
  57. <?php
  58. echo $result['title'];
  59. ?>
  60. <br><br>
  61. <?
  62. endif;
  63. ?>
  64. <?php
  65. if (isset($publication_details['original_title'])):
  66. ?>
  67. Original language title:
  68. <?php
  69. echo $publication_details['original_title'];
  70. ?>
  71. <br><br>
  72. <?php
  73. endif;
  74. ?>
  75. <?php
  76. if (isset($result['abstract'])):
  77. ?>
  78. Abstract:
  79. <?php
  80. echo $result['abstract'];
  81. ?>
  82. <br><br>
  83. <?
  84. endif;
  85. ?>
  86. <?php
  87. if (isset($publication_details['original_abstract'])):
  88. ?>
  89. Original language abstract:
  90. <?php
  91. echo $publication_details['original_abstract'];
  92. ?>
  93. <br><br>
  94. <?php
  95. endif;
  96. ?>
  97. <?php
  98. if (check_for_images($result['doc_ref'])):
  99. ?>
  100. <?php
  101. $image = get_images($result["doc_ref"]);
  102. ?>
  103. <?php
  104. echo '<img class="img-fluid" src="data:image/jpg;base64,'.base64_encode($image->getImageBlob()).'" alt="Drawing of patent" />';
  105. ?>
  106. <?php
  107. endif;
  108. ?>
  109. <?php
  110. endforeach;
  111. else:
  112. echo $search_results;
  113. endif;
  114. ?>
  115. </div>
  116. </body>
  117. </html>