displaystories.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <!DOCTYPE html>
  2. <html>
  3. <meta charset="utf-8">
  4. <link rel="stylesheet" type="text/css" href="css/style.css">
  5. <head>
  6. <title>An African Language Short Story Competition</title>
  7. </head>
  8. <body>
  9. <ul>
  10. <li><a id="home" href="index.php">Home</a></li>
  11. <li><a id="original" href="submit.php">Original Story Submission</a></li>
  12. <li><a id="translation" href="submittranslation.php">Translated Story Submission</a></li>
  13. <li><a id="stories" class=active href="#">Submitted Stories</a></li>
  14. <li><a id="statistics" href="submissionstatistics.php">Submissions per Language</a></li>
  15. <li><a id="coordinate" href="coordinator.php">Coordinator Application</a></li>
  16. <li><a id="contact" href="contact.php">Contact</a></li>
  17. <li><a id="resources" href="resources.php">Resources</a></li>
  18. <li><a id="flyers" href="flyers.php">Flyers</a></li>
  19. <li><a id="faq" href="faq.php">Frequently Asked Questions</a></li>
  20. <li><a id="privacy" href="privacy.php">Privacy</a></li>
  21. </ul>
  22. <header>
  23. <h1>Tuvute Pamoja
  24. <a href="https://deeplearningindaba.com">
  25. <img src="images/deeplearningindaba.svg" alt="Deeplearning Indaba" style="height:60px">
  26. </a></h1>
  27. </header>
  28. <?php include 'submitdatabaseinfo.php';?>
  29. <?php include 'submitsetup.php';?>
  30. <h1 id="title">An African Language Short Story Competition</h1>
  31. <div>
  32. <p>The stories are provided under a creative commons attribution license that allows others to distribute, remix, adapt and build upon the work, even commercially, as long as they credit the authors for the original creation. For more on this license see <a href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</a>. The submitted stories are provided here to allow for translation and evaluation. To enable a fairer evaluation of the stories, the authors and translators will remain unknown until after the evaluation process. Should you wish to reuse and redistribute the stories please be sure to do so once you can attribute the authors and translators.</p>
  33. </div>
  34. <div>
  35. <h3 id="languageselection">Choose a language you want to read stories in</h3>
  36. </div>
  37. <div>
  38. <select class="language" id="languagefromoptions" name="languagefromoptions"
  39. onchange="getstorytitles(this.value)">
  40. <option data-language="Amharic" value="amh">አማርኛ</option>
  41. <optgroup label="اَلْعَرَبِيَّةُ">
  42. <option data-language="Egyptian Arabic" value="arz">العامية المصرية</option>
  43. <option data-language="Standard Arabic" value="arb">العربية الفصحى</option>
  44. <option data-language="Sudanese Arabic" value="apd">لهجة سودانية</option>
  45. </optgroup>
  46. <option data-language="Afrikaans" value="afr">Afrikaans</option>
  47. <option data-language="Bangime" value="dba">Bangime</option>
  48. <option data-language="Basaa" value="bas">Basaa</option>
  49. <option data-language="Bemba" value="ben">Bemba</option>
  50. <option data-language="Chichewa" value="nya">Chichewa</option>
  51. <option data-language="Dagbani" value="dag">Dagbani</option>
  52. <option data-language="Dholuo" value="luo">Dholuo</option>
  53. <optgroup label="Dogon">
  54. <option data-language="Ben Tey Dogon" value="BTD">Ben Tey Dogon</option>
  55. <option data-language="Najamba-Kindige" value="N-K">Najamba-Kindige</option>
  56. </optgroup>
  57. <option data-language="Douala" value="dua">Douala</option>
  58. <option data-language="Ewondo" value="ewo">Ewondo</option>
  59. <option data-language="Fefe" value="fmp">Féfé</option>
  60. <optgroup label="Fulfulde">
  61. <option data-language="Adamawa Fulfulde" value="fub">Adamawa Fulfulde</option>
  62. <option data-language="Bagirmi Fulfulde" value="fui">Bagirmi Fulfulde</option>
  63. <option data-language="Borgu Fulfulde" value="fue">Borgu Fulfulde</option>
  64. <option data-language="Central Eastern Niger Fulfulde" value="fuq">Central Eastern Niger Fulfulde</option>
  65. <option data-language="Maasina Fulfulde" value="ffm">Maasina Fulfulde</option>
  66. <option data-language="Nigerian Fulfulde" value="fuv">Nigerian Fulfulde</option>
  67. <option data-language="Pulaar" value="fuc">Pulaar</option>
  68. <option data-language="Pular" value="fuf">Pular</option>
  69. <option data-language="Western Niger Fulfulde" value="fuh">Western Niger Fulfulde</option>
  70. </optgroup>
  71. <option data-language="Ga" value="gaa">Ga</option>
  72. <option data-language="Ghomala" value="gho">Ghomala</option>
  73. <option data-language="Kikuyu" value="kik">Gĩkũyũ</option>
  74. <option data-language="Gonja" value="gjn">Gonja</option>
  75. <option data-language="Hausa" value="hau">Hausa</option>
  76. <option data-language="Igbo" value="ibo">Igbo</option>
  77. <optgroup label="Ndebele">
  78. <option data-language="IsiNdebele saseNyakatho" value="nde">IsiNdebele saseNyakatho</option>
  79. <option data-language="IsiNdebele seSewula" value="nbl">IsiNdebele seSewula</option>
  80. </optgroup>
  81. <option data-language="Xhosa" value="xho">isiXhosa</option>
  82. <option data-language="Zulu" value="zul">isiZulu</option>
  83. <optgroup label="Jóola">
  84. <option data-language="Bandial" value="bqj">Bandial</option>
  85. <option data-language="Karon" value="krx">Karon</option>
  86. </optgroup>
  87. <optgroup label="Kamba">
  88. <option data-language="Dhaiso" value="dhs">Dhaiso</option>
  89. <option data-language="Kamba" value="kam">Kamba</option>
  90. </optgroup>
  91. <option data-language="Kidawida" value="dav">Kidawida</option>
  92. <option data-language="Kigiriyama" value="nyf">Kigiriyama</option>
  93. <optgroup label="Kimeru (Kenya)">
  94. <option data-language="Kimeru" value="mer">Meru</option>
  95. <option data-language="Tharaka" value="thk">Tharaka</option>
  96. <option data-language="Mwimbi-Muthambi" value="mws">Mwimbi-Muthambi</option>
  97. <option data-language="Cuka" value="cuh">Cuka</option>
  98. </optgroup>
  99. <option data-language="Kinyarwanda" value="kin">Kinyarwanda</option>
  100. <option data-language="Kipsigis" value="sgc">Kipsigis</option>
  101. <option data-language="Kiswahili" value="swa">Kiswahili</option>
  102. <option data-language="Kom" value="bkm">Kom</option>
  103. <option data-language="Konkomba" value="xon">Konkomba</option>
  104. <option data-language="Lingala" value="lin">Lingala</option>
  105. <option data-language="Luganda" value="lug">Luganda</option>
  106. <optgroup label="Luhya">
  107. <option data-language="Lubukusu" value="bsk">Lubukusu</option>
  108. <option data-language="Luidhako" value="ida">Luidhako</option>
  109. <option data-language="Lulogoli" value="rag">Lulogoli</option>
  110. <option data-language="Lukabrasi" value="lkb">Lukabrasi</option>
  111. <option data-language="Lunyala" value="nle">Lunyala</option>
  112. <option data-language="Lusamia" value="lsm">Lusamia</option>
  113. <option data-language="Lutachoni" value="lts">Lutachoni</option>
  114. <option data-language="Olukhayo" value="lko">Olukhayo</option>
  115. <option data-language="Olukisa" value="lks">Olukisa</option>
  116. <option data-language="Olumarama" value="lrm">Olumarama</option>
  117. <option data-language="Olunyole" value="nyd">Olunyole</option>
  118. <option data-language="Olutsotso" value="lto">Olutsotso</option>
  119. <option data-language="Oluwanga" value="lwa">Oluwanga</option>
  120. </optgroup>
  121. <option data-language="Medumba" value="byv">Medumba</option>
  122. <option data-language="Mende" value="men">Mende</option>
  123. <optgroup label="Meru (Tanzania)">
  124. <option data-language="Machame" value="imc">Machame</option>
  125. <option data-language="Rwa" value="rwk">Rwa</option>
  126. </optgroup>
  127. <option data-language="Nda\'nda\'" value="nnz">Nda'nda'</option>
  128. <option data-language="Ngiemboon" value="nnh">Ngiemboon</option>
  129. <option data-language="Nigerian Pidgin" value="pcm">Nigerian Pidgin</option>
  130. <option data-language="Nuasue" value="yav">Nuasue</option>
  131. <option data-language="Ŋgə̂mbà" value="nge">Ŋgə̂mbà</option>
  132. <option data-language="Runyakitara" value="213">Runyakitara</option>
  133. <option data-language="Safaliba" value="saf">Safaliba</option>
  134. <optgroup label="Sena">
  135. <option data-language="Barwe" value="bwg">Barwe</option>
  136. <option data-language="Malawian Sena" value="swk">Malawian Sena</option>
  137. <option data-language="Mozambiquean Sena" value="seh">Mozambiquean Sena</option>
  138. </optgroup>
  139. <option data-language="Sesotho" value="sot">Sesotho</option>
  140. <option data-language="Setswana" value="tsn">Setswana</option>
  141. <option data-language="Shü Pamom" value="bax">Shü Pamom</option>
  142. <option data-language="siSwati" value="ssw">siSwati</option>
  143. <option data-language="Twi" value="twi">Twi</option>
  144. <option data-language="Urhobo" value="urh">Urhobo</option>
  145. <option data-language="Wolaytta" value="wal">Wolaytta</option>
  146. <option data-language="Wolof" value="wol">Wolof</option>
  147. <option data-language="Xitsonga" value="tso">Xitsonga</option>
  148. <option data-language="Yambeta" value="yat">Yambeta</option>
  149. <option data-language="Yoruba" value="yor">Yorùbá</option>
  150. <option data-language="Zarma" value="dje">Zarma</option>
  151. </select>
  152. </p>
  153. </div>
  154. </section>
  155. <section>
  156. <div>
  157. <table id="titles"></table>
  158. </div>
  159. </section>
  160. <section>
  161. <p id="story">
  162. </p>
  163. </section>
  164. </body>
  165. <?php include 'footer.php';?>
  166. <script>
  167. function getstorytitles(lang) {
  168. //use ajax to get stories from database in that language
  169. var xmlhttp = new XMLHttpRequest();
  170. xmlhttp.onreadystatechange = function() {
  171. if (this.readyState == 4 && this.status == 200) {
  172. document.getElementById("titles").innerHTML = this.responseText;
  173. }
  174. };
  175. xmlhttp.open("GET","gettitles.php?lang="+lang,true);
  176. xmlhttp.send();
  177. }
  178. function getstory(storyid) {
  179. //use ajax to get stories from database in that language
  180. var xmlhttp = new XMLHttpRequest();
  181. xmlhttp.onreadystatechange = function() {
  182. if (this.readyState == 4 && this.status == 200) {
  183. document.getElementById("story").innerHTML = this.responseText;
  184. }
  185. };
  186. xmlhttp.open("GET","getstory.php?primarykey="+storyid,true);
  187. xmlhttp.send();
  188. }
  189. </script>
  190. </html>