~dont_cache()
~includeonce('../config.tmpl')
~include('../board/config.tmpl',~get('board_section[admin]'))
~set('title','Administration du W-Fenec')
~include('../site/admin.header.tmpl','Visite l~apos()Admin')
~include('filter.tmpl')
~lines(~readfile('template/wacc/htaccess'), 1, ,
'LM', '#~lines_fld('counter') :
~setl('old_path', ~preg('#Redirect permanent /(.*)\s+https?://www.w-fenec.org/(.*)/(.*).html$#',~lines_fld('line'), 1))
~setl('topic', ~preg('#Redirect permanent /(.*)\s+https?://www.w-fenec.org/(.*)/(.*).html$#',~lines_fld('line'), 3))
~list(~get('database'),
"SELECT id FROM topics where topic LIKE '~addslashes(~getl('topic'))'",
'LM', 'Found a topic!~fld('id')
~list(~get('database'),
"INSERT INTO topics_redirect(path, topic_id) VALUES('~addslashes(~getl('old_path'))', ~fld('id'))"
)
',
'LD', '~getl('topic') not found :('
)
'
)
~include("../site/admin.footer.tmpl")