source: pmb4.2/trunk/fuentes/pmb/admin/convert/import.php @ 815

Last change on this file since 815 was 815, checked in by jrpelegrina, 4 years ago

Initial release of pmb 4.2

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1<?php
2// +-------------------------------------------------+
3// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
4// +-------------------------------------------------+
5// $Id: import.php,v 1.7 2008-07-15 15:44:06 ohennequin Exp $
6
7
8//Interface de lancement de l'import
9$base_path="../..";
10$base_auth="ADMINISTRATION_AUTH|CATALOGAGE_AUTH";
11$base_title="\$msg[ie_import_running]";
12require($base_path."/includes/init.inc.php");
13
14require_once("$include_path/parser.inc.php");
15require_once("$include_path/templates/import_form.tpl.php");
16
17function _item_($param) {
18        global $catalog;
19        global $catalog_visible;
20       
21        $catalog[]=$param['NAME'];
22        $catalog_visible[]=$param['VISIBLE'];
23}
24
25//Lecture des différents imports possibles
26if (file_exists("imports/catalog_subst.xml"))
27        $fic_catal = "imports/catalog_subst.xml";
28else
29        $fic_catal = "imports/catalog.xml";
30
31$catalog=array();
32_parser_($fic_catal,array("ITEM"=>"_item_"),"CATALOG");
33
34//Création de la liste des types d'import
35$import_type="<select name=\"import_type\">\n";
36for ($i=0; $i<count($catalog); $i++) {
37        if ($catalog_visible[$i]!="no") {
38           $import_type.="<option value=\"$i\">".$catalog[$i]."</option>\n";
39        }
40}
41$import_type.="</select>";
42
43$form=str_replace("!!import_type!!",$import_type,$form);
44
45echo pmb_bidi($form);
46print "</body></html>";
47?>
Note: See TracBrowser for help on using the repository browser.