[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/lolix/societe/ -> fiche.php (source)

   1  <?php
   2  /* Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   *
   4   * This program is free software; you can redistribute it and/or modify
   5   * it under the terms of the GNU General Public License as published by
   6   * the Free Software Foundation; either version 2 of the License, or
   7   * (at your option) any later version.
   8   *
   9   * This program is distributed in the hope that it will be useful,
  10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12   * GNU General Public License for more details.
  13   *
  14   * You should have received a copy of the GNU General Public License
  15   * along with this program; if not, write to the Free Software
  16   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17   *
  18   * $Id: fiche.php,v 1.7 2005/07/10 17:46:04 eldy Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/lolix/societe/fiche.php,v $
  20   *
  21   */
  22  
  23  require ("pre.inc.php");
  24  
  25  /*
  26   * Sécurité accés client
  27   */
  28  
  29  $socid = $_GET["id"];
  30  
  31  /*
  32   *
  33   *
  34   */
  35  llxHeader();
  36  $form = new Form($db);
  37  
  38  $soc = new LolixSociete($db);
  39  $soc->fetch($_GET["id"]);
  40  
  41  fiche_header($soc->id);
  42  
  43  /*
  44   *
  45   */
  46  
  47  if ($_GET["action"] == 'edit')
  48  {
  49    print_titre("Edition de la société");
  50  
  51    if ($socid)
  52      {
  53        $soc = new Societe($db);
  54        $soc->id = $socid;
  55        $soc->fetch($socid);
  56  
  57        print '<form action="fiche.php?id='.$socid.'" method="post">';
  58        print '<input type="hidden" name="action" value="update">';
  59  
  60        print '<table class="border" width="100%">';
  61        print '<tr><td>'.$langs->trans("Name").'</td><td colspan="3"><input type="text" size="40" name="nom" value="'.$soc->nom.'"></td></tr>';
  62        print '<tr><td valign="top">Adresse</td><td><textarea name="adresse" cols="30" rows="3" wrap="soft">';
  63        print $soc->adresse;
  64        print '</textarea></td>';
  65        
  66        print '<td>'.$langs->trans("Zip").'</td><td><input size="6" type="text" name="cp" value="'.$soc->cp.'">&nbsp;';
  67        print $langs->trans("Town").'&nbsp;<input type="text" name="ville" value="'.$soc->ville.'"></td></tr>';
  68        print '<tr><td>'.$langs->trans("State").'</td><td>';
  69        print $form->select_departement($soc->departement_id);
  70        print '</td>';      
  71  
  72        print '<td>'.$langs->trans("Country").'</td><td>';
  73        print $form->select_pays($soc->pays_id);
  74        print '</td></tr>';
  75  
  76        print '<tr><td>'.$langs->trans("Phone").'</td><td><input type="text" name="tel" value="'.$soc->tel.'"></td>';
  77        print '<td>'.$langs->trans("Fax").'</td><td><input type="text" name="fax" value="'.$soc->fax.'"></td></tr>';
  78        print '<tr><td>'.$langs->trans("web").'</td><td colspan="3">http://<input type="text" name="url" size="40" value="'.$soc->url.'"></td></tr>';
  79        
  80        print '<tr><td>'.$langs->transcountry("ProfId1",$soc->pays_code).'</td><td><input type="text" name="siren" size="10" maxlength="9" value="'.$soc->siren.'"></td>';
  81        print '<td>'.$langs->transcountry("ProfId2",$soc->pays_code).'</td><td><input type="text" name="siret" size="15" maxlength="14" value="'.$soc->siret.'"></td></tr>';
  82  
  83        print '<tr><td>'.$langs->transcountry("ProfId3",$soc->pays_code).'</td><td><input type="text" name="ape" size="5" maxlength="4" value="'.$soc->ape.'"></td>';
  84        print '<td>'.$langs->trans("Capital").'</td><td><input type="text" name="capital" size="10" value="'.$soc->capital.'"> '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
  85  
  86  
  87        print '<tr><td>Forme juridique</td><td colspan="3">';
  88        $html = new Form($db);
  89        print $html->select_array("forme_juridique_id",$soc->forme_juridique_array(), $soc->forme_juridique_id,0,1);
  90        print '</td></tr>';
  91  
  92        print '<tr><td>'.$langs->trans("Type").'</td><td>';
  93        $form->select_array("typent_id",$soc->typent_array(), $soc->typent_id);
  94        print '</td>';
  95        print '<td>'.$langs->trans("Staff").'</td><td>';
  96        $form->select_array("effectif_id",$soc->effectif_array(), $soc->effectif_id);
  97        print '</td></tr>';
  98  
  99        print '<input type="hidden" name="tva_intra_code" value="'.$soc->tva_intra_code.'">';
 100        print '<input type="hidden" name="tva_intra_num" value="'.$soc->tva_intra_num.'">';
 101  
 102        print '<input type="hidden" name="client" value="'.$soc->client.'">';
 103        print '<input type="hidden" name="fournisseur" value="'.$soc->fournisseur.'">';
 104        print '<tr><td align="center" colspan="4"><input type="submit" value="Mettre à jour"></td></tr>';
 105        print '</table>';
 106        print '</form>';
 107  
 108      }
 109  }
 110  else
 111  {
 112    
 113    print '<table class="border" width="100%">';
 114    print '<tr><td width="20%">Nom</td><td width="30%">'.$soc->nom.'</td>';
 115    print '<td>Mise à jour</td><td>'.strftime("%d %B %Y %H:%M",$socdet->date_fiche_update).' ';
 116    print '</td></tr>';
 117  
 118  
 119    print '<tr><td valign="top">Adresse</td><td colspan="3">'.nl2br($soc->adresse).'&nbsp;';
 120    print '<br>'.$soc->cp.'&nbsp;'.$soc->ville.'<br>'.$soc->pays.'</td></tr>';
 121  
 122  
 123    print '<tr><td>Téléphone</td><td>'.dolibarr_print_phone($soc->tel).'</td>';
 124    print '<td>Fax</td><td>'.dolibarr_print_phone($soc->fax).'</td></tr>';
 125    print '<tr><td>Web</td><td>';
 126    if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; }
 127    print '</td>';
 128  
 129    print '<td>Siren</td><td><a target="_blank" href="http://www.societe.com/cgi-bin/recherche?rncs='.$soc->siren.'">'.$soc->siren.'</a>&nbsp;</td></tr>';
 130    
 131    print '<tr><td>Forme juridique</td><td colspan="3">'.$soc->forme_juridique.'</td></tr>';
 132  
 133    print '<tr><td>'.$langs->trans("Staff").'</td><td>'.$soc->effectif.'</td>';
 134    print '<td>Création</td><td>'.strftime("%d %B %Y",$soc->date_creation).'</td></tr>';
 135    
 136    print '<tr><td>Contact</td><td>'.$socdet->contact_nom.' '.$socdet->contact_email.'</td>';
 137    print '<td>&nbsp;</td><td>&nbsp;</td></tr>';
 138    
 139    $file = DOL_DOCUMENT_ROOT . "/document/sl/catalogue-".$soc->id.".pdf";
 140    
 141    print '<tr><td><a href="fiche.php?action=pdf&amp;id='.$soc->id.'">'.img_file_new().'</a></td>';
 142    
 143    if (file_exists($file))
 144      {
 145        print '<td><a href="'.DOL_URL_ROOT.'/document/sl/catalogue-'.$soc->id.'.pdf">'.img_pdf().'</a></td>';
 146        print '<td>'.filesize($file). ' bytes</td>';
 147        print '<td>'.strftime("%d %b %Y %H:%M:%S",filemtime($file)).'</td>';
 148      }
 149    print '</tr>';
 150  /*
 151   *
 152   */
 153  
 154  
 155  print '</table>';
 156  print '<br></div>';
 157  /*
 158   *
 159   */  
 160  
 161  }
 162  
 163  print '<div class="tabsAction">';
 164  
 165  if ($soc->active == 0)
 166  {
 167    print '<a class="tabAction" href="fiche.php?id='.$_GET["id"].'&action=activer">Activer</a>';
 168  }
 169  
 170  
 171  
 172  print '</div>';
 173  /*
 174   *
 175   */
 176  
 177  
 178  $db->close();
 179  
 180  llxFooter("<em>Derni&egrave;re modification $Date: 2005/07/10 17:46:04 $ r&eacute;vision $Revision: 1.7 $</em>");
 181  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics