Changeset 93050 in spip-zone
- Timestamp:
- Nov 21, 2015, 11:07:22 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/reservation_evenement/trunk/reservation_evenement_fonctions.php
r93043 r93050 77 77 78 78 } 79 80 /** 81 * Cherche les infos d'un client 82 * 83 * @param string $email L'email du client. 84 * @param string $champ Un champ spécifique. 85 * 86 * @return mixed La valeur du champ ou un tableau avec tous les champs. 87 */ 88 function infos_client($email, $champ='') { 89 // Si on trouve un auteur spip on le prend, sinon on cherche dans les réservations 90 if (!$client = sql_fetsel('*','spip_auteurs','email=' . sql_quote($email))) 91 !$client = sql_fetsel('*','spip_reservations','email=' . sql_quote($email),'','id_reservation DESC'); 92 93 // Si on a des informations on retrourne la valeur d'un champ 94 // ou le tableau des infos selon ce qui es demandé. 95 // sinon on ne retourne rien. 96 if ($client) { 97 if ($champ AND isset($client[$champ])) $infos= $client[$champ]; 98 else $infos= $client; 99 } 100 else $infos = ''; 101 102 return $infos; 103 }
Note: See TracChangeset
for help on using the changeset viewer.