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

@ -13,10 +13,14 @@ if (($siret*1)==0 || ($siren*1)<100){
} }
//Gestion des cas particulier //Gestion des cas particulier
if($page=='dirigeants' && $_REQUEST['vue']=='histo'){ if ($page == 'dirigeants' && $_REQUEST['vue'] == 'histo'){
$fileName.= '-histo'; $fileName .= '-histo';
}elseif($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

@ -125,7 +125,7 @@ if (isset($siret) == true) {
} }
$parseTab = new tabExport; $parseTab = new tabExport;
$parseTab->tab = array($conventions); $parseTab->tab = array($conventions);
$array2csv = new ExportCSV; $array2csv = new ExportCSV;
$array2csv->records = $parseTab->convertTable(); $array2csv->records = $parseTab->convertTable();

View File

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