|
- <?php
-
- # @name: random_images.php
- # @version: 0.1
- # @creation_date: 2021-10-12
- # @license: The MIT License <https://opensource.org/licenses/MIT>
- # @author: Simon Bowie <ad7588@coventry.ac.uk>
- # @purpose: Displays ten random images
-
- include '../solr.php';
- include '../ops_api.php';
-
- $core = 'all';
- $random_doc_refs = ten_random_doc_refs($core);
-
- ?>
-
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" type="text/css" href="css/style.css">
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
- <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>
- </head>
- <body>
-
- <div class="container-fluid">
- <?php
- foreach($random_doc_refs as $doc_ref):
- ?>
-
- <?php
- $image = get_images($doc_ref);
- ?>
-
- <?php
- echo '<img class="img-fluid" src="data:image/jpg;base64,'.base64_encode($image->getImageBlob()).'" alt="Drawing of patent" />';
- ?>
-
- <?php
- endforeach;
- ?>
-
- </div>
- </body>
- </html>
|