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