dolibarr 23.0.3
registration.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
3 * Copyright (C) 2017-2018 Laurent Destailleur <eldy@destailleur.fr>
4 * Copyright (C) 2024 Frédéric 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
27// Load Dolibarr environment
28require '../../main.inc.php';
37require_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php';
38require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
39require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
40
41// Load translation files required by the page
42$langs->loadLangs(array('admin', 'blockedlog', 'other'));
43
44// Get Parameters
45$action = GETPOST('action', 'aZ09');
46$backtopage = GETPOST('backtopage', 'alpha');
47$withtab = GETPOSTINT('withtab');
48
49// Access Control
50if (!$user->admin) {
52}
53
54
55
56/*
57 * Actions
58 */
59
60// TODO
61
62
63/*
64 * View
65 */
66
67$form = new Form($db);
68$block_static = new BlockedLog($db);
69$block_static->loadTrackedEvents();
70
71$title = $langs->trans("ModuleSetup").' '.$langs->trans('BlockedLog');
72$help_url="EN:Module_Unalterable_Archives_-_Logs|FR:Module_Archives_-_Logs_Inaltérable";
73
74llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-blockedlog page-admin_blockedlog');
75
76$linkback = '';
77if ($withtab) {
78 $linkback = '<a href="'.dolBuildUrl($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
79}
80
81$morehtmlcenter = '';
82
83$registrationnumber = getHashUniqueIdOfRegistration();
84$texttop = '<small class="opacitymedium">'.$langs->trans("RegistrationNumber").':</small> <small>'.dol_trunc($registrationnumber, 10).'</small>';
86 $texttop = '';
87}
88
89print load_fiche_titre($title.'<br>'.$texttop, $linkback, 'blockedlog', 0, '', '', $morehtmlcenter);
90
91if ($withtab) {
92 $head = blockedlogadmin_prepare_head(GETPOST('withtab', 'alpha'));
93 print dol_get_fiche_head($head, 'blockedlog', '', -1);
94}
95
96//print $texttop;
97//print '<br><br>';
98
99if (in_array($mysoc->country_code, array('FR'))) {
100 $htmltext = $langs->trans("UnalterableLogToolRegistrationFR").'<br>';
101 print info_admin($htmltext, 0, 0, 'warning');
102}
103
104print '<br>';
105
106
107// TODO Form to edit registration fields
108// + code to (re)send data when modified and to init module of not initialized yet
109
110
111if ($withtab) {
112 print dol_get_fiche_end();
113}
114
115print '<br><br>';
116
117// End of page
118llxFooter();
119$db->close();
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:73
isRegistrationDataSaved()
Return if the KYC mandatory parameters are set.
getHashUniqueIdOfRegistration()
Return a hash unique identifier of the registration.
blockedlogadmin_prepare_head($withtabsetup)
Define head array for tabs of blockedlog tools setup pages.
Class to manage Blocked Log.
Class to manage generation of HTML components Only common components must be here.
global $mysoc
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
Show information in HTML for admin users or standard users.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.