index.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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="./article.js"></script>
  8. <script src="../widget/click_dropdown.js"></script>
  9. <link type="text/css" rel="stylesheet" href="../widget/click_dropdown.css"/>
  10. <script>
  11. <?php
  12. $_id = "";
  13. $_display = "";
  14. $_channal = "";
  15. $_collect = "";
  16. if(isset($_GET["id"])){
  17. echo "_articel_id='".$_GET["id"]."';";
  18. }
  19. if(isset($_GET["collect"])){
  20. echo "_collect_id='".$_GET["collect"]."';";
  21. }
  22. if(isset($_GET["display"])){
  23. echo "_display='".$_GET["display"]."';";
  24. }
  25. if(isset($_GET["channal"])){
  26. echo "_channal='".$_GET["channal"]."';";
  27. }
  28. if(isset($_GET["lang"])){
  29. echo "_lang='".$_GET["lang"]."';";
  30. }
  31. if(isset($_GET["author"])){
  32. echo "_author='".$_GET["author"]."';";
  33. }
  34. ?>
  35. </script>
  36. <link type="text/css" rel="stylesheet" href="style.css" />
  37. <link type="text/css" rel="stylesheet" href="mobile.css" media="screen and (max-width:800px)" />
  38. <link type="text/css" rel="stylesheet" href="print.css" media="print" />
  39. <?php
  40. require_once("../pcdl/head_bar.php");
  41. ?>
  42. <div id="head_bar" >
  43. <div id="pali_pedia" style="display:flex;">
  44. <span><?php echo $_local->gui->anthology; ?></span>
  45. </div>
  46. <div>
  47. <span>
  48. <?php
  49. if(isset($_GET["id"])){
  50. echo "<button class='icon_btn' title='{$_local->gui->modify} {$_local->gui->composition_structure}'>";
  51. echo "<a href='../article/my_article_edit.php?id=".$_GET["id"];
  52. echo "' target='_blank'>{$_local->gui->modify}</a></button>";
  53. echo "<button class='icon_btn' title='{$_local->gui->add}{$_local->gui->subfield}'>";
  54. echo "<a href='../article/frame.php?id=".$_GET["id"];
  55. echo "'>{$_local->gui->add}{$_local->gui->subfield}</a></button>";
  56. if(isset($_GET["display"]) && $_GET["display"]=="para"){
  57. echo "<button class='icon_btn active' title='{$_local->gui->show} {$_local->gui->each_paragraph}'>";
  58. echo $_local->gui->each_paragraph;
  59. echo "</button>";
  60. }
  61. else{
  62. echo "<button class='icon_btn'>";
  63. echo "<a href='../article/?id=".$_GET["id"];
  64. if(isset($_GET["channal"])){
  65. echo "&channal=".$_GET["channal"];
  66. }
  67. echo "&display=para' title='{$_local->gui->show} {$_local->gui->each_paragraph}'>";
  68. echo $_local->gui->each_paragraph;
  69. echo "</a>";
  70. echo "</button>";
  71. }
  72. if(isset($_GET["display"]) && $_GET["display"]=="sent"){
  73. echo "<button class='icon_btn active' title='{$_local->gui->show} {$_local->gui->each_sentence}'>";
  74. echo $_local->gui->each_sentence;
  75. echo "</button>";
  76. }
  77. else{
  78. echo "<button class='icon_btn'><a href='../article/?id=".$_GET["id"];
  79. if(isset($_GET["channal"])){
  80. echo "&channal=".$_GET["channal"];
  81. }
  82. echo "&display=sent";
  83. echo "' title='{$_local->gui->show} {$_local->gui->each_sentence}'>{$_local->gui->each_sentence}</a></button>";
  84. }
  85. }
  86. ?>
  87. <span>
  88. <?php include "../reader/right_tool_bar.php";?>
  89. </span>
  90. </span>
  91. </div>
  92. </div>
  93. <div id="main_view" class="main_view">
  94. <div id="article_head" style="border-bottom: 1px solid gray;">
  95. <div id="article_title" class="term_word_head_pali"><?php echo $_local->gui->title; ?></div>
  96. <div id="article_subtitle"><?php echo $_local->gui->sub_title; ?></div>
  97. <div id="article_author"><?php echo $_local->gui->author; ?></div>
  98. </div>
  99. <div id="contents_view">
  100. <div id="contents_div">
  101. <div id="contents">
  102. <?php echo $_local->gui->loading; ?>...
  103. </div>
  104. <div id="contents_foot">
  105. <div id="contents_nav" style="display:flex;justify-content: space-between;">
  106. <div id="contents_nav_left"></div>
  107. <div id="contents_nav_right"></div>
  108. </div>
  109. <div id="contents_dicuse">
  110. </div>
  111. </div>
  112. </div>
  113. <div id="right_pannal">
  114. <div class="fun_frame">
  115. <div id = "collect_title" class="title"><?php echo $_local->gui->contents; ?></div>
  116. <div id = "toc_content" class="content" style="max-height:25vw;">
  117. </div>
  118. </div>
  119. <div class="fun_frame">
  120. <div style="display:flex;justify-content: space-between;">
  121. <div class="title"><?php echo $_local->gui->contributor; ?></div>
  122. <div class="click_dropdown_div">
  123. <div class="channel_select_button" onclick="onChannelMultiSelectStart()"><?php echo $_local->gui->select; ?></div>
  124. </div>
  125. </div>
  126. <div class='channel_select'>
  127. <button onclick='onChannelChange()'><?php echo $_local->gui->confirm; ?></button>
  128. <button onclick='onChannelMultiSelectCancel()'><?php echo $_local->gui->cancel; ?></button>
  129. </div>
  130. <div id="channal_list" class="content" style="max-height:25vw;">
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. <script>
  137. $(document).ready(function(){
  138. ntf_init();
  139. click_dropdown_init();
  140. note_create();
  141. historay_init();
  142. if(_collect_id==""){
  143. articel_load(_articel_id);
  144. articel_load_collect(_articel_id);
  145. }
  146. else{
  147. collect_load(_collect_id);
  148. }
  149. });
  150. window.addEventListener('scroll',winScroll);
  151. function winScroll(e){
  152. if(GetPageScroll().y>220){
  153. }
  154. else{
  155. }
  156. }
  157. //滚动条位置
  158. function GetPageScroll()
  159. {
  160. var pos=new Object();
  161. var x, y;
  162. if(window.pageYOffset)
  163. { // all except IE
  164. y = window.pageYOffset;
  165. x = window.pageXOffset;
  166. } else if(document.documentElement && document.documentElement.scrollTop)
  167. { // IE 6 Strict
  168. y = document.documentElement.scrollTop;
  169. x = document.documentElement.scrollLeft;
  170. } else if(document.body) { // all other IE
  171. y = document.body.scrollTop;
  172. x = document.body.scrollLeft;
  173. }
  174. pos.x=x;
  175. pos.y=y;
  176. return(pos);
  177. }
  178. </script>
  179. <div class="modal_win_bg">
  180. </div>
  181. <div id="model_win" class="model_win_container"></div>
  182. </body>
  183. </html>