~include('../site/admin.header.tmpl','Gestion pays')
~includeonce('../lib/countries.tmpl')
~include('filter.tmpl')
~defunc('disp_country','
[~mb_strtoupper(~fld('country'))]
~if(~fld('country'), ~img('~get('default_country_folder')~fld('country').svg', '[~fld('country')]'))
~fld('description')
')
~if(~getpost('text'),
~list(~get('database'),
"SELECT id, name FROM countries
WHERE description LIKE '%~call('simple_fi','text')%'
ORDER BY description",
'LM',
'
~fld('description')',
'LD','Pas de pays contenant ~getpost('text')'
)
)
~list(~get('database'),
"SELECT countries.id, countries.country, countries.description
FROM countries",
'LM',
~if(!~file_exists('~get('default_country_folder')~fld('country').svg'),
'File #
~fld('country'): country file does not exists!
'
)
)
~list(~get('database'),
"SELECT count(*) as count FROM countries",
'LF',~set('num',~fld('count'))
)
~include('../site/next_page.tmpl',~get_filenamevar(1),~get('num'),20)
~list(~get('database'),
"SELECT id,country, description FROM countries ORDER BY country ASC LIMIT 20 OFFSET ~get('indice')",
'LM',~call('disp_country')
)
~include('../site/next_page.tmpl',~get_filenamevar(1),~get('num'),20)
~include("../site/admin.footer.tmpl")