Merge for tag 2.5-20140317

This commit is contained in:
Michael RICOIS 2014-03-14 10:42:09 +00:00
parent e08564bad5
commit 38df487e08
98 changed files with 8433 additions and 471 deletions

View File

@ -0,0 +1,2 @@
<?php
return array();

View File

@ -1372,4 +1372,33 @@ class FinanceController extends Zend_Controller_Action
}
}
/**
* Affichage en ajax des informations dernière date de cloture du bilan et etat de saisie
*/
public function liasseinfosAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$siren = $request->getParam('siren');
$ws = new WsScores();
$response = $ws->getEntrepriseLiasseInfos($siren);
Zend_Registry::get('firebug')->info($response);
if ( $response === null ) {
$this->view->assign('msg','Aucun bilan déposé.');
} else {
$date = new Zend_Date($response->DateCloture, 'yyyy-MM-dd');
$this->view->assign('DateCloture', $date->toString('dd/MM/yyyy'));
$this->view->assign('DateClotureIso', $response->DateCloture);
if ( $response->SaisieDate!='' || $response->SaisieDate!='0000-00-00' ) {
$this->view->assign('SaisieDateIso', $response->SaisieDate);
$date = new Zend_Date($response->SaisieDate, 'yyyy-MM-dd');
$this->view->assign('SaisieDate', $date->toString('dd/MM/yyyy'));
}
$this->view->assign('SaisieLabel', $response->SaisieLabel);
}
}
}

View File

@ -589,6 +589,10 @@ class IdentiteController extends Zend_Controller_Action
if ($identite->PpPm=='PP') {
$this->view->assign('PP', true);
$this->view->assign('nom', $identite->nom);
$this->view->assign('prenom', $identite->prenom);
$this->view->assign('civilite', $identite->civilite);
$this->view->assign('naissanceDate', $identite->naissanceDate);
}
//Get links
@ -626,6 +630,21 @@ class IdentiteController extends Zend_Controller_Action
if ( ($session->getFormeJuridique()>=1000 && $session->getFormeJuridique()<=1999)
|| ($session->getFormeJuridique()>=10 && $session->getFormeJuridique()<=19) ) {
$this->view->assign('PP', true);
//@todo : using this function is strange - How to get the id before ?
$result = $ws->searchLienRef($siren, 'siren');
if (count($result->item)>0) {
foreach ($result->item as $item) {
$id = $item->id;
break;
}
}
$result = $ws->getLienRef($id);
$this->view->assign('nom', $result->nom);
$this->view->assign('prenom', $result->prenom);
$this->view->assign('civilite', $result->civilite);
$this->view->assign('naissanceDate', $result->naissance_Date);
}
if ( in_array($session->getFormeJuridique(), array(5488,5498,5720)) ) {

View File

@ -48,6 +48,205 @@ class SaisieController extends Zend_Controller_Action
array( "triId"=>"1798", "triCode"=>"AGENL", "triNom"=>"Cour d'Appel d'Agen", "triCP"=>"47916" ),
);
protected $codVoie = array(
'ABE' => "Abbaye",
'AGL' => "Agglomération",
'AIRE' => "Aire",
'ALL' => "Allée",
'ALL' => "Allee",
'ACH' => "Ancien chemin",
'ART' => "Ancienne route",
'ANSE' => "Anse",
'ARC' => "Arcade",
'AUT' => "Autoroute",
'AV' => "Avenue",
'BRE' => "Barrière",
'BCH' => "Bas chemin",
'BSTD' => "Bastide",
'BAST' => "Baston",
'BEGI' => "Beguinage",
'BER' => "Berge",
'BOIS' => "Bois",
'BCLE' => "Boucle",
'BD' => "Boulevard",
'BRG' => "Bourg",
'BUT' => "Butte",
'CALE' => "Cale",
'CAMP' => "Camp",
'CGNE' => "Campagne",
'CPG' => "Camping",
'CARR' => "Carré",
'CAU' => "Carreau",
'CAR' => "Carrefour",
'CARE' => "Carrière",
'CST' => "Castel",
'CAV' => "Cavée",
'CTRE' => "Central",
'CTRE' => "Centre",
'CHL' => "Chalet",
'CHP' => "Chapelle",
'CHI' => "Charmille",
'CHT' => "Château",
'CHS' => "Chaussée",
'CHE' => "Chemin",
'CHV' => "Chemin vicinaux",
'CHV' => "Chemin vicinal",
'CHEM' => "Cheminement",
'CITE' => "Cîte",
'CLOI' => "Cloître",
'CLOS' => "Clos",
'COL' => "Col",
'COLI' => "Colline",
'CTR' => "Contour",
'COR' => "Corniche",
'COTE' => "Côte",
'COTT' => "Cottage",
'COUR' => "Cour",
'CRS' => "Cours",
'DARS' => "Darse",
'DEG' => "Degré",
'DSG' => "Descente",
'DSC' => "Descente",
'DIG' => "Digue",
'DOM' => "Domaine",
'ECA' => "Ecart",
'ECL' => "Ecluse",
'EGL' => "Eglise",
'EN' => "Enceinte",
'ENV' => "Enclave",
'ENC' => "Enclos",
'ESC' => "Escalier",
'ESPA' => "Espace",
'ESP' => "Esplanade",
'ETING' => "Etang",
'FG' => "Faubourg",
'FRM' => "Ferme",
'FON' => "Fontaine",
'FORT' => "Fort",
'FORM' => "Forum",
'FOS' => "Fosse",
'FOYR' => "Foyer",
'GAL' => "Galerie",
'GARE' => "Gare",
'GARN' => "Garenne",
'GBD' => "Grand boulevard",
'GDEN' => "Grande ensemble",
'GR' => "Grande rue",
'GRI' => "Grille",
'GRIM' => "Grimpette",
'GPE' => "Groupe",
'GPT' => "Groupement",
'HLE' => "Halle",
'HAM' => "Hameau",
'HCH' => "Haut chemin",
'HIP' => "Hippodrome",
'HLM' => "HLM",
'ILE' => "Ile",
'IMM' => "Immeuble",
'IMP' => "Impasse",
'JARD' => "Jardin",
'JTE' => "Jetée",
'LEVE' => "Levée",
'LD' => "Lieu dit",
'LD' => "Lieudit",
'LOT' => "Lotissement",
'MAIL' => "Mail",
'MF' => "Maison forestière",
'MAN' => "Manoir",
'MAR' => "Marche",
'MAS' => "Mas",
'MET' => "Métro",
'MTE' => "Montée",
'MLN' => "Moulin",
'MUS' => "Musée",
'NTE' => "Nouvelle route",
'PAL' => "Palais",
'PARC' => "Parc",
'PKG' => "Parking",
'PRV' => "Parvis",
'PAS' => "Passage",
'PN' => "Passage à niveau",
'PASS' => "Passe",
'PLE' => "Passerelle",
'PAT' => "Patio",
'PAV' => "Pavillon",
'PERI' => "Périphérique",
'PSTY' => "Péristyle",
'PTA' => "Petites allée",
'PCH' => "Petit chemin",
'PAE' => "Petite avenue",
'PIM' => "Petite impasse",
'PRT' => "Petite route",
'PTR' => "Petite rue",
'PL' => "Place",
'PLCI' => "Placis",
'PLAG' => "Plage",
'PLN' => "Plaine",
'PLAN' => "Plan",
'PLT' => "Plateau",
'PNT' => "Pointe",
'PONT' => "Pont",
'PCH' => "Porche",
'PORT' => "Port",
'PTE' => "Porte",
'PORQ' => "Portique",
'POT' => "Poterne",
'POUR' => "Pourtour",
'PRE' => "Pré",
'PRQ' => "Presqu'île",
'PROM' => "Promenade",
'QU' => "Quai",
'QUAI' => "Quai",
'QUA' => "Quartier",
'RAC' => "Raccourci",
'RAID' => "Raidillon",
'RPE' => "Rampe",
'REM' => "Rempart",
'RES' => "Résidence",
'ROC' => "Roc",
'ROC' => "Rocade",
'RPT' => "Rond point",
'ROQT' => "Roquet",
'RTD' => "Rotonde",
'RTE' => "Route",
'R' => "Rue",
'RUE' => "Rue",
'RLE' => "Ruelle",
'SEN' => "Sente",
'SEN' => "Sentier",
'SQ' => "Square",
'STDE' => "Stade",
'STA' => "Station",
'TPL' => "Terre plein",
'TRN' => "Terrain",
'TSSE' => "Terrasse",
'TRT' => "Tertre",
'TOUR' => "Tour",
'TRA' => "Traverse",
'VAL' => "Vallon",
'VAL' => "Vallée",
'VEN' => "Venelle",
'VIA' => "Via",
'VTE' => "Vieille route",
'VCHE' => "Vieux chemin",
'VLA' => "Villa",
'VGE' => "Village",
'VLGE' => "Village",
'VOI' => "Voie",
'VOIE' => "Voie",
'ZONE' => "Zone",
'ZAC' => "Zone d'aménagement concerté",
'Z A C' => "Zone d'aménagement concerté",
'ZAD' => "Zone d'aménagement différé",
'Z A D' => "Zone d'aménagement différé",
'ZA' => "Zone artisanale",
'Z A' => "Zone artisanale",
'ZI' => "Zone industrielle",
'Z I' => "Zone industrielle",
'ZUP' => "Zone à urbaniser en priorité",
'Z U P' => "Zone à urbaniser en priorité",
);
/**
* Retourne Fonctions de direction
*/
@ -2287,6 +2486,26 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('output', $output);
}
public function codvoieAction()
{
$this->_helper->layout()->disableLayout();
$codvoie = $this->getRequest()->getParam('codvoie', null);
$output = array();
if ( null !== $codvoie) {
foreach($this->codVoie as $key=>$val){
if (stripos($key, $codvoie)!==false || stripos($val, $codvoie)!==false){
$output[] = array(
'label' => $key.": ".$val,
'value' => $key
);
}
}
}
$this->view->assign('output', $output);
}
/**
* Edit contact information
*/

View File

@ -140,10 +140,15 @@ class SurveillanceController extends Zend_Controller_Action
$delete = $request->getParam('delete', false);
$encours = $request->getParam('encours', 0);
$validateur = new Zend_Validate_EmailAddress();
//Vérification siret / email / ref
if (empty($siret) || empty($email) | empty($ref)){
if (empty($siret) || empty($email) || empty($ref)){
$msg = 'Erreur email ou reférence non définie !';
}
elseif (!$validateur->isValid($email)) {
$msg = "Email invalide.";
}
//Vérification de l'encours (chiffres)
elseif (!preg_match('/([0-9]+)/', $encours)){
$msg = 'Encours incorrect';

View File

@ -54,11 +54,12 @@ class TelechargementController extends Zend_Controller_Action
$client = new Zend_Http_Client($url);
$client->setStream();
$response = $client->request('GET');
if ( $response->isSuccessful() && copy($response->getStreamName(), $this->path.'/'.$file) ) {
if ( $response->isSuccessful() ) {
if ( copy($response->getStreamName(), $this->path.'/'.$file) ) {
return $file;
} else {
return false;
}
}
return false;
} catch (Zend_Http_Client_Exception $e) {
return false;
}

View File

@ -5,8 +5,8 @@
<?php if (empty($this->AutrePage)) {?>
<h1>ÉLÉMENTS FINANCIERS - BILANS</h1>
<div class="paragraph">
<table class="identite">
<tr>
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">
Num&eacute;ro identifiant Siren
@ -14,14 +14,14 @@
<td width="350" class="StyleInfoData">
<?php echo $this->SirenTexte($this->siren);?>
</td>
</tr>
<tr>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Dénomination Sociale</td>
<td width="350" class="StyleInfoData"><?php echo $this->raisonSociale;?></td>
</tr>
<?php if (isset($this->tabResultActif) && isset($this->tabResultPassif) && isset($this->tabResultSig)){?>
<tr>
</tr>
<?php if (isset($this->tabResultActif) && isset($this->tabResultPassif) && isset($this->tabResultSig)){?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Type de bilans</td>
<td width="350" class="StyleInfoData">
@ -38,9 +38,19 @@
</form>
<?php }?>
</td>
</tr>
<?php }?>
</table>
</tr>
<?php }?>
</table>
<?php if ( empty($this->AutrePage) ) {?>
<div id="liasse-check-result" class="ui-state-highlight ui-corner-all" style="margin-top: 5px;">
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
<a title="Cliquez ici pour vérifier l'intégration des éléments financiers"
href="<?=$this->url(array('controller'=>'finance','action'=>'liasseinfos','siren'=>$this->siren), null, true)?>"
id="liasse-check">Vérifier la disponibilité des derniers états financiers au Greffe.</a></p>
</div>
<?php }?>
</div>
<?php }?>
@ -195,10 +205,10 @@
<?php }?>
<?php if (empty($this->AutrePage)) {?>
<?php if ( empty($this->AutrePage) ) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>
<?php }?>
<?php if (empty($this->AutrePage)) {?>
<?php if ( empty($this->AutrePage) ) {?>
</div>
<?php }?>

View File

@ -13,7 +13,7 @@
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
</tr>
<?php if($this->haveLiasse):?>
<?php if ( $this->haveLiasse ) {?>
<form method="post" action="<?=$this->url(array('controller'=>'finance','action'=>'liasse','siret'=>$this->siret,'id'=>$this->id))?>">
<tr>
<td width="30">&nbsp;</td>
@ -44,13 +44,13 @@
</td>
</tr>
</form>
<?php endif;?>
<?php }?>
<?php if ($this->edition) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2">
<?php if ($this->haveLiasse) {?>
<?php if ( $this->haveLiasse ) {?>
<a href="<?=$this->url(array('controller'=>'saisie', 'action'=>'liasse', 'siret'=>$this->siren, 'selection'=>$this->date.':'.$this->champType))?>">
Corriger le bilan sélectionné</a><br/> ou <?php }?>
Saisir une nouvelle liasse au format
@ -110,6 +110,16 @@
</tr>
<?php }?>
</table>
<?php if ( empty($this->AutrePage) && $this->haveLiasse) {?>
<div id="liasse-check-result" class="ui-state-highlight ui-corner-all" style="margin-top: 5px;">
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
<a title="Cliquez ici pour vérifier l'intégration des éléments financiers"
href="<?=$this->url(array('controller'=>'finance','action'=>'liasseinfos','siren'=>$this->siren), null, true)?>"
id="liasse-check">Vérifier la disponibilité des derniers états financiers au Greffe.</a></p>
</div>
<?php }?>
</div>
<div class="paragraph">

View File

@ -2505,46 +2505,31 @@
<td align="right" class="amount-value"><?php echo $this->liasse['VM2'];?></td>
</tr>
<tr>
<td>T.V.A.</td>
<td colspan="3">T.V.A.</td>
<td align="center">VB</td>
<td align="right" class="amount-value"><?php echo $this->liasse['VB'];?></td>
<td></td>
<td align="right" class="amount-value"><?php echo $this->liasse['VB1'];?></td>
<td></td>
<td align="right" class="amount-value"><?php echo $this->liasse['VB2'];?></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Autres impôts, taxes et versem. assim.</td>
<td colspan="3">Autres impôts, taxes et versem. assim.</td>
<td align="center">VN</td>
<td align="right" class="amount-value"><?php echo $this->liasse['VN'];?></td>
<td></td>
<td align="right" class="amount-value"><?php echo $this->liasse['VN1'];?></td>
<td></td>
<td align="right" class="amount-value"><?php echo $this->liasse['VN2'];?></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Divers</td>
<td colspan="3">Divers</td>
<td align="center">VP</td>
<td align="right" class="amount-value"><?php echo $this->liasse['VP'];?></td>
<td></td>
<td align="right" class="amount-value"><?php echo $this->liasse['VP1'];?></td>
<td></td>
<td align="right" class="amount-value"><?php echo $this->liasse['VP2'];?></td>
<td></td>
<td></td>
</tr>
<tr>
<td align="center" colspan="3"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="3">Groupes et associés</td>

View File

@ -0,0 +1,18 @@
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
<?php if ( $this->DateClotureIso ) { ?>
Le dernier millésime déposé au greffe est le <?=$this->DateCloture?>.
<?php if ( $this->SaisieDateIso && $this->SaisieCode=='00' ) {?>
Le bilan a été saisie le <?=$this->SaisieDate?>.
<?php } else {?>
Le bilan n'a pas été saisie par la source officielle (<i><?=$this->SaisieLabel?>)</i>.
<br/>Contactez le support (support@scores-decisions.com) pour une demande de mise à jour.
(Soumis à facturation selon vos accords contractuels)
<?php }?>
<?php } else {?>
<?=$this->msg?>
<?php }?>
</p>

View File

@ -1,8 +1,8 @@
<?php if (empty($this->AutrePage)):?>
<?php if ( empty($this->AutrePage) ) {?>
<div id="center">
<?php endif;?>
<?php }?>
<?php if (empty($this->AutrePage)):?>
<?php if ( empty($this->AutrePage) ) {?>
<h1>RATIOS</h1>
<div class="paragraph">
<table class="identite">
@ -21,7 +21,7 @@
<td class="StyleInfoLib" width="200">Secteur d'activité </td>
<td class="StyleInfoData" width="340"><?=$this->naf?> - <?=$this->nafLib?></td>
</tr>
<?php if (isset($this->tabResult)){?>
<?php if ( isset($this->tabResult) ) {?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Type de bilans</td>
@ -67,8 +67,18 @@
</tr>
<?php }?>
</table>
<?php if ( empty($this->AutrePage) && isset($this->tabResult) ) {?>
<div id="liasse-check-result" class="ui-state-highlight ui-corner-all" style="margin-top: 5px;">
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
<a title="Cliquez ici pour vérifier l'intégration des éléments financiers"
href="<?=$this->url(array('controller'=>'finance','action'=>'liasseinfos','siren'=>$this->siren), null, true)?>"
id="liasse-check">Vérifier la disponibilité des derniers états financiers au Greffe.</a></p>
</div>
<?php endif;?>
<?php }?>
</div>
<?php }?>
<div class="paragraph">
@ -145,7 +155,7 @@
</div>
<?php if (empty($this->AutrePage)):?>
<?php if ( empty($this->AutrePage) ) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>
</div>
<?php endif;?>
<?php }?>

View File

@ -1,37 +0,0 @@
<div id="paragraph">
<h2>Synthese</h2>
<?php if(!empty($this->annees)):?>
<h2>Eléments Financiers</h2>
<?php $i = 0;?>
<table id="synthese">
<tr>
<th></th>
<?php foreach ($this->annees as $annee => $duree):?>
<th class="date" colspan="2"><?php echo $annee;?><br /><?php echo $duree;?> Mois</th>
<?php endforeach;?>
</tr>
<?php foreach ($this->synthese as $champ => $element):?>
<?php $nom = explode(':', $champ);?>
<tr>
<td style="cursor:help" class="tooltip" title="<?php echo $this->commentaires[$nom[0]]['commentaires'];?>" class="head">
<b><?php echo $nom[1];?></b>
</td>
<?php foreach ($element as $item):?>
<td><?php echo number_format($item['Valeur'], 0, '', ' ');?> K€</td>
<td><?php echo $item['percent'];?> %</td>
<?php endforeach;?>
</tr>
<?php $i++;?>
<?php endforeach;?>
</table>
<?php else :?>
<table>
<tr>
<td width="30"></td>
<td colspan="2" valign="top" width="350" class="StyleInfoData">Aucune synthése diponnible.</td>
</tr>
</table>
<?php endif;?>
<?=$this->render('cgu.phtml', $this->cgu)?>
</div>

View File

@ -1,6 +1,6 @@
<?php if (empty($this->AutrePage)):?>
<?php if ( empty($this->AutrePage) ) {?>
<div id="center">
<?php endif;?>
<?php }?>
<?php if (empty($this->AutrePage)){?>
<h1>SYNTHÈSE</h1>
@ -41,6 +41,16 @@
</tr>
<?php }?>
</table>
<?php if ( empty($this->AutrePage) ) {?>
<div id="liasse-check-result" class="ui-state-highlight ui-corner-all" style="margin-top: 5px;">
<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
<a title="Cliquez ici pour vérifier l'intégration des éléments financiers"
href="<?=$this->url(array('controller'=>'finance','action'=>'liasseinfos','siren'=>$this->siren), null, true)?>"
id="liasse-check">Vérifier la disponibilité des derniers états financiers au Greffe.</a></p>
</div>
<?php }?>
</div>
<?php }?>
@ -117,7 +127,7 @@ Aucun bilan disponible.
<?php }?>
<?php if (empty($this->AutrePage)):?>
<?php if ( empty($this->AutrePage) ) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>
</div>
<?php endif;?>
<?php }?>

View File

@ -42,19 +42,13 @@
</table>
</div>
<h2>&Eacute;tablissements</h2>
<?php if (count($this->etabs)>0) { ?>
<div class="paragraph">
<table style="width:100%;">
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<table>
<?php
if (count($this->etabs)>0)
{
foreach ($this->etabs as $etab)
{
<table class="data">
<?php foreach ($this->etabs as $etab) { ?>
<?php
if ($etab->Siege==1) $type = 'siège ';
else $type = 'établ. ';
@ -71,11 +65,11 @@
));
?>
<tr>
<td class="StyleInfoData" width="30">
<td class="StyleInfoData" width="50" valign="top">
<b><a title="<?=$this->translate("Voir la fiche d'identité")?>" href="<?=$href?>"><?=$etab->Nic?></a></b>
</td>
<td class="StyleInfoData" width="80"><?=$type?></td>
<td class="StyleInfoData" width="190">
<td class="StyleInfoData" width="70" valign="top"><?=$type?></td>
<td class="StyleInfoData" width="250">
<?php
if ($etab->Enseigne!='') {
?>
@ -96,7 +90,7 @@
if ($etab->Fax!='') echo '<br/><i>Fax : '.$etab->Fax.'</i>';
?>
</td>
<td class="StyleInfoData" width="260">
<td class="StyleInfoData" valign="top">
<?=$etab->NafEtab.' : '.$etab->NafEtabLib?>
<?php
if ($etab->Actif==1 && !empty($etab->EffEtTrLib) && !empty($etab->EffEtTr) && !in_array($etab->EffEtTr, array('N/C', 'NN', 0)) ){
@ -107,25 +101,20 @@
?>
</td>
</tr>
<?php
}
}
?>
</table>
</td>
</tr>
<?php if($this->hasPrefCarte){?>
<tr>
<td align="center" colspan="3">
<?=$this->action('carte', 'identite', null, array('siret'=>$this->siret, 'id'=>$this->id, 'actif'=>$this->actif) )?>
</td>
</tr>
<?php }?>
<?php } ?>
</table>
</div>
<?php if (empty($this->AutrePage)):?>
<?php if($this->hasPrefCarte){?>
<div class="paragraph">
<?=$this->action('carte', 'identite', null, array('siret'=>$this->siret, 'id'=>$this->id, 'actif'=>$this->actif) )?>
</div>
<?php }?>
<?php } ?>
<?php if ( empty($this->AutrePage) ) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>
<?php endif;?>
<?php }?>
</div>

View File

@ -1,8 +1,10 @@
<?php if (count($this->docs)==0) {?>
Aucun document.
<?php } else {?>
<?php foreach ( $this->docs as $doc ) {?>
<?php } else {
$limit = 3;
foreach ( $this->docs as $key=>$doc ) {
$class = ($key<$limit)?'first':'all';?>
<div class="<?=$class?>" id="<?=$key ?>">
<a target="_blank" href="/fichier/groupes/<?=$doc->url?>" id="<?=$doc->date?>" class="lienDocDate"><?=$doc->label?></a>
<?php if ($this->edition) {?>
<a class="dialog" title="Supprimer le document" href="<?=$this->url(array('controller'=>'saisie','action'=>'liendoc','mode'=>'delete','id'=>$doc->id), null, true)?>">
@ -10,6 +12,29 @@ Aucun document.
</a>
<?php }?>
<br/>
</div>
<?php }?>
<div class="affiche" id="show" style="cursor:pointer;">Afficher tous les documents</div><br/>
<script>
$(document).ready(function(){
if (<?=$key?> >2) {
$("div.affiche").show();
} else {
$("div.affiche").hide();
}
$("div.all").hide();
});
$("div.affiche").on("click", function(){
if ($(this).attr("id")=="show") {
$(this).attr("id", "hide");
$(this).text("Afficher les <?=$limit?> derniers documents");
$("div.all").show();
} else {
$(this).attr("id", "show");
$(this).text("Afficher tous les documents");
$("div.all").hide();
}
});
</script>
<?php }?>

View File

@ -1,8 +1,8 @@
<div>
<?php if ($this->result->PpPm == 'PP') {?>
<?php if (!empty($this->result->civilite)) {?>
<?=$this->result->civilite?>&nbsp;
<?php $sexe=($this->result->civilite=='M')?'':'e';?>
<?php }?>
<?php if (!empty($this->result->nom)) {?>
<?=$this->result->nom?>&nbsp;
@ -14,7 +14,8 @@
(<?=$this->result->nomUsage?>)&nbsp;
<?php }?>
<?php if (!empty($this->result->naissanceDate) && $this->result->naissanceDate!='0000-00-00') {?>
<br/>Née le <?=$this->result->naissanceDate?>&nbsp;
<?php $date = new Zend_Date($this->result->naissanceDate, 'YYYY-MM-dd')?>
<br/><?=$sexe;?> le <?=$date->toString('dd/MM/yyyy');?>&nbsp;
<?php }?>
<?php if (!empty($this->result->naissanceLieu)) {?>
à <?=$this->result->naissanceLieu?>&nbsp;
@ -88,3 +89,16 @@ else
<div><?=$id->label?> - <?=$id->num?></div>
<?php }?>
<?php }?>
<?php if ($this->result->PpPm == 'PP') {
$param = array(
'controller'=>'recherche',
'action'=>'dirigeant',
'dirNom'=>$this->result->nom,
'dirPrenom'=>$this->result->prenom,
'dirDateNaissJJ' =>$date->get('dd'),
'dirDateNaissMM' =>$date->get('MM'),
'dirDateNaissAAAA' =>$date->get('YYYY')
);
?>
<br/><a href="<?=$this->url($param,null,true);?>">Lancer une recherche dirigeant</a>
<?php } ?>

View File

@ -96,6 +96,26 @@
<a class="confirm" title="Fiche suppression" href="<?=$hrefSuppr; ?>">Supprimer la fiche</a>
</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"></td>
<td width="350" class="StyleInfoLib">
<?php
if ($this->PP) {
$date = new Zend_Date($this->naissanceDate, 'YYYY-MM-dd');
$param = array(
'controller'=>'recherche',
'action'=>'dirigeant',
'dirNom'=>$this->nom,
'dirPrenom'=>$this->prenom,
'dirDateNaissJJ' =>$date->get('dd'),
'dirDateNaissMM' =>$date->get('MM'),
'dirDateNaissAAAA' =>$date->get('YYYY')
);
?>
<a href="<?=$this->url($param,null,true);?>">Lancer une recherche dirigeant</a><?php }?>
</td>
</tr>
<?php }?>
</table>
</div>

View File

@ -0,0 +1,21 @@
<?php echo $this->doctype()?>
<html>
<head>
<?php echo $this->headMeta()?>
<?php echo $this->headTitle()?>
<?php echo $this->headLink()?>
<?php echo $this->headScript()?>
</head>
<body>
<div id="global">
<?php echo $this->render('header.phtml')?>
<div id="content">
<?php echo $this->layout()->content?>
<div id="footer">
<?php echo $this->render('footer.phtml')?>
</div>
</div>
</div>
<?php echo $this->inlineScript()?>
</body>
</html>

View File

@ -8,9 +8,8 @@ $disponible = true;
if($this->partial()->view->KbisErreurCJ || $this->partial()->view->KbisErreurDEP){
$disponible = false;
}
if($disponible){
if( $this->partial()->view->permSurvPriv ){
?>
if ( $disponible ) { ?>
<?php if( $this->partial()->view->permSurvPriv ) { ?>
<input class="noborder type" type="checkbox" name="privileges[]" value="SprivSurv" <?=is_array($this->partial()->view->privileges) && in_array('SprivSurv',$this->partial()->view->privileges) ? 'checked' : ''?>/><b>Privilèges de la sécurité sociale et des régimes complémentaires et Trésor Public <br/>(avec surveillance, retour sous 48 à 72h)</b><br/>
<br/>
<?php } ?>
@ -21,23 +20,15 @@ if($disponible){
<input class="noborder type" type="checkbox" name="privileges[]" value="nantVend" <?=is_array($this->partial()->view->privileges) && in_array('nantVend',$this->partial()->view->privileges) ? 'checked' : ''?>/>Privilèges du vendeur de fonds de commerce et d'action résolutoire<br/>
<input class="noborder type" type="checkbox" name="privileges[]" value="declCrea" <?=is_array($this->partial()->view->privileges) && in_array('declCrea',$this->partial()->view->privileges) ? 'checked' : ''?>/>Déclarations de créances<br/>
<?php
}else{
?>
<?php } else { ?>
<input class="noborder type" type="checkbox" name="privileges[]" value="privSecu" <?=is_array($this->partial()->view->privileges) && in_array('privSecu',$this->partial()->view->privileges) ? 'checked' : ''?>/>Privilèges de la sécurité sociale et des régimes complémentaires<br/>
<input class="noborder type" type="checkbox" name="privileges[]" value="privTres" <?=is_array($this->partial()->view->privileges) && in_array('privTres',$this->partial()->view->privileges) ? 'checked' : ''?>/>Privilèges du Trésor Public<br/>
<input class="noborder type" type="checkbox" name="privileges[]" value="nantCompl" <?=is_array($this->partial()->view->privileges) && in_array('nantCompl',$this->partial()->view->privileges) ? 'checked' : ''?>/>Etat complet des nantissements<br/>
<?php
}
?>
<?php } ?>
<br/>
<?php
if(!$disponible) {
?>
<?php if ( !$disponible ) { ?>
<p><i>Les pièces demandées seront commandées par courrier auprès du greffe. Prévoir un délai de 2 à 3 semaines.</i></p>
<?php
}
?>
<?php } ?>
</div>
<div id="privilegesM">

View File

@ -0,0 +1 @@
<?=json_encode($this->output)?>

View File

@ -312,6 +312,20 @@ $('a#google').on('click', function(e){
window.open('https://www.google.fr/#q='+encodeURIComponent(val));
});
$('input[name=adresse_codvoie]').autocomplete({
minLength: 2,
delay: 250,
source: function(request, response) {
var codvoie = $('input[name=adresse_codvoie]').val();
$.getJSON('<?=$this->url(array('controller'=>'saisie','action'=>'codvoie'),null,true)?>', { codvoie: codvoie },
function(data) { response(data); }
);
},
select: function( event, ui ) {
$('input[name=adresse_codvoie]').attr('value', ui.item.value);
}
});
$(document).ready(function(){
var code = $('select[name=adresse_pays]').val();
$('span#indTel').text('+'+countries[code]['indTel']);

View File

@ -195,7 +195,7 @@ $('input[name=isin]').change(function(e){
});
});
function cpville(inputFld, outputFld, countrySel=null, countryVal=null) {
function cpville(inputFld, outputFld, countrySel, countryVal) {
$('input[name='+inputFld+']').autocomplete({
minLength: 4,
delay: 250,
@ -217,10 +217,23 @@ function cpville(inputFld, outputFld, countrySel=null, countryVal=null) {
$('select[name='+countrySel+']').val(countryVal);
}
}
})
});
}
cpville('adresse_cp', 'adresse_ville');
$('input[name=adresse_codvoie]').autocomplete({
minLength: 2,
delay: 250,
source: function(request, response) {
var codvoie = $('input[name=adresse_codvoie]').val();
$.getJSON('<?=$this->url(array('controller'=>'saisie','action'=>'codvoie'),null,true)?>', { codvoie: codvoie },
function(data) { response(data); }
);
},
select: function( event, ui ) {
$('input[name=adresse_codvoie]').attr('value', ui.item.value);
}
});
</script>
<?php } else {?>

View File

@ -93,7 +93,7 @@ $('input[name=naissance_date]').datepicker({ changeMonth: true, changeYear: true
</div>
<script>
function cpville(inputFld, outputFld, countrySel=null, countryVal=null) {
function cpville(inputFld, outputFld, countrySel, countryVal) {
$('input[name='+inputFld+']').autocomplete({
minLength: 4,
delay: 250,
@ -115,11 +115,24 @@ function cpville(inputFld, outputFld, countrySel=null, countryVal=null) {
$('select[name='+countrySel+']').val(countryVal);
}
}
})
});
}
cpville('adresse_cp', 'adresse_ville', 'adresse_pays', 'FRA');
cpville('naissance_lieu', 'naissance_lieu', 'naissance_dept_pays', 'FRA');
$('input[name=adresse_codvoie]').autocomplete({
minLength: 2,
delay: 250,
source: function(request, response) {
var codvoie = $('input[name=adresse_codvoie]').val();
$.getJSON('<?=$this->url(array('controller'=>'saisie','action'=>'codvoie'),null,true)?>', { codvoie: codvoie },
function(data) { response(data); }
);
},
select: function( event, ui ) {
$('input[name=adresse_codvoie]').attr('value', ui.item.value);
}
});
</script>
<div class="fieldgrp">

View File

@ -0,0 +1,35 @@
<?php
Class Zend_View_Helper_NewsDate extends Zend_View_Helper_Abstract
{
protected $mois = array (
'Jan' => 1,
'Feb' => 2,
'Mar' => 3,
'Apr' => 4,
'May' => 5,
'Jun' => 6,
'Jul' => 7,
'Aug' => 8,
'Sep' => 9,
'Oct' => 10,
'Nov' => 11,
'Dev' => 12,
);
public function NewsDate($date)
{
$tmp = explode(', ', $date);
$tabDate = explode(' ', $tmp[1]);
$tabTime = explode(':', $tabDate[3]);
$timestamp = gmmktime(
$tabTime[0]-1,
$tabTime[1],
$tabTime[2],
$this->mois[$tabDate[1]],
$tabDate[0],
$tabDate[2]
);
$pubDate = date('d/m/Y à H:i', $timestamp);
return $pubDate;
}
}

View File

@ -0,0 +1,12 @@
<div id="center">
<h2 class="titre">LISTE DES &Eacute;TABLISSEMNTS</h2>
<h2>&Eacute;tablissements</h2>
<?php if (empty($this->AutrePage)):?>
<?=$this->render('cgu.phtml', $this->cgu)?>
<?php endif;?>
</div>

View File

@ -0,0 +1,35 @@
<?php if ($this->source == 'google'):?>
<div id="infogeo_photo">
<?=$this->action('streetview', 'identite', null, array(
'lat' => $this->infos->GeoLat,
'lon' => $this->infos->GeoLon,
'siret' => $this->infos->Siret,
));?>
</div>
<?php elseif ($this->source == 'mappy'):?>
<div><img id="pp-cb-thumb" width="300px" /></div>
<script src="<?=$this->lienJs?>"></script>
<script type="text/javascript">
$(document).ready(function() {
var photoService = new Mappy.api.visiocity.PhotoService();
var geo = new Mappy.api.geolocation.Geocoder();
var address = "<?=$this->adresse?>";
geo.geocode(address, function(result) {
photoService.search(result[0], "f", serviceHandler);
}, function(error) {});
var serviceHandler = function(result) {
if (result instanceof Mappy.api.visiocity.Frontage) {
var current = result.getCurrent();
var img = $('<img src="' + current.getURL(320, null) +
'" alt="' + current.getDescription() +
'" width="300px" />');
$('#pp-cb-thumb').replaceWith(img);
}
};
});
</script>
<?php endif;?>

View File

@ -0,0 +1,18 @@
<?php if ( $this->texte ) {?>
<tr>
<td width="50" class="aide">
<?php if ( !empty($this->aide) ) {?>
<img src="/themes/default/images/interfaces/aideligne.png" width="16" height="16" style="display:none;"/>
<div id="<?=$this->id?>" style="display:none;"><?=$this->aide?></div>
<?php } ?></td>
<td width="200" class="StyleInfoLib"><?=$this->label?></td>
<?php
if (!empty($this->titre)) {
$titre = ' title="'.$this->titre.'"';
} else {
$titre = '';
}
?>
<td width="350" class="StyleInfoData"<?=$titre?>><?=$this->texte?></td>
</tr>
<?php } ?>

View File

@ -0,0 +1,81 @@
<div id="center">
<?php if ( empty($this->AutrePage) ) {?>
<h2 class="titre">FICHE D'IDENTIT&Eacute;</h2>
<?php }?>
<div class="paragraph">
<table>
<?php
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Siret']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['SiretSiege']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['TvaNumero']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Isin']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Capitalisation']);
echo $this->partial('identite/fiche-item.phtml', $this->logo);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NumRC']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['AutreId']);
//echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NumRM']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Actif']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['SituationJuridique']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['AutreSiren']);
?>
</table>
</div>
<div data-role="content">
<div data-role="collapsible-set">
<div data-role="collapsible">
<h3>Raison sociale &amp; Coordonnées</h3>
<table>
<?php
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['RaisonSociale']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NomCommercial']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['EnseigneSigle']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['FormeJuridique']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['DateImmat']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['DateCreaEn']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['DateCreaEt']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Adresse']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Zones']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Tel']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Fax']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Web']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Mail']);
?>
</table>
</div>
</div>
<div data-role="collapsible">
<h3>Activité(s) &amp; Chiffre d'affaires</h3>
<table>
<?php
//Remplace Siren pour texte
//$this->dBlock['ActiviteEn']['texte'] = $this->RemplaceSiren($this->dBlock['ActiviteEn']['texte']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['ActiviteEn']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['ActiviteEt']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Naf4']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Nace']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NatureActivite']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['SurfaceMagasin']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['OrigineFond']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['TypeExploitation']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Saisonnalite']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['NbEtabActif']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Capital']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['ChiffreAffaire']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Dirigeants']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['Effectif']);
echo $this->partial('identite/fiche-item.phtml', $this->dBlock['EffectifEtab']);
?>
</table>
</div>
<div data-role="collapsible">
<h3>Localisation géographique</h3>
<?=$this->action('geo', 'identite', null, array('infos' => $this->infos));?>
</div>
<div data-role="collapsible">
<h3>Information presse (Source Google News ©)</h3>
<?=$this->action('news', 'identite');?>
</div>
</div>
</div>

View File

@ -0,0 +1,37 @@
<h2>Localisation géographique</h2>
<div class="paragraph">
<div id="infogeo" class="clearfix">
<div id="infogeo_txt">
<?php if ( $this->infos->GeoLat && $this->infos->GeoLon ):?>
<span id=geolocalisation>
<b>Information géographique :</b><br/>
Latitude : <?=$this->decLat?> (<?=$this->infos->GeoLat?>)<br />
Longitude : <?=$this->decLon?> (<?=$this->infos->GeoLon?>)<br />
</span>
<a id="lien-google" href="<?=$this->mapsHref?>" target="_blank">
Afficher l'adresse sur Google Map &copy;</a><br/>
<br/>
<?endif;?>
<b>Code commune / Rivoli :</b><br/>
<?=$this->infos->Dept.' '.$this->infos->codeCommune.' / '.$this->infos->Rivoli; ?>
<?php
if (count($this->infos->InfosIris)>0){
$InfosIris = $this->infos->InfosIris;
$codComIris = str_replace($InfosIris->codIris, '', $InfosIris->codComIris);
?>
<br/><br/><b>Iris :</b>
<?php if (intval($InfosIris->codIris) == 0){ ?>
<br/>Commune non découpée en Iris
<?php } else {?>
<br/>Code : <?=$codComIris?> <?=$InfosIris->codIris?>
<br/>Libellé : <a title="Consulter le plan d'assemblage de la commune" href="<?=$this->url(array('controller'=>'identite', 'action'=>'iris', 'code'=>$codComIris), null, true)?>" target="_blank"><?=$InfosIris->libIris?></a>
<img title="<?=$InfosIris->typIris?>" style="vertical-align:middle;" src="/themes/default/images/info.gif">
<?php }?>
<?php }?>
</div>
<?php if($this->facade):?>
<?=$this->action('facade', 'identite', null, array('infos' => $this->infos));?>
<?php endif;?>
</div>
</div>

View File

@ -0,0 +1 @@
<img src="/fichier/imgcache/<?php echo $this->name;?>" />

View File

@ -0,0 +1,16 @@
<?php if(!$this->disable):?>
<div id="news">
<h2>Information presse (Source Google News &copy;)</h2>
<div id="paragraph">
<ul>
<?php foreach($this->items as $item):?>
<li style="padding-top:2px;">
<a target="_blank" href="<?=$item->link()?>">
Le <?=$this->NewsDate($item->pubDate())?> - <?=$item->title()?>
</a>
</li>
<?php endforeach;?>
</ul>
</div>
</div>
<?php endif;?>

View File

@ -0,0 +1,17 @@
<?php if ($this->url) {?>
<div id="legende-photo">Cliché à l'approche de l'adresse postale.</div>
<img id="pp-cb-thumb" src="<?=$this->url?>" width="320" height="320" />
<div>
<a class="street-heading" href="<?=$this->url(array(
'controller'=>'identite','action'=>'streetview', 'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pagePrec))?>">&lt;</a>
-
<a class="street-heading" href="<?=$this->url(array(
'controller'=>'identite','action'=>'streetview', 'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pageSuiv))?>">&gt;</a>
</div>
<script>
$('a.street-heading').click(function(e){
e.preventDefault();
$('#infogeo_photo').load($(this).attr('href'));
});
</script>
<?php }?>

View File

@ -0,0 +1,27 @@
<?=$this->doctype()?>
<html>
<head>
<?=$this->headMeta()?>
<?=$this->headTitle()?>
<?=$this->headStyle()?>
<?=$this->headLink()?>
<?=$this->headScript()?>
</head>
<body>
<div data-role="page" data-theme="b">
<div data-role="header">
<a href="<?=$this->url(array('controller'=>'index'), null, true)?>" data-role="button"
data-icon="home" data-iconpos="notext">Menu</a>
<h1><?=$this->headTitle()?></h1>
<a href="<?=$this->url(array('controller'=>'index'), null, true)?>" data-role="button"
data-icon="search" data-iconpos="notext">Recherche</a>
</div>
<div data-role="content">
<?=$this->layout()->content?>
</div>
<div data-role="footer" data-position="fixed">
<h4>Menu</h4>
</div>
</div>
</body>
</html>

161
bin/classmap_generator.php Normal file
View File

@ -0,0 +1,161 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Loader
* @subpackage Exception
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/**
* Generate class maps for use with autoloading.
*
* Usage:
* --help|-h Get usage message
* --library|-l [ <string> ] Library to parse; if none provided, assumes
* current directory
* --output|-o [ <string> ] Where to write autoload file; if not provided,
* assumes "autoload_classmap.php" in library directory
* --overwrite|-w Whether or not to overwrite existing autoload
* file
*/
$libPath = dirname(__FILE__) . '/../library';
if (!is_dir($libPath)) {
// Try to load StandardAutoloader from include_path
if (false === include('Zend/Loader/StandardAutoloader.php')) {
echo "Unable to locate autoloader via include_path; aborting" . PHP_EOL;
exit(2);
}
} else {
// Try to load StandardAutoloader from library
if (false === include(dirname(__FILE__) . '/../library/Zend/Loader/StandardAutoloader.php')) {
echo "Unable to locate autoloader via library; aborting" . PHP_EOL;
exit(2);
}
}
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath($libPath),
get_include_path(),
)));
// Setup autoloading
$loader = new Zend_Loader_StandardAutoloader();
$loader->setFallbackAutoloader(true);
$loader->register();
$rules = array(
'help|h' => 'Get usage message',
'library|l-s' => 'Library to parse; if none provided, assumes current directory',
'output|o-s' => 'Where to write autoload file; if not provided, assumes "autoload_classmap.php" in library directory',
'overwrite|w' => 'Whether or not to overwrite existing autoload file',
);
try {
$opts = new Zend_Console_Getopt($rules);
$opts->parse();
} catch (Zend_Console_Getopt_Exception $e) {
echo $e->getUsageMessage();
exit(2);
}
if ($opts->getOption('h')) {
echo $opts->getUsageMessage();
exit();
}
$path = $libPath;
if (array_key_exists('PWD', $_SERVER)) {
$path = $_SERVER['PWD'];
}
if (isset($opts->l)) {
$path = $opts->l;
if (!is_dir($path)) {
echo "Invalid library directory provided" . PHP_EOL . PHP_EOL;
echo $opts->getUsageMessage();
exit(2);
}
$path = realpath($path);
}
$usingStdout = false;
$output = $path . DIRECTORY_SEPARATOR . 'autoload_classmap.php';
if (isset($opts->o)) {
$output = $opts->o;
if ('-' == $output) {
$output = STDOUT;
$usingStdout = true;
} elseif (!is_writeable(dirname($output))) {
echo "Cannot write to '$output'; aborting." . PHP_EOL
. PHP_EOL
. $opts->getUsageMessage();
exit(2);
} elseif (file_exists($output)) {
if (!$opts->getOption('w')) {
echo "Autoload file already exists at '$output'," . PHP_EOL
. "but 'overwrite' flag was not specified; aborting." . PHP_EOL
. PHP_EOL
. $opts->getUsageMessage();
exit(2);
}
}
}
$strip = $path;
if (!$usingStdout) {
echo "Creating class file map for library in '$path'..." . PHP_EOL;
}
// Get the ClassFileLocator, and pass it the library path
$l = new Zend_File_ClassFileLocator($path);
// Iterate over each element in the path, and create a map of
// classname => filename, where the filename is relative to the library path
$map = new stdClass;
$strip .= DIRECTORY_SEPARATOR;
function createMap(Iterator $i, $map, $strip) {
$file = $i->current();
$namespace = empty($file->namespace) ? '' : $file->namespace . '\\';
$filename = str_replace($strip, '', $file->getRealpath());
// Windows portability
$filename = str_replace(array('/', '\\'), "' . DIRECTORY_SEPARATOR . '", $filename);
$map->{$namespace . $file->classname} = $filename;
return true;
}
iterator_apply($l, 'createMap', array($l, $map, $strip));
// Create a file with the class/file map.
// Stupid syntax highlighters make separating < from PHP declaration necessary
$dirStore = 'dirname_' . uniqid();
$content = '<' . "?php\n"
. '$' . $dirStore . " = dirname(__FILE__);\n"
. 'return ' . var_export((array) $map, true) . ';';
// Prefix with dirname(__FILE__); modify the generated content
$content = preg_replace('#(=> )#', '$1$' . $dirStore . ' . DIRECTORY_SEPARATOR . ', $content);
$content = str_replace("\\'", "'", $content);
// Write the contents to disk
file_put_contents($output, $content);
if (!$usingStdout) {
echo "Wrote classmap file to '" . realpath($output) . "'" . PHP_EOL;
}

44
bin/zf.bat Normal file
View File

@ -0,0 +1,44 @@
@ECHO off
REM Zend Framework
REM
REM LICENSE
REM
REM This source file is subject to the new BSD license that is bundled
REM with this package in the file LICENSE.txt.
REM It is also available through the world-wide-web at this URL:
REM http://framework.zend.com/license/new-bsd
REM If you did not receive a copy of the license and are unable to
REM obtain it through the world-wide-web, please send an email
REM to license@zend.com so we can send you a copy immediately.
REM
REM Zend
REM Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
REM http://framework.zend.com/license/new-bsd New BSD License
REM Test to see if this was installed via pear
SET ZTMPZTMPZTMPZ=@ph
SET TMPZTMPZTMP=%ZTMPZTMPZTMPZ%p_bin@
REM below @php_bin@
FOR %%x IN ("@php_bin@") DO (if %%x=="%TMPZTMPZTMP%" GOTO :NON_PEAR_INSTALLED)
GOTO PEAR_INSTALLED
:NON_PEAR_INSTALLED
REM Assume php.exe is executable, and that zf.php will reside in the
REM same file as this one
SET PHP_BIN=php.exe
SET PHP_DIR=%~dp0
GOTO RUN
:PEAR_INSTALLED
REM Assume this was installed via PEAR and use replacements php_bin & php_dir
SET PHP_BIN=@php_bin@
SET PHP_DIR=@php_dir@
GOTO RUN
:RUN
SET ZF_SCRIPT=%PHP_DIR%\zf.php
"%PHP_BIN%" -d safe_mode=Off -f "%ZF_SCRIPT%" -- %*

624
bin/zf.php Normal file
View File

@ -0,0 +1,624 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Tool
* @subpackage Framework
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/
/**
* ZF
*
* @category Zend
* @package Zend_Tool
* @subpackage Framework
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class ZF
{
/**
* @var bool
*/
protected $_clientLoaded = false;
/**
* @var string
*/
protected $_mode = 'runTool';
/**
* @var array of messages
*/
protected $_messages = array();
/**
* @var string
*/
protected $_homeDirectory = null;
/**
* @var string
*/
protected $_storageDirectory = null;
/**
* @var string
*/
protected $_configFile = null;
/**
* main()
*
* @return void
*/
public static function main()
{
$zf = new self();
$zf->bootstrap();
$zf->run();
}
/**
* bootstrap()
*
* @return ZF
*/
public function bootstrap()
{
// detect settings
$this->_mode = $this->_detectMode();
$this->_homeDirectory = $this->_detectHomeDirectory();
$this->_storageDirectory = $this->_detectStorageDirectory();
$this->_configFile = $this->_detectConfigFile();
// setup
$this->_setupPHPRuntime();
$this->_setupToolRuntime();
}
/**
* run()
*
* @return ZF
*/
public function run()
{
switch ($this->_mode) {
case 'runError':
$this->_runError();
$this->_runInfo();
break;
case 'runSetup':
if ($this->_runSetup() === false) {
$this->_runInfo();
}
break;
case 'runInfo':
$this->_runInfo();
break;
case 'runTool':
default:
$this->_runTool();
break;
}
return $this;
}
/**
* _detectMode()
*
* @return ZF
*/
protected function _detectMode()
{
$arguments = $_SERVER['argv'];
$mode = 'runTool';
if (!isset($arguments[0])) {
return $mode;
}
if ($arguments[0] == $_SERVER['PHP_SELF']) {
$this->_executable = array_shift($arguments);
}
if (!isset($arguments[0])) {
return $mode;
}
if ($arguments[0] == '--setup') {
$mode = 'runSetup';
} elseif ($arguments[0] == '--info') {
$mode = 'runInfo';
}
return $mode;
}
/**
* _detectHomeDirectory() - detect the home directory in a variety of different places
*
* @param bool $mustExist Should the returned value already exist in the file system
* @param bool $returnMessages Should it log messages for output later
* @return string
*/
protected function _detectHomeDirectory($mustExist = true, $returnMessages = true)
{
$homeDirectory = null;
$homeDirectory = getenv('ZF_HOME'); // check env var ZF_HOME
if ($homeDirectory) {
$this->_logMessage('Home directory found in environment variable ZF_HOME with value ' . $homeDirectory, $returnMessages);
if (!$mustExist || ($mustExist && file_exists($homeDirectory))) {
return $homeDirectory;
} else {
$this->_logMessage('Home directory does not exist at ' . $homeDirectory, $returnMessages);
}
}
$homeDirectory = getenv('HOME'); // HOME environment variable
if ($homeDirectory) {
$this->_logMessage('Home directory found in environment variable HOME with value ' . $homeDirectory, $returnMessages);
if (!$mustExist || ($mustExist && file_exists($homeDirectory))) {
return $homeDirectory;
} else {
$this->_logMessage('Home directory does not exist at ' . $homeDirectory, $returnMessages);
}
}
$homeDirectory = getenv('HOMEPATH');
if ($homeDirectory) {
$this->_logMessage('Home directory found in environment variable HOMEPATH with value ' . $homeDirectory, $returnMessages);
if (!$mustExist || ($mustExist && file_exists($homeDirectory))) {
return $homeDirectory;
} else {
$this->_logMessage('Home directory does not exist at ' . $homeDirectory, $returnMessages);
}
}
$homeDirectory = getenv('USERPROFILE');
if ($homeDirectory) {
$this->_logMessage('Home directory found in environment variable USERPROFILE with value ' . $homeDirectory, $returnMessages);
if (!$mustExist || ($mustExist && file_exists($homeDirectory))) {
return $homeDirectory;
} else {
$this->_logMessage('Home directory does not exist at ' . $homeDirectory, $returnMessages);
}
}
return false;
}
/**
* _detectStorageDirectory() - Detect where the storage directory is from a variaty of possiblities
*
* @param bool $mustExist Should the returned value already exist in the file system
* @param bool $returnMessages Should it log messages for output later
* @return string
*/
protected function _detectStorageDirectory($mustExist = true, $returnMessages = true)
{
$storageDirectory = false;
$storageDirectory = getenv('ZF_STORAGE_DIR');
if ($storageDirectory) {
$this->_logMessage('Storage directory path found in environment variable ZF_STORAGE_DIR with value ' . $storageDirectory, $returnMessages);
if (!$mustExist || ($mustExist && file_exists($storageDirectory))) {
return $storageDirectory;
} else {
$this->_logMessage('Storage directory does not exist at ' . $storageDirectory, $returnMessages);
}
}
$homeDirectory = ($this->_homeDirectory) ? $this->_homeDirectory : $this->_detectHomeDirectory(true, false);
if ($homeDirectory) {
$storageDirectory = $homeDirectory . '/.zf/';
$this->_logMessage('Storage directory assumed in home directory at location ' . $storageDirectory, $returnMessages);
if (!$mustExist || ($mustExist && file_exists($storageDirectory))) {
return $storageDirectory;
} else {
$this->_logMessage('Storage directory does not exist at ' . $storageDirectory, $returnMessages);
}
}
return false;
}
/**
* _detectConfigFile() - Detect config file location from a variety of possibilities
*
* @param bool $mustExist Should the returned value already exist in the file system
* @param bool $returnMessages Should it log messages for output later
* @return string
*/
protected function _detectConfigFile($mustExist = true, $returnMessages = true)
{
$configFile = null;
$configFile = getenv('ZF_CONFIG_FILE');
if ($configFile) {
$this->_logMessage('Config file found environment variable ZF_CONFIG_FILE at ' . $configFile, $returnMessages);
if (!$mustExist || ($mustExist && file_exists($configFile))) {
return $configFile;
} else {
$this->_logMessage('Config file does not exist at ' . $configFile, $returnMessages);
}
}
$homeDirectory = ($this->_homeDirectory) ? $this->_homeDirectory : $this->_detectHomeDirectory(true, false);
if ($homeDirectory) {
$configFile = $homeDirectory . '/.zf.ini';
$this->_logMessage('Config file assumed in home directory at location ' . $configFile, $returnMessages);
if (!$mustExist || ($mustExist && file_exists($configFile))) {
return $configFile;
} else {
$this->_logMessage('Config file does not exist at ' . $configFile, $returnMessages);
}
}
$storageDirectory = ($this->_storageDirectory) ? $this->_storageDirectory : $this->_detectStorageDirectory(true, false);
if ($storageDirectory) {
$configFile = $storageDirectory . '/zf.ini';
$this->_logMessage('Config file assumed in storage directory at location ' . $configFile, $returnMessages);
if (!$mustExist || ($mustExist && file_exists($configFile))) {
return $configFile;
} else {
$this->_logMessage('Config file does not exist at ' . $configFile, $returnMessages);
}
}
return false;
}
/**
* _setupPHPRuntime() - parse the config file if it exists for php ini values to set
*
* @return void
*/
protected function _setupPHPRuntime()
{
// set php runtime settings
ini_set('display_errors', true);
// support the changing of the current working directory, necessary for some providers
$cwd = getenv('ZEND_TOOL_CURRENT_WORKING_DIRECTORY');
if ($cwd != '' && realpath($cwd)) {
chdir($cwd);
}
if (!$this->_configFile) {
return;
}
$zfINISettings = parse_ini_file($this->_configFile);
$phpINISettings = ini_get_all();
foreach ($zfINISettings as $zfINIKey => $zfINIValue) {
if (substr($zfINIKey, 0, 4) === 'php.') {
$phpINIKey = substr($zfINIKey, 4);
if (array_key_exists($phpINIKey, $phpINISettings)) {
ini_set($phpINIKey, $zfINIValue);
}
}
}
}
/**
* _setupToolRuntime() - setup the tools include_path and load the proper framwork parts that
* enable Zend_Tool to work.
*
* @return void
*/
protected function _setupToolRuntime()
{
$includePathPrepend = getenv('ZEND_TOOL_INCLUDE_PATH_PREPEND');
$includePathFull = getenv('ZEND_TOOL_INCLUDE_PATH');
// check if the user has not provided anything
if (!($includePathPrepend || $includePathFull)) {
if ($this->_tryClientLoad()) {
return;
}
}
// if ZF is not in the include_path, but relative to this file, put it in the include_path
if ($includePathPrepend || $includePathFull) {
if (isset($includePathPrepend) && ($includePathPrepend !== false)) {
set_include_path($includePathPrepend . PATH_SEPARATOR . get_include_path());
} elseif (isset($includePathFull) && ($includePathFull !== false)) {
set_include_path($includePathFull);
}
}
if ($this->_tryClientLoad()) {
return;
}
$zfIncludePath['relativePath'] = dirname(__FILE__) . '/../library/';
if (file_exists($zfIncludePath['relativePath'] . 'Zend/Tool/Framework/Client/Console.php')) {
set_include_path(realpath($zfIncludePath['relativePath']) . PATH_SEPARATOR . get_include_path());
}
if (!$this->_tryClientLoad()) {
$this->_mode = 'runError';
return;
}
}
/**
* _tryClientLoad() - Attempt to load the Zend_Tool_Framework_Client_Console to enable the tool to run.
*
* This method will return false if its not loaded to allow the consumer to alter the environment in such
* a way that it can be called again to try loading the proper file/class.
*
* @return bool if the client is actuall loaded or not
*/
protected function _tryClientLoad()
{
$this->_clientLoaded = false;
$fh = @fopen('Zend/Tool/Framework/Client/Console.php', 'r', true);
if (!$fh) {
return $this->_clientLoaded; // false
} else {
fclose($fh);
unset($fh);
include 'Zend/Tool/Framework/Client/Console.php';
$this->_clientLoaded = class_exists('Zend_Tool_Framework_Client_Console');
}
return $this->_clientLoaded;
}
/**
* _runError() - Output the error screen that tells the user that the tool was not setup
* in a sane way
*
* @return void
*/
protected function _runError()
{
echo <<<EOS
***************************** ZF ERROR ********************************
In order to run the zf command, you need to ensure that Zend Framework
is inside your include_path. There are a variety of ways that you can
ensure that this zf command line tool knows where the Zend Framework
library is on your system, but not all of them can be described here.
The easiest way to get the zf command running is to give it the include
path via an environment variable ZEND_TOOL_INCLUDE_PATH or
ZEND_TOOL_INCLUDE_PATH_PREPEND with the proper include path to use,
then run the command "zf --setup". This command is designed to create
a storage location for your user, as well as create the zf.ini file
that the zf command will consult in order to run properly on your
system.
Example you would run:
$ ZEND_TOOL_INCLUDE_PATH=/path/to/library zf --setup
Your are encourged to read more in the link that follows.
EOS;
}
/**
* _runInfo() - this command will produce information about the setup of this script and
* Zend_Tool
*
* @return void
*/
protected function _runInfo()
{
echo 'Zend_Tool & CLI Setup Information' . PHP_EOL
. '(available via the command line "zf --info")'
. PHP_EOL;
echo ' * ' . implode(PHP_EOL . ' * ', $this->_messages) . PHP_EOL;
echo PHP_EOL;
echo 'To change the setup of this tool, run: "zf --setup"';
echo PHP_EOL;
}
/**
* _runSetup() - parse the request to see which setup command to run
*
* @return void
*/
protected function _runSetup()
{
$setupCommand = (isset($_SERVER['argv'][2])) ? $_SERVER['argv'][2] : null;
switch ($setupCommand) {
case 'storage-directory':
$this->_runSetupStorageDirectory();
break;
case 'config-file':
$this->_runSetupConfigFile();
break;
default:
$this->_runSetupMoreInfo();
break;
}
}
/**
* _runSetupStorageDirectory() - if the storage directory does not exist, create it
*
* @return void
*/
protected function _runSetupStorageDirectory()
{
$storageDirectory = $this->_detectStorageDirectory(false, false);
if (file_exists($storageDirectory)) {
echo 'Directory already exists at ' . $storageDirectory . PHP_EOL
. 'Cannot create storage directory.';
return;
}
mkdir($storageDirectory);
echo 'Storage directory created at ' . $storageDirectory . PHP_EOL;
}
/**
* _runSetupConfigFile()
*
* @return void
*/
protected function _runSetupConfigFile()
{
$configFile = $this->_detectConfigFile(false, false);
if (file_exists($configFile)) {
echo 'File already exists at ' . $configFile . PHP_EOL
. 'Cannot write new config file.';
return;
}
$includePath = get_include_path();
$contents = 'php.include_path = "' . $includePath . '"';
file_put_contents($configFile, $contents);
$iniValues = ini_get_all();
if ($iniValues['include_path']['global_value'] != $iniValues['include_path']['local_value']) {
echo 'NOTE: the php include_path to be used with the tool has been written' . PHP_EOL
. 'to the config file, using ZEND_TOOL_INCLUDE_PATH (or other include_path setters)' . PHP_EOL
. 'is no longer necessary.' . PHP_EOL . PHP_EOL;
}
echo 'Config file written to ' . $configFile . PHP_EOL;
}
/**
* _runSetupMoreInfo() - return more information about what can be setup, and what is setup
*
* @return void
*/
protected function _runSetupMoreInfo()
{
$homeDirectory = $this->_detectHomeDirectory(false, false);
$storageDirectory = $this->_detectStorageDirectory(false, false);
$configFile = $this->_detectConfigFile(false, false);
echo <<<EOS
ZF Command Line Tool - Setup
----------------------------
Current Paths (Existing or not):
Home Directory: {$homeDirectory}
Storage Directory: {$storageDirectory}
Config File: {$configFile}
Important Environment Variables:
ZF_HOME
- the directory this tool will look for a home directory
- directory must exist
ZF_STORAGE_DIR
- where this tool will look for a storage directory
- directory must exist
ZF_CONFIG_FILE
- where this tool will look for a configuration file
ZF_TOOL_INCLUDE_PATH
- set the include_path for this tool to use this value
ZF_TOOL_INCLUDE_PATH_PREPEND
- prepend the current php.ini include_path with this value
Search Order:
Home Directory:
- ZF_HOME, then HOME (*nix), then HOMEPATH (windows)
Storage Directory:
- ZF_STORAGE_DIR, then {home}/.zf/
Config File:
- ZF_CONFIG_FILE, then {home}/.zf.ini, then {home}/zf.ini,
then {storage}/zf.ini
Commands:
zf --setup storage-directory
- setup the storage directory, directory will be created
zf --setup config-file
- create the config file with some default values
EOS;
}
/**
* _runTool() - This is where the magic happens, dispatch Zend_Tool
*
* @return void
*/
protected function _runTool()
{
$configOptions = array();
if (isset($this->_configFile) && $this->_configFile) {
$configOptions['configOptions']['configFilepath'] = $this->_configFile;
}
if (isset($this->_storageDirectory) && $this->_storageDirectory) {
$configOptions['storageOptions']['directory'] = $this->_storageDirectory;
}
// ensure that zf.php loads the Zend_Tool_Project features
$configOptions['classesToLoad'] = 'Zend_Tool_Project_Provider_Manifest';
$console = new Zend_Tool_Framework_Client_Console($configOptions);
$console->dispatch();
}
/**
* _logMessage() - Internal method used to log setup and information messages.
*
* @param string $message
* @param bool $storeMessage
* @return void
*/
protected function _logMessage($message, $storeMessage = true)
{
if (!$storeMessage) {
return;
}
$this->_messages[] = $message;
}
}
if (!getenv('ZF_NO_MAIN')) {
ZF::main();
}

45
bin/zf.sh Normal file
View File

@ -0,0 +1,45 @@
#!/bin/sh
#############################################################################
# Zend Framework
#
# LICENSE
#
# This source file is subject to the new BSD license that is bundled
# with this package in the file LICENSE.txt.
# It is also available through the world-wide-web at this URL:
# http://framework.zend.com/license/new-bsd
# If you did not receive a copy of the license and are unable to
# obtain it through the world-wide-web, please send an email
# to license@zend.com so we can send you a copy immediately.
#
# Zend
# Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
# http://framework.zend.com/license/new-bsd New BSD License
#############################################################################
# find php: pear first, command -v second, straight up php lastly
if test "@php_bin@" != '@'php_bin'@'; then
PHP_BIN="@php_bin@"
elif command -v php 1>/dev/null 2>/dev/null; then
PHP_BIN=`command -v php`
else
PHP_BIN=php
fi
# find zf.php: pear first, same directory 2nd,
if test "@php_dir@" != '@'php_dir'@'; then
PHP_DIR="@php_dir@"
else
SELF_LINK="$0"
SELF_LINK_TMP="$(readlink "$SELF_LINK")"
while test -n "$SELF_LINK_TMP"; do
SELF_LINK="$SELF_LINK_TMP"
SELF_LINK_TMP="$(readlink "$SELF_LINK")"
done
PHP_DIR="$(dirname "$SELF_LINK")"
fi
"$PHP_BIN" -d safe_mode=Off -f "$PHP_DIR/zf.php" -- "$@"

View File

@ -135,6 +135,16 @@ Session
Application must override the session.save_path, soap.wsdl_cache_dir to define it's own path.
Project Configuration
---------------------
- Autoloader
See in the public/index.php. We use Classmpap Autloader which store Class Key and his file
path.
To generate classmap file use bin/classmap_generator.php
-
WKHTMLTOPDF
-----------

View File

@ -35,7 +35,7 @@ class Application_Controller_Plugin_Theme extends Zend_Controller_Plugin_Abstrac
$view = $bootstrap->bootstrap('View')->getResource('View');
$view->setBasePath($viewPath);
$layout = $bootstrap->bootstrap('Layout')->getResource('Layout');
$layout->setLayout('main');
$layout->setLayout('layout');
$layout->setLayoutPath($layoutPath);
//Load default style and javascript files for the selected theme
@ -50,10 +50,22 @@ class Application_Controller_Plugin_Theme extends Zend_Controller_Plugin_Abstrac
->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')
->appendHttpEquiv('Content-Language', 'fr-FR');
$view->headLink()
->headLink(array('rel' => 'favicon', 'type' => 'image/png', 'href' => '/favicon.png'));
$view->headLink()
->headLink(array('rel' => 'shortcut icon', 'type' => 'image/x-icon', 'href' => '/favicon.ico'));
//Favicon - Touch icon for iOS 2.0+ and Android 2.1+
$view->headLink()->headLink(array(
'rel' => 'apple-touch-icon-precomposed',
'href' => '/favicon-152.png'
));
//Favicon - targeted to any additional png size
$view->headLink()->headLink(array(
'rel' => 'icon',
'type' => 'image/png',
'href' => '/favicon-32.png'
));
$view->headLink()->headLink(array(
'rel' => 'shortcut icon',
'type' => 'image/x-icon',
'href' => '/favicon.ico')
);
/**
* Detect IE

View File

@ -0,0 +1,38 @@
<?php
$dirname_531986e1115c5 = dirname(__FILE__);
return array (
'Application_Controller_Plugin_Auth' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Controller' . DIRECTORY_SEPARATOR . 'Plugin' . DIRECTORY_SEPARATOR . 'Auth.php',
'Application_Controller_Plugin_Cgu' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Controller' . DIRECTORY_SEPARATOR . 'Plugin' . DIRECTORY_SEPARATOR . 'Cgu.php',
'Application_Controller_Plugin_Lang' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Controller' . DIRECTORY_SEPARATOR . 'Plugin' . DIRECTORY_SEPARATOR . 'Lang.php',
'Application_Controller_Plugin_Menu' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Controller' . DIRECTORY_SEPARATOR . 'Plugin' . DIRECTORY_SEPARATOR . 'Menu.php',
'Application_Controller_Plugin_Pdf' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Controller' . DIRECTORY_SEPARATOR . 'Plugin' . DIRECTORY_SEPARATOR . 'Pdf.php',
'Application_Controller_Plugin_Theme' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Controller' . DIRECTORY_SEPARATOR . 'Plugin' . DIRECTORY_SEPARATOR . 'Theme.php',
'Application_Controller_Plugin_Xml' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Controller' . DIRECTORY_SEPARATOR . 'Plugin' . DIRECTORY_SEPARATOR . 'Xml.php',
'Application_Form_Login' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Form' . DIRECTORY_SEPARATOR . 'Login.php',
'Application_Form_RechercheActionnaire' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Form' . DIRECTORY_SEPARATOR . 'RechercheActionnaire.php',
'Application_Form_RechercheDirigeant' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Form' . DIRECTORY_SEPARATOR . 'RechercheDirigeant.php',
'Application_Form_RechercheEnquete' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Form' . DIRECTORY_SEPARATOR . 'RechercheEnquete.php',
'Application_Form_RechercheEntreprise' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Form' . DIRECTORY_SEPARATOR . 'RechercheEntreprise.php',
'Application_Form_RechercheWorldcheck' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Form' . DIRECTORY_SEPARATOR . 'RechercheWorldcheck.php',
'Application_Model_ActesFiles' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'ActesFiles.php',
'Application_Model_Aide' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'Aide.php',
'Application_Model_BilanSaisie' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'BilanSaisie.php',
'Application_Model_City' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'City.php',
'Application_Model_ClientStat' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'ClientStat.php',
'Application_Model_Commandes' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'Commandes.php',
'Application_Model_CommandesErreur' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'CommandesErreur.php',
'Application_Model_CommandesGiants' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'CommandesGiants.php',
'Application_Model_CommandesKbis' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'CommandesKbis.php',
'Application_Model_CommandesPieces' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'CommandesPieces.php',
'Application_Model_CommandesStatut' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'CommandesStatut.php',
'Application_Model_CommandesTarifs' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'CommandesTarifs.php',
'Application_Model_FctDir' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'FctDir.php',
'Application_Model_MonitoringGiants' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'MonitoringGiants.php',
'Application_Model_Naf5' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'Naf5.php',
'Application_Model_Nouveautes' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'Nouveautes.php',
'Application_Model_RapportsGiants' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'RapportsGiants.php',
'Application_Model_RetriveGiants' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'RetriveGiants.php',
'Application_Model_TabEvenements' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'TabEvenements.php',
'Application_Model_TabFJur' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'TabFJur.php',
'Application_Model_Worldcheck' => $dirname_531986e1115c5 . DIRECTORY_SEPARATOR . 'Model' . DIRECTORY_SEPARATOR . 'Worldcheck.php',
);

View File

@ -77,115 +77,240 @@ class Scores_Finance_Liasse
function bilanSimplifie2Normal($bilanRS)
{
$tabBS2BN = array(
'AH'=>'010',
'AI'=>'012',
'AI1'=>'013',
'AJ'=>'014',
'AK'=>'016',
'AK1'=>'017',
'AT'=>'028',
'AU'=>'030',
'AU1'=>'031',
'BH'=>'040',
'BI'=>'042',
'BI1'=>'043',
'BJ'=>'044',
'BK'=>'048',
'BK1'=>'049',
'BL'=>'050',
'BM'=>'052',
'BM1'=>'053',
'BT'=>'060',
'BU'=>'062',
'BU1'=>'063',
'BV'=>'064',
'BW'=>'066',
'BW1'=>'067',
'BX'=>'068',
'BY'=>'070',
'BY1'=>'071',
'BZ'=>'072',
'CA'=>'074',
'CA1'=>'075',
'CD'=>'080',
'CE'=>'082',
'CE1'=>'083',
'CF'=>'084',
'CG'=>'086',
'CG1'=>'087',
'CH'=>'092',
'CI'=>'094',
'CI1'=>'095',
'CJ'=>'096',
'CK'=>'098',
'CK1'=>'099',
'CO'=>'110',
'1A'=>'112',
'1A1'=>'113',
'DA'=>'120',
'DC'=>'124',
'DD'=>'126',
'DF'=>'130',
'DG'=>'132',
'DH'=>'134',
'DI'=>'136',
'DK'=>'140',
'DL'=>'142',
'DR'=>'154',
'DP'=>'154',
'DU'=>'156',
'DV'=>'169',
'DW'=>'164',
'DX'=>'166',
'EA'=>'172-169',
'EB'=>'174',
'EC'=>'176',
'EE'=>'180',
'EH'=>'156-195',
'FA'=>'210-209',
'FB'=>'209',
'FC'=>'210',
'FD'=>'214-215',
'FE'=>'215',
'FF'=>'214',
'FH'=>'217',
'FI'=>'218',
'FK'=>'209+215+217',
'FL'=>'210+214+218',
'FM'=>'222',
'FN'=>'224',
'FO'=>'226',
'FQ'=>'230',
'FR'=>'232',
'FS'=>'234',
'FT'=>'236',
'FU'=>'238',
'FV'=>'240',
'FW'=>'242',
'FX'=>'244',
'FY'=>'250',
'FZ'=>'252',
'GA'=>'254',
'GE'=>'262',
'GF'=>'264',
'GG'=>'270',
'GP'=>'280',
'GU'=>'294',
'GW'=>'270+280+294',
'HD'=>'290',
'HH'=>'300',
'HI'=>'290-300',
'HK'=>'306',
'HL'=>'232+280+290',
'HM'=>'264+294+300+306',
'HN'=>'310',
'YY'=>'374',
'YZ'=>'378',
'YP'=>'376',
//2033 ACTIF PASSIF
'AH' => '010',
'AI' => '012',
'AI1' => '013',
'AI2' => 'N00',
//@todo : Traiter N-1
'AJ' => '014',
'AK' => '016',
'AK1' => '017',
'AK2' => 'N01',
'AT' => '028',
'AU' => '030',
'AU1' => '031',
'AU2' => 'N02',
'BH' => '040',
'BI' => '042',
'BI1' => '043',
'BI2' => 'N03',
'BJ' => '044',
'BK' => '048',
'BK1' => '049',
'BK2' => 'N04',
'BL' => '050',
'BM' => '052',
'BM1' => '053',
'BM2' => 'N05',
'BT' => '060',
'BU' => '062',
'BU1' => '063',
'BU2' => 'N06',
'BV' => '064',
'BW' => '066',
'BW1' => '067',
'BW2' => 'N07',
'BX' => '068',
'BY' => '070',
'BY1' => '071',
'BY2' => 'N08',
'BZ' => '072',
'CA' => '074',
'CA1' => '075',
'CA2' => 'N09',
'CD' => '080',
'CE' => '082',
'CE1' => '083',
'CE2' => 'N10',
'CF' => '084',
'CG' => '086',
'CG1' => '087',
'CG2' => 'N11',
'CH' => '092',
'CI' => '094',
'CI1' => '095',
'CI2' => 'N13',
'CJ' => '096',
'CK' => '098',
'CK1' => '099',
'CK2' => 'N14',
'CO' => '110',
'1A' => '112',
'1A1' => '113',
'1A2' => 'N15',
'DA' => '120',
'DA1' => 'N16',
'DC' => '124',
'DC1' => 'N17',
'DD' => '126',
'DD1' => 'N18',
'DF' => '130',
'DF1' => 'N19',
'DG' => '132',
'DG1' => 'N20',
'DH' => '134',
'DH1' => 'N21',
'DI' => '136',
'DI1' => 'N22',
'DK' => '140',
'DK1' => 'N23',
'DL' => '142',
'DL1' => 'N24',
'DR' => '154',
'DR1' => 'N25',
'DU' => '156',
'DU1' => 'N26',
'DW' => '164',
'DW1' => 'N27',
'DX' => '166',
'DX1' => 'N28',
'EA' => '172',
'EA1' => 'N29',
'EB' => '174',
'EB1' => 'N30',
'EC' => '176',
'EC1' => 'N31',
'EE' => '180',
'EE1' => 'N32',
'EH' => '156-195',
//2033 CDR
'FA' => '210-209',
'FB' => '209',
'FC' => '210',
'FC1' => 'N33',
'FD' => '214-215',
'FE' => '215',
'FF' => '214',
'FF1' => 'N34',
'FH' => '217',
'FI' => '218',
'FI1' => 'N35',
'FK' => '209+215+217',
'FL' => '210+214+218',
'FL1' => 'N33+N34+N35',
'FM' => '222',
'FM1' => 'N36',
'FN' => '224',
'FN' => 'N37',
'FO' => '226',
'FO' => 'N38',
'FQ' => '230',
'FQ' => 'N39',
'FR' => '232',
'FR1' => 'N40',
'FS' => '234',
'FS1' => 'N41',
'FT' => '236',
'FT1' => 'N42',
'FU' => '238',
'FU1' => 'N43',
'FV' => '240',
'FV1' => 'N44',
'FW' => '242',
'FW1' => 'N45',
'FX' => '244',
'FX1' => 'N46',
'FY' => '250',
'FY1' => 'N47',
'FZ' => '252',
'FZ1' => 'N48',
'GA' => '254',
'GA1' => 'N49',
'GE' => '262',
'GE1' => 'N50',
'GF' => '264',
'GF1' => 'N52',
'GG' => '270',
'GG1' => 'N53',
'GP' => '280',
'GP1' => 'N54',
'GU' => '294',
'GU1' => 'N56',
'GW' => '270+280+294',
'GW1' => 'N53+N54+N56',
'HD' => '290',
'HD1' => 'N55',
'HH' => '300',
'HH1' => 'N57',
'HI' => '290-300',
'HI1' => 'N55-N57',
'HK' => '306',
'HK1' => 'N58',
'HL' => '232+280+290',
'HL1' => 'N40+N54+N55',
'HM' => '264+294+300+306',
'HM1' => 'N52+N56+N57+N58',
'HN' => '310',
'HN1' => 'N59',
'YY' => '374',
'YZ' => '378',
'YP' => '376',
);
$bilanRN=array();
@ -211,7 +336,7 @@ class Scores_Finance_Liasse
}
else $bilanRN[$posteRN]=$bilanRS[$formule];
}
if ($bilanRS['240']<>0) {
if ( $bilanRS['240']<>0 ) {
$bilanRN['BL']=$bilanRS['050'];
$bilanRN['BM']=$bilanRS['052'];
} else {
@ -219,22 +344,25 @@ class Scores_Finance_Liasse
$bilanRN['BO']=$bilanRS['052'];
}
if ($bilanRS['070']<>0 || $bilanRS['074']<>0 || $bilanRS['052']<>0 || $bilanRS['062']<>0)
if ( $bilanRS['070']<>0 || $bilanRS['074']<>0 || $bilanRS['052']<>0 || $bilanRS['062']<>0 ) {
$bilanRN['GC']=$bilanRS['256'];
elseif ($bilanRS['070']==0 && $bilanRS['074']==0 && $bilanRS['052']==0 && $bilanRS['062']==0 && $bilanRS['254']<>0)
} elseif ($bilanRS['070']==0 && $bilanRS['074']==0 && $bilanRS['052']==0 && $bilanRS['062']==0 && $bilanRS['254']<>0 ) {
$bilanRN['GD']=$bilanRS['256'];
}
if ($bilanRS['584']<>0) {
if ( $bilanRS['584']<>0 ) {
$bilanRN['HB']=$bilanRS['584'];
$bilanRN['HA']=$bilanRS['290']-$bilanRS['584'];
} else
} else {
$bilanRN['HA']=$bilanRS['290'];
}
if ($bilanRS['582']<>0) {
if ( $bilanRS['582']<>0 ) {
$bilanRN['HF']=$bilanRS['582'];
$bilanRN['HE']=$bilanRS['582']-$bilanRS['300'];
} else
} else {
$bilanRN['HE']=$bilanRS['300'];
}
return $bilanRN;
}

160
library/Scores/Ws.php Normal file
View File

@ -0,0 +1,160 @@
<?php
/**
* Load User Info
*/
require_once 'Scores/Utilisateur.php';
/**
* Distribute Scores Webservice
*/
class Scores_Ws
{
/**
* User login
* @var string
*/
protected $login = null;
/**
* Password
* @var string
*/
protected $password = null;
/**
* Enable/Disable Cache
* @var boolean
*/
protected $cache = true;
/**
* Enable/Disable cache writing
* Override the cache flag
* @var boolean
*/
protected $cacheWrite = true;
/**
* Number of response
* @var int
*/
protected $nbReponses = 20;
protected $obj = null;
/**
* Scores_Ws
* @param string $login
* @param string $password
*/
public function __construct($login = null, $password = null)
{
if ( !empty($login) && !empty($password) ){
$this->login = $login;
$this->password = $password;
} else {
$user = new Scores_Utilisateur();
$this->login = $user->getLogin();
$this->password = $user->getPassword();
$this->nbReponses = $user->getNbRep();
if ( $user->checkModeEdition() ) {
//Disable cache
$this->cache = false;
//Don't write cache
if ( APPLICATION_ENV == 'staging' ) {
$this->cacheWrite = false;
}
}
}
}
/**
* Distribute call on each separate class for each service
* Schema for $name is {Class}_{Method}
* @param string $name
* @param array $args
* @return mixed
*/
public function __call($name, $args)
{
$response = false;
$pos = strpos($name, '_');
$className = substr($name, 0, $pos);
$methodName = substr($name, $pos+1);
$objR = new ReflectionClass('Scores_Ws_'.$className);
$this->obj = $objR->newInstance($methodName);
$this->obj->setSoapClientOption('login', $this->login);
$this->obj->setSoapClientOption('password', $this->password);
//Check cache
if ($this->cacheWrite && $this->obj->getCache()) {
$filename = $this->obj->getFilename();
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
$response = $cache->getBlock();
}
}
//Execute the request
else {
call_user_func_array(array($this->obj, $methodName), $args);
if ( !$this->obj->isError() || !$this->obj->isMessage() ) {
$response = $obj->getSoapResponse();
//Put in cache the response
if ($this->cacheWrite && $obj->getCache()) {
$cache->deletefile();
$cache->setBlock($responses);
}
}
}
return $response;
}
/**
* Type du retour
* @return string
* ERR or MSG
*/
public function getResponseType()
{
if ( $this->obj->isError() ) {
return 'ERR';
} elseif ( $this->obj->isMessage() ) {
return 'MSG';
}
return null;
}
/**
* Message de retour pour affichage
* @return string
*/
public function getResponseMsg()
{
return $this->obj->getMessage();
}
/**
* Retourne les éléments pour debuggage
* @return object
*/
public function getError()
{
$error = new stdClass();
$error->service = $this->obj->getServiceName();
$error->method = $this->obj->getMethodName();
//Request Parameter
$error->args = $this->obj->getParams();
$error->faultCode = $this->obj->getFaultCode();
$error->faultMessage = $this->obj->getMessage();
return $error;
}
}

View File

@ -0,0 +1,254 @@
<?php
require_once 'Scores/Ws/Config.php';
/** @see Scores_Ws_Interface */
require_once 'Scores/Ws/Interface.php';
/**
* Abstract class for Scores_Ws.
*/
abstract class Scores_Ws_Abstract implements Scosres_Ws_Interface
{
/**
* Service name
* @var string
*/
protected $service = null;
/**
* Method Name
* @var string
*/
protected $method = null;
/**
* Params for soap call as stdClass
* @var stdClass
*/
protected $params = null;
/**
* Default max response
* @var int
*/
protected $nbReponses = 20;
/**
* Set to false to disable cache for one method
* @var boolean
*/
protected $cache = true;
/**
* WSDL URI
* @var string
*/
protected $wsdl = null;
/**
* Options for WSDL
* @var array
*/
protected $options = array();
/**
* Soap Response
* @var object
*/
protected $response = null;
/**
* 0 = no error
* 1 = error
* 2 = message
* @var int
*/
protected $error = 0;
/**
* Error / Message
* @var string
*/
protected $message = '';
/**
* Original soap fault code
* @var string
*/
protected $faultcode = null;
/**
*
*/
public function __construct()
{
$config = new Scores_Ws_Config();
$config->setLocation('local');
$serviceConfig = $config->getService($this->service);
$this->setSoapClientWsdl($serviceConfig['wsdl']);
foreach ( $serviceConfig['options'] as $name => $value ) {
$this->setSoapClientOption($name, $value);
}
$this->setSoapClientOption('features', SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS);
$this->setSoapClientOption('compression', SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE);
$this->setSoapClientOption('trace', true);
$this->setSoapClientOption('encoding', 'utf-8');
if (APPLICATION_ENV == 'development'){
$this->setSoapClientOption('cache_wsdl', WSDL_CACHE_NONE);
}
}
/**
* (non-PHPdoc)
* @see Scores_Ws_Service_Interface::setService()
*/
public function setService($name)
{
$this->service = $name;
}
/**
* (non-PHPdoc)
* @see Scores_Ws_Interface::getServiceName()
*/
public function getServiceName()
{
return $this->service;
}
/**
* (non-PHPdoc)
* @see Scores_Ws_Interface::getMethodName()
*/
public function getMethodName()
{
return $this->method;
}
/**
* (non-PHPdoc)
* @see Scores_Ws_Interface::getParams()
*/
public function getParams()
{
return var_export($this->params, true);
}
/**
* (non-PHPdoc)
* @see Scores_Ws_Interface::getFaultCode()
*/
public function getFaultCode()
{
return $this->faultcode;
}
/**
* (non-PHPdoc)
* @see Scores_Ws_Service_Interface::setNbReponses()
*/
public function setNbReponses($nb)
{
$this->nbReponses = $nb;
}
/**
* (non-PHPdoc)
* @see Scores_Ws_Service_Interface::setSoapClientWsdl()
*/
public function setSoapClientWsdl($wsdl = null)
{
$this->wsdl = $wsdl;
}
/**
* (non-PHPdoc)
* @see Scores_Ws_Service_Interface::setSoapClientOption()
*/
public function setSoapClientOption($name = null , $value = null)
{
$this->options[$name] = $value;
}
/**
* (non-PHPdoc)
* @see Scores_Ws_Service_Interface::getSoapClient()
*/
public function getSoapClient()
{
$client = false;
try {
$client = new SoapClient($this->wsdl, $this->options);
} catch (Exception $e) {
throw new Exception('Application Error');
}
return $client;
}
/**
* (non-PHPdoc)
* @see Scores_Ws_Service_Interface::isError()
*/
public function isError()
{
if ( $this->error == 1 ) {
return true;
}
return false;
}
/**
* (non-PHPdoc)
* @see Scores_Ws_Service_Interface::isMessage()
*/
public function isMessage()
{
if ( $this->error == 2 ) {
return true;
}
return false;
}
/**
* (non-PHPdoc)
* @see Scores_Ws_Service_Interface::getSoapResponse()
*/
public function getSoapResponse()
{
return $this->response;
}
/**
* (non-PHPdoc)
* @see Scores_Ws_Service_Interface::getMessage()
*/
public function getMessage()
{
return $this->message;
}
/**
* (non-PHPdoc)
* @see Scores_Ws_Service_Interface::getFilename()
*/
public function getFilename($method, $args)
{
$filename = $this->service . '-' . $method . '-' . implode('-', $args);
return $filename;
}
public function getCache()
{
return $this->cache;
}
public function setCache($enable = true)
{
$this->cache = $enable;
}
}

View File

@ -0,0 +1,183 @@
<?php
require_once 'Scores/Ws/Abstract.php';
/**
*
*/
class Scores_Ws_Catalog extends Scores_Ws_Abstract
{
public function __construct()
{
$this->setService('catalog');
$this->cache = false;
parent::__construct();
}
/**
* Get the filename for a mathod
* @param string $method
* @param array $args
*/
public function getFilename($method, $args){}
/**
*
* @param unknown $id
* @param unknown $columns
*/
public function getEvent($id, $columns)
{
$params = new stdClass();
$params->id = $id;
$params->columns = $columns;
$client = $this->getSoapClient();
try {
$response = $client->getEvent($params);
$this->response = $response->getEventResult;
} catch (SoapFault $fault) {
$this->message = $fault->faultstring;
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
$this->error = 2;
} else {
$this->error = 1;
}
}
}
public function getCatalogCurrency()
{
$filename = 'catalog-currency';
$cache = new Cache($filename);
if ( $cache->exist() ){
return $cache->getBlock();
}
$params = new stdClass();
$params->id = null;
$client = $this->loadClient('catalog');
try {
$reponse = $client->getCurrency($params);
$cache->deletefile();
$cache->setBlock($reponse->getCurrencyResult);
return $reponse->getCurrencyResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
public function getCatalogCountry()
{
$filename = 'catalog-country';
$cache = new Cache($filename);
if ( $cache->exist() ){
return $cache->getBlock();
}
$params = new stdClass();
$params->id = null;
$params->columns = array(
'codPays3',
'libPays',
'devise',
'indTel',
);
$client = $this->loadClient('catalog');
try {
$reponse = $client->getCountry($params);
$cache->deletefile();
$cache->setBlock($reponse->getCountryResult);
return $reponse->getCountryResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
public function getCatalogEvent($id, $columns)
{
$params = new stdClass();
$params->id = $id;
$params->columns = $columns;
$client = $this->loadClient('catalog');
try {
$reponse = $client->getEvent($params);
return $reponse->getEventResult;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
//$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function getCatalogNaf5($id, $columns)
{
$params = new stdClass();
$params->id = $id;
$params->columns =$columns;
$client = $this->loadClient('catalog');
try {
$reponse = $client->getNaf5($params);
return $reponse->getNaf5Result;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
//$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function getCatalogFctDir($id, $columns)
{
$params = new stdClass();
$params->id = $id;
$params->columns =$columns;
$client = $this->loadClient('catalog');
try {
$reponse = $client->getDirFonction($params);
return $reponse->getDirFonctionResult;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
//$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function getCatalogLegalForm($id, $columns)
{
$params = new stdClass();
$params->id = $id;
$params->columns =$columns;
$client = $this->loadClient('catalog');
try {
$reponse = $client->getLegalForm($params);
return $reponse->getLegalFormResult;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
//$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
}

View File

@ -0,0 +1,229 @@
<?php
/**
* WebService Configuration
*/
class Scores_Ws_Config
{
protected $location = null;
protected $services = array(
//Local
'local' => array(
'interne' => array(
'wsdl' => "http://webservice-2.4.sd.dev/interne/v0.6?wsdl-auto",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'entreprise' => array(
'wsdl' => "http://webservice-2.4.sd.dev/entreprise/v0.8?wsdl-auto",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'gestion' => array(
'wsdl' => "http://webservice-2.4.sd.dev/gestion/v0.3?wsdl-auto",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'saisie' => array(
'wsdl' => "http://webservice-2.4.sd.dev/saisie/v0.2?wsdl-auto",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'pieces' => array(
'wsdl' => "http://webservice-2.4.sd.dev/pieces/v0.1?wsdl-auto",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'catalog' => array(
'wsdl' => "http://webservice-2.4.sd.dev/catalog/v0.1?wsdl-auto",
'options' => array(
'soap_version' => SOAP_1_2
),
),
),
//Development
'development' => array(
'interne' => array(
'wsdl' => "http://webservice-2.4.sd.lan/interne/v0.6?wsdl-auto",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'entreprise' => array(
'wsdl' => "http://webservice-2.4.sd.lan/entreprise/v0.8?wsdl-auto",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'gestion' => array(
'wsdl' => "http://webservice-2.4.sd.lan/gestion/v0.3?wsdl-auto",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'saisie' => array(
'wsdl' => "http://webservice-2.4.sd.lan/saisie/v0.2?wsdl-auto",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'pieces' => array(
'wsdl' => "http://webservice-2.4.sd.lan/pieces/v0.1?wsdl-auto",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'catalog' => array(
'wsdl' => "http://webservice-2.4.sd.lan/catalog/v0.1?wsdl-auto",
'options' => array(
'soap_version' => SOAP_1_2
),
),
),
//sd-25137
'sd-25137' => array(
'interne' => array(
'wsdl' => "http://wse.scores-decisions.com:8081/interne/v0.6?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'entreprise' => array(
'wsdl' => "http://wse.scores-decisions.com:8081/entreprise/v0.8?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'gestion' => array(
'wsdl' => "http://wse.scores-decisions.com:8081/gestion/v0.3?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'saisie' => array(
'wsdl' => "http://wse.scores-decisions.com:8081/saisie/v0.2?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'pieces' => array(
'wsdl' => "http://wse.scores-decisions.com:8081/pieces/v0.1?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'catalog' => array(
'wsdl' => "http://wse.scores-decisions.com:8081/catalog/v0.1?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
),
//Celeste
'celeste' => array(
'interne' => array(
'wsdl' => "http://wse.scores-decisions.com:8081/interne/v0.6?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'entreprise' => array(
'wsdl' => "http://wse.scores-decisions.com:8081/entreprise/v0.8?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'gestion' => array(
'wsdl' => "http://wse.scores-decisions.com:8081/gestion/v0.3?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'saisie' => array(
'wsdl' => "http://wse.scores-decisions.com:8081/saisie/v0.2?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'pieces' => array(
'wsdl' => "http://wse.scores-decisions.com:8081/pieces/v0.1?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'catalog' => array(
'wsdl' => "http://wse.scores-decisions.com:8081/catalog/v0.1?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
),
//Celeste Staging
'celeste-staging' => array(
'interne' => array(
'wsdl' => "http://wsrec.scores-decisions.com:8000/interne/v0.6?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'entreprise' => array(
'wsdl' => "http://wsrec.scores-decisions.com:8000/interne/v0.6?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'gestion' => array(
'wsdl' => "http://wsrec.scores-decisions.com:8000/interne/v0.6?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'saisie' => array(
'wsdl' => "http://wsrec.scores-decisions.com:8000/interne/v0.6?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'pieces' => array(
'wsdl' => "http://wsrec.scores-decisions.com:8000/interne/v0.6?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
'catalog' => array(
'wsdl' => "http://wsrec.scores-decisions.com:8000/interne/v0.6?wsdl",
'options' => array(
'soap_version' => SOAP_1_2
),
),
),
);
/**
*
*/
public function setLocation($name)
{
$this->location = $name;
}
/**
* Return service parameters
* @param string $name
* @return array
*/
public function getService($name)
{
return $this->services[$this->location][$name];
}
}

View File

@ -0,0 +1,952 @@
<?php
require_once 'Scores/Ws/Abstract.php';
class Scores_Ws_Entreprise extends Scores_Ws_Abstract
{
public function __construct($method = null)
{
//Set service to use
$this->setService('entreprise');
//Prepare method configuration
if(null !== $method && method_exists($this, $method)) {
$this->{$method.'Params'}();
}
parent::__construct();
}
/**
* getAnnonces
* @param string $siren
* @param integer $filtre
* @param string $idAnn
* @param integer $position
* @param integer $nbRep
* @void
*/
public function getAnnonces($siren, $filtre=0, $idAnn='', $position=0, $nbRep=100)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$this->params->filtre = $filtre;
$this->params->idAnn = $idAnn;
$client = $this->getSoapClient();
try {
$response = $client->getAnnonces($this->params);
$this->response = $response->getAnnoncesResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getAnnoncesAsso
* @param string $siren
* @param string $idAnn
* @param string $filtre
* @param number $position
* @param number $nbRep
*/
public function getAnnoncesAsso($siren, $idAnn=null, $filtre=null, $position=0, $nbRep=20)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$this->params->idAnn = $idAnn;
$this->params->filtre = $filtre;
$this->params->position = $position;
$this->params->nbRep = $nbRep;
$client = $this->getSoapClient();
try {
$response = $client->getAnnoncesAsso($this->params);
$this->response = $response->getAnnoncesAssoResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getAnnoncesBalo
* @param string $siren
* @param string $idAnn
* @param string $filtre
* @param number $position
* @param number $nbRep
* @void
*/
public function getAnnoncesBalo($siren, $idAnn=null, $filtre=null, $position=0, $nbRep=20)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$this->params->idAnn = $idAnn;
$this->params->filtre = $filtre;
$this->params->position = $position;
$this->params->nbRep = $nbRep;
$client = $this->getSoapClient();
try {
$response = $client->getAnnoncesBalo($this->params);
$this->response = $response->getAnnoncesBaloResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getAnnoncesBoamp
* @param string $siren
* @param string $idAnn
* @param string $filtre
* @param number $position
* @param number $nbRep
* @void
*/
public function getAnnoncesBoamp($siren, $idAnn=null, $filtre = null, $position=0, $nbRep=20)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$this->params->idAnn = $idAnn;
$this->params->filtre = null;
if (!empty($filtre) && in_array($filtre,array('A','M'))) {
$filtreStruct = new stdClass();
$filtreStruct->key = 'type';
$filtreStruct->value = $filtre;
$this->params->filtre[] = $filtreStruct;
}
$this->params->position = $position;
$this->params->nbRep = $nbRep;
$client = $this->getSoapClient();
try {
$response = $client->getAnnoncesBoamp($this->params);
$this->response = $response->getAnnoncesBoampResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getAnnoncesLegales
* @param string $siren
* @param string $idAnn
* @param string $filtre
* @param number $position
* @param number $nbRep
* @void
*/
public function getAnnoncesLegales($siren, $idAnn=null, $filtre=null, $position=0, $nbRep=20)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$this->params->idAnn = $idAnn;
$this->params->filtre = $filtre;
$this->params->position = $position;
$this->params->nbRep = $nbRep;
$client = $this->getSoapClient();
try {
$response = $client->getAnnoncesLegales($this->params);
$this->response = $response->getAnnoncesLegalesResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getAnnoncesNum
* @param string $siren
* @void
*/
public function getAnnoncesNum($siren)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$client = $this->getSoapClient();
try {
$response = $client->getAnnoncesNum($this->params);
$this->response = $response->getAnnoncesNumResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getBanques
* @param string $siren
* @void
*/
public function getBanques($siren)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$client = $this->getSoapClient();
try {
$response = $client->getBanques($this->params);
$this->response = $response->getBanquesResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getBilan
* @param string $siren
* @param string $millesime
* @param string $typeBilan
* @param string $ref
* @void
*/
public function getBilan($siren, $millesime, $typeBilan, $ref)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$this->params->millesime = $millesime;
$this->params->typeBilan = $typeBilan;
$this->params->ref = $ref;
$client = $this->getSoapClient();
try {
$response = $client->getBilan($this->params);
$this->response = $response->getBilanResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getIdentiteParams
* @void
*/
public function getIdentiteParams()
{
$this->setCache(false);
}
/**
* getIdentite
* @param string $siret
* @param int $id
* @void
*/
public function getIdentite($siret, $id = 0)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siret = $siret;
$this->params->id = $id;
$client = $this->getSoapClient();
try {
$response = $client->getIdentite($this->params);
$this->response = $response->getIdentiteResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
if ( in_array($fault->getCode(), array('1020')) ){
$this->error = 2;
} else {
$this->error = 1;
}
}
}
/**
* getIdentiteProcol
* @param string $siret
* @param int $id
* @void
*/
public function getIdentiteProcol($siret, $id = 0)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siret = $siret;
$this->params->id = $id;
$client = $this->getSoapClient();
try {
$response = $client->getIdentiteProcol($this->params);
$this->response = $response->getIdentiteProcolResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getIndiScore
* @param string $siren
* @param string $nic
* @param integer $niveau
* @param boolean $plus
* @param string $ref
* @param integer $encours
* @param string $email
*/
public function getIndiScore($siren, $nic=0, $niveau=2, $plus=false, $ref='', $encours=0, $email='')
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$this->params->nic = $nic;
$this->params->niveau = $niveau;
$this->params->plus = $plus;
$this->params->ref = $ref;
$this->params->encours = $encours;
$this->params->email = $email;
$client = $this->getSoapClient();
try {
$response = $client->getIndiScore($this->params);
$this->response = $response->getIndiScoreResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
if ( in_array($fault->getCode(), array('1020')) ){
$this->error = 2;
} else {
$this->error = 1;
}
}
}
/**
* getInfosBourse
* @param string $siren
* @void
*/
public function getInfosBourse($siren)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$client = $this->getSoapClient();
try {
$response = $client->getInfosBourse($this->params);
$this->response = $response->getInfosBourseResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
if ( in_array($fault->getCode(), array('1030')) ){
$this->error = 2;
} else {
$this->error = 1;
}
}
}
/**
* getInfosReg
* @param string $siren
* @param mixed $id
* @void
*/
public function getInfosReg($siren, $id = false)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$this->params->id = $id;
$client = $this->getSoapClient();
try {
$response = $client->getInfosReg($this->params);
$this->response = $response->getInfosRegResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
if ( in_array($fault->getCode(), array('1030')) ){
$this->error = 2;
} else {
$this->error = 1;
}
}
}
/**
* getDirigeants
* @param string $siren
* @param boolean $histo
* @void
*/
public function getDirigeants($siren, $histo=false)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$this->params->histo = $histo;
$client = $this->getSoapClient();
try {
$response = $client->getDirigeants($this->params);
$this->response = $response->getDirigeantsResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getLienRef
* @param string $id
* @void
*/
public function getLienRef($id)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->id = $id;
$client = $this->getSoapClient();
try {
$response = $client->getLienRef($this->params);
$this->response = $response->getLienRefResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
if ( in_array($fault->getCode(), array('ERR','MSG')) ){
$this->error = 2;
} else {
$this->error = 1;
}
}
}
/**
* getLiens
* @param string $siren
* @void
*/
public function getLiens($siren)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$client = $this->getSoapClient();
try {
$response = $client->getLiens($this->params);
$this->response = $response->getLiensResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
if ( in_array($fault->getCode(), array('MSG')) ){
$this->error = 2;
} else {
$this->error = 1;
}
}
}
/**
* getLiensById
* @param int $id
* @void
*/
public function getLiensById($id)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->id = $id;
$client = $this->getSoapClient();
try {
$response = $client->getLiensById($this->params);
$this->response = $response->getLiensByIdResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
if ( in_array($fault->getCode(), array('MSG')) ){
$this->error = 2;
} else {
$this->error = 1;
}
}
}
/**
* getListeBilans
* @param string $siren
*/
public function getListeBilans($siren)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$client = $this->getSoapClient();
try {
$response = $client->getListeBilans($this->params);
$this->response = $response-getListeBilansResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getListeCompetences
* @param string $siret
* @param string $type
* @param string $codeInsee
*/
public function getListeCompetences($siret, $type, $codeInsee)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siret = $siret;
$this->params->type = $type;
$this->params->codeInsee = $codeInsee;
$client = $this->getSoapClient();
try {
$response = $client->getListeCompetences($this->params);
$this->response = $response->getListeCompetencesResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getListeEtablissements
* @param string $siren
* @void
*/
public function getListeEtablissements($siren, $actif = -1, $position = 0)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$params->siren = $siren;
$params->actif = $actif;
$params->position = $position;
$client = $this->getSoapClient();
try {
$response = $client->getListeEtablissements($this->params);
$this->response = $response->getListeEtablissementsResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getListeEvenements
* @param string $siren
* @param string $nic
* @param integer $position
* @param integer $nbRep
* @void
*/
public function getListeEvenements($siren, $nic=0, $position=0, $nbRep=200)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$params->siren = $siren;
$params->nic = $nic;
$params->position = $position;
$params->nbRep = $nbRep;
$client = $this->getSoapClient();
try {
$response = $client->getListeEvenements($this->params);
$this->response = $response->getListeEvenementsResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getRapport
* @param string $siren
* @param integer $niveau
* @param integer $id
* @param boolean $plus
* @param string $ref
* @param integer $encours
* @param string $email
* @void
*/
public function getRapport($siren, $niveau=3, $id=0, $plus=false, $ref='', $encours=0, $email='')
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$this->params->niveau = $niveau;
$this->params->d = $id;
$this->params->plus = $plus;
$this->params->ref = $ref;
$this->params->encours = $encours;
$this->params->email = $email;
$client = $this->getSoapClient();
try {
$response = $client->getRapport($this->params);
$this->response = $response->getRapportResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getRatios
* @param string $siren
* @param string $page
*/
public function getRatios($siren, $page = 'ratios')
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$this->params->page = $page;
$client = $this->getSoapClient();
try {
$response = $client->getRapport($this->params);
$this->response = $response->getRapportResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getSurveillancesParams
*/
public function getSurveillancesParams()
{
$this->setCache(false);
}
/**
* getSurveillances
* @param object $filtre
* @param integer $deb
* @param integer $nbRep
* @param string $tri
*/
public function getSurveillances($filtre, $deb=0, $nbRep=100)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->filtre = $filtre;
$this->params->position = $deb;
$this->params->nbRep = $nbRep;
$client = $this->getSoapClient();
try {
$response = $client->getSurveillances($this->params);
$this->response = $response->getSurveillancesResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* getValo
* @param string $siren
* @void
*/
public function getValo($siren)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$client = $this->getSoapClient();
try {
$response = $client->getValo($this->params);
$this->response = $response->getValoResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
if ( in_array($fault->getCode(), array('1020')) ){
$this->error = 2;
} else {
$this->error = 1;
}
}
}
/**
* isSirenExistant
* @param string $siren
*/
public function isSirenExistant($siren)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siren = $siren;
$client = $this->getSoapClient();
try {
$response = $client->isSirenExistant($this->params);
$this->response = $response->isSirenExistantResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* rechercheAnnonceParams
* @void
*/
public function rechercheAnnonceParams()
{
$this->setCache(false);
}
/**
* Recherche Annonce
* @param string $source
* @param string $dateAnnee
* @param integer $numParution
* @param integer $numAnnonce
*/
public function rechercheAnnonce($source, $dateAnnee, $numParution, $numAnnonce)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->source = $source;
$this->params->dateAnnee = $dateAnnee;
$this->params->numParution = $numParution;
$this->params->numAnnonce = $numAnnonce;
$client = $this->getSoapClient();
try {
$response = $client->rechercheAnnonce($this->params);
$this->response = $response->rechercheAnnonceResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* searchEntrepriseParams
* @void
*/
public function searchEntrepriseParams()
{
$this->setCache(false);
}
/**
* searchEntreprise
* @param array $criteres
* @param int $position
* @param int $nbRep
* @param int $actif
*/
public function searchEntreprise($criteres, $position = 0, $nbRep = null)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->criteres = new StdClass;
$this->params->criteres->identifiant = $criteres['identifiant'];
$this->params->criteres->raisonSociale = $criteres['raisonSociale'];
$this->params->criteres->adresse = $criteres['adresse'];
$this->params->criteres->codePostal = $criteres['codePostal'];
$this->params->criteres->ville = $criteres['ville'];
$this->params->criteres->telFax = $criteres['telFax'];
$this->params->criteres->naf = $criteres['naf'];
$this->params->criteres->siege = false;
$this->params->criteres->actif = in_array($criteres['actif'], array(0,1,2)) ? $criteres['actif'] : 2;
$this->params->criteres->fj = $criteres['fj'];
$this->params->position = $position;
$this->params->nbRep = empty($nbRep) ? $this->nbReponses : $nbRep ;
$client = $this->getSoapClient();
try {
$response = $client->searchEntreprise($this->params);
$this->response = $response->searchEntrepriseeResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* searchDirParams
* @void
*/
public function searchDirParams()
{
$this->setCache(false);
}
/**
* Recherche par dirigeants
* @param array $criteres
* @param integer $deb
* @param integer $nbRep
* @param integer $maxRep
*/
public function searchDir($criteres, $deb=0, $nbRep=20, $maxRep=200)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->criteres->nom = $criteres['dirNom'];
$this->params->criteres->prenom = $criteres['dirPrenom'];
$this->params->criteres->dateNaiss = $criteres['dirDateNaiss'];
$this->params->criteres->lieuNaiss = $criteres['lieuNaiss'];
$this->params->criteres->pertinence = ($criteres['pertinence']===true) ? true : false ;
$this->params->deb = $deb;
$this->params->nbRep = $nbRep;
$this->params->maxRep = $maxRep;
$client = $this->getSoapClient();
try {
$response = $client->searchDir($this->params);
$this->response = $response->searchDirResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* searchRefClientParams
* @void
*/
public function searchRefClientParams()
{
$this->setCache(false);
}
/**
* Recherche par référence client
* @param string $search
* @param integer $position
* @param integer $nbRep
*/
public function searchRefClient($search, $position=0, $nbRep=20)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->search = $search;
$this->params->position = $position;
$this->params->nbRep = $nbRep;
$client = $this->getSoapClient();
try {
$response = $client->searchRefClient($this->params);
$this->response = $response->searchRefClientResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
/**
* setSurveillance
* @param string $siret
* @param string $email
* @param string $ref
* @param string $source
* @param boolean $delete
* @param integer $encoursClient
* @void
*/
public function setSurveillance($siret, $email, $ref = '', $source='annonces', $delete=false, $encoursClient=0)
{
$this->method = __METHOD__;
$this->params = new StdClass();
$this->params->siret = $siret;
$this->params->email = $email;
$this->params->ref = $ref;
$this->params->source = $source;
$this->params->delete = $delete;
$this->params->encoursClient = $encoursClient;
$client = $this->getSoapClient();
try {
$response = $client->setSurveillance($this->params);
$this->response = $response->setSurveillanceResult;
} catch (SoapFault $fault) {
$this->faultcode = $fault->getCode();
$this->message = $fault->getMessage();
$this->error = 1;
}
}
}

View File

@ -0,0 +1,459 @@
<?php
class Scores_Ws_Gestion extends Scores_Ws_Abstract
{
/**
* getCategory
*/
public function getCategory()
{
$filename = 'category';
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock('category');
}
try {
$client = $this->loadClient('gestion');
$reponse = $client->getCategory();
$cache->deletefile();
$cache->setBlock($reponse->getCategoryResult);
return $reponse->getCategoryResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
//Placer exception pour affichage message
return false;
}
}
/**
* getListeDroits
*/
public function getListeDroits()
{
$filename = 'droits';
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock('droits');
}
try {
$client = $this->loadClient('gestion');
$reponse = $client->getListeDroits();
$cache->deletefile();
$cache->setBlock($reponse->getListeDroitsResult);
return $reponse->getListeDroitsResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
//Placer exception pour affichage message
return false;
}
}
/**
* getNextLogin
* @param int $idClient
*/
public function getNextLogin($idClient)
{
$params = new stdClass();
$params->idClient = $idClient;
try {
$client = $this->loadClient('gestion');
$reponse = $client->getNextLogin($params);
Zend_Registry::get('firebug')->info($reponse);
return $reponse->getNextLoginResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
Zend_Registry::get('firebug')->info($fault);
//Placer exception pour affichage message
return false;
}
}
/**
* getLogs
*/
public function getLogs()
{
$filename = 'logs';
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock('logs');
}
try {
$client = $this->loadClient('gestion');
$reponse = $client->getLogs();
$cache->deletefile();
$cache->setBlock($reponse->getLogsResult);
return $reponse->getLogsResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
//Placer exception pour affichage message
return false;
}
}
/**
* getListePrefs
*/
public function getListePrefs()
{
$filename = 'prefs';
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock('prefs');
}
try {
$client = $this->loadClient('gestion');
$reponse = $client->getListePrefs();
$cache->deletefile();
$cache->setBlock($reponse->getListePrefsResult);
return $reponse->getListePrefsResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
//Placer exception pour affichage message
return false;
}
}
/**
* Enregistre ou modifie un client
* @param unknown_type $infos
* @return boolean
*/
public function setClient($infos)
{
$params = new stdClass();
$params->infos = json_encode($infos);
try {
$client = $this->loadClient('gestion');
$reponse = $client->setClient($params);
return $reponse->setClientResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
Zend_Registry::get('firebug')->info($fault);
//Placer exception pour affichage message
return false;
}
}
/**
* setInfosLogin
* @param string $login
* @param string $action
* @param array $infos
*/
public function setInfosLogin($login, $action, $infos = null)
{
$params = new stdClass();
$params->login = $login;
$params->action = $action;
if ($infos !== null ) {
$params->infos = json_encode($infos);
}
try {
$client = $this->loadClient('gestion');
$reponse = $client->setInfosLogin($params);
return $reponse->setInfosLoginResult;
} catch (SoapFault $fault) {
if (in_array($fault->getCode(),array('MSG','ERR'))) {
return $fault->getMessage();
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
Zend_Registry::get('firebug')->info($fault);
//Placer exception pour affichage message
return false;
}
}
}
/**
* getInfosLogin
* @param string $login
* @param string $ipUtilisateur
*/
public function getInfosLogin($login, $ipUtilisateur = '')
{
$params = new stdClass();
$params->login = $login;
$params->ipUtilisateur = $ipUtilisateur;
try {
$client = $this->loadClient('gestion');
$reponse = $client->getInfosLogin($params);
return $reponse->getInfosLoginResult;
} catch (SoapFault $fault) {
if (substr($fault->faultcode,0,1)=='0'){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
/**
* getListeUtilisateurs
* Enter description here ...
* @param string $login
* @param integer $idClient
*/
public function getListeUtilisateurs($login, $idClient = -1)
{
$params = new stdClass();
$params->login = $login;
$params->idClient = $idClient;
$client = $this->loadClient('gestion');
try {
$reponse = $client->getListeUtilisateurs($params);
return $reponse->getListeUtilisateursResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getListeClients
* @param unknown_type $idClient
*/
public function getListeClients($idClient=false)
{
$params = new stdClass();
$params->idClient = $idClient;
$client = $this->loadClient('gestion');
try {
$reponse = $client->getListeClients($params);
return $reponse->getListeClientsResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getLogsClients
* @param unknown_type $mois
* @param unknown_type $detail
* @param unknown_type $idClient
* @param unknown_type $login
* @param unknown_type $all
*/
public function getLogsClients($mois, $detail=0, $idClient=0, $login='', $all=0)
{
$params = new stdClass();
$params->mois = $mois;
$params->detail = $detail;
$params->idClient = $idClient;
$params->login = $login;
$params->all = $all;
$client = $this->loadClient('gestion');
try {
$reponse = $client->getLogsClients($params);
return $reponse->getLogsClientsResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
public function setCGU()
{
$params = new stdClass();
$params->application ='';
$client = $this->loadClient('gestion');
try {
$reponse = $client->setCGU($params);
Zend_Registry::get('firebug')->info($reponse);
return $reponse->setCGUResult;
} catch(SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* Get all infos for a user (Admin)
* @param string $login
*/
public function getUser($login)
{
$params = new stdClass();
$params->login = $login;
$client = $this->loadClient('gestion');
try {
$reponse = $client->getUser($params);
return $reponse->getUserResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
public function getServiceUsers($idClient, $service)
{
$params = new stdClass();
$params->idClient = $idClient;
$params->serviceCode = $service;
$client = $this->loadClient('gestion');
try {
$reponse = $client->getServiceUsers($params);
Zend_Registry::get('firebug')->info($reponse);
return $reponse->getServiceUsersResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function getServices($idClient)
{
$params = new stdClass();
$params->idClient = $idClient;
$client = $this->loadClient('gestion');
try {
$reponse = $client->getServices($params);
return $reponse->getServicesResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function setClientTarif($idClient, $log, $service, $type, $priceUnit, $limit, $date, $duree, $doublon)
{
$params = new stdClass();
$params->idClient = $idClient;
$params->tarif->log = $log;
$params->tarif->service = $service;
$params->tarif->type = $type;
$params->tarif->priceUnit = $priceUnit;
$params->tarif->limit = $limit;
$params->tarif->date = $date;
$params->tarif->duree = $duree;
$params->tarif->doublon = $doublon;
$client = $this->loadClient('gestion');
try {
$reponse = $client->setClientTarif($params);
return $reponse->setClientTarifResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function getClientTarifs($idClient, $service = null)
{
$params = new stdClass();
$params->idClient = $idClient;
$params->service = $service;
$client = $this->loadClient('gestion');
try {
$reponse = $client->getClientTarifs($params);
return $reponse->getClientTarifsResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function setService($idClient, $infos)
{
$params = new stdClass();
$params->idClient = $idClient;
$params->infos = $infos;
$client = $this->loadClient('gestion');
try {
$reponse = $client->setService($params);
return $reponse->setServiceResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function searchLogin($idClient, $query)
{
$params = new stdClass();
$params->idClient = $idClient;
$params->query = $query;
$client = $this->loadClient('gestion');
try {
$reponse = $client->searchLogin($params);
return $reponse->searchLoginResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
public function setSurveillancesMail($login, $email)
{
$params = new stdClass();
$params->login = $login;
$params->email = $email;
$client = $this->loadClient('gestion');
try {
$reponse = $client->setSurveillancesMail($params);
return $reponse->setSurveillancesMailResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function setUserService($login, $code)
{
$params = new stdClass();
$params->login = $login;
$params->code = $code;
$client = $this->loadClient('gestion');
try {
$reponse = $client->setUserService($params);
return $reponse->setUserServiceResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
}

View File

@ -0,0 +1,88 @@
<?php
/**
* Interface class for Scores_Ws
*/
interface Scores_Ws_Interface
{
/**
* Define service name
* @param string $name
*/
public function setService($name);
/**
* Get the service name
* @void
*/
public function getServiceName();
/**
* Get Method name
* @void
*/
public function getMethodName();
/**
* Get Params
* @void
*/
public function getParams();
/**
* Get fault code
* @void
*/
public function getFaultCode();
/**
* Set the default for max responses
* @param int $nb
*/
public function setNbReponses($nb);
/**
* Define WSDL URI
* @param string $wsdl
*/
public function setSoapClientWsdl($wsdl = null);
/**
* Define options for SoapClient
* @param string $name
* @param string $value
*/
public function setSoapClientOption($name = null , $value = null);
/**
* Instantiate Soap Client
*/
public function getSoapClient();
/**
* Get Soap Response
*/
public function getSoapResponse();
/**
* True if the response is an error
*/
public function isError();
/**
* True if the response is a message
*/
public function isMessage();
/**
* Return message (error)
*/
public function getMessage();
/**
* Get the filename for a mathod
* @param string $method
* @param array $args
*/
public function getFilename($method, $args);
}

View File

@ -0,0 +1,654 @@
<?php
class Scores_Ws_Interne extends Scores_Ws_Abstract
{
/**
* setCmdAsso
* @param unknown_type $infosCommande
* @param unknown_type $infosDemandeur
* @return boolean
*/
public function setCmdAsso($infosCommande, $infosDemandeur)
{
$params = new stdClass();
$params->infosCommande = $infosCommande;
$params->infosDemandeur = $infosDemandeur;
try {
$client = $this->loadClient('interne');
$reponse = $client->setCmdAsso($params);
return $reponse->setCmdAssoResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
Zend_Registry::get('firebug')->info($fault);
//Placer exception pour affichage message
return false;
}
}
/**
* getIdentiteLight
* @param string $siret
* @param int $id
* @return mixed
*/
public function getIdentiteLight($siret, $id = 0)
{
$filename = 'identitelight-'.$siret.'-'.$id;
if ($this->cacheWrite) {
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock();
}
}
$params = new StdClass();
$params->siret = $siret;
$params->id = $id;
$client = $this->loadClient('interne');
try {
$reponse = $client->getIdentiteLight($params);
if ($this->cacheWrite) {
$cache->deletefile();
$cache->setBlock($reponse->getIdentiteLightResult);
}
return $reponse->getIdentiteLightResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getDirigeantsOp
* @param string $siren
*/
public function getDirigeantsOp($siren)
{
$filename = 'dirigeantsop-'.$siren;
if ($this->cacheWrite) {
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock();
}
}
$params = new StdClass();
$params->siren = $siren;
$client = $this->loadClient('interne');
try {
$reponse = $client->getDirigeantsOp($params);
if ($this->cacheWrite) {
$cache->deletefile();
$cache->setBlock($reponse->getDirigeantsOpResult);
}
return $reponse->getDirigeantsOpResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getPortefeuille
* @param object $filtre
* @param integer $position
* @param integer $nbAffichage
*/
public function getPortefeuille($filtre, $position = 0, $nbAffichage = 100)
{
$params = new StdClass;
$params->filtre = $filtre;
$params->deb = $position;
$params->nbRep = $nbAffichage;
$client = $this->loadClient('interne');
try {
$reponse = $client->getPortefeuille($params);
return $reponse->getPortefeuilleResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getListeConventions
* Enter description here ...
* @param string $siren
*/
public function getListeConventions($siren)
{
$filename = 'conventions-'.$siren;
if ($this->cacheWrite) {
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock();
}
}
$params = new stdClass();
$params->siren = $siren;
$client = $this->loadClient('interne');
try {
$reponse = $client->getListeConventions($params);
if ($this->cacheWrite) {
$cache->deletefile();
$cache->setBlock($reponse->getListeConventionsResult);
}
return $reponse->getListeConventionsResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getMarques
* Enter description here ...
* @param string $siren
* @param integer $idDepot
*/
public function getMarques($siren, $idDepot = 0)
{
$filename = 'marques-'.$siren.'-'.$idDepot;
if ($this->cacheWrite) {
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock();
}
}
$params = new stdClass();
$params->siren = $siren;
$params->idDepot = $idDepot;
$client = $this->loadClient('interne');
try {
$reponse = $client->getMarques($params);
if ($this->cacheWrite) {
$cache->deletefile();
$cache->setBlock($reponse->getMarquesResult);
}
return $reponse->getMarquesResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getPrivilegesDetail
* Enter description here ...
* @param unknown_type $siren
* @param unknown_type $tabTypes
*/
public function getPrivilegesDetail($siren, $tabTypes = array() )
{
$params = new stdClass();
$params->siren = $siren;
$params->tabTypes = $tabTypes;
$client = $this->loadClient('interne');
try {
$reponse = $client->getPrivilegesDetail($params);
return $reponse->getPrivilegesDetailResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getDevises
* Enter description here ...
* @param unknown_type $codeIsoDevise
*/
public function getDevises($codeIsoDevise = '')
{
$params = new stdClass();
$params->codeIsoDevise = $codeIsoDevise;
$client = $this->loadClient('interne');
try {
$reponse = $client->getDevises($params);
return $reponse->getDevisesResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getPrivilegesCumul
* Enter description here ...
* @param unknown_type $siren
* @param unknown_type $tabTypes
*/
public function getPrivilegesCumul($siren, $tabTypes = array() )
{
$params = new stdClass();
$params->siren = $siren;
$params->tabTypes = $tabTypes;
$client = $this->loadClient('interne');
try {
$reponse = $client->getPrivilegesCumul($params);
return $reponse->getPrivilegesCumulResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getTribunaux
* Enter description here ...
* @param unknown_type $tabTypes
*/
public function getTribunaux($tabTypes = array())
{
$params = new stdClass();
$params->tabTypes = $tabTypes;
$client = $this->loadClient('interne');
try {
$reponse = $client->getTribunaux($params);
return $reponse->getTribunauxResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getListeJalCollecte
* Enter description here ...
*/
public function getListeJalCollecte()
{
$filename = 'listejalcollecte';
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock();
}
$params = new stdClass();
$client = $this->loadClient('interne');
try {
$reponse = $client->getListeJalCollecte();
$cache->deletefile();
$cache->setBlock($reponse->getListeJalCollecteResult);
return $reponse->getListeJalCollecteResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* Recherche Actionnaire
* @param unknown_type $nom
* @param unknown_type $cpVille
* @param unknown_type $siren
* @param unknown_type $pays
* @param unknown_type $pctMin
* @param unknown_type $pctMax
* @param unknown_type $deb
* @param unknown_type $nbRep
* @param unknown_type $maxRep
* @param unknown_type $pertinence
*/
public function searchAct($nom, $cpVille='', $siren='', $pays='', $pctMin=0, $pctMax=100, $deb=0)
{
$params = new stdClass();
$params->nom = $nom;
$params->cpVille = $cpVille;
$params->siren = $siren;
$params->pays = $pays;
$params->pctMin = $pctMin;
$params->pctMax= $pctMax;
$params->pertinence = false;
$params->deb = $deb;
$params->nbRep = $this->nbReponses;
//$params->maxRep = $maxRep;
$client = $this->loadClient('interne');
try {
$reponse = $client->searchAct($params);
return $reponse->searchActResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* Recherche Historique
* @param string $recherche
* @param string $annee
* @param string $typeBod
* @param integer $deb
*/
public function rechercheHisto($recherche, $annee, $typeBod, $deb = 0)
{
$params = new stdClass();
$params->recherche = $recherche;
$params->annee = $annee;
$params->typeBod = $typeBod;
$params->deb = $deb;
$params->nbRep = $this->nbReponses;
$client = $this->loadClient('interne');
try {
$reponse = $client->rechercheHisto($params);
return $reponse->rechercheHistoResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* searchMandataires
* @param unknown_type $nom
* @param unknown_type $type
* @param unknown_type $cpDep
*/
public function searchMandataires($nom, $type=array(), $cpDep=0)
{
$params = new stdClass();
$params->nom = $nom;
$params->type = $type;
$params->cpDep = $cpDep;
$client = $this->loadClient('interne');
try {
$reponse = $client->searchMandataires($params);
return $reponse->searchMandatairesResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* setMandataire
* Enter description here ...
* @param unknown_type $infos
*/
public function setMandataire($infos)
{
$params = new stdClass();
$params->infos->id = $infos['id'];
$params->infos->sirenGrp = $infos['sirenGrp'];
$params->infos->sirenMand = $infos['sirenMand'];
$params->infos->Nom = $infos['Nom'];
$params->infos->Prenom = $infos['Prenom'];
$params->infos->type = $infos['type'];
$params->infos->stagiaire = $infos['stagiaire'];
$params->infos->coursAppel = $infos['coursAppel'];
$params->infos->coursAppel2 = $infos['coursAppel2'];
$params->infos->tribunal = $infos['tribunal'];
$params->infos->Statut = $infos['Statut'];
$params->infos->adresse = $infos['adresse'];
$params->infos->adresseComp = $infos['adresseComp'];
$params->infos->cp = $infos['cp'];
$params->infos->ville = $infos['ville'];
$params->infos->tel = $infos['tel'];
$params->infos->fax = $infos['fax'];
$params->infos->email = $infos['email'];
$params->infos->web = $infos['web'];
$params->infos->contact = $infos['contact'];
$client = $this->loadClient('interne');
try {
$reponse = $client->setMandataire($params);
return $reponse->setMandataireResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getIdCourAppel
* @param string $codeTribunal
*/
public function getIdCoursAppel($codeTribunal)
{
$params = new stdClass();
$params->codeTribunal = $codeTribunal;
$client = $this->loadClient('interne');
try {
$reponse = $client->getIdCoursAppel($params);
return $reponse->getIdCoursAppelResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* setLog
* @param string $page
* @param string $siret
* @param string $id
* @param string $ref
*/
public function setLog ($page, $siret, $id=0, $ref = '')
{
$params = new stdClass();
$params->page = $page;
$params->siret = $siret;
$params->id = $id;
$params->ref = $ref;
$client = $this->loadClient('interne');
try {
$reponse = $client->setLog($params);
return true;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getListeSurveillanceCsv
* @param unknown_type $source
* @param unknown_type $login
* @param unknown_type $idClient
*/
public function getListeSurveillancesCsv($source='', $login='', $idClient=0)
{
$params = new stdClass();
$params->source = $source;
$params->login = $login;
$params->idClient = $idClient;
$client = $this->loadClient('interne');
try {
$reponse = $client->getListeSurveillancesCsv($params);
return $reponse->getListeSurveillancesCsvResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* getPortefeuilleCsv
* @param unknown_type $login
* @param unknown_type $idClient
*/
public function getPortefeuilleCsv($login='', $idClient=0)
{
$params = new stdClass();
$params->login = $login;
$params->idClient = $idClient;
//@todo : Seulement pour aider Altysis
$c = Zend_Registry::get('config');
$location = $c->profil->webservice->location;
$cWS = new Zend_Config_Ini(realpath(dirname(__FILE__)) . '/webservices.ini');
$config = $cWS->toArray();
$this->webservices = $config[$location]['webservices'];
//@todo
$client = $this->loadClient('interne');
try {
$reponse = $client->getPortefeuilleCsv($params);
return $reponse->getPortefeuilleCsvResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* Enter description here ...
* @param string $idAnn
* @param string $siret
*/
public function getAnnonceCollecte($idAnn, $siret)
{
$params = new stdClass();
$params->idAnn= $idAnn;
$params->siret = $siret;
$client = $this->loadClient('interne');
try {
$reponse = $client->getAnnonceCollecte($params);
return $reponse->getAnnonceCollecteResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* Enter description here ...
* @param unknown_type $siren
* @return Ambigous <boolean, mixed>|boolean
*/
public function getListeDepots($siren)
{
$filename = 'listedepots-'.$siren;
if ($this->cacheWrite) {
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock();
}
}
$params = new stdClass();
$params->siren = $siren;
$client = $this->loadClient('interne');
try {
$reponse = $client->getListeDepots($params);
if ($this->cacheWrite) {
$cache->deletefile();
$cache->setBlock($reponse->getListeDepotsResult);
}
return $reponse->getListeDepotsResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* Commande d'une enquete intersud
* @param string $siren
* @param array $infoEnq
* @param array $infoUser
*/
public function commandeEnquete($siren, $infoEnq, $infoUser)
{
$params = new stdClass();
$params->siren = $siren;
$params->infoEnq = json_encode($infoEnq);
$params->infoDemande = json_encode($infoUser);
$client = $this->loadClient('interne');
try {
$reponse = $client->commandeEnquete($params);
return $reponse->commandeEnqueteResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* Retourne l'arborescence d'un groupe
* @param string $siren
* @param int pctMin
* @param int $nbNiveaux
*/
public function getGroupesArbo($siren, $pctMin=33, $nbNiveaux=10)
{
$filename = 'groupesarbo-'.$siren.'-'.$pctMin;
if ($this->cacheWrite) {
$cache = new Cache($filename);
if ($cache->exist() && $this->cacheEnable ){
return $cache->getBlock();
}
}
$params = new StdClass;
$params->siren = $siren;
$params->pctMin = $pctMin;
$params->nbNiveaux = $nbNiveaux;
$client = $this->loadClient('interne');
try {
$reponse = $client->getGroupesArbo($params);
if ($this->cacheWrite) {
$cache->deletefile();
$cache->setBlock($reponse->getGroupesArboResult);
}
return $reponse->getGroupesArboResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* Retourne les infos du groupe
* @param string $siren
*/
public function getGroupeInfos($siren)
{
$params = new stdClass();
$params->siren = $siren;
$client = $this->loadClient('interne');
try {
$reponse = $client->getGroupeInfos($params);
return $reponse->getGroupeInfosResult;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('Error')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function getCountryId($code)
{
$params = new stdClass();
$params->codeCountry = $code;
$client = $this->loadClient('interne');
try {
$reponse = $client->getCountryId($params);
return $reponse->getCountryIdResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
}

View File

@ -0,0 +1,73 @@
<?php
class Scores_Ws_Pieces extends Scores_Ws_Abstract
{
/**
* Récupération des kbis
*/
public function getKbis($siren)
{
$params = new StdClass;
$params->siren = $siren;
$client = $this->loadClient('pieces');
try {
$reponse = $client->getKbis($params);
return $reponse->getKbisResult;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('0000', 'MSG')) ){
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
/**
* Liste des bilans
* @param string $siren
* @todo : Cache
*/
public function getPiecesBilans($siren)
{
$params = new stdClass();
$params->identifiant = $siren;
$client = $this->loadClient('pieces');
try {
$reponse = $client->getBilans($params);
return $reponse->getBilansResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* Bilan URL
* @param string $siren
* @param string $diffusion
* @param string $dateCloture
* @param string $reference
*/
public function getPiecesBilan($siren, $diffusion, $dateCloture, $reference)
{
$params = new stdClass();
$params->identifiant = $siren;
$params->diffusion = $diffusion;
$params->dateCloture = $dateCloture;
$params->reference = $reference;
$client = $this->loadClient('pieces');
try {
$reponse = $client->getBilan($params);
Zend_Registry::get('firebug')->info($reponse);
return $reponse->getBilanResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}

View File

@ -0,0 +1,456 @@
<?php
class Scores_Ws_Saisie extends Scores_Ws_Abstract
{
/**
* getMandataire
* @param string $idMand
*/
public function getMandataire($idMand)
{
$params = new stdClass();
$params->id = $idMand;
$client = $this->loadClient('saisie');
try {
$reponse = $client->getMandataire($params);
return $reponse->getMandataireResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* dupliqueAnnonce
* @param integer $source
* @param string $idAnn
* @param string $siretIn
* @param string $siretOut
* @return boolean
*/
public function dupliqueAnnonce($source, $idAnn, $siretIn = '', $siretOut = '')
{
$params = new stdClass();
$params->source= $source;
$params->idAnn= $idAnn;
$params->siretIn = $siretIn;
$params->siretOut = $siretOut;
$client = $this->loadClient('saisie');
try {
$reponse = $client->dupliqueAnnonce($params);
return $reponse->dupliqueAnnonceResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* Enter description here ...
* @param string $siret
* @param integer $id
* @param array $infos
* @return boolean
*/
public function setInfosEntrep($siret, $id, $infos)
{
$params = new stdClass();
$params->siret = $siret;
$params->idEntreprise = $siret;
$params->infos = json_encode($infos);
$client = $this->loadClient('saisie');
try {
$reponse = $client->setInfosEntrep($params);
return $reponse->setInfosEntrepResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* Enter description here ...
* @param unknown_type $idAnn
* @param unknown_type $siret
*/
public function supprAnnonceCollecte($idAnn, $siret = '')
{
$params = new stdClass();
$params->idAnn= $idAnn;
$params->siret= $siret;
$client = $this->loadClient('saisie');
try {
$reponse = $client->supprAnnonceCollecte($params);
return $reponse->supprAnnonceCollecteResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* supprAnnonce
* @param integer $source
* @param string $idAnn
* @param string $siret
*/
public function supprAnnonce($source, $idAnn, $siret = '')
{
$params = new stdClass();
$params->source= $source;
$params->idAnn= $idAnn;
$params->siret = $siret;
$client = $this->loadClient('saisie');
try {
$reponse = $client->supprAnnonce($params);
return $reponse->supprAnnonceResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
/**
* Enter description here ...
* @param unknown_type $siren
* @param unknown_type $id
* @param unknown_type $codeEven
*/
public function setAnnonceEven($siren, $id, $codeEven)
{
$params = new stdClass();
$params->siren = $siren;
$params->id = $id;
$params->codeEven = $codeEven;
$client = $this->loadClient('saisie');
try {
$reponse = $client->setAnnonceEven($params);
return $reponse->setAnnonceEvenResult;
} catch (SoapFault $fault) {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
public function setActeAsso($siren, $waldec, $type, $libelle, $date)
{
$params = new stdClass();
$params->siren = $siren;
$params->waldec = $waldec;
$params->type = $type;
$params->libelle = $libelle;
$params->date = $date;
$client = $this->loadClient('saisie');
try {
$reponse = $client->setActeAsso($params);
return $reponse->setActeAssoResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function setBilan($siren, $unite, $dateCloture, $dureeMois, $dateCloturePre, $dureeMoisPre, $typeBilan, $postes, $step = 'normal')
{
$params = new stdClass();
$params->siren = $siren;
$params->data->unite = $unite;
$params->data->dateCloture = $dateCloture;
$params->data->dureeMois = $dureeMois;
$params->data->dateCloturePre = $dateCloturePre;
$params->data->dureeMoisPre = $dureeMoisPre;
$params->data->typeBilan = $typeBilan;
$params->data->postes = $postes;
$params->step = $step;
$client = $this->loadClient('saisie');
try {
$reponse = $client->setBilan($params);
return $reponse->setBilanResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function setLienRef($infos, $id = null)
{
$params = new stdClass();
$params->infos = $infos;
$params->id = $id;
$client = $this->loadClient('saisie');
try {
$reponse = $client->setLienRef($params);
return $reponse->setLienRefResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function searchLienRef($query, $type = null)
{
$params = new stdClass();
$params->query = $query;
$params->type = $type;
$client = $this->loadClient('saisie');
try {
$reponse = $client->searchLienRef($params);
return $reponse->searchLienRefResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function setLienDoc($infos, $id = null)
{
$params = new stdClass();
$params->infos = $infos;
$params->id = $id;
$client = $this->loadClient('saisie');
try {
$reponse = $client->setLienDoc($params);
return $reponse->setLienDocResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
public function setLien($infos, $id = null)
{
$params = new stdClass();
$params->infos = $infos;
$params->id = $id;
$client = $this->loadClient('saisie');
try {
$reponse = $client->setLien($params);
return $reponse->setLienResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function getSaisieLienRef($id)
{
$params = new stdClass();
$params->id = $id;
$client = $this->loadClient('saisie');
try {
$reponse = $client->getLienRef($params);
return $reponse->getLienRefResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function getSaisieLien($id)
{
$params = new stdClass();
$params->id = $id;
$client = $this->loadClient('saisie');
try {
$reponse = $client->getLien($params);
return $reponse->getLienResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function setBourse($isin, $infos)
{
$params = new stdClass();
$params->isin = $isin;
$params->infos = $infos;
$client = $this->loadClient('saisie');
try {
$reponse = $client->setBourse($params);
return $reponse->setBourseResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function getSaisieBourse($isin)
{
$params = new stdClass();
$params->isin = $isin;
$client = $this->loadClient('saisie');
try {
$reponse = $client->getBourse($params);
return $reponse->getBourseResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
/**
* Get Score Cut Off
* @param string $siren
* @return Cutoff values or False
*/
public function getScoreCutoff($siren)
{
$params = new stdClass();
$params->siren = $siren;
$client = $this->loadClient('saisie');
try {
$reponse = $client->getScoreCutoff($params);
return $reponse->getScoreCutoffResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
return $fault->faultstring;
}
}
/**
* Delete Score Cut Off
* @param string $siren
* @return boolean
*/
public function delScoreCutoff($siren)
{
$params = new stdClass();
$params->siren = $siren;
$client = $this->loadClient('saisie');
try {
$reponse = $client->delScoreCutoff($params); //change name when webservice is ready
return $reponse->delScoreCutoffResult; //change name when webservice is ready
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
return $fault->faultstring;
}
}
public function setLienChange($action, $idLien, $id)
{
$params = new stdClass();
$params->action = $action;
$params->idLien = $idLien;
$params->id = $id;
$client = $this->loadClient('saisie');
try {
$reponse = $client->setLienChange($params);
return $reponse->setLienChangeResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
/**
* Set Score Cut Off
* @param string $siren
* @param int $encours
* @param int $scoreSolv
* @param int $scoreDir
* @param int $scoreConf
* @param string $remarque
* @param boolean delete
* @return boolean
*/
public function setScoreCutoff($siren, $encours, $scoreSolv, $scoreDir, $scoreConf, $remarque, $delete)
{
$infos = array(
'siren' => $siren,
'encours' => $encours,
'scoreSolv' => $scoreSolv,
'scoreDir' => $scoreDir,
'scoreConf' => $scoreConf,
'remarque' => $remarque,
);
$params = new stdClass();
$params->infos = json_encode($infos);
$params->delete = $delete;
$client = $this->loadClient('saisie');
try {
$reponse = $client->setScoreCutoff($params);
return $reponse->setScoreCutoffResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
return $fault->faultstring;
}
}
public function getLienDoc($id, $type = null, $groupe = false)
{
$params = new stdClass();
$params->id = $id;
$params->type = $type;
$params->groupe = $groupes;
$client = $this->loadClient('saisie');
try {
$reponse = $client->getLienDoc($params);
return $reponse->getLienDocResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}

View File

@ -101,6 +101,25 @@ class WsScores
return $client;
}
public function getEntrepriseLiasseInfos($siren)
{
$params = new stdClass();
$params->siren = $siren;
$client = $this->loadClient('entreprise');
try {
$reponse = $client->getLiasseInfos($params);
return $reponse->getLiasseInfosResult;
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
return false;
}
}
}
public function delSaisieContactEt($id)
{
$params = new stdClass();

View File

@ -0,0 +1,45 @@
<?php
$dirname_530d9a41d779e = dirname(__FILE__);
return array (
'Annonces' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Annonces.php',
'Scores_Auth_Adapter_Db' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Auth' . DIRECTORY_SEPARATOR . 'Adapter' . DIRECTORY_SEPARATOR . 'Db.php',
'Scores_Auth_Adapter_Ws' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Auth' . DIRECTORY_SEPARATOR . 'Adapter' . DIRECTORY_SEPARATOR . 'Ws.php',
'BDF' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Bdf.php',
'Cache' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Cache.php',
'Scores_Export_ArrayCsv' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Export' . DIRECTORY_SEPARATOR . 'ArrayCsv.php',
'Scores_Export_Print' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Export' . DIRECTORY_SEPARATOR . 'Print.php',
'Scores_Finance_Liasse_XLS' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Finance' . DIRECTORY_SEPARATOR . 'Liasse' . DIRECTORY_SEPARATOR . 'XLS.php',
'Scores_Finance_Liasse' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Finance' . DIRECTORY_SEPARATOR . 'Liasse.php',
'Scores_Finance_Ratios_Data' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Finance' . DIRECTORY_SEPARATOR . 'Ratios' . DIRECTORY_SEPARATOR . 'Data.php',
'Scores_Finance_Ratios_Graph' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Finance' . DIRECTORY_SEPARATOR . 'Ratios' . DIRECTORY_SEPARATOR . 'Graph.php',
'GestionCommande' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'GestionCommandes.php',
'Scores_Google_Maps' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Google' . DIRECTORY_SEPARATOR . 'Maps.php',
'Scores_Google_Streetview' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Google' . DIRECTORY_SEPARATOR . 'Streetview.php',
'IdentiteEntreprise' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'IdentiteEntreprise.php',
'IdentiteProcol' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'IdentiteProcol.php',
'Scores_Insee_AvisSituation' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Insee' . DIRECTORY_SEPARATOR . 'AvisSituation.php',
'Scores_Insee_Iris' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Insee' . DIRECTORY_SEPARATOR . 'Iris.php',
'Logo' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Logo.php',
'Scores_Mail' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Mail.php',
'Mappy' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Mappy.php',
'Scores_Menu' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Menu.php',
'Scores_Mobile_Detect' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Mobile' . DIRECTORY_SEPARATOR . 'Detect.php',
'RapportComment' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'RapportComment.php',
'Scores_Serializer_Adapter_Xml' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Serializer' . DIRECTORY_SEPARATOR . 'Adapter' . DIRECTORY_SEPARATOR . 'Xml.php',
'Scores_Session_Entreprise' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Session' . DIRECTORY_SEPARATOR . 'Entreprise.php',
'Scores_Session_Recherche' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Session' . DIRECTORY_SEPARATOR . 'Recherche.php',
'Siren' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Siren.php',
'Scores_Utilisateur' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Utilisateur.php',
'Scores_Wkhtml_Pdf' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Wkhtml' . DIRECTORY_SEPARATOR . 'Pdf.php',
'Scores_Ws_Abstract' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Ws' . DIRECTORY_SEPARATOR . 'Abstract.php',
'Scores_Ws_Catalog' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Ws' . DIRECTORY_SEPARATOR . 'Catalog.php',
'Scores_Ws_Config' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Ws' . DIRECTORY_SEPARATOR . 'Config.php',
'Scores_Ws_Entreprise' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Ws' . DIRECTORY_SEPARATOR . 'Entreprise.php',
'Scores_Ws_Gestion' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Ws' . DIRECTORY_SEPARATOR . 'Gestion.php',
'Scores_Ws_Interface' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Ws' . DIRECTORY_SEPARATOR . 'Interface.php',
'Scores_Ws_Interne' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Ws' . DIRECTORY_SEPARATOR . 'Interne.php',
'Scores_Ws_Pieces' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Ws' . DIRECTORY_SEPARATOR . 'Pieces.php',
'Scores_Ws_Saisie' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Ws' . DIRECTORY_SEPARATOR . 'Saisie.php',
'Scores_Ws' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'Ws.php',
'WsScores' => $dirname_530d9a41d779e . DIRECTORY_SEPARATOR . 'WsScores.php',
);

View File

@ -1,29 +1,29 @@
[local]
webservices.interne.wsdl = "http://webservice-2.5.sd.dev/interne/v0.6?wsdl-auto"
webservices.interne.wsdl = "http://webservice-2.6.sd.dev/interne/v0.6?wsdl-auto"
webservices.interne.options.soap_version = SOAP_1_2
webservices.entreprise.wsdl = "http://webservice-2.5.sd.dev/entreprise/v0.8?wsdl-auto"
webservices.entreprise.wsdl = "http://webservice-2.6.sd.dev/entreprise/v0.8?wsdl-auto"
webservices.entreprise.options.soap_version = SOAP_1_2
webservices.gestion.wsdl = "http://webservice-2.5.sd.dev/gestion/v0.3?wsdl-auto"
webservices.gestion.wsdl = "http://webservice-2.6.sd.dev/gestion/v0.3?wsdl-auto"
webservices.gestion.options.soap_version = SOAP_1_2
webservices.saisie.wsdl = "http://webservice-2.5.sd.dev/saisie/v0.2?wsdl-auto"
webservices.saisie.wsdl = "http://webservice-2.6.sd.dev/saisie/v0.2?wsdl-auto"
webservices.saisie.options.soap_version = SOAP_1_2
webservices.pieces.wsdl = "http://webservice-2.5.sd.dev/pieces/v0.1?wsdl-auto"
webservices.pieces.wsdl = "http://webservice-2.6.sd.dev/pieces/v0.1?wsdl-auto"
webservices.pieces.options.soap_version = SOAP_1_2
webservices.catalog.wsdl = "http://webservice-2.5.sd.dev/catalog/v0.1?wsdl-auto"
webservices.catalog.wsdl = "http://webservice-2.6.sd.dev/catalog/v0.1?wsdl-auto"
webservices.catalog.options.soap_version = SOAP_1_2
[sdsrvdev01]
webservices.interne.wsdl = "http://webservice-2.5.sd.lan/interne/v0.6?wsdl-auto"
webservices.interne.wsdl = "http://webservice-2.6.sd.lan/interne/v0.6?wsdl-auto"
webservices.interne.options.soap_version = SOAP_1_2
webservices.entreprise.wsdl = "http://webservice-2.5.sd.lan/entreprise/v0.8?wsdl-auto"
webservices.entreprise.wsdl = "http://webservice-2.6.sd.lan/entreprise/v0.8?wsdl-auto"
webservices.entreprise.options.soap_version = SOAP_1_2
webservices.gestion.wsdl = "http://webservice-2.5.sd.lan/gestion/v0.3?wsdl-auto"
webservices.gestion.wsdl = "http://webservice-2.6.sd.lan/gestion/v0.3?wsdl-auto"
webservices.gestion.options.soap_version = SOAP_1_2
webservices.saisie.wsdl = "http://webservice-2.5.sd.lan/saisie/v0.2?wsdl-auto"
webservices.saisie.wsdl = "http://webservice-2.6.sd.lan/saisie/v0.2?wsdl-auto"
webservices.saisie.options.soap_version = SOAP_1_2
webservices.pieces.wsdl = "http://webservice-2.5.sd.lan/pieces/v0.1?wsdl-auto"
webservices.pieces.wsdl = "http://webservice-2.6.sd.lan/pieces/v0.1?wsdl-auto"
webservices.pieces.options.soap_version = SOAP_1_2
webservices.catalog.wsdl = "http://webservice-2.5.sd.lan/catalog/v0.1?wsdl-auto"
webservices.catalog.wsdl = "http://webservice-2.6.sd.lan/catalog/v0.1?wsdl-auto"
webservices.catalog.options.soap_version = SOAP_1_2
[sd-25137]

File diff suppressed because it is too large Load Diff

BIN
public/favicon-152.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
public/favicon-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -7,6 +7,16 @@ defined('APPLICATION_PATH')
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
if (APPLICATION_ENV != 'production'){
ini_set("soap.wsdl_cache_enabled", "0");
}
// Check APC parameters
if (ini_get('apc.enabled')!=1) {
switch ( APPLICATION_ENV ) {
@ -19,14 +29,28 @@ if (ini_get('apc.enabled')!=1) {
}
}
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
//Use classmap autoloader - useful with opcode and realpath cache
require_once 'Zend/Loader/AutoloaderFactory.php';
require_once 'Zend/Loader/ClassMapAutoloader.php';
Zend_Loader_AutoloaderFactory::factory(array(
'Zend_Loader_ClassMapAutoloader' => array(
__DIR__ . '/../library/Zend/autoload_classmap.php',
__DIR__ . '/../library/Application/autoload_classmap.php',
__DIR__ . '/../library/Scores/autoload_classmap.php',
__DIR__ . '/../application/autoload_classmap.php',
),
'Zend_Loader_StandardAutoloader' => array(
'prefixes' => array(
'Zend' => __DIR__ . '/../library/Zend',
'Application' => __DIR__ . '/../library/Application',
'Scores' => __DIR__ . '/../library/Scores',
),
'fallback_autoloader' => true
)
));
/** Zend_Application */
require_once 'Zend/Application.php';
// Zend_Application - Use it if you don't have autoloaders
//require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(

View File

@ -84,6 +84,19 @@ $(document).ready(function()
});
});
$('a#liasse-check').on('click', function(e){
e.preventDefault();
var url = $(this).attr('href');
var objetId = $(this).attr('id') + '-result';
$(this).parent().html("Chargement...");
$.post( url, function (data, textStatus) {
if( data=='' || data=='FALSE' || textStatus=='timeout' ) {
data = "Impossible d'obtenir l'état.";
}
$('div#'+objetId).html(data);
});
});
});

View File

@ -1,27 +0,0 @@
/**
*
*/
function showPanoData(panoData) {
if (panoData.code != 200) {
return;
}
$('#pp-cb-thumb').replaceWith(
'<div id="pp-cb-thumb"><div class="left">' +
'<img src="http://maps.google.fr/cbk?output=tile&panoid=' +
panoData.location.panoId +
'&zoom=1&x=0&y=0&cb_client=maps_sv" />' +
'</div>' +
'<div class="right">' +
'<img src="http://maps.google.fr/cbk?output=tile&panoid=' +
panoData.location.panoId +
'&zoom=1&x=1&y=0&cb_client=maps_sv" />' +
'</div></div>');
$('#legende-photo' ).css('display','block');
$('#pp-cb-thumb' ).css('display','block');
}
function doShowPanoData(ll) {
var panoClient = new GStreetviewClient();
panoClient.getNearestPanorama(ll, showPanoData);
}

View File

@ -575,10 +575,10 @@ a.AncienSiege { background-color: #4D90FE; border: 1px solid #3079ED; color: #FF
#liasseForm th {color:#606060;font-weight:bold;}
#liasseForm {margin-left:30px;}
#liasseForm td {color:#606060;}
#synthese {border-collapse: collapse;clear: both;font-size: 12px;padding: 2px;text-align: left;width: 100%;font-family: arial,sans-serif;font-size: 11px;}
#synthese .head {font-weight: bold;}
#synthese th {background: none repeat scroll 0 0 #B9C9FE;border: 1px solid #FFFFFF;color: #003399;font-size: 13px;font-weight: normal;padding: 4px;}
#synthese td.right {text-align: right;}
#synthese {border-collapse: collapse;clear: both;font-size: 12px;margin: 10px 0px 0;padding: 2px;text-align: left;width: 100%;font-family: arial,sans-serif;font-size: 11px;}
#synthese td {background: none repeat scroll 0 0 #E8EDFF;border: 1px solid #FFFFFF;color: #666699;padding: 4px;}
#synthese tr:hover td {background: none repeat scroll 0 0 #D0DAFD;}
#tabbed_box {margin: 0px auto 0px auto;width:300px;}
@ -632,13 +632,6 @@ div.blocdegrade .echelleleft{float:left;}
div.blocdegrade .echelleright{float:right;}
.textdegrademin { position:absolute;overflow:hidden; margin-left:10px;line-height: 20px;color: #000;font-size:11px;font-weight: bold;font-family: monospace;}
.regle {clear:both; }
.clearfix:after {clear: both;content: ".";display: block;height: 0;visibility: hidden;}
#synthese .head {font-weight: bold;}
#synthese th {background: none repeat scroll 0 0 #B9C9FE;border: 1px solid #FFFFFF;color: #003399;font-size: 13px;font-weight: normal;padding: 4px;}
#synthese td.right {text-align: right;}
#synthese{border-collapse: collapse;clear: both;font-size: 12px;margin: 10px 0px 0;padding: 2px;text-align: left;width: 100%;font-family: arial,sans-serif;font-size: 11px;}
#synthese td {background: none repeat scroll 0 0 #E8EDFF;border: 1px solid #FFFFFF;color: #666699;padding: 4px;}
#synthese tr:hover td {background: none repeat scroll 0 0 #D0DAFD;}
/* Comment
----------------------------------*/

View File

@ -18,11 +18,9 @@ resources.frontController.plugins.Pdf = "Application_Controller_Plugin_Pdf"
resources.frontController.plugins.Xml = "Application_Controller_Plugin_Xml"
resources.frontController.plugins.Cgu = "Application_Controller_Plugin_Cgu"
resources.frontController.params.displayExceptions = 0
resources.layout.layout = "main"
resources.layout.layout = "layout"
resources.layout.layoutPath = APPLICATION_PATH "/views/default"
resources.view.basePath = APPLICATION_PATH "/views/default"
autoloaderNamespaces[] = "Application_"
autoloaderNamespaces[] = "Scores_"
; Scores configuration
profil.server.name = sdsrvdev01

View File

@ -18,11 +18,9 @@ resources.frontController.plugins.Pdf = "Application_Controller_Plugin_Pdf"
resources.frontController.plugins.Xml = "Application_Controller_Plugin_Xml"
resources.frontController.plugins.Cgu = "Application_Controller_Plugin_Cgu"
resources.frontController.params.displayExceptions = 0
resources.layout.layout = "main"
resources.layout.layout = "layout"
resources.layout.layoutPath = APPLICATION_PATH "/views/default"
resources.view.basePath = APPLICATION_PATH "/views/default"
autoloaderNamespaces[] = "Application_"
autoloaderNamespaces[] = "Scores_"
; Scores configuration
profil.server.name = development

View File

@ -18,11 +18,9 @@ resources.frontController.plugins.Pdf = "Application_Controller_Plugin_Pdf"
resources.frontController.plugins.Xml = "Application_Controller_Plugin_Xml"
resources.frontController.plugins.Cgu = "Application_Controller_Plugin_Cgu"
resources.frontController.params.displayExceptions = 0
resources.layout.layout = "main"
resources.layout.layout = "layout"
resources.layout.layoutPath = APPLICATION_PATH "/views/default"
resources.view.basePath = APPLICATION_PATH "/views/default"
autoloaderNamespaces[] = "Application_"
autoloaderNamespaces[] = "Scores_"
; Scores configuration
profil.server.name = ns359466

View File

@ -18,11 +18,9 @@ resources.frontController.plugins.Pdf = "Application_Controller_Plugin_Pdf"
resources.frontController.plugins.Xml = "Application_Controller_Plugin_Xml"
resources.frontController.plugins.Cgu = "Application_Controller_Plugin_Cgu"
resources.frontController.params.displayExceptions = 0
resources.layout.layout = "main"
resources.layout.layout = "layout"
resources.layout.layoutPath = APPLICATION_PATH "/views/default"
resources.view.basePath = APPLICATION_PATH "/views/default"
autoloaderNamespaces[] = "Application_"
autoloaderNamespaces[] = "Scores_"
; Scores configuration
profil.server.name = sd-13408

View File

@ -18,11 +18,9 @@ resources.frontController.plugins.Pdf = "Application_Controller_Plugin_Pdf"
resources.frontController.plugins.Xml = "Application_Controller_Plugin_Xml"
resources.frontController.plugins.Cgu = "Application_Controller_Plugin_Cgu"
resources.frontController.params.displayExceptions = 0
resources.layout.layout = "main"
resources.layout.layout = "layout"
resources.layout.layoutPath = APPLICATION_PATH "/views/default"
resources.view.basePath = APPLICATION_PATH "/views/default"
autoloaderNamespaces[] = "Application_"
autoloaderNamespaces[] = "Scores_"
; Scores configuration
profil.server.name = sd-46528

View File

@ -13,8 +13,29 @@ set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
//Use classmap autoloader - useful with opcode and realpath cache
require_once 'Zend/Loader/AutoloaderFactory.php';
require_once 'Zend/Loader/ClassMapAutoloader.php';
Zend_Loader_AutoloaderFactory::factory(array(
'Zend_Loader_ClassMapAutoloader' => array(
__DIR__ . '/../../library/Zend/autoload_classmap.php',
__DIR__ . '/../../library/Application/autoload_classmap.php',
__DIR__ . '/../../library/Scores/autoload_classmap.php',
__DIR__ . '/../../application/autoload_classmap.php',
),
'Zend_Loader_StandardAutoloader' => array(
'prefixes' => array(
'Zend' => __DIR__ . '/../../library/Zend',
'Application' => __DIR__ . '/../../library/Application',
'Scores' => __DIR__ . '/../../library/Scores',
'Metier' => __DIR__ . '/../../library/Metier',
),
'fallback_autoloader' => true
)
));
// Zend_Application - Use it if you don't have autoloaders
//require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(

View File

@ -14,8 +14,29 @@ set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
//Use classmap autoloader - useful with opcode and realpath cache
require_once 'Zend/Loader/AutoloaderFactory.php';
require_once 'Zend/Loader/ClassMapAutoloader.php';
Zend_Loader_AutoloaderFactory::factory(array(
'Zend_Loader_ClassMapAutoloader' => array(
__DIR__ . '/../../library/Zend/autoload_classmap.php',
__DIR__ . '/../../library/Application/autoload_classmap.php',
__DIR__ . '/../../library/Scores/autoload_classmap.php',
__DIR__ . '/../../application/autoload_classmap.php',
),
'Zend_Loader_StandardAutoloader' => array(
'prefixes' => array(
'Zend' => __DIR__ . '/../../library/Zend',
'Application' => __DIR__ . '/../../library/Application',
'Scores' => __DIR__ . '/../../library/Scores',
'Metier' => __DIR__ . '/../../library/Metier',
),
'fallback_autoloader' => true
)
));
// Zend_Application - Use it if you don't have autoloaders
//require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(

View File

@ -13,8 +13,29 @@ set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
//Use classmap autoloader - useful with opcode and realpath cache
require_once 'Zend/Loader/AutoloaderFactory.php';
require_once 'Zend/Loader/ClassMapAutoloader.php';
Zend_Loader_AutoloaderFactory::factory(array(
'Zend_Loader_ClassMapAutoloader' => array(
__DIR__ . '/../../library/Zend/autoload_classmap.php',
__DIR__ . '/../../library/Application/autoload_classmap.php',
__DIR__ . '/../../library/Scores/autoload_classmap.php',
__DIR__ . '/../../application/autoload_classmap.php',
),
'Zend_Loader_StandardAutoloader' => array(
'prefixes' => array(
'Zend' => __DIR__ . '/../../library/Zend',
'Application' => __DIR__ . '/../../library/Application',
'Scores' => __DIR__ . '/../../library/Scores',
'Metier' => __DIR__ . '/../../library/Metier',
),
'fallback_autoloader' => true
)
));
// Zend_Application - Use it if you don't have autoloaders
//require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(

View File

@ -14,8 +14,29 @@ set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
//Use classmap autoloader - useful with opcode and realpath cache
require_once 'Zend/Loader/AutoloaderFactory.php';
require_once 'Zend/Loader/ClassMapAutoloader.php';
Zend_Loader_AutoloaderFactory::factory(array(
'Zend_Loader_ClassMapAutoloader' => array(
__DIR__ . '/../../library/Zend/autoload_classmap.php',
__DIR__ . '/../../library/Application/autoload_classmap.php',
__DIR__ . '/../../library/Scores/autoload_classmap.php',
__DIR__ . '/../../application/autoload_classmap.php',
),
'Zend_Loader_StandardAutoloader' => array(
'prefixes' => array(
'Zend' => __DIR__ . '/../../library/Zend',
'Application' => __DIR__ . '/../../library/Application',
'Scores' => __DIR__ . '/../../library/Scores',
'Metier' => __DIR__ . '/../../library/Metier',
),
'fallback_autoloader' => true
)
));
// Zend_Application - Use it if you don't have autoloaders
//require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(

View File

@ -14,6 +14,36 @@ set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
)));
//Use classmap autoloader - useful with opcode and realpath cache
require_once 'Zend/Loader/AutoloaderFactory.php';
require_once 'Zend/Loader/ClassMapAutoloader.php';
Zend_Loader_AutoloaderFactory::factory(array(
'Zend_Loader_ClassMapAutoloader' => array(
__DIR__ . '/../../library/Zend/autoload_classmap.php',
__DIR__ . '/../../library/Application/autoload_classmap.php',
__DIR__ . '/../../library/Scores/autoload_classmap.php',
__DIR__ . '/../../application/autoload_classmap.php',
),
'Zend_Loader_StandardAutoloader' => array(
'prefixes' => array(
'Zend' => __DIR__ . '/../../library/Zend',
'Application' => __DIR__ . '/../../library/Application',
'Scores' => __DIR__ . '/../../library/Scores',
'Metier' => __DIR__ . '/../../library/Metier',
),
'fallback_autoloader' => true
)
));
// Zend_Application - Use it if you don't have autoloaders
//require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
/** Zend_Application */
require_once 'Zend/Application.php';

View File

@ -14,8 +14,29 @@ set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
//Use classmap autoloader - useful with opcode and realpath cache
require_once 'Zend/Loader/AutoloaderFactory.php';
require_once 'Zend/Loader/ClassMapAutoloader.php';
Zend_Loader_AutoloaderFactory::factory(array(
'Zend_Loader_ClassMapAutoloader' => array(
__DIR__ . '/../../library/Zend/autoload_classmap.php',
__DIR__ . '/../../library/Application/autoload_classmap.php',
__DIR__ . '/../../library/Scores/autoload_classmap.php',
__DIR__ . '/../../application/autoload_classmap.php',
),
'Zend_Loader_StandardAutoloader' => array(
'prefixes' => array(
'Zend' => __DIR__ . '/../../library/Zend',
'Application' => __DIR__ . '/../../library/Application',
'Scores' => __DIR__ . '/../../library/Scores',
'Metier' => __DIR__ . '/../../library/Metier',
),
'fallback_autoloader' => true
)
));
// Zend_Application - Use it if you don't have autoloaders
//require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(

View File

@ -13,8 +13,29 @@ set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
//Use classmap autoloader - useful with opcode and realpath cache
require_once 'Zend/Loader/AutoloaderFactory.php';
require_once 'Zend/Loader/ClassMapAutoloader.php';
Zend_Loader_AutoloaderFactory::factory(array(
'Zend_Loader_ClassMapAutoloader' => array(
__DIR__ . '/../../library/Zend/autoload_classmap.php',
__DIR__ . '/../../library/Application/autoload_classmap.php',
__DIR__ . '/../../library/Scores/autoload_classmap.php',
__DIR__ . '/../../application/autoload_classmap.php',
),
'Zend_Loader_StandardAutoloader' => array(
'prefixes' => array(
'Zend' => __DIR__ . '/../../library/Zend',
'Application' => __DIR__ . '/../../library/Application',
'Scores' => __DIR__ . '/../../library/Scores',
'Metier' => __DIR__ . '/../../library/Metier',
),
'fallback_autoloader' => true
)
));
// Zend_Application - Use it if you don't have autoloaders
//require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(

View File

@ -13,8 +13,29 @@ set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
//Use classmap autoloader - useful with opcode and realpath cache
require_once 'Zend/Loader/AutoloaderFactory.php';
require_once 'Zend/Loader/ClassMapAutoloader.php';
Zend_Loader_AutoloaderFactory::factory(array(
'Zend_Loader_ClassMapAutoloader' => array(
__DIR__ . '/../../library/Zend/autoload_classmap.php',
__DIR__ . '/../../library/Application/autoload_classmap.php',
__DIR__ . '/../../library/Scores/autoload_classmap.php',
__DIR__ . '/../../application/autoload_classmap.php',
),
'Zend_Loader_StandardAutoloader' => array(
'prefixes' => array(
'Zend' => __DIR__ . '/../../library/Zend',
'Application' => __DIR__ . '/../../library/Application',
'Scores' => __DIR__ . '/../../library/Scores',
'Metier' => __DIR__ . '/../../library/Metier',
),
'fallback_autoloader' => true
)
));
// Zend_Application - Use it if you don't have autoloaders
//require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(