/[dolibarr]/dolibarr/htdocs/public/adherents/priv_edit.php
ViewVC logotype

Diff of /dolibarr/htdocs/public/adherents/priv_edit.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by opensides, Wed Oct 20 20:06:50 2004 UTC revision 1.17 by eldy, Thu Aug 25 20:40:22 2005 UTC
# Line 47  if ($action == 'update') Line 47  if ($action == 'update')
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();
# Line 131  if ($action == 'update') Line 131  if ($action == 'update')
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;
# Line 140  if (isset($user->login)){ Line 141  if (isset($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";
# Line 167  if (isset($user->login)){ Line 154  if (isset($user->login)){
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>';
# Line 203  if (isset($user->login)){ Line 190  if (isset($user->login)){
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\">";
# Line 265  if (isset($user->login)){ Line 252  if (isset($user->login)){
252    
253  $db->close();  $db->close();
254    
255  llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");  llxFooter('$Date$ - $Revision$');
256  ?>  ?>

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26