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 kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

49 lines
1.3KB

  1. <?php
  2. # @name: random_images.php
  3. # @version: 0.1
  4. # @creation_date: 2021-10-12
  5. # @license: The MIT License <https://opensource.org/licenses/MIT>
  6. # @author: Simon Bowie <ad7588@coventry.ac.uk>
  7. # @purpose: Displays ten random images
  8. include '../solr.php';
  9. include '../ops_api.php';
  10. $core = 'all';
  11. $random_doc_refs = ten_random_doc_refs($core);
  12. ?>
  13. <!DOCTYPE html>
  14. <html lang="en">
  15. <head>
  16. <meta charset="utf-8">
  17. <meta name="viewport" content="width=device-width, initial-scale=1">
  18. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
  19. <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>
  20. <link rel="stylesheet" type="text/css" href="css/style.css">
  21. </head>
  22. <body>
  23. <div class="container-fluid">
  24. <?php
  25. foreach($random_doc_refs as $doc_ref):
  26. ?>
  27. <?php
  28. $image = get_images($doc_ref);
  29. ?>
  30. <?php
  31. echo '<img class="img-fluid" src="data:image/jpg;base64,'.base64_encode($image->getImageBlob()).'" alt="Drawing of patent" />';
  32. ?>
  33. <?php
  34. endforeach;
  35. ?>
  36. </div>
  37. </body>
  38. </html>