from .tool.func import * async def list_title_index(num = 1): with get_db_connect() as conn: curs = conn.cursor() sql_num = (num * 50 - 50) if num * 50 > 0 else 0 all_list = sql_num + 1 data = '' curs.execute(db_change("select title from data order by title asc limit ?, 50"), [sql_num]) title_list = curs.fetchall() if title_list: data += '
' + await get_next_page_bottom('/list/document/all/{}', num, title_list) sub = ' (' + str(num) + ')' return await render_template( await get_lang('all_document_list'), data, sub, [['other', await get_lang('return')]] )