Browse Source

개발의 용이성을 위해서 Temp DB로 개편

잉여개발기 (SPDV) 2 năm trước cách đây
mục cha
commit
aaf7b63885
74 tập tin đã thay đổi với 614 bổ sung658 xóa
  1. 56 58
      app.py
  2. 5 5
      route/go_api_bbs.py
  3. 5 5
      route/go_api_bbs_list.py
  4. 5 5
      route/go_api_bbs_w_comment.py
  5. 5 5
      route/go_api_func_auth_list.py
  6. 5 5
      route/go_api_func_ip.py
  7. 5 5
      route/go_api_func_ip_menu.py
  8. 5 5
      route/go_api_func_language.py
  9. 5 5
      route/go_api_func_llm.py
  10. 5 5
      route/go_api_list_old_page.py
  11. 5 5
      route/go_api_list_recent_block.py
  12. 5 5
      route/go_api_list_recent_change.py
  13. 5 5
      route/go_api_list_recent_discuss.py
  14. 5 5
      route/go_api_list_recent_edit_request.py
  15. 5 5
      route/go_api_list_title_index.py
  16. 5 5
      route/go_api_search.py
  17. 5 5
      route/go_api_setting.py
  18. 5 5
      route/go_api_topic.py
  19. 5 5
      route/go_api_topic_list.py
  20. 5 5
      route/go_api_user_setting_editor.py
  21. 5 5
      route/go_api_w_random.py
  22. 5 5
      route/go_api_w_raw.py
  23. 5 5
      route/go_api_w_render.py
  24. 5 5
      route/go_api_w_set_reset.py
  25. 5 5
      route/go_api_w_watch_list.py
  26. 5 5
      route/go_api_w_xref.py
  27. 2 2
      route/main_search_deep.py
  28. 77 66
      route/main_setting_main.py
  29. 2 2
      route/recent_edit_request.py
  30. 6 7
      route/tool/func.py
  31. 3 3
      route/tool/func_tool.py
  32. 2 2
      route/view_random.py
  33. BIN
      route_go/bin/main.amd64.bin
  34. BIN
      route_go/bin/main.amd64.exe
  35. BIN
      route_go/bin/main.arm64.bin
  36. BIN
      route_go/bin/main.arm64.exe
  37. 8 11
      route_go/route/api_bbs.go
  38. 8 11
      route_go/route/api_bbs_list.go
  39. 3 6
      route_go/route/api_bbs_w.go
  40. 4 7
      route_go/route/api_bbs_w_comment.go
  41. 4 5
      route_go/route/api_edit_move_all.go
  42. 4 7
      route_go/route/api_func_auth_list.go
  43. 3 6
      route_go/route/api_func_ip.go
  44. 3 6
      route_go/route/api_func_ip_menu.go
  45. 3 6
      route_go/route/api_func_language.go
  46. 3 6
      route_go/route/api_func_llm.go
  47. 5 8
      route_go/route/api_list_old_page.go
  48. 25 28
      route_go/route/api_list_recent_block.go
  49. 27 30
      route_go/route/api_list_recent_change.go
  50. 17 20
      route_go/route/api_list_recent_discuss.go
  51. 8 11
      route_go/route/api_list_recent_edit_request.go
  52. 4 7
      route_go/route/api_list_title_index.go
  53. 4 7
      route_go/route/api_search.go
  54. 5 8
      route_go/route/api_setting.go
  55. 6 9
      route_go/route/api_setting_edit.go
  56. 11 14
      route_go/route/api_topic.go
  57. 10 13
      route_go/route/api_topic_list.go
  58. 4 7
      route_go/route/api_user_setting_editor.go
  59. 5 8
      route_go/route/api_user_setting_editor_delele.go
  60. 5 8
      route_go/route/api_user_setting_editor_insert.go
  61. 7 10
      route_go/route/api_user_watch_list.go
  62. 2 5
      route_go/route/api_w_random.go
  63. 5 8
      route_go/route/api_w_raw.go
  64. 3 6
      route_go/route/api_w_render.go
  65. 9 12
      route_go/route/api_w_set_reset.go
  66. 9 12
      route_go/route/api_w_watch_list.go
  67. 5 8
      route_go/route/api_w_xref.go
  68. 44 3
      route_go/route/tool/db_connect.go
  69. 56 56
      route_go/route/tool/ip_parser.go
  70. 2 2
      route_go/route/tool/language.go
  71. 2 2
      route_go/route/tool/markdown.go
  72. 3 5
      route_go/route/tool/namumark.go
  73. 14 14
      route_go/route/tool/render.go
  74. 1 1
      version.json

+ 56 - 58
app.py

@@ -347,8 +347,6 @@ if os.path.exists('custom.py'):
     from custom import custom_run
     custom_run('error', app)
 
-db_set_str = json.dumps(data_db_set)
-
 # Func
 # Func-inter_wiki
 app.route('/filter/inter_wiki', defaults = { 'tool' : 'inter_wiki' })(filter_all)
@@ -490,7 +488,7 @@ app.route('/recent_discuss', defaults = { 'tool' : 'normal' })(list_recent_discu
 app.route('/recent_discuss/<int:num>/<tool>')(list_recent_discuss)
 
 # Func-history
-app.route('/recent_edit_request', defaults = { 'db_set' : db_set_str })(recent_edit_request)
+app.route('/recent_edit_request')(recent_edit_request)
 
 app.route('/record/<name>', defaults = { 'tool' : 'record' })(recent_change)
 app.route('/record/<int:num>/<set_type>/<name>', defaults = { 'tool' : 'record' })(recent_change)
@@ -533,7 +531,7 @@ app.route('/acl/<everything:name>', methods = ['POST', 'GET'])(view_set)
 app.route('/w_from/<everything:name>', defaults = { 'do_type' : 'from' })(view_w)
 app.route('/w/<everything:name>')(view_w)
 
-app.route('/random', defaults = { 'db_set' : db_set_str })(view_random)
+app.route('/random')(view_random)
 
 # Func-edit
 app.route('/edit/<everything:name>', methods = ['POST', 'GET'])(edit)
@@ -678,17 +676,17 @@ app.route('/bbs/delete/<int:bbs_num>/<int:post_num>/<comment_num>', methods = ['
 
 # Func-api
 ## v1 API
-app.route('/api/render', methods = ['POST'], defaults = { 'db_set' : db_set_str })(api_w_render)
-app.route('/api/render/<tool>', methods = ['POST'], defaults = { 'db_set' : db_set_str })(api_w_render)
+app.route('/api/render', methods = ['POST'])(api_w_render)
+app.route('/api/render/<tool>', methods = ['POST'])(api_w_render)
 
-app.route('/api/raw_exist/<everything:name>', defaults = { 'exist_check' : 'on', 'db_set' : db_set_str })(api_w_raw)
-app.route('/api/raw_rev/<int(signed = True):rev>/<everything:name>', defaults = { 'db_set' : db_set_str })(api_w_raw)
-app.route('/api/raw/<everything:name>', defaults = { 'db_set' : db_set_str })(api_w_raw)
+app.route('/api/raw_exist/<everything:name>', defaults = { 'exist_check' : 'on' })(api_w_raw)
+app.route('/api/raw_rev/<int(signed = True):rev>/<everything:name>')(api_w_raw)
+app.route('/api/raw/<everything:name>')(api_w_raw)
 
-app.route('/api/xref/<int:num>/<everything:name>', defaults = { 'db_set' : db_set_str })(api_w_xref)
-app.route('/api/xref_this/<int:num>/<everything:name>', defaults = { 'xref_type' : '2', 'db_set' : db_set_str })(api_w_xref)
+app.route('/api/xref/<int:num>/<everything:name>')(api_w_xref)
+app.route('/api/xref_this/<int:num>/<everything:name>', defaults = { 'xref_type' : '2' })(api_w_xref)
 
-app.route('/api/random', defaults = { 'db_set' : db_set_str })(api_w_random)
+app.route('/api/random')(api_w_random)
 
 app.route('/api/bbs/w/<sub_code>')(api_bbs_w_post)
 app.route('/api/bbs/w/comment/<sub_code>')(api_bbs_w_comment)
@@ -700,65 +698,65 @@ app.route('/api/skin_info/<name>')(api_skin_info)
 app.route('/api/user_info/<user_name>')(api_user_info)
 app.route('/api/setting/<name>')(api_setting)
 
-app.route('/api/auth_list', defaults = { 'db_set' : db_set_str })(api_func_auth_list)
-app.route('/api/auth_list/<user_name>', defaults = { 'db_set' : db_set_str })(api_func_auth_list)
+app.route('/api/auth_list')(api_func_auth_list)
+app.route('/api/auth_list/<user_name>')(api_func_auth_list)
 
-app.route('/api/thread/<int:topic_num>/<int:s_num>/<int:e_num>', defaults = { 'db_set' : db_set_str })(api_topic)
-app.route('/api/thread/<int:topic_num>/<tool>', defaults = { 'db_set' : db_set_str })(api_topic)
-app.route('/api/thread/<int:topic_num>', defaults = { 'db_set' : db_set_str })(api_topic)
+app.route('/api/thread/<int:topic_num>/<int:s_num>/<int:e_num>')(api_topic)
+app.route('/api/thread/<int:topic_num>/<tool>')(api_topic)
+app.route('/api/thread/<int:topic_num>')(api_topic)
 
-app.route('/api/search/<everything:name>', defaults = { 'db_set' : db_set_str })(api_search)
-app.route('/api/search_page/<int:num>/<everything:name>', defaults = { 'db_set' : db_set_str })(api_search)
-app.route('/api/search_data/<everything:name>', defaults = { 'search_type' : 'data', 'db_set' : db_set_str })(api_search)
-app.route('/api/search_data_page/<int:num>/<everything:name>', defaults = { 'search_type' : 'data', 'db_set' : db_set_str })(api_search)
+app.route('/api/search/<everything:name>')(api_search)
+app.route('/api/search_page/<int:num>/<everything:name>')(api_search)
+app.route('/api/search_data/<everything:name>', defaults = { 'search_type' : 'data' })(api_search)
+app.route('/api/search_data_page/<int:num>/<everything:name>', defaults = { 'search_type' : 'data' })(api_search)
 
-app.route('/api/recent_change', defaults = { 'db_set' : db_set_str })(api_list_recent_change)
-app.route('/api/recent_changes', defaults = { 'db_set' : db_set_str })(api_list_recent_change)
-app.route('/api/recent_change/<int:limit>', defaults = { 'db_set' : db_set_str })(api_list_recent_change)
-app.route('/api/recent_change/<int:limit>/<set_type>/<int:num>', defaults = { 'db_set' : db_set_str })(api_list_recent_change)
+app.route('/api/recent_change')(api_list_recent_change)
+app.route('/api/recent_changes')(api_list_recent_change)
+app.route('/api/recent_change/<int:limit>')(api_list_recent_change)
+app.route('/api/recent_change/<int:limit>/<set_type>/<int:num>')(api_list_recent_change)
 
-app.route('/api/recent_edit_request', defaults = { 'db_set' : db_set_str })(api_list_recent_edit_request)
-app.route('/api/recent_edit_request/<int:limit>/<set_type>/<int:num>', defaults = { 'db_set' : db_set_str })(api_list_recent_edit_request)
+app.route('/api/recent_edit_request')(api_list_recent_edit_request)
+app.route('/api/recent_edit_request/<int:limit>/<set_type>/<int:num>')(api_list_recent_edit_request)
 
-app.route('/api/recent_discuss/<set_type>/<int:limit>', defaults = { 'db_set' : db_set_str })(api_list_recent_discuss)
-app.route('/api/recent_discuss/<int:limit>', defaults = { 'db_set' : db_set_str })(api_list_recent_discuss)
-app.route('/api/recent_discuss', defaults = { 'db_set' : db_set_str })(api_list_recent_discuss)
+app.route('/api/recent_discuss/<set_type>/<int:limit>')(api_list_recent_discuss)
+app.route('/api/recent_discuss/<int:limit>')(api_list_recent_discuss)
+app.route('/api/recent_discuss')(api_list_recent_discuss)
 
-app.route('/api/lang', methods = ['POST'], defaults = { 'db_set' : db_set_str })(api_func_language)
-app.route('/api/lang/<data>', defaults = { 'db_set' : db_set_str })(api_func_language)
+app.route('/api/lang', methods = ['POST'])(api_func_language)
+app.route('/api/lang/<data>')(api_func_language)
 app.route('/api/sha224/<everything:data>')(api_func_sha224)
-app.route('/api/ip/<everything:data>', defaults = { 'db_set' : db_set_str })(api_func_ip)
+app.route('/api/ip/<everything:data>')(api_func_ip)
 
 app.route('/api/image/<everything:name>')(api_image_view)
 
 ## v2 API
-app.route('/api/v2/recent_edit_request/<set_type>/<int:num>', defaults = { 'db_set' : db_set_str, 'limit' : 50 })(api_list_recent_edit_request)
-app.route('/api/v2/recent_change/<set_type>/<int:num>', defaults = { 'db_set' : db_set_str, 'legacy' : '', 'limit' : 50 })(api_list_recent_change)
-app.route('/api/v2/recent_discuss/<set_type>/<int:num>', defaults = { 'db_set' : db_set_str, 'legacy' : '', 'limit' : 50 })(api_list_recent_discuss)
-app.route('/api/v2/recent_block/<set_type>/<int:num>', defaults = { 'db_set' : db_set_str })(api_list_recent_block)
-app.route('/api/v2/recent_block/<set_type>/<int:num>/<user_name>', defaults = { 'db_set' : db_set_str })(api_list_recent_block)
-app.route('/api/v2/list/document/old/<int:num>', defaults = { 'db_set' : db_set_str, 'set_type' : 'old' })(api_list_old_page)
-app.route('/api/v2/list/document/new/<int:num>', defaults = { 'db_set' : db_set_str, 'set_type' : 'new' })(api_list_old_page)
-app.route('/api/v2/list/document/<int:num>', defaults = { 'db_set' : db_set_str })(api_list_title_index)
+app.route('/api/v2/recent_edit_request/<set_type>/<int:num>', defaults = { 'limit' : 50 })(api_list_recent_edit_request)
+app.route('/api/v2/recent_change/<set_type>/<int:num>', defaults = { 'legacy' : '', 'limit' : 50 })(api_list_recent_change)
+app.route('/api/v2/recent_discuss/<set_type>/<int:num>', defaults = { 'legacy' : '', 'limit' : 50 })(api_list_recent_discuss)
+app.route('/api/v2/recent_block/<set_type>/<int:num>')(api_list_recent_block)
+app.route('/api/v2/recent_block/<set_type>/<int:num>/<user_name>')(api_list_recent_block)
+app.route('/api/v2/list/document/old/<int:num>', defaults = { 'set_type' : 'old' })(api_list_old_page)
+app.route('/api/v2/list/document/new/<int:num>', defaults = { 'set_type' : 'new' })(api_list_old_page)
+app.route('/api/v2/list/document/<int:num>')(api_list_title_index)
 
-app.route('/api/v2/topic/<int:num>/<set_type>/<everything:name>', defaults = { 'db_set' : db_set_str })(api_topic_list)
+app.route('/api/v2/topic/<int:num>/<set_type>/<everything:name>')(api_topic_list)
 
-app.route('/api/v2/bbs', defaults = { 'db_set' : db_set_str })(api_bbs_list)
-app.route('/api/v2/bbs/main', defaults = { 'db_set' : db_set_str })(api_bbs)
-app.route('/api/v2/bbs/in/<int:bbs_num>/<int:page>', defaults = { 'db_set' : db_set_str })(api_bbs)
-app.route('/api/v2/bbs/w/comment/<int:bbs_num>/<int:post_num>/<tool>', defaults = { 'db_set' : db_set_str })(api_bbs_w_comment_n)
+app.route('/api/v2/bbs')(api_bbs_list)
+app.route('/api/v2/bbs/main')(api_bbs)
+app.route('/api/v2/bbs/in/<int:bbs_num>/<int:page>')(api_bbs)
+app.route('/api/v2/bbs/w/comment/<int:bbs_num>/<int:post_num>/<tool>')(api_bbs_w_comment_n)
 
-app.route('/api/v2/doc_star_doc/<int:num>/<everything:name>', defaults = { 'db_set' : db_set_str, 'do_type' : 'star_doc' })(api_w_watch_list)
-app.route('/api/v2/doc_watch_list/<int:num>/<everything:name>', defaults = { 'db_set' : db_set_str })(api_w_watch_list)
-app.route('/api/v2/set_reset/<everything:name>', defaults = { 'db_set' : db_set_str })(api_w_set_reset)
+app.route('/api/v2/doc_star_doc/<int:num>/<everything:name>', defaults = { 'do_type' : 'star_doc' })(api_w_watch_list)
+app.route('/api/v2/doc_watch_list/<int:num>/<everything:name>')(api_w_watch_list)
+app.route('/api/v2/set_reset/<everything:name>')(api_w_set_reset)
 
-app.route('/api/v2/setting/<name>', methods = ['GET', 'PUT'], defaults = { 'db_set' : db_set_str })(api_setting)
+app.route('/api/v2/setting/<name>', methods = ['GET', 'PUT'])(api_setting)
 
-app.route('/api/v2/user/setting/editor', methods = ['GET', 'POST', 'DELETE'], defaults = { 'db_set' : db_set_str })(api_user_setting_editor)
+app.route('/api/v2/user/setting/editor', methods = ['GET', 'POST', 'DELETE'])(api_user_setting_editor)
 
-app.route('/api/v2/ip/<everything:data>', defaults = { 'db_set' : db_set_str })(api_func_ip)
-app.route('/api/v2/ip_menu/<everything:ip>', defaults = { 'db_set' : db_set_str, 'option' : 'user' })(api_func_ip_menu)
-app.route('/api/v2/user_menu/<everything:ip>', defaults = { 'db_set' : db_set_str })(api_func_ip_menu)
+app.route('/api/v2/ip/<everything:data>')(api_func_ip)
+app.route('/api/v2/ip_menu/<everything:ip>', defaults = { 'option' : 'user' })(api_func_ip_menu)
+app.route('/api/v2/user_menu/<everything:ip>')(api_func_ip_menu)
 
 # Func-main
 # 여기도 전반적인 조정 시행 예정
@@ -768,10 +766,10 @@ app.route('/manager/<int:num>', methods = ['POST', 'GET'])(main_tool_redirect)
 app.route('/manager/<int:num>/<everything:add_2>', methods = ['POST', 'GET'])(main_tool_redirect)
 
 app.route('/search', methods=['POST'])(main_search)
-app.route('/search/<everything:name>', defaults = { 'db_set' : db_set_str }, methods = ['POST', 'GET'])(main_search_deep)
-app.route('/search_page/<int:num>/<everything:name>', defaults = { 'db_set' : db_set_str }, methods = ['POST', 'GET'])(main_search_deep)
-app.route('/search_data/<everything:name>', defaults = { 'search_type' : 'data', 'db_set' : db_set_str }, methods = ['POST', 'GET'])(main_search_deep)
-app.route('/search_data_page/<int:num>/<everything:name>', defaults = { 'search_type' : 'data', 'db_set' : db_set_str }, methods = ['POST', 'GET'])(main_search_deep)
+app.route('/search/<everything:name>', methods = ['POST', 'GET'])(main_search_deep)
+app.route('/search_page/<int:num>/<everything:name>', methods = ['POST', 'GET'])(main_search_deep)
+app.route('/search_data/<everything:name>', defaults = { 'search_type' : 'data' }, methods = ['POST', 'GET'])(main_search_deep)
+app.route('/search_data_page/<int:num>/<everything:name>', defaults = { 'search_type' : 'data' }, methods = ['POST', 'GET'])(main_search_deep)
 app.route('/goto', methods=['POST'])(main_search_goto)
 app.route('/goto/<everything:name>', methods=['GET', 'POST'])(main_search_goto)
 

+ 5 - 5
route/go_api_bbs.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_bbs(db_set, bbs_num = "", page = 1):
+def api_bbs(bbs_num = "", page = 1):
     other_set = {}
     other_set["bbs_num"] = str(bbs_num)
     other_set["page"] = str(page)
@@ -9,14 +9,14 @@ def api_bbs(db_set, bbs_num = "", page = 1):
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_bbs_list.py

@@ -1,16 +1,16 @@
 from .tool.func import *
 
-def api_bbs_list(db_set):
+def api_bbs_list():
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_bbs_w_comment.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_bbs_w_comment_n(db_set, bbs_num = "", post_num = "", tool = "length"):
+def api_bbs_w_comment_n(bbs_num = "", post_num = "", tool = "length"):
     other_set = {}
     other_set["bbs_num"] = str(bbs_num)
     other_set["post_num"] = str(post_num)
@@ -9,14 +9,14 @@ def api_bbs_w_comment_n(db_set, bbs_num = "", post_num = "", tool = "length"):
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_func_auth_list.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_func_auth_list(db_set, user_name = ''):
+def api_func_auth_list(user_name = ''):
     other_set = {}
     if user_name == '':
         other_set["ip"] = ip_check()
@@ -11,14 +11,14 @@ def api_func_auth_list(db_set, user_name = ''):
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_func_ip.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_func_ip(db_set, data = 'Test'):
+def api_func_ip(data = 'Test'):
     other_set = {}
     other_set["data"] = data
     other_set["ip"] = ip_check()
@@ -8,14 +8,14 @@ def api_func_ip(db_set, data = 'Test'):
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_func_ip_menu.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_func_ip_menu(db_set, ip = "Test", option = ""):
+def api_func_ip_menu(ip = "Test", option = ""):
     other_set = {}
     other_set["ip"] = ip
     other_set["my_ip"] = ip_check()
@@ -9,14 +9,14 @@ def api_func_ip_menu(db_set, ip = "Test", option = ""):
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_func_language.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_func_language(db_set, data = 'Test'):
+def api_func_language(data = 'Test'):
     other_set = {}
     if flask.request.method == 'POST':
         other_set["data"] = flask.request.form.get('data', '')
@@ -12,14 +12,14 @@ def api_func_language(db_set, data = 'Test'):
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_func_llm.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_func_llm(db_set):
+def api_func_llm():
     if flask.request.method == 'POST':
         other_set = {}
         other_set["prompt"] = flask.request.form.get('prompt', '')
@@ -9,14 +9,14 @@ def api_func_llm(db_set):
 
         if platform.system() == 'Linux':
             if platform.machine() in ["AMD64", "x86_64"]:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
             else:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
             if platform.machine() in ["AMD64", "x86_64"]:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
             else:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
         data = data.decode('utf8')
 

+ 5 - 5
route/go_api_list_old_page.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_list_old_page(db_set, num = 1, set_type = 'old'):
+def api_list_old_page(num = 1, set_type = 'old'):
     other_set = {}
     other_set["num"] = str(num)
     other_set["set_type"] = set_type
@@ -8,14 +8,14 @@ def api_list_old_page(db_set, num = 1, set_type = 'old'):
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_list_recent_block.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_list_recent_block(db_set, num = 1, set_type = 'all', user_name = 'Test'):
+def api_list_recent_block(num = 1, set_type = 'all', user_name = 'Test'):
     other_set = {}
     other_set["num"] = str(num)
     other_set["set_type"] = set_type
@@ -10,14 +10,14 @@ def api_list_recent_block(db_set, num = 1, set_type = 'all', user_name = 'Test')
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_list_recent_change.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_list_recent_change(db_set, num = 1, set_type = 'normal', limit = 10, legacy = 'on'):
+def api_list_recent_change(num = 1, set_type = 'normal', limit = 10, legacy = 'on'):
     other_set = {}
     other_set["num"] = str(num)
     other_set["limit"] = str(limit)
@@ -11,14 +11,14 @@ def api_list_recent_change(db_set, num = 1, set_type = 'normal', limit = 10, leg
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_list_recent_discuss.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_list_recent_discuss(db_set, num = 1, set_type = 'normal', limit = 10, legacy = 'on'):
+def api_list_recent_discuss(num = 1, set_type = 'normal', limit = 10, legacy = 'on'):
     other_set = {}
     other_set["num"] = str(num)
     other_set["limit"] = str(limit)
@@ -11,14 +11,14 @@ def api_list_recent_discuss(db_set, num = 1, set_type = 'normal', limit = 10, le
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_list_recent_edit_request.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_list_recent_edit_request(db_set, num = 1, set_type = 'normal', limit = 50):
+def api_list_recent_edit_request(num = 1, set_type = 'normal', limit = 50):
     other_set = {}
     other_set["num"] = str(num)
     other_set["limit"] = str(limit)
@@ -10,14 +10,14 @@ def api_list_recent_edit_request(db_set, num = 1, set_type = 'normal', limit = 5
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_list_title_index.py

@@ -1,20 +1,20 @@
 from .tool.func import *
 
-def api_list_title_index(db_set, num = 1):
+def api_list_title_index(num = 1):
     other_set = {}
     other_set["num"] = str(num)
     other_set = json.dumps(other_set)
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_search.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_search(db_set, name = 'Test', search_type = 'title', num = 1):
+def api_search(name = 'Test', search_type = 'title', num = 1):
     other_set = {}
     other_set["name"] = name
     other_set["search_type"] = search_type
@@ -9,14 +9,14 @@ def api_search(db_set, name = 'Test', search_type = 'title', num = 1):
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_setting.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_setting(db_set, name = 'Test'):
+def api_setting(name = 'Test'):
     other_set = {}
     other_set["set_name"] = name
     other_set["ip"] = ip_check()
@@ -14,14 +14,14 @@ def api_setting(db_set, name = 'Test'):
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), func_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), func_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), func_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), func_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), func_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), func_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), func_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), func_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_topic.py

@@ -120,7 +120,7 @@ def api_topic_thread_pre_render(conn, data, num, ip, topic_num = '', name = '',
 
     return data
 
-def api_topic(db_set, topic_num = 1, tool = 'normal', s_num = '', e_num = ''):
+def api_topic(topic_num = 1, tool = 'normal', s_num = '', e_num = ''):
     with get_db_connect() as conn:
         topic_num = str(topic_num)
 
@@ -135,14 +135,14 @@ def api_topic(db_set, topic_num = 1, tool = 'normal', s_num = '', e_num = ''):
         if acl_check(conn, '', 'topic_view', topic_num) != 1:
             if platform.system() == 'Linux':
                 if platform.machine() in ["AMD64", "x86_64"]:
-                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
                 else:
-                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
             else:
                 if platform.machine() in ["AMD64", "x86_64"]:
-                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
                 else:
-                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
             data = data.decode('utf8')
 

+ 5 - 5
route/go_api_topic_list.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_topic_list(db_set, name = 'Test', set_type = 'normal', num = 1):
+def api_topic_list(name = 'Test', set_type = 'normal', num = 1):
     other_set = {}
     other_set["name"] = str(name)
     other_set["set_type"] = set_type
@@ -9,14 +9,14 @@ def api_topic_list(db_set, name = 'Test', set_type = 'normal', num = 1):
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_user_setting_editor.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_user_setting_editor(db_set):
+def api_user_setting_editor():
     with get_db_connect() as conn:
         other_set = {}
         other_set["ip"] = ip_check()
@@ -17,14 +17,14 @@ def api_user_setting_editor(db_set):
 
         if platform.system() == 'Linux':
             if platform.machine() in ["AMD64", "x86_64"]:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), func_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), func_name, other_set], stdout = subprocess.PIPE).communicate()[0]
             else:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), func_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), func_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
             if platform.machine() in ["AMD64", "x86_64"]:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), func_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), func_name, other_set], stdout = subprocess.PIPE).communicate()[0]
             else:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), func_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), func_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
         data = data.decode('utf8')
 

+ 5 - 5
route/go_api_w_random.py

@@ -1,16 +1,16 @@
 from .tool.func import *
 
-def api_w_random(db_set):
+def api_w_random():
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_w_raw.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_w_raw(db_set, name = 'Test', rev = '', exist_check = ''):
+def api_w_raw(name = 'Test', rev = '', exist_check = ''):
     with get_db_connect() as conn:
         other_set = {}
         other_set["name"] = name
@@ -11,14 +11,14 @@ def api_w_raw(db_set, name = 'Test', rev = '', exist_check = ''):
         if acl_check(conn, name, 'render') != 1:
             if platform.system() == 'Linux':
                 if platform.machine() in ["AMD64", "x86_64"]:
-                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
                 else:
-                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
             else:
                 if platform.machine() in ["AMD64", "x86_64"]:
-                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
                 else:
-                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                    data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
             data = data.decode('utf8')
 

+ 5 - 5
route/go_api_w_render.py

@@ -26,7 +26,7 @@ class api_w_render_include:
             else:
                 return slash_add + match[2]
 
-def api_w_render(db_set, name = '', tool = ''):
+def api_w_render(name = '', tool = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -91,14 +91,14 @@ def api_w_render(db_set, name = '', tool = ''):
 
                 if platform.system() == 'Linux':
                     if platform.machine() in ["AMD64", "x86_64"]:
-                        data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                        data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
                     else:
-                        data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                        data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
                 else:
                     if platform.machine() in ["AMD64", "x86_64"]:
-                        data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                        data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
                     else:
-                        data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                        data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
                 data = data.decode('utf8')
 

+ 5 - 5
route/go_api_w_set_reset.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_w_set_reset(db_set, name = 'Test'):
+def api_w_set_reset(name = 'Test'):
     with get_db_connect() as conn:
         other_set = {}
         other_set["name"] = name
@@ -9,14 +9,14 @@ def api_w_set_reset(db_set, name = 'Test'):
 
         if platform.system() == 'Linux':
             if platform.machine() in ["AMD64", "x86_64"]:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
             else:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
             if platform.machine() in ["AMD64", "x86_64"]:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
             else:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
         data = data.decode('utf8')
 

+ 5 - 5
route/go_api_w_watch_list.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_w_watch_list(db_set, name = 'Test', do_type = 'watch_list', num = 1):
+def api_w_watch_list(name = 'Test', do_type = 'watch_list', num = 1):
     other_set = {}
     other_set["name"] = name
     other_set["do_type"] = do_type
@@ -10,14 +10,14 @@ def api_w_watch_list(db_set, name = 'Test', do_type = 'watch_list', num = 1):
 
     if platform.system() == 'Linux':
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
     else:
         if platform.machine() in ["AMD64", "x86_64"]:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
-            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
     data = data.decode('utf8')
 

+ 5 - 5
route/go_api_w_xref.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def api_w_xref(db_set, name = 'Test', page = 1, xref_type = '1'):
+def api_w_xref(name = 'Test', page = 1, xref_type = '1'):
     with get_db_connect() as conn:
         other_set = {}
         other_set["name"] = name
@@ -10,14 +10,14 @@ def api_w_xref(db_set, name = 'Test', page = 1, xref_type = '1'):
 
         if platform.system() == 'Linux':
             if platform.machine() in ["AMD64", "x86_64"]:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
             else:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
         else:
             if platform.machine() in ["AMD64", "x86_64"]:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
             else:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, other_set], stdout = subprocess.PIPE).communicate()[0]
 
         data = data.decode('utf8')
 

+ 2 - 2
route/main_search_deep.py

@@ -2,7 +2,7 @@ from .tool.func import *
 
 from .go_api_search import api_search
 
-def main_search_deep(db_set, name = 'Test', search_type = 'title', num = 1):
+def main_search_deep(name = 'Test', search_type = 'title', num = 1):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -53,7 +53,7 @@ def main_search_deep(db_set, name = 'Test', search_type = 'title', num = 1):
                 <ul class="opennamu_ul">
             '''
 
-            all_list = json.loads(api_search(db_set, name, search_type, num).data)
+            all_list = json.loads(api_search(name, search_type, num).data)
             for data in all_list:
                 div += '<li><a href="/w/' + url_pas(data) + '">' + data + '</a></li>'
 

+ 77 - 66
route/main_setting_main.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def main_setting_main(db_set):
+def main_setting_main():
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -104,77 +104,88 @@ def main_setting_main(db_set):
                 else:
                     branch_div += '<option value="' + i + '">' + i + '</option>'
 
-            sqlite_only = 'style="display:none;"' if db_set != 'sqlite' else ''
+            sqlite_only = ''
+            with class_temp_db() as m_conn:
+                m_curs = m_conn.cursor()
 
-            return easy_minify(conn, flask.render_template(skin_check(conn),
-                imp = [get_lang(conn, 'main_setting'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
-                data = render_simple_set(conn, '''
-                    <form method="post">
-                        <h2>''' + get_lang(conn, 'basic_set') + '''</h2>
-                        
-                        <span>''' + get_lang(conn, 'wiki_name') + '''</span>
-                        <hr class="main_hr">
-                        <input name="name" value="''' + html.escape(d_list[0]) + '''">
-                        <hr class="main_hr">
+                m_curs.execute('select data from temp where name = "db_set_type"')
+                db_data = m_curs.fetchall()
+                set_data = db_data[0][0] if db_data else 'sqlite'
 
-                        <span><a href="/setting/main/logo">(''' + get_lang(conn, 'wiki_logo') + ''')</a></span>
-                        <hr class="main_hr">
-
-                        <span>''' + get_lang(conn, 'main_page') + '''</span>
-                        <hr class="main_hr">
-                        <input name="frontpage" value="''' + html.escape(d_list[2]) + '''">
-                        <hr class="main_hr">
+                sqlite_only = 'style="display:none;"' if set_data != 'sqlite' else ''
 
-                        <span>''' + get_lang(conn, 'tls_method') + '''</span>
-                        <hr class="main_hr">
-                        <select name="http_select">''' + tls_select + '''</select>
-                        <hr class="main_hr">
-
-                        <span>''' + get_lang(conn, 'domain') + '''</span> (EX : 2du.pythonanywhere.com) (''' + get_lang(conn, 'off') + ''' : ''' + get_lang(conn, 'empty') + ''')
-                        <hr class="main_hr">
-                        <input name="domain" value="''' + html.escape(d_list[22]) + '''">
-                        <hr class="main_hr">
-
-                        <span>''' + get_lang(conn, 'wiki_host') + '''</span>
-                        <hr class="main_hr">
-                        <input name="host" value="''' + html.escape(d_list[16]) + '''">
-                        <hr class="main_hr">
-
-                        <span>''' + get_lang(conn, 'wiki_port') + '''</span>
-                        <hr class="main_hr">
-                        <input name="port" value="''' + html.escape(d_list[10]) + '''">
-                        <hr class="main_hr">
-
-                        <span>''' + get_lang(conn, 'wiki_secret_key') + '''</span>
-                        <hr class="main_hr">
-                        <input type="password" name="key" value="''' + html.escape(d_list[11]) + '''">
-                        <hr class="main_hr">
-                        
-                        <input type="checkbox" name="wiki_access_password_need" ''' + check_box_div[8] + '''> ''' + get_lang(conn, 'set_wiki_access_password_need') + ''' (''' + get_lang(conn, 'restart_required') + ''')
-                        <hr class="main_hr">
-                        
-                        <span>''' + get_lang(conn, 'set_wiki_access_password') + '''</span> (''' + get_lang(conn, 'restart_required') + ''')
-                        <hr class="main_hr">
-                        <input type="password" name="wiki_access_password" value="''' + html.escape(d_list[32]) + '''">
-                        
-                        <h3>''' + get_lang(conn, 'authority_use_list') + '''</h3>
-                        
-                        <input type="checkbox" name="auth_history_off" ''' + check_box_div[14] + '''> ''' + get_lang(conn, 'authority_use_list_off') + '''
-                        <hr class="main_hr">
-                        
-                        <span>''' + get_lang(conn, 'authority_use_list_expiration_date') + '''</span> (''' + get_lang(conn, 'day') + ''') (''' + get_lang(conn, 'off') + ''' : ''' + get_lang(conn, 'empty') + ''')
-                        <hr class="main_hr">
-                        <input name="auth_history_expiration_date" value="''' + html.escape(d_list[43]) + '''">
-                        <hr class="main_hr">
+            basic_set = '''
+                <h2>''' + get_lang(conn, 'basic_set') + '''</h2>
+                            
+                <span>''' + get_lang(conn, 'wiki_name') + '''</span>
+                <hr class="main_hr">
+                <input name="name" value="''' + html.escape(d_list[0]) + '''">
+                <hr class="main_hr">
+
+                <span><a href="/setting/main/logo">(''' + get_lang(conn, 'wiki_logo') + ''')</a></span>
+                <hr class="main_hr">
+
+                <span>''' + get_lang(conn, 'main_page') + '''</span>
+                <hr class="main_hr">
+                <input name="frontpage" value="''' + html.escape(d_list[2]) + '''">
+                <hr class="main_hr">
+
+                <span>''' + get_lang(conn, 'tls_method') + '''</span>
+                <hr class="main_hr">
+                <select name="http_select">''' + tls_select + '''</select>
+                <hr class="main_hr">
+
+                <span>''' + get_lang(conn, 'domain') + '''</span> (EX : 2du.pythonanywhere.com) (''' + get_lang(conn, 'off') + ''' : ''' + get_lang(conn, 'empty') + ''')
+                <hr class="main_hr">
+                <input name="domain" value="''' + html.escape(d_list[22]) + '''">
+                <hr class="main_hr">
+
+                <span>''' + get_lang(conn, 'wiki_host') + '''</span>
+                <hr class="main_hr">
+                <input name="host" value="''' + html.escape(d_list[16]) + '''">
+                <hr class="main_hr">
+
+                <span>''' + get_lang(conn, 'wiki_port') + '''</span>
+                <hr class="main_hr">
+                <input name="port" value="''' + html.escape(d_list[10]) + '''">
+                <hr class="main_hr">
+
+                <span>''' + get_lang(conn, 'wiki_secret_key') + '''</span>
+                <hr class="main_hr">
+                <input type="password" name="key" value="''' + html.escape(d_list[11]) + '''">
+                <hr class="main_hr">
+                
+                <input type="checkbox" name="wiki_access_password_need" ''' + check_box_div[8] + '''> ''' + get_lang(conn, 'set_wiki_access_password_need') + ''' (''' + get_lang(conn, 'restart_required') + ''')
+                <hr class="main_hr">
+                
+                <span>''' + get_lang(conn, 'set_wiki_access_password') + '''</span> (''' + get_lang(conn, 'restart_required') + ''')
+                <hr class="main_hr">
+                <input type="password" name="wiki_access_password" value="''' + html.escape(d_list[32]) + '''">
+                
+                <h3>''' + get_lang(conn, 'authority_use_list') + '''</h3>
+                
+                <input type="checkbox" name="auth_history_off" ''' + check_box_div[14] + '''> ''' + get_lang(conn, 'authority_use_list_off') + '''
+                <hr class="main_hr">
+                
+                <span>''' + get_lang(conn, 'authority_use_list_expiration_date') + '''</span> (''' + get_lang(conn, 'day') + ''') (''' + get_lang(conn, 'off') + ''' : ''' + get_lang(conn, 'empty') + ''')
+                <hr class="main_hr">
+                <input name="auth_history_expiration_date" value="''' + html.escape(d_list[43]) + '''">
+                <hr class="main_hr">
 
-                        <h3>''' + get_lang(conn, 'communication_set') + '''</h3>
-                        
-                        <input type="checkbox" name="enable_comment" ''' + check_box_div[5] + '''> ''' + get_lang(conn, 'enable_comment_function') + ''' (''' + get_lang(conn, 'not_working') + ''')
-                        <hr class="main_hr">
+                <h3>''' + get_lang(conn, 'communication_set') + '''</h3>
+                
+                <input type="checkbox" name="enable_comment" ''' + check_box_div[5] + '''> ''' + get_lang(conn, 'enable_comment_function') + ''' (''' + get_lang(conn, 'not_working') + ''')
+                <hr class="main_hr">
 
-                        <input type="checkbox" name="user_name_level" ''' + check_box_div[15] + '''> ''' + get_lang(conn, 'display_level_in_user_name') + '''
-                        <hr class="main_hr">
+                <input type="checkbox" name="user_name_level" ''' + check_box_div[15] + '''> ''' + get_lang(conn, 'display_level_in_user_name') + '''
+                <hr class="main_hr">
+            '''
 
+            return easy_minify(conn, flask.render_template(skin_check(conn),
+                imp = [get_lang(conn, 'main_setting'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+                data = render_simple_set(conn, '''
+                    <form method="post">
+                        ''' + basic_set + '''
                         <h2>''' + get_lang(conn, 'design_set') + '''</h2>
                         
                         <span>''' + get_lang(conn, 'wiki_skin') + '''</span>

+ 2 - 2
route/recent_edit_request.py

@@ -4,7 +4,7 @@ from .recent_change import recent_change_send_render
 
 from .go_api_list_recent_edit_request import api_list_recent_edit_request
 
-def recent_edit_request(db_set):
+def recent_edit_request():
     with get_db_connect() as conn:
         div = ''
         div += '''
@@ -17,7 +17,7 @@ def recent_edit_request(db_set):
                     </tr>
         '''
 
-        all_list = json.loads(api_list_recent_edit_request(db_set).data)
+        all_list = json.loads(api_list_recent_edit_request().data)
         for data in all_list:
             if re.search(r"\+", data[5]):
                 leng = '<span style="color:green;">(' + data[5] + ')</span>'

+ 6 - 7
route/tool/func.py

@@ -96,7 +96,7 @@ if sys.version_info < (3, 6):
 # Func
 # Func-main
 def do_db_set(db_set):
-    with class_in_memory_db() as m_conn:
+    with class_temp_db() as m_conn:
         m_curs = m_conn.cursor()
 
         m_curs.execute('drop table if exists temp')
@@ -107,7 +107,6 @@ def do_db_set(db_set):
 
         m_curs.execute('select data from temp where name = "db_set"')
         db_data = m_curs.fetchall()
-        print(db_data)
     
 # Func-init
 def get_init_set_list(need = 'all'):
@@ -144,7 +143,7 @@ def get_init_set_list(need = 'all'):
         return init_set_list[need]
 class get_db_connect:
     def __init__(self):
-        with class_in_memory_db() as m_conn:
+        with class_temp_db() as m_conn:
             m_curs = m_conn.cursor()
 
             m_curs.execute('select data from temp where name = "db_set"')
@@ -641,7 +640,7 @@ def update(conn, ver_num, set_data):
     print('Update completed')
 
 def set_init_always(conn, ver_num):
-    with class_in_memory_db() as m_conn:
+    with class_temp_db() as m_conn:
         m_curs = m_conn.cursor()
         curs = conn.cursor()
 
@@ -979,7 +978,7 @@ def pw_check(conn, data, data2, type_d = 'no', id_d = ''):
 # Func-skin
 def easy_minify(conn, data, tool = None):
     # without_DB
-    with class_in_memory_db() as m_conn:
+    with class_temp_db() as m_conn:
         m_curs = m_conn.cursor()
         
         m_curs.execute('select data from temp where name = "wiki_access_password"')
@@ -1000,7 +999,7 @@ def easy_minify(conn, data, tool = None):
             return data
 
 def get_lang(conn, data, safe = 0):
-    with class_in_memory_db() as m_conn:
+    with class_temp_db() as m_conn:
         m_curs = m_conn.cursor()
         curs = conn.cursor()
 
@@ -1087,7 +1086,7 @@ def cache_v():
     return '.cache_v258'
 
 def wiki_css(data):
-    with class_in_memory_db() as m_conn:
+    with class_temp_db() as m_conn:
         m_curs = m_conn.cursor()
 
         # without_DB

+ 3 - 3
route/tool/func_tool.py

@@ -15,10 +15,10 @@ import threading
 def get_time():
     return str(datetime.datetime.today().strftime("%Y-%m-%d %H:%M:%S"))
 
-class class_in_memory_db:
+class class_temp_db:
     def __enter__(self):
         self.conn = sqlite3.connect(
-            'file:cachedb?mode=memory&cache=shared',
+            os.path.join('.', 'data', 'temp.db'),
             check_same_thread = False,
             isolation_level = None
         )
@@ -30,7 +30,7 @@ class class_in_memory_db:
         self.conn.close()
 
 def db_change(data):
-    with class_in_memory_db() as m_conn:
+    with class_temp_db() as m_conn:
         m_curs = m_conn.cursor()
         
         m_curs.execute('select data from temp where name = "db_set_type"')

+ 2 - 2
route/view_random.py

@@ -2,8 +2,8 @@ from .tool.func import *
 
 from .go_api_w_random import api_w_random
 
-def view_random(db_set):
+def view_random():
     with get_db_connect() as conn:
-        data = json.loads(api_w_random(db_set).data)["data"]
+        data = json.loads(api_w_random().data)["data"]
         
         return redirect(conn, '/w/' + url_pas(data))

BIN
route_go/bin/main.amd64.bin


BIN
route_go/bin/main.amd64.exe


BIN
route_go/bin/main.arm64.bin


BIN
route_go/bin/main.arm64.exe


+ 8 - 11
route_go/route/api_bbs.go

@@ -9,20 +9,17 @@ import (
 )
 
 func Api_bbs(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	var rows []*sql.Rows
 	if other_set["bbs_num"] == "" {
 		var err error
 
-		row, err := db.Query(tool.DB_change(db_set, "select set_code, set_id, '0' from bbs_data where set_name = 'date' order by set_data desc limit 50"))
+		row, err := db.Query(tool.DB_change("select set_code, set_id, '0' from bbs_data where set_name = 'date' order by set_data desc limit 50"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -35,7 +32,7 @@ func Api_bbs(call_arg []string) string {
 			num = page*50 - 50
 		}
 
-		stmt, err := db.Prepare(tool.DB_change(db_set, "select set_code, set_id, '1' from bbs_data where set_name = 'pinned' and set_id like ? order by set_data desc"))
+		stmt, err := db.Prepare(tool.DB_change("select set_code, set_id, '1' from bbs_data where set_name = 'pinned' and set_id like ? order by set_data desc"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -48,7 +45,7 @@ func Api_bbs(call_arg []string) string {
 
 		rows = append(rows, row)
 
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select set_code, set_id, '0' from bbs_data where set_name = 'title' and set_id like ? order by set_code + 0 desc limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select set_code, set_id, '0' from bbs_data where set_name = 'title' and set_id like ? order by set_code + 0 desc limit ?, 50"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -84,7 +81,7 @@ func Api_bbs(call_arg []string) string {
 			temp_data["set_id"] = set_id
 			temp_data["pinned"] = pinned
 
-			stmt, err := db.Prepare(tool.DB_change(db_set, "select set_name, set_data, set_code, set_id from bbs_data where set_code = ? and set_id = ?"))
+			stmt, err := db.Prepare(tool.DB_change("select set_name, set_data, set_code, set_id from bbs_data where set_code = ? and set_id = ?"))
 			if err != nil {
 				log.Fatal(err)
 			}
@@ -113,8 +110,8 @@ func Api_bbs(call_arg []string) string {
 						ip_pre = ip_parser_temp[set_data][0]
 						ip_render = ip_parser_temp[set_data][1]
 					} else {
-						ip_pre = tool.IP_preprocess(db, db_set, set_data, other_set["ip"])[0]
-						ip_render = tool.IP_parser(db, db_set, set_data, other_set["ip"])
+						ip_pre = tool.IP_preprocess(db, set_data, other_set["ip"])[0]
+						ip_render = tool.IP_parser(db, set_data, other_set["ip"])
 
 						ip_parser_temp[set_data] = []string{ip_pre, ip_render}
 					}

+ 8 - 11
route_go/route/api_bbs_list.go

@@ -7,8 +7,8 @@ import (
 	"opennamu/route/tool"
 )
 
-func bbs_list(db *sql.DB, db_set map[string]string) map[string]string {
-	rows, err := db.Query(tool.DB_change(db_set, "select set_data, set_id from bbs_set where set_name = 'bbs_name'"))
+func bbs_list(db *sql.DB) map[string]string {
+	rows, err := db.Query(tool.DB_change("select set_data, set_id from bbs_set where set_name = 'bbs_name'"))
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -32,17 +32,14 @@ func bbs_list(db *sql.DB, db_set map[string]string) map[string]string {
 }
 
 func Api_bbs_list(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
-	data_list := bbs_list(db, db_set)
+	data_list := bbs_list(db)
 	data_list_sub := map[string][]string{}
 
 	for k, v := range data_list {
-		stmt, err := db.Prepare(tool.DB_change(db_set, "select set_data from bbs_set where set_name = 'bbs_type' and set_id = ?"))
+		stmt, err := db.Prepare(tool.DB_change("select set_data from bbs_set where set_name = 'bbs_type' and set_id = ?"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -59,7 +56,7 @@ func Api_bbs_list(call_arg []string) string {
 			}
 		}
 
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select set_data from bbs_data where set_id = ? and set_name = 'date' order by set_code + 0 desc limit 1"))
+		stmt, err = db.Prepare(tool.DB_change("select set_data from bbs_data where set_id = ? and set_name = 'date' order by set_code + 0 desc limit 1"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -81,8 +78,8 @@ func Api_bbs_list(call_arg []string) string {
 
 	return_data := make(map[string]interface{})
 	return_data["language"] = map[string]string{
-		"thread_base":  tool.Get_language(db, db_set, "thread_base", false),
-		"comment_base": tool.Get_language(db, db_set, "comment_base", false),
+		"thread_base":  tool.Get_language(db, "thread_base", false),
+		"comment_base": tool.Get_language(db, "comment_base", false),
 	}
 
 	if len(data_list_sub) == 0 {

+ 3 - 6
route_go/route/api_bbs_w.go

@@ -7,16 +7,13 @@ import (
 )
 
 func Api_bbs_w(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
-	stmt, err := db.Prepare(tool.DB_change(db_set, "select set_name, set_data from bbs_data where set_id = ? and set_code = ?"))
+	stmt, err := db.Prepare(tool.DB_change("select set_name, set_data from bbs_data where set_id = ? and set_code = ?"))
 	if err != nil {
 		log.Fatal(err)
 	}

+ 4 - 7
route_go/route/api_bbs_w_comment.go

@@ -9,17 +9,14 @@ import (
 )
 
 func Api_bbs_w_comment(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	if other_set["tool"] == "length" {
-		stmt, err := db.Prepare(tool.DB_change(db_set, "select count(*) from bbs_data where set_name = 'comment_date' and set_id = ? order by set_code + 0 desc"))
+		stmt, err := db.Prepare(tool.DB_change("select count(*) from bbs_data where set_name = 'comment_date' and set_id = ? order by set_code + 0 desc"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -37,7 +34,7 @@ func Api_bbs_w_comment(call_arg []string) string {
 			}
 		}
 
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select count(*) from bbs_data where set_name = 'comment_date' and set_id like ? order by set_code + 0 desc"))
+		stmt, err = db.Prepare(tool.DB_change("select count(*) from bbs_data where set_name = 'comment_date' and set_id like ? order by set_code + 0 desc"))
 		if err != nil {
 			log.Fatal(err)
 		}

+ 4 - 5
route_go/route/api_edit_move_all.go

@@ -6,13 +6,10 @@ import (
 )
 
 func Api_edit_move_all(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	if other_set["select"] == "include" {
@@ -22,4 +19,6 @@ func Api_edit_move_all(call_arg []string) string {
 	} else {
 
 	}
+
+	return ""
 }

+ 4 - 7
route_go/route/api_func_auth_list.go

@@ -6,17 +6,14 @@ import (
 )
 
 func Api_func_auth_list(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
-	auth_name := tool.Get_user_auth(db, db_set, other_set["ip"])
-	auth_info := tool.Get_auth_group_info(db, db_set, auth_name)
+	auth_name := tool.Get_user_auth(db, other_set["ip"])
+	auth_info := tool.Get_auth_group_info(db, auth_name)
 
 	json_data, _ := json.Marshal(auth_info)
 	return string(json_data)

+ 3 - 6
route_go/route/api_func_ip.go

@@ -7,16 +7,13 @@ import (
 )
 
 func Api_func_ip(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
-	ip_data := tool.IP_parser(db, db_set, other_set["data"], other_set["ip"])
+	ip_data := tool.IP_parser(db, other_set["data"], other_set["ip"])
 
 	new_data := map[string]string{}
 	new_data["data"] = ip_data

+ 3 - 6
route_go/route/api_func_ip_menu.go

@@ -7,16 +7,13 @@ import (
 )
 
 func Api_func_ip_menu(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
-	ip_data := tool.IP_menu(db, db_set, other_set["ip"], other_set["my_ip"], other_set["option"])
+	ip_data := tool.IP_menu(db, other_set["ip"], other_set["my_ip"], other_set["option"])
 
 	new_data := make(map[string]interface{})
 	new_data["data"] = ip_data

+ 3 - 6
route_go/route/api_func_language.go

@@ -6,13 +6,10 @@ import (
 )
 
 func Api_func_language(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := make(map[string]interface{})
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	data_list := map[string][]string{}
@@ -21,7 +18,7 @@ func Api_func_language(call_arg []string) string {
 	temp_list := other_set["data"].([]interface{})
 
 	for for_a := 0; for_a < len(temp_list); for_a++ {
-		data_list["data"] = append(data_list["data"], tool.Get_language(db, db_set, temp_list[for_a].(string), false))
+		data_list["data"] = append(data_list["data"], tool.Get_language(db, temp_list[for_a].(string), false))
 	}
 
 	json_data, _ := json.Marshal(data_list)

+ 3 - 6
route_go/route/api_func_llm.go

@@ -12,18 +12,15 @@ import (
 )
 
 func Api_func_llm(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	var api_key string
 
-	stmt, err := db.Prepare(tool.DB_change(db_set, "select data from user_set where name = 'llm_api_key' and id = ?"))
+	stmt, err := db.Prepare(tool.DB_change("select data from user_set where name = 'llm_api_key' and id = ?"))
 	if err != nil {
 		log.Fatal(err)
 	}

+ 5 - 8
route_go/route/api_list_old_page.go

@@ -9,13 +9,10 @@ import (
 )
 
 func Api_list_old_page(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	page_int, err := strconv.Atoi(other_set["num"])
@@ -32,9 +29,9 @@ func Api_list_old_page(call_arg []string) string {
 	var stmt *sql.Stmt
 
 	if other_set["set_type"] == "old" {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select doc_name, set_data from data_set where set_name = 'last_edit' and doc_rev = '' and not (doc_name) in (select doc_name from data_set where set_name = 'doc_type' and set_data != '') order by set_data asc limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select doc_name, set_data from data_set where set_name = 'last_edit' and doc_rev = '' and not (doc_name) in (select doc_name from data_set where set_name = 'doc_type' and set_data != '') order by set_data asc limit ?, 50"))
 	} else {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select doc_name, set_data from data_set where set_name = 'last_edit' and doc_rev = '' and not (doc_name) in (select doc_name from data_set where set_name = 'doc_type' and set_data != '') order by set_data desc limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select doc_name, set_data from data_set where set_name = 'last_edit' and doc_rev = '' and not (doc_name) in (select doc_name from data_set where set_name = 'doc_type' and set_data != '') order by set_data desc limit ?, 50"))
 	}
 
 	if err != nil {
@@ -59,7 +56,7 @@ func Api_list_old_page(call_arg []string) string {
 			log.Fatal(err)
 		}
 
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select set_data from data_set where doc_name = ? and set_name = 'doc_type'"))
+		stmt, err = db.Prepare(tool.DB_change("select set_data from data_set where doc_name = ? and set_name = 'doc_type'"))
 		if err != nil {
 			log.Fatal(err)
 		}

+ 25 - 28
route_go/route/api_list_recent_block.go

@@ -9,13 +9,10 @@ import (
 )
 
 func Api_list_recent_block(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	page_int, err := strconv.Atoi(other_set["num"])
@@ -32,7 +29,7 @@ func Api_list_recent_block(call_arg []string) string {
 	var stmt *sql.Stmt
 	var rows *sql.Rows
 	if other_set["set_type"] == "all" {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select why, block, blocker, end, today, band, ongoing from rb order by today desc limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select why, block, blocker, end, today, band, ongoing from rb order by today desc limit ?, 50"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -42,7 +39,7 @@ func Api_list_recent_block(call_arg []string) string {
 			log.Fatal(err)
 		}
 	} else if other_set["set_type"] == "ongoing" {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select why, block, blocker, end, today, band, ongoing from rb where ongoing = '1' order by end desc limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select why, block, blocker, end, today, band, ongoing from rb where ongoing = '1' order by end desc limit ?, 50"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -52,7 +49,7 @@ func Api_list_recent_block(call_arg []string) string {
 			log.Fatal(err)
 		}
 	} else if other_set["set_type"] == "regex" {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select why, block, blocker, end, today, band, ongoing from rb where band = 'regex' order by today desc limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select why, block, blocker, end, today, band, ongoing from rb where band = 'regex' order by today desc limit ?, 50"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -62,7 +59,7 @@ func Api_list_recent_block(call_arg []string) string {
 			log.Fatal(err)
 		}
 	} else if other_set["set_type"] == "user" {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select why, block, blocker, end, today, band, ongoing from rb where block = ? order by today desc limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select why, block, blocker, end, today, band, ongoing from rb where block = ? order by today desc limit ?, 50"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -72,7 +69,7 @@ func Api_list_recent_block(call_arg []string) string {
 			log.Fatal(err)
 		}
 	} else if other_set["set_type"] == "cidr" {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select why, block, blocker, end, today, band, ongoing from rb where band = 'cidr' order by today desc limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select why, block, blocker, end, today, band, ongoing from rb where band = 'cidr' order by today desc limit ?, 50"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -82,7 +79,7 @@ func Api_list_recent_block(call_arg []string) string {
 			log.Fatal(err)
 		}
 	} else {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select why, block, blocker, end, today, band, ongoing from rb where blocker = ? order by today desc limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select why, block, blocker, end, today, band, ongoing from rb where blocker = ? order by today desc limit ?, 50"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -120,8 +117,8 @@ func Api_list_recent_block(call_arg []string) string {
 			ip_pre_blocker = ip_parser_temp[blocker][0]
 			ip_render_blocker = ip_parser_temp[blocker][1]
 		} else {
-			ip_pre_blocker = tool.IP_preprocess(db, db_set, blocker, other_set["ip"])[0]
-			ip_render_blocker = tool.IP_parser(db, db_set, blocker, other_set["ip"])
+			ip_pre_blocker = tool.IP_preprocess(db, blocker, other_set["ip"])[0]
+			ip_render_blocker = tool.IP_parser(db, blocker, other_set["ip"])
 
 			ip_parser_temp[blocker] = []string{ip_pre_blocker, ip_render_blocker}
 		}
@@ -134,8 +131,8 @@ func Api_list_recent_block(call_arg []string) string {
 				ip_pre_block = ip_parser_temp[block][0]
 				ip_render_block = ip_parser_temp[block][1]
 			} else {
-				ip_pre_block = tool.IP_preprocess(db, db_set, block, other_set["ip"])[0]
-				ip_render_block = tool.IP_parser(db, db_set, block, other_set["ip"])
+				ip_pre_block = tool.IP_preprocess(db, block, other_set["ip"])[0]
+				ip_render_block = tool.IP_parser(db, block, other_set["ip"])
 
 				ip_parser_temp[block] = []string{ip_pre_block, ip_render_block}
 			}
@@ -159,17 +156,17 @@ func Api_list_recent_block(call_arg []string) string {
 
 	return_data := make(map[string]interface{})
 	return_data["language"] = map[string]string{
-		"all":         tool.Get_language(db, db_set, "all", false),
-		"regex":       tool.Get_language(db, db_set, "regex", false),
-		"cidr":        tool.Get_language(db, db_set, "cidr", false),
-		"in_progress": tool.Get_language(db, db_set, "in_progress", false),
-		"admin":       tool.Get_language(db, db_set, "admin", false),
-		"blocked":     tool.Get_language(db, db_set, "blocked", false),
-		"limitless":   tool.Get_language(db, db_set, "limitless", false),
-		"release":     tool.Get_language(db, db_set, "release", false),
-		"start":       tool.Get_language(db, db_set, "start", false),
-		"end":         tool.Get_language(db, db_set, "end", false),
-		"ban":         tool.Get_language(db, db_set, "ban", false),
+		"all":         tool.Get_language(db, "all", false),
+		"regex":       tool.Get_language(db, "regex", false),
+		"cidr":        tool.Get_language(db, "cidr", false),
+		"in_progress": tool.Get_language(db, "in_progress", false),
+		"admin":       tool.Get_language(db, "admin", false),
+		"blocked":     tool.Get_language(db, "blocked", false),
+		"limitless":   tool.Get_language(db, "limitless", false),
+		"release":     tool.Get_language(db, "release", false),
+		"start":       tool.Get_language(db, "start", false),
+		"end":         tool.Get_language(db, "end", false),
+		"ban":         tool.Get_language(db, "ban", false),
 	}
 
 	if len(data_list) == 0 {
@@ -178,8 +175,8 @@ func Api_list_recent_block(call_arg []string) string {
 		return_data["data"] = data_list
 	}
 
-	auth_name := tool.Get_user_auth(db, db_set, other_set["ip"])
-	auth_info := tool.Get_auth_group_info(db, db_set, auth_name)
+	auth_name := tool.Get_user_auth(db, other_set["ip"])
+	auth_info := tool.Get_auth_group_info(db, auth_name)
 
 	return_data["auth"] = auth_info
 

+ 27 - 30
route_go/route/api_list_recent_change.go

@@ -9,13 +9,10 @@ import (
 )
 
 func Api_list_recent_change(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	set_type := other_set["set_type"]
@@ -43,7 +40,7 @@ func Api_list_recent_change(call_arg []string) string {
 		page_int = 0
 	}
 
-	stmt, err := db.Prepare(tool.DB_change(db_set, "select id, title from rc where type = ? order by date desc limit ?, ?"))
+	stmt, err := db.Prepare(tool.DB_change("select id, title from rc where type = ? order by date desc limit ?, ?"))
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -57,7 +54,7 @@ func Api_list_recent_change(call_arg []string) string {
 
 	var data_list [][]string
 
-	admin_auth := tool.Get_user_auth(db, db_set, other_set["ip"])
+	admin_auth := tool.Get_user_auth(db, other_set["ip"])
 	ip_parser_temp := map[string][]string{}
 
 	for rows.Next() {
@@ -76,7 +73,7 @@ func Api_list_recent_change(call_arg []string) string {
 		var hide string
 		var type_data string
 
-		stmt, err := db.Prepare(tool.DB_change(db_set, "select date, ip, send, leng, hide, type from history where id = ? and title = ?"))
+		stmt, err := db.Prepare(tool.DB_change("select date, ip, send, leng, hide, type from history where id = ? and title = ?"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -103,8 +100,8 @@ func Api_list_recent_change(call_arg []string) string {
 			ip_pre = ip_parser_temp[ip][0]
 			ip_render = ip_parser_temp[ip][1]
 		} else {
-			ip_pre = tool.IP_preprocess(db, db_set, ip, other_set["ip"])[0]
-			ip_render = tool.IP_parser(db, db_set, ip, other_set["ip"])
+			ip_pre = tool.IP_preprocess(db, ip, other_set["ip"])[0]
+			ip_render = tool.IP_parser(db, ip, other_set["ip"])
 
 			ip_parser_temp[ip] = []string{ip_pre, ip_render}
 		}
@@ -134,29 +131,29 @@ func Api_list_recent_change(call_arg []string) string {
 			return string(json_data)
 		}
 	} else {
-		auth_name := tool.Get_user_auth(db, db_set, other_set["ip"])
-		auth_info := tool.Get_auth_group_info(db, db_set, auth_name)
+		auth_name := tool.Get_user_auth(db, other_set["ip"])
+		auth_info := tool.Get_auth_group_info(db, auth_name)
 
 		return_data := make(map[string]interface{})
 		return_data["language"] = map[string]string{
-			"tool":           tool.Get_language(db, db_set, "tool", false),
-			"normal":         tool.Get_language(db, db_set, "normal", false),
-			"edit":           tool.Get_language(db, db_set, "edit", false),
-			"move":           tool.Get_language(db, db_set, "move", false),
-			"delete":         tool.Get_language(db, db_set, "delete", false),
-			"revert":         tool.Get_language(db, db_set, "revert", false),
-			"new_doc":        tool.Get_language(db, db_set, "new_doc", false),
-			"edit_request":   tool.Get_language(db, db_set, "edit_request", false),
-			"user_document":  tool.Get_language(db, db_set, "user_document", false),
-			"raw":            tool.Get_language(db, db_set, "raw", false),
-			"compare":        tool.Get_language(db, db_set, "compare", false),
-			"history":        tool.Get_language(db, db_set, "history", false),
-			"hide":           tool.Get_language(db, db_set, "hide", false),
-			"history_delete": tool.Get_language(db, db_set, "history_delete", false),
-			"send_edit":      tool.Get_language(db, db_set, "send_edit", false),
-			"file":           tool.Get_language(db, db_set, "file", false),
-			"category":       tool.Get_language(db, db_set, "category", false),
-			"setting":        tool.Get_language(db, db_set, "setting", false),
+			"tool":           tool.Get_language(db, "tool", false),
+			"normal":         tool.Get_language(db, "normal", false),
+			"edit":           tool.Get_language(db, "edit", false),
+			"move":           tool.Get_language(db, "move", false),
+			"delete":         tool.Get_language(db, "delete", false),
+			"revert":         tool.Get_language(db, "revert", false),
+			"new_doc":        tool.Get_language(db, "new_doc", false),
+			"edit_request":   tool.Get_language(db, "edit_request", false),
+			"user_document":  tool.Get_language(db, "user_document", false),
+			"raw":            tool.Get_language(db, "raw", false),
+			"compare":        tool.Get_language(db, "compare", false),
+			"history":        tool.Get_language(db, "history", false),
+			"hide":           tool.Get_language(db, "hide", false),
+			"history_delete": tool.Get_language(db, "history_delete", false),
+			"send_edit":      tool.Get_language(db, "send_edit", false),
+			"file":           tool.Get_language(db, "file", false),
+			"category":       tool.Get_language(db, "category", false),
+			"setting":        tool.Get_language(db, "setting", false),
 		}
 		return_data["auth"] = auth_info
 

+ 17 - 20
route_go/route/api_list_recent_discuss.go

@@ -9,13 +9,10 @@ import (
 )
 
 func Api_list_recent_discuss(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	limit_int, err := strconv.Atoi(other_set["limit"])
@@ -42,11 +39,11 @@ func Api_list_recent_discuss(call_arg []string) string {
 
 	set_type := other_set["set_type"]
 	if set_type == "normal" {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select title, sub, date, code, stop, agree from rd order by date desc limit ?, ?"))
+		stmt, err = db.Prepare(tool.DB_change("select title, sub, date, code, stop, agree from rd order by date desc limit ?, ?"))
 	} else if set_type == "close" {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select title, sub, date, code, stop, agree from rd where stop = 'O' order by date desc limit ?, ?"))
+		stmt, err = db.Prepare(tool.DB_change("select title, sub, date, code, stop, agree from rd where stop = 'O' order by date desc limit ?, ?"))
 	} else {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select title, sub, date, code, stop, agree from rd where stop != 'O' order by date desc limit ?, ?"))
+		stmt, err = db.Prepare(tool.DB_change("select title, sub, date, code, stop, agree from rd where stop != 'O' order by date desc limit ?, ?"))
 	}
 
 	if err != nil {
@@ -76,7 +73,7 @@ func Api_list_recent_discuss(call_arg []string) string {
 			log.Fatal(err)
 		}
 
-		stmt, err := db.Prepare(tool.DB_change(db_set, "select ip, id from topic where code = ? order by id + 0 desc limit 1"))
+		stmt, err := db.Prepare(tool.DB_change("select ip, id from topic where code = ? order by id + 0 desc limit 1"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -101,8 +98,8 @@ func Api_list_recent_discuss(call_arg []string) string {
 			ip_pre = ip_parser_temp[ip][0]
 			ip_render = ip_parser_temp[ip][1]
 		} else {
-			ip_pre = tool.IP_preprocess(db, db_set, ip, other_set["ip"])[0]
-			ip_render = tool.IP_parser(db, db_set, ip, other_set["ip"])
+			ip_pre = tool.IP_preprocess(db, ip, other_set["ip"])[0]
+			ip_render = tool.IP_parser(db, ip, other_set["ip"])
 
 			ip_parser_temp[ip] = []string{ip_pre, ip_render}
 		}
@@ -128,18 +125,18 @@ func Api_list_recent_discuss(call_arg []string) string {
 			return string(json_data)
 		}
 	} else {
-		auth_name := tool.Get_user_auth(db, db_set, other_set["ip"])
-		auth_info := tool.Get_auth_group_info(db, db_set, auth_name)
+		auth_name := tool.Get_user_auth(db, other_set["ip"])
+		auth_info := tool.Get_auth_group_info(db, auth_name)
 
 		return_data := make(map[string]interface{})
 		return_data["language"] = map[string]string{
-			"tool":              tool.Get_language(db, db_set, "tool", false),
-			"normal":            tool.Get_language(db, db_set, "normal", false),
-			"close_discussion":  tool.Get_language(db, db_set, "close_discussion", false),
-			"open_discussion":   tool.Get_language(db, db_set, "open_discussion", false),
-			"closed":            tool.Get_language(db, db_set, "closed", false),
-			"agreed_discussion": tool.Get_language(db, db_set, "agreed_discussion", false),
-			"stop":              tool.Get_language(db, db_set, "stop", false),
+			"tool":              tool.Get_language(db, "tool", false),
+			"normal":            tool.Get_language(db, "normal", false),
+			"close_discussion":  tool.Get_language(db, "close_discussion", false),
+			"open_discussion":   tool.Get_language(db, "open_discussion", false),
+			"closed":            tool.Get_language(db, "closed", false),
+			"agreed_discussion": tool.Get_language(db, "agreed_discussion", false),
+			"stop":              tool.Get_language(db, "stop", false),
 		}
 		return_data["auth"] = auth_info
 

+ 8 - 11
route_go/route/api_list_recent_edit_request.go

@@ -9,13 +9,10 @@ import (
 )
 
 func Api_list_recent_edit_request(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	limit_int, err := strconv.Atoi(other_set["limit"])
@@ -27,7 +24,7 @@ func Api_list_recent_edit_request(call_arg []string) string {
 		limit_int = 50
 	}
 
-	stmt, err := db.Prepare(tool.DB_change(db_set, "select doc_name, doc_rev, set_data from data_set where set_name = 'edit_request_doing' order by set_data desc limit ?"))
+	stmt, err := db.Prepare(tool.DB_change("select doc_name, doc_rev, set_data from data_set where set_name = 'edit_request_doing' order by set_data desc limit ?"))
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -54,7 +51,7 @@ func Api_list_recent_edit_request(call_arg []string) string {
 		var send string
 		var leng string
 
-		stmt, err := db.Prepare(tool.DB_change(db_set, "select set_data from data_set where set_name = 'edit_request_user' and doc_rev = ? and doc_name = ?"))
+		stmt, err := db.Prepare(tool.DB_change("select set_data from data_set where set_name = 'edit_request_user' and doc_rev = ? and doc_name = ?"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -69,7 +66,7 @@ func Api_list_recent_edit_request(call_arg []string) string {
 			}
 		}
 
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select set_data from data_set where set_name = 'edit_request_send' and doc_rev = ? and doc_name = ?"))
+		stmt, err = db.Prepare(tool.DB_change("select set_data from data_set where set_name = 'edit_request_send' and doc_rev = ? and doc_name = ?"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -84,7 +81,7 @@ func Api_list_recent_edit_request(call_arg []string) string {
 			}
 		}
 
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select set_data from data_set where set_name = 'edit_request_leng' and doc_rev = ? and doc_name = ?"))
+		stmt, err = db.Prepare(tool.DB_change("select set_data from data_set where set_name = 'edit_request_leng' and doc_rev = ? and doc_name = ?"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -103,10 +100,10 @@ func Api_list_recent_edit_request(call_arg []string) string {
 			doc_name,
 			doc_rev,
 			date,
-			tool.IP_preprocess(db, db_set, ip, other_set["ip"])[0],
+			tool.IP_preprocess(db, ip, other_set["ip"])[0],
 			send,
 			leng,
-			tool.IP_parser(db, db_set, ip, other_set["ip"]),
+			tool.IP_parser(db, ip, other_set["ip"]),
 		})
 	}
 

+ 4 - 7
route_go/route/api_list_title_index.go

@@ -8,13 +8,10 @@ import (
 )
 
 func Api_list_title_index(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	page_int, err := strconv.Atoi(other_set["num"])
@@ -28,7 +25,7 @@ func Api_list_title_index(call_arg []string) string {
 		page_int = 0
 	}
 
-	stmt, err := db.Prepare(tool.DB_change(db_set, "select title from data limit ?, 50"))
+	stmt, err := db.Prepare(tool.DB_change("select title from data limit ?, 50"))
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -63,4 +60,4 @@ func Api_list_title_index(call_arg []string) string {
 
 	json_data, _ := json.Marshal(return_data)
 	return string(json_data)
-}
+}

+ 4 - 7
route_go/route/api_search.go

@@ -9,11 +9,8 @@ import (
 )
 
 func Api_search(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
 	page, _ := strconv.Atoi(other_set["num"])
 	num := 0
@@ -21,11 +18,11 @@ func Api_search(call_arg []string) string {
 		num = page*50 - 50
 	}
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	if other_set["search_type"] == "title" {
-		stmt, err := db.Prepare(tool.DB_change(db_set, "select title from data where title collate nocase like ? order by title limit ?, 50"))
+		stmt, err := db.Prepare(tool.DB_change("select title from data where title collate nocase like ? order by title limit ?, 50"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -56,7 +53,7 @@ func Api_search(call_arg []string) string {
 			return string(json_data)
 		}
 	} else {
-		stmt, err := db.Prepare(tool.DB_change(db_set, "select title from data where data collate nocase like ? order by title limit ?, 50"))
+		stmt, err := db.Prepare(tool.DB_change("select title from data where data collate nocase like ? order by title limit ?, 50"))
 		if err != nil {
 			log.Fatal(err)
 		}

+ 5 - 8
route_go/route/api_setting.go

@@ -8,13 +8,10 @@ import (
 )
 
 func Api_setting(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	setting_acl := map[string]string{}
@@ -24,8 +21,8 @@ func Api_setting(call_arg []string) string {
 
 	if val, ok := setting_acl[other_set["set_name"]]; ok {
 		if val != "" {
-			auth_name := tool.Get_user_auth(db, db_set, other_set["ip"])
-			auth_info := tool.Get_auth_group_info(db, db_set, auth_name)
+			auth_name := tool.Get_user_auth(db, other_set["ip"])
+			auth_info := tool.Get_auth_group_info(db, auth_name)
 
 			if _, ok := auth_info["owner"]; !ok {
 				return_data := make(map[string]interface{})
@@ -36,7 +33,7 @@ func Api_setting(call_arg []string) string {
 			}
 		}
 
-		stmt, err := db.Prepare(tool.DB_change(db_set, "select data from other where name = ?"))
+		stmt, err := db.Prepare(tool.DB_change("select data from other where name = ?"))
 		if err != nil {
 			log.Fatal(err)
 		}

+ 6 - 9
route_go/route/api_setting_edit.go

@@ -7,20 +7,17 @@ import (
 )
 
 func Api_setting_edit(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
-	auth_name := tool.Get_user_auth(db, db_set, other_set["ip"])
-	auth_info := tool.Get_auth_group_info(db, db_set, auth_name)
+	auth_name := tool.Get_user_auth(db, other_set["ip"])
+	auth_info := tool.Get_auth_group_info(db, auth_name)
 
 	if _, ok := auth_info["owner"]; ok {
-		stmt, err := db.Prepare(tool.DB_change(db_set, "delete from other where name = ?"))
+		stmt, err := db.Prepare(tool.DB_change("delete from other where name = ?"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -31,7 +28,7 @@ func Api_setting_edit(call_arg []string) string {
 			log.Fatal(err)
 		}
 
-		stmt, err = db.Prepare(tool.DB_change(db_set, "insert into other (name, data, coverage) values (?, ?, '')"))
+		stmt, err = db.Prepare(tool.DB_change("insert into other (name, data, coverage) values (?, ?, '')"))
 		if err != nil {
 			log.Fatal(err)
 		}

+ 11 - 14
route_go/route/api_topic.go

@@ -9,17 +9,14 @@ import (
 )
 
 func Api_topic(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	if other_set["tool"] == "length" {
-		stmt, err := db.Prepare(tool.DB_change(db_set, "select id from topic where code = ? order by id + 0 desc limit 1"))
+		stmt, err := db.Prepare(tool.DB_change("select id from topic where code = ? order by id + 0 desc limit 1"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -44,7 +41,7 @@ func Api_topic(call_arg []string) string {
 		var rows *sql.Rows
 
 		if other_set["tool"] == "top" {
-			stmt, err := db.Prepare(tool.DB_change(db_set, "select id, data, date, ip, block, top from topic where code = ? and top = 'O' order by id + 0 asc"))
+			stmt, err := db.Prepare(tool.DB_change("select id, data, date, ip, block, top from topic where code = ? and top = 'O' order by id + 0 asc"))
 			if err != nil {
 				log.Fatal(err)
 			}
@@ -56,7 +53,7 @@ func Api_topic(call_arg []string) string {
 			}
 		} else {
 			if other_set["s_num"] != "" && other_set["e_num"] != "" {
-				stmt, err := db.Prepare(tool.DB_change(db_set, "select id, data, date, ip, block, top from topic where code = ? and ? + 0 <= id + 0 and id + 0 <= ? + 0 order by id + 0 asc"))
+				stmt, err := db.Prepare(tool.DB_change("select id, data, date, ip, block, top from topic where code = ? and ? + 0 <= id + 0 and id + 0 <= ? + 0 order by id + 0 asc"))
 				if err != nil {
 					log.Fatal(err)
 				}
@@ -67,7 +64,7 @@ func Api_topic(call_arg []string) string {
 					log.Fatal(err)
 				}
 			} else {
-				stmt, err := db.Prepare(tool.DB_change(db_set, "select id, data, date, ip, block, top from topic where code = ? order by id + 0 asc"))
+				stmt, err := db.Prepare(tool.DB_change("select id, data, date, ip, block, top from topic where code = ? order by id + 0 asc"))
 				if err != nil {
 					log.Fatal(err)
 				}
@@ -98,7 +95,7 @@ func Api_topic(call_arg []string) string {
 		new_data["data"] = []map[string]string{}
 		data_slice := []map[string]string{}
 
-		admin_auth := tool.Get_user_auth(db, db_set, other_set["ip"])
+		admin_auth := tool.Get_user_auth(db, other_set["ip"])
 
 		var ip_pre string
 		var ip_render string
@@ -113,8 +110,8 @@ func Api_topic(call_arg []string) string {
 				ip_pre = ip_parser_temp[data_list[for_a][3]][0]
 				ip_render = ip_parser_temp[data_list[for_a][3]][1]
 			} else {
-				ip_pre = tool.IP_preprocess(db, db_set, data_list[for_a][3], other_set["ip"])[0]
-				ip_render = tool.IP_parser(db, db_set, data_list[for_a][3], other_set["ip"])
+				ip_pre = tool.IP_preprocess(db, data_list[for_a][3], other_set["ip"])[0]
+				ip_render = tool.IP_parser(db, data_list[for_a][3], other_set["ip"])
 
 				ip_parser_temp[data_list[for_a][3]] = []string{ip_pre, ip_render}
 			}
@@ -131,8 +128,8 @@ func Api_topic(call_arg []string) string {
 
 		new_data["data"] = data_slice
 		new_data["language"] = map[string]string{
-			"tool":   tool.Get_language(db, db_set, "tool", false),
-			"render": tool.Get_language(db, db_set, "render", false),
+			"tool":   tool.Get_language(db, "tool", false),
+			"render": tool.Get_language(db, "render", false),
 		}
 
 		json_data, _ := json.Marshal(new_data)

+ 10 - 13
route_go/route/api_topic_list.go

@@ -9,13 +9,10 @@ import (
 )
 
 func Api_topic_list(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	page_int, err := strconv.Atoi(other_set["num"])
@@ -29,7 +26,7 @@ func Api_topic_list(call_arg []string) string {
 		page_int = 0
 	}
 
-	stmt, err := db.Prepare(tool.DB_change(db_set, "select code, sub, stop, agree, date from rd where title = ? order by sub asc limit ?, 50"))
+	stmt, err := db.Prepare(tool.DB_change("select code, sub, stop, agree, date from rd where title = ? order by sub asc limit ?, 50"))
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -56,7 +53,7 @@ func Api_topic_list(call_arg []string) string {
 			log.Fatal(err)
 		}
 
-		stmt, err := db.Prepare(tool.DB_change(db_set, "select ip, id from topic where code = ? order by id + 0 desc limit 1"))
+		stmt, err := db.Prepare(tool.DB_change("select ip, id from topic where code = ? order by id + 0 desc limit 1"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -81,8 +78,8 @@ func Api_topic_list(call_arg []string) string {
 			ip_pre = ip_parser_temp[ip][0]
 			ip_render = ip_parser_temp[ip][1]
 		} else {
-			ip_pre = tool.IP_preprocess(db, db_set, ip, other_set["ip"])[0]
-			ip_render = tool.IP_parser(db, db_set, ip, other_set["ip"])
+			ip_pre = tool.IP_preprocess(db, ip, other_set["ip"])[0]
+			ip_render = tool.IP_parser(db, ip, other_set["ip"])
 
 			ip_parser_temp[ip] = []string{ip_pre, ip_render}
 		}
@@ -101,10 +98,10 @@ func Api_topic_list(call_arg []string) string {
 
 	return_data := make(map[string]interface{})
 	return_data["language"] = map[string]string{
-		"closed":            tool.Get_language(db, db_set, "closed", false),
-		"agreed_discussion": tool.Get_language(db, db_set, "agreed_discussion", false),
-		"make_new_topic":    tool.Get_language(db, db_set, "make_new_topic", false),
-		"stop":              tool.Get_language(db, db_set, "stop", false),
+		"closed":            tool.Get_language(db, "closed", false),
+		"agreed_discussion": tool.Get_language(db, "agreed_discussion", false),
+		"make_new_topic":    tool.Get_language(db, "make_new_topic", false),
+		"stop":              tool.Get_language(db, "stop", false),
 	}
 
 	if len(data_list) == 0 {

+ 4 - 7
route_go/route/api_user_setting_editor.go

@@ -7,18 +7,15 @@ import (
 )
 
 func Api_user_setting_editor(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	ip := other_set["ip"]
 	if !tool.IP_or_user(ip) {
-		stmt, err := db.Prepare(tool.DB_change(db_set, "select data from user_set where id = ? and name = 'user_editor_top'"))
+		stmt, err := db.Prepare(tool.DB_change("select data from user_set where id = ? and name = 'user_editor_top'"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -58,7 +55,7 @@ func Api_user_setting_editor(call_arg []string) string {
 		return_data := make(map[string]interface{})
 		return_data["response"] = "require auth"
 		return_data["language"] = map[string]string{
-			"authority_error": tool.Get_language(db, db_set, "authority_error", false),
+			"authority_error": tool.Get_language(db, "authority_error", false),
 		}
 
 		json_data, _ := json.Marshal(return_data)

+ 5 - 8
route_go/route/api_user_setting_editor_delele.go

@@ -7,18 +7,15 @@ import (
 )
 
 func Api_user_setting_editor_delete(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	ip := other_set["ip"]
 	if !tool.IP_or_user(ip) {
-		stmt, err := db.Prepare(tool.DB_change(db_set, "delete from user_set where id = ? and name = 'user_editor_top' and data = ?"))
+		stmt, err := db.Prepare(tool.DB_change("delete from user_set where id = ? and name = 'user_editor_top' and data = ?"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -32,7 +29,7 @@ func Api_user_setting_editor_delete(call_arg []string) string {
 		return_data := make(map[string]interface{})
 		return_data["response"] = "ok"
 		return_data["language"] = map[string]string{
-			"delete": tool.Get_language(db, db_set, "delete", false),
+			"delete": tool.Get_language(db, "delete", false),
 		}
 
 		json_data, _ := json.Marshal(return_data)
@@ -41,7 +38,7 @@ func Api_user_setting_editor_delete(call_arg []string) string {
 		return_data := make(map[string]interface{})
 		return_data["response"] = "require auth"
 		return_data["language"] = map[string]string{
-			"authority_error": tool.Get_language(db, db_set, "authority_error", false),
+			"authority_error": tool.Get_language(db, "authority_error", false),
 		}
 
 		json_data, _ := json.Marshal(return_data)

+ 5 - 8
route_go/route/api_user_setting_editor_insert.go

@@ -7,19 +7,16 @@ import (
 )
 
 func Api_user_setting_editor_insert(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	ip := other_set["ip"]
 
 	if !tool.IP_or_user(ip) {
-		stmt, err := db.Prepare(tool.DB_change(db_set, "insert into user_set (id, name, data) values (?, 'user_editor_top', ?)"))
+		stmt, err := db.Prepare(tool.DB_change("insert into user_set (id, name, data) values (?, 'user_editor_top', ?)"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -33,7 +30,7 @@ func Api_user_setting_editor_insert(call_arg []string) string {
 		return_data := make(map[string]interface{})
 		return_data["response"] = "ok"
 		return_data["language"] = map[string]string{
-			"save": tool.Get_language(db, db_set, "save", false),
+			"save": tool.Get_language(db, "save", false),
 		}
 
 		json_data, _ := json.Marshal(return_data)
@@ -42,7 +39,7 @@ func Api_user_setting_editor_insert(call_arg []string) string {
 		return_data := make(map[string]interface{})
 		return_data["response"] = "require auth"
 		return_data["language"] = map[string]string{
-			"authority_error": tool.Get_language(db, db_set, "authority_error", false),
+			"authority_error": tool.Get_language(db, "authority_error", false),
 		}
 
 		json_data, _ := json.Marshal(return_data)

+ 7 - 10
route_go/route/api_user_watch_list.go

@@ -9,13 +9,10 @@ import (
 )
 
 func Api_user_watch_list(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	page, _ := strconv.Atoi(other_set["num"])
@@ -26,16 +23,16 @@ func Api_user_watch_list(call_arg []string) string {
 
 	ip := other_set["ip"]
 	name := other_set["name"]
-	if ip != name && tool.Get_user_auth(db, db_set, ip) == "" {
+	if ip != name && tool.Get_user_auth(db, ip) == "" {
 		return "{}"
 	}
 
 	var stmt *sql.Stmt
 	var err error
 	if other_set["do_type"] == "star_doc" {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select data from user_set where name = 'star_doc' and id = ? limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select data from user_set where name = 'star_doc' and id = ? limit ?, 50"))
 	} else {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select data from user_set where name = 'watchlist' and id = ? limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select data from user_set where name = 'watchlist' and id = ? limit ?, 50"))
 	}
 	if err != nil {
 		log.Fatal(err)
@@ -63,8 +60,8 @@ func Api_user_watch_list(call_arg []string) string {
 
 	return_data := make(map[string]interface{})
 	return_data["language"] = map[string]string{
-		"watchlist": tool.Get_language(db, db_set, "watchlist", false),
-		"star_doc":  tool.Get_language(db, db_set, "star_doc", false),
+		"watchlist": tool.Get_language(db, "watchlist", false),
+		"star_doc":  tool.Get_language(db, "star_doc", false),
 	}
 
 	if len(data_list) == 0 {

+ 2 - 5
route_go/route/api_w_random.go

@@ -9,15 +9,12 @@ import (
 )
 
 func Api_w_random(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	var title string
 
-	err := db.QueryRow(tool.DB_change(db_set, "select title from data where title not like 'user:%' and title not like 'category:%' and title not like 'file:%' order by random() limit 1")).Scan(&title)
+	err := db.QueryRow(tool.DB_change("select title from data where title not like 'user:%' and title not like 'category:%' and title not like 'file:%' order by random() limit 1")).Scan(&title)
 	if err != nil {
 		if err == sql.ErrNoRows {
 			title = ""

+ 5 - 8
route_go/route/api_w_raw.go

@@ -9,17 +9,14 @@ import (
 )
 
 func Api_w_raw(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	if other_set["exist_check"] != "" {
-		stmt, err := db.Prepare(tool.DB_change(db_set, "select title from data where title = ?"))
+		stmt, err := db.Prepare(tool.DB_change("select title from data where title = ?"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -45,7 +42,7 @@ func Api_w_raw(call_arg []string) string {
 		var data string
 
 		if other_set["rev"] != "" {
-			stmt, err := db.Prepare(tool.DB_change(db_set, "select data from history where title = ? and id = ?"))
+			stmt, err := db.Prepare(tool.DB_change("select data from history where title = ? and id = ?"))
 			if err != nil {
 				log.Fatal(err)
 			}
@@ -65,7 +62,7 @@ func Api_w_raw(call_arg []string) string {
 			json_data, _ := json.Marshal(new_data)
 			return string(json_data)
 		} else {
-			stmt, err := db.Prepare(tool.DB_change(db_set, "select data from data where title = ?"))
+			stmt, err := db.Prepare(tool.DB_change("select data from data where title = ?"))
 			if err != nil {
 				log.Fatal(err)
 			}

+ 3 - 6
route_go/route/api_w_render.go

@@ -6,16 +6,13 @@ import (
 )
 
 func Api_w_render(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
-	data := tool.Get_render(db, db_set, other_set["doc_name"], other_set["data"], other_set["render_type"])
+	data := tool.Get_render(db, other_set["doc_name"], other_set["data"], other_set["render_type"])
 
 	json_data, _ := json.Marshal(data)
 	return string(json_data)

+ 9 - 12
route_go/route/api_w_set_reset.go

@@ -7,22 +7,19 @@ import (
 )
 
 func Api_w_set_reset(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	doc_name := other_set["name"]
 	ip := other_set["ip"]
-	auth_name := tool.Get_user_auth(db, db_set, ip)
-	auth_info := tool.Get_auth_group_info(db, db_set, auth_name)
+	auth_name := tool.Get_user_auth(db, ip)
+	auth_info := tool.Get_auth_group_info(db, auth_name)
 
 	if auth_info["owner"] {
-		stmt, err := db.Prepare(tool.DB_change(db_set, "delete from acl where title = ?"))
+		stmt, err := db.Prepare(tool.DB_change("delete from acl where title = ?"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -33,7 +30,7 @@ func Api_w_set_reset(call_arg []string) string {
 			log.Fatal(err)
 		}
 
-		stmt, err = db.Prepare(tool.DB_change(db_set, "delete from data_set where doc_name = ? and set_name = 'acl_date'"))
+		stmt, err = db.Prepare(tool.DB_change("delete from data_set where doc_name = ? and set_name = 'acl_date'"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -51,7 +48,7 @@ func Api_w_set_reset(call_arg []string) string {
 		}
 
 		for for_a := 0; for_a < len(set_list); for_a++ {
-			stmt, err = db.Prepare(tool.DB_change(db_set, "delete from data_set where doc_name = ? and set_name = ?"))
+			stmt, err = db.Prepare(tool.DB_change("delete from data_set where doc_name = ? and set_name = ?"))
 			if err != nil {
 				log.Fatal(err)
 			}
@@ -66,7 +63,7 @@ func Api_w_set_reset(call_arg []string) string {
 		return_data := make(map[string]interface{})
 		return_data["response"] = "ok"
 		return_data["language"] = map[string]string{
-			"reset": tool.Get_language(db, db_set, "reset", false),
+			"reset": tool.Get_language(db, "reset", false),
 		}
 
 		json_data, _ := json.Marshal(return_data)
@@ -75,7 +72,7 @@ func Api_w_set_reset(call_arg []string) string {
 		return_data := make(map[string]interface{})
 		return_data["response"] = "require auth"
 		return_data["language"] = map[string]string{
-			"authority_error": tool.Get_language(db, db_set, "authority_error", false),
+			"authority_error": tool.Get_language(db, "authority_error", false),
 		}
 
 		json_data, _ := json.Marshal(return_data)

+ 9 - 12
route_go/route/api_w_watch_list.go

@@ -9,11 +9,8 @@ import (
 )
 
 func Api_w_watch_list(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
 	page, _ := strconv.Atoi(other_set["num"])
 	num := 0
@@ -21,19 +18,19 @@ func Api_w_watch_list(call_arg []string) string {
 		num = page*50 - 50
 	}
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
-	if tool.Get_user_auth(db, db_set, other_set["ip"]) == "" {
+	if tool.Get_user_auth(db, other_set["ip"]) == "" {
 		return "{}"
 	}
 
 	var stmt *sql.Stmt
 	var err error
 	if other_set["do_type"] == "star_doc" {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select id from user_set where name = 'star_doc' and data = ? limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select id from user_set where name = 'star_doc' and data = ? limit ?, 50"))
 	} else {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select id from user_set where name = 'watchlist' and data = ? limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select id from user_set where name = 'watchlist' and data = ? limit ?, 50"))
 	}
 	if err != nil {
 		log.Fatal(err)
@@ -64,8 +61,8 @@ func Api_w_watch_list(call_arg []string) string {
 			ip_pre = ip_parser_temp[user_name][0]
 			ip_render = ip_parser_temp[user_name][1]
 		} else {
-			ip_pre = tool.IP_preprocess(db, db_set, user_name, other_set["ip"])[0]
-			ip_render = tool.IP_parser(db, db_set, user_name, other_set["ip"])
+			ip_pre = tool.IP_preprocess(db, user_name, other_set["ip"])[0]
+			ip_render = tool.IP_parser(db, user_name, other_set["ip"])
 
 			ip_parser_temp[user_name] = []string{ip_pre, ip_render}
 		}
@@ -75,8 +72,8 @@ func Api_w_watch_list(call_arg []string) string {
 
 	return_data := make(map[string]interface{})
 	return_data["language"] = map[string]string{
-		"watchlist": tool.Get_language(db, db_set, "watchlist", false),
-		"star_doc":  tool.Get_language(db, db_set, "star_doc", false),
+		"watchlist": tool.Get_language(db, "watchlist", false),
+		"star_doc":  tool.Get_language(db, "star_doc", false),
 	}
 
 	if len(data_list) == 0 {

+ 5 - 8
route_go/route/api_w_xref.go

@@ -9,13 +9,10 @@ import (
 )
 
 func Api_w_xref(call_arg []string) string {
-	db_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[0]), &db_set)
-
 	other_set := map[string]string{}
-	json.Unmarshal([]byte(call_arg[1]), &other_set)
+	json.Unmarshal([]byte(call_arg[0]), &other_set)
 
-	db := tool.DB_connect(db_set)
+	db := tool.DB_connect()
 	defer db.Close()
 
 	page, _ := strconv.Atoi(other_set["page"])
@@ -26,7 +23,7 @@ func Api_w_xref(call_arg []string) string {
 
 	var link_case_insensitive string
 
-	err := db.QueryRow(tool.DB_change(db_set, "select data from other where name = 'link_case_insensitive'")).Scan(&link_case_insensitive)
+	err := db.QueryRow(tool.DB_change("select data from other where name = 'link_case_insensitive'")).Scan(&link_case_insensitive)
 	if err != nil {
 		if err == sql.ErrNoRows {
 			link_case_insensitive = ""
@@ -41,9 +38,9 @@ func Api_w_xref(call_arg []string) string {
 
 	var stmt *sql.Stmt
 	if other_set["do_type"] == "1" {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select distinct link, type from back where title"+link_case_insensitive+" = ? and not type = 'no' and not type = 'nothing' order by type asc, link asc limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select distinct link, type from back where title" + link_case_insensitive + " = ? and not type = 'no' and not type = 'nothing' order by type asc, link asc limit ?, 50"))
 	} else {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select distinct title, type from back where link"+link_case_insensitive+" = ? and not type = 'no' and not type = 'nothing' order by type asc, title asc limit ?, 50"))
+		stmt, err = db.Prepare(tool.DB_change("select distinct title, type from back where link" + link_case_insensitive + " = ? and not type = 'no' and not type = 'nothing' order by type asc, title asc limit ?, 50"))
 	}
 
 	if err != nil {

+ 44 - 3
route_go/route/tool/db_connect.go

@@ -2,6 +2,7 @@ package tool
 
 import (
 	"database/sql"
+	"encoding/json"
 	"log"
 	"strings"
 
@@ -9,7 +10,33 @@ import (
 	_ "modernc.org/sqlite"
 )
 
-func DB_connect(db_set map[string]string) *sql.DB {
+func Temp_DB_connect() *sql.DB {
+	db, err := sql.Open("sqlite", "./data/temp.db")
+	if err != nil {
+		log.Fatal(err)
+	}
+
+	return db
+}
+
+func DB_connect() *sql.DB {
+	m_db := Temp_DB_connect()
+	defer m_db.Close()
+
+	var db_set_str string
+
+	err := m_db.QueryRow("select data from temp where name = 'db_set'").Scan(&db_set_str)
+	if err != nil {
+		if err == sql.ErrNoRows {
+			db_set_str = "{}"
+		} else {
+			log.Fatal(err)
+		}
+	}
+
+	db_set := map[string]string{}
+	json.Unmarshal([]byte(db_set_str), &db_set)
+
 	if db_set["type"] == "sqlite" {
 		db, err := sql.Open("sqlite", db_set["name"]+".db")
 		if err != nil {
@@ -27,8 +54,22 @@ func DB_connect(db_set map[string]string) *sql.DB {
 	}
 }
 
-func DB_change(db_set map[string]string, data string) string {
-	if db_set["type"] == "mysql" {
+func DB_change(data string) string {
+	m_db := Temp_DB_connect()
+	defer m_db.Close()
+
+	var db_set_type string
+
+	err := m_db.QueryRow("select data from temp where name = 'db_set_type'").Scan(&db_set_type)
+	if err != nil {
+		if err == sql.ErrNoRows {
+			db_set_type = "sqlite"
+		} else {
+			log.Fatal(err)
+		}
+	}
+
+	if db_set_type == "mysql" {
 		data = strings.Replace(data, "random()", "rand()", -1)
 		data = strings.Replace(data, "collate nocase", "collate utf8mb4_general_ci", -1)
 	}

+ 56 - 56
route_go/route/tool/ip_parser.go

@@ -20,12 +20,12 @@ func IP_or_user(ip string) bool {
 	}
 }
 
-func Get_level(db *sql.DB, db_set map[string]string, ip string) []string {
+func Get_level(db *sql.DB, ip string) []string {
 	var level string
 	var exp string
 	var max_exp string
 
-	stmt, err := db.Prepare(DB_change(db_set, "select data from user_set where id = ? and name = 'level'"))
+	stmt, err := db.Prepare(DB_change("select data from user_set where id = ? and name = 'level'"))
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -40,7 +40,7 @@ func Get_level(db *sql.DB, db_set map[string]string, ip string) []string {
 		}
 	}
 
-	stmt, err = db.Prepare(DB_change(db_set, "select data from user_set where id = ? and name = 'experience'"))
+	stmt, err = db.Prepare(DB_change("select data from user_set where id = ? and name = 'experience'"))
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -61,11 +61,11 @@ func Get_level(db *sql.DB, db_set map[string]string, ip string) []string {
 	return []string{level, exp, max_exp}
 }
 
-func Get_user_auth(db *sql.DB, db_set map[string]string, ip string) string {
+func Get_user_auth(db *sql.DB, ip string) string {
 	if !IP_or_user(ip) {
 		var auth string
 
-		stmt, err := db.Prepare(DB_change(db_set, "select data from user_set where id = ? and name = 'acl'"))
+		stmt, err := db.Prepare(DB_change("select data from user_set where id = ? and name = 'acl'"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -90,8 +90,8 @@ func Get_user_auth(db *sql.DB, db_set map[string]string, ip string) string {
 	return ""
 }
 
-func Get_auth_group_info(db *sql.DB, db_set map[string]string, auth string) map[string]bool {
-	stmt, err := db.Prepare(DB_change(db_set, "select name from alist where name = ?"))
+func Get_auth_group_info(db *sql.DB, auth string) map[string]bool {
+	stmt, err := db.Prepare(DB_change("select name from alist where name = ?"))
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -119,7 +119,7 @@ func Get_auth_group_info(db *sql.DB, db_set map[string]string, auth string) map[
 	return data_list
 }
 
-func IP_preprocess(db *sql.DB, db_set map[string]string, ip string, my_ip string) []string {
+func IP_preprocess(db *sql.DB, ip string, my_ip string) []string {
 	var ip_view string
 	var user_name_view string
 
@@ -128,7 +128,7 @@ func IP_preprocess(db *sql.DB, db_set map[string]string, ip string, my_ip string
 		return []string{ip, ""}
 	}
 
-	err := db.QueryRow(DB_change(db_set, "select data from other where name = 'ip_view'")).Scan(&ip_view)
+	err := db.QueryRow(DB_change("select data from other where name = 'ip_view'")).Scan(&ip_view)
 	if err != nil {
 		if err == sql.ErrNoRows {
 			ip_view = ""
@@ -137,7 +137,7 @@ func IP_preprocess(db *sql.DB, db_set map[string]string, ip string, my_ip string
 		}
 	}
 
-	err = db.QueryRow(DB_change(db_set, "select data from other where name = 'user_name_view'")).Scan(&user_name_view)
+	err = db.QueryRow(DB_change("select data from other where name = 'user_name_view'")).Scan(&user_name_view)
 	if err != nil {
 		if err == sql.ErrNoRows {
 			user_name_view = ""
@@ -146,7 +146,7 @@ func IP_preprocess(db *sql.DB, db_set map[string]string, ip string, my_ip string
 		}
 	}
 
-	if Get_user_auth(db, db_set, my_ip) != "" {
+	if Get_user_auth(db, my_ip) != "" {
 		ip_view = ""
 		user_name_view = ""
 	}
@@ -162,7 +162,7 @@ func IP_preprocess(db *sql.DB, db_set map[string]string, ip string, my_ip string
 		if user_name_view != "" {
 			var sub_user_name string
 
-			stmt, err := db.Prepare(DB_change(db_set, "select data from user_set where id = ? and name = 'sub_user_name'"))
+			stmt, err := db.Prepare(DB_change("select data from user_set where id = ? and name = 'sub_user_name'"))
 			if err != nil {
 				log.Fatal(err)
 			}
@@ -171,14 +171,14 @@ func IP_preprocess(db *sql.DB, db_set map[string]string, ip string, my_ip string
 			err = stmt.QueryRow(ip).Scan(&sub_user_name)
 			if err != nil {
 				if err == sql.ErrNoRows {
-					sub_user_name = Get_language(db, db_set, "member", false)
+					sub_user_name = Get_language(db, "member", false)
 				} else {
 					log.Fatal(err)
 				}
 			}
 
 			if sub_user_name == "" {
-				sub_user_name = Get_language(db, db_set, "member", false)
+				sub_user_name = Get_language(db, "member", false)
 			}
 
 			ip = sub_user_name
@@ -186,7 +186,7 @@ func IP_preprocess(db *sql.DB, db_set map[string]string, ip string, my_ip string
 		} else {
 			var user_name string
 
-			stmt, err := db.Prepare(DB_change(db_set, "select data from user_set where name = 'user_name' and id = ?"))
+			stmt, err := db.Prepare(DB_change("select data from user_set where name = 'user_name' and id = ?"))
 			if err != nil {
 				log.Fatal(err)
 			}
@@ -212,11 +212,11 @@ func IP_preprocess(db *sql.DB, db_set map[string]string, ip string, my_ip string
 	return []string{ip, ip_change}
 }
 
-func IP_menu(db *sql.DB, db_set map[string]string, ip string, my_ip string, option string) map[string][][]string {
+func IP_menu(db *sql.DB, ip string, my_ip string, option string) map[string][][]string {
 	menu := map[string][][]string{}
 
 	if ip == my_ip && option == "" {
-		stmt, err := db.Prepare(DB_change(db_set, "select count(*) from user_notice where name = ? and readme = ''"))
+		stmt, err := db.Prepare(DB_change("select count(*) from user_notice where name = ? and readme = ''"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -234,44 +234,44 @@ func IP_menu(db *sql.DB, db_set map[string]string, ip string, my_ip string, opti
 		}
 
 		if IP_or_user(my_ip) {
-			menu[Get_language(db, db_set, "login", false)] = [][]string{
-				{"/login", Get_language(db, db_set, "login", false)},
-				{"/register", Get_language(db, db_set, "register", false)},
-				{"/change", Get_language(db, db_set, "user_setting", false)},
-				{"/login/find", Get_language(db, db_set, "password_search", false)},
-				{"/alarm" + Url_parser(my_ip), Get_language(db, db_set, "alarm", false) + " (" + alarm_count + ")"},
+			menu[Get_language(db, "login", false)] = [][]string{
+				{"/login", Get_language(db, "login", false)},
+				{"/register", Get_language(db, "register", false)},
+				{"/change", Get_language(db, "user_setting", false)},
+				{"/login/find", Get_language(db, "password_search", false)},
+				{"/alarm" + Url_parser(my_ip), Get_language(db, "alarm", false) + " (" + alarm_count + ")"},
 			}
 		} else {
-			menu[Get_language(db, db_set, "login", false)] = [][]string{
-				{"/logout", Get_language(db, db_set, "logout", false)},
-				{"/change", Get_language(db, db_set, "user_setting", false)},
+			menu[Get_language(db, "login", false)] = [][]string{
+				{"/logout", Get_language(db, "logout", false)},
+				{"/change", Get_language(db, "user_setting", false)},
 			}
 
-			menu[Get_language(db, db_set, "tool", false)] = [][]string{
-				{"/watch_list", Get_language(db, db_set, "watchlist", false)},
-				{"/star_doc", Get_language(db, db_set, "star_doc", false)},
-				{"/challenge", Get_language(db, db_set, "challenge_and_level_manage", false)},
-				{"/acl/user:" + Url_parser(my_ip), Get_language(db, db_set, "user_document_acl", false)},
-				{"/alarm" + Url_parser(my_ip), Get_language(db, db_set, "alarm", false) + " (" + alarm_count + ")"},
+			menu[Get_language(db, "tool", false)] = [][]string{
+				{"/watch_list", Get_language(db, "watchlist", false)},
+				{"/star_doc", Get_language(db, "star_doc", false)},
+				{"/challenge", Get_language(db, "challenge_and_level_manage", false)},
+				{"/acl/user:" + Url_parser(my_ip), Get_language(db, "user_document_acl", false)},
+				{"/alarm" + Url_parser(my_ip), Get_language(db, "alarm", false) + " (" + alarm_count + ")"},
 			}
 		}
 	}
 
-	auth_name := Get_user_auth(db, db_set, my_ip)
+	auth_name := Get_user_auth(db, my_ip)
 	if auth_name != "" {
-		menu[Get_language(db, db_set, "admin", false)] = [][]string{
-			{"/auth/give/ban/" + Url_parser(ip), Get_language(db, db_set, "ban", false)},
-			{"/list/user/check_submit/" + Url_parser(ip), Get_language(db, db_set, "check", false)},
+		menu[Get_language(db, "admin", false)] = [][]string{
+			{"/auth/give/ban/" + Url_parser(ip), Get_language(db, "ban", false)},
+			{"/list/user/check_submit/" + Url_parser(ip), Get_language(db, "check", false)},
 		}
 	}
 
-	menu[Get_language(db, db_set, "other", false)] = [][]string{
-		{"/record/" + Url_parser(ip), Get_language(db, db_set, "edit_record", false)},
-		{"/record/topic/" + Url_parser(ip), Get_language(db, db_set, "discussion_record", false)},
-		{"/record/bbs/" + Url_parser(ip), Get_language(db, db_set, "bbs_record", false)},
-		{"/record/bbs_comment/" + Url_parser(ip), Get_language(db, db_set, "bbs_comment_record", false)},
-		{"/topic/user:" + Url_parser(ip), Get_language(db, db_set, "user_discussion", false)},
-		{"/count/" + Url_parser(ip), Get_language(db, db_set, "count", false)},
+	menu[Get_language(db, "other", false)] = [][]string{
+		{"/record/" + Url_parser(ip), Get_language(db, "edit_record", false)},
+		{"/record/topic/" + Url_parser(ip), Get_language(db, "discussion_record", false)},
+		{"/record/bbs/" + Url_parser(ip), Get_language(db, "bbs_record", false)},
+		{"/record/bbs_comment/" + Url_parser(ip), Get_language(db, "bbs_comment_record", false)},
+		{"/topic/user:" + Url_parser(ip), Get_language(db, "user_discussion", false)},
+		{"/count/" + Url_parser(ip), Get_language(db, "count", false)},
 	}
 
 	return menu
@@ -287,12 +287,12 @@ func Get_user_ban_type(ban_type string) string {
 	}
 }
 
-func Get_user_ban(db *sql.DB, db_set map[string]string, ip string, tool string) []string {
-	if Get_user_auth(db, db_set, ip) != "" {
+func Get_user_ban(db *sql.DB, ip string, tool string) []string {
+	if Get_user_auth(db, ip) != "" {
 		return []string{"", ""}
 	}
 
-	rows, err := db.Query(DB_change(db_set, "select login, block from rb where band = 'regex' and ongoing = '1'"))
+	rows, err := db.Query(DB_change("select login, block from rb where band = 'regex' and ongoing = '1'"))
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -326,7 +326,7 @@ func Get_user_ban(db *sql.DB, db_set map[string]string, ip string, tool string)
 	}
 
 	if IP_or_user(ip) {
-		rows, err = db.Query(DB_change(db_set, "select login, block from rb where band = 'cidr' and ongoing = '1'"))
+		rows, err = db.Query(DB_change("select login, block from rb where band = 'cidr' and ongoing = '1'"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -360,7 +360,7 @@ func Get_user_ban(db *sql.DB, db_set map[string]string, ip string, tool string)
 		}
 	}
 
-	stmt, err := db.Prepare(DB_change(db_set, "select login from rb where block = ? and band = '' and ongoing = '1'"))
+	stmt, err := db.Prepare(DB_change("select login from rb where block = ? and band = '' and ongoing = '1'"))
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -391,7 +391,7 @@ func Get_user_ban(db *sql.DB, db_set map[string]string, ip string, tool string)
 		}
 	}
 
-	stmt, err = db.Prepare(DB_change(db_set, "select data from user_set where id = ? and name = 'acl'"))
+	stmt, err = db.Prepare(DB_change("select data from user_set where id = ? and name = 'acl'"))
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -415,8 +415,8 @@ func Get_user_ban(db *sql.DB, db_set map[string]string, ip string, tool string)
 	return []string{"", ""}
 }
 
-func IP_parser(db *sql.DB, db_set map[string]string, ip string, my_ip string) string {
-	ip_pre_data := IP_preprocess(db, db_set, ip, my_ip)
+func IP_parser(db *sql.DB, ip string, my_ip string) string {
+	ip_pre_data := IP_preprocess(db, ip, my_ip)
 	if ip_pre_data[0] == "" {
 		return ""
 	}
@@ -431,7 +431,7 @@ func IP_parser(db *sql.DB, db_set map[string]string, ip string, my_ip string) st
 			var user_name_level string
 			var user_title string
 
-			err := db.QueryRow(DB_change(db_set, "select data from other where name = 'user_name_level'")).Scan(&user_name_level)
+			err := db.QueryRow(DB_change("select data from other where name = 'user_name_level'")).Scan(&user_name_level)
 			if err != nil {
 				if err == sql.ErrNoRows {
 					user_name_level = ""
@@ -441,13 +441,13 @@ func IP_parser(db *sql.DB, db_set map[string]string, ip string, my_ip string) st
 			}
 
 			if user_name_level != "" {
-				level_data := Get_level(db, db_set, raw_ip)
+				level_data := Get_level(db, raw_ip)
 				ip += "<sup>" + level_data[0] + "</sup>"
 			}
 
 			ip = "<a href=\"/w/" + Url_parser("user:"+raw_ip) + "\">" + ip + "</a>"
 
-			stmt, err := db.Prepare(DB_change(db_set, "select data from user_set where name = 'user_title' and id = ?"))
+			stmt, err := db.Prepare(DB_change("select data from user_set where name = 'user_title' and id = ?"))
 			if err != nil {
 				log.Fatal(err)
 			}
@@ -462,14 +462,14 @@ func IP_parser(db *sql.DB, db_set map[string]string, ip string, my_ip string) st
 				}
 			}
 
-			if Get_user_auth(db, db_set, raw_ip) != "" {
+			if Get_user_auth(db, raw_ip) != "" {
 				ip = "<b>" + ip + "</b>"
 			}
 
 			ip = user_title + ip
 		}
 
-		ban := Get_user_ban(db, db_set, raw_ip, "")
+		ban := Get_user_ban(db, raw_ip, "")
 		if ban[0] == "true" {
 			ip = "<sup>" + ban[1] + "</sup><s>" + ip + "</s>"
 		}

+ 2 - 2
route_go/route/tool/language.go

@@ -7,10 +7,10 @@ import (
 	"os"
 )
 
-func Get_language(db *sql.DB, db_set map[string]string, data string, safe bool) string {
+func Get_language(db *sql.DB, data string, safe bool) string {
 	var language string
 
-	err := db.QueryRow(DB_change(db_set, "select data from other where name = 'language'")).Scan(&language)
+	err := db.QueryRow(DB_change("select data from other where name = 'language'")).Scan(&language)
 	if err != nil {
 		if err == sql.ErrNoRows {
 			language = "ko-KR"

+ 2 - 2
route_go/route/tool/markdown.go

@@ -14,7 +14,7 @@ import (
 	"github.com/yuin/goldmark/renderer/html"
 )
 
-func Markdown(db *sql.DB, db_set map[string]string, data map[string]string) map[string]interface{} {
+func Markdown(db *sql.DB, data map[string]string) map[string]interface{} {
 	backlink := map[string]map[string]string{}
 	link_count := 0
 
@@ -112,7 +112,7 @@ func Markdown(db *sql.DB, db_set map[string]string, data map[string]string) map[
 
 			var exist string
 
-			stmt, err := db.Prepare(DB_change(db_set, "select title from data where title = ?"))
+			stmt, err := db.Prepare(DB_change("select title from data where title = ?"))
 			if err != nil {
 				log.Fatal(err)
 			}

+ 3 - 5
route_go/route/tool/namumark.go

@@ -12,9 +12,8 @@ import (
 )
 
 type namumark struct {
-	db     *sql.DB
-	db_set map[string]string
-	data   map[string]string
+	db   *sql.DB
+	data map[string]string
 
 	render_data    string
 	render_data_js string
@@ -27,7 +26,7 @@ type namumark struct {
 	link_count int
 }
 
-func Namumark_new(db *sql.DB, db_set map[string]string, data map[string]string) *namumark {
+func Namumark_new(db *sql.DB, data map[string]string) *namumark {
 	data_string := data["data"]
 	data_string = html.EscapeString(data_string)
 	data_string = strings.Replace(data_string, "\r", "", -1)
@@ -35,7 +34,6 @@ func Namumark_new(db *sql.DB, db_set map[string]string, data map[string]string)
 
 	return &namumark{
 		db,
-		db_set,
 		data,
 
 		data_string,

+ 14 - 14
route_go/route/tool/render.go

@@ -7,11 +7,11 @@ import (
 	"time"
 )
 
-func Get_render(db *sql.DB, db_set map[string]string, doc_name string, data string, render_type string) map[string]string {
+func Get_render(db *sql.DB, doc_name string, data string, render_type string) map[string]string {
 	var markup string
 
 	if render_type == "api_view" || render_type == "api_from" || render_type == "api_include" || render_type == "backlink" {
-		stmt, err := db.Prepare(DB_change(db_set, "select set_data from data_set where doc_name = ? and set_name = 'document_markup'"))
+		stmt, err := db.Prepare(DB_change("select set_data from data_set where doc_name = ? and set_name = 'document_markup'"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -28,7 +28,7 @@ func Get_render(db *sql.DB, db_set map[string]string, doc_name string, data stri
 	}
 
 	if markup == "" {
-		err := db.QueryRow(DB_change(db_set, "select data from other where name = 'markup'")).Scan(&markup)
+		err := db.QueryRow(DB_change("select data from other where name = 'markup'")).Scan(&markup)
 		if err != nil {
 			if err == sql.ErrNoRows {
 				markup = ""
@@ -45,12 +45,12 @@ func Get_render(db *sql.DB, db_set map[string]string, doc_name string, data stri
 	now_time := time.Now().UnixNano()
 	render_name := strconv.Itoa(int(now_time))
 
-	render_data := Get_render_direct(db, db_set, doc_name, data, markup, render_name, render_type)
+	render_data := Get_render_direct(db, doc_name, data, markup, render_name, render_type)
 
 	return render_data
 }
 
-func Get_render_direct(db *sql.DB, db_set map[string]string, doc_name string, data string, markup string, render_name string, render_type string) map[string]string {
+func Get_render_direct(db *sql.DB, doc_name string, data string, markup string, render_name string, render_type string) map[string]string {
 	from := ""
 	include := ""
 	backlink := ""
@@ -77,10 +77,10 @@ func Get_render_direct(db *sql.DB, db_set map[string]string, doc_name string, da
 
 	render_data := make(map[string]interface{})
 	if markup == "namumark" {
-		render_data_class := Namumark_new(db, db_set, doc_data_set)
+		render_data_class := Namumark_new(db, doc_data_set)
 		render_data = render_data_class.main()
 	} else if markup == "markdown" {
-		render_data = Markdown(db, db_set, doc_data_set)
+		render_data = Markdown(db, doc_data_set)
 	} else {
 		render_data["data"] = data
 		render_data["js_data"] = ""
@@ -88,7 +88,7 @@ func Get_render_direct(db *sql.DB, db_set map[string]string, doc_name string, da
 	}
 
 	if backlink == "1" {
-		stmt, err := db.Prepare(DB_change(db_set, "delete from back where link = ?"))
+		stmt, err := db.Prepare(DB_change("delete from back where link = ?"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -99,7 +99,7 @@ func Get_render_direct(db *sql.DB, db_set map[string]string, doc_name string, da
 			log.Fatal(err)
 		}
 
-		stmt, err = db.Prepare(DB_change(db_set, "delete from back where title = ? and type = 'no'"))
+		stmt, err = db.Prepare(DB_change("delete from back where title = ? and type = 'no'"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -110,7 +110,7 @@ func Get_render_direct(db *sql.DB, db_set map[string]string, doc_name string, da
 			log.Fatal(err)
 		}
 
-		stmt, err = db.Prepare(DB_change(db_set, "delete from data_set where doc_name = ? and set_name = 'link_count'"))
+		stmt, err = db.Prepare(DB_change("delete from data_set where doc_name = ? and set_name = 'link_count'"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -121,7 +121,7 @@ func Get_render_direct(db *sql.DB, db_set map[string]string, doc_name string, da
 			log.Fatal(err)
 		}
 
-		stmt, err = db.Prepare(DB_change(db_set, "delete from data_set where doc_name = ? and set_name = 'doc_type'"))
+		stmt, err = db.Prepare(DB_change("delete from data_set where doc_name = ? and set_name = 'doc_type'"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -134,7 +134,7 @@ func Get_render_direct(db *sql.DB, db_set map[string]string, doc_name string, da
 
 		end_backlink := render_data["backlink"].([][]string)
 		for for_a := 0; for_a < len(end_backlink); for_a++ {
-			stmt, err := db.Prepare(DB_change(db_set, "insert into back (link, title, type, data) values (?, ?, ?, ?)"))
+			stmt, err := db.Prepare(DB_change("insert into back (link, title, type, data) values (?, ?, ?, ?)"))
 			if err != nil {
 				log.Fatal(err)
 			}
@@ -146,7 +146,7 @@ func Get_render_direct(db *sql.DB, db_set map[string]string, doc_name string, da
 			}
 		}
 
-		stmt, err = db.Prepare(DB_change(db_set, "insert into data_set (doc_name, doc_rev, set_name, set_data) values (?, '', 'link_count', ?)"))
+		stmt, err = db.Prepare(DB_change("insert into data_set (doc_name, doc_rev, set_name, set_data) values (?, '', 'link_count', ?)"))
 		if err != nil {
 			log.Fatal(err)
 		}
@@ -157,7 +157,7 @@ func Get_render_direct(db *sql.DB, db_set map[string]string, doc_name string, da
 			log.Fatal(err)
 		}
 
-		stmt, err = db.Prepare(DB_change(db_set, "insert into data_set (doc_name, doc_rev, set_name, set_data) values (?, '', 'doc_type', ?)"))
+		stmt, err = db.Prepare(DB_change("insert into data_set (doc_name, doc_rev, set_name, set_data) values (?, '', 'doc_type', ?)"))
 		if err != nil {
 			log.Fatal(err)
 		}

+ 1 - 1
version.json

@@ -1,6 +1,6 @@
 {
     "beta" : {
-        "r_ver" : "v3.5.0-v131",
+        "r_ver" : "v3.5.0-v132",
         "c_ver" : "20240513",
         "s_ver" : "20240426"
     }