Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU General Public |
|
18 |
// | You should have received a copy of the GNU General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: inscription_liste.class.php,v 1.5 2006-04-19 13:50:49 alexandre_tb Exp $
|
22 |
// CVS : $Id: inscription_liste.class.php,v 1.5 2006/04/19 13:50:49 alexandre_tb Exp $
|
23 |
/**
|
23 |
/**
|
24 |
* Application projet
|
24 |
* Application projet
|
25 |
*
|
25 |
*
|
26 |
* La classe inscription_liste
|
26 |
* La classe inscription_liste
|
27 |
*
|
27 |
*
|
Line 104... |
Line 104... |
104 |
* @access public
|
104 |
* @access public
|
105 |
*/
|
105 |
*/
|
106 |
function inscrireUtilisateur( &$utilisateur, &$liste, $type_inscription )
|
106 |
function inscrireUtilisateur( &$utilisateur, &$liste, $type_inscription )
|
107 |
{
|
107 |
{
|
108 |
$requete = 'update projet_inscription_liste set '.
|
108 |
$requete = 'update projet_inscription_liste set '.
|
109 |
'pil_id_liste='.$this->_db->escapeSimple($liste->getId()).', pil_id_statut='.$this->_db->escapeSimple($type_inscription).
|
109 |
'pil_id_liste='.$liste->getId().', pil_id_statut='.$this->_db->escapeSimple($type_inscription).' where pil_id_utilisateur='.$this->_db->escapeSimple($utilisateur->getInfo('identifiant')) ;
|
110 |
' where pil_id_utilisateur='.$this->_db->escapeSimple($utilisateur->getInfo('identifiant')) ;
|
- |
|
111 |
$resultat = $this->_db->query ($requete) ;
|
110 |
$resultat = $this->_db->query ($requete) ;
|
112 |
if (DB::isError ($resultat)) {
|
111 |
if (DB::isError ($resultat)) {
|
113 |
echo ('Echec de la requete : '.$requete.'<br />'.$resultat->getMessage()) ;
|
112 |
echo ('Echec de la requete : '.$requete.'<br />'.$resultat->getMessage()) ;
|
114 |
}
|
113 |
}
|
115 |
if ($this->_db->affectedRows() == 0) {
|
114 |
if ($this->_db->affectedRows() == 0) {
|
Line 136... |
Line 135... |
136 |
* @return void
|
135 |
* @return void
|
137 |
* @access public
|
136 |
* @access public
|
138 |
*/
|
137 |
*/
|
139 |
function desinscrireUtilisateur( &$utilisateur, &$liste )
|
138 |
function desinscrireUtilisateur( &$utilisateur, &$liste )
|
140 |
{
|
139 |
{
|
141 |
$requete = 'delete from projet_inscription_liste where pil_id_utilisateur='.$this->_db->escapeSimple($utilisateur->getInfo('identifiant')).
|
140 |
$requete = 'delete from projet_inscription_liste where pil_id_utilisateur='.$this->_db->escapeSimple($utilisateur->getInfo('identifiant')).' and pil_id_liste='.$this->_db->escapeSimple($liste->getId()) ;
|
142 |
' and pil_id_liste='.$this->_db->escapeSimple($liste->getId()) ;
|
- |
|
143 |
$resultat = $this->_db->query ($requete) ;
|
141 |
$resultat = $this->_db->query ($requete) ;
|
144 |
$resultat_suppression_utilisateur = file_get_contents (PROJET_SERVEUR_VPOPMAIL.'/suppression_abonne.php?domaine='.
|
142 |
$resultat_suppression_utilisateur = file_get_contents (PROJET_SERVEUR_VPOPMAIL.'/suppression_abonne.php?domaine='.
|
145 |
$liste->getDomaine().'&liste='.$liste->getNom().'&mail='.$utilisateur->getInfo('mail')) ;
|
143 |
$liste->getDomaine().'&liste='.$liste->getNom().'&mail='.$utilisateur->getInfo('mail')) ;
|
Line 146... |
Line 144... |
146 |
|
144 |
|