index.php 6.7 KB

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