#4 begin pentabarf-import

main
Philip Häusler 14 years ago
parent 2ba728c71f
commit dafbb0c10e

@ -1,5 +1,39 @@
<?php <?php
function admin_import() { 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 .= ' &raquo; ';
$html .= $step == "check" ? '<b>2. Validate</b>' : '2. Validate';
$html .= ' &raquo; ';
$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 $Room, $RoomID, $RoomName;
global $PentabarfGetWith, $PentabarfXMLpath, $PentabarfXMLhost; global $PentabarfGetWith, $PentabarfXMLpath, $PentabarfXMLhost;
@ -175,7 +209,7 @@ function admin_import() {
} }
//readXMLfile("xml.php.xml"); //readXMLfile("xml.php.xml");
if (readXMLfile("../import/27C3_sample.xcs.xml") == 0) { if (readXMLfile("../import/27C3_sample.xcs") == 0) {
$XMLmain = getXMLsubPease($XMLmain, "VCALENDAR"); $XMLmain = getXMLsubPease($XMLmain, "VCALENDAR");
if ($ShowDataStrukture) { if ($ShowDataStrukture) {

@ -0,0 +1,8 @@
<form action="%link%" method="post">
<fieldset>
<p>
While developing we use a fixed file input. Just hit submit.
</p>
<input type="submit" name="submit" value="Submit" />
</fieldset>
</form>
Loading…
Cancel
Save