export: competences, issue #0000011

This commit is contained in:
Sebastien BEAUGRAND 2010-04-07 09:39:46 +00:00
parent d4911c728c
commit d165b337f1
4 changed files with 49 additions and 15 deletions

View File

@ -16,7 +16,11 @@ if (($siret*1)==0 || ($siren*1)<100){
if ($page == 'dirigeants' && $_REQUEST['vue'] == 'histo'){ if ($page == 'dirigeants' && $_REQUEST['vue'] == 'histo'){
$fileName .= '-histo'; $fileName .= '-histo';
} else if ($page == 'annonces') { } else if ($page == 'annonces') {
if(isset($_REQUEST['vue']) && $$_REQUEST['vue']!=''){$fileName.= '-'.$_REQUEST['idan'];} if (isset($_REQUEST['vue']) && $$_REQUEST['vue'] != '') {
$fileName .= '-'.$_REQUEST['idan'];
}
} else if ($page == 'competences' && isset($_GET['type'])) {
$fileName .= '-'.$_GET['type'];
} }
//Ajout de l'extension //Ajout de l'extension

View File

@ -113,7 +113,7 @@ if ($_SERVER['REMOTE_ADDR']=='83.206.102.217' || $_SERVER['REMOTE_ADDR']=='88.18
?> ?>
<tr> <tr>
<td width="30">&nbsp;</td> <td width="30">&nbsp;</td>
<td colspan="3" class="StyleInfoData"><a href="./?page=competences&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>&type=jal">Journaux d'Annonces L&eacute;gales</a></td> <td colspan="3" class="StyleInfoData"><a href="./?page=competences&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>&type=jal">Journaux d&apos;Annonces L&eacute;gales</a></td>
</tr> </tr>
</table> </table>
<?php <?php
@ -233,7 +233,7 @@ if ($type=='tri')
<?php <?php
} elseif ($type=='jal') { } elseif ($type=='jal') {
?> ?>
<h2>Jounaux d'Annonces Légales</h2> <h2>Jounaux d&apos;Annonces Légales</h2>
<table> <table>
<?php foreach ($competences as $comp) {?> <?php foreach ($competences as $comp) {?>
<tr> <tr>
@ -365,4 +365,29 @@ elseif ($comp['Type']=='M') echo '<i>Mandataire judiciaire</i><br/>';
* Faire des scripts génériques qui à partir de l'INSEE et de la création, maj ou suppression de de SIREN/SIRET dans certaines CJ ou NAF * Faire des scripts génériques qui à partir de l'INSEE et de la création, maj ou suppression de de SIREN/SIRET dans certaines CJ ou NAF
**/ **/
} }
// --------------------------------------------------------------------------- //
// Export
// --------------------------------------------------------------------------- //
if (empty($competences) == false) {
require_once 'export.php';
if (isset($siret) == true) {
$fileName = $page.'-'.$siret.'-'.$type;
} else {
$fileName = $page.'-'.$idEntreprise.'-'.$type;
}
$parseTab = new tabExport;
$parseTab->tab = array($competences);
$array2csv = new ExportCSV;
$array2csv->records = $parseTab->convertTable();
$array2csv->writeCSV($fileName);
$array2xml = new ExportXML;
$array2xml->rootName = $page.$type;
$array2xml->defaultTagName = substr($page, 0 , -1).$type;
$array2xml->records = $competences;
$array2xml->writeXML($fileName);
}
?> ?>

View File

@ -53,7 +53,11 @@ if ($page == 'identite' ||
$page == 'banque' || $page == 'banque' ||
$page == 'indiscore' || $page == 'indiscore' ||
$page == 'scorescf' || $page == 'scorescf' ||
$page == 'conventions') { $page == 'conventions' ||
$page == 'competences') {
if ($page != 'competences' ||
isset($_GET['vue']) == false ||
$_GET['vue'] != 'tous') {
if ($page != 'scorescf') { if ($page != 'scorescf') {
print '<a href="./exportcsv.php?'.$_SERVER['QUERY_STRING']. print '<a href="./exportcsv.php?'.$_SERVER['QUERY_STRING'].
'" target="_blank" title="CSV">'. '" target="_blank" title="CSV">'.
@ -63,6 +67,7 @@ if ($page == 'identite' ||
'" target="_blank" title="XML">'. '" target="_blank" title="XML">'.
'<img src="./img/exporticones/xml.png" alt="XML" /></a>&nbsp;'; '<img src="./img/exporticones/xml.png" alt="XML" /></a>&nbsp;';
} }
}
?> ?>
</div> </div>
</div> </div>