index.php 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  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. <script language="javascript" src="../article/article_add_dlg.js"></script>
  125. <style>
  126. ul.fancytree-container{
  127. border:unset;
  128. }
  129. .fancytree-container .active {
  130. font-weight: 700;
  131. color: var(--main-color);
  132. background: linear-gradient(to right, var(--link-color), var(--nocolor));
  133. border-radius: 5px;
  134. }
  135. span.fancytree-title{
  136. color: var(--main-color1);
  137. }
  138. span.fancytree-node{
  139. display: flex;
  140. }
  141. #content_toc>ul>li>span.fancytree-node{
  142. font-size: 120%;
  143. font-weight: 900;
  144. }
  145. #article_path chapter{
  146. display:unset;
  147. }
  148. .float_dlg {
  149. display: none;
  150. width: 25em;
  151. position: absolute;
  152. right: 0;
  153. background-color: var(--btn-hover-bg-color);
  154. padding: 10px;
  155. border-radius: 5px;
  156. box-shadow: 0 0 10px var(--main-color);
  157. z-index: 1;
  158. }
  159. .float_dlg_left {
  160. display: none;
  161. width: 25em;
  162. position: absolute;
  163. background-color: var(--btn-hover-bg-color);
  164. padding: 10px;
  165. border-radius: 5px;
  166. box-shadow: 0 0 10px var(--main-color);
  167. z-index: 200;
  168. }
  169. #contents ul, li {
  170. margin-block-start: 0.5em;
  171. margin-block-end: 0.5em;
  172. margin-left: 7px;
  173. }
  174. </style>
  175. <?php
  176. require_once("../pcdl/head_bar.php");
  177. ?>
  178. <div id="head_bar" >
  179. <div style="display:flex;">
  180. </div>
  181. <div style="margin: auto 0;">
  182. <span id="head_span">
  183. <?php
  184. if(isset($_GET["view"]) && $_GET["view"]=="article"){
  185. echo "<button class='icon_btn' title='{$_local->gui->modify} {$_local->gui->composition_structure}'>";
  186. echo "<a href='../article/my_article_edit.php?id=".$_GET["id"];
  187. echo "' target='_blank'>{$_local->gui->modify}</a></button>";
  188. }
  189. if($_GET["view"]!=="article" && $_GET["view"]!=="collection"){
  190. ?>
  191. <span class="icon_btn_div">
  192. <button id="file_add" type="button" class="icon_btn" onclick="to_article()" title=" ">
  193. <svg class="icon">
  194. <use xlink:href="../studio/svg/icon.svg#ic_add_circle"></use>
  195. </svg>
  196. 转换为文章
  197. </button>
  198. <div id='article_add_div' class="float_dlg"></div>
  199. </span>
  200. <?php
  201. }
  202. echo "<button class='icon_btn' title='{$_local->gui->add}{$_local->gui->subfield}'>";
  203. echo "<a href='../article/frame.php?view=".$_GET["view"];
  204. if(isset($_GET["id"])){
  205. echo "&id=".$_GET["id"];
  206. }
  207. if(isset($_GET["collection"])){
  208. echo "&collection=".$_GET["collection"];
  209. }
  210. if(isset($_GET["channel"])){
  211. echo "&channel=".$_GET["channel"];
  212. }
  213. if(isset($_GET["lang"])){
  214. echo "&lang=".$_GET["lang"];
  215. }
  216. if(isset($_GET["book"])){
  217. echo "&book=".$_GET["book"];
  218. }
  219. if(isset($_GET["par"])){
  220. echo "&par=".$_GET["par"];
  221. }
  222. if(isset($_GET["start"])){
  223. echo "&start=".$_GET["start"];
  224. }
  225. if(isset($_GET["end"])){
  226. echo "$end=".$_GET["end"];
  227. }
  228. echo "'>{$_local->gui->add}{$_local->gui->subfield}</a></button>";
  229. ?>
  230. <span>
  231. <?php include "../reader/right_tool_bar.php";?>
  232. </span>
  233. </span>
  234. </div>
  235. </div>
  236. <div id="left_pannal">
  237. <div id="left_pannal_inner" class="fun_frame" >
  238. <div id = "collect_title" class="title"><?php echo $_local->gui->contents; ?></div>
  239. <div id = "toc_content" class="content" >
  240. </div>
  241. </div>
  242. </div>
  243. <div id="main_view" class="main_view">
  244. <div id="article_head" style="border-bottom: 1px solid gray;">
  245. <div style="display:flex;">
  246. <div id="article_path" class=""></div>
  247. <div id="article_path_title"></div>
  248. </div>
  249. <div id="article_title" class="term_word_head_pali"></div>
  250. <div id="article_subtitle"></div>
  251. <div id="article_author"></div>
  252. <div id="like_div">
  253. <like restype='article' resid='124'></like>
  254. <watch restype='article' resid='124'></watch>
  255. </div>
  256. </div>
  257. <div id="contents_view">
  258. <div id="contents_div">
  259. <div id="summary"></div>
  260. <div id="contents" class="<?php echo $contentClass;?>">
  261. <?php echo $_local->gui->loading; ?>...
  262. </div>
  263. <div id="contents_foot">
  264. <div id="contents_nav" style="display:flex;justify-content: space-between;">
  265. <div id="contents_nav_left"></div>
  266. <div id="contents_nav_right"></div>
  267. </div>
  268. <div id="contents_dicuse">
  269. </div>
  270. </div>
  271. </div>
  272. <div id="right_pannal">
  273. <div class="fun_frame">
  274. <div style="display:flex;justify-content: space-between;">
  275. <div class="title"><?php echo $_local->gui->contributor; ?></div>
  276. <div class="click_dropdown_div">
  277. <div class="channel_select_button" onclick="onChannelMultiSelectStart()"><?php echo $_local->gui->select; ?></div>
  278. </div>
  279. </div>
  280. <div class='channel_select'>
  281. <button onclick='onChannelChange()'><?php echo $_local->gui->confirm; ?></button>
  282. <button onclick='onChannelMultiSelectCancel()'><?php echo $_local->gui->cancel; ?></button>
  283. </div>
  284. <div id="channal_list" class="content" style="max-height:25vw;">
  285. </div>
  286. </div>
  287. </div>
  288. </div>
  289. </div>
  290. <script>
  291. $(document).ready(function(){
  292. article_add_dlg_init("article_add_div");
  293. ntf_init();
  294. click_dropdown_init();
  295. note_create();
  296. historay_init();
  297. switch (_view) {
  298. case "article":
  299. articel_load(_articel_id,_collection_id);
  300. if(_collection_id!=""){
  301. articel_load_article_list(_articel_id,_collection_id);
  302. }
  303. break;
  304. case "collection":
  305. collect_load(_collection_id);
  306. break;
  307. case "sent":
  308. case "para":
  309. case "chapter":
  310. case "book":
  311. case "series":
  312. palicanon_load();
  313. reader_get_path();
  314. render_toc();
  315. break;
  316. case "simsent":
  317. palicanon_load();
  318. break;
  319. default:
  320. break;
  321. }
  322. });
  323. window.addEventListener('scroll',winScroll);
  324. function winScroll(e){
  325. if(GetPageScroll().y>220){
  326. }
  327. else{
  328. }
  329. }
  330. //滚动条位置
  331. function GetPageScroll()
  332. {
  333. var pos=new Object();
  334. var x, y;
  335. if(window.pageYOffset)
  336. { // all except IE
  337. y = window.pageYOffset;
  338. x = window.pageXOffset;
  339. } else if(document.documentElement && document.documentElement.scrollTop)
  340. { // IE 6 Strict
  341. y = document.documentElement.scrollTop;
  342. x = document.documentElement.scrollLeft;
  343. } else if(document.body) { // all other IE
  344. y = document.body.scrollTop;
  345. x = document.body.scrollLeft;
  346. }
  347. pos.x=x;
  348. pos.y=y;
  349. return(pos);
  350. }
  351. </script>
  352. <div class="modal_win_bg">
  353. </div>
  354. <div id="model_win" class="model_win_container"></div>
  355. </body>
  356. </html>