Exemplo n.º 1
0
	
	$client = new client();
	
	$affichage_inscription_ok = "none";
	$affichage_inscription_erreur = "none";
	
	// Confirmation de l'inscription
	if ( ( $mon_action == "inscrire" ) && ( $anti_spam == "" ) ) {
		//echo "inscription...<br>";
		
		// Vérification de l'existence du client
		if ( !$client->isMailExist( $_POST["email"] ) ) {
			//echo "Le mail n'existe pas...<br>";
		
			// Enregistrement des informations du client
			$num_client = $client->gererDonnees( $_POST );
			
			// Inscription OK
			if ( $client->load( $num_client ) ) {
				$affichage_inscription_ok = "block";
				
				// Envoi du mail de confirmation d'inscription au client
				if ( 1 == 1 ) {
					$_to = $client->mail;
					//$_to = "*****@*****.**";
					$sujet = "adanimalerie.com - Confirmation d'inscription";
					//echo "Envoi du message à " . $_to . "<br>";
					
					$entete = "From:AD animalerie <*****@*****.**>\n";
					$entete .= "MIME-version: 1.0\n";
					$entete .= "Content-type: text/html; charset= iso-8859-1\n";
Exemplo n.º 2
0
		if ( !$client->load( $_POST["num_client"] ) ) {
			//echo "Ajout...<br>";
			
			if ( $client->isMailExist( $_POST["email"] ) ) {
				$message_erreur = "D&eacute;sol&eacute;, cette adresse mail existe d&eacute;j&agrave; dans la base.";
				$client->nom = trim( $_POST["nom"] );
				$client->prenom = trim( $_POST["prenom"] );
				$client->adresse = trim( $_POST["adresse"] );
				$client->cp = trim( $_POST["cp"] );
				$client->ville = trim( $_POST["ville"] );
				$client->telephone = trim( $_POST["tel"] );
				$client->mail = trim( $_POST["email"] );
				$client->mdp = $_POST["mdp"];
			}
			else
				$client->gererDonnees( $_POST );
		}
		else
			$client->gererDonnees( $_POST );
		
		// Redirection (s'il n'y a pas d'erreur)
		if ( $message_erreur == "" ) header("Location: ./liste_client.php");
	}
	
	if ( $client->load( $num_client ) ) {
		$titre_page = "Modification de " . chr(34) . stripslashes( utf8_encode( $client->nom ) ) . " " . stripslashes( utf8_encode( $client->prenom ) ) . chr(34);
		
		$checked_actif_oui = ($client->actif == 1) ? "checked" : "";
		$checked_actif_non = ($client->actif == 1) ? "" : "checked";
	}
	else {