extranet/includes/recherche/recherche_annonces.php
Michael RICOIS 39bcaeea3a Ajout aide
2009-10-05 16:22:07 +00:00

180 lines
5.8 KiB
PHP
Raw Blame History

<?php
if(isset($_REQUEST['submit']))
{
$firephp->log($_REQUEST, 'REQUEST');
if( isset($_REQUEST['formA']['annee']) ) { $annee = $_REQUEST['formA']['annee']; }
if( !isset($annee) && isset($_REQUEST['formA']['dateparution']) )
{
$annee = str_replace('/', '', $_REQUEST['formA']['dateparution']);
$jj = substring($annee, 0, 2);
$mm = substring($annee, 2, 2);
$aa = substring($annee, 4, 4);
$annee = $aa.$mm.$jj;
}
if( isset($_REQUEST['formA']['txt']) )
{
$txt = urlencode($_REQUEST['formA']['txt']);
}
header("Location: ./index.php?page=recherche&vue=annoncelist&recherche=$txt&annee=$annee");
exit;
}
?>
<script type="text/javascript" src="./js/jquery-ui.js"></script>
<script type="text/javascript">
function formSource(source)
{
var fields = Array( 'bodacc', 'histo', 'date', 'nparution', 'page', 'nannonce', 'naffaire', 'txt' );
switch(source)
{
case 'asso':
var field_actif = new Array('date', 'nparution', 'page', 'nannonce');
break;
case 'bodacc':
var field_actif = new Array('bodacc', 'histo', 'date', 'nparution', 'page', 'nannonce');
break;
case 'balo':
var field_actif = new Array('date', 'nparution', 'page', '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()
{
formSource('asso');
$("#datepicker").datepicker();
$('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');
}
});
});
</script>
<link rel="stylesheet" type="text/css" media="all" href="./css/jquery-ui.css"/>
<style type="text/css">
#center { clear:both; }
.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; padding:0; margin:0; float:left; display:block;}
.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[type="radio"] { margin:0 5px 0 5px; }
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="asso">JO Association</option>
<option value="bodacc">BODACC / BORC</option>
<option value="balo">BALO</option>
</select>
</div>
</div>
<div id="bodacc" class="fieldgrp">
<label for="bodacc">Bodacc</label>
<div class="field">
<input type="radio" name="formA[bodacc]" value="a" />A
<input type="radio" name="formA[bodacc]" value="b" />B
<input type="radio" name="formA[bodacc]" value="c" />C
</div>
</div>
<div id="histo" class="fieldgrp">
<label for="histo">Historique jusqu'<27> 1953</label>
<div class="field">
<input type="checkbox" name="formA[histo]"/>
</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"/>
</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"/>
</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"/>
</div>
</div>
<div id="page" class="fieldgrp">
<label for="page">Page</label>
<div class="field">
<input type="text" name="formA[page]" size="10" maxlength="10"/>
</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"/>
</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"/>
</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"/>
</div>
<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>