index.php 5.9 KB

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