index.php 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  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. <script>
  179. var show_hide=1;
  180. function show_content(){
  181. if(show_hide==0){
  182. $("#left_pannal_inner").show();
  183. show_hide=1;
  184. }
  185. else{
  186. $("#left_pannal_inner").hide();
  187. show_hide=0;
  188. }
  189. }
  190. </script>
  191. <div id="head_bar" >
  192. <div style="display:flex;">
  193. <button class="icon_btn" onclick="show_content()"><?php echo $_local->gui->contents; ?></button>
  194. </div>
  195. <div style="margin: auto 0;">
  196. <span id="head_span">
  197. <?php
  198. if(isset($_GET["view"]) && $_GET["view"]=="article"){
  199. echo "<button class='icon_btn' title='{$_local->gui->modify} {$_local->gui->composition_structure}'>";
  200. echo "<a href='../article/my_article_edit.php?id=".$_GET["id"];
  201. echo "' target='_blank'>{$_local->gui->modify}</a></button>";
  202. }
  203. if($_GET["view"]!=="article" && $_GET["view"]!=="collection"){
  204. ?>
  205. <span class="icon_btn_div">
  206. <button id="file_add" type="button" class="icon_btn" onclick="to_article()" title=" ">
  207. <svg class="icon">
  208. <use xlink:href="../studio/svg/icon.svg#ic_add_circle"></use>
  209. </svg>
  210. 转换为文章
  211. </button>
  212. <div id='article_add_div' class="float_dlg"></div>
  213. </span>
  214. <?php
  215. }
  216. echo "<button class='icon_btn' title='{$_local->gui->add}{$_local->gui->subfield}'>";
  217. echo "<a href='../article/frame.php?view=".$_GET["view"];
  218. if(isset($_GET["id"])){
  219. echo "&id=".$_GET["id"];
  220. }
  221. if(isset($_GET["collection"])){
  222. echo "&collection=".$_GET["collection"];
  223. }
  224. if(isset($_GET["channel"])){
  225. echo "&channel=".$_GET["channel"];
  226. }
  227. if(isset($_GET["lang"])){
  228. echo "&lang=".$_GET["lang"];
  229. }
  230. if(isset($_GET["book"])){
  231. echo "&book=".$_GET["book"];
  232. }
  233. if(isset($_GET["par"])){
  234. echo "&par=".$_GET["par"];
  235. }
  236. if(isset($_GET["start"])){
  237. echo "&start=".$_GET["start"];
  238. }
  239. if(isset($_GET["end"])){
  240. echo "$end=".$_GET["end"];
  241. }
  242. echo "'>{$_local->gui->add}{$_local->gui->subfield}</a></button>";
  243. ?>
  244. <span>
  245. <?php include "../reader/right_tool_bar.php";?>
  246. </span>
  247. </span>
  248. </div>
  249. </div>
  250. <div id="left_pannal">
  251. <div id="left_pannal_inner" class="fun_frame" style="z-index: 99;display:block;">
  252. <!--<div id = "collect_title" class="title" style="text-align: right;background: #ffd70087;" onclick="show_content(this)"></div>-->
  253. <div id = "toc_content" class="content" style="padding-top:0;">
  254. </div>
  255. </div>
  256. </div>
  257. <div id="main_view" class="main_view">
  258. <div id="article_head" style="border-bottom: 1px solid gray;">
  259. <div style="display:flex;">
  260. <div id="article_path" class=""></div>
  261. <div id="article_path_title"></div>
  262. </div>
  263. <div id="article_title" class="term_word_head_pali"></div>
  264. <div id="article_subtitle"></div>
  265. <div id="article_author"></div>
  266. <div id="like_div">
  267. <like restype='article' resid='124'></like>
  268. <watch restype='article' resid='124'></watch>
  269. </div>
  270. </div>
  271. <div id="contents_view">
  272. <div id="contents_div">
  273. <div id="summary"></div>
  274. <div id="contents" class="<?php echo $contentClass;?>">
  275. <?php echo $_local->gui->loading; ?>...
  276. </div>
  277. <div id="contents_foot">
  278. <div id="contents_nav" style="display:flex;justify-content: space-between;">
  279. <div id="contents_nav_left"></div>
  280. <div id="contents_nav_right"></div>
  281. </div>
  282. <div id="contents_dicuse">
  283. </div>
  284. </div>
  285. </div>
  286. <div id="right_pannal">
  287. <div class="fun_frame" style="overflow-x: scroll;position: fixed;width: 18%;">
  288. <div style="display:flex;justify-content: space-between;">
  289. <div class="title"><?php echo $_local->gui->contributor; ?></div>
  290. <div class="click_dropdown_div">
  291. <div class="channel_select_button" onclick="onChannelMultiSelectStart()"><?php echo $_local->gui->select; ?></div>
  292. </div>
  293. </div>
  294. <div class='channel_select'>
  295. <button onclick='onChannelChange()'><?php echo $_local->gui->confirm; ?></button>
  296. <button onclick='onChannelMultiSelectCancel()'><?php echo $_local->gui->cancel; ?></button>
  297. </div>
  298. <div id="channal_list" class="content" style="max-height:calc(100vh - 20em);">
  299. </div>
  300. </div>
  301. </div>
  302. </div>
  303. </div>
  304. <script>
  305. $(document).ready(function(){
  306. article_add_dlg_init("article_add_div");
  307. ntf_init();
  308. click_dropdown_init();
  309. note_create();
  310. historay_init();
  311. switch (_view) {
  312. case "article":
  313. articel_load(_articel_id,_collection_id);
  314. if(_collection_id!=""){
  315. articel_load_article_list(_articel_id,_collection_id);
  316. }
  317. break;
  318. case "collection":
  319. collect_load(_collection_id);
  320. break;
  321. case "sent":
  322. case "para":
  323. case "chapter":
  324. case "book":
  325. case "series":
  326. palicanon_load();
  327. reader_get_path();
  328. render_toc();
  329. break;
  330. case "simsent":
  331. case "sim":
  332. palicanon_load();
  333. break;
  334. default:
  335. break;
  336. }
  337. });
  338. window.addEventListener('scroll',winScroll);
  339. function winScroll(e){
  340. if(GetPageScroll().y>220){
  341. }
  342. else{
  343. }
  344. }
  345. //滚动条位置
  346. function GetPageScroll()
  347. {
  348. var pos=new Object();
  349. var x, y;
  350. if(window.pageYOffset)
  351. { // all except IE
  352. y = window.pageYOffset;
  353. x = window.pageXOffset;
  354. } else if(document.documentElement && document.documentElement.scrollTop)
  355. { // IE 6 Strict
  356. y = document.documentElement.scrollTop;
  357. x = document.documentElement.scrollLeft;
  358. } else if(document.body) { // all other IE
  359. y = document.body.scrollTop;
  360. x = document.body.scrollLeft;
  361. }
  362. pos.x=x;
  363. pos.y=y;
  364. return(pos);
  365. }
  366. </script>
  367. <div class="modal_win_bg">
  368. </div>
  369. <div id="model_win" class="model_win_container"></div>
  370. </body>
  371. </html>