index.php 9.0 KB

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