[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2001-2003,2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * 19 * $Id: socnote.php,v 1.21.2.1 2005/12/21 17:35:56 hregis Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/socnote.php,v $ 21 */ 22 23 /** 24 \file htdocs/socnote.php 25 \brief Fichier onglet notes liées à la société 26 \ingroup societe 27 \version $Revision: 1.21.2.1 $ 28 */ 29 30 require ("./pre.inc.php"); 31 32 $langs->load("companies"); 33 34 35 if ($_POST["action"] == 'add') { 36 $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET note='".addslashes($_POST["note"])."' WHERE idp=".$_POST["socid"]; 37 $result = $db->query($sql); 38 39 $_GET["socid"]=$_POST["socid"]; // Pour retour sur fiche 40 } 41 42 43 /* 44 * 45 */ 46 47 llxHeader(); 48 49 if ($_GET["socid"] > 0) 50 { 51 $societe = new Societe($db, $_GET["socid"]); 52 $societe->fetch($_GET["socid"]); 53 54 55 $h=0; 56 57 $head[$h][0] = DOL_URL_ROOT.'/soc.php?socid='.$societe->id; 58 $head[$h][1] = $langs->trans("Company"); 59 $h++; 60 61 if ($societe->client==1) 62 { 63 $head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$societe->id; 64 $head[$h][1] = $langs->trans("Customer"); 65 $h++; 66 } 67 68 if ($societe->client==2) 69 { 70 $head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$societe->id; 71 $head[$h][1] = $langs->trans("Prospect"); 72 $h++; 73 } 74 if ($societe->fournisseur) 75 { 76 $head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$societe->id; 77 $head[$h][1] = $langs->trans("Supplier"); 78 $h++; 79 } 80 81 if ($conf->compta->enabled) { 82 $langs->load("compta"); 83 $head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$societe->id; 84 $head[$h][1] = $langs->trans("Accountancy"); 85 $h++; 86 } 87 88 $head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$societe->id; 89 $head[$h][1] = $langs->trans("Note"); 90 $hselected = $h; 91 $h++; 92 93 if ($user->societe_id == 0) 94 { 95 $head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$societe->id; 96 $head[$h][1] = $langs->trans("Documents"); 97 $h++; 98 } 99 100 $head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$societe->id; 101 $head[$h][1] = $langs->trans("Notifications"); 102 $h++; 103 104 $head[$h][0] = DOL_URL_ROOT.'/societe/info.php?socid='.$societe->id; 105 $head[$h][1] = $langs->trans("Info"); 106 $h++; 107 108 dolibarr_fiche_head($head, $hselected, $societe->nom); 109 110 111 print "<form method=\"post\" action=\"socnote.php\">"; 112 113 print '<table class="border" width="100%">'; 114 print '<tr><td width="50%" valign="top">'.$langs->trans("Note").'</td><td>'.$langs->trans("CurrentNote").'</td></tr>'; 115 print '<tr><td width="50%" valign="top">'; 116 print "<input type=\"hidden\" name=\"action\" value=\"add\">"; 117 print "<input type=\"hidden\" name=\"socid\" value=\"".$societe->id."\">"; 118 print '<textarea name="note" cols="70" rows="10">'.$societe->note.'</textarea><br>'; 119 print '</td><td width="50%" valign="top">'.nl2br($societe->note).'</td>'; 120 print "</td></tr>"; 121 print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>'; 122 print "</table>"; 123 124 print '</form>'; 125 } 126 127 print '</div><br>'; 128 129 $db->close(); 130 131 llxFooter('$Date: 2005/12/21 17:35:56 $ - $Revision: 1.21.2.1 $'); 132 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |