- print "</body></opml>";
- }
-
- if ($op == "Import") {
-
- print "<html>
- <head>
- <link rel=\"stylesheet\" href=\"opml.css\" type=\"text/css\">
- </head>
- <body>
- <h1><img src=\"images/ttrss_logo.png\"></h1>
- <div class=\"opmlBody\">
- <h2>"._('Importing OPML...')."</h2>";
-
- if (is_file($_FILES['opml_file']['tmp_name'])) {
- $dom = domxml_open_file($_FILES['opml_file']['tmp_name']);
-
- if ($dom) {
- $root = $dom->document_element();
-
- $body = $root->get_elements_by_tagname('body');
-
- if ($body[0]) {
- $body = $body[0];
-
- $outlines = $body->get_elements_by_tagname('outline');
-
- print "<table>";
-
- foreach ($outlines as $outline) {
-
- $feed_title = db_escape_string($outline->get_attribute('text'));