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
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

122 行
4.0KB

  1. <?php
  2. # @name: index.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: Home page for the application
  8. include '../solr.php';
  9. $cores = array("active", "expanding", "invisible", "multispecies", "surviving");
  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 class="d-flex flex-column min-vh-100">
  21. <main class="flex-shrink-0">
  22. <div class="container-fluid p-5 my-5 border">
  23. <div class="row">
  24. <div class="col text-center">
  25. <p class="h1">Politics of Patents</p>
  26. </div>
  27. </div>
  28. <div class="row justify-content-center p-3">
  29. <div class="col-sm-6 text-center">
  30. <form action="search.php" method="POST">
  31. <input type="text" name="search" placeholder="search for a patent record">
  32. <select name="searchopt" id="searchopt">
  33. <option value="all">all</option>
  34. <option value="active">active</option>
  35. <option value="expanding">expanding</option>
  36. <option value="invisible">invisible</option>
  37. <option value="multispecies">multi-species</option>
  38. <option value="surviving">surviving</option>
  39. </select>
  40. <input type="submit" id="submit" value="search">
  41. </form>
  42. </div>
  43. </div>
  44. <div class="row p-3">
  45. <div class="col text-center">
  46. <a href="./random.php">show a random record</a>
  47. </div>
  48. <div class="col text-center">
  49. <a href="./compare.php">compare two random records</a>
  50. </div>
  51. </div>
  52. <div class="row p-3">
  53. <div class="col text-center">
  54. <a href="./titles.php">ten random titles</a>
  55. </div>
  56. <div class="col text-center">
  57. <a href="./abstracts.php">ten random abstracts</a>
  58. </div>
  59. <div class="col text-center">
  60. <a href="./random_images.php">ten random images (takes a long time to load)</a>
  61. </div>
  62. </div>
  63. <?php
  64. foreach($cores as $core):
  65. ?>
  66. <div class="row p-3 m-3 border">
  67. <div class="col-1 border border-dark text-center verticaltext">
  68. <span class="text-uppercase"><?php echo $core; ?></span>
  69. </div>
  70. <div class="col-11">
  71. <div class="row p-3">
  72. <?php
  73. $random_record = one_random_record($core);
  74. ?>
  75. <a href="id_search.php?id=<? echo $random_record['id']; ?>&core=<? echo $core; ?>">
  76. <?php
  77. if(isset($random_record['title'])){
  78. echo $random_record['title'];
  79. }
  80. ?>
  81. </a>
  82. </div>
  83. <div class="row p-3">
  84. <?php
  85. if(isset($random_record['abstract'])){
  86. echo $random_record['abstract'];
  87. }
  88. ?>
  89. </div>
  90. </div>
  91. </div>
  92. <?php
  93. endforeach;
  94. ?>
  95. </div>
  96. </main>
  97. <footer class="footer py-3 mt-auto bg-light">
  98. <div class="container">
  99. <span class="text-muted">Data from the <a href="https://www.epo.org/">European Patent Office's</a> <a href="https://worldwide.espacenet.com/">Espacenet patent search engine</a> and reconfigured by Goldsmiths University's Archival Conversations project.</span>
  100. </div>
  101. </footer>
  102. </body>
  103. </html>