diff options
author | Philip Häusler <msquare@notrademark.de> | 2011-06-12 17:07:55 +0200 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2011-06-12 17:07:55 +0200 |
commit | dafbb0c10ef91e36506c4361fa4a44013abd4077 (patch) | |
tree | 7de5f183309adc43d323b0966b5e5faf8b425603 /includes | |
parent | 2ba728c71fbd30afc2758b76b6ac1461ef39a22e (diff) |
#4 begin pentabarf-import
Diffstat (limited to 'includes')
-rw-r--r-- | includes/pages/admin_import.php | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/includes/pages/admin_import.php b/includes/pages/admin_import.php index 6523050c..8f5ff4ad 100644 --- a/includes/pages/admin_import.php +++ b/includes/pages/admin_import.php @@ -1,8 +1,42 @@ <?php function admin_import() { + $html = ""; + + $step = "input"; + if (isset ($_REQUEST['step'])) + $step = $_REQUEST['step']; + + $html .= '<p>'; + $html .= $step == "input" ? '<b>1. Input</b>' : '1. Input'; + $html .= ' » '; + $html .= $step == "check" ? '<b>2. Validate</b>' : '2. Validate'; + $html .= ' » '; + $html .= $step == "import" ? '<b>3. Import</b>' : '3. Import'; + $html .= '</p>'; + + switch ($step) { + case "input" : + $html .= template_render('../templates/admin_import_input.html', array ( + 'link' => page_link_to('admin_import') + )); + + $data = new SimpleXMLElement(file_get_contents('../import/27C3_sample.xcs')); + print_r($data->vcalendar); + break; + + case "check" : + break; + + case "import" : + break; + } + + return $html; + + ############################################################################################## global $Room, $RoomID, $RoomName; global $PentabarfGetWith, $PentabarfXMLpath, $PentabarfXMLhost; - + require_once ("includes/funktion_xml.php"); /////////// // DEBUG // @@ -175,7 +209,7 @@ function admin_import() { } //readXMLfile("xml.php.xml"); - if (readXMLfile("../import/27C3_sample.xcs.xml") == 0) { + if (readXMLfile("../import/27C3_sample.xcs") == 0) { $XMLmain = getXMLsubPease($XMLmain, "VCALENDAR"); if ($ShowDataStrukture) { |