47 |
|
|
48 |
// test some values |
// test some values |
49 |
// test si le login existe deja |
// test si le login existe deja |
50 |
$sql = "SELECT rowid,login FROM ".MAIN_DB_PREFIX."adherent WHERE login='$login';"; |
$sql = "SELECT rowid,login FROM ".MAIN_DB_PREFIX."adherent WHERE login='".$user->login."';"; |
51 |
$result = $db->query($sql); |
$result = $db->query($sql); |
52 |
if ($result) { |
if ($result) { |
53 |
$num = $db->num_rows(); |
$num = $db->num_rows(); |
131 |
|
|
132 |
llxHeader(); |
llxHeader(); |
133 |
|
|
134 |
if (isset($user->login)){ |
if (isset($user->login)) |
135 |
|
{ |
136 |
|
|
137 |
$adh = new Adherent($db); |
$adh = new Adherent($db); |
138 |
$adh->login = $user->login; |
$adh->login = $user->login; |
141 |
// fetch optionals attibutes |
// fetch optionals attibutes |
142 |
$adho->fetch_optionals(); |
$adho->fetch_optionals(); |
143 |
|
|
|
$sql = "SELECT s.nom,s.idp, f.amount, f.total, f.facnumber"; |
|
|
$sql .= " FROM societe as s, ".MAIN_DB_PREFIX."facture as f WHERE f.fk_soc = s.idp"; |
|
|
$sql .= " AND f.rowid = $facid"; |
|
|
|
|
|
$result = $db->query($sql); |
|
|
if ($result) { |
|
|
$num = $db->num_rows(); |
|
|
if ($num) { |
|
|
$obj = $db->fetch_object( 0); |
|
|
|
|
|
$total = $obj->total; |
|
|
} |
|
|
} |
|
|
|
|
144 |
$adht = new AdherentType($db); |
$adht = new AdherentType($db); |
145 |
|
|
146 |
print_titre("Edition de la fiche adhérent de $adh->prenom $adh->nom"); |
print_titre("Edition de la fiche adhérent de $adh->prenom $adh->nom"); |
147 |
|
|
148 |
if ($errmsg != ''){ |
if ($errmsg != ''){ |
149 |
print '<table cellspacing="0" border="1" width="100%" cellpadding="3">'; |
print '<table width="100%">'; |
150 |
|
|
151 |
print '<th>Erreur dans le formulaire</th>'; |
print '<th>Erreur dans le formulaire</th>'; |
152 |
print "<tr><td class=\"delete\"><b>$errmsg</b></td></tr>\n"; |
print "<tr><td class=\"delete\"><b>$errmsg</b></td></tr>\n"; |
154 |
print '</table>'; |
print '</table>'; |
155 |
} |
} |
156 |
|
|
157 |
print '<table class="border" cellspacing="0" width="100%" cellpadding="3">'; |
print '<table class="border" width="100%">'; |
158 |
|
|
159 |
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adh->type.'</td>'; |
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adh->type.'</td>'; |
160 |
print '<td valign="top" width="50%">'.$langs->trans("Comments").'</td></tr>'; |
print '<td valign="top" width="50%">'.$langs->trans("Comments").'</td></tr>'; |
190 |
print "<hr>"; |
print "<hr>"; |
191 |
|
|
192 |
print "<form action=\"priv_edit.php\" method=\"post\">"; |
print "<form action=\"priv_edit.php\" method=\"post\">"; |
193 |
print '<table cellspacing="0" border="1" width="100%" cellpadding="3">'; |
print '<table class="border" width="100%">'; |
194 |
|
|
195 |
print "<input type=\"hidden\" name=\"action\" value=\"update\">"; |
print "<input type=\"hidden\" name=\"action\" value=\"update\">"; |
196 |
print "<input type=\"hidden\" name=\"rowid\" value=\"$adh->id\">"; |
print "<input type=\"hidden\" name=\"rowid\" value=\"$adh->id\">"; |
252 |
|
|
253 |
$db->close(); |
$db->close(); |
254 |
|
|
255 |
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>"); |
llxFooter('$Date$ - $Revision$'); |
256 |
?> |
?> |