dolibarr  9.0.0
note.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2015 Frederic France <frederic.france@free.fr>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
26 require '../main.inc.php';
27 require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
28 require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
29 require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
30 
31 // Load translation files required by the page
32 $langs->loadLangs(array("companies","members","bills"));
33 
34 $action=GETPOST('action','alpha');
35 $id=GETPOST('id','int');
36 
37 // Security check
38 $result=restrictedArea($user,'adherent',$id);
39 
40 $object = new Adherent($db);
41 $result=$object->fetch($id);
42 if ($result > 0)
43 {
44  $adht = new AdherentType($db);
45  $result=$adht->fetch($object->typeid);
46 }
47 
48 $permissionnote=$user->rights->adherent->creer; // Used by the include of actions_setnotes.inc.php
49 
50 /*
51  * Actions
52  */
53 
54 include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
55 
56 
57 
58 /*
59  * View
60  */
61 $title=$langs->trans("Member") . " - " . $langs->trans("Note");
62 $helpurl="EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_Miembros";
63 llxHeader("",$title,$helpurl);
64 
65 $form = new Form($db);
66 
67 if ($id)
68 {
69  $head = member_prepare_head($object);
70 
71  dol_fiche_head($head, 'note', $langs->trans("Member"), -1, 'user');
72 
73  print "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']."\">";
74  print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
75 
76  $linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
77 
78  dol_banner_tab($object, 'rowid', $linkback);
79 
80  print '<div class="fichecenter">';
81 
82  print '<div class="underbanner clearboth"></div>';
83  print '<table class="border centpercent">';
84 
85  // Login
86  if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
87  {
88  print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.'&nbsp;</td></tr>';
89  }
90 
91  // Type
92  print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
93 
94  // Morphy
95  print '<tr><td class="titlefield">'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
96  /*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
97  print $form->showphoto('memberphoto',$member);
98  print '</td>';*/
99  print '</tr>';
100 
101  // Company
102  print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>';
103 
104  // Civility
105  print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().'&nbsp;</td>';
106  print '</tr>';
107 
108  print "</table>";
109 
110  print '</div>';
111 
112 
113  $cssclass='titlefield';
114  $permission = $user->rights->adherent->creer; // Used by the include of notes.tpl.php
115  include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
116 
117 
118  dol_fiche_end();
119 }
120 
121 // End of page
122 llxFooter();
123 $db->close();
llxFooter()
Empty footer.
Definition: wrapper.php:56
GETPOST($paramname, $check='none', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
print
Draft customers invoices.
Definition: index.php:91
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
member_prepare_head(Adherent $object)
Return array head with list of tabs to view object informations.
Definition: member.lib.php:33
Class to manage generation of HTML components Only common components must be here.
dol_fiche_end($notab=0)
Show tab footer of a card.
Class to manage members of a foundation.
llxHeader()
Empty header.
Definition: wrapper.php:44
Class to manage members type.
restrictedArea($user, $features, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='')
Show tab header of a card.