extranet/www/pages/saisie.php
2009-02-23 16:14:03 +00:00

781 lines
35 KiB
PHP

<?
$strSelectDir='<option value="0000" selected>-</option>
<option value="0900">Gérant</option>
<option value="0209">Associé-gérant</option>
<option value="0400">Co-gérant</option>
<option value="0100">Administrateur</option>
<option value="1300">Président</option>
<option value="1900">Liquidateur</option>
<option value="0709">DG</option>
<option value="1306">Président conseil admin.</option>
<option value="0704">Directeur gén. délégué</option>
<option value="1301">PDG</option>
<option value="1800">Vice-président</option>
<option value="1401">Représentant soc. étrangère</option>
<option value="0603">Contrôleur gestion</option>
<option value="1307">Président conseil surv.</option>
<option value="1308">Président directoire</option>
<option value="0713">Dir. général non admin.</option>
<option value="0108">Admin. provisoire</option>
<option value="0708">DG unique</option>
<option value="0101">Admin. délégué</option>
<option value="0912">Gérant non associé</option>
<option value="0200">Associé</option>
<option value="1651">Sous Gouverneur</option>
<option value="0701">DG Adjoint</option>
<option value="0705">DG et administrateur</option>
<option value="0300">CAC</option>
<option value="0303">Commissaire aux comptes suppléant</option>
<option value="1650">Gouverneur</option>
<option value="0500">Conj. Collaborateur</option>
<option value="1600">Secrétaire</option>
<option value="1601">Vice-secrétaire</option>
<option value="1700">Trésorier</option>
<option value="1701">Vice-trésorier</option>';
$strSelectGenre='<option value="" selected>-</option>
<option value="M.">M</option>
<option value="Mme">Mme</option>
<option value="Mlle">Mlle</option>
<option value="Societe">STE</option>';
$strSelectPays='<option value="XXX" selected>-</option>
<option value="FRA">France</option>
<option value="AND">Andorre</option>
<option value="ARE">Emirats Arabes Unis</option>
<option value="AFG">Afghanistan</option>
<option value="ATG">Antigua</option>
<option value="AIA">Anguilla</option>
<option value="ALB">Albanie</option>
<option value="ARM">Arménie</option>
<option value="ANT">Antilles Néerlandaises</option>
<option value="AGO">Angola</option>
<option value="ATA">Antarctique</option>
<option value="ARG">Argentine</option>
<option value="ASM">Samoa Américaines</option>
<option value="AUT">Autriche</option>
<option value="AUS">Australie</option>
<option value="ABW">Aruba</option>
<option value="AZE">Azerbaïdjan</option>
<option value="BIH">Bosnie-Herzégovine</option>
<option value="BRB">Barbade</option>
<option value="BGD">Bangladesh</option>
<option value="BEL">Belgique</option>
<option value="BFA">Burkina Faso</option>
<option value="BGR">Bulgarie</option>
<option value="BHR">Bahreïn</option>
<option value="BDI">Burundi</option>
<option value="BEN">Bénin</option>
<option value="BMU">Bermudes</option>
<option value="BRN">Brunei</option>
<option value="BOL">Bolivie</option>
<option value="BRA">Brésil</option>
<option value="BHS">Bahamas</option>
<option value="BTN">Bhoutan</option>
<option value="BVT">Iles Bouvet</option>
<option value="BWA">Botswana</option>
<option value="BLR">Biélorussie</option>
<option value="BLZ">Bélize</option>
<option value="CAN">Canada</option>
<option value="CCK">Iles Cocos</option>
<option value="CAF">République Centrafricaine</option>
<option value="COG">Congo</option>
<option value="CHE">Suisse</option>
<option value="CIV">Côte d\'Ivoire</option>
<option value="COK">Iles Cook</option>
<option value="CHL">Chili</option>
<option value="CMR">Cameroun</option>
<option value="CHN">Chine</option>
<option value="COL">Colombie</option>
<option value="CRI">Costa Rica</option>
<option value="CSK">Tchécoslovaquie</option>
<option value="CUB">Cuba</option>
<option value="CPV">Cap-Vert</option>
<option value="CXR">Ile Christmas</option>
<option value="CYP">Chypre</option>
<option value="CZE">Rébublique Tchèque</option>
<option value="DDR">République Démocratique Allemande</option>
<option value="DEU">Allemagne</option>
<option value="DJI">Djibouti</option>
<option value="DNK">Danemark</option>
<option value="DMA">Dominique</option>
<option value="DOM">République Dominicaine</option>
<option value="DZA">Algérie</option>
<option value="ECU">Equateur</option>
<option value="EST">Estonie</option>
<option value="EGY">Egypte</option>
<option value="ESH">Sahara Occidental</option>
<option value="ERI">Eritrea</option>
<option value="ESP">Espagne</option>
<option value="ETH">Ethiopie</option>
<option value="FIN">Finlande</option>
<option value="FJI">Iles Fidji</option>
<option value="FLK">Iles Malouines</option>
<option value="FSM">Etats Fédérés de Micronésie</option>
<option value="FRO">Iles Féroé</option>
<option value="GAB">Gabon</option>
<option value="GBR">Royaume-Uni</option>
<option value="GRD">Grenade</option>
<option value="GEO">Géorgie</option>
<option value="GUF">Guinée française</option>
<option value="GHA">Ghana</option>
<option value="GIB">Gibraltar</option>
<option value="GRL">Groënland</option>
<option value="GMB">Gambie</option>
<option value="GIN">Guinée</option>
<option value="GLP">Guadeloupe</option>
<option value="GNQ">Guinée Equatoriale</option>
<option value="GRC">Grèce</option>
<option value="SGS">Géorgie du sud & Iles Sandwich</option>
<option value="GTM">Guatemala</option>
<option value="GUM">Guam</option>
<option value="GNB">Guinée-Bissau</option>
<option value="GUY">Guyane</option>
<option value="HKG">Hong Kong</option>
<option value="HMD">Iles Heard et Mc Donald</option>
<option value="HND">Honduras</option>
<option value="HRV">Croatie</option>
<option value="HTI">Haïti</option>
<option value="HUN">Hongrie</option>
<option value="IDN">Indonésie</option>
<option value="IRL">Irlande</option>
<option value="ISR">Israël</option>
<option value="IND">Inde</option>
<option value="IOT">Iles Vierges Britanniques</option>
<option value="IRQ">Irak</option>
<option value="IRN">Iran</option>
<option value="ISL">Islande</option>
<option value="ITA">Italie</option>
<option value="JAM">Jamaïque</option>
<option value="JOR">Jordanie</option>
<option value="JPN">Japon</option>
<option value="KEN">Kenya</option>
<option value="KGZ">Kirghizistan</option>
<option value="KHM">Cambodge</option>
<option value="KIR">Kiribati</option>
<option value="COM">Comores</option>
<option value="KNA">Saint-Kitts</option>
<option value="PRK">Corée</option>
<option value="KOR">République de Corée</option>
<option value="KWT">Koweït</option>
<option value="CYM">Iles Caïman</option>
<option value="KAZ">Kazakhstan</option>
<option value="LAO">Laos</option>
<option value="LBN">Liban</option>
<option value="LCA">Sainte-Lucie</option>
<option value="LIE">Liechtenstein</option>
<option value="LKA">Sri Lanka</option>
<option value="LBR">Libéria</option>
<option value="LSO">Lesotho</option>
<option value="LTU">Lithuanie</option>
<option value="LUX">Luxembourg</option>
<option value="LVA">Lettonie</option>
<option value="LBY">Libye</option>
<option value="MAR">Maroc</option>
<option value="MCO">Monaco</option>
<option value="MDA">Moldavie</option>
<option value="MDG">Madagascar</option>
<option value="MHL">Iles Marshall</option>
<option value="MKD">Macédoine</option>
<option value="MLI">Mali</option>
<option value="MMR">Myanmar</option>
<option value="MNG">Mongolie</option>
<option value="MAC">Macao</option>
<option value="MNP">Iles Mariannes</option>
<option value="MTQ">Martinique</option>
<option value="MRT">Mauritanie</option>
<option value="MSR">Montserrat</option>
<option value="MLT">Malte</option>
<option value="MUS">Ile Maurice</option>
<option value="MDV">Maldives</option>
<option value="MWI">Malawi</option>
<option value="MEX">Mexique</option>
<option value="MYS">Malaisie</option>
<option value="MOZ">Mozambique</option>
<option value="NAM">Namibie</option>
<option value="NCL">Nouvelle Calédonie</option>
<option value="NER">Niger</option>
<option value="NFK">Iles Norfolk</option>
<option value="NGA">Nigeria</option>
<option value="NIC">Nicaragua</option>
<option value="NLD">Pays-Bas</option>
<option value="NOR">Norvège</option>
<option value="NPL">Népal</option>
<option value="NRU">Nauru</option>
<option value="NTZ">Zone Neutre</option>
<option value="NIU">Niue</option>
<option value="NZL">Nouvelle Zélande</option>
<option value="OMN">Oman</option>
<option value="PAN">Panama</option>
<option value="PER">Pérou</option>
<option value="PYF">Polynésie Francaise</option>
<option value="PNG">Papouasie Nouvelle-Guinée</option>
<option value="PHL">Philippines</option>
<option value="PAK">Pakistan</option>
<option value="POL">Pologne</option>
<option value="SPM">Saint Pierre et Miquelon</option>
<option value="PCN">Pitcairn</option>
<option value="PRI">Porto Rico</option>
<option value="PRT">Portugal</option>
<option value="PLW">Palau</option>
<option value="PRY">Paraguay</option>
<option value="QAT">Qatar</option>
<option value="REU">Ile de la Réunion</option>
<option value="ROM">Roumanie</option>
<option value="RUS">Russie</option>
<option value="RWA">Rwanda</option>
<option value="SAU">Arabie Saoudite</option>
<option value="SLB">Iles Salomon</option>
<option value="SYC">Seychelles</option>
<option value="SDN">Soudan</option>
<option value="SWE">Suède</option>
<option value="SGP">Singapour</option>
<option value="SHN">Sainte-Hélène</option>
<option value="SVN">Slovénie</option>
<option value="SJM">Spitsberg et lle Jan Mayen</option>
<option value="SVK">Slovaquie</option>
<option value="SLE">Sierra Leone</option>
<option value="SMR">Saint-Marin</option>
<option value="SEN">Sénégal</option>
<option value="SOM">Somalie</option>
<option value="SUR">Surinam</option>
<option value="STP">São Tomé et Principe</option>
<option value="SUN">URSS</option>
<option value="SLV">Salvador</option>
<option value="SYR">Syrie</option>
<option value="SWZ">Swaziland</option>
<option value="TCA">Iles Turques et Caïques</option>
<option value="TCD">Tchad</option>
<option value="ATF">Terres Australes Francaises</option>
<option value="TGO">Togo</option>
<option value="THA">Thaïlande</option>
<option value="TJK">Tadjikistan</option>
<option value="TKL">Iles Tokélaou</option>
<option value="TKM">Turkménistan</option>
<option value="TUN">Tunisie</option>
<option value="TON">Tonga</option>
<option value="TMP">Timor Oriental</option>
<option value="TUR">Turquie</option>
<option value="TTO">Trinité-et-Tobago</option>
<option value="TUV">Tuvalu</option>
<option value="TWN">Taïwan, République de Chine</option>
<option value="TZA">Tanzanie</option>
<option value="UKR">Ukraine</option>
<option value="UGA">Ouganda</option>
<option value="UMI">Iles mineures éloignées des E.U</option>
<option value="USA">Etats Unis</option>
<option value="URY">Uruguay</option>
<option value="UZB">Ouzbékistan</option>
<option value="VAT">Vatican</option>
<option value="VCT">Saint Vincent et les Grenadines</option>
<option value="VEN">Vénézuéla</option>
<option value="VGB">Iles Vierges Britaniques</option>
<option value="VIR">Iles Vierges U.S</option>
<option value="VNM">Vietnam</option>
<option value="VUT">Vanuatu</option>
<option value="WLF">Wallis et Futuna</option>
<option value="WSM">Samoa Américaines</option>
<option value="XBA">Rép. Turque de Chypre</option>
<option value="YMD">Yémen (République Démocratique)</option>
<option value="YEM">Yemen</option>
<option value="MYT">Mayotte</option>
<option value="YUG">Yougoslavie</option>
<option value="ZAF">Afrique du sud</option>
<option value="ZMB">Zambie</option>
<option value="ZAR">Zaïre</option>
<option value="ZWE">Zimbabwe</option>';
include_once(INCLUDE_PATH.'/partenaires/classMTva.php');
include_once(FWK_PATH.'/common/dates.php');
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
$id=trim(preg_replace('/[^0-9]/', '', $_REQUEST['id']))*1; // Si id=0 alors non communiqué
$siren=substr($siret,0,9);
$client = new SoapClient(null, array( 'trace' => 1,
'soap_version' => SOAP_1_1,
'location' => WEBSERVICE_URL,
'uri' => WEBSERVICE_URI,
'login' => $_SESSION['tabInfo']['login'],
'password' => $_SESSION['tabInfo']['password'],
// 'encoding' => 'UTF-8'
));
if (!$_SESSION['connected'])
echo ('Vous devez être connecté afin de pouvoir utiliser cette fonctionnalité');
elseif ($_SESSION['tabInfo']['login']<>'ylenaour' && $_SESSION['tabInfo']['login']<>'jmartory' &&
$_SESSION['tabInfo']['login']<>'bpanacionne' && $_SESSION['tabInfo']['login']<>'mheitz' &&
$_SESSION['tabInfo']['login']<>'mpurcarin' && $_SESSION['tabInfo']['login']<>'mcochet' &&
$_SESSION['tabInfo']['login']<>'aegasse') {
echo ('Vous n\'avez pas les droits nécessaires pour utiliser cette fonctionnalité');
}
else {
if (isset($_REQUEST['frmSaisie'])) $tabSaisie = $_REQUEST['frmSaisie'];
if (isset($_REQUEST['jugement'])) $tabJugement= $_REQUEST['jugement'];
if (isset($_REQUEST['actionnaire'])) $tabActionna= $_REQUEST['actionnaire'];
if (isset($_REQUEST['particip'])) $tabParticip= $_REQUEST['particip'];
if (isset($_FILES['logoFile']) && $_FILES['logoFile']['error']<>UPLOAD_ERR_NO_FILE ) {
/** Un fichier a été uploadé **/
$logoFile = $_FILES['logoFile'];
$tmp_file = $logoFile['tmp_name'];
if ($logoFile['error']<>UPLOAD_ERR_OK) $message='Erreur lors de la copie du fichier';
if( !is_uploaded_file($tmp_file) ) $message="Le fichier est introuvable";
else {
// on vérifie maintenant l'extension
$type_file = $logoFile['type'];
$ext='';
if ( strstr($type_file, 'jpg')) $ext='jpg';
elseif( strstr($type_file, 'jpeg')) $ext='jpeg';
elseif( strstr($type_file, 'bmp')) $ext='bmp';
elseif( strstr($type_file, 'gif')) $ext='gif';
elseif( strstr($type_file, 'png')) $ext='png';
if ($ext=='')
$message="Le fichier n'est pas une image";
else {
// on copie le fichier dans le dossier de destination
$name_file = $siren.'.'.$ext;//$logoFile['name'];
if( !move_uploaded_file($tmp_file, PATH_LOGOS . $name_file) )
$message="Impossible de copier le fichier dans ".PATH_LOGOS;
else
$message="Le fichier a bien été uploadé";
}
}
} elseif (isset($_REQUEST['logoUrl']['del']) || isset($_REQUEST['logoUrl']['url'])) {
if (isset($_REQUEST['logoUrl']['del']) && $_REQUEST['logoUrl']['del']) {
@unlink(PATH_LOGOS.$siren.'.jpeg');
@unlink(PATH_LOGOS.$siren.'.jpg');
@unlink(PATH_LOGOS.$siren.'.png');
@unlink(PATH_LOGOS.$siren.'.gif');
@unlink(PATH_LOGOS.$siren.'.bmp');
@unlink(PATH_LOGOS.$siren.'.');
} else {
include_once(FWK_PATH.'/common/curl.php');
$logoUrl = $_REQUEST['logoUrl']['url'];
$tabTmp = parse_url($logoUrl);
$hostUrl = $tabTmp['host'];
$pathUrl = $tabTmp['path'];
$tmp=explode('.', basename($pathUrl));
$ext=strtolower(end($tmp));
$page=getUrl($logoUrl, '', '', '', false, $hostUrl, '', 7);
$body=$page['body'];
//die(print_r());
if ($ext<>'jpeg' && $ext<>'jpg' && $ext<>'png' && $ext<>'gif' && $ext<>'bmp') {
$tmp=explode('/', $page['header']['Content-Type']);
$ext=trim(str_replace('?', '',strtolower(end($tmp))));
}
$name_file = $siren.'.'.$ext;
$fp=@fopen(PATH_LOGOS.$name_file, 'w');
@fwrite($fp, $body);
@fclose($fp);
//die('Logo traité');
}
} else $message='';
if ($tabSaisie['action']=='sauver') {
$tabInfos=array('identite'=>$tabSaisie,
'jugement'=>$tabJugement,
'actionnaire'=>$tabActionna,
'participation'=>$tabParticip,
);
$message='Erreur lors de l\'enregistrement !';
try {
$O = $client->setInfosEntrep($siret, $id, $tabInfos);
if ($O['result']==1) $message='Informations mises à jour !';
} catch (SoapFault $fault) {
$message='Erreur SOAP lors de la mise à jour !';
echo '<pre>'.$client->__getLastResponse().'</pre>';
echo 'ERREUR SOAP :'.EOL;
print_r($fault);
}
$tabSaisie=array('source'=>$tabJugement['source'],
'dateParution'=>$tabJugement['dateParution'],
'numParution'=>$tabJugement['numParution']);
$_SESSION['saisie']=$tabSaisie;
}
try {
$O = $client->getIdentite($siret, $id);
$etab=$O['result'];
$tabEntrep=array();
$tabEntrep['raisonSociale']=$etab['Nom'];
$tabEntrep['siren']=$etab['Siren'];
$tabEntrep['tva']=$etab['TvaNumero'];
$tabEntrep['isin']=$etab['Isin'];
$tabEntrep['AutreId']=$etab['AutreId'];
$tabEntrep['active']=$etab['Statut'];
$tabEntrep['Source']=$etab['Source'];
$tabEntrep['SourceId']=$etab['SourceId'];
$tabEntrep['codeCommune']=$etab['Dept'].$etab['codeCommune'];
$tabEntrep['nafEn']=$etab['NafEnt'];
$tabEntrep['nafEt']=$etab['NafEtab'];
$_SESSION['tabInfo']['entrep']=$tabEntrep;
} catch (SoapFault $fault) {
echo '<pre>'.$client->__getLastResponse().'</pre>';
echo 'ERREUR SOAP :'.EOL;
print_r($fault);
die();
}
?>
<form name="form_saisie" action="./?page=saisie" method="POST" enctype="multipart/form-data">
<input type="hidden" name="frmSaisie[action]" value="sauver"/>
<input type="hidden" name="siret" value="<?=$siret?>"/>
<input type="hidden" name="id" value="<?=$id?>"/>
<!--<input type="hidden" name="MAX_FILE_SIZE" value="2097152" />-->
<table width="580" border="0" align="left" bgcolor="#FFFFFF">
<?php
if ($message<>'') {
?>
<tr>
<td width="30">&nbsp;</td>
<td width="500" colspan="2" class="StyleInfoData"><h3><?=$message;?></h3></td>
</tr>
<?php
}
?>
<tr>
<td colspan="3"><img src="./img/rub_identite<?if ($etab['Siege']==0) echo '_etab';?>.png" width="577" height="36"></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siret</td>
<td width="350" class="StyleInfoData"><?=substr($etab['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3).'&nbsp; <i>'.substr($etab['Siret'],9,5)?></i></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$etab['Nom'];
if ($etab['Nom2']<>'') echo '<br/>'.$etab['Nom2'];?></td>
</tr>
<?
if ($etab['Enseigne']<>'' && $etab['Sigle']<>'') { $titre='Enseigne / Sigle'; $lib=$etab['Enseigne'].' / '.$etab['Sigle']; }
elseif ($etab['Enseigne']<>'' && $etab['Sigle']=='') { $titre='Enseigne'; $lib=$etab['Enseigne']; }
elseif ($etab['Enseigne']=='' && $etab['Sigle']<>'') { $titre='Sigle'; $lib=$etab['Sigle']; }
else $titre='';
if ($titre<>'') {
?><tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"><?=$titre?></td>
<td width="350" class="StyleInfoData"><?=$lib?></td>
</tr>
<? }
/**
** On recherche un logo
**/
$urlImg=$siteWeb='';
$locImg=PATH_LOGOS.$etab['Siren'];
if (file_exists($locImg.'.gif')) { $urlImg='/img/logos/'.$etab['Siren'].'.gif'; $ext='.gif'; }
elseif (file_exists($locImg.'.png')) { $urlImg='/img/logos/'.$etab['Siren'].'.png'; $ext='.png'; }
elseif (file_exists($locImg.'.jpg')) { $urlImg='/img/logos/'.$etab['Siren'].'.jpg'; $ext='.jpg'; }
elseif (file_exists($locImg.'.jpeg')) { $urlImg='/img/logos/'.$etab['Siren'].'.jpeg'; $ext='.jpeg'; }
if ($urlImg=='' && $etab['Isin']<>'') {
$locImg=PATH_LOGOS.$etab['Isin'];
if (file_exists($locImg.'.gif')) { $urlImg='/img/logos/'.$etab['Isin'].'.gif'; $ext='.gif'; }
elseif (file_exists($locImg.'.png')) { $urlImg='/img/logos/'.$etab['Isin'].'.png'; $ext='.png'; }
elseif (file_exists($locImg.'.jpg')) { $urlImg='/img/logos/'.$etab['Isin'].'.jpg'; $ext='.jpg'; }
elseif (file_exists($locImg.'.jpeg')) { $urlImg='/img/logos/'.$etab['Isin'].'.jpeg'; $ext='.jpeg'; }
}
if (substr($etab['Web'],0,7)<>'http://')
$siteWeb='http://'.$etab['Web'];
else
$siteWeb=$etab['Web'];
if ($urlImg<>'') {
$tabTmp=@getimagesize($locImg.$ext);
$w=$tabTmp[0];
$h=$tabTmp[1];
if ($w>350) $strSize=@redimage($locImg.$ext,350,150);
else $strSize='';
}
?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Logo</td>
<td width="350" class="StyleInfoData"><? if ($urlImg<>'') { echo "<img src=\"$urlImg\" $strSize/><br/>"; }?>
Fichier &nbsp;<input type="file" name="logoFile" size="30" /><br/>
ou URL <input type="text" name="logoUrl[url]" size="40" maxlength="200"/><br/>
ou Supprimer le logo existant <input type="checkbox" name="logoUrl[del]" value="true" /></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><img src="./img/srub_id.png" width="576" height="27"></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">T&eacute;l&eacute;phone</td>
<td width="350" class="StyleInfoData"><input type="text" name="frmSaisie[tel]" size="25" maxlength="100" value="<?=trim($etab['Tel'])?>" /></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Fax</td>
<td width="350" class="StyleInfoData"><input type="text" name="frmSaisie[fax]" size="25" maxlength="100" value="<?=trim($etab['Fax'])?>" /></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Site Internet</td>
<td width="350" class="StyleInfoData"><input type="text" name="frmSaisie[web]" size="40" maxlength="100" value="<?=$siteWeb?>" />
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">E-mail</td>
<td width="350" class="StyleInfoData"><input type="text" name="frmSaisie[mail]" size="40" maxlength="100" value="<?=trim($etab['Mail'])?>" /></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><img src="./img/srub_activite.png" width="576" height="27"></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Code ISIN</td>
<td width="350" class="StyleInfoData"><input type="text" name="frmSaisie[isin]" size="15" maxlength="15" value="<?=trim($etab['Isin'])?>" /></td>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Activit&eacute; d&eacute;clar&eacute;e de l'entreprise</td>
<td width="350" class="StyleInfoData"><textarea name="frmSaisie[activite]" rows="5" cols="40"><?=$etab['Activite']?></textarea></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Capital</td>
<td width="350" class="StyleInfoData"><input type="text" name="frmSaisie[capital_mt]" size="10" maxlength="11" value="<?=trim($etab['Capital'])*1.0?>" disabled/>&nbsp;<select disabled name="frmSaisie[capital_dev]"><?php
$tmp=$client->getDevises();
$liste=$tmp['result'];
$selOne=false;
foreach ($liste as $iso=>$lib) {
if (trim($etab['CapitalDev'])==$iso) { $selOne=true; $sel='selected'; } else $sel='';
if (strlen($lib)>39) $lib=substr($lib,0,41).'...';
echo "<option value=\"$iso\" $sel >$lib</option>";
}if (!$selOne) echo '<option value="0000" selected>-</option>';
?></select>
</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><img src="./img/srub_bodacc.png" width="576" height="27" /></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Source <font color="Red">*</font></td>
<td width="350" class="StyleInfoData"><select name="jugement[source]">
<option value="TS" <?if (!isset($_SESSION['saisie']['source']) || $_SESSION['saisie']['source']=='TS') echo 'selected';?>>Tribunal via CCI</option>
<option value="TD" <?if ($_SESSION['saisie']['source']=='TD') echo 'selected';?>>Tribunal directement</option>
<option value="TA" <?if ($_SESSION['saisie']['source']=='TA') echo 'selected';?>>Tribunal via autre tiers</option>
<? $tmp=$client->getListeJalCollecte();
$liste=$tmp['result'];
foreach ($liste as $id=>$lib) {
//if (strlen($lib)>39) $lib=substr($lib,0,41).'...';
echo "<option value=\"JS$id\" ";
if ($_SESSION['saisie']['source']=="JS$id") echo 'selected';
echo ">$lib</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Date de parution <font color="Red">*</font></td>
<td width="350" class="StyleInfoData"><input type="text" name="jugement[dateParution]" size="10" maxlength="10" value="<?if (isset($_SESSION['saisie']['dateParution'])) echo $_SESSION['saisie']['dateParution'];?>" />&nbsp;Format JJ/MM/AAAA</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">N&deg; de parution</td>
<td width="350" class="StyleInfoData"><input type="text" name="jugement[numParution]" size="10" maxlength="10" value="<?if (isset($_SESSION['saisie']['numParution'])) echo $_SESSION['saisie']['numParution'];?>" /></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Date &eacute;v&egrave;nement / jugement<font color="Red">*</font></td>
<td width="350" class="StyleInfoData"><input type="text" name="jugement[dateJuge]" size="10" maxlength="10" value="" />&nbsp;Format JJ/MM/AAAA</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Tribunal <font color="Red">*</font></td>
<td width="350" class="StyleInfoData"><select name="jugement[tribunal]"><option value="-" selected>-</option><?php
$tmp=$client->getTribunaux(array('C','I','G'));
$liste=$tmp['result'];
asort($liste);
foreach ($liste as $code=>$lib) {
if (strlen($lib)>39) $lib=substr($lib,0,41).'...';
echo '<option value="'.$code.'"';
if ($code==$etab['TribunalCode']) echo ' selected';
echo ">$lib</option>";
}
?></select></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">&Eacute;v&egrave;nement / Jugement <font color="Red">*</font></td>
<td width="350" class="StyleInfoData"><select name="jugement[even][]" multiple size="5">
<option value="0000" selected>-</option>
<option value="1100">Ouverture sauvegarde</option>
<option value="1200">Redressement Judiciaire</option>
<option value="1201">Conversion sauvegarde en Redressement Judiciaire</option>
<option value="1300">Conversion Redressement Judiciaire en Liquidation Judiciaire</option>
<option value="1301">Ouverture Liquidation Judiciaire</option>
<option value="1302">Ouverture Liquidation Judiciaire Simplifiée</option>
<option value="1303">Ouverture Liquidation Judiciaire sur résolution du plan</option>
<option value="1304">Réouverture Liquidation Judiciaire</option>
<option value="1305">Liquidation Judiciaire</option>
<option value="1306">Liquidation Judiciaire simplifiée</option>
<option value="1307">Conversion sauvegarde en Liquidation Judiciaire</option>
<option value="1308">Fin du régime de Liquidation Judiciaire Simplifiée</option>
<option value="1309">Conversion Liquidation Judiciaire en Liquidation Judiciaire Simplifiée</option>
<option value="1310">Procédure d'insolvabilité européenne</option>
<option value="1311">Liquidation Judiciaire par extension au(x) gérant(s)</option>
<option value="1312">Liquidation Judiciaire avec continuation d'exploitation</option>
<option value="1413">Arrêt du plan de continuation</option>
<option value="1414">Arrêt du plan de redressement</option>
<option value="1503">Clôture de la procédure pour insuffisance d'actif</option>
<option value="1512">Résolution du plan de continuation</option>
<option value="1600">Faillite personnelle</option>
<option value="1601">Interdiction de gérer</option>
<option value="1999">Autre procédure collective</option>
<option value="2319">Poursuite de l'activité malgré perte > moitié du capital social</option>
<option value="2315">Modification de l'administration</option>
<option value="2313">Modification de l'activité</option>
<option value="2305">Modification de la dénomination</option>
<option value="2307">Modification de la forme juridique</option>
<option value="2303">Modification de la date de clôture de l'exercice</option>
<option value="2306">Modification de la durée de la société</option>
<option value="2102">Augmentation du capital social</option>
<option value="2100">Diminution du capital social</option>
<option value="2901">Transfert de siège</option>
<option value="5500">Vente/cession : Entreprise réalisant la vente</option>
<option value="2202">Dissolution</option>
<option value="2206">Mise en sommeil</option>
<option value="6700">Radiation</option>
</select></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Date cess. paiement / nouv. cl&ocirc;ture</td>
<td width="350" class="StyleInfoData"><input type="text" name="jugement[datePaie]" size="10" maxlength="10" value="" />&nbsp;Format JJ/MM/AAAA</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Montant Vente / Nouveau Capital</td>
<td width="350" class="StyleInfoData"><input type="text" name="jugement[montant]" size="10" maxlength="15" value="" />&nbsp;en &euro; sans les cents (div. en <input type="text" name="jugement[actionsNb]" size="6" maxlength="15" value="" /> actions de <input type="text" name="jugement[actionsMt]" size="5" maxlength="15" value="" /> &euro;)</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Administrateur <font color="Red">*</font></td>
<td width="350" class="StyleInfoData"><select name="jugement[admin]"><option value="-" selected>-</option><?php
$tmp=$client->getMandataires(/*array(1766,1773, 1765)*/);
$liste=$tmp['result'];
asort($liste);
$strMand='';
foreach ($liste as $code=>$lib) {
if (strlen($lib)>64) $lib=substr($lib,0,67).'...';
echo "<option value=\"$code\">$lib</option>";
$strMand.="<option value=\"$code\">$lib</option>";
}
?></select></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Mandataire <font color="Red">*</font></td>
<td width="350" class="StyleInfoData"><select name="jugement[mand]"><option value="-" selected>-</option><?=$strMand?></select></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Compl&eacute;ment, huissier, opposition, etc...</td>
<td width="350" class="StyleInfoData"><input type="text" name="jugement[comp]" size="70" maxlength="255" value="" /></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Nouvelle activité</td>
<td width="350" class="StyleInfoData"><input type="text" name="jugement[nouvActivite]" size="70" maxlength="255" value="" /></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Nouveau dirigeant 1<br/><select name="jugement[nouvDir1Fonc]"><?=$strSelectDir?></select></td>
<td width="350" class="StyleInfoData"><select name="jugement[nouvDir1Genre]"><?=$strSelectGenre?></select>&nbsp;Pr&eacute;nom(s)&nbsp;/&nbsp;Siren&nbsp;<input type="text" name="jugement[nouvDir1Pre]" size="15" maxlength="40">&nbsp;NOM&nbsp;<input type="text" name="jugement[nouvDir1Nom]" size="15" maxlength="40"><br/>
Domicili&eacute; : <input type="text" name="jugement[nouvDir1Dom]" size="60" maxlength="255" value="" /></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Nouveau dirigeant 2<br/><select name="jugement[nouvDir2Fonc]"><?=$strSelectDir?></select></td>
<td width="350" class="StyleInfoData"><select name="jugement[nouvDir2Genre]"><?=$strSelectGenre?></select>&nbsp;Pr&eacute;nom(s)&nbsp;/&nbsp;Siren&nbsp;<input type="text" name="jugement[nouvDir2Pre]" size="15" maxlength="40">&nbsp;NOM&nbsp;<input type="text" name="jugement[nouvDir2Nom]" size="15" maxlength="40"><br/>
Domicili&eacute; : <input type="text" name="jugement[nouvDir2Dom]" size="60" maxlength="255" value="" /></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Nouveau dirigeant 3<br/><select name="jugement[nouvDir3Fonc]"><?=$strSelectDir?></select></td>
<td width="350" class="StyleInfoData"><select name="jugement[nouvDir3Genre]"><?=$strSelectGenre?></select>&nbsp;Pr&eacute;nom(s)&nbsp;/&nbsp;Siren&nbsp;<input type="text" name="jugement[nouvDir3Pre]" size="15" maxlength="40">&nbsp;NOM&nbsp;<input type="text" name="jugement[nouvDir3Nom]" size="15" maxlength="40"><br/>
Domicili&eacute; : <input type="text" name="jugement[nouvDir3Dom]" size="60" maxlength="255" value="" /></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Nouvelle adresse</td>
<td width="350" class="StyleInfoData"><input type="text" name="jugement[nouvAdr]" size="70" maxlength="255" value="" /><br/>Code Postal <input type="text" name="jugement[nouvAdrCp]" size="6" maxlength="7" value="" />&nbsp;&nbsp;&nbsp;Ville <input type="text" name="jugement[nouvAdrVille]" size="40" maxlength="50" value="" /></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Nouvelle forme juridique</td>
<td width="350" class="StyleInfoData"><select name="jugement[nouvFJ]">
<option value="0000" selected>-</option>
<option value="5499">SARL</option>
<option value="5498">EURL</option>
<option value="6598">EARL</option>
<option value="5699">SA</option>
<option value="5710">SAS</option>
<option value="5720">SASU</option>
<option value="5202">SNC</option>
<option value="6220">GIE</option>
<option value="6533">GAEC</option>
<option value="6540">SCI</option>
<option value="6585">SCP</option>
</select></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><img src="./img/srub_actio.png" width="576" height="27"></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Siren actionnaire</td>
<td width="350" class="StyleInfoData"><input type="text" name="actionnaire[siren]" size="8" maxlength="12" value="" />&nbsp;&agrave;&nbsp;<input type="text" name="actionnaire[pct]" size="3" maxlength="5" value="" />&nbsp;%&nbsp;<input type="radio" name="actionnaire[majMin]" value="maj" checked>&nbsp;Major.&nbsp;/&nbsp;<input type="radio" name="actionnaire[majMin]" value="min">&nbsp;Minor. au <input type="text" name="actionnaire[dateMAJ]" size="10" maxlength="10" value="JJ/MM/AAAA" /><br/>Pays&nbsp;<select name="actionnaire[pays]"><?=$strSelectPays?></select><br/>Raison sociale&nbsp;<input type="text" name="actionnaire[nom]" size="35" maxlength="80" value=""/>&nbsp;si &eacute;tranger</td>
</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><img src="./img/srub_part.png" width="576" height="27"></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Siren participation</td>
<td width="350" class="StyleInfoData"><input type="text" name="particip[siren]" size="8" maxlength="12" value="" />&nbsp;&agrave;&nbsp;<input type="text" name="particip[pct]" size="3" maxlength="5" value="" />&nbsp;%&nbsp;<input type="radio" name="particip[majMin]" value="maj" checked>&nbsp;Major.&nbsp;/&nbsp;<input type="radio" name="particip[majMin]" value="min">&nbsp;Minor. au <input type="text" name="particip[dateMAJ]" size="10" maxlength="10" value="JJ/MM/AAAA" /><br/>Pays&nbsp;<select name="particip[pays]"><?=$strSelectPays?></select><br/>Raison sociale&nbsp;<input type="text" name="particip[nom]" size="35" maxlength="80" value=""/>&nbsp;si &eacute;tranger</td>
</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3" align="center"><input type="submit" value="Sauver"/></td>
</tr>
</table>
</form>
<?php
}
?>