![]() |
![]() ![]() ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Plan du site
casas y habitaciones de huéspedes Campan, Bagneres de Bigorre - Altos Pirineosnées - (acces_es.html)
planmap
",$tpl);
$tplOk="";
foreach($tab as $k=>$v)
{
if ($tableau[$v]!="")
{
if ($GLOBALS['champs date'][$v]!="")
{
$tplOk.=transfoDate($tableau[$v]);
}
else
{
if ($GLOBALS['champs image'][$v]!="")
{
$tplOk.=" ";
}
}
}
}
else
{
$tplOk.=$v;
}
}
$tplOk =str_replace("{liste_prest}",listePrestasFacture($tableau),$tplOk);
return($tplOk);
}
function displaySQLTable($tab,$atsTab,$atsCel)//---- tab = tableau de tableaux
{
list($id,$t)=each($tab);
$tabOk ="\n
"; if (mysql_query($req)) { return("Ajout effectué"); } else { return("Erreur :".mysql_error()); } } function modifier($tab,$table,$condition) { connection(); $req="UPDATE ".$table." SET "; foreach($tab as $k=>$v) { $req.=$k."='".$v."',"; } $req.=" WHERE ".$condition; $req = str_replace(", WHERE"," WHERE",$req); if (mysql_query($req)) { return("Enregistrement terminé..."); } else { return("Erreur :".mysql_error()); } } function select($table,$condition)//--- retourne un tableau de tableaux { connection(); $req = "SELECT * FROM ".$table." WHERE ".$condition; //echo $req." ".mysql_error()." "; $res = mysql_query($req); $compteur=0; echo ""; return($resultat); } function select2($table,$condition)//--- retourne un tableau de tableaux { connection(); $req = "SELECT * FROM ".$table." WHERE ".$condition; //echo $req." ".mysql_error()." "; $res = mysql_query($req); $compteur=0; while ($tab = mysql_fetch_assoc($res)) { $compteur++; $resultat[$compteur]=$tab; } return($resultat); } function selectDistinct($champ,$table,$condition)//--- retourne un tableau de tableaux { connection(); $req = "SELECT DISTINCT ".$champ." FROM ".$table." WHERE ".$condition; $res = mysql_query($req); //echo " ".$req." ".mysql_error(); $compteur=0; echo ""; return($resultat); } function supprimer($table,$condition) { connection(); $req = "DELETE FROM ".$table." WHERE ".$condition; //echo $req." "; if (mysql_query($req)) { return(""); } else { //echo mysql_error(); return("Erreur :".mysql_error()); } } //--- ESPACE ACCES PRIVE function webLogin($login,$pass) { connection(); $req = "SELECT * FROM ".$GLOBALS['logTable']." WHERE ".$GLOBALS['loginField']."='".$login."' and ".$GLOBALS['passField']."='".$pass."'"; //echo $req; if($res=mysql_query($req)) { $compteur=0; return(mysql_fetch_assoc($res)); } else { return ("login ou mot de passe erroné"); } } function adminLogin($login,$pass) { connection(); $req = "SELECT * FROM web_admin WHERE login='".$login."' and pass='".$pass."'"; if($res=mysql_query($req)) { $compteur=0; $tab = mysql_fetch_assoc($res); return($tab); } else { return ("login ou mot de passe erroné"); } } function changePass($login,$ancien,$nouveau1,$nouveau2) { $req="SELECT * FROM ".$GLOBALS['logTable']." WHERE ".$GLOBALS['loginField']."='".$login."' and ".$GLOBALS['passField']."='".$ancien."'"; echo "
|