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
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.php 4.7KB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. <title>Performing Patents Otherwise: Archival conversations with 320.000 clothing inventions</title>
  15. <meta charset="utf-8">
  16. <meta name="viewport" content="width=device-width, initial-scale=1">
  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. <link rel="stylesheet" type="text/css" href="css/style.css">
  20. </head>
  21. <body class="d-flex flex-column min-vh-100">
  22. <main class="flex-shrink-0">
  23. <div class="container-fluid p-5 my-5 border">
  24. <div class="row">
  25. <div class="col text-center">
  26. <p class="h1">Performing Patents Otherwise</p>
  27. <p class="h2">Archival conversations with 320,000 clothing inventions</p>
  28. </div>
  29. </div>
  30. <div class="row justify-content-center p-3">
  31. <div class="col-sm-6 text-center">
  32. <form action="search.php" method="POST">
  33. <input type="text" name="search" placeholder="search for a patent record">
  34. <select name="searchopt" id="searchopt">
  35. <option value="all">all</option>
  36. <option value="active">active</option>
  37. <option value="expanding">expanding</option>
  38. <option value="invisible">invisible</option>
  39. <option value="multispecies">multi-species</option>
  40. <option value="pissing">pissing & leaking</option>
  41. <option value="secret">secret</option>
  42. <option value="defending">self-defending</option>
  43. <option value="surviving">surviving</option>
  44. <option value="working">working</option>
  45. </select>
  46. sort by:
  47. <select name="sort" id="sort">
  48. <option value="relevance">relevance</option>
  49. <option value="year">year</option>
  50. </select>
  51. <input type="submit" id="submit" value="search">
  52. </form>
  53. </div>
  54. </div>
  55. <div class="row p-3">
  56. <div class="col text-center">
  57. <a href="./random.php">show a random record</a>
  58. </div>
  59. <div class="col text-center">
  60. <a href="./compare.php">compare two random records</a>
  61. </div>
  62. </div>
  63. <div class="row p-3">
  64. <div class="col text-center">
  65. <a href="./titles.php">ten random titles</a>
  66. </div>
  67. <div class="col text-center">
  68. <a href="./abstracts.php">ten random abstracts</a>
  69. </div>
  70. <div class="col text-center">
  71. <a href="./random_images.php">ten random images (takes a long time to load)</a>
  72. </div>
  73. </div>
  74. <?php
  75. foreach($cores as $core):
  76. ?>
  77. <div class="row p-3 m-3 border">
  78. <div class="col-1 border border-dark text-center verticaltext">
  79. <span class="text-uppercase"><?php echo $core; ?></span>
  80. </div>
  81. <div class="col-11">
  82. <div class="row p-3">
  83. <?php
  84. $random_record = one_random_record($core);
  85. ?>
  86. <a href="id_search.php?id=<? echo $random_record['id']; ?>&core=<? echo $core; ?>">
  87. <?php
  88. if(isset($random_record['title'])){
  89. echo $random_record['title'];
  90. }
  91. ?>
  92. </a>
  93. </div>
  94. <div class="row p-3">
  95. <?php
  96. if(isset($random_record['abstract'])){
  97. echo $random_record['abstract'];
  98. }
  99. ?>
  100. </div>
  101. </div>
  102. </div>
  103. <?php
  104. endforeach;
  105. ?>
  106. </div>
  107. </main>
  108. <footer class="footer py-3 mt-auto bg-light">
  109. <div class="container">
  110. <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 of London's Archival Conversations project.</span>
  111. </div>
  112. </footer>
  113. </body>
  114. </html>