Browse Source

fix bug

pull/75/head
xiaoz 3 years ago
parent
commit
7465ee807f
  1. 10
      controller/api.php
  2. 2
      templates/admin/static/embed.js

10
controller/api.php

@ -390,17 +390,15 @@ function export_link($api) { @@ -390,17 +390,15 @@ function export_link($api) {
EOF;
//遍历结果
foreach ($data as $key => $value) {
echo "<DT>\n";
echo "<h3 add_date=\"$current\" last_modified=\"$current\">$key</h3>\n";
echo "<dl><p></p>\n";
echo "<DT><H3 ADD_DATE=\"$current\" LAST_MODIFIED=\"$current\">$key</H3>\n";
echo "<DL><P></P>\n";
foreach ($value as $link) {
$title = $link['title'];
$add_time = $link['add_time'];
$url = $link['url'];
echo "<dt><a href = \"$url\" add_date = \"$add_time\" ICON = \"\">$title</a></dt>\n";
echo "<DT><A HREF=\"$url\" ADD_DATE=\"$add_time\" ICON=\"\">$title</a></DT>\n";
}
echo "<p></p></dl>\n";
echo "<P></P></DL>\n";
echo "</DT>\n";
}

2
templates/admin/static/embed.js

@ -790,7 +790,7 @@ function export_link(url, fileName) { @@ -790,7 +790,7 @@ function export_link(url, fileName) {
layer.confirm('导出的链接可以导入到浏览器也可以再次导入到OneNav!', {icon: 3, title:'确定导出所有链接?'}, function(index){
var date = new Date();
var current_time = date.toLocaleDateString();
current_time = current_time.replaceAll("/","-");
current_time = current_time.replaceAll("/",".");
var url = "index.php?c=api&method=export_link";
var fileName = "OneNav_Export_" + current_time + ".html";
var x = new XMLHttpRequest();

Loading…
Cancel
Save