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
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

144 rindas
2.6KB

  1. <?php
  2. # @name: random.php
  3. # @version: 0.1
  4. # @creation_date: 2021-09-24
  5. # @license: The MIT License <https://opensource.org/licenses/MIT>
  6. # @author: Simon Bowie <ad7588@coventry.ac.uk>
  7. # @purpose: Displays a random record from the Solr index
  8. include '../solr.php';
  9. include '../ops_api.php';
  10. $core = 'all';
  11. $random_record = one_random_record($core);
  12. $publication_details = get_publication_details($random_record['doc_ref']);
  13. ?>
  14. <!DOCTYPE html>
  15. <html lang="en">
  16. <head>
  17. <meta charset="utf-8">
  18. <meta name="viewport" content="width=device-width, initial-scale=1">
  19. <link rel="stylesheet" type="text/css" href="css/style.css">
  20. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
  21. <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>
  22. </head>
  23. <body>
  24. <div class="container-fluid">
  25. Application ID:
  26. <a href="id_search.php?id=<? echo $random_record['id']; ?>&core=all">
  27. <?php
  28. echo $random_record['application_id'];
  29. ?>
  30. </a>
  31. <br><br>
  32. EPO publication:
  33. <a href=<?php echo $random_record['epo_publication_url']; ?>>
  34. <?php
  35. echo $random_record['epo_publication_url'];
  36. ?>
  37. </a>
  38. <br><br>
  39. IPC publication:
  40. <a href=<?php echo $random_record['ipc_publication_url']; ?>>
  41. <?php
  42. echo $random_record['ipc_publication_url'];
  43. ?>
  44. </a>
  45. <br><br>
  46. <?php
  47. if (isset($random_record['title'])):
  48. ?>
  49. Title:
  50. <?php
  51. echo $random_record['title'];
  52. ?>
  53. <br><br>
  54. <?php
  55. endif;
  56. ?>
  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 (isset($random_record['abstract'])):
  70. ?>
  71. Abstract:
  72. <?php
  73. echo $random_record['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($random_record['doc_ref'])):
  92. ?>
  93. <?php
  94. $image = get_images($random_record["doc_ref"]);
  95. ?>
  96. <?php
  97. echo '<img class="img-fluid" src="data:image/jpg;base64,'.base64_encode($image->getImageBlob()).'" alt="Drawing of patent" />';
  98. ?>
  99. <?php
  100. endif;
  101. ?>
  102. </div>
  103. </body>
  104. </html>