2011-05-02 08:39:04 +02:00
|
|
|
<?php
|
|
|
|
class Annonces
|
|
|
|
{
|
|
|
|
public $annoncesBodacc = array();
|
|
|
|
public $annoncesBalo = array();
|
|
|
|
public $annoncesAsso = array();
|
|
|
|
public $annoncesBomp = array();
|
|
|
|
|
|
|
|
protected $annonces;
|
|
|
|
|
|
|
|
public function __construct($annonces = array())
|
|
|
|
{
|
|
|
|
if (is_array($annonces) && count($annonces)>0) {
|
|
|
|
$this->annonces = $annonces;
|
|
|
|
$this->triAnnonces();
|
2011-09-01 14:21:18 +02:00
|
|
|
krsort($this->annoncesBodacc);
|
|
|
|
krsort($this->annoncesBalo);
|
|
|
|
krsort($this->annoncesAsso);
|
|
|
|
krsort($this->annoncesBomp);
|
2011-05-02 08:39:04 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Enter description here ...
|
|
|
|
* @param unknown_type $ann
|
|
|
|
*/
|
|
|
|
public function getAnnonceDesc($ann)
|
|
|
|
{
|
|
|
|
if ($this->isBalo($ann->BodaccCode)) {
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
return 'BALO n°'.$ann->BodaccNum.' du '.
|
|
|
|
$this->dateAnnonce($ann->DateParution).'.';
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
} elseif ($this->isAsso($ann->BodaccCode)) {
|
|
|
|
|
|
|
|
return 'J.O. ASSOCIATION n°'.$ann->BodaccNum.' du '.
|
|
|
|
$this->dateAnnonce($ann->DateParution).'.';
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
} elseif ($this->isBomp($ann->BodaccCode)){
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
return 'Annonce n°'.$ann->NumAnnonce . '. ' .
|
|
|
|
'Source ' . $ann->BodaccCode . ' ' .
|
|
|
|
'n°' . ($ann->BodaccNum*1) . ' ' .
|
|
|
|
' du '.$this->dateAnnonce($ann->DateParution).
|
|
|
|
'. Département n°'.$ann->Departement.'.';
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
} else {
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
$tabSource = explode('-', $ann->BodaccCode);
|
|
|
|
$source = $tabSource[0];
|
|
|
|
$idSource = $tabSource[1];
|
|
|
|
if ($source[0] == 'B') {
|
2011-05-02 11:04:46 +02:00
|
|
|
$logo = '/themes/default/images/annonces/logo_jo.png';
|
2011-05-02 08:39:04 +02:00
|
|
|
if ($ann->BodaccNum==0){
|
|
|
|
$libelle = 'Source BODACC '.substr($ann->BodaccCode,-1).
|
|
|
|
' du '.$this->dateAnnonce($ann->DateParution);
|
|
|
|
} else {
|
2011-06-15 15:09:36 +02:00
|
|
|
$view = new Zend_View();
|
2013-11-21 17:31:49 +01:00
|
|
|
$session = new Scores_Session_Entreprise(null);
|
2011-06-15 15:09:36 +02:00
|
|
|
$href = $view->url(array(
|
2012-01-25 17:25:36 +01:00
|
|
|
'controller' => 'juridique',
|
2011-06-15 15:09:36 +02:00
|
|
|
'action' => 'competences',
|
|
|
|
'type' => 'tri',
|
|
|
|
'siret' => $session->getSiret(),
|
2014-08-11 14:11:23 +02:00
|
|
|
), 'default', true);
|
2011-05-02 08:39:04 +02:00
|
|
|
$libelle = 'Source BODACC n°'.$ann->BodaccNum.' '.
|
|
|
|
substr($ann->BodaccCode,-1).
|
|
|
|
' du '.$this->dateAnnonce($ann->DateParution).
|
|
|
|
'. Département n°'.$ann->Departement.
|
2011-06-15 15:09:36 +02:00
|
|
|
'. <a href="'.$href.'">'.$ann->Tribunal.'</a>';
|
2011-05-02 08:39:04 +02:00
|
|
|
}
|
|
|
|
} elseif ($source[0] == 'G' || $source[0] == 'T') {
|
2011-10-28 17:37:25 +02:00
|
|
|
$logo = '/themes/default/images/annonces/logo_greffe.png';
|
2012-12-13 12:15:15 +01:00
|
|
|
$libelle = 'Source Greffe du Tribunal'.
|
|
|
|
' du '.$this->dateAnnonce($ann->DateParution).
|
|
|
|
'. Département n°'.$ann->Departement.
|
|
|
|
'. <a href="'.$href.'">'.$ann->Tribunal.'</a>';
|
2011-05-02 08:39:04 +02:00
|
|
|
} elseif ($source[0] == 'P') {
|
2011-05-02 11:04:46 +02:00
|
|
|
$logo = '/themes/default/images/annonces/logo_inpi.png';
|
2011-05-02 08:39:04 +02:00
|
|
|
$libelle = 'Source Registre National du Commerce';
|
|
|
|
} else {
|
2011-08-03 10:20:41 +02:00
|
|
|
$logo = '/themes/default/images/annonces/logo_jal.png';
|
2011-05-02 08:39:04 +02:00
|
|
|
$libelle = '';
|
2012-05-20 18:31:28 +02:00
|
|
|
$user = new Scores_Utilisateur();
|
2011-06-15 15:10:51 +02:00
|
|
|
if( $user->checkModeEdition() &&
|
2011-05-02 08:39:04 +02:00
|
|
|
(substr($source,0,2)=='JT' || $source=='ANTE') ){
|
|
|
|
$libelle = '<b>Source TESSI</b> - ';
|
|
|
|
}
|
|
|
|
$libelle.= 'Source Journal Annonces Légales';
|
|
|
|
}
|
|
|
|
return '<img src="'.$logo.'" /> '.$libelle.'.';
|
|
|
|
}
|
|
|
|
}
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Enter description here ...
|
|
|
|
* @param unknown_type $ann
|
|
|
|
*/
|
|
|
|
public function getAnnonceEntree($ann)
|
|
|
|
{
|
|
|
|
if ($this->isBalo($ann->BodaccCode)) {
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
return 'Entré n°'.$ann->NumAnnonce.'.';
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
} elseif ($this->isAsso($ann->BodaccCode)) {
|
|
|
|
|
|
|
|
return 'Annonce n°'.$ann->NumAnnonce.'.';
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
} elseif ($this->isBomp($ann->BodaccCode)){
|
|
|
|
return '';
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
} else {
|
|
|
|
|
|
|
|
if ($ann->dateInsertionSD!='') {
|
|
|
|
return ' - Entrée en base : '.
|
|
|
|
$this->dateAnnonce($ann->dateInsertionSD);
|
|
|
|
}
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
}
|
|
|
|
}
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Enter description here ...
|
|
|
|
* @param unknown_type $ann
|
|
|
|
*/
|
|
|
|
public function getAnnonceEntreeSD($ann)
|
|
|
|
{
|
|
|
|
if ($this->isBodacc($annBodaccCode)) {
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
} elseif ($this->isBalo($ann->BodaccCode)) {
|
|
|
|
|
|
|
|
return 'Entrée en base S&D : '.
|
|
|
|
$this->dateAnnonce($ann->dateInsertionSD).'.';
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
} elseif ($this->isAsso($ann->BodaccCode)) {
|
|
|
|
|
|
|
|
return 'Entrée en base S&D : '.
|
|
|
|
$this->dateAnnonce($ann->dateInsertionSD).'.';
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
} elseif ($this->isBomp($ann->BodaccCode)){
|
|
|
|
return '';
|
|
|
|
} else {
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
}
|
|
|
|
}
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Enter description here ...
|
|
|
|
* @param unknown_type $ann
|
|
|
|
*/
|
|
|
|
public function getAnnonceEven($ann)
|
|
|
|
{
|
|
|
|
$output = '';
|
|
|
|
foreach ($ann->evenements->item as $i=>$even) {
|
|
|
|
$output.= $even->LibEven.'<br/>';
|
|
|
|
}
|
|
|
|
return $output;
|
|
|
|
}
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Enter description here ...
|
|
|
|
* @param unknown_type $ann
|
|
|
|
*/
|
|
|
|
public function getAnnonceTexte($ann)
|
|
|
|
{
|
2011-08-03 10:20:41 +02:00
|
|
|
/*
|
|
|
|
$pattern = "/((?:[0-9]{9,9})|(?:[0-9]{3,3} [0-9]{3,3} [0-9]{3,3})|(?:[0-9]{3,3}\.[0-9]{3,3}\.[0-9]{3,3})|(?:[0-9]{3,3}-[0-9]{3,3}-[0-9]{3,3}))/";
|
2012-05-20 18:31:28 +02:00
|
|
|
return preg_replace_callback($pattern, 'replace_siren', $ann['texteAnnonce']);
|
2011-08-03 10:20:41 +02:00
|
|
|
*/
|
2011-05-02 11:04:46 +02:00
|
|
|
return $ann->texteAnnonce;
|
2011-05-02 08:39:04 +02:00
|
|
|
}
|
|
|
|
|
2013-03-20 15:11:53 +01:00
|
|
|
public function getAnnonceEntite($ann)
|
|
|
|
{
|
|
|
|
return $ann->entites->item;
|
|
|
|
}
|
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Enter description here ...
|
|
|
|
* @param unknown_type $ann
|
|
|
|
*/
|
|
|
|
public function getAnnonceResume($ann)
|
|
|
|
{
|
|
|
|
return array(
|
2011-06-15 15:09:36 +02:00
|
|
|
'date' => $this->dateAnnonce($ann->DateParution),
|
2011-05-02 08:39:04 +02:00
|
|
|
'title' => $this->logoTitleAnnonce($ann),
|
2011-06-15 15:09:36 +02:00
|
|
|
'logo' => $this->logoAnnonce($ann),
|
2011-05-02 08:39:04 +02:00
|
|
|
'idAnn' => $ann->id,
|
2011-06-15 15:09:36 +02:00
|
|
|
'lib' => $this->libAnnonce($ann),
|
2011-08-26 16:19:23 +02:00
|
|
|
'texte' => $this->getAnnonceTexte($ann),
|
2013-01-22 16:37:14 +01:00
|
|
|
'type' => $this->getType($ann),
|
|
|
|
'deleted' => $ann->deleted,
|
2011-05-02 08:39:04 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Enter description here ...
|
|
|
|
* @param unknown_type $ann
|
|
|
|
*/
|
|
|
|
protected function hrefAnnonce($ann)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
$href = false;
|
|
|
|
if ($this->isBodacc($ann->BodaccCode)) {
|
|
|
|
$href = 'idan='.$ann->id.'&vue=bodacc';
|
|
|
|
} elseif ($this->isBalo($ann->BodaccCode)) {
|
|
|
|
$href = 'idan='.$ann->id.'&vue=balo';
|
|
|
|
} elseif ($this->isAsso($ann->BodaccCode)) {
|
|
|
|
$href = 'idan='.$ann->id.'&vue=asso';
|
|
|
|
} elseif ($this->isBomp($ann->BodaccCode)){
|
|
|
|
$href = 'idan='.$ann->id.'&vue=bomp';
|
|
|
|
} else {
|
|
|
|
$href = 'idan='.$ann->id.'&vue=bodacc';
|
|
|
|
}
|
|
|
|
return $href;
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Retourne une date formatté
|
|
|
|
* @param string $date
|
|
|
|
*/
|
|
|
|
protected function dateAnnonce($date)
|
|
|
|
{
|
2013-11-06 17:26:14 +01:00
|
|
|
if ( $date!='' ) {
|
|
|
|
$dateS = new Zend_Date($date, 'yyyy-MM-dd');
|
|
|
|
return $dateS->toString('dd/MM/yyyy');
|
|
|
|
}
|
|
|
|
|
|
|
|
return '';
|
2011-05-02 08:39:04 +02:00
|
|
|
}
|
|
|
|
|
2011-08-25 16:34:42 +02:00
|
|
|
protected function logoTitleAnnonce($ann)
|
2011-05-02 08:39:04 +02:00
|
|
|
{
|
|
|
|
$title = '';
|
|
|
|
if ($this->isBalo($ann->BodaccCode)) {
|
|
|
|
$title = 'Source BALO n°'.$annBodaccNum;
|
|
|
|
} elseif ($this->isAsso($ann->BodaccCode)) {
|
|
|
|
$title = 'Source JO ASSOCIATION n°'.$ann->BodaccNum;
|
|
|
|
} elseif ($this->isBomp($ann->BodaccCode)) {
|
|
|
|
if ($ann->BodaccCode == 'MAPA' ) {
|
|
|
|
$title = 'Source '.$ann->BodaccCode . ' ' .
|
|
|
|
($ann->BodaccNum*1);
|
|
|
|
} else {
|
|
|
|
$title = 'Source '.$ann->BodaccCode . ' ' .
|
|
|
|
'n°' . ($ann->BodaccNum*1) . ' de ' .
|
|
|
|
substr($ann->DateParution,0,4);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$tabSource = explode('-', $ann->BodaccCode);
|
|
|
|
$source = $tabSource[0];
|
|
|
|
$idSource = $tabSource[1];
|
|
|
|
if ($source[0] == 'B') {
|
|
|
|
$title = 'Source BODACC ' . $ann->BodaccNum . ' ' .
|
|
|
|
substr($source,-1) . ' ' .
|
|
|
|
'de ' . substr($ann->DateParution,0,4);
|
|
|
|
} else if ($source[0] == 'G' || $source[0] == 'T') {
|
|
|
|
$title = 'Source Collecte Greffe';
|
|
|
|
} else if ($source[0] == 'P') {
|
|
|
|
$title = 'Source Collecte RNCS';
|
|
|
|
} else {
|
|
|
|
$title = 'Source Collecte JAL';
|
|
|
|
if ($idSource>0) $title.= ' '.$idSource;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $title;
|
|
|
|
}
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
/**
|
|
|
|
* logoAnnonce
|
|
|
|
* @param array $ann
|
|
|
|
*/
|
|
|
|
protected function logoAnnonce($ann)
|
|
|
|
{
|
|
|
|
$src = '';
|
|
|
|
if ($this->isBalo($ann->BodaccCode)) {
|
|
|
|
$src = 'logo_jo.png';
|
|
|
|
} elseif ($this->isAsso($ann->BodaccCode)) {
|
|
|
|
$src = 'logo_jo.png';
|
|
|
|
} elseif ($this->isBomp($ann->BodaccCode)) {
|
|
|
|
$src = 'logo_jo.png';
|
|
|
|
} else {
|
|
|
|
$tabSource = explode('-', $ann->BodaccCode);
|
|
|
|
$source = $tabSource[0];
|
|
|
|
if ($source[0] == 'B') {
|
|
|
|
$src = 'logo_jo.png';
|
|
|
|
} else if ($source[0] == 'G' || $source[0] == 'T') {
|
|
|
|
$src = 'logo_greffe.png';
|
|
|
|
} else if ($source[0] == 'P') {
|
|
|
|
$src = 'logo_inpi.png';
|
|
|
|
} else {
|
|
|
|
$src = 'logo_jal.png';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($src != '') {
|
|
|
|
return $src;
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Retourne le libellé de l'annonce
|
|
|
|
* @param array $ann
|
|
|
|
*/
|
|
|
|
protected function libAnnonce($ann)
|
|
|
|
{
|
|
|
|
$lib = '';
|
|
|
|
foreach ($ann->evenements->item as $i=>$even) {
|
|
|
|
$lib.= $even->LibEven;
|
|
|
|
$tabSource = explode('-', $ann->BodaccCode);
|
|
|
|
$source = $tabSource[0];
|
|
|
|
$idSource = $tabSource[1];
|
|
|
|
$numEven = $even->CodeEven*1;
|
|
|
|
if ($numEven>3000 && $numEven<3999) {
|
|
|
|
if (isset($ann->dateEffet)){
|
2013-11-05 15:45:25 +01:00
|
|
|
$date = new Zend_Date($ann->dateEffet, 'yyyy-MM-dd');
|
|
|
|
$lib.= ' (clôture au '.$date->toString('dd/MM/yyyy').')';
|
2011-05-02 08:39:04 +02:00
|
|
|
}
|
|
|
|
}
|
2012-05-20 18:31:28 +02:00
|
|
|
$user = new Scores_Utilisateur();
|
2012-01-12 09:56:42 +01:00
|
|
|
if( $user->checkModeEdition() &&
|
|
|
|
(substr($source,0,2)=='JT' || $source=='ANTE') ){
|
2012-01-12 10:01:47 +01:00
|
|
|
$lib.= ' - <b>(Source TESSI)</b>';
|
2011-05-02 08:39:04 +02:00
|
|
|
}
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
$lib.= '<br/>';
|
|
|
|
}
|
|
|
|
return $lib;
|
|
|
|
}
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
/**
|
|
|
|
* Tri les annonces en fonction de la source
|
|
|
|
*/
|
|
|
|
protected function triAnnonces()
|
|
|
|
{
|
|
|
|
foreach ($this->annonces as $i => $ann)
|
|
|
|
{
|
2011-08-26 16:19:23 +02:00
|
|
|
//Génération id pour tri
|
2013-11-05 15:45:25 +01:00
|
|
|
$date = new Zend_Date($ann->DateParution,'yyyy-MM-dd');
|
|
|
|
$id = $date->toString('yyyyMMdd').':'.$ann->id;
|
2011-05-02 08:39:04 +02:00
|
|
|
if ($this->isBodacc($ann->BodaccCode)){
|
2011-09-01 14:21:18 +02:00
|
|
|
$this->annoncesBodacc[$id] = $ann;
|
2011-05-02 08:39:04 +02:00
|
|
|
} elseif ($this->isBalo($ann->BodaccCode)) {
|
2011-09-01 14:21:18 +02:00
|
|
|
$this->annoncesBalo[$id] = $ann;
|
2011-05-02 08:39:04 +02:00
|
|
|
} elseif ($this->isAsso($ann->BodaccCode)) {
|
2011-09-01 14:21:18 +02:00
|
|
|
$this->annoncesAsso[$id] = $ann;
|
2011-05-02 08:39:04 +02:00
|
|
|
} elseif ($this->isBomp($ann->BodaccCode)){
|
2011-09-01 14:21:18 +02:00
|
|
|
$this->annoncesBomp[$id] = $ann;
|
2011-05-02 08:39:04 +02:00
|
|
|
} else {
|
2011-09-01 14:21:18 +02:00
|
|
|
$this->annoncesBodacc[$id] = $ann;
|
2011-05-02 08:39:04 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-05-20 18:31:28 +02:00
|
|
|
public function getAnnee($ann)
|
2012-03-02 14:54:47 +01:00
|
|
|
{
|
2013-11-05 15:45:25 +01:00
|
|
|
$date = new Zend_Date($ann->DateParution,'yyyy-MM-dd');
|
|
|
|
return $date->toString('yyyy');
|
2012-03-02 14:54:47 +01:00
|
|
|
}
|
2012-05-20 18:31:28 +02:00
|
|
|
|
|
|
|
public function getNum($ann)
|
2012-03-02 14:54:47 +01:00
|
|
|
{
|
|
|
|
return $ann->BodaccNum;
|
|
|
|
}
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-05-02 11:04:46 +02:00
|
|
|
public function getType($ann)
|
|
|
|
{
|
|
|
|
if ($this->isBodacc($ann->BodaccCode)){
|
|
|
|
return 'bodacc';
|
|
|
|
} elseif ($this->isBalo($ann->BodaccCode)) {
|
|
|
|
return 'balo';
|
|
|
|
} elseif ($this->isAsso($ann->BodaccCode)) {
|
|
|
|
return 'asso';
|
|
|
|
} elseif ($this->isBomp($ann->BodaccCode)){
|
|
|
|
return 'bomp';
|
|
|
|
} else {
|
|
|
|
return 'bodacc';
|
|
|
|
}
|
|
|
|
}
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2011-07-01 14:44:12 +02:00
|
|
|
public function getCode($ann)
|
|
|
|
{
|
|
|
|
return $ann->BodaccCode;
|
|
|
|
}
|
2012-05-20 18:31:28 +02:00
|
|
|
|
2013-01-22 16:37:14 +01:00
|
|
|
public function isDeleted($ann)
|
|
|
|
{
|
2013-01-22 17:20:12 +01:00
|
|
|
if ($ann->deleted!='') {
|
|
|
|
return $this->dateAnnonce($ann->deleted);
|
|
|
|
}
|
|
|
|
return '';
|
2013-01-22 16:37:14 +01:00
|
|
|
}
|
|
|
|
|
2011-05-02 08:39:04 +02:00
|
|
|
/**
|
|
|
|
* Détermine si l'annonce est une annonce BODACC
|
|
|
|
* @param string $code
|
|
|
|
*/
|
|
|
|
protected function isBodacc($code)
|
|
|
|
{
|
|
|
|
if (in_array($code, array('BODA', 'BODB', 'BODC'))){
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Détermine si l'annonce est une annonce BALO
|
|
|
|
* @param string $code
|
|
|
|
*/
|
|
|
|
protected function isBalo($code)
|
|
|
|
{
|
|
|
|
if ($code == 'BALO'){
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Détermine si l'annonce est une annonce ASSO
|
|
|
|
* @param string $code
|
|
|
|
*/
|
|
|
|
protected function isAsso($code)
|
|
|
|
{
|
|
|
|
if ($code == 'ASSO'){
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Détermine si l'annonce est une annonce BOAMP
|
|
|
|
* @param string $code
|
|
|
|
*/
|
|
|
|
protected function isBomp($code)
|
|
|
|
{
|
|
|
|
if (in_array($code, array('BOMP A', 'BOMP B', 'BOMP C', 'MAPA'))){
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|