index.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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["book"])){
  24. echo "_reader_book='".$_GET["book"]."';";
  25. }
  26. if(isset($_GET["para"])){
  27. echo "_reader_para='".$_GET["para"]."';";
  28. }
  29. if(isset($_GET["begin"])){
  30. echo "_reader_begin='".$_GET["begin"]."';";
  31. }
  32. if(isset($_GET["end"])){
  33. echo "_reader_end='".$_GET["end"]."';";
  34. }
  35. if(isset($_GET["display"])){
  36. echo "_display='".$_GET["display"]."';";
  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. ?>
  48. </script>
  49. <?php
  50. require_once("../pcdl/head_bar.php");
  51. ?>
  52. <div id="head_bar" >
  53. <div id="pali_pedia" style="display:flex;">
  54. <span><?php echo $_local->gui->anthology; ?></span>
  55. </div>
  56. <div>
  57. <span>
  58. <input type="checkbox" onchange="setVisibility('palitext',this)" checked><?php echo $_local->gui->script; ?>
  59. <?php
  60. //echo "<button class='icon_btn' title='{$_local->gui->add}{$_local->gui->subfield}'>";
  61. //echo "<a href='../article/frame.php?id=".$_GET["id"];
  62. //echo "'>{$_local->gui->add}{$_local->gui->subfield}</a></button>";
  63. if(isset($_GET["display"]) && $_GET["display"]=="para"){
  64. echo "<button class='icon_btn active' title='{$_local->gui->show} {$_local->gui->each_paragraph}'>";
  65. echo $_local->gui->each_paragraph;
  66. echo "</button>";
  67. }
  68. else{
  69. echo "<button class='icon_btn'>";
  70. echo "<a href='../reader/?view=".$_GET["view"];
  71. if(isset($_GET["book"])){
  72. echo "&book=".$_GET["book"];
  73. }
  74. if(isset($_GET["para"])){
  75. echo "&para=".$_GET["para"];
  76. }
  77. if(isset($_GET["begin"])){
  78. echo "&begin=".$_GET["begin"];
  79. }
  80. if(isset($_GET["end"])){
  81. echo "&end=".$_GET["end"];
  82. }
  83. if(isset($_GET["channal"])){
  84. echo "&channal=".$_GET["channal"];
  85. }
  86. if(isset($_GET["lang"])){
  87. echo "&lang=".$_GET["lang"];
  88. }
  89. echo "&display=para' title='{$_local->gui->show} {$_local->gui->each_paragraph}'>";
  90. echo $_local->gui->each_paragraph;
  91. echo "</a>";
  92. echo "</button>";
  93. }
  94. if(isset($_GET["display"]) && $_GET["display"]=="sent"){
  95. echo "<button class='icon_btn active' title='{$_local->gui->show} {$_local->gui->each_sentence}'>";
  96. echo $_local->gui->each_sentence;
  97. echo "</button>";
  98. }
  99. else{
  100. echo "<button class='icon_btn'>";
  101. echo "<a href='../reader/?view=".$_GET["view"];
  102. if(isset($_GET["book"])){
  103. echo "&book=".$_GET["book"];
  104. }
  105. if(isset($_GET["para"])){
  106. echo "&para=".$_GET["para"];
  107. }
  108. if(isset($_GET["begin"])){
  109. echo "&begin=".$_GET["begin"];
  110. }
  111. if(isset($_GET["end"])){
  112. echo "&end=".$_GET["end"];
  113. }
  114. if(isset($_GET["channal"])){
  115. echo "&channal=".$_GET["channal"];
  116. }
  117. if(isset($_GET["lang"])){
  118. echo "&lang=".$_GET["lang"];
  119. }
  120. echo "&display=sent";
  121. echo "' title='{$_local->gui->show} {$_local->gui->each_sentence}'>{$_local->gui->each_sentence}</a></button>";
  122. }
  123. ?>
  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" style="padding: 0 1em 0 30px;width:70vw;">
  156. <div id="contents"><?php echo $_local->gui->loading; ?>...</div>
  157. <div id="contents_toc"></div>
  158. <div id="contents_foot">
  159. <div id="contents_nav" style="display:flex;justify-content: space-between;">
  160. <div id="contents_nav_left"></div>
  161. <div id="contents_nav_right"></div>
  162. </div>
  163. <div id="contents_dicuse"></div>
  164. </div>
  165. </div>
  166. <div id="right_pannal">
  167. <div class="fun_frame">
  168. <div id = "collect_title" class="title"><?php echo $_local->gui->contents; ?></div>
  169. <div id = "toc_content" class="content" style="max-height:25vw;">
  170. </div>
  171. </div>
  172. <div class="fun_frame">
  173. <div style="display:flex;justify-content: space-between;">
  174. <div class="title"><?php echo $_local->gui->contributor; ?></div>
  175. <div class="click_dropdown_div">
  176. <div class="channel_select_button" onclick="onChannelMultiSelectStart()"><?php echo $_local->gui->select; ?></div>
  177. </div>
  178. </div>
  179. <div class='channel_select'>
  180. <button onclick='onChannelChange()'><?php echo $_local->gui->confirm; ?></button>
  181. <button onclick='onChannelMultiSelectCancel()'><?php echo $_local->gui->cancel; ?></button>
  182. </div>
  183. <div id="channal_list" class="content" style="max-height:25vw;">
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. <script>
  190. $(document).ready(function(){
  191. ntf_init();
  192. click_dropdown_init();
  193. note_create();
  194. reader_load();
  195. historay_init();
  196. });
  197. window.addEventListener('scroll',winScroll);
  198. function winScroll(e){
  199. if(GetPageScroll().y>220){
  200. }
  201. else{
  202. }
  203. }
  204. //滚动条位置
  205. function GetPageScroll()
  206. {
  207. var pos=new Object();
  208. var x, y;
  209. if(window.pageYOffset)
  210. { // all except IE
  211. y = window.pageYOffset;
  212. x = window.pageXOffset;
  213. } else if(document.documentElement && document.documentElement.scrollTop)
  214. { // IE 6 Strict
  215. y = document.documentElement.scrollTop;
  216. x = document.documentElement.scrollLeft;
  217. } else if(document.body) { // all other IE
  218. y = document.body.scrollTop;
  219. x = document.body.scrollLeft;
  220. }
  221. pos.x=x;
  222. pos.y=y;
  223. return(pos);
  224. }
  225. </script>
  226. </body>
  227. </html>