From 4ceeca130f03a6038355c18b8c18373dbca4ff12 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Jul 2004 23:35:53 +0000 Subject: [PATCH] =?UTF-8?q?Look:=20Mise=20au=20look=20de=20la=20fiche=20ad?= =?UTF-8?q?herent=20Norm:=20Utilisation=20de=20la=20fonction=20form=5Fconf?= =?UTF-8?q?irm=20plutot=20que=20le=20code=20en=20dur=20Fix:=20Corrections?= =?UTF-8?q?=20diverses=20Look:=20Les=20liens=20editer,=20r=E9silier=20et?= =?UTF-8?q?=20supprimer=20utilisent=20les=20icones.=20Fix:=20La=20nature?= =?UTF-8?q?=20de=20l'adh=E9rent=20(moral=20ou=20physique)=20est=20affich?= =?UTF-8?q?=E9=20correctement.=20Norm:=20La=20liste=20des=20modes=20de=20p?= =?UTF-8?q?aiement=20pour=20la=20saisie=20d'une=20cotisation=20vient=20de?= =?UTF-8?q?=20la=20table=20des=20type=20de=20paiement=20plutot=20que=20cod?= =?UTF-8?q?=E9=20en=20dur.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/adherents/adherent.class.php | 19 +- htdocs/adherents/edit.php | 66 +- htdocs/adherents/fiche.php | 1225 ++++++++++++--------------- htdocs/adherents/liste.php | 24 +- 4 files changed, 574 insertions(+), 760 deletions(-) diff --git a/htdocs/adherents/adherent.class.php b/htdocs/adherents/adherent.class.php index e7b3f89e164..4c5e74ca5e0 100644 --- a/htdocs/adherents/adherent.class.php +++ b/htdocs/adherents/adherent.class.php @@ -1,6 +1,7 @@ - * Copyright (C) 2002-2003 Jean-Louis Bergamo + * Copyright (C) 2002-2003 Jean-Louis Bergamo + * Copyright (C) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -119,13 +120,12 @@ class Adherent $texttosend = preg_replace ($patterns, $replace, $text); $subjectosend = preg_replace ($patterns, $replace, $subject); if (defined('ADHERENT_MAIL_FROM') && ADHERENT_MAIL_FROM != ''){ - return mail($recipients,$subjectosend,$texttosend,"From: ".ADHERENT_MAIL_FROM."\nReply-To: ".ADHERENT_MAIL_FROM."\nX-Mailer: PHP/" . phpversion()); + return mail($recipients,$subjectosend,$texttosend,"From: ".ADHERENT_MAIL_FROM."\nReply-To: ".ADHERENT_MAIL_FROM."\nX-Mailer: PHP/" . phpversion()); }else{ return mail($recipients,$subjectosend,$texttosend); } } /* - * * * */ @@ -137,6 +137,19 @@ class Adherent print "
  • " . $this->errorstr[$i]; } } + + +/*! + \brief fonction qui renvoi la nature physique ou morale d'un adherent +*/ + Function getmorphylib($morphy='') + { + if (! $morphy) { $morphy=$this->morphy; } + if ($morphy == 'phy') { return "Physique"; } + if ($morphy == 'mor') { return "Morale"; } + return $morphy; + } + /* * * diff --git a/htdocs/adherents/edit.php b/htdocs/adherents/edit.php index d9c788d59d3..c2680b7d495 100644 --- a/htdocs/adherents/edit.php +++ b/htdocs/adherents/edit.php @@ -1,6 +1,8 @@ - * Jean-Louis Bergamo + * Copyright (C) 2002 Jean-Louis Bergamo + * Copyright (C) 2004 Laurent Destailleur + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -33,33 +35,33 @@ $adho = new AdherentOptions($db); if ($action == 'update') { - if ($HTTP_POST_VARS["bouton"] == "Enregistrer") + if ($_POST["bouton"] == "Enregistrer") { $adh = new Adherent($db); - $adh->id = $HTTP_POST_VARS["rowid"]; + $adh->id = $_POST["rowid"]; $adh->prenom = $prenom; $adh->nom = $nom; $adh->societe = $societe; $adh->adresse = $adresse; $adh->amount = $amount; $adh->cp = $cp; - $adh->ville = $HTTP_POST_VARS["ville"]; - $adh->email = $HTTP_POST_VARS["email"]; - $adh->login = $HTTP_POST_VARS["login"]; - $adh->pass = $HTTP_POST_VARS["pass"]; - $adh->naiss = $HTTP_POST_VARS["naiss"]; - $adh->photo = $HTTP_POST_VARS["photo"]; + $adh->ville = $_POST["ville"]; + $adh->email = $_POST["email"]; + $adh->login = $_POST["login"]; + $adh->pass = $_POST["pass"]; + $adh->naiss = $_POST["naiss"]; + $adh->photo = $_POST["photo"]; $adh->date = mktime(12, 0 , 0, $remonth, $reday, $reyear); - $adh->note = $HTTP_POST_VARS["note"]; - $adh->pays = $HTTP_POST_VARS["pays"]; - $adh->typeid = $HTTP_POST_VARS["type"]; - $adh->commentaire = $HTTP_POST_VARS["comment"]; - $adh->morphy = $HTTP_POST_VARS["morphy"]; + $adh->note = $_POST["note"]; + $adh->pays = $_POST["pays"]; + $adh->typeid = $_POST["type"]; + $adh->commentaire = $_POST["comment"]; + $adh->morphy = $_POST["morphy"]; // recuperation du statut et public - $adh->statut = $HTTP_POST_VARS["statut"]; - $adh->public = $HTTP_POST_VARS["public"]; + $adh->statut = $_POST["statut"]; + $adh->public = $_POST["public"]; foreach($_POST as $key => $value){ if (ereg("^options_",$key)){ @@ -115,38 +117,6 @@ if ($rowid) print_titre("Edition de la fiche adhérent"); - - print ''; - - print ""; - print ''; - - print ''; - print ''; - - print ''; - - print ''; - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - // print ''; - print ''; - print ''; - // $adho->fetch_optionals(); - foreach($adho->attribute_label as $key=>$value){ - print "\n"; - } - - print "
    Type$adh->typeCommentaires
    Personne'.$adh->morphy.' '; - print nl2br($adh->commentaire).' 
    Prénom'.$adh->prenom.' 
    Nom'.$adh->nom.' 
    Société'.$adh->societe.' 
    Adresse'.nl2br($adh->adresse).' 
    CP Ville'.$adh->cp.' '.$adh->ville.' 
    Pays'.$adh->pays.' 
    Email'.$adh->email.' 
    Login'.$adh->login.' 
    Password'.$adh->pass.' 
    Date de naissance
    Format AAAA-MM-JJ
    '.$adh->naiss.' 
    URL Photo'.$adh->photo.' 
    $value".$adh->array_options["options_$key"]." 
    \n"; - - print "
    "; - print "
    "; print ''; diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 9770e6f8137..134474ab7a5 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -22,125 +22,126 @@ * */ require("./pre.inc.php"); + require(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php"); require(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php"); require(DOL_DOCUMENT_ROOT."/adherents/adherent_options.class.php"); -//require(DOL_DOCUMENT_ROOT."/adherents/cotisation.class.php"); -//require(DOL_DOCUMENT_ROOT."/paiement.class.php"); require(DOL_DOCUMENT_ROOT."/adherents/XML-RPC.functions.php"); require(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php"); $adho = new AdherentOptions($db); $errmsg=''; -if (isset($action) && $action=='sendinfo') +$action=isset($_GET["action"])?$_GET["action"]:$_POST["action"]; + + +if ($_POST["action"] == 'sendinfo') { - $adh = new Adherent($db); - $adh->id = $rowid; - $adh->fetch($rowid); - $adh->send_an_email($adh->email,"Voici le contenu de votre fiche\n\n%INFOS%\n\n","Contenu de votre fiche adherent"); + $adh = new Adherent($db); + $adh->id = $rowid; + $adh->fetch($rowid); + $adh->send_an_email($adh->email,"Voici le contenu de votre fiche\n\n%INFOS%\n\n","Contenu de votre fiche adherent"); } -if ($_POST["action"] == 'cotisation') +if ($_POST["action"] == 'cotisation') { - $adh = new Adherent($db); - $adh->id = $rowid; - $adh->fetch($rowid); - - if ($cotisation >= 0) - { - // rajout du nouveau cotisant dans les listes qui vont bien - // if (defined("ADHERENT_MAILMAN_LISTS_COTISANT") && ADHERENT_MAILMAN_LISTS_COTISANT!='' && $adh->datefin == "0000-00-00 00:00:00"){ - if (defined("ADHERENT_MAILMAN_LISTS_COTISANT") && ADHERENT_MAILMAN_LISTS_COTISANT!='' && $adh->datefin == 0){ - $adh->add_to_mailman(ADHERENT_MAILMAN_LISTS_COTISANT); - } - $crowid=$adh->cotisation(mktime(12, 0 , 0, $remonth, $reday, $reyear), $cotisation); - if (defined("ADHERENT_MAIL_COTIS") && defined("ADHERENT_MAIL_COTIS_SUBJECT")){ - $adh->send_an_email($adh->email,ADHERENT_MAIL_COTIS,ADHERENT_MAIL_COTIS_SUBJECT); - } - // insertion dans la gestion banquaire si configure pour - if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0 && - defined("ADHERENT_BANK_USE_AUTO") && ADHERENT_BANK_USE_AUTO !=0){ - $dateop=strftime("%Y%m%d",time()); - //$dateop="$reyear$remonth$reday"; - $amount=$cotisation; - $acct=new Account($db,ADHERENT_BANK_ACCOUNT); - $insertid=$acct->addline($dateop, $_POST["operation"], $_POST["label"], $amount, $_POST["num_chq"],ADHERENT_BANK_CATEGORIE); - if ($insertid == '') - { - print "

    Probleme d'insertion : ".$db->error(); - } - else - { - // met a jour la table cotisation - $sql="UPDATE ".MAIN_DB_PREFIX."cotisation SET fk_bank=$insertid WHERE rowid=$crowid "; - $result = $db->query($sql); - if ($result) - { - //Header("Location: $PHP_SELF"); - } - else - { - print "

    Probleme d'insertion $sql : ".$db->error(); - } - } - } + $adh = new Adherent($db); + $adh->id = $rowid; + $adh->fetch($rowid); + if ($cotisation >= 0) + { + // rajout du nouveau cotisant dans les listes qui vont bien + // if (defined("ADHERENT_MAILMAN_LISTS_COTISANT") && ADHERENT_MAILMAN_LISTS_COTISANT!='' && $adh->datefin == "0000-00-00 00:00:00"){ + if (defined("ADHERENT_MAILMAN_LISTS_COTISANT") && ADHERENT_MAILMAN_LISTS_COTISANT!='' && $adh->datefin == 0){ + $adh->add_to_mailman(ADHERENT_MAILMAN_LISTS_COTISANT); + } + $crowid=$adh->cotisation(mktime(12, 0 , 0, $remonth, $reday, $reyear), $cotisation); + if (defined("ADHERENT_MAIL_COTIS") && defined("ADHERENT_MAIL_COTIS_SUBJECT")){ + $adh->send_an_email($adh->email,ADHERENT_MAIL_COTIS,ADHERENT_MAIL_COTIS_SUBJECT); + } + // insertion dans la gestion banquaire si configure pour + if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0 && + defined("ADHERENT_BANK_USE_AUTO") && ADHERENT_BANK_USE_AUTO !=0){ + $dateop=strftime("%Y%m%d",time()); + //$dateop="$reyear$remonth$reday"; + $amount=$cotisation; + $acct=new Account($db,ADHERENT_BANK_ACCOUNT); + $insertid=$acct->addline($dateop, $_POST["operation"], $_POST["label"], $amount, $_POST["num_chq"],ADHERENT_BANK_CATEGORIE); + if ($insertid == '') + { + print "

    Probleme d'insertion : ".$db->error(); + } + else + { + // met a jour la table cotisation + $sql="UPDATE ".MAIN_DB_PREFIX."cotisation SET fk_bank=$insertid WHERE rowid=$crowid "; + $result = $db->query($sql); + if ($result) + { + //Header("Location: $PHP_SELF"); + } + else + { + print "

    Probleme d'insertion $sql : ".$db->error(); + } + } + } } - $action = "edit"; + $action = "edit"; } -if ($_POST["action"] == 'add') +if ($_POST["action"] == 'add') { - $type=$_POST["type"]; - if(!isset($type) || $type==''){ - $error+=1; - $errmsg .="Le type d'adhérent n'est pas renseigné. Vous devez configurer les types d'adhérents avant de pouvoir les ajouter.
    \n"; - } - $login=$_POST["login"]; - // test si le login existe deja - if(!isset($login) || $login==''){ - $error+=1; - $errmsg .="Login vide. Veuillez en positionner un
    \n"; - } - $sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login='$login';"; - $result = $db->query($sql); - if ($result) { - $num = $db->num_rows(); - } - if (!isset($nom) || !isset($prenom) || $prenom=='' || $nom==''){ - $error+=1; - $errmsg .="Nom et Prenom obligatoires
    \n"; - } - if (!isset($email) || $email == '' || !ereg('@',$email)){ - $error+=1; - $errmsg .="Adresse Email invalide
    \n"; - } - if ($num !=0){ - $error+=1; - $errmsg .="Login deja utilise. Veuillez en changer
    \n"; - } - if (!isset($pass) || $pass == '' ){ - $error+=1; - $errmsg .="Password invalide
    \n"; - } - if (isset($naiss) && $naiss !=''){ - if (!preg_match("/^\d\d\d\d-\d\d-\d\d$/",$naiss)){ - $error+=1; - $errmsg .="Date de naissance invalide (Format AAAA-MM-JJ)
    \n"; + $type=$_POST["type"]; + if(!isset($type) || $type==''){ + $error+=1; + $errmsg .="Le type d'adhérent n'est pas renseigné. Vous devez configurer les types d'adhérents avant de pouvoir les ajouter.
    \n"; } - } - if (isset($public)){ - $public=1; - }else{ + $login=$_POST["login"]; + // test si le login existe deja + if(!isset($login) || $login==''){ + $error+=1; + $errmsg .="Login vide. Veuillez en positionner un
    \n"; + } + $sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login='$login';"; + $result = $db->query($sql); + if ($result) { + $num = $db->num_rows(); + } + if (!isset($nom) || !isset($prenom) || $prenom=='' || $nom==''){ + $error+=1; + $errmsg .="Nom et Prenom obligatoires
    \n"; + } + if (!isset($email) || $email == '' || !ereg('@',$email)){ + $error+=1; + $errmsg .="Adresse Email invalide
    \n"; + } + if ($num !=0){ + $error+=1; + $errmsg .="Login deja utilise. Veuillez en changer
    \n"; + } + if (!isset($pass) || $pass == '' ){ + $error+=1; + $errmsg .="Password invalide
    \n"; + } + if (isset($naiss) && $naiss !=''){ + if (!preg_match("/^\d\d\d\d-\d\d-\d\d$/",$naiss)){ + $error+=1; + $errmsg .="Date de naissance invalide (Format AAAA-MM-JJ)
    \n"; + } + } + if (isset($public)){ + $public=1; + }else{ $public=0; - } - if (!$error){ +} +if (!$error){ // email a peu pres correct et le login n'existe pas $adh = new Adherent($db); $adh->statut = -1; $adh->prenom = $prenom; - $adh->nom = $nom; + $adh->nom = $nom; $adh->societe = $societe; $adh->adresse = $adresse; $adh->cp = $cp; @@ -155,99 +156,99 @@ if ($_POST["action"] == 'add') $adh->typeid = $type; $adh->commentaire = $_POST["comment"]; $adh->morphy = $_POST["morphy"]; - + foreach($_POST as $key => $value){ - if (ereg("^options_",$key)){ - $adh->array_options[$key]=$_POST[$key]; - } + if (ereg("^options_",$key)){ + $adh->array_options[$key]=$_POST[$key]; + } } - if ($adh->create($user->id) ) - { - if ($cotisation > 0) - { - $adh->cotisation(mktime(12, 0 , 0, $remonth, $reday, $reyear), $cotisation); - // insertion dans la gestion banquaire si configure pour - if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0 && - defined("ADHERENT_BANK_USE_AUTO") && ADHERENT_BANK_USE_AUTO !=0){ - $dateop=strftime("%Y%m%d",time()); - //$dateop="$reyear$remonth$reday"; - $amount=$cotisation; - $acct=new Account($db,ADHERENT_BANK_ACCOUNT); - $insertid=$acct->addline($dateop, $_POST["operation"], $_POST["label"], $amount, $_POST["num_chq"],ADHERENT_BANK_CATEGORIE); - if ($insertid == '') - { - print "

    Probleme d'insertion : ".$db->error(); - } - else - { - // met a jour la table cotisation - $sql="UPDATE ".MAIN_DB_PREFIX."cotisation SET fk_bank=$insertid WHERE rowid=$crowid "; - $result = $db->query($sql); - if ($result) - { - //Header("Location: $PHP_SELF"); - } - else - { - print "

    Probleme d'insertion $sql : ".$db->error(); - } - } - } - } - Header("Location: liste.php"); - } - } + if ($adh->create($user->id) ) + { + if ($cotisation > 0) + { + $adh->cotisation(mktime(12, 0 , 0, $remonth, $reday, $reyear), $cotisation); + // insertion dans la gestion banquaire si configure pour + if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0 && + defined("ADHERENT_BANK_USE_AUTO") && ADHERENT_BANK_USE_AUTO !=0){ + $dateop=strftime("%Y%m%d",time()); + //$dateop="$reyear$remonth$reday"; + $amount=$cotisation; + $acct=new Account($db,ADHERENT_BANK_ACCOUNT); + $insertid=$acct->addline($dateop, $_POST["operation"], $_POST["label"], $amount, $_POST["num_chq"],ADHERENT_BANK_CATEGORIE); + if ($insertid == '') + { + print "

    Probleme d'insertion : ".$db->error(); + } + else + { + // met a jour la table cotisation + $sql="UPDATE ".MAIN_DB_PREFIX."cotisation SET fk_bank=$insertid WHERE rowid=$crowid "; + $result = $db->query($sql); + if ($result) + { + //Header("Location: $PHP_SELF"); + } + else + { + print "

    Probleme d'insertion $sql : ".$db->error(); + } + } + } + } + Header("Location: liste.php"); + } +} } if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == yes) { - $adh = new Adherent($db); - $adh->delete($rowid); - Header("Location: liste.php"); + $adh = new Adherent($db); + $adh->delete($rowid); + Header("Location: liste.php"); } if ($_POST["action"] == 'confirm_valid' && $_POST["confirm"] == yes) { - $adh = new Adherent($db, $rowid); - $adh->validate($user->id); - $adh->fetch($rowid); + $adh = new Adherent($db, $rowid); + $adh->validate($user->id); + $adh->fetch($rowid); - $adht = new AdherentType($db); - $adht->fetch($adh->typeid); + $adht = new AdherentType($db); + $adht->fetch($adh->typeid); - if (isset($adht->mail_valid) && $adht->mail_valid != '') + if (isset($adht->mail_valid) && $adht->mail_valid != '') { - $adh->send_an_email($adh->email,$adht->mail_valid,$conf->adherent->email_valid_subject); + $adh->send_an_email($adh->email,$adht->mail_valid,$conf->adherent->email_valid_subject); } - else + else { - $adh->send_an_email($adh->email,$conf->adherent->email_valid,$conf->adherent->email_valid_subject); + $adh->send_an_email($adh->email,$conf->adherent->email_valid,$conf->adherent->email_valid_subject); } - // rajoute l'utilisateur dans les divers abonnements .. - if (!$adh->add_to_abo($adht)) + // rajoute l'utilisateur dans les divers abonnements .. + if (!$adh->add_to_abo($adht)) { - // error - $errmsg.="echec du rajout de l'utilisateur aux abonnements: ".$adh->errostr."
    \n"; + // error + $errmsg.="echec du rajout de l'utilisateur aux abonnements: ".$adh->errostr."
    \n"; } - + } if ($_POST["action"] == 'confirm_resign' && $_POST["confirm"] == yes) { - $adh = new Adherent($db, $rowid); - $adh->resiliate($user->id); - $adh->fetch($rowid); + $adh = new Adherent($db, $rowid); + $adh->resiliate($user->id); + $adh->fetch($rowid); - $adht = new AdherentType($db); - $adht->fetch($adh->typeid); + $adht = new AdherentType($db); + $adht->fetch($adh->typeid); - $adh->send_an_email($adh->email,$conf->adherent->email_resil,$conf->adherent->email_resil_subject); + $adh->send_an_email($adh->email,$conf->adherent->email_resil,$conf->adherent->email_resil_subject); - // supprime l'utilisateur des divers abonnements .. - if (!$adh->del_to_abo($adht)) + // supprime l'utilisateur des divers abonnements .. + if (!$adh->del_to_abo($adht)) { - // error - $errmsg.="echec de la suppression de l'utilisateur aux abonnements: ".$adh->errostr."
    \n"; + // error + $errmsg.="echec de la suppression de l'utilisateur aux abonnements: ".$adh->errostr."
    \n"; } } @@ -255,54 +256,54 @@ llxHeader(); if ($_POST["action"] == 'confirm_add_glasnost' && $_POST["confirm"] == yes) { - $adh = new Adherent($db, $rowid); - $adh->fetch($rowid); - $adht = new AdherentType($db); - $adht->fetch($adh->typeid); - if ($adht->vote == 'yes'){ - define("XMLRPC_DEBUG", 1); - if (!$adh->add_to_glasnost()){ - $errmsg.="Echec du rajout de l'utilisateur dans glasnost: ".$adh->errostr."
    \n"; + $adh = new Adherent($db, $rowid); + $adh->fetch($rowid); + $adht = new AdherentType($db); + $adht->fetch($adh->typeid); + if ($adht->vote == 'yes'){ + define("XMLRPC_DEBUG", 1); + if (!$adh->add_to_glasnost()){ + $errmsg.="Echec du rajout de l'utilisateur dans glasnost: ".$adh->errostr."
    \n"; + } + if(defined('MAIN_DEBUG') && MAIN_DEBUG == 1){ + XMLRPC_debug_print(); + } } - if(defined('MAIN_DEBUG') && MAIN_DEBUG == 1){ - XMLRPC_debug_print(); - } - } } if ($_POST["action"] == 'confirm_del_glasnost' && $_POST["confirm"] == yes) { - $adh = new Adherent($db, $rowid); - $adh->fetch($rowid); - $adht = new AdherentType($db); - $adht->fetch($adh->typeid); - if ($adht->vote == 'yes'){ - define("XMLRPC_DEBUG", 1); - if(!$adh->del_to_glasnost()){ - $errmsg.="Echec de la suppression de l'utilisateur dans glasnost: ".$adh->errostr."
    \n"; + $adh = new Adherent($db, $rowid); + $adh->fetch($rowid); + $adht = new AdherentType($db); + $adht->fetch($adh->typeid); + if ($adht->vote == 'yes'){ + define("XMLRPC_DEBUG", 1); + if(!$adh->del_to_glasnost()){ + $errmsg.="Echec de la suppression de l'utilisateur dans glasnost: ".$adh->errostr."
    \n"; + } + if(defined('MAIN_DEBUG') && MAIN_DEBUG == 1){ + XMLRPC_debug_print(); + } } - if(defined('MAIN_DEBUG') && MAIN_DEBUG == 1){ - XMLRPC_debug_print(); - } - } } if ($_POST["action"] == 'confirm_del_spip' && $_POST["confirm"] == yes) { - $adh = new Adherent($db, $rowid); - $adh->fetch($rowid); - if(!$adh->del_to_spip()){ - $errmsg.="Echec de la suppression de l'utilisateur dans spip: ".$adh->errostr."
    \n"; - } + $adh = new Adherent($db, $rowid); + $adh->fetch($rowid); + if(!$adh->del_to_spip()){ + $errmsg.="Echec de la suppression de l'utilisateur dans spip: ".$adh->errostr."
    \n"; + } } if ($_POST["action"] == 'confirm_add_spip' && $_POST["confirm"] == yes) { - $adh = new Adherent($db, $rowid); - $adh->fetch($rowid); - if (!$adh->add_to_spip()){ - $errmsg.="Echec du rajout de l'utilisateur dans spip: ".$adh->errostr."
    \n"; - } + $adh = new Adherent($db, $rowid); + $adh->fetch($rowid); + if (!$adh->add_to_spip()){ + $errmsg.="Echec du rajout de l'utilisateur dans spip: ".$adh->errostr."
    \n"; + } } @@ -313,96 +314,95 @@ if ($_POST["action"] == 'confirm_add_spip' && $_POST["confirm"] == yes) /* ************************************************************************** */ if ($errmsg != '') { - print '

    '; - print ''; - print "\n"; - print '
    Erreur dans l\'execution du formulaire
    $errmsg
    '; + print ''; + print ''; + print "\n"; + print '
    Erreur dans l\'execution du formulaire
    $errmsg
    '; } // fetch optionals attributes and labels $adho->fetch_optionals(); if ($action == 'create') { - print_titre("Nouvel adhérent"); - print "\n"; - print ''; - - print ''; + print_titre("Nouvel adhérent"); + print "\n"; + print '
    '; - $htmls = new Form($db); - $adht = new AdherentType($db); + print ''; - print '\n"; + $htmls = new Form($db); + $adht = new AdherentType($db); - print ''; + print '\n"; - $morphys["phy"] = "Physique"; - $morphys["mor"] = "Morale"; + print ''; - print "\n"; - - print ''; + $morphys["phy"] = "Physique"; + $morphys["mor"] = "Morale"; - print ''; - + print "\n"; + + print ''; + + print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - foreach($adho->attribute_label as $key=>$value){ - print "\n"; - } - print "\n"; - print "'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + foreach($adho->attribute_label as $key=>$value){ + print "\n"; + } - // $paiement->select("modepaiement","crédit"); - - print "\n"; - if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0 && - defined("ADHERENT_BANK_USE_AUTO") && ADHERENT_BANK_USE_AUTO !=0){ - print "\n"; - } - print ''; - if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0 && - defined("ADHERENT_BANK_USE_AUTO") && ADHERENT_BANK_USE_AUTO !=0){ - print ''; - } - print ''; - print "\n"; - print "
    Type'; - $htmls->select_array("type", $adht->liste_array()); - print "Commentaires :
    Type'; + $htmls->select_array("type", $adht->liste_array()); + print "Commentaires :
    Personne\n"; - $htmls->select_array("morphy", $morphys); - print "
    Prénom
    Personne\n"; + $htmls->select_array("morphy", $morphys); + print "
    Prénom
    Nom
    Societe
    Adresse'; - print '
    CP Ville
    Pays
    Email
    Login
    Password
    Date de Naissance
    Format AAAA-MM-JJ
    Url photo
    $value
    Date de cotisation\n"; - print_date_select(); - print "
    Mode de paiement\n"; - - print ''; - // $paiement = new Paiement($db); + print '
    Nom
    Societe
    Adresse'; + print '
    CP Ville
    Pays
    Email
    Login
    Password
    Date de Naissance
    Format AAAA-MM-JJ
    Url photo
    $value
    Numero de cheque\n"; - print ''; + print "
    Date de cotisation\n"; + print_date_select(); print "
    Cotisation euros
    Libelle
    \n"; - - -} + print "Mode de paiement\n"; + + print ''; + // $paiement = new Paiement($db); + + // $paiement->select("modepaiement","crédit"); + + print "\n"; + if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0 && + defined("ADHERENT_BANK_USE_AUTO") && ADHERENT_BANK_USE_AUTO !=0){ + print "Numero de cheque\n"; + print ''; + print "\n"; + } + print 'Cotisation euros'; + if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0 && defined("ADHERENT_BANK_USE_AUTO") && ADHERENT_BANK_USE_AUTO !=0){ + print 'Libelle'; + } + print ''; + print "\n"; + print "\n"; + + +} /* ************************************************************************** */ /* */ /* Edition de la fiche */ @@ -410,475 +410,300 @@ if ($action == 'create') { /* ************************************************************************** */ if ($rowid > 0) { + $adh = new Adherent($db); + $adh->id = $rowid; + $adh->fetch($rowid); + $adh->fetch_optionals($rowid); - $adh = new Adherent($db); - $adh->id = $rowid; - $adh->fetch($rowid); - $adh->fetch_optionals($rowid); - //$myattr=$adh->fetch_name_optionals(); - $adht = new AdherentType($db); - $adht->fetch($adh->typeid); + $adht = new AdherentType($db); + $adht->fetch($adh->typeid); - print_titre("Edition de la fiche adhérent"); + $html = new Form($db); - /* - * Confirmation de la suppression de l'adhérent - * - */ + /* + * Affichage onglets + */ + $h = 0; - if ($action == 'delete') + $head[$h][0] = DOL_URL_ROOT.'/adherents/fiche.php?rowid='.$rowid; + $head[$h][1] = "Fiche adhérent"; + $hselected=$h; + $h++; + + dolibarr_fiche_head($head, $hselected, $societe->nom); + + /* + * Confirmation de la suppression de l'adhérent + */ + if ($action == 'delete') { + $html->form_confirm("$PHP_SELF?rowid=$rowid","Supprimer un adhérent","Etes-vous sûr de vouloir supprimer cet adhérent (La suppression d'un adhérent entraine la suppression de toutes ses cotisations !)","confirm_delete"); + } - print '
    '; - print ''; - print ''; - - print ''; - print "\n"; - - print '\n"; - print ''; - print '
    Supprimer un adhérent
    La suppression d'un adhérent entraine la suppression de toutes ses cotisations !!!
    Etes-vous sur de vouloir supprimer cet adhérent ?'; - $htmls = new Form($db); - - $htmls->selectyesno("confirm","no"); - - print "
    '; - print "
    \n"; + /* + * Confirmation de la validation + */ + if ($action == 'valid') + { + $html->form_confirm("$PHP_SELF?rowid=$rowid","Valider un adhérent","Etes-vous sûr de vouloir valider cet adhérent ?","confirm_valid"); + } + + /* + * Confirmation de la Résiliation + */ + if ($action == 'resign') + { + $html->form_confirm("$PHP_SELF?rowid=$rowid","Résilier une adhésion","Etes-vous sûr de vouloir résilier cet adhérent ?","confirm_resign"); + } + + /* + * Confirmation de l'ajout dans glasnost + */ + if ($action == 'add_glasnost') + { + $html->form_confirm("$PHP_SELF?rowid=$rowid","Ajouter dans glasnost","Etes-vous sur de vouloir ajouter cet adhérent dans glasnost ? (serveur : ".ADHERENT_GLASNOST_SERVEUR.")","confirm_add_glasnost"); + } + + /* + * Confirmation de la suppression dans glasnost + */ + if ($action == 'del_glasnost') + { + $html->form_confirm("$PHP_SELF?rowid=$rowid","Supprimer dans glasnost","Etes-vous sur de vouloir effacer cet adhérent dans glasnost ? (serveur : ".ADHERENT_GLASNOST_SERVEUR.")","confirm_del_glasnost"); + } + + /* + * Confirmation de l'ajout dans spip + */ + if ($action == 'add_spip') + { + $html->form_confirm("$PHP_SELF?rowid=$rowid","Ajouter dans spip","Etes-vous sur de vouloir ajouter cet adhérent dans spip ? (serveur : ".ADHERENT_SPIP_SERVEUR.")","confirm_add_spip"); + } + + /* + * Confirmation de la suppression dans spip + */ + if ($action == 'del_spip') + { + $html->form_confirm("$PHP_SELF?rowid=$rowid","Supprimer dans spip","Etes-vous sur de vouloir effacer cet adhérent dans spip ? (serveur : ".ADHERENT_SPIP_SERVEUR.")","confirm_del_spip"); + $html->form_confirm("$PHP_SELF?rowid=$rowid","Ajouter dans glasnost","Etes-vous sur de vouloir ajouter cet adhérent dans glasnost ? (serveur : ".ADHERENT_GLASNOST_SERVEUR.")","confirm_del_spip"); } - /* - * Confirmation de la validation - * - */ + print "
    \n"; + print ''; - if ($action == 'valid') - { + print ''; + print ''; - print ''; - print ''; - print '
    Numero'.$adh->id.' Commentaires
    '; - - print ''; - - print '\n"; - print ''; - print '
    Valider un adhérent
    Etes-vous sur de vouloir valider cet adhérent ?'; - $htmls = new Form($db); - - $htmls->selectyesno("confirm","no"); - - print "
    '; - print "
    \n"; - } + print "Type$adh->type\n"; - /* - * Confirmation de la Résiliation - * - */ + print ''; + print nl2br($adh->commentaire).' '; - if ($action == 'resign') - { + print 'Personne'.$adh->getmorphylib().' '; - print '
    '; - print ''; - print ''; - - print ''; - - print '\n"; - print ''; - print '
    Résilier une adhésion
    Etes-vous sur de vouloir résilier cette adhésion ?'; - $htmls = new Form($db); - - $htmls->selectyesno("confirm","no"); - - print "
    '; - print "
    \n"; - } - - /* - * Confirmation de l'ajout dans glasnost - * - */ - - if ($action == 'add_glasnost') - { - - print '
    '; - print ''; - print ''; - - print ''; - - print '\n"; - print ''; - print '
    Valider un adhérent
    Etes-vous sur de vouloir ajouter cet adhérent dans glasnost ? (serveur : '.ADHERENT_GLASNOST_SERVEUR.')'; - $htmls = new Form($db); - - $htmls->selectyesno("confirm","no"); - - print "
    '; - print "
    \n"; - } - - /* - * Confirmation de la suppression dans glasnost - * - */ - - if ($action == 'del_glasnost') - { - - print '
    '; - print ''; - print ''; - - print ''; - - print '\n"; - print ''; - print '
    Valider un adhérent
    Etes-vous sur de vouloir effacer cet adhérent de glasnost ? (serveur : '.ADHERENT_GLASNOST_SERVEUR.')'; - $htmls = new Form($db); - - $htmls->selectyesno("confirm","no"); - - print "
    '; - print "
    \n"; - } - - /* - * Confirmation de l'ajout dans spip - * - */ - - if ($action == 'add_spip') - { - - print '
    '; - print ''; - print ''; - - print ''; - - print '\n"; - print ''; - print '
    Valider un adhérent
    Etes-vous sur de vouloir ajouter cet adhérent dans spip ? (serveur : '.ADHERENT_SPIP_SERVEUR.')'; - $htmls = new Form($db); - - $htmls->selectyesno("confirm","no"); - - print "
    '; - print "
    \n"; - } - - /* - * Confirmation de la suppression dans spip - * - */ - - if ($action == 'del_spip') - { - - print '
    '; - print ''; - print ''; - - print ''; - - print '\n"; - print ''; - print '
    Valider un adhérent
    Etes-vous sur de vouloir effacer cet adhérent de glasnost ? (serveur : '.ADHERENT_SPIP_SERVEUR.')'; - $htmls = new Form($db); - - $htmls->selectyesno("confirm","no"); - - print "
    '; - print "
    \n"; - } - - print "
    \n"; - print ''; - - print ''; - print ''; - - print "\n"; - - print ''; - - print ''; - - - - print ''; + print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - // print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + // print ''; + print ''; + print ''; + print ''; +} +print ' '; - // print "
    Numero'.$adh->id.' Commentaires
    Type$adh->type'; - print nl2br($adh->commentaire).' 
    Personne'.$adh->morphy.' 
    Prénom'.$adh->prenom.' 
    Prénom'.$adh->prenom.' 
    Nom'.$adh->nom.' 
    Société'.$adh->societe.' 
    Adresse'.nl2br($adh->adresse).' 
    CP Ville'.$adh->cp.' '.$adh->ville.' 
    Pays'.$adh->pays.' 
    Email'.$adh->email.' 
    Login'.$adh->login.' 
    Pass'.$adh->pass.' 
    Date de Naissance'.$adh->naiss.' 
    URL Photo'.$adh->photo.' 
    Public ?'; - if ($adh->public==1){ - print 'Yes'; - }else{ + print '
    Société'.$adh->societe.' 
    Adresse'.nl2br($adh->adresse).' 
    CP Ville'.$adh->cp.' '.$adh->ville.' 
    Pays'.$adh->pays.' 
    Email'.$adh->email.' 
    Login'.$adh->login.' 
    Pass'.$adh->pass.' 
    Date de Naissance'.$adh->naiss.' 
    URL Photo'.$adh->photo.' 
    Public ?'; + if ($adh->public==1){ + print 'Yes'; + }else{ print "No"; - } - print ' 
    \n"; - - // print ''; - // print ''; - foreach($adho->attribute_label as $key=>$value){ +foreach($adho->attribute_label as $key=>$value){ print "\n"; - } - print "
    Champs optionnels
    $value".$adh->array_options["options_$key"]." 
    \n"; +} - if ($user->admin) +print "\n"; + +print "\n"; + +/* + * Barre d'actions + * + */ +print '
    '; + +if ($user->admin) +{ + print "Editer"; + + if ($adh->statut < 1) { - - print "

    \n"; - - /* - * Case 1 - */ - - print ''; - - /* - * Case 2 - */ - - if ($adh->statut < 1) - { - print "\n"; - } - else - { - print "\n"; - } - /* - * Case 3 - */ - if ($adh->statut == 1) - { - print "\n"; - } - else - { - print "\n"; - } - - /* - * Case 4 - */ - - print "\n"; - - print "\n"; - - /* - * bouton : "Envoie des informations" - */ - print "\n"; - - print "\n"; - - if ($adht->vote == 'yes' && defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1){ - define("XMLRPC_DEBUG", 1); - - /* - * Case 1 & 2 - */ - /* retrait car bug inexplicable pour l'instant - if ($adh->is_in_glasnost() == 1){ - print "\n"; - print "\n"; - }else{ - print "\n"; - print "\n"; - } - */ - print "\n"; - print "\n"; - }else{ - /* - * Case 1 - */ - print "\n"; - - /* - * Case 2 - */ - print "\n"; - } - - if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1){ - /* - * Case 3 & 4 - */ - if ($adh->is_in_spip() == 1){ - print "\n"; - print "\n"; - }else{ - print "\n"; - print "\n"; - } - - }else{ - /* - * Case 3 - */ - print "\n"; - - /* - * Case 4 - */ - print "\n"; - } - - print "
    [Editer][Valider l'adhésion]-[Résilier l'adhésion]-[id&action=delete\">Supprimer]
    [id&action=sendinfo\">Envoyer sa fiche a l'adhérent]
    -[id&action=del_glasnost\">Suppression dans Glasnost][id&action=add_glasnost\">Ajout dans Glasnost]-[id&action=add_glasnost\">Ajout dans Glasnost][id&action=del_glasnost\">Suppression dans Glasnost]---[id&action=del_spip\">Suppression dans Spip][id&action=add_spip\">Ajout dans Spip]---

    \n"; + print "Valider l'adhésion\n"; } - /* - * Cotisations - * - * - */ + if ($adh->statut == 1) + { + print "Résilier l'adhésion\n"; + } - print ''; - - print ''; - if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0 && - defined("ADHERENT_BANK_USE_AUTO") && ADHERENT_BANK_USE_AUTO !=0){ + print "id&action=delete\">Supprimer\n"; + + /* + * bouton : "Envoie des informations" + */ + print "id&action=sendinfo\">Envoyer sa fiche a l'adhérent\n"; + + if ($adht->vote == 'yes' && defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1){ + define("XMLRPC_DEBUG", 1); + + if ($adh->is_in_glasnost() == 1){ + print "id&action=del_glasnost\">Suppression dans Glasnost\n"; + } + print "id&action=add_glasnost\">Ajout dans Glasnost\n"; + print "id&action=del_glasnost\">Suppression dans Glasnost\n"; + } + + if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1){ + if ($adh->is_in_spip() == 1){ + print "id&action=del_spip\">Suppression dans Spip\n"; + }else{ + print "id&action=add_spip\">Ajout dans Spip\n"; + } + +} +} + +print ''; +print "
    \n"; + + + +/* + * Bandeau des cotisations + * + */ + +print '
    '; + +print ''; +if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0 && +defined("ADHERENT_BANK_USE_AUTO") && ADHERENT_BANK_USE_AUTO !=0){ print '"; + print "\n"; + print ''; + print ""; + $i++; } - else + print "
    '; - }else{ - print ''; - } +}else{ +print ''; +} - /* - * - * Liste des cotisations - * - */ - $sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, c.cotisation, ".$db->pdate("c.dateadh")." as dateadh"; - $sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."cotisation as c"; - $sql .= " WHERE d.rowid = c.fk_adherent AND d.rowid=$rowid"; +/* + * + * Liste des cotisations + * + */ +$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, c.cotisation, ".$db->pdate("c.dateadh")." as dateadh"; +$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."cotisation as c"; +$sql .= " WHERE d.rowid = c.fk_adherent AND d.rowid=$rowid"; - $result = $db->query($sql); - if ($result) +$result = $db->query($sql); +if ($result) +{ + $num = $db->num_rows(); + $i = 0; + + print "\n"; + + print ''; + print "\n"; + print "\n"; + print "\n"; + + $var=True; + while ($i < $num) { - $num = $db->num_rows(); - $i = 0; - - print "
    Date cotisationsMontant
    \n"; - - print ''; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - - $var=True; - while ($i < $num) - { - $objp = $db->fetch_object( $i); - $var=!$var; - print ""; - print "\n"; - print ''; - print ""; - $i++; - } - print "
    CotisationsDateMontant
     ".strftime("%d %B %Y",$objp->dateadh)."'.price($objp->cotisation).'
    "; + $objp = $db->fetch_object( $i); + $var=!$var; + print "
    ".dolibarr_print_date($objp->dateadh)."'.price($objp->cotisation).'
    "; +} +else +{ + print $sql; + print $db->error(); +} + +print ''; + + + + +/* + * Ajout d'une nouvelle cotis + * + */ +if ($user->admin) +{ + print '

    '; + print ''; + print ''; + + print 'Fin adhésion'; + if ($adh->datefin < time()) { - print $sql; - print $db->error(); + print ''; + print dolibarr_print_date($adh->datefin)." ".img_warning(); } - - print ''; - - - - - /* - * Ajout d'une nouvelle cotis - * - * - */ - if ($user->admin) + else { - print ''; - print ''; - - print 'Fin adhésion'; - if ($adh->datefin < time()) - { - print ''; - } - else - { - print ''; - } - print strftime("%d %B %Y",$adh->datefin).' '; - - print ''; - - print 'Nouvelle adhésion'; - - print "Date de cotisation\n"; - if ($adh->datefin > 0) - { - print_date_select($adh->datefin + (3600*24)); - } - else - { - print_date_select(); - } - print ""; - print "Mode de paiement\n"; - - print ''; - // $paiement = new Paiement($db); - - //$paiement->select("modepaiement","crédit"); - print "\n"; - - if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0 && - defined("ADHERENT_BANK_USE_AUTO") && ADHERENT_BANK_USE_AUTO !=0){ - print "Numero de cheque\n"; - print ''; - print "\n"; - } - print 'Cotisation euros'; - if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0 && - defined("ADHERENT_BANK_USE_AUTO") && ADHERENT_BANK_USE_AUTO !=0){ - print 'Libelledatefin).'" >'; - } - print ''; - print "
    \n"; + print ''; + print dolibarr_print_date($adh->datefin); } + print ''; + print ''; + + print 'Nouvelle adhésion'; + + print "Date de cotisation\n"; + if ($adh->datefin > 0) + { + print_date_select($adh->datefin + (3600*24)); + } + else + { + print_date_select(); + } + print ""; + + + print "Mode de paiement\n"; + print_type_paiement_select($db,'operation'); + print "\n"; + + if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0 && + defined("ADHERENT_BANK_USE_AUTO") && ADHERENT_BANK_USE_AUTO !=0){ + print "Numero de cheque\n"; + print ''; + print "\n"; + } + print 'Cotisation euros'; + if (defined("ADHERENT_BANK_USE") && ADHERENT_BANK_USE !=0 && + defined("ADHERENT_BANK_USE_AUTO") && ADHERENT_BANK_USE_AUTO !=0){ + print 'Libelledatefin).'" >'; + } + print ''; + print "\n"; +} - print ''; +print ''; } diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 3458ec875ba..8312e004f29 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -23,6 +23,8 @@ */ require("./pre.inc.php"); +require("./adherent.class.php"); + llxHeader(); @@ -104,24 +106,27 @@ if ($result) $var=True; while ($i < $num) { - $objp = $db->fetch_object( $i); + $objp = $db->fetch_object($i); + + $adh=new Adherent($db); + $var=!$var; - print ""; + print ""; if ($objp->societe != ''){ - print "rowid&action=edit\">".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." / ".stripslashes($objp->societe)."\n"; + print "rowid&action=edit\">".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." / ".stripslashes($objp->societe)."\n"; }else{ - print "rowid&action=edit\">".stripslashes($objp->prenom)." ".stripslashes($objp->nom)."\n"; + print "rowid&action=edit\">".stripslashes($objp->prenom)." ".stripslashes($objp->nom)."\n"; } - print ""; + print ""; if ($objp->cotisation == 'yes') { if ($objp->datefin < time()) { - print "rowid&action=edit\">".strftime("%d %B %Y",$objp->datefin)." - Cotisation non recue\n"; + print dolibarr_print_date($objp->datefin)." - Cotisation non recue ".img_warning()."\n"; } else { - print "rowid&action=edit\">".strftime("%d %B %Y",$objp->datefin)."\n"; + print dolibarr_print_date($objp->datefin)."\n"; } } else @@ -131,7 +136,7 @@ if ($result) print "$objp->email\n"; print "$objp->type\n"; - print "$objp->morphy\n"; + print "".$adh->getmorphylib($objp->morphy)."\n"; print ""; if ($objp->statut == -1) @@ -148,7 +153,8 @@ if ($result) } print ""; - print "rowid\">".img_edit()."   rowid&action=resign\">Resilier   rowid&action=delete\">".img_delete()."\n"; + print "rowid&action=edit\">".img_edit()."   "; + print "rowid&action=resign\">".img_disable("Résilier")."   rowid&action=delete\">".img_delete()."\n"; print ""; $i++; }