filenew.php 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <?php
  2. require 'checklogin.inc';
  3. include "./config.php";
  4. if(isset($_GET["language"])){$currLanguage=$_GET["language"];}
  5. else{$currLanguage="en";}
  6. //load language file
  7. if(file_exists($dir_language.$currLanguage.".php")){
  8. require $dir_language.$currLanguage.".php";
  9. }
  10. else{
  11. include $dir_language."default.php";
  12. }
  13. if(isset($_GET["device"])){$currDevice=$_GET["device"];}
  14. else{$currDevice="computer";}
  15. //require "module/editor/language/$currLanguage.php";
  16. ?>
  17. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  18. <html>
  19. <head>
  20. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  21. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  22. <link type="text/css" rel="stylesheet" href="css/style.css"/>
  23. <link type="text/css" rel="stylesheet" href="css/color_day.css" id="colorchange" />
  24. <link type="text/css" rel="stylesheet" href="css/style_mobile.css" media="screen and (max-width:767px)">
  25. <link type="text/css" rel="stylesheet" href="<?php echo $dir_user_base.$userid.$dir_myApp; ?>/style.css"/>
  26. <title>PCD Studio</title>
  27. <script language="javascript" src="config.js"></script>
  28. <script language="javascript" src="js/data.js"></script>
  29. <script language="javascript" src="js/common.js"></script>
  30. <script language="javascript" src="js/render.js"></script>
  31. <script language="javascript" src="js/xml.js"></script>
  32. <script language="javascript" src="js/editor.js"></script>
  33. <script language="javascript" src="js/wizard.js"></script>
  34. <script src="js/jquery-3.3.1.min.js"></script>
  35. <script language="javascript" src="module/editor/language/default.js"></script>
  36. <script language="javascript" src="module/editor/language/<?php echo $currLanguage; ?>.js"></script>
  37. <script language="javascript" src="module/editor_palicannon/palicannon.js"></script>
  38. <script language="javascript" src="module/editor_palicannon/language/<?php echo $currLanguage; ?>.js"></script>
  39. <!--加载语言文件 -->
  40. <script language="javascript" src="language/default.js"></script>
  41. <?php
  42. $myApp=$dir_user_base.$userid.$dir_myApp;
  43. if(file_exists($dir_user_base.$userid.$dir_myApp."/language/$currLanguage.js")){
  44. echo("<script language=\"javascript\" src=\"$myApp"."/language/$currLanguage.js\"></script>");
  45. }
  46. else{
  47. echo("<script language=\"javascript\" src=\"language/$currLanguage.js\"></script>");
  48. }
  49. ?>
  50. <!--加载语言文件结束 -->
  51. <script language="javascript">
  52. var g_device="computer";
  53. var strSertch = location.search;
  54. var gConfigDirMydocument="<?php echo $dir_user_base.$userid.$dir_mydocument; ?>/";
  55. if(strSertch.length>0){
  56. strSertch = strSertch.substr(1);
  57. var sertchList=strSertch.split('&');
  58. for (x in sertchList){
  59. var item = sertchList[x].split('=');
  60. if(item[0]=="device"){
  61. g_device=item[1];
  62. }
  63. }
  64. }
  65. if(g_device=="mobile"){
  66. g_is_mobile=true;
  67. }
  68. else{
  69. g_is_mobile=false;
  70. }
  71. var g_language="en";
  72. function menuLangrage(obj){
  73. g_language=obj.value;
  74. setCookie('language',g_language,365);
  75. window.location.assign("filenew.php?language="+g_language);
  76. }
  77. </script>
  78. </head>
  79. <body class="indexbody">
  80. <!-- tool bar begin-->
  81. <div class='index_toolbar'>
  82. <div id="index_nav">
  83. <button><a href="index.php?language=<?php echo $currLanguage; ?>"><?php echo $module_gui_str['editor']['1018'];?></a></button>
  84. <button><a href="index_pc.php?language=<?php echo $currLanguage; ?>"><?php echo $module_gui_str['editor_wizard']['1002'];?></a></button>
  85. <button class="selected"><?php echo $module_gui_str['editor']['1064'];?></button>
  86. <button><a href="index_tools.php?language=<?php echo $currLanguage; ?>"><?php echo $module_gui_str['editor']['1052'];?></a></button>
  87. </div>
  88. <div class="toolgroup1">
  89. <span><?php echo $module_gui_str['editor']['1050'];?></span>
  90. <select id="id_language" name="menu" onchange="menuLangrage(this)">
  91. <option value="en" >English</option>
  92. <option value="zh" >简体中文</option>
  93. <option value="tw" >繁體中文</option>
  94. </select>
  95. <?php
  96. echo $module_gui_str['editor']['1049'];
  97. echo "<a href=\"setting.php?item=account\">";
  98. echo $_COOKIE["nickname"];
  99. echo "</a>";
  100. echo $module_gui_str['editor']['1042'];
  101. echo "<a href='login.php?op=logout'>Logout</a>";
  102. ?>
  103. </div>
  104. </div>
  105. <!--tool bar end -->
  106. <div class="index_inner">
  107. <div id="wizard_div_mybook">
  108. <div class="editor_wizard">
  109. <div class="editor_wizard_caption"><?php echo $module_gui_str['editor_wizard']['1006'];?></div>
  110. <!--right side begin-->
  111. <div class="mybook_l">
  112. <div id="wizard_sutta_preview">
  113. <?php echo $module_gui_str['editor_wizard']['1007'];?>
  114. </div>
  115. </div>
  116. <div class="mybook_r">
  117. <div >
  118. <div>
  119. <button type="button" onclick="wizard_fileNewPreview()"><?php echo $module_gui_str['editor_wizard']['1007'];?></button>
  120. <button type="button" onclick="wizard_new_finish()"><?php echo $module_gui_str['editor_wizard']['1011'];?></button>
  121. <input id="chk_title" type="checkbox" checked="true" /><?php echo $module_gui_str['editor_wizard']['1008'];?>
  122. <span><input id="input_smart_switch" style="width: 14px; height: 14px" type="checkbox" checked="">
  123. <svg class="icon">
  124. <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="svg/icon.svg#ic_keyboard"></use>
  125. </svg>
  126. </span>
  127. </div>
  128. <ul class="common-tab">
  129. <li id="NewFilePali" class="common-tab_li" onclick="wizard_show_input('new_input_pali','NewFilePali')"><?php echo $module_gui_str['editor_wizard']['1009'];?></li>
  130. <li id="NewFileTran1" class="common-tab_li" onclick="wizard_show_input('new_input_Tran1','NewFileTran1')"><?php echo $module_gui_str['editor_wizard']['1010'];?> 1</li>
  131. <li id="NewFileTran2" class="common-tab_li" onclick="wizard_show_input('new_input_Tran2','NewFileTran2')"><?php echo $module_gui_str['editor_wizard']['1010'];?> 2</li>
  132. </ul>
  133. <div id="new_input_pali">
  134. <h2><?php echo $module_gui_str['editor_wizard']['1009'];?></h2>
  135. <input id="paliauthor" type="input" value="author" onkeydown="match_key(this)" onkeyup="unicode_key(this) " />
  136. <p><textarea id="txtNewInput" rows="15" cols="100%" onkeydown="match_key(this)" onkeyup="unicode_key(this) " ></textarea></p>
  137. </div>
  138. <div id="new_input_Tran1" >
  139. <h2><?php echo $module_gui_str['editor_wizard']['1010'];?> 1</h2>
  140. <div id="tran1">
  141. <select id="tranlanguage1">
  142. <option value="en" selected>English</option>
  143. <option value="zh" >简体中文</option>
  144. <option value="tw" >繁體中文</option>
  145. </select>
  146. <input id="tranauthor1" type="input" value="author"/>
  147. <p><textarea id="txtNewInputTran1" rows="15" cols="100%" ></textarea></p>
  148. </div>
  149. </div>
  150. <div id="new_input_Tran2" >
  151. <h2><?php echo $module_gui_str['editor_wizard']['1010'];?> 2</h2>
  152. <div id="tran2">
  153. <select id="tranlanguage2">
  154. <option value="en" >English</option>
  155. <option value="zh" selected>简体中文</option>
  156. <option value="tw" >繁體中文</option>
  157. </select>
  158. <input id="tranauthor2" type="input" value="author"/>
  159. <p><textarea id="txtNewInputTran2" rows="15" cols="100%" ></textarea></p>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. <!--right side end-->
  166. </div>
  167. <div id="sutta_text">
  168. <div class="sutta_top_blank"></div>
  169. </div>
  170. <!--right side end-->
  171. <!--class="main"-->
  172. <div class="debug_info"><span id="debug"></span></div>
  173. </body>
  174. </html>