1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| function res_setSearchQuery(&$str_query)
{
static $_f = 'res_setSearchQuery';
if (!res_setSyndStr($syndstr = '')) //ids agences d'un syndicat
{
err_set(__FILE__, __LINE__);
return SHARED_FALSE;
}
//lib_trace_var($_f, 'syndstr', $syndstr);
$vn_searchtype = $vn_net_id = $vn_agency_id = '';
$sharedstr = '';
$vn_searchtype = &$GLOBALS['vn_searchtype'];
$vn_net_id = &$GLOBALS['vn_net_id'];
$vn_agency_id = &$GLOBALS['vn_agency_id'];
$sharedstr = "SELECT lots.RefAgence,lots.No_Lot,lots.Ref_Lot,lots.No_Tarif,lots.Type_Bien,lots.Type_Caution,lots.Taux_Caution,lots.DateBlocage,lots.Lot_Bloque,lots.Nb_Couchages,lots.Surf_Totale,lots.AfficherPrixInternet,lots.Abattement,agence.RaisonSociale,agence.TauxAcompte,agence.TypeArrondi,agence.Mail,agence.MailFormat,agence.Adresse1,agence.Adresse2,agence.MenageIntegre FROM lots LEFT JOIN agence ON agence.RefAgence=lots.RefAgence";
//
//Recherche par le formulaire client (pour les sites clients)
//
if($_POST['searchtype'] == 'form_client')
{
//echo "Formulaire client";
$_SESSION['agency_id'] = $_POST['RefAgence'];
$str_query = "$sharedstr WHERE (lots.RefAgence = '".$_POST['RefAgence']."'";
res_setCritStr($critstr = '');
if (!lib_emp_str($critstr))
$str_query .= " AND $critstr";
$str_query .= ')';
}
else ... je coupe la |
Partager