dolibarr 25.0.0-alpha
tools.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
26// Load Dolibarr environment
27require '../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
37// Load translation files required by the page
38$langs->loadLangs(array("companies", "other"));
39
40// Security check
41$socid = 0;
42if ($user->socid > 0) {
43 $socid = $user->socid;
44}
45
46require_once DOL_DOCUMENT_ROOT.'/core/redirect_if_setup_not_complete.inc.php';
47
48
49/*
50 * Actions
51 */
52
53if (GETPOST('addbox')) {
54 // Add box (when submit is done from a form when ajax disabled)
55 require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
56 $zone = GETPOSTINT('areacode');
57 $userid = GETPOSTINT('userid');
58 $boxorder = GETPOST('boxorder', 'aZ09');
59 $boxorder .= GETPOST('boxcombo', 'aZ09');
60 $result = InfoBox::saveboxorder($db, $zone, $boxorder, $userid);
61 if ($result > 0) {
62 setEventMessages($langs->trans("BoxAdded"), null);
63 }
64}
65
66
67/*
68 * View
69 */
70
71$form = new Form($db);
72$socstatic = new Societe($db);
73
74// Load $resultboxes
75$resultboxes = FormOther::getBoxesArea($user, "28");
76
77llxHeader("", $langs->trans("Tools"), "");
78
79$text = $langs->trans("Tools");
80
81print load_fiche_titre($text, $resultboxes['selectboxlist'], 'wrench');
82
83// Show description of content
84print '<div class="justify opacitymedium">'.$langs->trans("ToolsDesc").'</div><br><br>';
85
86
87print '<div class="fichecenter">';
88
89print '<div class="twocolumns">';
90
91print '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
92
93print $resultboxes['boxlista'];
94
95print '</div><div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
96
97print $resultboxes['boxlistb'];
98
99print '</div></div></div>';
100
101
102llxFooter();
103
104$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
Class to manage generation of HTML components Only common components must be here.
static getBoxesArea($user, $areacode)
Get array with HTML tabs with widgets/boxes of a particular area including personalized choices of us...
static saveboxorder($dbs, $zone, $boxorder, $userid=0)
Save order of boxes for area and user.
Class to manage third parties objects (customers, suppliers, prospects...)
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.