index.php 8.9 KB

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