index.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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["begin"])){
  33. echo "_reader_begin='".$_GET["begin"]."';";
  34. }
  35. if(isset($_GET["end"])){
  36. echo "_reader_end='".$_GET["end"]."';";
  37. }
  38. if(isset($_GET["channal"])){
  39. echo "_channal='".$_GET["channal"]."';";
  40. }
  41. if(isset($_GET["lang"])){
  42. echo "_lang='".$_GET["lang"]."';";
  43. }
  44. if(isset($_GET["author"])){
  45. echo "_author='".$_GET["author"]."';";
  46. }
  47. if(isset($_GET["mode"]) && $_GET["mode"]=="edit"){
  48. $_mode = "edit";
  49. echo "_mode='edit';";
  50. }
  51. else{
  52. $_mode = "read";
  53. echo "_mode='read';";
  54. }
  55. if(isset($_GET["display"])){
  56. if($_mode == "edit"){
  57. $_display = "sent";
  58. echo "_display='sent';";
  59. }
  60. else{
  61. $_display = $_GET["display"];
  62. echo "_display='".$_GET["display"]."';";
  63. }
  64. }
  65. else{
  66. if($_mode=="read"){
  67. $_display = "para";
  68. echo "_display='para';";
  69. }
  70. else{
  71. $_display = "sent";
  72. echo "_display='sent';";
  73. }
  74. }
  75. if(isset($_GET["direction"])){
  76. $_direction = $_GET["direction"];
  77. echo "_direction='".$_GET["direction"]."';";
  78. }
  79. else{
  80. if($_mode=="read"){
  81. $_direction = "row";
  82. echo "_direction='row';";
  83. }
  84. else{
  85. $_direction = "col";
  86. echo "_direction='col';";
  87. }
  88. }
  89. ?>
  90. </script>
  91. <?php
  92. require_once("../pcdl/head_bar.php");
  93. ?>
  94. <div id="head_bar" >
  95. <div id="pali_pedia" style="display:flex;">
  96. <span><?php echo $_local->gui->anthology; ?></span>
  97. </div>
  98. <div>
  99. <span>
  100. <input type="checkbox" onchange="setVisibility('palitext_div',this)" checked><?php echo $_local->gui->script; ?>
  101. <span>
  102. <?php include "../reader/right_tool_bar.php";?>
  103. </span>
  104. </span>
  105. </div>
  106. </div>
  107. <div id="main_view" class="main_view">
  108. <div id="article_head" style="border-bottom: 1px solid gray;">
  109. <div id="article_title" class="term_word_head_pali"><?php echo $_local->gui->title; ?></div>
  110. <div id='path_div' style="display:flex;justify-content: space-between;">
  111. <div id="article_path">
  112. <span id="para_path"></span>
  113. <span class="case_dropdown" id="para_path_next_level">
  114. ……
  115. <div id="toc_next_menu" class="case_dropdown-content">
  116. </div>
  117. </span>
  118. </div>
  119. <div id="article_lang">
  120. <div class="click_dropdown_div">
  121. <div class="click_dropdown_button">语言</div>
  122. <div class="click_dropdown_content">
  123. <div class="click_dropdown_content_inner">
  124. <a>简体中文</a>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. <div id="contents_view">
  132. <div id="contents_div" >
  133. <div id="contents" class="
  134. <?php
  135. if($_direction=="row"){
  136. echo ' horizontal ';
  137. }
  138. else{
  139. echo ' vertical ';
  140. }
  141. if($_display=="para"){
  142. echo ' para_mode ';
  143. }
  144. else{
  145. echo ' sent_mode ';
  146. }
  147. ?>
  148. ">
  149. <?php echo $_local->gui->loading; ?>...</div>
  150. <div id="contents_toc"></div>
  151. <div id="contents_foot">
  152. <div id="contents_nav" style="display:flex;justify-content: space-between;">
  153. <div id="contents_nav_left"></div>
  154. <div id="contents_nav_right"></div>
  155. </div>
  156. <div id="contents_dicuse"></div>
  157. </div>
  158. </div>
  159. <div id="right_pannal">
  160. <div class="fun_frame">
  161. <div id = "collect_title" class="title"><?php echo $_local->gui->contents; ?></div>
  162. <div id = "toc_content" class="content" style="max-height:25vw;">
  163. </div>
  164. </div>
  165. <div class="fun_frame">
  166. <div style="display:flex;justify-content: space-between;">
  167. <div class="title"><?php echo $_local->gui->contributor; ?></div>
  168. <div class="click_dropdown_div">
  169. <div class="channel_select_button" onclick="onChannelMultiSelectStart()"><?php echo $_local->gui->select; ?></div>
  170. </div>
  171. </div>
  172. <div class='channel_select'>
  173. <button onclick='onChannelChange()'><?php echo $_local->gui->confirm; ?></button>
  174. <button onclick='onChannelMultiSelectCancel()'><?php echo $_local->gui->cancel; ?></button>
  175. </div>
  176. <div id="channal_list" class="content" style="max-height:25vw;">
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. <script>
  183. $(document).ready(function(){
  184. ntf_init();
  185. click_dropdown_init();
  186. note_create();
  187. reader_load();
  188. historay_init();
  189. });
  190. window.addEventListener('scroll',winScroll);
  191. function winScroll(e){
  192. if(GetPageScroll().y>220){
  193. }
  194. else{
  195. }
  196. }
  197. //滚动条位置
  198. function GetPageScroll()
  199. {
  200. var pos=new Object();
  201. var x, y;
  202. if(window.pageYOffset)
  203. { // all except IE
  204. y = window.pageYOffset;
  205. x = window.pageXOffset;
  206. } else if(document.documentElement && document.documentElement.scrollTop)
  207. { // IE 6 Strict
  208. y = document.documentElement.scrollTop;
  209. x = document.documentElement.scrollLeft;
  210. } else if(document.body) { // all other IE
  211. y = document.body.scrollTop;
  212. x = document.body.scrollLeft;
  213. }
  214. pos.x=x;
  215. pos.y=y;
  216. return(pos);
  217. }
  218. </script>
  219. </body>
  220. </html>