dolibarr 21.0.0-beta
import.lib.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
4 * Copyright (C) 2010 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
6 * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
7 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 * or see https://www.gnu.org/
22 */
23
37function import_prepare_head($param, $maxstep = 0)
38{
39 global $langs;
40
41 if (empty($maxstep)) {
42 $maxstep = 6;
43 }
44
45 $h = 0;
46 $head = array();
47 $i = 1;
48 while ($i <= $maxstep) {
49 if ($i < 6) {
50 $head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step='.$i.$param;
51 } else {
52 $head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step=5'.$param; // For step6, link is to step 5
53 }
54 $head[$h][1] = $langs->trans("Step")." ".$i;
55 $head[$h][2] = 'step'.$i;
56 $h++;
57 $i++;
58 }
59
60 return $head;
61}
import_prepare_head($param, $maxstep=0)
Function to return list of tabs for import pages.