208 lines
8.2 KiB
PHP
208 lines
8.2 KiB
PHP
<?php
|
||
|
||
if(isset($_REQUEST['submit']))
|
||
{
|
||
unset($_SESSION['recherchehisto']);
|
||
//Traitement historique
|
||
if($_REQUEST['formA']['histo']=='on')
|
||
{
|
||
$parametres = array( 'source', 'bodacc', 'histo', 'annee', 'dateparution', 'nparution', 'bpage', 'nannonce', 'txt');
|
||
}
|
||
else
|
||
{
|
||
if($_REQUEST['formA']['source']=='bodacc')
|
||
{
|
||
$parametres = array( 'source', 'bodacc', 'histo', 'annee', 'dateparution', 'nparution', 'bpage', 'nannonce');
|
||
}
|
||
elseif($_REQUEST['formA']['source']=='asso')
|
||
{
|
||
$parametres = array( 'source', 'bodacc', 'annee', 'dateparution', 'nparution', 'bpage', 'nannonce');
|
||
}
|
||
elseif($_REQUEST['formA']['source']=='balo')
|
||
{
|
||
$parametres = array( 'source', 'bodacc', 'annee', 'dateparution', 'nparution', 'bpage', 'naffaire');
|
||
}
|
||
}
|
||
foreach($parametres as $param)
|
||
{
|
||
if( isset($_REQUEST['formA'][$param]) )
|
||
{
|
||
$_SESSION['recherchehisto'][$param] = $_REQUEST['formA'][$param];
|
||
}
|
||
}
|
||
header("Location: ./index.php?page=recherche&vue=annoncelist");
|
||
exit;
|
||
}
|
||
?>
|
||
<script type="text/javascript" src="./js/jquery-ui.js"></script>
|
||
<script type="text/javascript" src="./js/jquery.datepicker-fr.js"></script>
|
||
<script type="text/javascript">
|
||
function formSource(source)
|
||
{
|
||
var fields = Array( 'bodacc', 'histo', 'date', 'nparution', 'fpage', 'nannonce', 'naffaire', 'txt' );
|
||
switch(source)
|
||
{
|
||
case 'asso':
|
||
var field_actif = new Array('date', 'nparution', 'fpage', 'nannonce');
|
||
break;
|
||
case 'bodacc':
|
||
var field_actif = new Array('bodacc', 'histo', 'date', 'nparution', 'fpage', 'nannonce');
|
||
break;
|
||
case 'balo':
|
||
var field_actif = new Array('date', 'nparution', 'fpage', 'naffaire');
|
||
break;
|
||
}
|
||
for (var i=0;i<fields.length;i++) { $('#'+fields[i]).css('display', 'none') }
|
||
for (var i=0;i<field_actif.length;i++){ $('#'+field_actif[i]).css('display', 'block') }
|
||
}
|
||
|
||
$(document).ready(function()
|
||
{
|
||
//Init
|
||
formSource($('select[name=formA[source]]').val());
|
||
if($('input[type=checkbox][name=formA[histo]]').attr('checked')== true){ $('#txt').css('display','block');
|
||
}else{ $('#txt').css('display','none'); }
|
||
|
||
//Evenement
|
||
$('#datepicker').datepicker($.datepicker.regional['fr']);
|
||
|
||
|
||
$('select[name=formA[source]]').change(function(){ formSource($(this).val()); });
|
||
|
||
$('input[type=checkbox][name=formA[histo]]').click(function(){
|
||
if($(this).attr('checked')== true){ $('#txt').css('display','block');
|
||
}else{ $('#txt').css('display','none'); }
|
||
});
|
||
|
||
$('#deselectBodacc').click(function(){
|
||
$('input[type=radio][name=formA[bodacc]]').each(function(){
|
||
$(this).attr('checked', false);
|
||
});
|
||
});
|
||
|
||
});
|
||
</script>
|
||
<link rel="stylesheet" type="text/css" href="css/jquery-ui.css"/>
|
||
<style type="text/css">
|
||
.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; }
|
||
div.submit{ width:100%; text-align:center; }
|
||
.noborder {border:none;}
|
||
</style>
|
||
<div id="center">
|
||
|
||
<h1>Rechercher une annonce</h1>
|
||
|
||
<form name="annonces" method="post" action="./index.php?page=recherche&vue=annonce">
|
||
<input type="hidden" name="formA[type]" value="annonces"/>
|
||
|
||
<div class="fieldgrp">
|
||
<label for="source">Source</label>
|
||
<div class="field">
|
||
<select name="formA[source]">
|
||
<option value="bodacc" <?=(isset($_SESSION['recherchehisto']['source']) && $_SESSION['recherchehisto']['source']=='bodacc')? 'selected' : ''?>>BODACC / BORC</option>
|
||
<option value="asso" <?=(isset($_SESSION['recherchehisto']['source']) && $_SESSION['recherchehisto']['source']=='asso')? 'selected' : ''?>>JO Association</option>
|
||
<option value="balo" <?=(isset($_SESSION['recherchehisto']['source']) && $_SESSION['recherchehisto']['source']=='balo')? 'selected' : ''?>>BALO</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="bodacc" class="fieldgrp">
|
||
<label for="bodacc">Bodacc</label>
|
||
<div class="field">
|
||
<span><input class="radio" type="radio" name="formA[bodacc]" value="a" <?=(isset($_SESSION['recherchehisto']['bodacc']) && $_SESSION['recherchehisto']['bodacc']=='a')? 'checked' : ''?>/>A</span>
|
||
<span><input class="radio" type="radio" name="formA[bodacc]" value="b" <?=(isset($_SESSION['recherchehisto']['bodacc']) && $_SESSION['recherchehisto']['bodacc']=='b')? 'checked' : ''?>/>B</span>
|
||
<span><input class="radio" type="radio" name="formA[bodacc]" value="c" <?=(isset($_SESSION['recherchehisto']['bodacc']) && $_SESSION['recherchehisto']['bodacc']=='c')? 'checked' : ''?>/>C</span>
|
||
<span><a href="#" id="deselectBodacc">D<>s<EFBFBD>lection</a></span>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="histo" class="fieldgrp">
|
||
<label for="histo">Historique jusqu'<27> 1953</label>
|
||
<div class="field">
|
||
<input class="checkbox" type="checkbox" name="formA[histo]" <?=(isset($_SESSION['recherchehisto']['histo']) && $_SESSION['recherchehisto']['histo']=='on')? 'checked' : ''?>/>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="date" class="fieldgrp">
|
||
<label for="annee">Ann<6E>e</label>
|
||
<div class="field">
|
||
<input type="text" name="formA[annee]" size="4" maxlength="4" value="<?=$_SESSION['recherchehisto']['annee']?>"/>
|
||
</div>
|
||
<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="<?=$_SESSION['recherchehisto']['dateparution']?>"/>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="nparution" class="fieldgrp">
|
||
<label for="nparution">Num<75>ro de parution</label>
|
||
<div class="field">
|
||
<input type="text" name="formA[nparution]" size="10" maxlength="10" value="<?=$_SESSION['recherchehisto']['nparution']?>"/>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="fpage" class="fieldgrp">
|
||
<label for="page">Page</label>
|
||
<div class="field">
|
||
<input type="text" name="formA[bpage]" size="10" maxlength="10" value="<?=$_SESSION['recherchehisto']['bpage']?>"/>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="nannonce" class="fieldgrp">
|
||
<label for="nannonce">Num<75>ro d'annonce</label>
|
||
<div class="field">
|
||
<input type="text" name="formA[nannonce]" size="10" maxlength="10" value="<?=$_SESSION['recherchehisto']['nannonce']?>"/>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="naffaire" class="fieldgrp">
|
||
<label for="naffaire">Num<75>ro d'affaire</label>
|
||
<div class="field">
|
||
<input type="text" name="formA[naffaire]" size="10" maxlength="10" value="<?=$_SESSION['recherchehisto']['naffaire']?>"/>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="txt" class="fieldgrp">
|
||
<label for="txt">Recherche</label>
|
||
<div class="field">
|
||
<input type="text" name="formA[txt]" size="55" maxlength="2048" value="<?=htmlspecialchars($_SESSION['recherchehisto']['txt'])?>"/>
|
||
</div>
|
||
<p>
|
||
<b><u>Attention :</u></b>
|
||
Ce formulaire de recherche permet de rechercher dans les pages enti<74>res du BORC, BODAC et BODACC telles qu'elles ont <20>t<EFBFBD> num<75>ris<69>es par Scores & D<>cisions.
|
||
Cette recherche permet de rechercher des annonces dans des pages jusqu'<27> l'ann<6E>e de parution <b>1953</b>.
|
||
</p>
|
||
<p> </p>
|
||
<p><u>Op<4F>rateurs et m<>thodes de recherche :</u></p>
|
||
<p>Op<4F>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>Phrase (ex: <b>"boulangerie dupain"</b>)</p>
|
||
<p>Recherche de proximit<69> (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>
|
||
</div>
|
||
|
||
<div class="submit"><input type="submit" name="submit" value="Ok"/></div>
|
||
|
||
</form>
|
||
</div>
|