~dont_cache() ~includeonce('../config.tmpl') ~includeonce('../site/utils.tmpl') ~list(~get('database'), "SELECT topics.title FROM topics WHERE topics.topic='~addslashes(~get_filenamevar(0))' LIMIT 1" ,'LM' ,~set('topic_title',~fld('title')) ,'LD',~list(~get('database'), "SELECT topics.id, topics.topic FROM topics WHERE topics.topic='~addslashes(~display_clean_url(~get_filenamevar(0),'topic'))' OR topics.topic='~addslashes(~str_replace('_','-',~get_filenamevar(0)))' LIMIT 1", 'LM',~redirect('~get_site_url()infos/topics/~fld('topic').html', 301) ,'LD', ~http_error(404) ) ) ~noeval(~set('head_meta', '')) ~set('title','Dépeches de la rubrique ~get('topic_title')') ~add_rss('~absolute_templeet()infos/topics/~get_filenamevar(0).rss','Dépêches pour ~get('topic_title')') ~include('../site/header.tmpl')
~include('../box/submit.tmpl') ~include('../site/sidebox.tmpl')
~list(~get('database'), "SELECT count(DISTINCT news.id) as count FROM news,tags,tags_ressources WHERE news.state=~get('state_ok') AND news.timestamp <= CURRENT_TIMESTAMP() AND tags.tag='~addslashes(~get('topic_title'))' AND tags_ressources.tag_id=tags.id AND tags_ressources.res_type=~integer(~get('res_type_news')) AND tags_ressources.res_id=news.id ",'LM', ~set('num',~fld('count'))) ~include('../site/next_page.tmpl',~get_filenamevar(1),~get('num'),20) ~list(~get('database'), "SELECT news.id, news.body, news.topic_id, news.title, news.timestamp FROM news, tags, tags_ressources WHERE news.state=~get('state_ok') AND news.timestamp <= CURRENT_TIMESTAMP() AND tags.tag='~addslashes(~get('topic_title'))' AND tags_ressources.tag_id=tags.id AND tags_ressources.res_type=~integer(~get('res_type_news')) AND tags_ressources.res_id=news.id GROUP BY news.id ORDER BY news.timestamp DESC LIMIT 20 OFFSET ~get('indice')", 'LF','
', 'LL','
', 'LM',~includewithcache('news2nd.txt', ~fld('id')), 'LD',~http_error(404) ) ~include('../site/next_page.tmpl',~get_filenamevar(1),~get('num'),20)
~include('../site/footer.tmpl')