dolibarr 21.0.0-alpha
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 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 * or see https://www.gnu.org/
21 */
22
36function import_prepare_head($param, $maxstep = 0)
37{
38 global $langs;
39
40 if (empty($maxstep)) {
41 $maxstep = 6;
42 }
43
44 $h = 0;
45 $head = array();
46 $i = 1;
47 while ($i <= $maxstep) {
48 if ($i < 6) {
49 $head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step='.$i.$param;
50 } else {
51 $head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step=5'.$param; // For step6, link is to step 5
52 }
53 $head[$h][1] = $langs->trans("Step")." ".$i;
54 $head[$h][2] = 'step'.$i;
55 $h++;
56 $i++;
57 }
58
59 return $head;
60}
import_prepare_head($param, $maxstep=0)
Function to return list of tabs for import pages.