X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=index.php;h=9eba4f069cf7d8f0e8f2e662ebb401e3fd1bcd31;hb=0cd00c8303f7d42b7da32139d5a22463d525ded7;hp=857e69e3ac654b85a4e4d0358a36cad6bb42413d;hpb=d5de441ee75336c04cd57ff7c6023be9bf9c0dcc;p=contagged diff --git a/index.php b/index.php index 857e69e..9eba4f0 100644 --- a/index.php +++ b/index.php @@ -1,32 +1,27 @@ - display page @@ -43,10 +38,6 @@ //prepare templates tpl_std(); - tpl_markers(); //FIXME not needed anymore!? - tpl_categories(); - tpl_timezone(); - tpl_country(); if (empty($_REQUEST['filter'])) $_REQUEST['filter']=''; if (empty($_REQUEST['marker'])) $_REQUEST['marker']=''; if (empty($_REQUEST['search'])) $_REQUEST['search']=''; @@ -55,15 +46,21 @@ $smarty->assign('marker',$_REQUEST['marker']); $smarty->assign('search',$_REQUEST['search']); //display templates - if(!empty($_REQUEST['export']) && $_REQUEST['export'] == 'csv'){ - if ($conf['userlogreq'] == 1 && $user == '') - { + if(!empty($_REQUEST['export'])){ + if ($conf['userlogreq'] == 1 && $user == ''){ header("HTTP/1.1 401 ACCESS DENIED"); exit(); - } else { + } + + if($_REQUEST['export'] == 'csv'){ header("Content-Type: text/csv"); header('Content-Disposition: Attachement; filename="contagged_export.csv"'); - $smarty->display('export_list_csv.tpl'); + $smarty->display('list_csv.tpl'); + exit; + }elseif($_REQUEST['export'] == 'map'){ + header('Content-Type: text/html; charset=utf-8'); + $smarty->display('list_map.tpl'); + exit; } }else{ //save location in session