dolibarr  13.0.2
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 <https://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', 'aZ09');
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  $adht = new AdherentType($db);
44  $result = $adht->fetch($object->typeid);
45 }
46 
47 $permissionnote = $user->rights->adherent->creer; // Used by the include of actions_setnotes.inc.php
48 
49 /*
50  * Actions
51  */
52 
53 include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
54 
55 
56 
57 /*
58  * View
59  */
60 $title = $langs->trans("Member")." - ".$langs->trans("Note");
61 $helpurl = "EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_Miembros";
62 llxHeader("", $title, $helpurl);
63 
64 $form = new Form($db);
65 
66 if ($id) {
67  $head = member_prepare_head($object);
68 
69  print dol_get_fiche_head($head, 'note', $langs->trans("Member"), -1, 'user');
70 
71  print "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']."\">";
72  print '<input type="hidden" name="token" value="'.newToken().'">';
73 
74  $linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
75 
76  dol_banner_tab($object, 'id', $linkback);
77 
78  print '<div class="fichecenter">';
79 
80  print '<div class="underbanner clearboth"></div>';
81  print '<table class="border centpercent tableforfield">';
82 
83  // Login
84  if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
85  print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.'&nbsp;</td></tr>';
86  }
87 
88  // Type
89  print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
90 
91  // Morphy
92  print '<tr><td class="titlefield">'.$langs->trans("MemberNature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
93  /*print '<td rowspan="'.$rowspan.'" class="center" valign="middle" width="25%">';
94  print $form->showphoto('memberphoto',$member);
95  print '</td>';*/
96  print '</tr>';
97 
98  // Company
99  print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->company.'</td></tr>';
100 
101  // Civility
102  print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().'&nbsp;</td>';
103  print '</tr>';
104 
105  print "</table>";
106 
107  print '</div>';
108 
109 
110  $cssclass = 'titlefield';
111  $permission = $user->rights->adherent->creer; // Used by the include of notes.tpl.php
112  include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
113 
114 
116 }
117 
118 // End of page
119 llxFooter();
120 $db->close();
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
member_prepare_head(Adherent $object)
Return array head with list of tabs to view object informations.
Definition: member.lib.php:33
llxHeader()
Empty header.
Definition: wrapper.php:45
Class to manage generation of HTML components Only common components must be here.
Class to manage members of a foundation.
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.
Class to manage members type.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
Definition: index.php:89
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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.
llxFooter()
Empty footer.
Definition: wrapper.php:59