2004-10-19 20:58:50 +02:00
< ? php
2004-07-30 12:13:11 +02:00
/* Copyright ( C ) 2001 - 2004 Rodolphe Quiedeville < rodolphe @ quiedeville . org >
2004-06-26 20:23:03 +02:00
* Copyright ( C ) 2002 - 2003 Jean - Louis Bergamo < jlb @ j1b . org >
2005-03-05 19:45:40 +01:00
* Copyright ( C ) 2004 - 2005 Laurent Destailleur < eldy @ users . sourceforge . net >
2003-01-15 01:03:47 +01:00
*
2002-12-28 19:12:22 +01:00
* 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
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
* Foundation , Inc . , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
*
* $Id $
* $Source $
*/
2004-08-14 14:37:59 +02:00
2005-03-05 19:45:40 +01:00
/**
\file htdocs / adherents / fiche . php
2004-08-14 14:37:59 +02:00
\ingroup adherent
2005-03-05 19:45:40 +01:00
\brief Page d 'ajout, edition, suppression d' une fiche adh<EFBFBD> rent
\version $Revision $
2004-08-14 14:37:59 +02:00
*/
2003-09-01 00:05:54 +02:00
require ( " ./pre.inc.php " );
2005-01-12 21:22:20 +01:00
require_once ( DOL_DOCUMENT_ROOT . " /adherents/adherent.class.php " );
require_once ( DOL_DOCUMENT_ROOT . " /adherents/adherent_type.class.php " );
require_once ( DOL_DOCUMENT_ROOT . " /adherents/adherent_options.class.php " );
require_once ( DOL_DOCUMENT_ROOT . " /compta/bank/account.class.php " );
2005-09-06 22:40:01 +02:00
require_once ( DOL_DOCUMENT_ROOT . " /lib/xmlrpc.php " );
2002-12-28 19:12:22 +01:00
2005-03-05 19:45:40 +01:00
$langs -> load ( " companies " );
$langs -> load ( " bills " );
$langs -> load ( " members " );
2005-04-16 15:32:33 +02:00
$langs -> load ( " users " );
2005-03-05 19:45:40 +01:00
2003-02-19 18:47:22 +01:00
$adho = new AdherentOptions ( $db );
2003-03-05 18:22:02 +01:00
$errmsg = '' ;
2002-12-28 19:12:22 +01:00
2004-07-17 01:35:53 +02:00
$action = isset ( $_GET [ " action " ]) ? $_GET [ " action " ] : $_POST [ " action " ];
2004-07-17 14:41:15 +02:00
$rowid = isset ( $_GET [ " rowid " ]) ? $_GET [ " rowid " ] : $_POST [ " rowid " ];
2004-07-17 01:35:53 +02:00
if ( $_POST [ " action " ] == 'sendinfo' )
2003-09-03 17:21:06 +02:00
{
2004-07-17 01:35:53 +02:00
$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 " );
2003-09-03 17:21:06 +02:00
}
2004-07-17 01:35:53 +02:00
if ( $_POST [ " action " ] == 'cotisation' )
2002-12-28 19:12:22 +01:00
{
2005-03-05 19:45:40 +01:00
$reday = $_POST [ " reday " ];
$remonth = $_POST [ " remonth " ];
$reyear = $_POST [ " reyear " ];
$cotisation = $_POST [ " cotisation " ];
2005-08-11 20:24:58 +02:00
if ( $cotisation > 0 )
2004-07-17 01:35:53 +02:00
{
2005-08-11 20:24:58 +02:00
$db -> begin ();
2005-08-15 03:06:20 +02:00
$adh = new Adherent ( $db );
$adh -> id = $rowid ;
$adh -> fetch ( $rowid );
// Rajout du nouveau cotisant dans les listes qui vont bien
2004-07-17 01:35:53 +02:00
// if (defined("ADHERENT_MAILMAN_LISTS_COTISANT") && ADHERENT_MAILMAN_LISTS_COTISANT!='' && $adh->datefin == "0000-00-00 00:00:00"){
2005-08-15 03:06:20 +02:00
if ( defined ( " ADHERENT_MAILMAN_LISTS_COTISANT " ) && ADHERENT_MAILMAN_LISTS_COTISANT != '' && $adh -> datefin == 0 )
{
2004-07-17 01:35:53 +02:00
$adh -> add_to_mailman ( ADHERENT_MAILMAN_LISTS_COTISANT );
}
2005-08-11 20:24:58 +02:00
2004-07-17 01:35:53 +02:00
$crowid = $adh -> cotisation ( mktime ( 12 , 0 , 0 , $remonth , $reday , $reyear ), $cotisation );
2005-08-15 03:06:20 +02:00
if ( $crowid > 0 )
2005-08-11 20:24:58 +02:00
{
2005-08-15 03:06:20 +02:00
// Insertion dans la gestion banquaire si configur<75> pour
if ( $conf -> global -> ADHERENT_BANK_USE )
2004-07-17 01:35:53 +02:00
{
2005-08-15 03:06:20 +02:00
$acct = new Account ( $db , $_POST [ " accountid " ]);
$dateop = strftime ( " %Y%m%d " , time ());
$amount = $cotisation ;
$insertid = $acct -> addline ( $dateop , $_POST [ " operation " ], $_POST [ " label " ], $amount , $_POST [ " num_chq " ], '' , $user );
if ( $insertid > 0 )
2004-07-17 01:35:53 +02:00
{
2005-08-15 03:06:20 +02:00
$inserturlid = $acct -> add_url_line ( $insertid , $adh -> id , DOL_URL_ROOT . '/adherents/fiche.php?rowid=' , $adh -> getFullname (), 'member' );
if ( $inserturlid > 0 )
{
// Met a jour la table cotisation
$sql = " UPDATE " . MAIN_DB_PREFIX . " cotisation SET fk_bank= " . $insertid . " WHERE rowid= " . $crowid ;
$resql = $db -> query ( $sql );
if ( $resql )
{
$db -> commit ();
//Header("Location: fiche.php");
}
else
{
$db -> rollback ();
dolibarr_print_error ( $db );
}
}
else
{
$db -> rollback ();
dolibarr_print_error ( $db , $acct -> error );
}
2004-07-17 01:35:53 +02:00
}
else
{
2005-08-11 20:24:58 +02:00
$db -> rollback ();
2005-08-15 03:06:20 +02:00
dolibarr_print_error ( $db , $acct -> error );
2004-07-17 01:35:53 +02:00
}
}
2005-08-15 03:06:20 +02:00
else
{
$db -> commit ();
}
2004-07-17 01:35:53 +02:00
}
2005-08-11 20:24:58 +02:00
else
{
2005-08-15 03:06:20 +02:00
$db -> rollback ();
dolibarr_print_error ( $db );
2005-08-11 20:24:58 +02:00
}
2005-08-15 03:06:20 +02:00
// Envoi mail
2005-08-11 20:24:58 +02:00
if ( defined ( " ADHERENT_MAIL_COTIS " ) && defined ( " ADHERENT_MAIL_COTIS_SUBJECT " )){
$adh -> send_an_email ( $adh -> email , ADHERENT_MAIL_COTIS , ADHERENT_MAIL_COTIS_SUBJECT );
}
2004-07-17 01:35:53 +02:00
}
2005-08-15 03:06:20 +02:00
else
{
$adh = new Adherent ( $db );
$adh -> id = $rowid ;
$adh -> fetch ( $rowid );
}
$mesg = '<div class="error">' . $langs -> trans ( " FieldRequired " , $langs -> trans ( " Amount " )) . '</div>' ;
2004-07-17 01:35:53 +02:00
$action = " edit " ;
2002-12-28 19:12:22 +01:00
}
2002-12-30 16:13:28 +01:00
2004-07-17 01:35:53 +02:00
if ( $_POST [ " action " ] == 'add' )
2002-12-28 19:12:22 +01:00
{
2004-07-17 01:35:53 +02:00
$type = $_POST [ " type " ];
2004-07-17 14:41:15 +02:00
$nom = $_POST [ " nom " ];
$prenom = $_POST [ " prenom " ];
$societe = $_POST [ " societe " ];
$adresse = $_POST [ " adresse " ];
$cp = $_POST [ " cp " ];
$ville = $_POST [ " ville " ];
2005-08-11 20:24:58 +02:00
$pays = $_POST [ " pays " ];
2004-07-17 14:41:15 +02:00
$email = $_POST [ " email " ];
$login = $_POST [ " login " ];
$pass = $_POST [ " pass " ];
$naiss = $_POST [ " naiss " ];
2005-08-11 20:24:58 +02:00
$photo = $_POST [ " photo " ];
$note = $_POST [ " note " ];
2004-07-17 14:41:15 +02:00
$comment = $_POST [ " comment " ];
$morphy = $_POST [ " morphy " ];
2005-03-05 19:45:40 +01:00
$reday = $_POST [ " reday " ];
$remonth = $_POST [ " remonth " ];
$reyear = $_POST [ " reyear " ];
$cotisation = $_POST [ " cotisation " ];
2004-07-17 14:41:15 +02:00
$adh = new Adherent ( $db );
$adh -> prenom = $prenom ;
$adh -> nom = $nom ;
$adh -> societe = $societe ;
$adh -> adresse = $adresse ;
$adh -> cp = $cp ;
$adh -> ville = $ville ;
2005-08-11 20:24:58 +02:00
$adh -> pays = $pays ;
2004-07-17 14:41:15 +02:00
$adh -> email = $email ;
$adh -> login = $login ;
$adh -> pass = $pass ;
$adh -> naiss = $naiss ;
$adh -> photo = $photo ;
$adh -> note = $note ;
$adh -> typeid = $type ;
$adh -> commentaire = $comment ;
$adh -> morphy = $morphy ;
foreach ( $_POST as $key => $value ){
if ( ereg ( " ^options_ " , $key )){
$adh -> array_options [ $key ] = $_POST [ $key ];
}
}
// Test validite des param<61> tres
2004-07-17 01:35:53 +02:00
if ( ! isset ( $type ) || $type == '' ){
2005-04-16 15:10:06 +02:00
$error ++ ;
$errmsg .= $langs -> trans ( " ErrorMemberTypeNotDefined " ) . " <br> \n " ;
2004-07-17 01:35:53 +02:00
}
2004-07-17 14:41:15 +02:00
// Test si le login existe deja
2004-07-17 01:35:53 +02:00
if ( ! isset ( $login ) || $login == '' ){
2005-04-16 15:10:06 +02:00
$error ++ ;
2005-03-05 19:45:40 +01:00
$errmsg .= $langs -> trans ( " ErrorFieldRequired " , $langs -> trans ( " Login " )) . " <br> \n " ;
2004-07-17 01:35:53 +02:00
}
2005-04-16 15:10:06 +02:00
else {
$sql = " SELECT login FROM " . MAIN_DB_PREFIX . " adherent WHERE login=' $login '; " ;
$result = $db -> query ( $sql );
if ( $result ) {
$num = $db -> num_rows ( $result );
}
if ( $num ) {
$error ++ ;
$errmsg .= $langs -> trans ( " ErrorLoginAlreadyExists " , $login ) . " <br> \n " ;
}
2005-03-05 19:45:40 +01:00
}
if ( ! isset ( $nom ) || $nom == '' ) {
2005-04-16 15:10:06 +02:00
$error ++ ;
2005-03-05 19:45:40 +01:00
$errmsg .= $langs -> trans ( " ErrorFieldRequired " , $langs -> trans ( " Lastname " )) . " <br> \n " ;
2004-07-17 01:35:53 +02:00
}
2005-03-05 19:45:40 +01:00
if ( ! isset ( $prenom ) || $prenom == '' ) {
2005-04-16 15:10:06 +02:00
$error ++ ;
2005-03-05 19:45:40 +01:00
$errmsg .= $langs -> trans ( " ErrorFieldRequired " , $langs -> trans ( " Firstname " )) . " <br> \n " ;
2004-07-17 01:35:53 +02:00
}
2005-12-07 23:56:57 +01:00
if ( $conf -> global -> ADHERENT_MAIL_REQUIRED && ! ValidEMail ( $email )) {
2005-04-16 15:10:06 +02:00
$error ++ ;
$errmsg .= $langs -> trans ( " ErrorBadEMail " , $email ) . " <br> \n " ;
2004-07-17 01:35:53 +02:00
}
2004-11-12 15:37:38 +01:00
if ( ! isset ( $pass ) || $pass == '' ) {
2005-04-16 15:10:06 +02:00
$error ++ ;
2005-03-05 19:45:40 +01:00
$errmsg .= $langs -> trans ( " ErrorFieldRequired " , $langs -> trans ( " Password " )) . " <br> \n " ;
2004-07-17 01:35:53 +02:00
}
if ( isset ( $naiss ) && $naiss != '' ){
2004-11-12 15:37:38 +01:00
if ( ! preg_match ( " /^ \ d \ d \ d \ d- \ d \ d- \ d \ d $ / " , $naiss )) {
2005-04-16 15:10:06 +02:00
$error ++ ;
$errmsg .= $langs -> trans ( " DateSubscription " ) . " ( " . $langs -> trans ( " DateFormatYYYYMMDD " ) . " )<br> \n " ;
2004-07-17 01:35:53 +02:00
}
}
2004-11-12 15:37:38 +01:00
if ( isset ( $public )) {
2004-07-17 01:35:53 +02:00
$public = 1 ;
2004-11-12 15:37:38 +01:00
} else {
2004-07-17 14:41:15 +02:00
$public = 0 ;
2004-07-17 01:35:53 +02:00
}
2004-09-25 13:02:10 +02:00
2005-08-11 20:24:58 +02:00
if ( ! $error )
{
2005-03-05 19:45:40 +01:00
// Email a peu pres correct et le login n'existe pas
if ( $adh -> create ( $user -> id ))
2004-07-17 01:35:53 +02:00
{
2005-03-05 19:45:40 +01:00
if ( $cotisation > 0 )
{
$crowid = $adh -> cotisation ( mktime ( 12 , 0 , 0 , $remonth , $reday , $reyear ), $cotisation );
// insertion dans la gestion banquaire si configure pour
2005-08-11 20:24:58 +02:00
if ( defined ( " ADHERENT_BANK_USE " ) && ADHERENT_BANK_USE )
{
2005-03-05 19:45:40 +01:00
$dateop = strftime ( " %Y%m%d " , time ());
$amount = $cotisation ;
2005-08-11 20:24:58 +02:00
$acct = new Account ( $db , $_POST [ " accountid " ]);
$insertid = $acct -> addline ( $dateop , $_POST [ " operation " ], $_POST [ " label " ], $amount , $_POST [ " num_chq " ], '' , $user );
2005-03-05 19:45:40 +01:00
if ( $insertid == '' )
2004-07-17 01:35:53 +02:00
{
2005-03-05 19:45:40 +01:00
dolibarr_print_error ( $db );
2004-07-17 01:35:53 +02:00
}
else
{
2005-03-05 19:45:40 +01:00
// 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: fiche.php");
}
else
{
dolibarr_print_error ( $db );
}
2004-07-17 01:35:53 +02:00
}
}
}
2005-03-05 19:45:40 +01:00
Header ( " Location: liste.php?statut=-1 " );
}
else {
dolibarr_print_error ( $db );
2004-07-17 01:35:53 +02:00
}
}
2004-09-25 13:02:10 +02:00
else {
2005-03-05 19:45:40 +01:00
$action = 'create' ;
2004-09-25 13:02:10 +02:00
}
2004-07-17 01:35:53 +02:00
}
2002-12-30 16:13:28 +01:00
2005-03-05 19:45:40 +01:00
if ( $_POST [ " action " ] == 'confirm_delete' && $_POST [ " confirm " ] == 'yes' )
2002-12-28 19:12:22 +01:00
{
2004-07-17 01:35:53 +02:00
$adh = new Adherent ( $db );
$adh -> delete ( $rowid );
Header ( " Location: liste.php " );
2002-12-28 19:12:22 +01:00
}
2004-07-17 14:41:15 +02:00
2005-03-05 19:45:40 +01:00
if ( $_POST [ " action " ] == 'confirm_valid' && $_POST [ " confirm " ] == 'yes' )
2002-12-30 17:29:21 +01:00
{
2004-07-17 01:35:53 +02:00
$adh = new Adherent ( $db , $rowid );
$adh -> validate ( $user -> id );
$adh -> fetch ( $rowid );
2003-03-04 16:23:13 +01:00
2004-07-17 01:35:53 +02:00
$adht = new AdherentType ( $db );
$adht -> fetch ( $adh -> typeid );
2003-03-04 16:23:13 +01:00
2004-07-17 01:35:53 +02:00
if ( isset ( $adht -> mail_valid ) && $adht -> mail_valid != '' )
2003-03-04 16:23:13 +01:00
{
2004-07-17 01:35:53 +02:00
$adh -> send_an_email ( $adh -> email , $adht -> mail_valid , $conf -> adherent -> email_valid_subject );
2003-03-04 16:23:13 +01:00
}
2004-07-17 01:35:53 +02:00
else
2003-03-04 16:23:13 +01:00
{
2004-07-17 01:35:53 +02:00
$adh -> send_an_email ( $adh -> email , $conf -> adherent -> email_valid , $conf -> adherent -> email_valid_subject );
2003-03-04 16:23:13 +01:00
}
2004-07-17 01:35:53 +02:00
// rajoute l'utilisateur dans les divers abonnements ..
if ( ! $adh -> add_to_abo ( $adht ))
2003-03-05 18:22:02 +01:00
{
2004-07-17 01:35:53 +02:00
// error
$errmsg .= " echec du rajout de l'utilisateur aux abonnements: " . $adh -> errostr . " <BR> \n " ;
2003-03-05 18:22:02 +01:00
}
2004-07-17 01:35:53 +02:00
2002-12-30 17:29:21 +01:00
}
2005-03-05 19:45:40 +01:00
if ( $_POST [ " action " ] == 'confirm_resign' && $_POST [ " confirm " ] == 'yes' )
2002-12-30 22:07:11 +01:00
{
2004-07-17 01:35:53 +02:00
$adh = new Adherent ( $db , $rowid );
$adh -> resiliate ( $user -> id );
$adh -> fetch ( $rowid );
2003-03-04 16:23:13 +01:00
2004-07-17 01:35:53 +02:00
$adht = new AdherentType ( $db );
$adht -> fetch ( $adh -> typeid );
2003-03-07 19:53:17 +01:00
2004-07-17 01:35:53 +02:00
$adh -> send_an_email ( $adh -> email , $conf -> adherent -> email_resil , $conf -> adherent -> email_resil_subject );
2003-03-04 16:23:13 +01:00
2004-07-17 01:35:53 +02:00
// supprime l'utilisateur des divers abonnements ..
if ( ! $adh -> del_to_abo ( $adht ))
2003-03-05 18:22:02 +01:00
{
2004-07-17 01:35:53 +02:00
// error
$errmsg .= " echec de la suppression de l'utilisateur aux abonnements: " . $adh -> errostr . " <BR> \n " ;
2003-03-05 18:22:02 +01:00
}
2002-12-30 22:07:11 +01:00
}
2005-03-05 19:45:40 +01:00
if ( $_POST [ " action " ] == 'confirm_add_glasnost' && $_POST [ " confirm " ] == 'yes' )
2003-03-06 20:33:23 +01:00
{
2004-07-17 01:35:53 +02:00
$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 . " <BR> \n " ;
}
2005-04-15 20:52:18 +02:00
XMLRPC_debug_print ();
2004-07-17 01:35:53 +02:00
}
2003-03-06 20:33:23 +01:00
}
2005-03-05 19:45:40 +01:00
if ( $_POST [ " action " ] == 'confirm_del_glasnost' && $_POST [ " confirm " ] == 'yes' )
2003-03-06 20:33:23 +01:00
{
2004-07-17 01:35:53 +02:00
$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 . " <BR> \n " ;
}
2005-04-15 20:52:18 +02:00
XMLRPC_debug_print ();
2004-07-17 01:35:53 +02:00
}
2003-03-06 20:33:23 +01:00
}
2003-03-07 19:53:17 +01:00
2005-03-05 19:45:40 +01:00
if ( $_POST [ " action " ] == 'confirm_del_spip' && $_POST [ " confirm " ] == 'yes' )
2003-03-07 19:53:17 +01:00
{
2004-07-17 01:35:53 +02:00
$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 . " <BR> \n " ;
}
2003-03-07 19:53:17 +01:00
}
2005-03-05 19:45:40 +01:00
if ( $_POST [ " action " ] == 'confirm_add_spip' && $_POST [ " confirm " ] == 'yes' )
2003-03-07 19:53:17 +01:00
{
2004-07-17 01:35:53 +02:00
$adh = new Adherent ( $db , $rowid );
$adh -> fetch ( $rowid );
if ( ! $adh -> add_to_spip ()){
$errmsg .= " Echec du rajout de l'utilisateur dans spip: " . $adh -> errostr . " <BR> \n " ;
}
2003-03-07 19:53:17 +01:00
}
2005-04-16 15:10:06 +02:00
llxHeader ();
2002-12-28 19:12:22 +01:00
/* ************************************************************************** */
/* */
2002-12-30 16:13:28 +01:00
/* Cr<43> ation d'une fiche */
2002-12-28 19:12:22 +01:00
/* */
/* ************************************************************************** */
2003-08-12 19:36:17 +02:00
if ( $errmsg != '' )
{
2004-11-12 15:37:38 +01:00
print '<table class="border" width="100%">' ;
2004-07-17 01:35:53 +02:00
print " <tr><td class= \" error \" ><b> $errmsg </b></td></tr> \n " ;
2005-03-05 19:45:40 +01:00
print '</table><br>' ;
2003-03-05 18:22:02 +01:00
}
2002-12-28 19:12:22 +01:00
2003-02-19 18:47:22 +01:00
// fetch optionals attributes and labels
$adho -> fetch_optionals ();
2005-03-05 19:45:40 +01:00
2005-04-16 15:10:06 +02:00
if ( $action == 'create' )
{
2002-12-28 19:12:22 +01:00
2004-11-12 15:37:38 +01:00
print_titre ( $langs -> trans ( " NewMember " ));
2004-07-30 12:13:11 +02:00
print " <form action= \" fiche.php \" method= \" post \" > \n " ;
2004-11-12 15:37:38 +01:00
print '<table class="border" width="100%">' ;
2004-07-17 01:35:53 +02:00
print '<input type="hidden" name="action" value="add">' ;
$htmls = new Form ( $db );
$adht = new AdherentType ( $db );
2005-04-16 15:10:06 +02:00
print '<tr><td width="15%">' . $langs -> trans ( " MemberType " ) . '</td><td width="35%">' ;
$listetype = $adht -> liste_array ();
if ( sizeof ( $listetype )) {
$htmls -> select_array ( " type " , $listetype );
} else {
print '<font class="error">' . $langs -> trans ( " NoTypeDefinedGoToSetup " ) . '</font>' ;
}
2004-07-17 01:35:53 +02:00
print " </td> \n " ;
2004-08-29 21:03:50 +02:00
print '<td width="50%" valign="top">' . $langs -> trans ( " Comments " ) . ' :</td></tr>' ;
2004-07-17 01:35:53 +02:00
$morphys [ " phy " ] = " Physique " ;
$morphys [ " mor " ] = " Morale " ;
2005-04-16 15:10:06 +02:00
print " <tr><td> " . $langs -> trans ( " Person " ) . " </td><td> \n " ;
2004-07-17 01:35:53 +02:00
$htmls -> select_array ( " morphy " , $morphys );
print " </td> \n " ;
2005-08-11 20:24:58 +02:00
print '<td valign="top" rowspan="12"><textarea name="comment" wrap="soft" cols="40" rows="16"></textarea></td></tr>' ;
print '<tr><td>' . $langs -> trans ( " Firstname " ) . '*</td><td><input type="text" name="prenom" size="40" value="' . $adh -> prenom . '"></td></tr>' ;
print '<tr><td>' . $langs -> trans ( " Lastname " ) . '*</td><td><input type="text" name="nom" value="' . $adh -> nom . '" size="40"></td></tr>' ;
print '<tr><td>' . $langs -> trans ( " Company " ) . '</td><td><input type="text" name="societe" size="40" value="' . $adh -> societe . '"></td></tr>' ;
print '<tr><td valign="top">' . $langs -> trans ( " Address " ) . '</td><td>' ;
print '<textarea name="adresse" wrap="soft" cols="40" rows="2"></textarea></td></tr>' ;
print '<tr><td>' . $langs -> trans ( " Zip " ) . ' / ' . $langs -> trans ( " Town " ) . '</td><td><input type="text" name="cp" size="8"> <input type="text" name="ville" size="40" value="' . $adh -> ville . '"></td></tr>' ;
print '<tr><td>' . $langs -> trans ( " Country " ) . '</td><td>' ;
2005-12-07 23:56:57 +01:00
$htmls -> select_pays ( $adh -> pays ? $adh -> pays : $mysoc -> pays , 'pays' );
2005-08-11 20:24:58 +02:00
print '</td></tr>' ;
2005-12-07 23:56:57 +01:00
print '<tr><td>' . $langs -> trans ( " EMail " ) . ( $conf -> global -> ADHERENT_MAIL_REQUIRED ? '*' : '' ) . '</td><td><input type="text" name="email" size="40" value="' . $adh -> email . '"></td></tr>' ;
2005-08-11 20:24:58 +02:00
print '<tr><td>' . $langs -> trans ( " Login " ) . '*</td><td><input type="text" name="login" size="40" value="' . $adh -> login . '"></td></tr>' ;
print '<tr><td>' . $langs -> trans ( " Password " ) . '*</td><td><input type="password" name="pass" size="40" value="' . $adh -> password . '"></td></tr>' ;
print '<tr><td>' . $langs -> trans ( " Birthday " ) . '</td><td><input type="text" name="naiss" size="10"> (' . $langs -> trans ( " DateFormatYYYYMMDD " ) . ')</td></tr>' ;
2004-07-17 01:35:53 +02:00
print '<tr><td>Url photo</td><td><input type="text" name="photo" size="40"></td></tr>' ;
foreach ( $adho -> attribute_label as $key => $value ){
print " <tr><td> $value </td><td><input type= \" text \" name= \" options_ $key\ " size = \ " 40 \" ></td></tr> \n " ;
}
2005-08-11 20:24:58 +02:00
print " </table> \n " ;
print '<br>' ;
2004-07-17 01:35:53 +02:00
2005-08-11 20:24:58 +02:00
// Boite cotisations
print '<table class="border" width="100%">' ;
2005-04-16 15:10:06 +02:00
print " <tr><td> " . $langs -> trans ( " DateSubscription " ) . " </td><td> \n " ;
2005-03-28 15:52:40 +02:00
$htmls -> select_date ();
2004-07-17 01:35:53 +02:00
print " </td></tr> \n " ;
2005-08-11 20:24:58 +02:00
if ( defined ( " ADHERENT_BANK_USE " ) && ADHERENT_BANK_USE )
{
print '<tr><td>' . $langs -> trans ( " PaymentMode " ) . '</td><td>' ;
$htmls -> select_types_paiements ( '' , 'operation' );
print " </td></tr> \n " ;
2004-07-17 01:35:53 +02:00
2005-08-11 20:24:58 +02:00
print '<tr><td>' . $langs -> trans ( " FinancialAccount " ) . '</td><td>' ;
$htmls -> select_comptes ( '' , 'accountid' );
print " </td></tr> \n " ;
2005-04-16 15:10:06 +02:00
2005-08-11 20:24:58 +02:00
print '<tr><td>' . $langs -> trans ( " Numero " ) . '</td><td>' ;
2004-07-17 01:35:53 +02:00
print '<input name="num_chq" type="text" size="6">' ;
print " </td></tr> \n " ;
2005-04-16 15:10:06 +02:00
2005-08-11 20:24:58 +02:00
print '<tr><td>' . $langs -> trans ( " Label " ) . '</td><td><input name="label" type="text" size="50" value="' . $langs -> trans ( " Subscription " ) . ' " ></td></tr>' ;
2004-07-17 01:35:53 +02:00
}
2005-08-11 20:24:58 +02:00
print '<tr><td>' . $langs -> trans ( " Subscription " ) . '</td><td><input type="text" name="cotisation" size="6"> ' . $langs -> trans ( " Currency " . $conf -> monnaie ) . '</td></tr>' ;
2005-04-16 15:10:06 +02:00
2004-07-17 01:35:53 +02:00
print " </table> \n " ;
2005-08-11 20:24:58 +02:00
print '<br>' ;
2005-09-06 22:58:14 +02:00
print '<center><input type="submit" class="button" value="' . $langs -> trans ( " AddMember " ) . '"></center>' ;
2004-07-17 01:35:53 +02:00
2005-08-11 20:24:58 +02:00
print " </form> \n " ;
2004-07-17 01:35:53 +02:00
}
2005-03-05 19:45:40 +01:00
2005-04-16 15:10:06 +02:00
2002-12-28 19:12:22 +01:00
/* ************************************************************************** */
/* */
2002-12-30 16:13:28 +01:00
/* Edition de la fiche */
2002-12-28 19:12:22 +01:00
/* */
/* ************************************************************************** */
2005-03-05 19:45:40 +01:00
if ( $rowid )
2002-12-28 19:12:22 +01:00
{
2004-07-17 01:35:53 +02:00
$adh = new Adherent ( $db );
$adh -> id = $rowid ;
$adh -> fetch ( $rowid );
$adh -> fetch_optionals ( $rowid );
2002-12-28 19:12:22 +01:00
2004-07-17 01:35:53 +02:00
$adht = new AdherentType ( $db );
$adht -> fetch ( $adh -> typeid );
2002-12-28 19:12:22 +01:00
2004-07-17 01:35:53 +02:00
$html = new Form ( $db );
2002-12-28 19:12:22 +01:00
2004-07-17 01:35:53 +02:00
/*
2005-08-11 20:24:58 +02:00
* Affichage onglets
*/
2004-07-17 01:35:53 +02:00
$h = 0 ;
2003-01-10 16:18:06 +01:00
2004-07-17 01:35:53 +02:00
$head [ $h ][ 0 ] = DOL_URL_ROOT . '/adherents/fiche.php?rowid=' . $rowid ;
2005-08-11 20:24:58 +02:00
$head [ $h ][ 1 ] = $langs -> trans ( " MemberCard " );
2004-07-17 01:35:53 +02:00
$hselected = $h ;
$h ++ ;
2003-01-10 16:18:06 +01:00
2005-03-05 19:45:40 +01:00
dolibarr_fiche_head ( $head , $hselected , $adh -> fullname );
2003-01-10 16:18:06 +01:00
2004-07-17 01:35:53 +02:00
/*
* Confirmation de la suppression de l ' adh<EFBFBD> rent
*/
if ( $action == 'delete' )
2003-01-10 16:18:06 +01:00
{
2005-08-11 20:24:58 +02:00
$html -> form_confirm ( " fiche.php?rowid= $rowid " , $langs -> trans ( " ResiliateMember " ), $langs -> trans ( " ConfirmResiliateMember " ), " confirm_delete " );
print '<br>' ;
2004-07-17 01:35:53 +02:00
}
2003-01-10 16:18:06 +01:00
2004-07-17 01:35:53 +02:00
/*
* Confirmation de la validation
*/
if ( $action == 'valid' )
2003-03-06 20:33:23 +01:00
{
2005-08-11 20:24:58 +02:00
$html -> form_confirm ( " fiche.php?rowid= $rowid " , $langs -> trans ( " ValidateMember " ), $langs -> trans ( " ConfirmValidateMember " ), " confirm_valid " );
print '<br>' ;
2004-07-17 01:35:53 +02:00
}
2003-03-06 20:33:23 +01:00
2004-07-17 01:35:53 +02:00
/*
* Confirmation de la R<EFBFBD> siliation
*/
if ( $action == 'resign' )
2003-03-06 20:33:23 +01:00
{
2005-08-11 20:24:58 +02:00
$html -> form_confirm ( " fiche.php?rowid= $rowid " , $langs -> trans ( " ResiliateMember " ), $langs -> trans ( " ConfirmResiliateMember " ), " confirm_resign " );
print '<br>' ;
2004-07-17 01:35:53 +02:00
}
2003-03-06 20:33:23 +01:00
2004-07-17 01:35:53 +02:00
/*
* Confirmation de l ' ajout dans glasnost
*/
if ( $action == 'add_glasnost' )
2003-03-07 19:53:17 +01:00
{
2004-07-30 12:13:11 +02:00
$html -> form_confirm ( " fiche.php?rowid= $rowid " , " Ajouter dans glasnost " , " Etes-vous sur de vouloir ajouter cet adh<64> rent dans glasnost ? (serveur : " . ADHERENT_GLASNOST_SERVEUR . " ) " , " confirm_add_glasnost " );
2005-08-11 20:24:58 +02:00
print '<br>' ;
2004-07-17 01:35:53 +02:00
}
2003-03-07 19:53:17 +01:00
2004-07-17 01:35:53 +02:00
/*
* Confirmation de la suppression dans glasnost
*/
if ( $action == 'del_glasnost' )
2003-03-07 19:53:17 +01:00
{
2004-07-30 12:13:11 +02:00
$html -> form_confirm ( " fiche.php?rowid= $rowid " , " Supprimer dans glasnost " , " Etes-vous sur de vouloir effacer cet adh<64> rent dans glasnost ? (serveur : " . ADHERENT_GLASNOST_SERVEUR . " ) " , " confirm_del_glasnost " );
2005-08-11 20:24:58 +02:00
print '<br>' ;
2004-07-17 01:35:53 +02:00
}
2003-03-07 19:53:17 +01:00
2004-07-17 01:35:53 +02:00
/*
* Confirmation de l ' ajout dans spip
*/
if ( $action == 'add_spip' )
{
2004-07-30 12:13:11 +02:00
$html -> form_confirm ( " fiche.php?rowid= $rowid " , " Ajouter dans spip " , " Etes-vous sur de vouloir ajouter cet adh<64> rent dans spip ? (serveur : " . ADHERENT_SPIP_SERVEUR . " ) " , " confirm_add_spip " );
2005-08-11 20:24:58 +02:00
print '<br>' ;
2003-03-06 20:33:23 +01:00
}
2002-12-28 19:12:22 +01:00
2004-07-17 01:35:53 +02:00
/*
* Confirmation de la suppression dans spip
*/
if ( $action == 'del_spip' )
{
2004-07-30 12:13:11 +02:00
$html -> form_confirm ( " fiche.php?rowid= $rowid " , " Supprimer dans spip " , " Etes-vous sur de vouloir effacer cet adh<64> rent dans spip ? (serveur : " . ADHERENT_SPIP_SERVEUR . " ) " , " confirm_del_spip " );
$html -> form_confirm ( " fiche.php?rowid= $rowid " , " Ajouter dans glasnost " , " Etes-vous sur de vouloir ajouter cet adh<64> rent dans glasnost ? (serveur : " . ADHERENT_GLASNOST_SERVEUR . " ) " , " confirm_del_spip " );
2005-08-11 20:24:58 +02:00
print '<br>' ;
2004-07-17 01:35:53 +02:00
}
2002-12-30 17:29:21 +01:00
2002-12-28 19:12:22 +01:00
2004-09-25 13:02:10 +02:00
print '<table class="border" width="100%">' ;
2005-03-05 19:45:40 +01:00
print '<form action="fiche.php" method="post">' ;
2002-12-30 17:29:21 +01:00
2004-11-12 15:37:38 +01:00
print '<tr><td>' . $langs -> trans ( " Ref " ) . '</td><td class="valeur">' . $adh -> id . ' </td>' ;
2004-08-29 21:03:50 +02:00
print '<td valign="top" width="50%">' . $langs -> trans ( " Comments " ) . '</tr>' ;
2003-01-10 16:18:06 +01:00
2004-11-12 15:37:38 +01:00
print '<tr><td>' . $langs -> trans ( " Type " ) . '*</td><td class="valeur">' . $adh -> type . " </td> \n " ;
2003-03-07 19:53:17 +01:00
2005-03-05 19:45:40 +01:00
print '<td rowspan="' . ( 14 + count ( $adh -> array_options )) . '" valign="top" width="50%">' ;
2004-07-17 01:35:53 +02:00
print nl2br ( $adh -> commentaire ) . ' </td></tr>' ;
2003-03-07 19:53:17 +01:00
2005-08-11 20:24:58 +02:00
print '<tr><td>' . $langs -> trans ( " Person " ) . '</td><td class="valeur">' . $adh -> getmorphylib () . ' </td></tr>' ;
2003-03-07 19:53:17 +01:00
2004-11-12 15:37:38 +01:00
print '<tr><td width="15%">' . $langs -> trans ( " Firstname " ) . '*</td><td class="valeur" width="35%">' . $adh -> prenom . ' </td></tr>' ;
2003-01-10 16:18:06 +01:00
2004-12-10 20:57:46 +01:00
print '<tr><td>' . $langs -> trans ( " Lastname " ) . '*</td><td class="valeur">' . $adh -> nom . ' </td></tr>' ;
2002-12-30 17:29:21 +01:00
2004-09-25 13:02:10 +02:00
print '<tr><td>' . $langs -> trans ( " Company " ) . '</td><td class="valeur">' . $adh -> societe . ' </td></tr>' ;
print '<tr><td>' . $langs -> trans ( " Address " ) . '</td><td class="valeur">' . nl2br ( $adh -> adresse ) . ' </td></tr>' ;
print '<tr><td>' . $langs -> trans ( " Zip " ) . ' / ' . $langs -> trans ( " Town " ) . '</td><td class="valeur">' . $adh -> cp . ' ' . $adh -> ville . ' </td></tr>' ;
2005-08-11 20:24:58 +02:00
print '<tr><td>' . $langs -> trans ( " Country " ) . '</td><td class="valeur">' . $adh -> pays . '</td></tr>' ;
2004-11-12 15:37:38 +01:00
print '<tr><td>' . $langs -> trans ( " EMail " ) . ( ADHERENT_MAIL_REQUIRED && ADHERENT_MAIL_REQUIRED == 1 ? '*' : '' ) . '</td><td class="valeur">' . $adh -> email . ' </td></tr>' ;
print '<tr><td>' . $langs -> trans ( " Login " ) . '*</td><td class="valeur">' . $adh -> login . ' </td></tr>' ;
2004-07-17 01:35:53 +02:00
// print '<tr><td>Pass</td><td class="valeur">'.$adh->pass.' </td></tr>';
2004-11-12 15:37:38 +01:00
print '<tr><td>' . $langs -> trans ( " Birthday " ) . '</td><td class="valeur">' . $adh -> naiss . ' </td></tr>' ;
2004-07-17 01:35:53 +02:00
print '<tr><td>URL Photo</td><td class="valeur">' . $adh -> photo . ' </td></tr>' ;
2005-03-05 19:45:40 +01:00
print '<tr><td>' . $langs -> trans ( " Public " ) . '</td><td class="valeur">' ;
if ( $adh -> public == 1 ) print $langs -> trans ( " Yes " );
else print $langs -> trans ( " No " );
print '</td></tr>' ;
print '<tr><td>' . $langs -> trans ( " Status " ) . '</td><td class="valeur">' . $adh -> getLibStatut ( $adh ) . '</td></tr>' ;
foreach ( $adho -> attribute_label as $key => $value ){
print " <tr><td> $value </td><td> " . $adh -> array_options [ " options_ $key " ] . " </td></tr> \n " ;
2004-11-12 15:37:38 +01:00
}
2005-03-05 19:45:40 +01:00
print '</form>' ;
print " </table> \n " ;
print " </div> \n " ;
2004-07-17 01:35:53 +02:00
2005-03-05 19:45:40 +01:00
/*
* Barre d ' actions
*
*/
print '<div class="tabsAction">' ;
2005-08-11 20:24:58 +02:00
print " <a class= \" butAction \" href= \" edit.php?rowid= $rowid\ " > " . $langs->trans ( " Edit " ). " </ a > " ;
2005-03-05 19:45:40 +01:00
// Valider
if ( $adh -> statut < 1 )
2004-11-12 15:37:38 +01:00
{
2005-08-11 20:24:58 +02:00
print " <a class= \" butAction \" href= \" fiche.php?rowid= $rowid &action=valid \" > " . $langs -> trans ( " Validate " ) . " </a> \n " ;
2004-11-12 15:37:38 +01:00
}
2005-03-05 19:45:40 +01:00
// Envoi fiche par mail
2005-08-11 20:24:58 +02:00
print " <a class= \" butAction \" href= \" fiche.php?rowid= $adh->id &action=sendinfo \" > " . $langs -> trans ( " SendCardByMail " ) . " </a> \n " ;
2005-03-05 19:45:40 +01:00
// R<> silier
if ( $adh -> statut == 1 )
2004-11-12 15:37:38 +01:00
{
2005-08-11 20:24:58 +02:00
print " <a class= \" butAction \" href= \" fiche.php?rowid= $rowid &action=resign \" > " . $langs -> trans ( " Resiliate " ) . " </a> \n " ;
2004-07-17 01:35:53 +02:00
}
2005-03-05 19:45:40 +01:00
// Supprimer
if ( $user -> admin ) {
2005-08-11 20:24:58 +02:00
print " <a class= \" butActionDelete \" href= \" fiche.php?rowid= $adh->id &action=delete \" > " . $langs -> trans ( " Delete " ) . " </a> \n " ;
2004-11-12 15:37:38 +01:00
}
2005-03-05 19:45:40 +01:00
// Action Glasnost
if ( $adht -> vote == 'yes' && defined ( " ADHERENT_USE_GLASNOST " ) && ADHERENT_USE_GLASNOST == 1 )
2004-07-17 01:35:53 +02:00
{
2005-03-05 19:45:40 +01:00
define ( " XMLRPC_DEBUG " , 1 );
$isinglasnost = $adh -> is_in_glasnost ();
if ( $isinglasnost == 1 )
{
print " <a class= \" tabAction \" href= \" fiche.php?rowid= $adh->id &action=del_glasnost \" >Suppression dans Glasnost</a> \n " ;
}
if ( $isinglasnost == 0 ) {
print " <a class= \" tabAction \" href= \" fiche.php?rowid= $adh->id &action=add_glasnost \" >Ajout dans Glasnost</a> \n " ;
}
if ( $isinglasnost == - 1 ) {
print '<br><font class="error">Failed to connect to SPIP: ' . $adh -> errorstr . '</font>' ;
}
2004-07-17 01:35:53 +02:00
}
2005-03-05 19:45:40 +01:00
// Action SPIP
if ( defined ( " ADHERENT_USE_SPIP " ) && ADHERENT_USE_SPIP == 1 )
2002-12-30 17:29:21 +01:00
{
2005-03-05 19:45:40 +01:00
$isinspip = $adh -> is_in_spip ();
if ( $isinspip == 1 )
{
print " <a class= \" tabAction \" href= \" fiche.php?rowid= $adh->id &action=del_spip \" >Suppression dans Spip</a> \n " ;
}
if ( $isinspip == 0 )
{
print " <a class= \" tabAction \" href= \" fiche.php?rowid= $adh->id &action=add_spip \" >Ajout dans Spip</a> \n " ;
}
if ( $isinspip == - 1 ) {
print '<br><font class="error">Failed to connect to SPIP: ' . $adh -> errorstr . '</font>' ;
}
2004-07-17 01:35:53 +02:00
}
2005-03-05 19:45:40 +01:00
print '</div>' ;
print " <br> \n " ;
/*
* Bandeau des cotisations
*
*/
print '<table border=0 width="100%">' ;
print '<tr>' ;
print '<td valign="top">' ;
/*
* 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 )
2004-07-17 01:35:53 +02:00
{
2005-03-05 19:45:40 +01:00
$num = $db -> num_rows ();
$i = 0 ;
print " <table class= \" noborder \" width= \" 100% \" > \n " ;
print '<tr class="liste_titre">' ;
2005-08-11 20:24:58 +02:00
print '<td>' . $langs -> trans ( " DateSubscription " ) . '</td>' ;
2005-03-05 19:45:40 +01:00
print " <td align= \" right \" > " . $langs -> trans ( " Amount " ) . " </td> \n " ;
print " </tr> \n " ;
$var = True ;
while ( $i < $num )
{
$objp = $db -> fetch_object ( $result );
$var =! $var ;
print " <tr $bc[$var] > " ;
print " <td> " . dolibarr_print_date ( $objp -> dateadh ) . " </td> \n " ;
print '<td align="right">' . price ( $objp -> cotisation ) . '</td>' ;
print " </tr> " ;
$i ++ ;
}
print " </table> " ;
2004-07-17 01:35:53 +02:00
}
else
{
2005-03-05 19:45:40 +01:00
dolibarr_print_error ( $db );
2004-07-17 01:35:53 +02:00
}
2005-03-05 19:45:40 +01:00
print '</td><td>' ;
2004-07-17 01:35:53 +02:00
2005-03-05 19:45:40 +01:00
/*
* Ajout d ' une nouvelle cotisation
*/
2005-08-11 20:24:58 +02:00
if ( $user -> rights -> adherent -> cotisation -> creer )
2005-03-05 19:45:40 +01:00
{
print " <table class= \" border \" width= \" 100% \" > \n " ;
print '<form method="post" action="fiche.php">' ;
print '<input type="hidden" name="action" value="cotisation">' ;
print '<input type="hidden" name="rowid" value="' . $rowid . '">' ;
print '<tr><td width="15%">' . $langs -> trans ( " SubscriptionEndDate " ) . '</td>' ;
2005-08-11 20:24:58 +02:00
print '<td width="35%">' ;
if ( $adh -> datefin )
2005-03-05 19:45:40 +01:00
{
2005-08-11 20:24:58 +02:00
if ( $adh -> datefin < time ())
{
print dolibarr_print_date ( $adh -> datefin ) . " " . img_warning ( $langs -> trans ( " Late " ));
}
else
{
print dolibarr_print_date ( $adh -> datefin );
}
2005-03-05 19:45:40 +01:00
}
else
{
2005-08-11 20:24:58 +02:00
print $langs -> trans ( " SubscriptionNotReceived " ) . " " . img_warning ( $langs -> trans ( " Late " ));
2005-03-05 19:45:40 +01:00
}
print '</td>' ;
print '</tr>' ;
2005-08-11 20:24:58 +02:00
print '<tr><td colspan="2"><b>' . $langs -> trans ( " NewCotisation " ) . '</b></td></tr>' ;
2005-03-05 19:45:40 +01:00
2005-08-11 20:24:58 +02:00
print '<tr><td>' . $langs -> trans ( " DateSubscription " ) . '</td><td>' ;
2005-03-05 19:45:40 +01:00
if ( $adh -> datefin > 0 )
{
2005-03-28 15:52:40 +02:00
$html -> select_date ( $adh -> datefin + ( 3600 * 24 ));
2005-03-05 19:45:40 +01:00
}
else
{
2005-03-28 15:52:40 +02:00
$html -> select_date ();
2005-03-05 19:45:40 +01:00
}
print " </td></tr> " ;
2005-08-11 20:24:58 +02:00
print '<tr><td>' . $langs -> trans ( " Amount " ) . '</td><td><input type="text" name="cotisation" size="6"> ' . $langs -> trans ( " Currency " . $conf -> monnaie ) . '</td></tr>' ;
2005-08-15 03:06:20 +02:00
if ( $conf -> global -> ADHERENT_BANK_USE )
2005-08-11 20:24:58 +02:00
{
print '<tr><td>' . $langs -> trans ( " PaymentMode " ) . '</td><td>' ;
$html -> select_types_paiements ( '' , 'operation' );
2005-03-05 19:45:40 +01:00
print " </td></tr> \n " ;
2005-08-11 20:24:58 +02:00
print '<tr><td>' . $langs -> trans ( " FinancialAccount " ) . '</td><td>' ;
$html -> select_comptes ( '' , 'accountid' );
print " </td></tr> \n " ;
print '<tr><td>' . $langs -> trans ( " Numero " ) . '</td><td>' ;
print '<input name="num_chq" type="text" size="8">' ;
print " </td></tr> \n " ;
2005-08-15 03:06:20 +02:00
print '<tr><td>' . $langs -> trans ( " Label " ) . '</td>' ;
print '<td><input name="label" type="text" size="50" value="' . $langs -> trans ( " Subscription " ) . ' ' ;
print strftime ( " %Y " ,( $adh -> datefin ? $adh -> datefin : time ())) . '" ></td></tr>' ;
2005-03-05 19:45:40 +01:00
}
2005-08-11 20:24:58 +02:00
2005-09-06 22:58:14 +02:00
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="' . $langs -> trans ( " Save " ) . '"</td></tr>' ;
2005-03-05 19:45:40 +01:00
print '</form>' ;
print '</table>' ;
2004-07-17 01:35:53 +02:00
}
2005-03-05 19:45:40 +01:00
print '</td></tr>' ;
print '</table>' ;
2004-07-17 01:35:53 +02:00
}
2002-12-28 19:12:22 +01:00
$db -> close ();
2005-04-16 15:10:06 +02:00
llxFooter ( '$Date$ - $Revision$' );
2002-12-28 19:12:22 +01:00
?>