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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
| if($_POST)
{
$prenom = smartQuote($_POST['prenom']);
$nom = smartQuote($_POST['nom']);
$naissance = smartQuote($_POST['naissance']);
$ste = smartQuote($_POST['ste']);
$siret = smartQuote($_POST['siret']);
$adresse = smartQuote($_POST['adresse']);
$adresse2 = smartQuote($_POST['adresse2']);
$cp = smartQuote($_POST['cp']);
$commune = smartQuote($_POST['commune']);
$email = smartQuote($_POST['email']);
$mobile = smartQuote($_POST['mobile']);
$fixe = smartQuote($_POST['fixe']);
$fax = smartQuote($_POST['fax']);
$email_paypal = smartQuote($_POST['email_paypal']);
$commentaire = smartQuote($_POST['commentaire']);
mysql_query("UPDATE agenda_membre SET
nom='$nom' ,
prenom='$prenom' ,
naissance='$naissance' ,
ste='$ste' ,
siret='$siret' ,
adresse='$adresse' ,
adresse2='$adresse2' ,
cp='$cp' ,
commune='$commune' ,
email='$email' ,
mobile='$mobile' ,
fixe='$fixe' ,
fax='$fax' ,
email_paypal='$email_paypal' ,
commentaire='$commentaire' WHERE id='$_GET[id]'");
}
else
{
$site_Content .= '<br /><br />Fiche de <b>' . safest($row["nom"]) . ' ' . safest($row["prenom"]) . '</b> <br /><br />';
$id = $row["id"];
$nom = $row["nom"];
$prenom = $row["prenom"];
$ste = $row["ste"];
$siret = $row["siret"];
$adresse = $row["adresse"];
$adresse2 = $row["adresse2"];
$cp = $row["cp"];
$commune = $row["commune"];
$email = $row["email"];
$mobile = $row["mobile"];
$fixe = $row["fixe"];
$fax = $row["fax"];
$email_paypal = $row["email_paypal"];
$commentaire = $row["commentaire"];
$naissance = $row["naissance"];
include("./form_membres.php");
}
//cas ou on ajoute un membre
}
elseif ($action == "new")
{
$site_Content .= '<br /><br /><b>Ajouter un membre</b> <br /><br />';
if (!$_POST) {
include("form_membres.php");
}
else
{
$prenom = smartQuote($_POST['prenom']);
$nom = smartQuote($_POST['nom']);
$naissance = smartQuote($_POST['naissance']);
$ste = smartQuote($_POST['ste']);
$siret = smartQuote($_POST['siret']);
$adresse = smartQuote($_POST['adresse']);;
$adresse2 = smartQuote($_POST['adresse2']);
$cp = smartQuote($_POST['cp']);
$commune = smartQuote($_POST['commune']);
$email = smartQuote($_POST['email']);
$mobile = smartQuote($_POST['mobile']);
$fixe = smartQuote($_POST['fixe']);
$fax = smartQuote($_POST['fax']);
$email_paypal = smartQuote($_POST['email_paypal']);
$commentaire = smartQuote($_POST['commentaire']);
$requete = "INSERT INTO agenda_membre SET nom='$nom' ,
prenom='$prenom' ,
naissance='$naissance' ,
ste='$ste' ,
siret='$siret' ,
adresse='$adresse' ,
adresse2='$adresse2' ,
cp='$cp' ,
commune='$commune' ,
email='$email' ,
mobile='$mobile' ,
fixe='$fixe' ,
fax='$fax' ,
email_paypal='$email_paypal' ,
commentaire='$commentaire'";
$resultat = mysql_query($requete);
} |