index.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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["user_uid"])){
  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. </style>
  123. <?php
  124. require_once("../pcdl/head_bar.php");
  125. ?>
  126. <div id="head_bar" >
  127. <div style="display:flex;">
  128. <div id="article_path" >
  129. </div>
  130. <div id="article_path_title"></div>
  131. </div>
  132. <div style="margin: auto 0;">
  133. <span id="head_span">
  134. <?php
  135. if(isset($_GET["id"])){
  136. echo "<button class='icon_btn' title='{$_local->gui->modify} {$_local->gui->composition_structure}'>";
  137. echo "<a href='../article/my_article_edit.php?id=".$_GET["id"];
  138. echo "' target='_blank'>{$_local->gui->modify}</a></button>";
  139. echo "<button class='icon_btn' title='{$_local->gui->add}{$_local->gui->subfield}'>";
  140. echo "<a href='../article/frame.php?id=".$_GET["id"];
  141. echo "'>{$_local->gui->add}{$_local->gui->subfield}</a></button>";
  142. }
  143. ?>
  144. <span>
  145. <?php include "../reader/right_tool_bar.php";?>
  146. </span>
  147. </span>
  148. </div>
  149. </div>
  150. <div id="main_view" class="main_view">
  151. <div id="article_head" style="border-bottom: 1px solid gray;">
  152. <div id="article_title" class="term_word_head_pali"></div>
  153. <div id="article_subtitle"></div>
  154. <div id="article_author"></div>
  155. <div id="like_div">
  156. <like restype='article' resid='124'></like>
  157. <watch restype='article' resid='124'></watch>
  158. </div>
  159. </div>
  160. <div id="contents_view">
  161. <div id="contents_div">
  162. <div id="summary"></div>
  163. <div id="contents" class="<?php echo $contentClass;?>">
  164. <?php echo $_local->gui->loading; ?>...
  165. </div>
  166. <div id="contents_foot">
  167. <div id="contents_nav" style="display:flex;justify-content: space-between;">
  168. <div id="contents_nav_left"></div>
  169. <div id="contents_nav_right"></div>
  170. </div>
  171. <div id="contents_dicuse">
  172. </div>
  173. </div>
  174. </div>
  175. <div id="right_pannal">
  176. <div class="fun_frame" style="overflow-x: scroll;">
  177. <div id = "collect_title" class="title"><?php echo $_local->gui->contents; ?></div>
  178. <div id = "toc_content" class="content" >
  179. </div>
  180. </div>
  181. <div class="fun_frame">
  182. <div style="display:flex;justify-content: space-between;">
  183. <div class="title"><?php echo $_local->gui->contributor; ?></div>
  184. <div class="click_dropdown_div">
  185. <div class="channel_select_button" onclick="onChannelMultiSelectStart()"><?php echo $_local->gui->select; ?></div>
  186. </div>
  187. </div>
  188. <div class='channel_select'>
  189. <button onclick='onChannelChange()'><?php echo $_local->gui->confirm; ?></button>
  190. <button onclick='onChannelMultiSelectCancel()'><?php echo $_local->gui->cancel; ?></button>
  191. </div>
  192. <div id="channal_list" class="content" style="max-height:25vw;">
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. </div>
  198. <script>
  199. $(document).ready(function(){
  200. ntf_init();
  201. click_dropdown_init();
  202. note_create();
  203. historay_init();
  204. if(_articel_id==""){
  205. collect_load(_collection_id);
  206. }
  207. else{
  208. articel_load(_articel_id,_collection_id);
  209. if(_collection_id!=""){
  210. articel_load_article_list(_articel_id,_collection_id);
  211. }
  212. }
  213. });
  214. window.addEventListener('scroll',winScroll);
  215. function winScroll(e){
  216. if(GetPageScroll().y>220){
  217. }
  218. else{
  219. }
  220. }
  221. //滚动条位置
  222. function GetPageScroll()
  223. {
  224. var pos=new Object();
  225. var x, y;
  226. if(window.pageYOffset)
  227. { // all except IE
  228. y = window.pageYOffset;
  229. x = window.pageXOffset;
  230. } else if(document.documentElement && document.documentElement.scrollTop)
  231. { // IE 6 Strict
  232. y = document.documentElement.scrollTop;
  233. x = document.documentElement.scrollLeft;
  234. } else if(document.body) { // all other IE
  235. y = document.body.scrollTop;
  236. x = document.body.scrollLeft;
  237. }
  238. pos.x=x;
  239. pos.y=y;
  240. return(pos);
  241. }
  242. </script>
  243. <div class="modal_win_bg">
  244. </div>
  245. <div id="model_win" class="model_win_container"></div>
  246. </body>
  247. </html>