index.php 5.6 KB

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