index.php 7.1 KB

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