Recherche Annonce
This commit is contained in:
parent
2fbddfbb77
commit
03e015b877
@ -1,6 +1,167 @@
|
|||||||
<?php
|
<?php
|
||||||
class Search_AnnonceController extends Zend_Controller_Action
|
class Search_AnnonceController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
public function indexAction(){}
|
public function indexAction()
|
||||||
public function listAction(){}
|
{
|
||||||
|
$this->view->headTitle()->prepend('Recherche Annonce');
|
||||||
|
|
||||||
|
$session = new Scores_Session_Recherche();
|
||||||
|
$recherche = $session->item(0);
|
||||||
|
if ($recherche['type']=='annonce') {
|
||||||
|
$params = $recherche['params']['formA'];
|
||||||
|
} else {
|
||||||
|
$params = array();
|
||||||
|
}
|
||||||
|
$this->view->assign('recherche', $params);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function listAction()
|
||||||
|
{
|
||||||
|
$request = $this->getRequest();
|
||||||
|
$params = $request->getParams();
|
||||||
|
$token = $request->getParam('token', null);
|
||||||
|
|
||||||
|
$session = new Scores_Session_Recherche();
|
||||||
|
|
||||||
|
if (array_key_exists('formA', $params)) {
|
||||||
|
$token = $session->save('annonce', $params);
|
||||||
|
} else {
|
||||||
|
$recherche = $session->get($token);
|
||||||
|
$params = $recherche['params'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !isset($params['formA']['annee']) && isset($params['formA']['dateparution']) )
|
||||||
|
{
|
||||||
|
$dateparution = str_replace('/', '', $dateparution);
|
||||||
|
$jj = substring($annee, 0, 2);
|
||||||
|
$mm = substring($annee, 2, 2);
|
||||||
|
$aa = substring($annee, 4, 4);
|
||||||
|
$dateparution = $aa.$mm.$jj;
|
||||||
|
}
|
||||||
|
|
||||||
|
$p = $request->getParam('p', 0);
|
||||||
|
|
||||||
|
if($params['formA']['histo']!='on')
|
||||||
|
{
|
||||||
|
$ra = array();
|
||||||
|
$ra['dateAnnee'] = $params['formA']['annee'];
|
||||||
|
$ra['numParution'] = $params['formA']['nparution'];
|
||||||
|
if($params['formA']['source']=='bodacc')
|
||||||
|
{
|
||||||
|
$ra['source'] = strtoupper('bod'.$params['formA']['bodacc']);
|
||||||
|
$ra['numAnnonce'] = $params['formA']['nannonce'];
|
||||||
|
}
|
||||||
|
elseif($params['formA']['source']=='balo')
|
||||||
|
{
|
||||||
|
$ra['source'] = strtoupper($params['formA']['source']);
|
||||||
|
$ra['numAnnonce'] = $params['formA']['naffaire'];
|
||||||
|
}
|
||||||
|
elseif($params['source']=='asso')
|
||||||
|
{
|
||||||
|
$ra['source'] = strtoupper($params['formA']['source']);
|
||||||
|
$ra['numAnnonce'] = $params['formA']['nannonce'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$ws = new WsScores();
|
||||||
|
$result = $ws->rechercheAnnonce($ra['source'], $ra['dateAnnee'], $ra['numParution'], $ra['numAnnonce']);
|
||||||
|
$infos = $result->result->item;
|
||||||
|
|
||||||
|
$parametresTxt = array(
|
||||||
|
'source'=>'Source',
|
||||||
|
'annee'=>'Année',
|
||||||
|
'dateparution'=>'Date de parution',
|
||||||
|
'nparution'=>'Numéro de parution',
|
||||||
|
'bpage'=>'Page',
|
||||||
|
'nannonce'=>'Numéro d\'annonce',
|
||||||
|
'naffaire'=>'Numéro d\'affaire',
|
||||||
|
'txt'=>'Recherche');
|
||||||
|
$strCriteres = '';
|
||||||
|
foreach ($parametresTxt as $key => $param) {
|
||||||
|
if($params['formA'][$key]!='' && $param!='') {
|
||||||
|
$strCriteres.= $param.' : '.$params['formA'][$key].' ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->view->assign('criteres', $result->criteres);
|
||||||
|
$this->view->assign('infos', $infos);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
//Suppression des caractères accentués
|
||||||
|
$txt = Scores_Locale_String::cleanstring($params['formA']['txt']);
|
||||||
|
//Remplacement du caractère § par ~
|
||||||
|
$txt = str_replace('$', '~', $txt);
|
||||||
|
// Recherche siren tenant compte des anomalies d'OCR
|
||||||
|
$txt = preg_replace('/([0-9]{3})([0-9]{3})([0-9]{3})/','"$1$2$3"|"$1 $2$3"|"$1$2 $3"|"$1 $2 $3"', $txt);
|
||||||
|
|
||||||
|
$ws = new WsScores();
|
||||||
|
$result = $ws->rechercheHisto($txt, $params['formA']['annee'], $params['formA']['bodacc'], $p);
|
||||||
|
|
||||||
|
$infos = $result->reponses->item;
|
||||||
|
$mots = $result->mots->item;
|
||||||
|
|
||||||
|
$annonces = array();
|
||||||
|
foreach($infos as $annonce)
|
||||||
|
{
|
||||||
|
|
||||||
|
//Mark all search words in bold
|
||||||
|
$texte = $annonce->Texte;
|
||||||
|
foreach( $mots as $mot ){
|
||||||
|
$texte = preg_replace('/'.$mot.'/i', '<b>'.strtoupper($mot).'</b>', $texte);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Transform Code as a better text
|
||||||
|
$code = $annonce->Code;
|
||||||
|
if( substr($code,0,3)=='BOD' )
|
||||||
|
{
|
||||||
|
$code = '<u>BODACC :</u> '.substr($code,3,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Change URL to download file
|
||||||
|
//$fichier = str_replace("http://wse.scores-decisions.com:8081/fichier/bodacc/q",'',$annonce->Fichier);
|
||||||
|
$pos = strrpos($annonce->Fichier, '/q/');
|
||||||
|
$host = substr($annonce->Fichier, 0, $pos);
|
||||||
|
$fichier = substr($annonce->Fichier, $pos+3);
|
||||||
|
|
||||||
|
$annonces[] = array (
|
||||||
|
'annee' => $annonce->Annee,
|
||||||
|
'code' => $code,
|
||||||
|
'text' => $texte,
|
||||||
|
'file' => $this->view->url(array('controller'=>'telechargement', 'action'=>'histopdf',
|
||||||
|
'q' => $fichier, 'host' => base64_encode($host)), 'default', true
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$this->view->assign('annonces', $annonces);
|
||||||
|
|
||||||
|
$parametresTxt = array(
|
||||||
|
'source'=>'Source',
|
||||||
|
'bodacc'=>'Type',
|
||||||
|
'histo'=>'',
|
||||||
|
'annee'=>'Année',
|
||||||
|
'dateparution'=>'Date de parution',
|
||||||
|
'nparution'=>'Numéro de parution',
|
||||||
|
'bpage'=>'Page',
|
||||||
|
'nannonce'=>'Numéro d\'annonce',
|
||||||
|
'naffaire'=>'Numéro d\'affaire',
|
||||||
|
'txt'=>'Recherche');
|
||||||
|
$strCriteres = '';
|
||||||
|
foreach ($parametresTxt as $key => $param) {
|
||||||
|
if($params['formA'][$key]!='' && $param!='') {
|
||||||
|
$strCriteres.= $param.' : '.$params['formA'][$key].', ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->view->assign('p', $p);
|
||||||
|
$this->view->assign('token', $token);
|
||||||
|
|
||||||
|
$user = new Scores_Utilisateur();
|
||||||
|
$this->view->assign('userNbReponses', $user->getNbRep());
|
||||||
|
|
||||||
|
$this->view->assign('nbReponses', $result->nbReponses);
|
||||||
|
$this->view->assign('nbReponsesTotal', $result->nbReponsesTotal);
|
||||||
|
|
||||||
|
$this->view->assign('strCriteres', $strCriteres);
|
||||||
|
$this->view->assign('histo', $params['formA']['histo']);
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,9 +1,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function formSource(source)
|
function formSource(source) {
|
||||||
{
|
|
||||||
var fields = Array( 'bodacc', 'histo', 'date', 'nparution', 'fpage', 'nannonce', 'naffaire', 'txt' );
|
var fields = Array( 'bodacc', 'histo', 'date', 'nparution', 'fpage', 'nannonce', 'naffaire', 'txt' );
|
||||||
switch(source)
|
switch(source){
|
||||||
{
|
|
||||||
case 'asso':
|
case 'asso':
|
||||||
var field_actif = new Array('date', 'nparution', 'fpage', 'nannonce');
|
var field_actif = new Array('date', 'nparution', 'fpage', 'nannonce');
|
||||||
break;
|
break;
|
||||||
@ -22,8 +20,7 @@ function formSource(source)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function()
|
$(document).ready(function(){
|
||||||
{
|
|
||||||
//Init
|
//Init
|
||||||
formSource($('#sourceSelect').val());
|
formSource($('#sourceSelect').val());
|
||||||
if ($('#histoSelect').prop('checked')) {
|
if ($('#histoSelect').prop('checked')) {
|
||||||
@ -47,48 +44,19 @@ $(document).ready(function()
|
|||||||
$(this).prop('checked', false);
|
$(this).prop('checked', false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css">
|
<div id="content">
|
||||||
.infoTitle {clear:both; float:left; width:180px; margin-left:30px; padding:0 10px 0 0;}
|
|
||||||
.infoData {float:left; width:320px; margin:2px 0;}
|
|
||||||
form {}
|
|
||||||
form em { color:#FF0000;}
|
|
||||||
fieldset {border:0; margin:0; padding:0;}
|
|
||||||
fieldset legend{ padding:0 0 0 10px;}
|
|
||||||
.fieldgrp{clear:both; width:100%; margin-bottom:.5em; overflow:hidden;}
|
|
||||||
.fieldgrp:after{content:"."; display:block; clear:both; visibility:hidden; line-height:0; height:0; }
|
|
||||||
.fieldgrp label{ width:150px; font-weight:bold; margin-left:30px; clear:both; padding:0 10px 0 0; line-height:22px; _padding-top:3px; float:left; display:block; font-size:108%;}
|
|
||||||
.fieldgrp label.inline{ clear:none; margin:0; float:left; display:block; width:auto;}
|
|
||||||
.fieldgrp label span{font-weight:normal;}
|
|
||||||
.fieldgrp label abbr{color:#4B911C; font-size:120%; vertical-align:middle;}
|
|
||||||
.fieldgrp p { clear:both; margin:0 0 0 30px; font-size:12px; }
|
|
||||||
.field { float:left; padding:0 10px 0 0; line-height:22px; _padding-top:3px;}
|
|
||||||
.field .longfield{width:215px;}
|
|
||||||
.field .longfield-select{width:220px;}
|
|
||||||
.field .smallfield{width:95px;}
|
|
||||||
.field .medfield{width:110px;}
|
|
||||||
.field input, .field select{ font-size:110%; margin:2px 0; }
|
|
||||||
.field input.radio { margin:0 5px; vertical-align:middle; border:none; }
|
|
||||||
.field input.checkbox { border:none; }
|
|
||||||
.field span { margin-left:10px; }
|
|
||||||
.noborder {border:none;}
|
|
||||||
div.submit{ text-align:center; }
|
|
||||||
</style>
|
|
||||||
<div id="center">
|
|
||||||
|
|
||||||
<h1>Rechercher une annonce</h1>
|
<h3 class="text-center">Rechercher une annonce légale</h3>
|
||||||
|
|
||||||
<div class="paragraph">
|
<form class="form-horizontal" name="annonces" method="post" action="<?=$this->url(array('action'=>'list'))?>">
|
||||||
|
|
||||||
<form name="annonces" method="post" action="<?=$this->url(array('controller'=>'recherche', 'action'=>'annonceliste'))?>">
|
|
||||||
<input type="hidden" name="formA[type]" value="annonces"/>
|
<input type="hidden" name="formA[type]" value="annonces"/>
|
||||||
|
|
||||||
<div class="fieldgrp">
|
<div class="form-group form-group-sm">
|
||||||
<label for="source">Source</label>
|
<label class="col-sm-3 control-label">Source</label>
|
||||||
<div class="field">
|
<div class="col-sm-9">
|
||||||
<select id="sourceSelect" name="formA[source]">
|
<select id="sourceSelect" name="formA[source]" class="form-control">
|
||||||
<option value="bodacc" <?=(isset($this->recherche['source']) && $this->recherche['source']=='bodacc')? 'selected' : ''?>>BODACC / BORC</option>
|
<option value="bodacc" <?=(isset($this->recherche['source']) && $this->recherche['source']=='bodacc')? 'selected' : ''?>>BODACC / BORC</option>
|
||||||
<option value="asso" <?=(isset($this->recherche['source']) && $this->recherche['source']=='asso')? 'selected' : ''?>>JO Association</option>
|
<option value="asso" <?=(isset($this->recherche['source']) && $this->recherche['source']=='asso')? 'selected' : ''?>>JO Association</option>
|
||||||
<option value="balo" <?=(isset($this->recherche['source']) && $this->recherche['source']=='balo')? 'selected' : ''?>>BALO</option>
|
<option value="balo" <?=(isset($this->recherche['source']) && $this->recherche['source']=='balo')? 'selected' : ''?>>BALO</option>
|
||||||
@ -96,91 +64,109 @@ div.submit{ text-align:center; }
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="bodacc" class="fieldgrp">
|
|
||||||
<label for="bodacc">Bodacc</label>
|
<div id="bodacc" class="form-group form-group-sm">
|
||||||
<div class="field">
|
<label class="col-sm-3 control-label">Bodacc</label>
|
||||||
<span><input class="radio" type="radio" name="formA[bodacc]" value="a" <?=(isset($this->recherche['bodacc']) && $this->recherche['bodacc']=='a')? 'checked' : ''?>/>A</span>
|
<div class="col-sm-9">
|
||||||
<span><input class="radio" type="radio" name="formA[bodacc]" value="b" <?=(isset($this->recherche['bodacc']) && $this->recherche['bodacc']=='b')? 'checked' : ''?>/>B</span>
|
<label class="radio-inline">
|
||||||
<span><input class="radio" type="radio" name="formA[bodacc]" value="c" <?=(isset($this->recherche['bodacc']) && $this->recherche['bodacc']=='c')? 'checked' : ''?>/>C</span>
|
<input type="radio" name="formA[bodacc]" value="a" <?=(isset($this->recherche['bodacc']) && $this->recherche['bodacc']=='a')? 'checked' : ''?>/> A
|
||||||
<span><a href="#" id="deselectBodacc">Désélection</a></span>
|
</label>
|
||||||
|
<label class="radio-inline">
|
||||||
|
<input type="radio" name="formA[bodacc]" value="b" <?=(isset($this->recherche['bodacc']) && $this->recherche['bodacc']=='b')? 'checked' : ''?>/> B
|
||||||
|
</label>
|
||||||
|
<label class="radio-inline">
|
||||||
|
<input type="radio" name="formA[bodacc]" value="c" <?=(isset($this->recherche['bodacc']) && $this->recherche['bodacc']=='c')? 'checked' : ''?>/> C
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="histo" class="fieldgrp">
|
<div id="histo" class="form-group form-group-sm">
|
||||||
<label for="histo">Historique jusqu'à 1953</label>
|
<div class="col-sm-offset-3 col-sm-9">
|
||||||
<div class="field">
|
<label class="checkbox-inline">
|
||||||
<input class="checkbox" type="checkbox" id="histoSelect" name="formA[histo]" <?=(isset($this->recherche['histo']) && $this->recherche['histo']=='on')? 'checked' : ''?>/>
|
<input type="checkbox" id="histoSelect" name="formA[histo]" <?=(isset($this->recherche['histo']) && $this->recherche['histo']=='on') ? 'checked' : ''?>/> Historique jusqu'à 1953
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="date" class="fieldgrp">
|
<div id="date">
|
||||||
<label for="annee">Année</label>
|
<div class="form-group form-group-sm">
|
||||||
<div class="field">
|
<label class="col-sm-3 control-label">Année</label>
|
||||||
<input type="text" name="formA[annee]" size="4" maxlength="4" value="<?=$this->recherche['annee']?>"/>
|
<div class="col-sm-9">
|
||||||
</div>
|
<input type="text" name="formA[annee]" size="4" maxlength="4" value="<?=$this->recherche['annee']?>" class="form-control"/>
|
||||||
<label class="inline" for="dateparution">ou Date de parution</label>
|
|
||||||
<div class="field">
|
|
||||||
<input id="datepicker" type="text" name="formA[dateparution]" size="10" maxlength="10" value="<?=$this->recherche['dateparution']?>"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="nparution" class="fieldgrp">
|
<div class="form-group form-group-sm">
|
||||||
<label for="nparution">Numéro de parution</label>
|
<label class="col-sm-3 control-label">ou Date de parution</label>
|
||||||
<div class="field">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="formA[nparution]" size="10" maxlength="10" value="<?=$this->recherche['nparution']?>"/>
|
<input id="datepicker" type="text" name="formA[dateparution]" size="10" maxlength="10" value="<?=$this->recherche['dateparution']?>" class="form-control"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="fpage" class="fieldgrp">
|
<div id="nparution" class="form-group form-group-sm">
|
||||||
<label for="page">Page</label>
|
<label class="col-sm-3 control-label">Numéro de parution</label>
|
||||||
<div class="field">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="formA[bpage]" size="10" maxlength="10" value="<?=$this->recherche['bpage']?>"/>
|
<input type="text" name="formA[nparution]" size="10" maxlength="10" value="<?=$this->recherche['nparution']?>" class="form-control"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="nannonce" class="fieldgrp">
|
<div id="fpage" class="form-group form-group-sm">
|
||||||
<label for="nannonce">Numéro d'annonce</label>
|
<label class="col-sm-3 control-label">Page</label>
|
||||||
<div class="field">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="formA[nannonce]" size="10" maxlength="10" value="<?=$this->recherche['nannonce']?>"/>
|
<input type="text" name="formA[bpage]" size="10" maxlength="10" value="<?=$this->recherche['bpage']?>" class="form-control"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="naffaire" class="fieldgrp">
|
<div id="nannonce" class="form-group form-group-sm">
|
||||||
<label for="naffaire">Numéro d'affaire</label>
|
<label class="col-sm-3 control-label">Numéro d'annonce</label>
|
||||||
<div class="field">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="formA[naffaire]" size="10" maxlength="10" value="<?=$this->recherche['naffaire']?>"/>
|
<input type="text" name="formA[nannonce]" size="10" maxlength="10" value="<?=$this->recherche['nannonce']?>" class="form-control"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="txt" class="fieldgrp">
|
<div id="naffaire" class="form-group form-group-sm">
|
||||||
<label for="txt">Recherche</label>
|
<label class="col-sm-3 control-label">Numéro d'affaire</label>
|
||||||
<div class="field">
|
<div class="col-sm-9">
|
||||||
|
<input type="text" name="formA[naffaire]" size="10" maxlength="10" value="<?=$this->recherche['naffaire']?>" class="form-control"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="txt">
|
||||||
|
|
||||||
|
<div class="form-group form-group-sm">
|
||||||
|
<label class="col-sm-3 control-label">Recherche</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
<input type="text" name="formA[txt]" size="55" maxlength="2048" value="<?
|
<input type="text" name="formA[txt]" size="55" maxlength="2048" value="<?
|
||||||
if (isset($this->recherche['txt'])) {
|
if (isset($this->recherche['txt'])) {
|
||||||
print htmlspecialchars($this->recherche['txt']);
|
print htmlspecialchars($this->recherche['txt']);
|
||||||
}
|
}
|
||||||
?>"/>
|
?>" class="form-control" aria-describedby="helpBlock"/>
|
||||||
</div>
|
<span id="helpBlock" class="help-block">
|
||||||
<p>
|
<p>
|
||||||
<b><u>Attention :</u></b>
|
<b><u>Attention :</u></b>
|
||||||
Ce formulaire de recherche permet de rechercher dans les pages entières du BORC, BODAC et BODACC telles qu'elles ont été numérisées par Scores & Décisions.
|
Ce formulaire de recherche permet de rechercher dans les pages entières du BORC, BODAC et BODACC telles qu'elles ont été numérisées par Scores & Décisions.
|
||||||
Cette recherche permet de rechercher des annonces dans des pages jusqu'à l'année de parution <b>1953</b>.
|
Cette recherche permet de rechercher des annonces dans des pages jusqu'à l'année de parution <b>1953</b>.
|
||||||
</p>
|
</p>
|
||||||
<p> </p>
|
|
||||||
<p><u>Opérateurs et méthodes de recherche :</u></p>
|
<p><u>Opérateurs et méthodes de recherche :</u></p>
|
||||||
<p>Opérateur OU, <b>|</b> (ex: <b>societe | ville</b>)</p>
|
<p>Opérateur OU, <b>|</b> (ex: <b>societe | ville</b>)</p>
|
||||||
<p>Exclure des termes, <b>-</b> ou <b>!</b> (ex: <b>societe -ville</b> ou <b>societe !ville</b>)</p>
|
<p>Exclure des termes, <b>-</b> ou <b>!</b> (ex: <b>societe -ville</b> ou <b>societe !ville</b>)</p>
|
||||||
<p>Phrase (ex: <b>"boulangerie dupain"</b>)</p>
|
<p>Phrase (ex: <b>"boulangerie dupain"</b>)</p>
|
||||||
<p>Recherche de proximité (ex: <b>"boulangerie plantes"$50</b> , recherche d'une boulangerie dans rue des plantes )</p>
|
<p>Recherche de proximité (ex: <b>"boulangerie plantes"$50</b> , recherche d'une boulangerie dans rue des plantes )</p>
|
||||||
<p>Ordre de recherche (ex: <b>boulangerie << dupain</b> , recherche du mot "boulangerie" puis du mot "dupain") </p>
|
<p>Ordre de recherche (ex: <b>boulangerie << dupain</b> , recherche du mot "boulangerie" puis du mot "dupain") </p>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="submit">
|
</div>
|
||||||
<p><input type="submit" name="submit" value="Ok"/></p>
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-3 col-sm-9">
|
||||||
|
<button type="submit" class="btn btn-default btn-sm">Rechercher</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
@ -1 +1,133 @@
|
|||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<?php if ($this->histo == 'on'){?>
|
||||||
|
|
||||||
|
<h3 class="text-center">Rechercher une annonce légale historique</h3>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
ol li { margin-bottom:10px; }
|
||||||
|
</style>
|
||||||
|
<?php if($this->p>=200) {?>
|
||||||
|
<p>Merci d'affiner votre recherche.</p>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ( $this->nbReponses==0) { ?>
|
||||||
|
<p class="StyleInfoLib">
|
||||||
|
Pas de résultat affiché avec le(s) critère(s)
|
||||||
|
<a title="Retour au formulaire de recherche" href="<?=$this->url(array('module'=>'search', 'controller'=>'annonce',
|
||||||
|
'action'=>'index'), 'default', true)?>"><?=$this->strCriteres?></a>
|
||||||
|
</p>
|
||||||
|
<?php } else { ?>
|
||||||
|
<p class="StyleInfoLib">
|
||||||
|
<?=$this->nbReponsesTotal?> réponses. avec les critères <a title="Retour au formulaire de recherche"
|
||||||
|
href="<?=$this->url(array('module'=>'search', 'controller'=>'annonce', 'action'=>'index'))?>">
|
||||||
|
<?=$this->strCriteres?></a>
|
||||||
|
<?php
|
||||||
|
if ( $this->p+$this->userNbReponses<$this->nbReponsesTotal )
|
||||||
|
{
|
||||||
|
$totPage = ceil($this->nbReponsesTotal/$this->userNbReponses);
|
||||||
|
$curPage = ceil($this->p/$this->userNbReponses)+1;
|
||||||
|
?>
|
||||||
|
<?=$this->nbReponses?> résultats affichés. Page <?=$curPage?>/<?=$totPage?>.
|
||||||
|
<?php
|
||||||
|
$prec = $this->p-$this->userNbReponses;
|
||||||
|
$suiv = $this->p+$this->userNbReponses;
|
||||||
|
}
|
||||||
|
elseif( $this->p+$this->userNbReponses>=$this->nbReponsesTotal )
|
||||||
|
{
|
||||||
|
$totPage = ceil($this->nbReponsesTotal/$this->userNbReponses);
|
||||||
|
$curPage = $totPage;
|
||||||
|
?>
|
||||||
|
<?=$this->nbReponses?> résultats affichés. Page <?=$curPage?>/<?=$totPage?>.
|
||||||
|
<?php
|
||||||
|
$prec = $this->p-$this->userNbReponses;
|
||||||
|
$suiv = $this->p+$this->userNbReponses;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$totPage = $curPage = 1;
|
||||||
|
}
|
||||||
|
echo '</p>';
|
||||||
|
|
||||||
|
?>
|
||||||
|
<ol>
|
||||||
|
<?php
|
||||||
|
$indice = 0;
|
||||||
|
foreach( $this->annonces as $annonce )
|
||||||
|
{
|
||||||
|
$indice++;
|
||||||
|
?>
|
||||||
|
<li type="1" value="<?=$this->p+$indice?>">
|
||||||
|
<?=$annonce['code']?>
|
||||||
|
<u>Année :</u> <?=$annonce['annee']?>
|
||||||
|
<br/>
|
||||||
|
... <?=$annonce['text']?> ...
|
||||||
|
<br/>
|
||||||
|
<a href="<?=$annonce['file']?>" class="histopdf" target="_blank">Télécharger la page en PDF</a>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ol>
|
||||||
|
<?php
|
||||||
|
//Page précédentes
|
||||||
|
if($curPage>1) {?>
|
||||||
|
<a href="<?=$this->url(array('module'=>'search', 'controller'=>'annonce', 'action'=>'list',
|
||||||
|
'p'=>$prec, 'token'=>$this->token))?>">Page précédente</a>
|
||||||
|
<?php } ?>
|
||||||
|
<< Page : <?=$curPage.'/'.$totPage?> >>
|
||||||
|
<?php
|
||||||
|
//Page suivante
|
||||||
|
if ($curPage<$totPage) { ?>
|
||||||
|
<a href="<?=$this->url(array('module'=>'search', 'controller'=>'annonce', 'action'=>'list', 'p'=>$suiv,
|
||||||
|
'token'=>$this->token))?>">Page suivante</a>
|
||||||
|
<?php } ?>
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php } else {?>
|
||||||
|
|
||||||
|
<h3 class="text-center">Rechercher une annonce légale</h3>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ( $this->nbReponses==0){
|
||||||
|
?>
|
||||||
|
<p class="StyleInfoLib">
|
||||||
|
Pas de résultat affiché avec le(s) critère(s)
|
||||||
|
<a title="Retour au formulaire de recherche" href="<?=$this->url(array('module'=>'search', 'controller'=>'annonce', 'action'=>'index'), 'default', true)?>">
|
||||||
|
<?=$this->strCriteres?></a>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
//Affichage des critères de recherche
|
||||||
|
else {
|
||||||
|
?>
|
||||||
|
<div class="blockh2">
|
||||||
|
<p class="StyleInfoLib">Critères de recherche
|
||||||
|
<a title="Retour au formulaire de recherche" href="<?=$this->url(array('module'=>'search', 'controller'=>'annonce', 'action'=>'index'), 'default', true)?>">
|
||||||
|
<?=$this->strCriteres?></a></p>
|
||||||
|
<div id="annonce">
|
||||||
|
<?php
|
||||||
|
//Affichage des données
|
||||||
|
foreach( $this->infos as $info ) {
|
||||||
|
$texte = $this->RemplaceSiren($info->Annonce);
|
||||||
|
if(substr($this->criteres->source, 0, 3) == 'BOD' ){
|
||||||
|
$date = new Zend_Date($info->Date_Parution, 'yyyy-MM-dd');
|
||||||
|
?>
|
||||||
|
Source BODACC n°<?=$info->Num_Parution?> <?=substr($this->criteres->source, 3, 1)?> du <?=$date->toString('dd/MM/yyyy')?>.
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
Département n°<?=$info->Departement?>. <?=$info->Tribunal_Code?>
|
||||||
|
<br/><br/>
|
||||||
|
<code><?=$texte?></code><br/>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php }?>
|
||||||
|
|
||||||
|
<?php }?>
|
||||||
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user