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 kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

131 Zeilen
4.5KB

  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", "pissing", "secret", "defending", "surviving", "working");
  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="pissing">pissing & leaking</option>
  39. <option value="secret">secret</option>
  40. <option value="defending">self-defending</option>
  41. <option value="surviving">surviving</option>
  42. <option value="working">working</option>
  43. </select>
  44. sort by:
  45. <select name="sort" id="sort">
  46. <option value="relevance">relevance</option>
  47. <option value="year">year</option>
  48. </select>
  49. <input type="submit" id="submit" value="search">
  50. </form>
  51. </div>
  52. </div>
  53. <div class="row p-3">
  54. <div class="col text-center">
  55. <a href="./random.php">show a random record</a>
  56. </div>
  57. <div class="col text-center">
  58. <a href="./compare.php">compare two random records</a>
  59. </div>
  60. </div>
  61. <div class="row p-3">
  62. <div class="col text-center">
  63. <a href="./titles.php">ten random titles</a>
  64. </div>
  65. <div class="col text-center">
  66. <a href="./abstracts.php">ten random abstracts</a>
  67. </div>
  68. <div class="col text-center">
  69. <a href="./random_images.php">ten random images (takes a long time to load)</a>
  70. </div>
  71. </div>
  72. <?php
  73. foreach($cores as $core):
  74. ?>
  75. <div class="row p-3 m-3 border">
  76. <div class="col-1 border border-dark text-center verticaltext">
  77. <span class="text-uppercase"><?php echo $core; ?></span>
  78. </div>
  79. <div class="col-11">
  80. <div class="row p-3">
  81. <?php
  82. $random_record = one_random_record($core);
  83. ?>
  84. <a href="id_search.php?id=<? echo $random_record['id']; ?>&core=<? echo $core; ?>">
  85. <?php
  86. if(isset($random_record['title'])){
  87. echo $random_record['title'];
  88. }
  89. ?>
  90. </a>
  91. </div>
  92. <div class="row p-3">
  93. <?php
  94. if(isset($random_record['abstract'])){
  95. echo $random_record['abstract'];
  96. }
  97. ?>
  98. </div>
  99. </div>
  100. </div>
  101. <?php
  102. endforeach;
  103. ?>
  104. </div>
  105. </main>
  106. <footer class="footer py-3 mt-auto bg-light">
  107. <div class="container">
  108. <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>
  109. </div>
  110. </footer>
  111. </body>
  112. </html>