| 1234567891011121314151617181920212223 |
- from .tool.func import *
- async def main_sys_shutdown():
- with get_db_connect() as conn:
- if await acl_check('', 'owner_auth', '', '') == 1:
- return await re_error(conn, 3)
- if flask.request.method == 'POST':
- await acl_check(tool = 'owner_auth', memo = 'shutdown')
- print('Shutdown')
- sys.exit()
- else:
- return easy_minify(conn, flask.render_template(skin_check(conn),
- imp = [get_lang(conn, 'wiki_shutdown'), await wiki_set(), await wiki_custom(conn), wiki_css([0, 0])],
- data = '''
- <form method="post">
- <button type="submit">''' + get_lang(conn, 'shutdown') + '''</button>
- </form>
- ''',
- menu = [['manager', get_lang(conn, 'return')]]
- ))
|