index.php 8.0 KB

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