index.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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["collection"])){
  23. echo "_collection_id='".$_GET["collection"]."';";
  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. if(isset($_GET["mode"]) && $_GET["mode"]=="edit"){
  35. $_mode = "edit";
  36. echo "_mode='edit';";
  37. }
  38. else{
  39. $_mode = "read";
  40. echo "_mode='read';";
  41. }
  42. if(isset($_GET["display"])){
  43. $_display = $_GET["display"];
  44. echo "_display='".$_GET["display"]."';";
  45. }
  46. else{
  47. if($_mode=="read"){
  48. $_display = "para";
  49. echo "_display='para';";
  50. }
  51. else{
  52. $_display = "sent";
  53. echo "_display='sent';";
  54. }
  55. }
  56. if(isset($_GET["direction"])){
  57. $_direction = $_GET["direction"];
  58. echo "_direction='".$_GET["direction"]."';";
  59. }
  60. else{
  61. if($_mode=="read"){
  62. $_direction = "row";
  63. echo "_direction='row';";
  64. }
  65. else{
  66. $_direction = "col";
  67. echo "_direction='col';";
  68. }
  69. }
  70. $contentClass= "";
  71. if($_direction=="row"){
  72. $contentClass .= ' horizontal ';
  73. }
  74. else{
  75. $contentClass .= ' vertical ';
  76. }
  77. if($_display=="para"){
  78. $contentClass .= ' para_mode ';
  79. }
  80. else{
  81. $contentClass .= ' sent_mode ';
  82. }
  83. ?>
  84. </script>
  85. <link type="text/css" rel="stylesheet" href="style.css" />
  86. <link type="text/css" rel="stylesheet" href="mobile.css" media="screen and (max-width:800px)" />
  87. <link type="text/css" rel="stylesheet" href="print.css" media="print" />
  88. <?php
  89. require_once("../pcdl/head_bar.php");
  90. ?>
  91. <div id="head_bar" >
  92. <div id="pali_pedia" style="display:flex;">
  93. <span><?php echo $_local->gui->anthology; ?></span>
  94. </div>
  95. <div style="margin: auto 0;">
  96. <span id="head_span">
  97. <?php
  98. if(isset($_GET["id"])){
  99. echo "<button class='icon_btn' title='{$_local->gui->modify} {$_local->gui->composition_structure}'>";
  100. echo "<a href='../article/my_article_edit.php?id=".$_GET["id"];
  101. echo "' target='_blank'>{$_local->gui->modify}</a></button>";
  102. echo "<button class='icon_btn' title='{$_local->gui->add}{$_local->gui->subfield}'>";
  103. echo "<a href='../article/frame.php?id=".$_GET["id"];
  104. echo "'>{$_local->gui->add}{$_local->gui->subfield}</a></button>";
  105. }
  106. ?>
  107. <span>
  108. <?php include "../reader/right_tool_bar.php";?>
  109. </span>
  110. </span>
  111. </div>
  112. </div>
  113. <div id="main_view" class="main_view">
  114. <div id="article_head" style="border-bottom: 1px solid gray;">
  115. <div id="article_title" class="term_word_head_pali"><?php echo $_local->gui->title; ?></div>
  116. <div id="article_subtitle"><?php echo $_local->gui->sub_title; ?></div>
  117. <div id="article_author"><?php echo $_local->gui->author; ?></div>
  118. </div>
  119. <div id="contents_view">
  120. <div id="contents_div">
  121. <div id="contents" class="<?php echo $contentClass;?>">
  122. <?php echo $_local->gui->loading; ?>...
  123. </div>
  124. <div id="contents_foot">
  125. <div id="contents_nav" style="display:flex;justify-content: space-between;">
  126. <div id="contents_nav_left"></div>
  127. <div id="contents_nav_right"></div>
  128. </div>
  129. <div id="contents_dicuse">
  130. </div>
  131. </div>
  132. </div>
  133. <div id="right_pannal">
  134. <div class="fun_frame">
  135. <div id = "collect_title" class="title"><?php echo $_local->gui->contents; ?></div>
  136. <div id = "toc_content" class="content" style="max-height:25vw;">
  137. </div>
  138. </div>
  139. <div class="fun_frame">
  140. <div style="display:flex;justify-content: space-between;">
  141. <div class="title"><?php echo $_local->gui->contributor; ?></div>
  142. <div class="click_dropdown_div">
  143. <div class="channel_select_button" onclick="onChannelMultiSelectStart()"><?php echo $_local->gui->select; ?></div>
  144. </div>
  145. </div>
  146. <div class='channel_select'>
  147. <button onclick='onChannelChange()'><?php echo $_local->gui->confirm; ?></button>
  148. <button onclick='onChannelMultiSelectCancel()'><?php echo $_local->gui->cancel; ?></button>
  149. </div>
  150. <div id="channal_list" class="content" style="max-height:25vw;">
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. </div>
  156. <script>
  157. $(document).ready(function(){
  158. ntf_init();
  159. click_dropdown_init();
  160. note_create();
  161. historay_init();
  162. if(_collect_id==""){
  163. articel_load(_articel_id,_collection_id);
  164. articel_load_collect(_articel_id);
  165. }
  166. else{
  167. collect_load(_collect_id);
  168. }
  169. });
  170. window.addEventListener('scroll',winScroll);
  171. function winScroll(e){
  172. if(GetPageScroll().y>220){
  173. }
  174. else{
  175. }
  176. }
  177. //滚动条位置
  178. function GetPageScroll()
  179. {
  180. var pos=new Object();
  181. var x, y;
  182. if(window.pageYOffset)
  183. { // all except IE
  184. y = window.pageYOffset;
  185. x = window.pageXOffset;
  186. } else if(document.documentElement && document.documentElement.scrollTop)
  187. { // IE 6 Strict
  188. y = document.documentElement.scrollTop;
  189. x = document.documentElement.scrollLeft;
  190. } else if(document.body) { // all other IE
  191. y = document.body.scrollTop;
  192. x = document.body.scrollLeft;
  193. }
  194. pos.x=x;
  195. pos.y=y;
  196. return(pos);
  197. }
  198. </script>
  199. <div class="modal_win_bg">
  200. </div>
  201. <div id="model_win" class="model_win_container"></div>
  202. </body>
  203. </html>