//******************************************************************************
//******* Iconeweb - MUAYTHAITV - 29 janvier 2004
//******* -------------------------------------------------------------
//******* Application : MUAYTHAITV
//******* Objet de la page : Class d'acces aux donn�es : sp�cifique db_clubs
//******* R�visions : (date) - (objet)
//*******
//*******
//*******
//******************************************************************************
class o_db_db_clubs_acces
{
var $erreur; // variable stockant les erreurs d'excution
var $debug_mode; // si 1, affiche les erreurs Mysql
var $requete; // requete � executer
var $resultat; // resultat sous forme de result set
var $row_result; // resultat sous forme de tableau index�
var $num_rows; // nombre de r�sultats de la requete
var $page; // N� de page � afficher
var $pagination; // nombre de r�sultat par page
var $nombre_page; // nombre de pages de la requete si indexation
var $serveur; // Param�tres d'acces � la base
var $user;
var $pass;
var $base;
var $wbg_menu; // valeur du wbg_menu pour l'affichage des documents.
// ***********************************//
// Les variables de la liste
// ***********************************//
var $s_id_De ;
var $s_id_A ;
var $s_ordre_De ;
var $s_ordre_A ;
var $s_wbg_menu_Est ;
var $s_wbg_menu_Incsouscat ;
var $s_nom_club_Commence ;
var $s_nom_club_Contient ;
var $s_nom_club_Est ;
var $s_nom_club_CC ;
var $s_nom_club_CCT ;
var $s_ph_adresse_Contient ;
var $s_ph_cp_Commence ;
var $s_ph_cp_Contient ;
var $s_ph_cp_Est ;
var $s_ph_cp_CC ;
var $s_ph_cp_CCT ;
var $s_ph_ville_Commence ;
var $s_ph_ville_Contient ;
var $s_ph_ville_Est ;
var $s_ph_ville_CC ;
var $s_ph_ville_CCT ;
var $s_ph_pays_Commence ;
var $s_ph_pays_Contient ;
var $s_ph_pays_Est ;
var $s_ph_pays_CC ;
var $s_ph_pays_CCT ;
var $s_po_adresse_Contient ;
var $s_po_cp_Commence ;
var $s_po_cp_Contient ;
var $s_po_cp_Est ;
var $s_po_cp_CC ;
var $s_po_cp_CCT ;
var $s_po_ville_Commence ;
var $s_po_ville_Contient ;
var $s_po_ville_Est ;
var $s_po_ville_CC ;
var $s_po_ville_CCT ;
var $s_po_pays_Commence ;
var $s_po_pays_Contient ;
var $s_po_pays_Est ;
var $s_po_pays_CC ;
var $s_po_pays_CCT ;
var $s_telephone_Commence ;
var $s_telephone_Contient ;
var $s_telephone_Est ;
var $s_telephone_CC ;
var $s_telephone_CCT ;
var $s_fax_Commence ;
var $s_fax_Contient ;
var $s_fax_Est ;
var $s_fax_CC ;
var $s_fax_CCT ;
var $s_mobile_Commence ;
var $s_mobile_Contient ;
var $s_mobile_Est ;
var $s_mobile_CC ;
var $s_mobile_CCT ;
var $s_email_Commence ;
var $s_email_Contient ;
var $s_email_Est ;
var $s_email_CC ;
var $s_email_CCT ;
var $s_site_Commence ;
var $s_site_Contient ;
var $s_site_Est ;
var $s_site_CC ;
var $s_site_CCT ;
var $s_entraineur_Commence ;
var $s_entraineur_Contient ;
var $s_entraineur_Est ;
var $s_entraineur_CC ;
var $s_entraineur_CCT ;
var $s_president_Commence ;
var $s_president_Contient ;
var $s_president_Est ;
var $s_president_CC ;
var $s_president_CCT ;
var $s_tresorier_Commence ;
var $s_tresorier_Contient ;
var $s_tresorier_Est ;
var $s_tresorier_CC ;
var $s_tresorier_CCT ;
var $s_secretaire_Commence ;
var $s_secretaire_Contient ;
var $s_secretaire_Est ;
var $s_secretaire_CC ;
var $s_secretaire_CCT ;
var $s_manager_Commence ;
var $s_manager_Contient ;
var $s_manager_Est ;
var $s_manager_CC ;
var $s_manager_CCT ;
var $s_assistant_1_Commence ;
var $s_assistant_1_Contient ;
var $s_assistant_1_Est ;
var $s_assistant_1_CC ;
var $s_assistant_1_CCT ;
var $s_assistant_2_Commence ;
var $s_assistant_2_Contient ;
var $s_assistant_2_Est ;
var $s_assistant_2_CC ;
var $s_assistant_2_CCT ;
var $s_assistant_3_Commence ;
var $s_assistant_3_Contient ;
var $s_assistant_3_Est ;
var $s_assistant_3_CC ;
var $s_assistant_3_CCT ;
var $s_disciplines_Contient ;
var $s_type_muaythai_Commence ;
var $s_type_muaythai_Contient ;
var $s_type_muaythai_Est ;
var $s_type_muaythai_CC ;
var $s_type_muaythai_CCT ;
var $s_boutique_pourcentage_De ;
var $s_boutique_pourcentage_A ;
var $s_valide ;
var $s_datecreation_De ;
var $s_datecreation_A ;
var $s_datemodification_De ;
var $s_datemodification_A ;
var $s_dateheuremodif_Commence ;
var $s_dateheuremodif_Contient ;
var $s_dateheuremodif_Est ;
var $s_dateheuremodif_CC ;
var $s_dateheuremodif_CCT ;
var $s_createur_Commence ;
var $s_createur_Contient ;
var $s_createur_Est ;
var $s_createur_CC ;
var $s_createur_CCT ;
var $s_modificateur_Commence ;
var $s_modificateur_Contient ;
var $s_modificateur_Est ;
var $s_modificateur_CC ;
var $s_modificateur_CCT ;
var $s_proprietaire_Commence ;
var $s_proprietaire_Contient ;
var $s_proprietaire_Est ;
var $s_proprietaire_CC ;
var $s_proprietaire_CCT ;
var $s_AndOr ;
var $s_Tri ;
var $s_OrdreTri ;
var $s_Groupe ;
var $s_Start ;
var $s_Limite ;
var $s_geo_departement ;
var $s_geo_region ;
var $s_ToutChercher ;
// ***********************************//
// CONSTRUCTEUR
function o_db_db_clubs_acces($serv=0,$user=0,$pass=0,$base=0)
{
global $website_config;
global $c_chemin_document;
global $c_chemin_document_protege;
global $c_chemin_serveur_img;
global $c_chemin_img_upload;
global $c_chemin;
global $v_db_clubs_wbg_menu;
global $v_chemin_diaporama;
global $wbg_menu;
global $v_db_clubs_id;
$this->c_chemin_document = $c_chemin_document;
$this->c_chemin_document_protege = $c_chemin_document_protege;
$this->c_chemin_img_upload = $c_chemin_img_upload;
$this->c_chemin_serveur_img = $website_config['path']['server'].'themes/'.$website_config['theme'].'/img/';
$this->c_chemin_img = $website_config['path']['theme']['img'];
$this->c_chemin = $c_chemin;
$this->wbg_menu = $wbg_menu;
$this->v_chemin_diaporama=$v_chemin_diaporama;
$this->v_champ_clef=$v_db_clubs_id;
$this->serveur=$website_config['db']['host'];
$this->user=$website_config['db']['user'];
$this->pass=$website_config['db']['password'];
$this->base=$website_config['db']['db'];
if ($this->serveur != "") $this->connect_db();
$this->init_table();
f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1);
}
// METHODES
// **********************************
// Cette fonction sert � traiter les champs pour l'affichage.
// **********************************
function champ_a_afficher($table_traite)
{
foreach($table_traite as $key => $value)
{
switch($this->table_variables[$key]["type"])
{
case "Reel":
case "Nombre":
if ($table_traite[$key] == "")
{$table_traite[$key]=0;}
$table_traite[$key]=str_replace(",",".",$table_traite[$key]);
break;
case "Date":
$table_traite[$key]=f_ConversionDate($table_traite[$key],"fr") ;
break;
case "Crypt�":
$table_traite[$key] = "Crypt�";
break;
case "Lien":
if ($table_traite[$key."_libelle"] != "" && $table_traite[$key] != "")
{
$table_traite[$key] = "".f_FormatAffichage($table_traite[$key."_libelle"])."";
}
elseif ($table_traite[$key] != "")
{
$table_traite[$key] = "".f_FormatAffichage($table_traite[$key])."";
}
else
{
$table_traite[$key] ="";
}
break;
case "Email":
if ($table_traite[$key."_libelle"] != "" && $table_traite[$key] != "")
{
$table_traite[$key] = "" ;
}
elseif ($table_traite[$key] != "")
{
$table_traite[$key] = "" ;
}
else
{
$table_traite[$key] ="";
}
break;
case "Diaporama":
$tmp = f_get_diapotype($this->v_champ_clef, "db_clubs", "id") ;
list($diapo, $type_diapo) = explode('[|]', $tmp) ;
switch($type_diapo)
{
case "flash1":
$table_traite[$key]=pr_diapo_flash_t1($diapo, $c_chemin, $this->v_chemin_diaporama) ;
break;
case "flash2":
$table_traite[$key]=pr_diapo_flash_t2($diapo, $c_chemin, $this->v_chemin_diaporama) ;
break;
default:
if ($table_traite[$key] != "" and $table_traite[$key] != " ")
{
if ($table_traite[$key."_libelle"] != "" and $table_traite[$key."_libelle"] != " ")
{
$table_traite[$key]="".$table_traite[$key."_libelle"]."
";
}
else
{
$table_traite[$key]="".$table_traite[$key]."
";
}
}else{
$table_traite[$key] ="";
}
break;
}
break;
case "Document":
if ($table_traite[$key] != "")
{
if ($table_traite[$key."_libelle"] != "")
{
$doc=$this->c_chemin_document_protege."db_clubs/".$table_traite[$key];
$lib=$table_traite[$key."_libelle"];
}
else
{
$doc=$this->c_chemin_document_protege."db_clubs/".$table_traite[$key];
$lib=$table_traite[$key];
}
$image_extension_serv=$this->c_chemin_serveur_img."extensions/Picto-".substr($doc,-3).".png";
$image_extension=$this->c_chemin_img."extensions/Picto-".substr($doc,-3).".png";
if(file_exists($image_extension_serv))
{
$extension="";
}
if ($this->wbg_menu == "") {$this->wbg_menu = 0;}
$table_traite[$key]="".$extension.$lib."";
}
else
$table_traite[$key] = "" ;
break;
case "Image":
if ($table_traite[$key] != "")
{
if ($table_traite[$key."_libelle"] != "")
{
$table_traite[$key] = '
' ;
}
else
$table_traite[$key] = "
" ;
}
else
$table_traite[$key] = "" ;
break;
case "Video":
if ($table_traite[$key."_libelle"] != "" && $table_traite[$key] != "")
{
$table_traite[$key] = "c_chemin."pages/player_videos.php?s_code=".$table_traite[$key]."', 'player_videos', 600, 350, 200, 200, 'NO', 'NO', 'NO', 'NO', 'YES', 'NO')\" class='lien1'>".$table_traite[$key."_libelle"]."
";
}
else{
if ($table_traite[$key] != "")
$table_traite[$key] = "c_chemin."pages/player_videos.php?s_code=".$table_traite[$key]."', 'player_videos', 600, 350, 200, 200, 'NO', 'NO', 'NO', 'NO', 'YES', 'NO')\" class='lien1'>".$table_traite[$key]."
";
else
$table_traite[$key] = "" ;
}
break;
case "Flash":
if ($table_traite[$key] != "")
$table_traite[$key] = f_affiche_flash ($table_traite[$key]) ;
else
$table_traite[$key] = "" ;
break;
case "Drapeau":
if ($table_traite[$key] == "" OR $table_traite[$key] == "") { $table_traite[$key] = 'Non'; }
if ($table_traite[$key] == 1) { $table_traite[$key] = 'Oui'; }
break;
default :
$table_traite[$key]=f_FormatAffichage($table_traite[$key]);
break;
}
}
f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1);
return $table_traite;
}
// **********************************
// Cette fonction sert � traiter les champs pour l'insertion de donn�es.
// **********************************
function champ_a_inserer($table_result)
{
switch($nom)
{
case "proprietaire":
if ($this->table_variables[$nom]['valeur'] == "")
{$this->table_variables[$nom]['valeur']=$_SESSION['sess_username'];}
break;
case "createur":
if ($this->table_variables[$nom]['valeur'] == "")
{$this->table_variables[$nom]['valeur']=$_SESSION['sess_username'];}
break;
case "datecreation":
if ($this->table_variables[$nom]['valeur'] == "")
{$this->table_variables[$nom]['valeur']= date("Y/m/d"); }
break;
}
switch($this->table_variables[$nom]["type"])
{
case "Reel":
case "Nombre":
if ($this->table_variables[$nom]['valeur'] == "")
{$this->table_variables[$nom]['valeur']=0;}
$this->table_variables[$nom]['valeur']=str_replace(",",".",$this->table_variables[$nom]['valeur']);
break;
case "Date":
$this->table_variables[$nom]['valeur']=f_ConversionDate($this->table_variables[$nom]['valeur'],"en") ;
$this->table_variables[$nom]['valeur']="'".$this->table_variables[$nom]['valeur']."'";
break;
case "Crypt�":
if ($this->table_variables[$nom]['valeur'] == "Crypt�") { $this->table_variables[$nom]['valeur'] = ""; }
$this->table_variables[$nom]['valeur']="PASSWORD('".$this->table_variables[$nom]['valeur']."')";
break;
case "Drapeau":
if ($this->table_variables[$nom]['valeur'] == "") { $this->table_variables[$nom]['valeur'] = 0; }
break;
default :
$this->table_variables[$nom]['valeur']="'".$this->table_variables[$nom]['valeur']."'";
break;
}
f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1);
}
// **********************************
// Ouverture d'une connexion.
// **********************************
function connect_db()
{
$this->connexion = @mysqli_connect($this->serveur,$this->user,$this->pass) or die("Erreur de connexion � MySql") ;
@mysqli_select_db($this->connexion, $this->base) or die("Erreur de connexion � la base de donn�es") ;
f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1);
}
// **********************************
// Fermeture d'une connexion.
// **********************************
function disconnect_db()
{
mysqli_close($this->connexion) ;
f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1);
}
// **********************************
// Execution d'une requete.
// **********************************
function execute_SQL ($retour=0)
{ // gestion des pages
if ($this->page != 0 AND $this->pagination != 0)
{ if ($resultat_temp = mysqli_query($this->connexion, $this->requete))
$this->resultat=$resultat ;
else
$this->gestion_erreur(mysqli_error($this->connexion)) ;
$this->num_rows_total=mysqli_num_rows($resultat_temp);
$this->nombre_page=ceil($this->num_rows_total/$this->pagination);
$max=$this->pagination;
$min=$this->pagination * ($this->page-1);
$limit=" LIMIT ".$min.",".$max;
}
else
{
$limit="";
}
// echo "#".$this->requete."#";
// echo "#".$this->requete."#".$limit."#".$this->pagination."#".$this->page."#
";
// echo "#".$min."#".$max."#
";
if ($resultat = mysqli_query($this->connexion, $this->requete.$limit))
$this->resultat=$resultat ;
else
$this->gestion_erreur(mysqli_error($this->connexion)) ;
if ($retour != 0)
{
$i=0;
// g�n�ration du tableau de r�sultat
while($row_result_temp=mysqli_fetch_assoc($this->resultat))
{
$this->row_result[$i]=$row_result_temp;
$this->row_affichage[$i]=$this->champ_a_afficher($row_result_temp);
$i++;
}
$this->num_rows=mysqli_num_rows($this->resultat);
$this->num_rows_total=max($this->num_rows,$this->num_rows_total);
}
f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1);
}
// **********************************
// Execution d'une liste.
// **********************************
function execute_liste($retour=0)
{
$this->r_id_De = $this->s_id_De ;
$this->r_id_A = $this->s_id_A;
$this->r_ordre_De = $this->s_ordre_De ;
$this->r_ordre_A = $this->s_ordre_A;
$this->r_wbg_menu_Est = $this->s_wbg_menu_Est ;
$this->r_wbg_menu_Incsouscat = $this->s_wbg_menu_Incsouscat ;
$this->r_nom_club_Commence = $this->s_nom_club_Commence ;
$this->r_nom_club_Contient = $this->s_nom_club_Contient ;
$this->r_nom_club_Est = $this->s_nom_club_Est ;
if ($this->s_nom_club_CC == "commence")
$this->r_nom_club_Commence = $this->s_nom_club_CCT ;
if ($this->s_nom_club_CC == "contient")
$this->r_nom_club_Contient = $this->s_nom_club_CCT ;
$this->r_ph_adresse_Contient = $this->s_ph_adresse_Contient;
$this->r_ph_cp_Commence = $this->s_ph_cp_Commence ;
$this->r_ph_cp_Contient = $this->s_ph_cp_Contient ;
$this->r_ph_cp_Est = $this->s_ph_cp_Est ;
if ($this->s_ph_cp_CC == "commence")
$this->r_ph_cp_Commence = $this->s_ph_cp_CCT ;
if ($this->s_ph_cp_CC == "contient")
$this->r_ph_cp_Contient = $this->s_ph_cp_CCT ;
$this->r_ph_ville_Commence = $this->s_ph_ville_Commence ;
$this->r_ph_ville_Contient = $this->s_ph_ville_Contient ;
$this->r_ph_ville_Est = $this->s_ph_ville_Est ;
if ($this->s_ph_ville_CC == "commence")
$this->r_ph_ville_Commence = $this->s_ph_ville_CCT ;
if ($this->s_ph_ville_CC == "contient")
$this->r_ph_ville_Contient = $this->s_ph_ville_CCT ;
$this->r_ph_pays_Commence = $this->s_ph_pays_Commence ;
$this->r_ph_pays_Contient = $this->s_ph_pays_Contient ;
$this->r_ph_pays_Est = $this->s_ph_pays_Est ;
if ($this->s_ph_pays_CC == "commence")
$this->r_ph_pays_Commence = $this->s_ph_pays_CCT ;
if ($this->s_ph_pays_CC == "contient")
$this->r_ph_pays_Contient = $this->s_ph_pays_CCT ;
$this->r_po_adresse_Contient = $this->s_po_adresse_Contient;
$this->r_po_cp_Commence = $this->s_po_cp_Commence ;
$this->r_po_cp_Contient = $this->s_po_cp_Contient ;
$this->r_po_cp_Est = $this->s_po_cp_Est ;
if ($this->s_po_cp_CC == "commence")
$this->r_po_cp_Commence = $this->s_po_cp_CCT ;
if ($this->s_po_cp_CC == "contient")
$this->r_po_cp_Contient = $this->s_po_cp_CCT ;
$this->r_po_ville_Commence = $this->s_po_ville_Commence ;
$this->r_po_ville_Contient = $this->s_po_ville_Contient ;
$this->r_po_ville_Est = $this->s_po_ville_Est ;
if ($this->s_po_ville_CC == "commence")
$this->r_po_ville_Commence = $this->s_po_ville_CCT ;
if ($this->s_po_ville_CC == "contient")
$this->r_po_ville_Contient = $this->s_po_ville_CCT ;
$this->r_po_pays_Commence = $this->s_po_pays_Commence ;
$this->r_po_pays_Contient = $this->s_po_pays_Contient ;
$this->r_po_pays_Est = $this->s_po_pays_Est ;
if ($this->s_po_pays_CC == "commence")
$this->r_po_pays_Commence = $this->s_po_pays_CCT ;
if ($this->s_po_pays_CC == "contient")
$this->r_po_pays_Contient = $this->s_po_pays_CCT ;
$this->r_telephone_Commence = $this->s_telephone_Commence ;
$this->r_telephone_Contient = $this->s_telephone_Contient ;
$this->r_telephone_Est = $this->s_telephone_Est ;
if ($this->s_telephone_CC == "commence")
$this->r_telephone_Commence = $this->s_telephone_CCT ;
if ($this->s_telephone_CC == "contient")
$this->r_telephone_Contient = $this->s_telephone_CCT ;
$this->r_fax_Commence = $this->s_fax_Commence ;
$this->r_fax_Contient = $this->s_fax_Contient ;
$this->r_fax_Est = $this->s_fax_Est ;
if ($this->s_fax_CC == "commence")
$this->r_fax_Commence = $this->s_fax_CCT ;
if ($this->s_fax_CC == "contient")
$this->r_fax_Contient = $this->s_fax_CCT ;
$this->r_mobile_Commence = $this->s_mobile_Commence ;
$this->r_mobile_Contient = $this->s_mobile_Contient ;
$this->r_mobile_Est = $this->s_mobile_Est ;
if ($this->s_mobile_CC == "commence")
$this->r_mobile_Commence = $this->s_mobile_CCT ;
if ($this->s_mobile_CC == "contient")
$this->r_mobile_Contient = $this->s_mobile_CCT ;
$this->r_email_Commence = $this->s_email_Commence ;
$this->r_email_Contient = $this->s_email_Contient ;
$this->r_email_Est = $this->s_email_Est ;
if ($this->s_email_CC == "commence")
$this->r_email_Commence = $this->s_email_CCT ;
if ($this->s_email_CC == "contient")
$this->r_email_Contient = $this->s_email_CCT ;
$this->r_site_Commence = $this->s_site_Commence ;
$this->r_site_Contient = $this->s_site_Contient ;
$this->r_site_Est = $this->s_site_Est ;
if ($this->s_site_CC == "commence")
$this->r_site_Commence = $this->s_site_CCT ;
if ($this->s_site_CC == "contient")
$this->r_site_Contient = $this->s_site_CCT ;
$this->r_entraineur_Commence = $this->s_entraineur_Commence ;
$this->r_entraineur_Contient = $this->s_entraineur_Contient ;
$this->r_entraineur_Est = $this->s_entraineur_Est ;
if ($this->s_entraineur_CC == "commence")
$this->r_entraineur_Commence = $this->s_entraineur_CCT ;
if ($this->s_entraineur_CC == "contient")
$this->r_entraineur_Contient = $this->s_entraineur_CCT ;
$this->r_president_Commence = $this->s_president_Commence ;
$this->r_president_Contient = $this->s_president_Contient ;
$this->r_president_Est = $this->s_president_Est ;
if ($this->s_president_CC == "commence")
$this->r_president_Commence = $this->s_president_CCT ;
if ($this->s_president_CC == "contient")
$this->r_president_Contient = $this->s_president_CCT ;
$this->r_tresorier_Commence = $this->s_tresorier_Commence ;
$this->r_tresorier_Contient = $this->s_tresorier_Contient ;
$this->r_tresorier_Est = $this->s_tresorier_Est ;
if ($this->s_tresorier_CC == "commence")
$this->r_tresorier_Commence = $this->s_tresorier_CCT ;
if ($this->s_tresorier_CC == "contient")
$this->r_tresorier_Contient = $this->s_tresorier_CCT ;
$this->r_secretaire_Commence = $this->s_secretaire_Commence ;
$this->r_secretaire_Contient = $this->s_secretaire_Contient ;
$this->r_secretaire_Est = $this->s_secretaire_Est ;
if ($this->s_secretaire_CC == "commence")
$this->r_secretaire_Commence = $this->s_secretaire_CCT ;
if ($this->s_secretaire_CC == "contient")
$this->r_secretaire_Contient = $this->s_secretaire_CCT ;
$this->r_manager_Commence = $this->s_manager_Commence ;
$this->r_manager_Contient = $this->s_manager_Contient ;
$this->r_manager_Est = $this->s_manager_Est ;
if ($this->s_manager_CC == "commence")
$this->r_manager_Commence = $this->s_manager_CCT ;
if ($this->s_manager_CC == "contient")
$this->r_manager_Contient = $this->s_manager_CCT ;
$this->r_assistant_1_Commence = $this->s_assistant_1_Commence ;
$this->r_assistant_1_Contient = $this->s_assistant_1_Contient ;
$this->r_assistant_1_Est = $this->s_assistant_1_Est ;
if ($this->s_assistant_1_CC == "commence")
$this->r_assistant_1_Commence = $this->s_assistant_1_CCT ;
if ($this->s_assistant_1_CC == "contient")
$this->r_assistant_1_Contient = $this->s_assistant_1_CCT ;
$this->r_assistant_2_Commence = $this->s_assistant_2_Commence ;
$this->r_assistant_2_Contient = $this->s_assistant_2_Contient ;
$this->r_assistant_2_Est = $this->s_assistant_2_Est ;
if ($this->s_assistant_2_CC == "commence")
$this->r_assistant_2_Commence = $this->s_assistant_2_CCT ;
if ($this->s_assistant_2_CC == "contient")
$this->r_assistant_2_Contient = $this->s_assistant_2_CCT ;
$this->r_assistant_3_Commence = $this->s_assistant_3_Commence ;
$this->r_assistant_3_Contient = $this->s_assistant_3_Contient ;
$this->r_assistant_3_Est = $this->s_assistant_3_Est ;
if ($this->s_assistant_3_CC == "commence")
$this->r_assistant_3_Commence = $this->s_assistant_3_CCT ;
if ($this->s_assistant_3_CC == "contient")
$this->r_assistant_3_Contient = $this->s_assistant_3_CCT ;
$this->r_disciplines_Contient = $this->s_disciplines_Contient;
$this->r_type_muaythai_Commence = $this->s_type_muaythai_Commence ;
$this->r_type_muaythai_Contient = $this->s_type_muaythai_Contient ;
$this->r_type_muaythai_Est = $this->s_type_muaythai_Est ;
if ($this->s_type_muaythai_CC == "commence")
$this->r_type_muaythai_Commence = $this->s_type_muaythai_CCT ;
if ($this->s_type_muaythai_CC == "contient")
$this->r_type_muaythai_Contient = $this->s_type_muaythai_CCT ;
$this->r_boutique_pourcentage_De = $this->s_boutique_pourcentage_De ;
$this->r_boutique_pourcentage_A = $this->s_boutique_pourcentage_A;
$this->r_valide = $this->s_valide;
$this->r_datecreation_De = $this->s_datecreation_De ;
$this->r_datecreation_A = $this->s_datecreation_A;
$this->r_datemodification_De = $this->s_datemodification_De ;
$this->r_datemodification_A = $this->s_datemodification_A;
$this->r_dateheuremodif_Commence = $this->s_dateheuremodif_Commence ;
$this->r_dateheuremodif_Contient = $this->s_dateheuremodif_Contient ;
$this->r_dateheuremodif_Est = $this->s_dateheuremodif_Est ;
if ($this->s_dateheuremodif_CC == "commence")
$this->r_dateheuremodif_Commence = $this->s_dateheuremodif_CCT ;
if ($this->s_dateheuremodif_CC == "contient")
$this->r_dateheuremodif_Contient = $this->s_dateheuremodif_CCT ;
$this->r_createur_Commence = $this->s_createur_Commence ;
$this->r_createur_Contient = $this->s_createur_Contient ;
$this->r_createur_Est = $this->s_createur_Est ;
if ($this->s_createur_CC == "commence")
$this->r_createur_Commence = $this->s_createur_CCT ;
if ($this->s_createur_CC == "contient")
$this->r_createur_Contient = $this->s_createur_CCT ;
$this->r_modificateur_Commence = $this->s_modificateur_Commence ;
$this->r_modificateur_Contient = $this->s_modificateur_Contient ;
$this->r_modificateur_Est = $this->s_modificateur_Est ;
if ($this->s_modificateur_CC == "commence")
$this->r_modificateur_Commence = $this->s_modificateur_CCT ;
if ($this->s_modificateur_CC == "contient")
$this->r_modificateur_Contient = $this->s_modificateur_CCT ;
$this->r_proprietaire_Commence = $this->s_proprietaire_Commence ;
$this->r_proprietaire_Contient = $this->s_proprietaire_Contient ;
$this->r_proprietaire_Est = $this->s_proprietaire_Est ;
if ($this->s_proprietaire_CC == "commence")
$this->r_proprietaire_Commence = $this->s_proprietaire_CCT ;
if ($this->s_proprietaire_CC == "contient")
$this->r_proprietaire_Contient = $this->s_proprietaire_CCT ;
$this->r_AndOr = $this->s_AndOr;
$this->r_Tri = $this->s_Tri;
$this->r_OrdreTri = $this->s_OrdreTri ;
$this->r_Groupe = $this->s_Groupe ;
$this->r_Start = $this->s_Start ;
$this->r_Limite = $this->s_Limite ;
$this->r_geo_departement = $this->s_geo_departement ;
$this->r_geo_region = $this->s_geo_region ;
$this->r_ToutChercher = $this->s_ToutChercher ;
$sql_RequeteBase="SELECT * FROM db_clubs ";
$CriterePresent = False ;
if ($this->r_id_De != "") { $CriterePresent = True ; }
if ($this->r_id_A != "") { $CriterePresent = True ; }
if ($this->r_ordre_De != "") { $CriterePresent = True ; }
if ($this->r_ordre_A != "") { $CriterePresent = True ; }
if ($this->r_wbg_menu_Est != "") { $CriterePresent = True ; }
if ($this->r_nom_club_Commence != "") { $CriterePresent = True ; }
if ($this->r_nom_club_Contient != "") { $CriterePresent = True ; }
if ($this->r_nom_club_Est != "") { $CriterePresent = True ; }
if ($this->r_ph_adresse_Contient != "") { $CriterePresent = True ; }
if ($this->r_ph_cp_Commence != "") { $CriterePresent = True ; }
if ($this->r_ph_cp_Contient != "") { $CriterePresent = True ; }
if ($this->r_ph_cp_Est != "") { $CriterePresent = True ; }
if ($this->r_ph_ville_Commence != "") { $CriterePresent = True ; }
if ($this->r_ph_ville_Contient != "") { $CriterePresent = True ; }
if ($this->r_ph_ville_Est != "") { $CriterePresent = True ; }
if ($this->r_ph_pays_Commence != "") { $CriterePresent = True ; }
if ($this->r_ph_pays_Contient != "") { $CriterePresent = True ; }
if ($this->r_ph_pays_Est != "") { $CriterePresent = True ; }
if ($this->r_po_adresse_Contient != "") { $CriterePresent = True ; }
if ($this->r_po_cp_Commence != "") { $CriterePresent = True ; }
if ($this->r_po_cp_Contient != "") { $CriterePresent = True ; }
if ($this->r_po_cp_Est != "") { $CriterePresent = True ; }
if ($this->r_po_ville_Commence != "") { $CriterePresent = True ; }
if ($this->r_po_ville_Contient != "") { $CriterePresent = True ; }
if ($this->r_po_ville_Est != "") { $CriterePresent = True ; }
if ($this->r_po_pays_Commence != "") { $CriterePresent = True ; }
if ($this->r_po_pays_Contient != "") { $CriterePresent = True ; }
if ($this->r_po_pays_Est != "") { $CriterePresent = True ; }
if ($this->r_telephone_Commence != "") { $CriterePresent = True ; }
if ($this->r_telephone_Contient != "") { $CriterePresent = True ; }
if ($this->r_telephone_Est != "") { $CriterePresent = True ; }
if ($this->r_fax_Commence != "") { $CriterePresent = True ; }
if ($this->r_fax_Contient != "") { $CriterePresent = True ; }
if ($this->r_fax_Est != "") { $CriterePresent = True ; }
if ($this->r_mobile_Commence != "") { $CriterePresent = True ; }
if ($this->r_mobile_Contient != "") { $CriterePresent = True ; }
if ($this->r_mobile_Est != "") { $CriterePresent = True ; }
if ($this->r_email_Commence != "") { $CriterePresent = True ; }
if ($this->r_email_Contient != "") { $CriterePresent = True ; }
if ($this->r_email_Est != "") { $CriterePresent = True ; }
if ($this->r_site_Commence != "") { $CriterePresent = True ; }
if ($this->r_site_Contient != "") { $CriterePresent = True ; }
if ($this->r_site_Est != "") { $CriterePresent = True ; }
if ($this->r_entraineur_Commence != "") { $CriterePresent = True ; }
if ($this->r_entraineur_Contient != "") { $CriterePresent = True ; }
if ($this->r_entraineur_Est != "") { $CriterePresent = True ; }
if ($this->r_president_Commence != "") { $CriterePresent = True ; }
if ($this->r_president_Contient != "") { $CriterePresent = True ; }
if ($this->r_president_Est != "") { $CriterePresent = True ; }
if ($this->r_tresorier_Commence != "") { $CriterePresent = True ; }
if ($this->r_tresorier_Contient != "") { $CriterePresent = True ; }
if ($this->r_tresorier_Est != "") { $CriterePresent = True ; }
if ($this->r_secretaire_Commence != "") { $CriterePresent = True ; }
if ($this->r_secretaire_Contient != "") { $CriterePresent = True ; }
if ($this->r_secretaire_Est != "") { $CriterePresent = True ; }
if ($this->r_manager_Commence != "") { $CriterePresent = True ; }
if ($this->r_manager_Contient != "") { $CriterePresent = True ; }
if ($this->r_manager_Est != "") { $CriterePresent = True ; }
if ($this->r_assistant_1_Commence != "") { $CriterePresent = True ; }
if ($this->r_assistant_1_Contient != "") { $CriterePresent = True ; }
if ($this->r_assistant_1_Est != "") { $CriterePresent = True ; }
if ($this->r_assistant_2_Commence != "") { $CriterePresent = True ; }
if ($this->r_assistant_2_Contient != "") { $CriterePresent = True ; }
if ($this->r_assistant_2_Est != "") { $CriterePresent = True ; }
if ($this->r_assistant_3_Commence != "") { $CriterePresent = True ; }
if ($this->r_assistant_3_Contient != "") { $CriterePresent = True ; }
if ($this->r_assistant_3_Est != "") { $CriterePresent = True ; }
if ($this->r_disciplines_Contient != "") { $CriterePresent = True ; }
if ($this->r_type_muaythai_Commence != "") { $CriterePresent = True ; }
if ($this->r_type_muaythai_Contient != "") { $CriterePresent = True ; }
if ($this->r_type_muaythai_Est != "") { $CriterePresent = True ; }
if ($this->r_boutique_pourcentage_De != "") { $CriterePresent = True ; }
if ($this->r_boutique_pourcentage_A != "") { $CriterePresent = True ; }
if ($this->r_valide != "") { $CriterePresent = True ; }
if ($this->r_datecreation_De != "") { $CriterePresent = True ; }
if ($this->r_datecreation_A != "") { $CriterePresent = True ; }
if ($this->r_datemodification_De != "") { $CriterePresent = True ; }
if ($this->r_datemodification_A != "") { $CriterePresent = True ; }
if ($this->r_dateheuremodif_Commence != "") { $CriterePresent = True ; }
if ($this->r_dateheuremodif_Contient != "") { $CriterePresent = True ; }
if ($this->r_dateheuremodif_Est != "") { $CriterePresent = True ; }
if ($this->r_createur_Commence != "") { $CriterePresent = True ; }
if ($this->r_createur_Contient != "") { $CriterePresent = True ; }
if ($this->r_createur_Est != "") { $CriterePresent = True ; }
if ($this->r_modificateur_Commence != "") { $CriterePresent = True ; }
if ($this->r_modificateur_Contient != "") { $CriterePresent = True ; }
if ($this->r_modificateur_Est != "") { $CriterePresent = True ; }
if ($this->r_proprietaire_Commence != "") { $CriterePresent = True ; }
if ($this->r_proprietaire_Contient != "") { $CriterePresent = True ; }
if ($this->r_proprietaire_Est != "") { $CriterePresent = True ; }
$sql_RequeteBaseStart = $sql_RequeteBase ;
$sql_RequeteBase = "" ;
// *******************************************
// RECHERCHE NORMALE
// Construction de la clause "WHERE"
// *******************************************
if ($CriterePresent) {
// Drapeau de test pour d�tecter le premier crit�re (pas de AND ou OR avant)
$Premier = True ;
$sql_RequeteBase = " WHERE " ;
if (($this->r_id_De != "") or ($this->r_id_A != "")) {
if ($this->r_id_De == "")
$this->r_id_De = "-999999999" ;
if ($this->r_id_A == "")
$this->r_id_A = "999999999" ;
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " (id >= ".$this->r_id_De." AND id <= ".$this->r_id_A.") " ;
$Premier = False ;
}
if (($this->r_ordre_De != "") or ($this->r_ordre_A != "")) {
if ($this->r_ordre_De == "")
$this->r_ordre_De = "-999999999" ;
if ($this->r_ordre_A == "")
$this->r_ordre_A = "999999999" ;
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " (ordre >= ".$this->r_ordre_De." AND ordre <= ".$this->r_ordre_A.") " ;
$Premier = False ;
}
if ($this->r_nom_club_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " nom_club LIKE '".$this->r_nom_club_Commence."%' " ;
$Premier = False ;
}
if ($this->r_nom_club_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " nom_club LIKE '%".$this->r_nom_club_Contient."%' " ;
$Premier = False ;
}
if ($this->r_nom_club_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " nom_club='".$this->r_nom_club_Est."' " ;
$Premier = False ;
}
if ($this->r_ph_adresse_Contient != "") {
if (!$Premier) { $sql_RequeteBase .= $this->r_AndOr ; }
$sql_RequeteBase .= " ph_adresse LIKE '%".$this->r_ph_adresse_Contient."%' " ;
$Premier = False ;
}
if ($this->r_ph_cp_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " ph_cp LIKE '".$this->r_ph_cp_Commence."%' " ;
$Premier = False ;
}
if ($this->r_ph_cp_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " ph_cp LIKE '%".$this->r_ph_cp_Contient."%' " ;
$Premier = False ;
}
if ($this->r_ph_cp_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " ph_cp='".$this->r_ph_cp_Est."' " ;
$Premier = False ;
}
if ($this->r_ph_ville_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " ph_ville LIKE '".$this->r_ph_ville_Commence."%' " ;
$Premier = False ;
}
if ($this->r_ph_ville_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " ph_ville LIKE '%".$this->r_ph_ville_Contient."%' " ;
$Premier = False ;
}
if ($this->r_ph_ville_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " ph_ville='".$this->r_ph_ville_Est."' " ;
$Premier = False ;
}
if ($this->r_ph_pays_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " ph_pays LIKE '".$this->r_ph_pays_Commence."%' " ;
$Premier = False ;
}
if ($this->r_ph_pays_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " ph_pays LIKE '%".$this->r_ph_pays_Contient."%' " ;
$Premier = False ;
}
if ($this->r_ph_pays_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " ph_pays='".$this->r_ph_pays_Est."' " ;
$Premier = False ;
}
if ($this->r_po_adresse_Contient != "") {
if (!$Premier) { $sql_RequeteBase .= $this->r_AndOr ; }
$sql_RequeteBase .= " po_adresse LIKE '%".$this->r_po_adresse_Contient."%' " ;
$Premier = False ;
}
if ($this->r_po_cp_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " po_cp LIKE '".$this->r_po_cp_Commence."%' " ;
$Premier = False ;
}
if ($this->r_po_cp_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " po_cp LIKE '%".$this->r_po_cp_Contient."%' " ;
$Premier = False ;
}
if ($this->r_po_cp_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " po_cp='".$this->r_po_cp_Est."' " ;
$Premier = False ;
}
if ($this->r_po_ville_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " po_ville LIKE '".$this->r_po_ville_Commence."%' " ;
$Premier = False ;
}
if ($this->r_po_ville_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " po_ville LIKE '%".$this->r_po_ville_Contient."%' " ;
$Premier = False ;
}
if ($this->r_po_ville_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " po_ville='".$this->r_po_ville_Est."' " ;
$Premier = False ;
}
if ($this->r_po_pays_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " po_pays LIKE '".$this->r_po_pays_Commence."%' " ;
$Premier = False ;
}
if ($this->r_po_pays_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " po_pays LIKE '%".$this->r_po_pays_Contient."%' " ;
$Premier = False ;
}
if ($this->r_po_pays_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " po_pays='".$this->r_po_pays_Est."' " ;
$Premier = False ;
}
if ($this->r_telephone_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " telephone LIKE '".$this->r_telephone_Commence."%' " ;
$Premier = False ;
}
if ($this->r_telephone_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " telephone LIKE '%".$this->r_telephone_Contient."%' " ;
$Premier = False ;
}
if ($this->r_telephone_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " telephone='".$this->r_telephone_Est."' " ;
$Premier = False ;
}
if ($this->r_fax_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " fax LIKE '".$this->r_fax_Commence."%' " ;
$Premier = False ;
}
if ($this->r_fax_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " fax LIKE '%".$this->r_fax_Contient."%' " ;
$Premier = False ;
}
if ($this->r_fax_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " fax='".$this->r_fax_Est."' " ;
$Premier = False ;
}
if ($this->r_mobile_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " mobile LIKE '".$this->r_mobile_Commence."%' " ;
$Premier = False ;
}
if ($this->r_mobile_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " mobile LIKE '%".$this->r_mobile_Contient."%' " ;
$Premier = False ;
}
if ($this->r_mobile_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " mobile='".$this->r_mobile_Est."' " ;
$Premier = False ;
}
if ($this->r_email_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " email LIKE '".$this->r_email_Commence."%' " ;
$Premier = False ;
}
if ($this->r_email_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " email LIKE '%".$this->r_email_Contient."%' " ;
$Premier = False ;
}
if ($this->r_email_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " email='".$this->r_email_Est."' " ;
$Premier = False ;
}
if ($this->r_site_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " site LIKE '".$this->r_site_Commence."%' " ;
$Premier = False ;
}
if ($this->r_site_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " site LIKE '%".$this->r_site_Contient."%' " ;
$Premier = False ;
}
if ($this->r_site_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " site='".$this->r_site_Est."' " ;
$Premier = False ;
}
if ($this->r_entraineur_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " entraineur LIKE '".$this->r_entraineur_Commence."%' " ;
$Premier = False ;
}
if ($this->r_entraineur_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " entraineur LIKE '%".$this->r_entraineur_Contient."%' " ;
$Premier = False ;
}
if ($this->r_entraineur_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " entraineur='".$this->r_entraineur_Est."' " ;
$Premier = False ;
}
if ($this->r_president_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " president LIKE '".$this->r_president_Commence."%' " ;
$Premier = False ;
}
if ($this->r_president_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " president LIKE '%".$this->r_president_Contient."%' " ;
$Premier = False ;
}
if ($this->r_president_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " president='".$this->r_president_Est."' " ;
$Premier = False ;
}
if ($this->r_tresorier_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " tresorier LIKE '".$this->r_tresorier_Commence."%' " ;
$Premier = False ;
}
if ($this->r_tresorier_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " tresorier LIKE '%".$this->r_tresorier_Contient."%' " ;
$Premier = False ;
}
if ($this->r_tresorier_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " tresorier='".$this->r_tresorier_Est."' " ;
$Premier = False ;
}
if ($this->r_secretaire_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " secretaire LIKE '".$this->r_secretaire_Commence."%' " ;
$Premier = False ;
}
if ($this->r_secretaire_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " secretaire LIKE '%".$this->r_secretaire_Contient."%' " ;
$Premier = False ;
}
if ($this->r_secretaire_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " secretaire='".$this->r_secretaire_Est."' " ;
$Premier = False ;
}
if ($this->r_manager_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " manager LIKE '".$this->r_manager_Commence."%' " ;
$Premier = False ;
}
if ($this->r_manager_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " manager LIKE '%".$this->r_manager_Contient."%' " ;
$Premier = False ;
}
if ($this->r_manager_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " manager='".$this->r_manager_Est."' " ;
$Premier = False ;
}
if ($this->r_assistant_1_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " assistant_1 LIKE '".$this->r_assistant_1_Commence."%' " ;
$Premier = False ;
}
if ($this->r_assistant_1_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " assistant_1 LIKE '%".$this->r_assistant_1_Contient."%' " ;
$Premier = False ;
}
if ($this->r_assistant_1_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " assistant_1='".$this->r_assistant_1_Est."' " ;
$Premier = False ;
}
if ($this->r_assistant_2_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " assistant_2 LIKE '".$this->r_assistant_2_Commence."%' " ;
$Premier = False ;
}
if ($this->r_assistant_2_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " assistant_2 LIKE '%".$this->r_assistant_2_Contient."%' " ;
$Premier = False ;
}
if ($this->r_assistant_2_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " assistant_2='".$this->r_assistant_2_Est."' " ;
$Premier = False ;
}
if ($this->r_assistant_3_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " assistant_3 LIKE '".$this->r_assistant_3_Commence."%' " ;
$Premier = False ;
}
if ($this->r_assistant_3_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " assistant_3 LIKE '%".$this->r_assistant_3_Contient."%' " ;
$Premier = False ;
}
if ($this->r_assistant_3_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " assistant_3='".$this->r_assistant_3_Est."' " ;
$Premier = False ;
}
if ($this->r_disciplines_Contient != "") {
if (!$Premier) { $sql_RequeteBase .= $this->r_AndOr ; }
$sql_RequeteBase .= " disciplines LIKE '%".$this->r_disciplines_Contient."%' " ;
$Premier = False ;
}
if ($this->r_type_muaythai_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " type_muaythai LIKE '".$this->r_type_muaythai_Commence."%' " ;
$Premier = False ;
}
if ($this->r_type_muaythai_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " type_muaythai LIKE '%".$this->r_type_muaythai_Contient."%' " ;
$Premier = False ;
}
if ($this->r_type_muaythai_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " type_muaythai='".$this->r_type_muaythai_Est."' " ;
$Premier = False ;
}
if (($this->r_boutique_pourcentage_De != "") or ($this->r_boutique_pourcentage_A != "")) {
if ($this->r_boutique_pourcentage_De == "")
$this->r_boutique_pourcentage_De = "-999999999" ;
if ($this->r_boutique_pourcentage_A == "")
$this->r_boutique_pourcentage_A = "999999999" ;
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " (boutique_pourcentage >= ".$this->r_boutique_pourcentage_De." AND boutique_pourcentage <= ".$this->r_boutique_pourcentage_A.") " ;
$Premier = False ;
}
if ($this->r_valide != ""){
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " valide = ".$this->r_valide." " ;
$Premier = False ;
}
if (($this->r_datecreation_De != "") or ($this->r_datecreation_A != "")) {
if ($this->r_datecreation_De == "")
$this->r_datecreation_De = "01/01/1000";
if ($this->r_datecreation_A == "")
$this->r_datecreation_A = "31/12/3000" ;
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " (datecreation >= '".f_ConversionDate($this->r_datecreation_De,"en")."' AND datecreation <= '".f_ConversionDate($this->r_datecreation_A,"en")."') " ;
$Premier = False ;
}
if (($this->r_datemodification_De != "") or ($this->r_datemodification_A != "")) {
if ($this->r_datemodification_De == "")
$this->r_datemodification_De = "01/01/1000";
if ($this->r_datemodification_A == "")
$this->r_datemodification_A = "31/12/3000" ;
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " (datemodification >= '".f_ConversionDate($this->r_datemodification_De,"en")."' AND datemodification <= '".f_ConversionDate($this->r_datemodification_A,"en")."') " ;
$Premier = False ;
}
if ($this->r_dateheuremodif_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " dateheuremodif LIKE '".$this->r_dateheuremodif_Commence."%' " ;
$Premier = False ;
}
if ($this->r_dateheuremodif_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " dateheuremodif LIKE '%".$this->r_dateheuremodif_Contient."%' " ;
$Premier = False ;
}
if ($this->r_dateheuremodif_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " dateheuremodif='".$this->r_dateheuremodif_Est."' " ;
$Premier = False ;
}
if ($this->r_createur_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " createur LIKE '".$this->r_createur_Commence."%' " ;
$Premier = False ;
}
if ($this->r_createur_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " createur LIKE '%".$this->r_createur_Contient."%' " ;
$Premier = False ;
}
if ($this->r_createur_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " createur='".$this->r_createur_Est."' " ;
$Premier = False ;
}
if ($this->r_modificateur_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " modificateur LIKE '".$this->r_modificateur_Commence."%' " ;
$Premier = False ;
}
if ($this->r_modificateur_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " modificateur LIKE '%".$this->r_modificateur_Contient."%' " ;
$Premier = False ;
}
if ($this->r_modificateur_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " modificateur='".$this->r_modificateur_Est."' " ;
$Premier = False ;
}
if ($this->r_proprietaire_Commence != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr;
$sql_RequeteBase .= " proprietaire LIKE '".$this->r_proprietaire_Commence."%' " ;
$Premier = False ;
}
if ($this->r_proprietaire_Contient != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " proprietaire LIKE '%".$this->r_proprietaire_Contient."%' " ;
$Premier = False ;
}
if ($this->r_proprietaire_Est != "") {
if (!$Premier)
$sql_RequeteBase .= $this->r_AndOr ;
$sql_RequeteBase .= " proprietaire='".$this->r_proprietaire_Est."' " ;
$Premier = False ;
}
} // Fin test criterepresent=true (clause WHERE pour param�tres recherche standard)
// *******************************
// RECHERCHE REGIONALE
// *******************************
If ($this->r_geo_region <> "") {
// On r�cup�re la liste des d�partements pour une r�gion donn�, sous la forme 75,76,77,94
$sql_recup_region = f_db_query("SELECT departements FROM region WHERE region='".$this->s_geo_region."'") ;
$row = mysqli_fetch_assoc($sql_recup_region);
// On �crit le crit�re de s�lection en remplacent les "," par des left(champ,2)
$sql_RequeteBase = " WHERE left(po_cp,2)='".str_replace(",","' or left(po_cp,2)='",$row[departements])."' ";
}
// *******************************
// RECHERCHE DEPARTEMENTALE
// *******************************
If ($this->r_geo_departement <> "")
$sql_RequeteBase = " WHERE left(po_cp,2)=".$this->s_geo_departement." " ;
// *******************************
// RECHERCHE DANS TOUS LES CHAMPS
// *******************************
if ($this->r_ToutChercher <> "") {
// Drapeau de test pour d�tecter le premier crit�re (pas de AND ou OR avant)
$Premier = True ;
$sql_RequeteBase = " WHERE " ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " id LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " ordre LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " wbg_menu LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " nom_club LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " ph_adresse LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " ph_cp LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " ph_ville LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " ph_pays LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " po_adresse LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " po_cp LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " po_ville LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " po_pays LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " telephone LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " fax LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " mobile LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " email LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " site LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " entraineur LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " president LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " tresorier LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " secretaire LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " manager LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " assistant_1 LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " assistant_2 LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " assistant_3 LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " disciplines LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " type_muaythai LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " boutique_pourcentage LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " valide LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " datecreation LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " datemodification LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " dateheuremodif LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " createur LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " modificateur LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
if (!$Premier)
$sql_RequeteBase .= "OR" ;
$sql_RequeteBase .= " proprietaire LIKE '%".$r_ToutChercher."%' " ;
$Premier = False ;
} // Fin clause "WHERE" pour recherche dans (presque) tous les champs
// Construction de la clause ORDER BY
if ($this->r_Groupe != "")
$sql_RequeteBase .= " ORDER BY ".$this->r_Groupe ;
if ($this->r_Tri != ""){
if ($this->r_Groupe != "")
$sql_RequeteBase .= ",".$this->r_Tri ;
else
$sql_RequeteBase .= " ORDER BY ".$this->r_Tri ;
if ($this->r_OrdreTri != "")
$sql_RequeteBase .= " ".$this->r_OrdreTri ;
}else{
if ($this->r_Groupe != "")
$sql_RequeteBase .= ",nom_club" ;
else
$sql_RequeteBase .= " ORDER BY nom_club" ;
}
$sql_RequeteBase = $sql_RequeteBaseStart.$sql_RequeteBase ;
$this->requete="$sql_RequeteBase";
$this->execute_SQL(1);
f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1);
}
// **********************************
// Gestion de l'affichage des erreurs.
// **********************************
function gestion_erreur ($erreur_mysql)
{
$this->erreur = "
Erreur d'execution
\n" ; if ($this->debug_mode) { $this->erreur .= "Erreur de requete : ".$this->requete."
\n" ; $this->erreur .= "Erreur Mysql a r�pondu : ".$erreur_mysql."
\n" ; f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1); } f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1); die($this->erreur) ; } } class o_db_acces_db_clubs extends o_db_db_clubs_acces { var $table_variables; // CONSTRUCTEUR : le constructeur de la classe db_acces est utilis�. // METHODES // ********************************** // Initialisation du tableau de variables // ********************************** function init_table() { // definition du tableau de variable global $this->table_variables =array ( "id_Old" => array("valeur" => "","type" =>"0"), "id" => array("valeur" => "","type" =>"Nombre"), "ordre" => array("valeur" => "","type" =>"Nombre"), "wbg_menu" => array("valeur" => "","type" =>"Categorie"), "nom_club" => array("valeur" => "","type" =>"Chaine"), "ph_adresse" => array("valeur" => "","type" =>"Commentaire"), "ph_cp" => array("valeur" => "","type" =>"Chaine"), "ph_ville" => array("valeur" => "","type" =>"Chaine"), "ph_pays" => array("valeur" => "","type" =>"Chaine"), "po_adresse" => array("valeur" => "","type" =>"Commentaire"), "po_cp" => array("valeur" => "","type" =>"Chaine"), "po_ville" => array("valeur" => "","type" =>"Chaine"), "po_pays" => array("valeur" => "","type" =>"Chaine"), "telephone" => array("valeur" => "","type" =>"Chaine"), "fax" => array("valeur" => "","type" =>"Chaine"), "mobile" => array("valeur" => "","type" =>"Chaine"), "email" => array("valeur" => "","type" =>"Email"), "site" => array("valeur" => "","type" =>"Lien"), "entraineur" => array("valeur" => "","type" =>"Chaine"), "president" => array("valeur" => "","type" =>"Chaine"), "tresorier" => array("valeur" => "","type" =>"Chaine"), "secretaire" => array("valeur" => "","type" =>"Chaine"), "manager" => array("valeur" => "","type" =>"Chaine"), "assistant_1" => array("valeur" => "","type" =>"Chaine"), "assistant_2" => array("valeur" => "","type" =>"Chaine"), "assistant_3" => array("valeur" => "","type" =>"Chaine"), "disciplines" => array("valeur" => "","type" =>"Commentaire"), "type_muaythai" => array("valeur" => "","type" =>"Chaine"), "boutique_pourcentage" => array("valeur" => "","type" =>"Reel"), "valide" => array("valeur" => "","type" =>"Drapeau"), "datecreation" => array("valeur" => "","type" =>"Date"), "datemodification" => array("valeur" => "","type" =>"Date"), "dateheuremodif" => array("valeur" => "","type" =>"Chaine"), "createur" => array("valeur" => "","type" =>"Chaine"), "modificateur" => array("valeur" => "","type" =>"Chaine"), "proprietaire" => array("valeur" => "","type" =>"Chaine"), "fin" => array("valeur" => "0","type" =>"0")); unset($this->table_variables["fin"]); // d�finition du tableau des variables ins�r�es $this->table_variables_insert =array ( "proprietaire" => array("valeur" => "","type" =>"Chaine"), "createur" => array("valeur" => "","type" =>"Chaine"), "datecreation" => array("valeur" => "","type" =>"Date"), "wbg_menu" => array("valeur" => "","type" =>"Categorie"), "nom_club" => array("valeur" => "","type" =>"Chaine"), "ph_adresse" => array("valeur" => "","type" =>"Commentaire"), "ph_cp" => array("valeur" => "","type" =>"Chaine"), "ph_ville" => array("valeur" => "","type" =>"Chaine"), "ph_pays" => array("valeur" => "","type" =>"Chaine"), "po_adresse" => array("valeur" => "","type" =>"Commentaire"), "po_cp" => array("valeur" => "","type" =>"Chaine"), "po_ville" => array("valeur" => "","type" =>"Chaine"), "po_pays" => array("valeur" => "","type" =>"Chaine"), "telephone" => array("valeur" => "","type" =>"Chaine"), "fax" => array("valeur" => "","type" =>"Chaine"), "mobile" => array("valeur" => "","type" =>"Chaine"), "email" => array("valeur" => "","type" =>"Email"), "site" => array("valeur" => "","type" =>"Lien"), "entraineur" => array("valeur" => "","type" =>"Chaine"), "president" => array("valeur" => "","type" =>"Chaine"), "tresorier" => array("valeur" => "","type" =>"Chaine"), "secretaire" => array("valeur" => "","type" =>"Chaine"), "manager" => array("valeur" => "","type" =>"Chaine"), "assistant_1" => array("valeur" => "","type" =>"Chaine"), "assistant_2" => array("valeur" => "","type" =>"Chaine"), "assistant_3" => array("valeur" => "","type" =>"Chaine"), "disciplines" => array("valeur" => "","type" =>"Commentaire"), "type_muaythai" => array("valeur" => "","type" =>"Chaine"), "boutique_pourcentage" => array("valeur" => "","type" =>"Reel"), "valide" => array("valeur" => "","type" =>"Drapeau"), "fin" => array("valeur" => "0","type" =>"0")); unset($this->table_variables_insert["fin"]); // d�finition du tableau des variables d'update $this->table_variables_update =array ( "wbg_menu" => array("valeur" => "","type" =>"Categorie"), "nom_club" => array("valeur" => "","type" =>"Chaine"), "ph_adresse" => array("valeur" => "","type" =>"Commentaire"), "ph_cp" => array("valeur" => "","type" =>"Chaine"), "ph_ville" => array("valeur" => "","type" =>"Chaine"), "ph_pays" => array("valeur" => "","type" =>"Chaine"), "po_adresse" => array("valeur" => "","type" =>"Commentaire"), "po_cp" => array("valeur" => "","type" =>"Chaine"), "po_ville" => array("valeur" => "","type" =>"Chaine"), "po_pays" => array("valeur" => "","type" =>"Chaine"), "telephone" => array("valeur" => "","type" =>"Chaine"), "fax" => array("valeur" => "","type" =>"Chaine"), "mobile" => array("valeur" => "","type" =>"Chaine"), "email" => array("valeur" => "","type" =>"Email"), "site" => array("valeur" => "","type" =>"Lien"), "entraineur" => array("valeur" => "","type" =>"Chaine"), "president" => array("valeur" => "","type" =>"Chaine"), "tresorier" => array("valeur" => "","type" =>"Chaine"), "secretaire" => array("valeur" => "","type" =>"Chaine"), "manager" => array("valeur" => "","type" =>"Chaine"), "assistant_1" => array("valeur" => "","type" =>"Chaine"), "assistant_2" => array("valeur" => "","type" =>"Chaine"), "assistant_3" => array("valeur" => "","type" =>"Chaine"), "disciplines" => array("valeur" => "","type" =>"Commentaire"), "type_muaythai" => array("valeur" => "","type" =>"Chaine"), "boutique_pourcentage" => array("valeur" => "","type" =>"Reel"), "valide" => array("valeur" => "","type" =>"Drapeau"), "proprietaire" => array("valeur" => "","type" =>"Chaine"), "fin" => array("valeur" => "0","type" =>"0")); unset($this->table_variables_update["fin"]); f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1); } // ********************************** // remplissage des tableaux en fonction du type d'action demand�. // ********************************** function init_post($type) { if ($type =="POST") { $this->table_variables["id_Old"]["valeur"] = $_POST[$prefixe."id_Old"]; $this->table_variables["id"]["valeur"]=$_POST[$prefixe."id"]; $this->table_variables["ordre"]["valeur"]=$_POST[$prefixe."ordre"]; $this->table_variables["wbg_menu"]["valeur"]=$_POST[$prefixe."wbg_menu"]; $this->table_variables["nom_club"]["valeur"]=$_POST[$prefixe."nom_club"]; $this->table_variables["ph_adresse"]["valeur"]=$_POST[$prefixe."ph_adresse"]; $this->table_variables["ph_cp"]["valeur"]=$_POST[$prefixe."ph_cp"]; $this->table_variables["ph_ville"]["valeur"]=$_POST[$prefixe."ph_ville"]; $this->table_variables["ph_pays"]["valeur"]=$_POST[$prefixe."ph_pays"]; $this->table_variables["po_adresse"]["valeur"]=$_POST[$prefixe."po_adresse"]; $this->table_variables["po_cp"]["valeur"]=$_POST[$prefixe."po_cp"]; $this->table_variables["po_ville"]["valeur"]=$_POST[$prefixe."po_ville"]; $this->table_variables["po_pays"]["valeur"]=$_POST[$prefixe."po_pays"]; $this->table_variables["telephone"]["valeur"]=$_POST[$prefixe."telephone"]; $this->table_variables["fax"]["valeur"]=$_POST[$prefixe."fax"]; $this->table_variables["mobile"]["valeur"]=$_POST[$prefixe."mobile"]; $this->table_variables["email"]["valeur"]=$_POST[$prefixe."email"]; $this->table_variables["site"]["valeur"]=$_POST[$prefixe."site"]; $this->table_variables["entraineur"]["valeur"]=$_POST[$prefixe."entraineur"]; $this->table_variables["president"]["valeur"]=$_POST[$prefixe."president"]; $this->table_variables["tresorier"]["valeur"]=$_POST[$prefixe."tresorier"]; $this->table_variables["secretaire"]["valeur"]=$_POST[$prefixe."secretaire"]; $this->table_variables["manager"]["valeur"]=$_POST[$prefixe."manager"]; $this->table_variables["assistant_1"]["valeur"]=$_POST[$prefixe."assistant_1"]; $this->table_variables["assistant_2"]["valeur"]=$_POST[$prefixe."assistant_2"]; $this->table_variables["assistant_3"]["valeur"]=$_POST[$prefixe."assistant_3"]; $this->table_variables["disciplines"]["valeur"]=$_POST[$prefixe."disciplines"]; $this->table_variables["type_muaythai"]["valeur"]=$_POST[$prefixe."type_muaythai"]; $this->table_variables["boutique_pourcentage"]["valeur"]=$_POST[$prefixe."boutique_pourcentage"]; $this->table_variables["valide"]["valeur"]=$_POST[$prefixe."valide"]; $this->table_variables["datecreation"]["valeur"]=$_POST[$prefixe."datecreation"]; $this->table_variables["datemodification"]["valeur"]=$_POST[$prefixe."datemodification"]; $this->table_variables["dateheuremodif"]["valeur"]=$_POST[$prefixe."dateheuremodif"]; $this->table_variables["createur"]["valeur"]=$_POST[$prefixe."createur"]; $this->table_variables["modificateur"]["valeur"]=$_POST[$prefixe."modificateur"]; $this->table_variables["proprietaire"]["valeur"]=$_POST[$prefixe."proprietaire"]; $this->champ_clef=$this->table_variables["id_Old"]["valeur"]; } f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1); } // ********************************** // Appeler un article de la table // ********************************** function recup_data($clef_recue,$liste_param="0") { if ($liste_param == "0") { $requete_temp="*"; } else { $requete_temp=$liste_param; } $this->requete="SELECT ".$requete_temp." from db_clubs WHERE id= $clef_recue "; $this->execute_SQL(1); f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1); } // ********************************** // Insertion de donn�es dans la base. // Param�tres par defaut : variables de $_POST et pr�fixe "s_" // ********************************** function insert_data($type="POST",$prefixe="s_") { // remplissage si type=POST $this->init_post($type); // cr�ation de la requete $sql_insert="INSERT INTO db_clubs ("; foreach($this->table_variables_insert as $key => $value) { $sql_insert.=$key.","; } $sql_insert=substr($sql_insert,0,strlen($sql_insert)-1); $sql_insert.=") VALUES ("; foreach($this->table_variables_insert as $key => $value) { $this->champ_a_inserer($key); $sql_insert.=$this->table_variables[$key]["valeur"].","; } $sql_insert=substr($sql_insert,0,strlen($sql_insert)-1); $sql_insert.=")"; $this->requete=$sql_insert; $this->execute_SQL(); f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1); } // ********************************** // Update de donn�es dans la base. // Param�tres par defaut : variables de $_POST et pr�fixe "s_" // ********************************** function update_data($type=0,$prefixe="s_") { // remplissage si type=POST $this->init_post($type); // cr�ation de la requete $sql_insert="UPDATE db_clubs SET "; foreach($this->table_variables_update as $key => $value) { $this->champ_a_inserer($key); $sql_insert.=$key."=".$this->table_variables[$key]["valeur"].","; } $sql_insert=substr($sql_insert,0,strlen($sql_insert)-1); $sql_insert.=" WHERE id=".$this->table_variables["id_Old"]["valeur"]; $this->requete=$sql_insert; $this->execute_SQL(); f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1); } // ********************************** // Suppression d'un enregistrement. // ********************************** function delete_data($type="POST",$prefixe="s_") { // remplissage si type=POST $this->init_post($type); // cr�ation de la requete $sql_insert="DELETE * FROM db_clubs"; $sql_insert.=" WHERE id=".$this->table_variables["id"]["valeur"]; $this->requete=$sql_insert; $this->execute_SQL(); f_GetBacktrace("fonction",$temp=debug_backtrace(),get_defined_vars(),1); } } ?>