dolibarr  7.0.0-beta
import.lib.php
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@capnetworks.com>
5  * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
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 <http://www.gnu.org/licenses/>.
19  * or see http://www.gnu.org/
20  */
21 
35 function import_prepare_head($param, $maxstep=0)
36 {
37  global $langs;
38 
39  if (empty($maxstep)) $maxstep=6;
40 
41  $h=0;
42  $head = array();
43  $i=1;
44  while($i <= $maxstep)
45  {
46  $head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step='.$i.$param;
47  $head[$h][1] = $langs->trans("Step")." ".$i;
48  $head[$h][2] = 'step'.$i;
49  $h++;
50  $i++;
51  }
52 
53  return $head;
54 }
55