export: marques, issue #0000011

This commit is contained in:
Sebastien BEAUGRAND 2010-05-24 14:50:08 +00:00
parent 229e18c5e7
commit d6eced9921
2 changed files with 33 additions and 3 deletions

View File

@ -96,10 +96,39 @@ if( cache_exist() && !hasModeEdition() ){
}
?>
</table>
<p class="confidentiel blockh2">
<?php
// --------------------------------------------------------------------------- //
// Export
// --------------------------------------------------------------------------- //
if ($id == 0) {
require_once 'export.php';
if (isset($siret) == true) {
$fileName = $page.'-'.$siret;
} else {
$fileName = $page.'-'.$idEntreprise;
}
for ($i = 0; $i < count($marques); ++$i) {
unset($marques[$i]['IdLien']);
}
$parseTab = new tabExport;
$parseTab->tab = array($marques);
$array2csv = new ExportCSV;
$array2csv->records = $parseTab->convertTable();
$array2csv->writeCSV($fileName);
$array2xml = new ExportXML;
$array2xml->rootName = $page;
$array2xml->defaultTagName = substr($page, 0 , -1);
$array2xml->records = $marques;
$array2xml->writeXML($fileName);
}
require_once 'cgu/cgu.php';
echo afficheCgu();
print '<p class="confidentiel blockh2">'.afficheCgu();
?>
</p>
</div>

View File

@ -45,7 +45,8 @@ if ($page == 'identite' ||
$page == 'banque' ||
$page == 'scorescf' ||
$page == 'competences' ||
$page == 'conventions') {
$page == 'conventions' ||
$page == 'marques') {
if (($page != 'competences' &&
$page != 'marques') ||
($page == 'competences' && empty($_GET['vue']) == true) ||