|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <?php
-
- # @name: random.php
- # @version: 0.1
- # @creation_date: 2021-09-24
- # @license: The MIT License <https://opensource.org/licenses/MIT>
- # @author: Simon Bowie <ad7588@coventry.ac.uk>
- # @purpose: Displays a random record from the Solr index
-
- include '../solr.php';
- include '../ops_api.php';
-
- $random_record = random_record();
-
- ?>
-
- <!DOCTYPE html>
- <html lang="en">
- <head>
- </head>
- <body>
-
- Application ID:
-
- <?php
- echo $random_record['application_id'];
- ?>
-
- <br><br>
-
- EPO publication:
-
- <a href=<?php echo $random_record['epo_publication_url']; ?>>
- <?php
- echo $random_record['epo_publication_url'];
- ?>
- </a>
-
- <br><br>
-
- IPC publication:
-
- <a href=<?php echo $random_record['ipc_publication_url']; ?>>
- <?php
- echo $random_record['ipc_publication_url'];
- ?>
- </a>
-
- <br><br>
-
- Title:
-
- <?php
- echo $random_record['title'];
- ?>
-
- <br><br>
-
- <?php
- if ($random_record['abstract']):
- ?>
-
- Abstract:
-
- <?php
- echo $random_record['abstract'];
- ?>
-
- <br><br>
-
- <?
- endif;
- ?>
-
- <?php
- $publication_details = get_publication_details($random_record['doc_ref']);
-
- if (isset($publication_details['original_title'])):
- ?>
-
- Original language title:
-
- <?php
- echo $publication_details['original_title'];
- ?>
-
- <br><br>
-
- <?php
- endif;
- ?>
-
- <?php
- if (isset($publication_details['original_abstract'])):
- ?>
-
- Original language abstract:
-
- <?php
- echo $publication_details['original_abstract'];
- ?>
-
- <br><br>
-
- <?php
- endif;
- ?>
-
-
- <?php
- if (check_for_images($random_record['doc_ref'])):
- ?>
-
- <iframe src="./ops_image.php?doc_ref=<?php echo $random_record['doc_ref'] ?>" width="100%" height="500px">
- </iframe>
-
- <br><br>
-
- <?php
- endif;
- ?>
-
- </body>
- </html>
|