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
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

156 lines
2.7KB

  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. <meta charset="utf-8">
  15. <meta name="viewport" content="width=device-width, initial-scale=1">
  16. <link rel="stylesheet" type="text/css" href="css/style.css">
  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. </head>
  20. <body>
  21. <div class="container">
  22. <?php
  23. $search_results = solr_search_id($_GET["id"], $_GET["core"]);
  24. if(is_array($search_results)):
  25. foreach($search_results as $result):
  26. $publication_details = get_publication_details($result['doc_ref']);
  27. ?>
  28. Application ID:
  29. <?php
  30. echo $result['application_id'];
  31. ?>
  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. Title:
  53. <?php
  54. echo $result['title'];
  55. ?>
  56. <br><br>
  57. <?php
  58. if (isset($publication_details['original_title'])):
  59. ?>
  60. Original language title:
  61. <?php
  62. echo $publication_details['original_title'];
  63. ?>
  64. <br><br>
  65. <?php
  66. endif;
  67. ?>
  68. <?php
  69. if ($result['abstract']):
  70. ?>
  71. Abstract:
  72. <?php
  73. echo $result['abstract'];
  74. ?>
  75. <br><br>
  76. <?
  77. endif;
  78. ?>
  79. <?php
  80. if (isset($publication_details['original_abstract'])):
  81. ?>
  82. Original language abstract:
  83. <?php
  84. echo $publication_details['original_abstract'];
  85. ?>
  86. <br><br>
  87. <?php
  88. endif;
  89. ?>
  90. <?php
  91. if (check_for_images($result['doc_ref'])):
  92. ?>
  93. <iframe src="./ops_image.php?doc_ref=<?php echo $result['doc_ref'] ?>#view=fitH" height="780px" width="100%">
  94. </iframe>
  95. <br><br>
  96. <?php
  97. endif;
  98. ?>
  99. <?php
  100. endforeach;
  101. else:
  102. echo $search_results;
  103. endif;
  104. ?>
  105. </div>
  106. </body>
  107. </html>