2
0

index.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>wikipal</title>
  5. <meta http-equiv="refresh" content="0,../article/index.php?<?php echo $_SERVER['QUERY_STRING'];?>"/>
  6. </head>
  7. <body>
  8. loading...
  9. </body>
  10. </html>
  11. <?php
  12. exit;
  13. ?>
  14. <?php
  15. require_once "../public/load_lang.php";
  16. require_once "../config.php";
  17. require_once "../pcdl/html_head.php";
  18. ?>
  19. <body style="margin: 0;padding: 0;" class="reader_body" >
  20. </body>
  21. </html>
  22. <script src="../channal/channal.js"></script>
  23. <script src="./reader.js"></script>
  24. <script src="../widget/click_dropdown.js"></script>
  25. <link type="text/css" rel="stylesheet" href="../widget/click_dropdown.css"/>
  26. <link type="text/css" rel="stylesheet" href="style.css" />
  27. <link type="text/css" rel="stylesheet" href="mobile.css" media="screen and (max-width:800px)" />
  28. <link type="text/css" rel="stylesheet" href="print.css" media="print" />
  29. <script>
  30. <?php
  31. $_view = "";
  32. $_display = "";
  33. $_channal = "";
  34. $_collect = "";
  35. if(isset($_GET["view"])){
  36. echo "_reader_view='".$_GET["view"]."';";
  37. }
  38. if(isset($_GET["id"])){
  39. echo "_reader_sent_id='".$_GET["id"]."';";
  40. }
  41. if(isset($_GET["book"])){
  42. echo "_reader_book='".$_GET["book"]."';";
  43. }
  44. if(isset($_GET["para"])){
  45. echo "_reader_para='".$_GET["para"]."';";
  46. }
  47. if(isset($_GET["par"])){
  48. #为了避免 &para被urlencode替换问题
  49. echo "_reader_para='".$_GET["par"]."';";
  50. }
  51. if(isset($_GET["begin"])){
  52. echo "_reader_begin='".$_GET["begin"]."';";
  53. }
  54. if(isset($_GET["end"])){
  55. echo "_reader_end='".$_GET["end"]."';";
  56. }
  57. if(isset($_GET["channal"])){
  58. echo "_channal='".$_GET["channal"]."';";
  59. }
  60. if(isset($_GET["channel"])){
  61. #纠正拼写错误
  62. echo "_channal='".$_GET["channel"]."';";
  63. }
  64. if(isset($_GET["lang"])){
  65. echo "_lang='".$_GET["lang"]."';";
  66. }
  67. if(isset($_GET["author"])){
  68. echo "_author='".$_GET["author"]."';";
  69. }
  70. if(isset($_GET["mode"]) && $_GET["mode"]=="edit"){
  71. $_mode = "edit";
  72. echo "_mode='edit';";
  73. }
  74. else{
  75. $_mode = "read";
  76. echo "_mode='read';";
  77. }
  78. if(isset($_GET["display"])){
  79. if($_mode == "edit"){
  80. $_display = "sent";
  81. echo "_display='sent';";
  82. }
  83. else{
  84. $_display = $_GET["display"];
  85. echo "_display='".$_GET["display"]."';";
  86. }
  87. }
  88. else{
  89. if($_mode=="read"){
  90. $_display = "para";
  91. echo "_display='para';";
  92. }
  93. else{
  94. $_display = "sent";
  95. echo "_display='sent';";
  96. }
  97. }
  98. if(isset($_GET["direction"])){
  99. $_direction = $_GET["direction"];
  100. echo "_direction='".$_GET["direction"]."';";
  101. }
  102. else{
  103. if($_mode=="read"){
  104. $_direction = "row";
  105. echo "_direction='row';";
  106. }
  107. else{
  108. $_direction = "col";
  109. echo "_direction='col';";
  110. }
  111. }
  112. ?>
  113. </script>
  114. <?php
  115. require_once("../pcdl/head_bar.php");
  116. ?>
  117. <div id="head_bar" >
  118. <div id="pali_pedia" style="display:flex;">
  119. <span><?php echo $_local->gui->anthology; ?></span>
  120. </div>
  121. <div>
  122. <span>
  123. <input type="checkbox" onchange="setVisibility('palitext_div',this)" checked><?php echo $_local->gui->script; ?>
  124. <span>
  125. <?php include "../reader/right_tool_bar.php";?>
  126. </span>
  127. </span>
  128. </div>
  129. </div>
  130. <div id="main_view" class="main_view">
  131. <div id="article_head" style="border-bottom: 1px solid gray;">
  132. <div id="article_title" class="term_word_head_pali"><?php echo $_local->gui->title; ?></div>
  133. <div id='path_div' style="display:flex;justify-content: space-between;">
  134. <div id="article_path">
  135. <span id="para_path"></span>
  136. <span class="case_dropdown" id="para_path_next_level">
  137. ……
  138. <div id="toc_next_menu" class="case_dropdown-content">
  139. </div>
  140. </span>
  141. </div>
  142. <div id="article_lang">
  143. <div class="click_dropdown_div">
  144. <div class="click_dropdown_button">语言</div>
  145. <div class="click_dropdown_content">
  146. <div class="click_dropdown_content_inner">
  147. <a>简体中文</a>
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. <div id="contents_view">
  155. <div id="contents_div" >
  156. <div id="contents" class="
  157. <?php
  158. if($_direction=="row"){
  159. echo ' horizontal ';
  160. }
  161. else{
  162. echo ' vertical ';
  163. }
  164. if($_display=="para"){
  165. echo ' para_mode ';
  166. }
  167. else{
  168. echo ' sent_mode ';
  169. }
  170. ?>
  171. ">
  172. <?php echo $_local->gui->loading; ?>...</div>
  173. <div id="contents_toc"></div>
  174. <div id="contents_foot">
  175. <div id="contents_nav" style="display:flex;justify-content: space-between;">
  176. <div id="contents_nav_left"></div>
  177. <div id="contents_nav_right"></div>
  178. </div>
  179. <div id="contents_dicuse"></div>
  180. </div>
  181. </div>
  182. <div id="right_pannal">
  183. <div class="fun_frame" style="overflow-x: scroll;position: fixed;width: 18%;">
  184. <div id = "collect_title" class="title"><?php echo $_local->gui->contents; ?></div>
  185. <div id = "toc_content" class="content" style="max-height:25vw;">
  186. </div>
  187. </div>
  188. <div class="fun_frame">
  189. <div style="display:flex;justify-content: space-between;">
  190. <div class="title"><?php echo $_local->gui->contributor; ?></div>
  191. <div class="click_dropdown_div">
  192. <div class="channel_select_button" onclick="onChannelMultiSelectStart()"><?php echo $_local->gui->select; ?></div>
  193. </div>
  194. </div>
  195. <div class='channel_select'>
  196. <button onclick='onChannelChange()'><?php echo $_local->gui->confirm; ?></button>
  197. <button onclick='onChannelMultiSelectCancel()'><?php echo $_local->gui->cancel; ?></button>
  198. </div>
  199. <div id="channal_list" class="content" style="max-height:25vw;">
  200. </div>
  201. </div>
  202. </div>
  203. </div>
  204. </div>
  205. <script>
  206. $(document).ready(function(){
  207. ntf_init();
  208. click_dropdown_init();
  209. note_create();
  210. reader_load();
  211. historay_init();
  212. });
  213. window.addEventListener('scroll',winScroll);
  214. function winScroll(e){
  215. if(GetPageScroll().y>220){
  216. }
  217. else{
  218. }
  219. }
  220. //滚动条位置
  221. function GetPageScroll()
  222. {
  223. var pos=new Object();
  224. var x, y;
  225. if(window.pageYOffset)
  226. { // all except IE
  227. y = window.pageYOffset;
  228. x = window.pageXOffset;
  229. } else if(document.documentElement && document.documentElement.scrollTop)
  230. { // IE 6 Strict
  231. y = document.documentElement.scrollTop;
  232. x = document.documentElement.scrollLeft;
  233. } else if(document.body) { // all other IE
  234. y = document.body.scrollTop;
  235. x = document.body.scrollLeft;
  236. }
  237. pos.x=x;
  238. pos.y=y;
  239. return(pos);
  240. }
  241. </script>
  242. </body>
  243. </html>