} if (!is_null($adresse['building'])) { $building = Maps::buildingSearch($adresse['building'], $address['street']); if (count($building)) { $address['building'] = $building[0]['id']; } else { $building = Maps::buildingNew($adresse['building'], $address['street']); $address['building'] = $building; } } else { $address['building'] = null; } // On lance la création de l'adresse Maps::addressNew($person->get('id'), $address['ville'], $address['zip'], $address['street'], $address['building'], 'reel'); $person->contact_details_add($contact['MAIL']); $person->tag_add('Sénateur PS'); $person->tag_add($contact['REGION']); $query = $link->prepare('DELETE FROM `TABLE 30` WHERE `id` = :id'); $query->bindValue(':id', $contact['id'], PDO::PARAM_INT); $query->execute(); } $query = $link->query('SELECT COUNT(*) FROM `TABLE 30`'); $nb = $query->fetch(PDO::FETCH_NUM); if ($nb[0]) { ?> <script> var url = 'transfert.php'; document.location.href = url; </script> <?php } else {
<?php /** * Création d'un nouveau tag associé au contact * * PHP version 5 * * @category Ajax * @package LeQG * @author Damien Senger <*****@*****.**> * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License 3.0 * @link http://leqg.info */ $data = new People($_POST['contact']); if (!empty($_POST['tag'])) { $data->tag_add($_POST['tag']); }
if (!empty($contact['Téléphone2domicile'])) { $person->contact_details_add($contact['Téléphone2domicile'], 'fixe'); } if (!empty($contact['Télmobile'])) { $person->contact_details_add($contact['Télmobile'], 'mobile'); } if (!empty($contact['Adressedemessagerie'])) { $person->contact_details_add($contact['Adressedemessagerie'], 'email'); } if (!empty($contact['Adressedemessagerie2'])) { $person->contact_details_add($contact['Adressedemessagerie2'], 'email'); } if (!empty($contact['Adressedemessagerie3'])) { $person->contact_details_add($contact['Adressedemessagerie3'], 'email'); } $person->tag_add('contacts'); $query = $link->prepare('DELETE FROM `TABLE 47` WHERE `id` = :id'); $query->bindValue(':id', $contact['id'], PDO::PARAM_INT); $query->execute(); } $query = $link->query('SELECT COUNT(*) FROM `TABLE 47`'); $nb = $query->fetch(PDO::FETCH_NUM); if ($nb[0]) { ?> <script> var url = 'importation.php'; document.location.href = url; </script> <?php } else { echo 'Fini!';
<?php require_once 'includes.php'; $link = Configuration::read('db.link'); $person = People::create(); $person = new People($person); $person->tag_add('newsletter'); $person->contact_details_add($_POST['email']); header('Location: http://cordery.leqg.info/mail-info.php?email=' . md5($_POST['email']) . '&action=inscription');