path.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <?php
  2. # 目录
  3. define("_DIR_APPDATA_", __DIR__ . "/../tmp/appdata");
  4. define("_DIR_PALICANON_", __DIR__ . "/../tmp/appdata/palicanon");
  5. define("_DIR_PALICANON_TEMPLET_", __DIR__ . "/../tmp/appdata/palicanon/templet");
  6. define("_DIR_PALICANON_PALITEXT_", __DIR__ . "/../tmp/appdata/palicanon/pali_text");
  7. define("_DIR_PALICANON_WBW_", __DIR__ . "/../tmp/appdata/palicanon/wbw");
  8. define("_DIR_PALICANON_TRAN_", __DIR__ . "/../tmp/appdata/palicanon/translate");
  9. define("_DIR_IMAGES_", __DIR__ . "/../tmp/images");
  10. define("_DIR_IMAGES_ARTICLE_", __DIR__ . "/../tmp/images/article");
  11. define("_DIR_IMAGES_COLLECTION_", __DIR__ . "/../tmp/images/collection");
  12. define("_DIR_IMAGES_COURSE_", __DIR__ . "/../tmp/images/course");
  13. define("_DIR_IMAGES_COURSE_A_", "../../tmp/images/course");
  14. define("_DIR_IMAGES_LESSON_", __DIR__ . "/../tmp/images/lesson");
  15. //语料库
  16. define("_DIR_CSV_PALI_CANON_WORD_", __DIR__ . "/../paliword/book");
  17. define("_DIR_CSV_PALI_CANON_WORD_INDEX_", __DIR__ . "/../paliword/index");
  18. define("_DIR_PALI_CSV_", __DIR__ . "/../tmp/palicsv");
  19. define("_DIR_LOG_", __DIR__ . "/../tmp/log");
  20. define("_DIR_LOG_APP_", __DIR__ . "/../tmp/log/app.log");
  21. define("_DIR_TEMP_", __DIR__ . "/../tmp/temp");
  22. define("_DIR_TEMP_DICT_TEXT_", __DIR__ . "/../tmp/dict_text");
  23. define("_DIR_TMP_", __DIR__ . "/../tmp");
  24. define("_DIR_TMP_EXPORT", __DIR__ . "/../tmp/export");
  25. //dictionary
  26. define("_DIR_DICT_", __DIR__ . "/../tmp/appdata/dict");
  27. define("_DIR_DICT_SYSTEM_", __DIR__ . "/../tmp/appdata/dict/system");
  28. define("_DIR_DICT_3RD_", __DIR__ . "/../tmp/appdata/dict/3rd");
  29. define("_DIR_DICT_REF_", __DIR__ . "/../tmp/appdata/dict/ref");
  30. //界面上的用户指南气泡里面的数据
  31. define("_DIR_USERS_GUIDE_", __DIR__ . "/../app/users_guide");
  32. define("_DIR_FONT_", __DIR__ . "/../font");
  33. define("_DIR_PALI_HTML_", __DIR__ . "/../palihtml");
  34. define("_DIR_DICT_TEXT_", __DIR__ . "/../dicttext");
  35. define("_DIR_PALI_TITLE_", __DIR__ . "/../pali_title");
  36. define("_DIR_APP_", __DIR__ . "/../app");
  37. define("_DIR_LANGUAGE_", __DIR__ . "/../app/public/lang");
  38. define("_DIR_BOOK_INDEX_", __DIR__ . "/../app/public/book_index");
  39. /*user data*/
  40. define("_DIR_USER_BASE_", __DIR__ . "/../tmp/user");
  41. define("_DIR_USER_DOC_", __DIR__ . "/../tmp/user_doc");
  42. define("_DIR_USER_IMG_", __DIR__ . "/../tmp/user/media/3");
  43. define("_DIR_USER_IMG_LINK_", "../../tmp/user/media/3");
  44. define("_DIR_MYDOCUMENT_", "/my_document");
  45. # 逐词解析字典文件
  46. define("_FILE_DB_WBW1_", __DIR__ . "/../tmp/user/wbw.db3");
  47. #数据库
  48. # 数据库基本参数 pgsql sqlite
  49. define("_DB_ENGIN_", "pgsql");
  50. define("_DB_HOST_", "localhost");
  51. define("_DB_PORT_", "5432");
  52. define("_DB_USERNAME_", "postgres");
  53. define("_DB_PASSWORD_", "123456");
  54. define("_DB_NAME_", "mint");
  55. //语料库数据表 pali canon db file
  56. //巴利语料模版表
  57. //define("_FILE_DB_PALICANON_TEMPLET_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  58. define("_FILE_DB_PALICANON_TEMPLET_","sqlite:" . __DIR__ . "/../tmp/appdata/palicanon/templet.db3");
  59. define("_TABLE_PALICANON_TEMPLET_","wbw_templet");
  60. //标题资源表
  61. define("_FILE_DB_RESRES_INDEX_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  62. //define("_FILE_DB_RESRES_INDEX_", "sqlite:" . __DIR__ . "/../tmp/appdata/palicanon/res.db3");
  63. define("_TABLE_RES_INDEX_","res_index");
  64. //巴利语料段落表
  65. define("_FILE_DB_PALITEXT_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  66. //define("_FILE_DB_PALITEXT_", "sqlite:" . __DIR__ . "/../tmp/appdata/palicanon/pali_text.db3");
  67. define("_TABLE_PALI_TEXT_","pali_text");
  68. define("_TABLE_PALI_BOOK_NAME_","books");
  69. #单词表部分
  70. //以书为单位的单词汇总表
  71. define("_FILE_DB_BOOK_WORD_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  72. //define("_FILE_DB_BOOK_WORD_", "sqlite:" . __DIR__ . "/../tmp/appdata/palicanon/bookword.db3");
  73. define("_TABLE_BOOK_WORD_", "bookword");
  74. //单词索引
  75. define("_FILE_DB_PALI_INDEX_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  76. //define("_FILE_DB_PALI_INDEX_", "sqlite:" . __DIR__ . "/../tmp/appdata/palicanon/paliindex.db3");
  77. define("_TABLE_WORD_", "word");
  78. //92万词
  79. define("_FILE_DB_WORD_INDEX_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  80. //define("_FILE_DB_WORD_INDEX_", "sqlite:" . __DIR__ . "/../tmp/appdata/palicanon/wordindex.db3");
  81. define("_TABLE_WORD_INDEX_", "wordindex");
  82. //单词索引=92万词+单词索引
  83. define("_FILE_DB_INDEX_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  84. //define("_FILE_DB_INDEX_", "sqlite:" . __DIR__ . "/../tmp/appdata/palicanon/index.db3");
  85. //黑体字数据表
  86. //define("_FILE_DB_BOLD_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  87. define("_FILE_DB_BOLD_", "sqlite:" . __DIR__ . "/../tmp/appdata/palicanon/bold.db3");
  88. //单词分析表
  89. //define("_FILE_DB_STATISTICS_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  90. define("_FILE_DB_STATISTICS_", "sqlite:" . __DIR__ . "/../tmp/appdata/palicanon/word_statistics.db3");
  91. //巴利句子表
  92. //define("_FILE_DB_PALI_SENTENCE_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  93. define("_FILE_DB_PALI_SENTENCE_", "sqlite:" . __DIR__ . "/../tmp/appdata/palicanon/pali_sent1.db3");
  94. //相似句
  95. //define("_FILE_DB_PALI_SENTENCE_SIM_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  96. define("_FILE_DB_PALI_SENTENCE_SIM_", "sqlite:" . __DIR__ . "/../tmp/appdata/palicanon/pali_sim.db3");
  97. //标题表
  98. //define("_FILE_DB_PALI_TOC_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  99. define("_FILE_DB_PALI_TOC_", "sqlite:" . __DIR__ . "/../tmp/appdata/palicanon/pali_toc.db3");
  100. //页码对应
  101. //define("_FILE_DB_PAGE_INDEX_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  102. define("_FILE_DB_PAGE_INDEX_", "sqlite:" . __DIR__ . "/../tmp/appdata/palicanon/pagemap.db3");
  103. # 字典数据表 全部存入redis
  104. #巴缅字典
  105. //define("_DICT_DB_PM_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  106. define("_DICT_DB_PM_", "sqlite:" . __DIR__ . "/../tmp/appdata/dict/3rd/pm.db");
  107. define("_TABLE_DICT_PM_", "dict");
  108. #系统规则
  109. //define("_DICT_DB_REGULAR_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  110. define("_DICT_DB_REGULAR_", "sqlite:" . __DIR__ . "/../tmp/appdata/dict/system/sys_regular.db");
  111. define("_TABLE_DICT_REGULAR_", "dict");
  112. #系统不规则
  113. //define("_DICT_DB_IRREGULAR_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  114. define("_DICT_DB_IRREGULAR_", "sqlite:" . __DIR__ . "/../tmp/appdata/dict/system/sys_irregular.db");
  115. define("_TABLE_DICT_IRREGULAR_", "dict");
  116. #自动compone
  117. //define("_DICT_DB_COMP_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  118. define("_DICT_DB_COMP_", "sqlite:" . __DIR__ . "/../tmp/appdata/dict/system/comp.db");
  119. define("_TABLE_DICT_COMP_", "dict");
  120. #参考字典
  121. //define("_FILE_DB_REF_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  122. define("_FILE_DB_REF_", "sqlite:" . __DIR__ . "/../tmp/appdata/dict/system/ref.db");
  123. define("_TABLE_DICT_REF_", "dict");
  124. define("_TABLE_DICT_REF_NAME_LIST_", "info");
  125. #参考字典索引
  126. //define("_FILE_DB_REF_INDEX_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  127. define("_FILE_DB_REF_INDEX_", "sqlite:" . __DIR__ . "/../tmp/appdata/dict/system/ref1.db");
  128. define("_TABLE_REF_INDEX_", "dict");
  129. #为了切分复合词 使用的词头表
  130. //define("_FILE_DB_PART_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  131. define("_FILE_DB_PART_", "sqlite:" . __DIR__ . "/../tmp/appdata/dict/system/part.db3");
  132. define("_TABLE_PART_", "part");
  133. # 用户数据表
  134. //读写频繁
  135. # 逐词解析表
  136. //define("_FILE_DB_USER_WBW_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  137. define("_FILE_DB_USER_WBW_", "sqlite:" . __DIR__ . "/../tmp/user/user_wbw.db3");
  138. define("_TABLE_USER_WBW_", "wbw");
  139. define("_TABLE_USER_WBW_BLOCK_", "wbw_block");
  140. # 译文
  141. //define("_FILE_DB_SENTENCE_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  142. define("_FILE_DB_SENTENCE_", "sqlite:" . __DIR__ . "/../tmp/user/sentence.db3");
  143. define("_TABLE_SENTENCE_", "sentence");
  144. define("_TABLE_SENTENCE_BLOCK_", "sent_block");
  145. # 译文编辑历史
  146. //define("_FILE_DB_USER_SENTENCE_HISTORAY_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  147. define("_FILE_DB_USER_SENTENCE_HISTORAY_", "sqlite:" . __DIR__ . "/../tmp/user/usent_historay.db3");
  148. define("_TABLE_SENTENCE_HISTORAY_", "sent_historay");
  149. # 逐词解析字典
  150. //define("_FILE_DB_WBW_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  151. define("_FILE_DB_WBW_", "sqlite:" . __DIR__ . "/../tmp/user/wbw.db3");
  152. define("_TABLE_DICT_WBW_", "wbw");
  153. define("_TABLE_DICT_WBW_INDEX_", "wbw_index");
  154. //写入频繁 读取不频繁
  155. # 用户行为记录
  156. //define("_FILE_DB_PAGE_INDEX_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  157. define("_FILE_DB_USER_ACTIVE_", "sqlite:" . __DIR__ . "/../tmp/user/user_active.db3");
  158. //define("_FILE_DB_USER_ACTIVE_LOG_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  159. define("_FILE_DB_USER_ACTIVE_LOG_", "sqlite:" . __DIR__ . "/../tmp/user/user_active_log.db3");
  160. //读取频繁 写入不频繁
  161. # 用户账号
  162. //define("_FILE_DB_USERINFO_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  163. define("_FILE_DB_USERINFO_", "sqlite:" . __DIR__ . "/../tmp/user/userinfo.db3");
  164. # 版本风格
  165. //define("_FILE_DB_CHANNAL_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  166. define("_FILE_DB_CHANNAL_", "sqlite:" . __DIR__ . "/../tmp/user/channal.db3");
  167. # 文章 文集
  168. //define("_FILE_DB_USER_ARTICLE_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  169. define("_FILE_DB_USER_ARTICLE_", "sqlite:" . __DIR__ . "/../tmp/user/article.db3");
  170. # 术语
  171. //define("_FILE_DB_TERM_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  172. define("_FILE_DB_TERM_", "sqlite:" . __DIR__ . "/../tmp/user/dhammaterm.db");
  173. # 协作
  174. //define("_FILE_DB_USER_SHARE_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  175. define("_FILE_DB_USER_SHARE_", "sqlite:" . __DIR__ . "/../tmp/user/share.db3");
  176. # 工作组
  177. //define("_FILE_DB_GROUP_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  178. define("_FILE_DB_GROUP_", "sqlite:" . __DIR__ . "/../tmp/user/group.db3");
  179. # 逐词解析文件索引
  180. //define("_FILE_DB_FILEINDEX_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  181. define("_FILE_DB_FILEINDEX_", "sqlite:" . __DIR__ . "/../tmp/user/fileindex.db");
  182. # 课程
  183. //define("_FILE_DB_COURSE_", "pgsql:host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  184. define("_FILE_DB_COURSE_", "sqlite:" . __DIR__ . "/../tmp/user/course.db3");
  185. define("_TABLE_COURSE_","course");
  186. # 用户自定义书
  187. //define("_FILE_DB_USER_CUSTOM_BOOK_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  188. define("_FILE_DB_USER_CUSTOM_BOOK_", "sqlite:" . __DIR__ . "/../tmp/user/custom_book.db3");
  189. # 逐词译和译文编辑消息
  190. //define("_FILE_DB_MESSAGE_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  191. define("_FILE_DB_MESSAGE_", "sqlite:" . __DIR__ . "/../tmp/user/message.db");
  192. #点赞
  193. //define("_FILE_DB_LIKE_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  194. define("_FILE_DB_LIKE_", "sqlite:" . __DIR__ . "/../tmp/user/like.db3");
  195. //很少使用
  196. # 网站设置
  197. //define("_FILE_DB_HOSTSETTING_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  198. define("_FILE_DB_HOSTSETTING_", "sqlite:" . __DIR__ . "/../tmp/user/hostsetting.db3");
  199. # 用户图片数据 尚未启用
  200. //define("_FILE_DB_MEDIA_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  201. define("_FILE_DB_MEDIA_", "sqlite:" . __DIR__ . "/../tmp/user/media.db3");
  202. # 用户字典统计数据
  203. //define("_FILE_DB_USER_DICT_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  204. define("_FILE_DB_USER_DICT_", "sqlite:" . __DIR__ . "/../tmp/user/udict.db3");
  205. # 评论 尚未启用
  206. //define("_FILE_DB_COMMENTS_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  207. define("_FILE_DB_COMMENTS_", "sqlite:" . __DIR__ . "/../tmp/user/comments.db3");
  208. //define("_FILE_DB_USER_STATISTICS_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  209. define("_FILE_DB_USER_STATISTICS_", "sqlite:" . __DIR__ . "/../tmp/user/statistics.db3");
  210. #权限管理
  211. //define("_FILE_DB_USER_RBAC_", _DB_ENGIN_.":host="._DB_HOST_.";port="._DB_PORT_.";dbname="._DB_NAME_.";user="._DB_USERNAME_.";password="._DB_PASSWORD_.";");
  212. define("_FILE_DB_USER_RBAC_", __DIR__ . "/../tmp/user/rbac.db3");