This commit is contained in:
Michael RICOIS 2010-06-17 09:24:05 +00:00
commit 38130dfa87
14 changed files with 1657 additions and 400 deletions

View File

@ -1,16 +0,0 @@
<?php
/**
* Monitors
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @package ##PACKAGE##
* @subpackage ##SUBPACKAGE##
* @author ##NAME## <##EMAIL##>
* @version SVN: $Id: Builder.php 6401 2009-09-24 16:12:04Z guilhermeblanco $
*/
class Monitors extends BaseMonitors
{
}

View File

@ -1,16 +0,0 @@
<?php
/**
* Orders
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @package ##PACKAGE##
* @subpackage ##SUBPACKAGE##
* @author ##NAME## <##EMAIL##>
* @version SVN: $Id: Builder.php 6401 2009-09-24 16:12:04Z guilhermeblanco $
*/
class Orders extends BaseOrders
{
}

View File

@ -1,120 +0,0 @@
<?php
/**
* BaseMonitors
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @property integer $ProviderOrderId
* @property integer $TestIndication
* @property integer $ConsumerId
* @property integer $CompanyId
* @property string $CompanyName
* @property enum $CategoryName
* @property enum $EventType
* @property enum $LanguageCode
* @property date $ActualStartDate
* @property date $ActualEndDate
*
* @package ##PACKAGE##
* @subpackage ##SUBPACKAGE##
* @author ##NAME## <##EMAIL##>
* @version SVN: $Id: Builder.php 6401 2009-09-24 16:12:04Z guilhermeblanco $
*/
abstract class BaseMonitors extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('monitors');
$this->hasColumn('ProviderOrderId', 'integer', 4, array(
'type' => 'integer',
'length' => 4,
'unsigned' => 0,
'primary' => true,
'autoincrement' => true,
));
$this->hasColumn('TestIndication', 'integer', 1, array(
'type' => 'integer',
'length' => 1,
'unsigned' => 0,
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('ConsumerId', 'integer', 4, array(
'type' => 'integer',
'length' => 4,
'unsigned' => 0,
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('CompanyId', 'integer', 8, array(
'type' => 'integer',
'length' => 8,
'unsigned' => 0,
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('CompanyName', 'string', null, array(
'type' => 'string',
'fixed' => false,
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('CategoryName', 'enum', 20, array(
'type' => 'enum',
'length' => 20,
'fixed' => false,
'values' =>
array(
0 => 'All',
1 => 'CreditRecommendation',
),
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('EventType', 'enum', 13, array(
'type' => 'enum',
'length' => 13,
'fixed' => false,
'values' =>
array(
0 => 'EventOnly',
1 => 'EventWithData',
),
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('LanguageCode', 'enum', 2, array(
'type' => 'enum',
'length' => 2,
'fixed' => false,
'values' =>
array(
0 => 'EN',
1 => 'FR',
),
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('ActualStartDate', 'date', null, array(
'type' => 'date',
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('ActualEndDate', 'date', null, array(
'type' => 'date',
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
}
}

View File

@ -1,176 +0,0 @@
<?php
/**
* BaseOrders
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @property integer $ProviderOrderId
* @property integer $TestIndication
* @property integer $ConsumerId
* @property integer $CompanyId
* @property enum $OrderType
* @property enum $DataSetType
* @property enum $ServiceLevelName
* @property enum $LanguageCode
* @property enum $OrderStatus
* @property timestamp $OrderDateTime
* @property timestamp $DateTimeCompleted
* @property timestamp $DueDateTime
* @property timestamp $DateTimeRetrieved
* @property string $Remark
* @property blob $DataSet
*
* @package ##PACKAGE##
* @subpackage ##SUBPACKAGE##
* @author ##NAME## <##EMAIL##>
* @version SVN: $Id: Builder.php 6401 2009-09-24 16:12:04Z guilhermeblanco $
*/
abstract class BaseOrders extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('orders');
$this->hasColumn('ProviderOrderId', 'integer', 4, array(
'type' => 'integer',
'length' => 4,
'unsigned' => 0,
'primary' => true,
'autoincrement' => true,
));
$this->hasColumn('TestIndication', 'integer', 1, array(
'type' => 'integer',
'length' => 1,
'unsigned' => 0,
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('ConsumerId', 'integer', 4, array(
'type' => 'integer',
'length' => 4,
'unsigned' => 0,
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('CompanyId', 'integer', 8, array(
'type' => 'integer',
'length' => 8,
'unsigned' => 0,
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('OrderType', 'enum', 13, array(
'type' => 'enum',
'length' => 13,
'fixed' => false,
'values' =>
array(
0 => 'DataSet',
1 => 'Monitoring',
2 => 'Investigation',
),
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('DataSetType', 'enum', 20, array(
'type' => 'enum',
'length' => 20,
'fixed' => false,
'values' =>
array(
0 => 'Full',
1 => 'Compact',
2 => 'CreditRecommendation',
3 => 'Flex',
),
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('ServiceLevelName', 'enum', 9, array(
'type' => 'enum',
'length' => 9,
'fixed' => false,
'values' =>
array(
0 => 'Immediate',
1 => 'Normal',
2 => 'Urgent',
3 => 'Flash',
),
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('LanguageCode', 'enum', 2, array(
'type' => 'enum',
'length' => 2,
'fixed' => false,
'values' =>
array(
0 => 'EN',
1 => 'FR',
),
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('OrderStatus', 'enum', 13, array(
'type' => 'enum',
'length' => 13,
'fixed' => false,
'values' =>
array(
0 => 'Completed',
1 => 'Pending',
2 => 'Delivered',
3 => 'Undeliverable',
),
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('OrderDateTime', 'timestamp', null, array(
'type' => 'timestamp',
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('DateTimeCompleted', 'timestamp', null, array(
'type' => 'timestamp',
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('DueDateTime', 'timestamp', null, array(
'type' => 'timestamp',
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('DateTimeRetrieved', 'timestamp', null, array(
'type' => 'timestamp',
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('Remark', 'string', null, array(
'type' => 'string',
'fixed' => false,
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
$this->hasColumn('DataSet', 'blob', null, array(
'type' => 'blob',
'primary' => false,
'notnull' => true,
'autoincrement' => false,
));
}
}

View File

@ -15,12 +15,17 @@ if( ENVIRONNEMENT=='PRD' || ENVIRONNEMENT=='REC')
define('INFOGREFFE_DEBUG', true);
}
$infogreffe_ws_url = INFOGREFFE_WS_URL;
$infogreffe_ws_uri = INFOGREFFE_WS_URI;
$infogreffe_ws_user = INFOGREFFE_WS_USER;
$infogreffe_ws_pass = INFOGREFFE_WS_PASS;
if(INFOGREFFE_DEBUG)
{
define('INFOGREFFE_WS_URL', 'https://wsrcte.extelia.fr/WSContextInfogreffe/INFOGREFFE');
define('INFOGREFFE_WS_URI', 'https://wsrcte.extelia.fr/');
define('INFOGREFFE_WS_USER', '85000109');
define('INFOGREFFE_WS_PASS', '160409');
$infogreffe_ws_url = 'https://wsrcte.extelia.fr/WSContextInfogreffe/INFOGREFFE';
$infogreffe_ws_uri = 'https://wsrcte.extelia.fr/';
$infogreffe_ws_user = '85000109';
$infogreffe_ws_pass = '160409';
}
/**
@ -34,14 +39,15 @@ if(INFOGREFFE_DEBUG)
*/
function infogreffe_requetexml($siren, $idCommande, $type, $vecteur, $option)
{
global $client, $firephp;
global $client, $firephp, $infogreffe_ws_url, $infogreffe_ws_uri, $infogreffe_ws_user,
$infogreffe_ws_pass;
$xmlStr = '';
$xml = new SimpleXMLElement('<demande></demande>');
$emetteur = $xml->addChild('emetteur');
$emetteur->addChild('code_abonne', INFOGREFFE_WS_USER);
$emetteur->addChild('mot_passe', INFOGREFFE_WS_PASS);
$emetteur->addChild('code_abonne', $infogreffe_ws_user);
$emetteur->addChild('mot_passe', $infogreffe_ws_pass);
$emetteur->addChild('reference_client', 'G'.$idCommande); //Générer l'identifiant de commande
$code_requete = $emetteur->addChild('code_requete');
@ -146,10 +152,11 @@ function infogreffe_requetexml($siren, $idCommande, $type, $vecteur, $option)
*/
function infogreffe_getproduitsxml($xml)
{
global $infogreffe_ws_url;
$req = utf8_encode($xml);
$post = '<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://webservices.infogreffe.fr/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getProduitsWebServicesXML><param0 xsi:type="xsd:string">'.$req.'</param0></ns1:getProduitsWebServicesXML></SOAP-ENV:Body></SOAP-ENV:Envelope>';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, INFOGREFFE_WS_URL);
curl_setopt($ch, CURLOPT_URL, $infogreffe_ws_url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_COOKIEFILE,TRUE);
curl_setopt($ch, CURLOPT_POST, TRUE);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,171 @@
<?php
require_once 'print/print.php';
define('INFOGREFFE_FILETIME', 28800);
define('INFOGREFFE_PATH', PATH_DATA.'/infogreffe/kbis/');
if ( !file_exists(INFOGREFFE_PATH) ) { mkdir(INFOGREFFE_PATH); }
if( ENVIRONNEMENT=='PRD' || ENVIRONNEMENT=='REC')
{
define('INFOGREFFE_DEBUG', false);
}else{
define('INFOGREFFE_DEBUG', true);
}
$infogreffe_ws_url = INFOGREFFE_WS_URL;
$infogreffe_ws_uri = INFOGREFFE_WS_URI;
$infogreffe_ws_user = INFOGREFFE_WS_USER;
$infogreffe_ws_pass = INFOGREFFE_WS_PASS;
if(INFOGREFFE_DEBUG)
{
$infogreffe_ws_url = 'https://wsrcte.extelia.fr/WSContextInfogreffe/INFOGREFFE';
$infogreffe_ws_uri = 'https://wsrcte.extelia.fr/';
$infogreffe_ws_user = '85000109';
$infogreffe_ws_pass = '160409';
}
define('INFOGREFFE_WS_REF','dgekbis-'.$siren);
function infogreffe_kbis ( $siren ) {
global $infogreffe_ws_url, $infogreffe_ws_uri, $infogreffe_ws_user,
$infogreffe_ws_pass;
$req = '<demande>'.
'<emetteur>'.
'<code_abonne>'.$infogreffe_ws_user.'</code_abonne>'.
'<mot_passe>'.$infogreffe_ws_pass.'</mot_passe>'.
'<reference_client>'.INFOGREFFE_WS_REF.'</reference_client>'.
'<code_requete>'.
'<type_profil>A</type_profil>'.
'<origine_emetteur>IC</origine_emetteur>'.
'<nature_requete>C</nature_requete>'.
'<type_document>KB</type_document>'.
'<type_requete>S</type_requete>'.
'<media>WS</media>'.
'<mode_diffusion>'.
'<mode type="XL" />'.
'</mode_diffusion>'.
'</code_requete>'.
'</emetteur>'.
'<commande>'.
'<num_siren>'.$siren.'</num_siren>'.
'</commande></demande>';
FB::log($req, 'req');
$post = '<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://webservices.infogreffe.fr/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getProduitsWebServicesXML><param0 xsi:type="xsd:string">'.$req.'</param0></ns1:getProduitsWebServicesXML></SOAP-ENV:Body></SOAP-ENV:Envelope>';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $infogreffe_ws_url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_COOKIEFILE,TRUE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$output = curl_exec($ch);
$xml = str_replace("<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'><SOAP-ENV:Body><ns0:getProduitsWebServicesXMLResponse xmlns:ns0='urn:local' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><return xsi:type='xsd:string'>",'', $output);
$xml = str_replace('</return></ns0:getProduitsWebServicesXMLResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>','', $xml);
return $xml;
}
function infogreffe_kbisToHTML ( $fichier ) {
// Load the XML source
$xmlDoc = new DOMDocument;
$xmlDoc->load($fichier);
$xsl = new DOMDocument;
$xsl->load(realpath(dirname(__FILE__)).'/KbisWebservice.xsl');
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules
$html = $proc->transformToXML($xmlDoc);
$fichierHTML = str_replace('.xml', '.html', $fichier);
file_put_contents($fichierHTML, $html);
return $fichierHTML;
}
function infogreffe_kbisErreur ( $xml ) {
if (!empty($xml)){
$doc = new DOMDocument();
$load = $doc->loadXML($xml, LIBXML_NOERROR | LIBXML_NOWARNING);
if (!$load) {
return true;
} else {
return false;
}
} else {
return true;
}
}
$fichierPDF = '';
$erreur = '';
$fichier = 'kbis-'.$siren.'.xml';
// Le fichier n'existe pas en cache
if ( !file_exists(INFOGREFFE_PATH.$fichier)
// Le fichier existe en cache
|| ( file_exists(INFOGREFFE_PATH.$fichier) &&
date('Ymd', filemtime(INFOGREFFE_PATH.$fichier)+INFOGREFFE_FILETIME ) < date('Ymd') )
// Le fichier existe en cache mais contient un message d'erreur
|| ( file_exists(INFOGREFFE_PATH.$fichier)
&& date('Ymd', filemtime(INFOGREFFE_PATH.$fichier)+INFOGREFFE_FILETIME ) < date('Ymd')
&& filesize(PATH_DATA.'/infogreffe/xml/'.$fichier)<=2000) ){
//Génération du fichier PDF
$xml = infogreffe_kbis($siren);
FB::log($xml, 'xml');
if ( !infogreffe_kbisErreur($xml) )
{
file_put_contents(INFOGREFFE_PATH.$fichier, $xml);
$fichierHTML = infogreffe_kbisToHTML(INFOGREFFE_PATH.$fichier);
$fichierPDF = wkhtmltopdf($fichierHTML);
} else {
$erreur = str_replace("<?xml version='1.0' encoding='UTF-8'?>",
'', $xml);
}
} else {
if ( file_exists(INFOGREFFE_PATH.'/kbis-'.$siren.'.pdf') ) {
$fichierPDF = INFOGREFFE_PATH.'/kbis-'.$siren.'.pdf';
}
}
FB::log($fichierPDF, 'fichierPDF');
?>
<div id="center">
<h1>PIECES OFFICIELLES</h1>
<table>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=substr($siren,0,3).' '.substr($siren,3,3).' '.substr($siren,6,3)?></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Raison Sociale</td>
<td width="350" class="StyleInfoData"><?=$raisonSociale?></td>
</tr>
<tr><td colspan="3">&nbsp;</td></tr>
</table>
<h2>Extrait RCS</h2>
<table>
<tr>
<td width="100">&nbsp;</td>
<td width="380">
<?php
if ( $fichierPDF!='') {
?>
<a title="Cliquez ici pour visualiser le kbis" target="_blank" href="./datafile.php?type=kbis&q=<?=basename($fichierPDF)?>">
<u>Visualiser le Kbis <img src="/img/icone_pdf.gif"/></u>
</a>
<?php
} else {
?>
<p>Une erreur c'est produite durant le traitement !</p>
<p><?=$erreur?></p>
<?php
}
?>
</td>
<td width="100">&nbsp;</td>
</tr>
</table>
</div>

View File

@ -5,6 +5,7 @@ if (empty($type) == false) {
switch ($type) {
case 'pdf':
$content_type = 'application/pdf';
$path = PATH_DATA.'/'.$type.'/';
break;
case 'logos':
$explode = explode('.', $file);
@ -14,21 +15,28 @@ if (empty($type) == false) {
case 'jpeg':
case 'jpg' : $content_type = 'image/jpeg'; break;
}
$path = PATH_DATA.'/'.$type.'/';
break;
case 'consommation':
$content_type = 'application/csv-tab-delimited-table';
$path = PATH_DATA.'/'.$type.'/';
break;
case 'surveillance':
$content_type = 'application/csv-tab-delimited-table';
$path = PATH_DATA.'/'.$type.'/';
break;
case 'portefeuille':
$content_type = 'application/csv-tab-delimited-table';
$path = PATH_DATA.'/'.$type.'/';
break;
case 'kbis':
$path = PATH_DATA.'/infogreffe/'.$type.'/';
$content_type = 'application/pdf';
break;
default:
exit;
break;
}
$path = PATH_DATA.'/'.$type.'/';
} else {
$path = PATH_DATA.'/';
}

View File

@ -45,11 +45,15 @@ $tabScripts = array(
),
'scripts_kbis' => array(
'list' => array('jqueryprogressbar.js','kbis.js'),
'pages' => array('kbis2'),
'pages' => array('kbis'),
),
'scripts_enquetec' => array(
'list' => array('enquetec.js'),
'pages' => array('enquetec'),
),
'scripts_pieces' => array(
'list' => array('pieces.js'),
'pages' => array('pieces'),
),
);
?>

View File

@ -0,0 +1,7 @@
$(document).ready(function()
{$('input[type=radio][name=method]').click(function()
{var value=$('input[type=radio][name=method]:checked').val();$('input[type=radio][name=method]').each(function(){if($(this).val()!=value){$('#kbis'+$(this).val()).css('display','none');}});if(value=='M'||value=='C'){if($('#kbis'+value).css('display')=='none'){$('#kbis'+value).css('display','inline');}}else{$(location).attr('href',value);}});$('input.type[type=checkbox]').click(function()
{var nbCheck=0;$('input.type[type=checkbox]:checked').each(function()
{nbCheck++;});if(nbCheck>0)
{$('#privilegesM').css('display','block');}else{$('#privilegesM').css('display','none');}});$('form[name=kbis]').submit(function(){var method=$('input[name=method]:checked').val();if(method=='C')
{return true;}else{var eMail=jQuery('input[name=email]',this).val();if(!checkEmail(eMail)){alert('Veuillez saisir une adresse email.');return false;}else{return true;}}});$('form[name=privileges]').submit(function(){var eMail=jQuery('input[name=email]',this).val();if(!checkEmail(eMail)){alert('Veuillez saisir une adresse email.');return false;}else{return true;}});});

58
www/js/pieces.js Normal file
View File

@ -0,0 +1,58 @@
$(document).ready(function()
{
$('input[type=radio][name=method]').click(function()
{
var value = $('input[type=radio][name=method]:checked').val();
$('input[type=radio][name=method]').each(function(){
if($(this).val()!=value) {
$('#kbis'+$(this).val()).css('display', 'none');
}
});
if(value=='M' || value=='C') {
if($('#kbis'+value).css('display')=='none') {
$('#kbis'+value).css('display', 'inline');
}
} else {
$(location).attr('href',value);
}
});
$('input.type[type=checkbox]').click(function()
{
var nbCheck = 0;
$('input.type[type=checkbox]:checked').each(function()
{
nbCheck++;
});
if( nbCheck>0 )
{
$('#privilegesM').css('display', 'block');
}else{
$('#privilegesM').css('display', 'none');
}
});
$('form[name=kbis]').submit(function(){
var method = $('input[name=method]:checked').val();
if(method=='C')
{
return true;
}else{
var eMail = jQuery('input[name=email]', this).val();
if(!checkEmail(eMail)){
alert('Veuillez saisir une adresse email.');
return false;
} else { return true; }
}
});
$('form[name=privileges]').submit(function(){
var eMail = jQuery('input[name=email]', this).val();
if(!checkEmail(eMail)){
alert('Veuillez saisir une adresse email.');
return false;
} else { return true; }
});
});

9
www/pages/kbis.php Normal file
View File

@ -0,0 +1,9 @@
<?php
if ($_SESSION['tabInfo']['login']=='mricois' ||
$_SESSION['tabInfo']['login']=='ylenaour'){
require_once 'kbis/kbis_infogreffe.php';
} else {
require_once 'kbis2.php';
}

View File

@ -148,7 +148,6 @@ if(isset($_REQUEST['mailkbis']) && $_REQUEST['mailkbis']=='Ok')
}
require_once 'common/dates.php';
require_once 'common/curl.php';
@ -253,6 +252,7 @@ if ($errCJ || $errDep || $errNum)
</div>
<?
}
//Kbis par plateforme SED
else
{
//Lancement du téléchargement du kbis

View File

@ -225,62 +225,6 @@ if(empty($_REQUEST['privileges']['type']))
?>
#message {margin:10px 0 10px 30px;}
</style>
<script type="text/javascript">
$(document).ready(function()
{
$('input[type=radio][name=method]').click(function()
{
var value = $('input[type=radio][name=method]:checked').val();
$('input[type=radio][name=method]').each(function(){
if($(this).val()!=value) { $('#kbis'+$(this).val()).css('display', 'none'); }
});
if(value=='T'){ $(location).attr('href','./?page=kbis2&siret=<?=$siret?>'); }
else if(value=='M' || value=='C') {
if($('#kbis'+value).css('display')=='none') $('#kbis'+value).css('display', 'inline');
}
});
$('input.type[type=checkbox]').click(function()
{
var nbCheck = 0;
$('input.type[type=checkbox]:checked').each(function()
{
nbCheck++;
});
if( nbCheck>0 )
{
$('#privilegesM').css('display', 'block');
}else{
$('#privilegesM').css('display', 'none');
}
});
$('form[name=kbis]').submit(function(){
var method = $('input[name=method]:checked').val();
if(method=='C')
{
return true;
}else{
var eMail = jQuery('input[name=email]', this).val();
if(!checkEmail(eMail)){
alert('Veuillez saisir une adresse email.');
return false;
} else { return true; }
}
});
$('form[name=privileges]').submit(function(){
var eMail = jQuery('input[name=email]', this).val();
if(!checkEmail(eMail)){
alert('Veuillez saisir une adresse email.');
return false;
} else { return true; }
});
});
</script>
<div id="center">
<h1>COMMMANDES DE PI&Eacute;CES</h1>
@ -320,7 +264,7 @@ if(hasPerm('kbis'))
$disable = '';
if(!$disponible){ $disable = 'disabled'; }
?>
<input class="noborder" type="radio" name="method" value="T" <?=$_REQUEST['method']=='T' ? 'checked' : ''?> <?=$disable?>/>
<input class="noborder" type="radio" name="method" value="./?page=kbis&siret=<?=$siret?>" <?=$_REQUEST['method']=='T' ? 'checked' : ''?> <?=$disable?>/>
Visualiser/Télécharger le kbis
<?php if(!$disponible){ ?>
(Il n'est pas possible de télécharger les kbis dans ce département)