index.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  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 "_collection_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" && isset($_COOKIE["userid"])){
  35. #登录状态下 编辑模式
  36. $_mode = "edit";
  37. echo "_mode='edit';";
  38. }
  39. else{
  40. $_mode = "read";
  41. echo "_mode='read';";
  42. }
  43. if(isset($_GET["display"])){
  44. if($_mode == "edit"){
  45. $_display = "sent";
  46. echo "_display='sent';";
  47. }
  48. else{
  49. $_display = $_GET["display"];
  50. echo "_display='".$_GET["display"]."';";
  51. }
  52. }
  53. else{
  54. if($_mode=="read"){
  55. $_display = "para";
  56. echo "_display='para';";
  57. }
  58. else{
  59. $_display = "sent";
  60. echo "_display='sent';";
  61. }
  62. }
  63. if(isset($_GET["direction"])){
  64. $_direction = $_GET["direction"];
  65. echo "_direction='".$_GET["direction"]."';";
  66. }
  67. else{
  68. if($_mode=="read"){
  69. $_direction = "row";
  70. echo "_direction='row';";
  71. }
  72. else{
  73. $_direction = "col";
  74. echo "_direction='col';";
  75. }
  76. }
  77. $contentClass= "";
  78. if($_direction=="row"){
  79. $contentClass .= ' horizontal ';
  80. }
  81. else{
  82. $contentClass .= ' vertical ';
  83. }
  84. if($_display=="para"){
  85. $contentClass .= ' para_mode ';
  86. }
  87. else{
  88. $contentClass .= ' sent_mode ';
  89. }
  90. $contentClass .= " $_mode ";
  91. ?>
  92. </script>
  93. <link type="text/css" rel="stylesheet" href="style.css" />
  94. <link type="text/css" rel="stylesheet" href="pad.css" media="screen and (max-width:1280px)" />
  95. <link type="text/css" rel="stylesheet" href="mobile.css" media="screen and (max-width:800px)" />
  96. <link type="text/css" rel="stylesheet" href="print.css" media="print" />
  97. <link href="../../node_modules/jquery.fancytree/dist/skin-win7/ui.fancytree.css" rel="stylesheet" type="text/css" class="skinswitcher">
  98. <script src="../tree/jquery.fancytree.js" type="text/javascript"></script>
  99. <script src="../article/my_collect.js" type="text/javascript"></script>
  100. <style>
  101. #toc_content ul.fancytree-container{
  102. border:unset;
  103. }
  104. .fancytree-container .active {
  105. font-weight: 700;
  106. color: var(--main-color);
  107. background: linear-gradient(to right, var(--link-color), var(--nocolor));
  108. border-radius: 5px;
  109. }
  110. span.fancytree-title{
  111. color: var(--main-color1);
  112. }
  113. span.fancytree-node{
  114. display: flex;
  115. }
  116. #toc_content{
  117. max-height: 25vw;
  118. width: max-content;
  119. }
  120. </style>
  121. <?php
  122. require_once("../pcdl/head_bar.php");
  123. ?>
  124. <div id="head_bar" >
  125. <div style="display:flex;">
  126. <div id="article_path" >
  127. </div>
  128. <div id="article_path_title"></div>
  129. </div>
  130. <div style="margin: auto 0;">
  131. <span id="head_span">
  132. <?php
  133. if(isset($_GET["id"])){
  134. echo "<button class='icon_btn' title='{$_local->gui->modify} {$_local->gui->composition_structure}'>";
  135. echo "<a href='../article/my_article_edit.php?id=".$_GET["id"];
  136. echo "' target='_blank'>{$_local->gui->modify}</a></button>";
  137. echo "<button class='icon_btn' title='{$_local->gui->add}{$_local->gui->subfield}'>";
  138. echo "<a href='../article/frame.php?id=".$_GET["id"];
  139. echo "'>{$_local->gui->add}{$_local->gui->subfield}</a></button>";
  140. }
  141. ?>
  142. <span>
  143. <?php include "../reader/right_tool_bar.php";?>
  144. </span>
  145. </span>
  146. </div>
  147. </div>
  148. <div id="main_view" class="main_view">
  149. <div id="article_head" style="border-bottom: 1px solid gray;">
  150. <div id="article_title" class="term_word_head_pali"><?php echo $_local->gui->title; ?></div>
  151. <div id="article_subtitle"><?php echo $_local->gui->sub_title; ?></div>
  152. <div id="article_author"><?php echo $_local->gui->author; ?></div>
  153. </div>
  154. <div id="contents_view">
  155. <div id="contents_div">
  156. <div id="contents" class="<?php echo $contentClass;?>">
  157. <?php echo $_local->gui->loading; ?>...
  158. </div>
  159. <div id="contents_foot">
  160. <div id="contents_nav" style="display:flex;justify-content: space-between;">
  161. <div id="contents_nav_left"></div>
  162. <div id="contents_nav_right"></div>
  163. </div>
  164. <div id="contents_dicuse">
  165. </div>
  166. </div>
  167. </div>
  168. <div id="right_pannal">
  169. <div class="fun_frame" style="overflow-x: scroll;">
  170. <div id = "collect_title" class="title"><?php echo $_local->gui->contents; ?></div>
  171. <div id = "toc_content" class="content" >
  172. </div>
  173. </div>
  174. <div class="fun_frame">
  175. <div style="display:flex;justify-content: space-between;">
  176. <div class="title"><?php echo $_local->gui->contributor; ?></div>
  177. <div class="click_dropdown_div">
  178. <div class="channel_select_button" onclick="onChannelMultiSelectStart()"><?php echo $_local->gui->select; ?></div>
  179. </div>
  180. </div>
  181. <div class='channel_select'>
  182. <button onclick='onChannelChange()'><?php echo $_local->gui->confirm; ?></button>
  183. <button onclick='onChannelMultiSelectCancel()'><?php echo $_local->gui->cancel; ?></button>
  184. </div>
  185. <div id="channal_list" class="content" style="max-height:25vw;">
  186. </div>
  187. </div>
  188. </div>
  189. </div>
  190. </div>
  191. <script>
  192. $(document).ready(function(){
  193. ntf_init();
  194. click_dropdown_init();
  195. note_create();
  196. historay_init();
  197. if(_articel_id==""){
  198. collect_load(_collection_id);
  199. }
  200. else{
  201. articel_load(_articel_id,_collection_id);
  202. if(_collection_id!=""){
  203. articel_load_article_list(_articel_id,_collection_id);
  204. }
  205. }
  206. });
  207. window.addEventListener('scroll',winScroll);
  208. function winScroll(e){
  209. if(GetPageScroll().y>220){
  210. }
  211. else{
  212. }
  213. }
  214. //滚动条位置
  215. function GetPageScroll()
  216. {
  217. var pos=new Object();
  218. var x, y;
  219. if(window.pageYOffset)
  220. { // all except IE
  221. y = window.pageYOffset;
  222. x = window.pageXOffset;
  223. } else if(document.documentElement && document.documentElement.scrollTop)
  224. { // IE 6 Strict
  225. y = document.documentElement.scrollTop;
  226. x = document.documentElement.scrollLeft;
  227. } else if(document.body) { // all other IE
  228. y = document.body.scrollTop;
  229. x = document.body.scrollLeft;
  230. }
  231. pos.x=x;
  232. pos.y=y;
  233. return(pos);
  234. }
  235. </script>
  236. <div class="modal_win_bg">
  237. </div>
  238. <div id="model_win" class="model_win_container"></div>
  239. </body>
  240. </html>