From dafbb0c10ef91e36506c4361fa4a44013abd4077 Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Sun, 12 Jun 2011 17:07:55 +0200 Subject: #4 begin pentabarf-import --- includes/pages/admin_import.php | 38 ++++++++++++++++++++++++++++++++++++-- templates/admin_import_input.html | 8 ++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 templates/admin_import_input.html 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 @@ '; + $html .= $step == "input" ? '1. Input' : '1. Input'; + $html .= ' » '; + $html .= $step == "check" ? '2. Validate' : '2. Validate'; + $html .= ' » '; + $html .= $step == "import" ? '3. Import' : '3. Import'; + $html .= '

'; + + 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) { diff --git a/templates/admin_import_input.html b/templates/admin_import_input.html new file mode 100644 index 00000000..19e756fe --- /dev/null +++ b/templates/admin_import_input.html @@ -0,0 +1,8 @@ +
+
+

+ While developing we use a fixed file input. Just hit submit. +

+ +
+
\ No newline at end of file -- cgit v1.2.3-70-g09d2