~dont_cache()
~includeonce('../config.tmpl')
~includeonce('../lib/ressources.tmpl')
~includeonce('../lib/ressources_ressources.tmpl')
~includeonce('../admin/filter.tmpl')
~includeonce('../lib/admin.tmpl')
~include('../updateuser.tmpl')
~add_javascript('~relative_base()js/form.js')
~if(! (~get('is_admin')||~get('is_moderator')),~http_error(404))
~map_filenamevar('res_table', 'fill_form')
~if(~integer(~get('res_table'))>0, {
~get_res_info(~get('res_table'),'res'),
~redirect('~get_site_url()admin/res_lookup,~get('res[table]').html')
})
~set('res_type',~res_table_to_res_type(~get('res_table')))
~get_res_info(~get('res_type'),'res')
~set('res_name',~get('res[name]'))
~if( ~file_exists('~getconf('templatedir')lib/~get('res_table').tmpl'),
~includeonce('../lib/~get('res_table').tmpl')
)
~set('title','Recherche ~get('res_name')')
~include('../site/simple.header.tmpl')
Recherche ~get('res_name') :
~if(~getpost('text'),
~list(~get('database'),
"SELECT ~get('res_table').id,
~get('res_table').title
FROM ~get('res_table')
WHERE ~get('res_table').title LIKE '%~simple_fi('text')%'
ORDER BY ~get('res_table').title",
'LM',
"~fld('title')
[
Editer]
~if( !~empty(~get('fill_form')),
"[
Utiliser]"
)
",
'LD','Pas de titre contenant ~getpost('text')'
)
)
~include('../site/simple.footer.tmpl')