Sfoglia il codice sorgente

新增 BIM相關資訊 檔案日期

oransheep 3 anni fa
parent
commit
9e161773d9
2 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 5 0
      other-list.php
  2. 1 1
      script/php/getBIMData.php

+ 5 - 0
other-list.php

@@ -213,6 +213,7 @@ if (!isset($_SESSION['loggedin'])) {
 	<?php include("bim-support-body.html"); ?>
 
 	<script>
+		
 		$(document).ready(function() {
 			PDFObject.embed("./assets/null.pdf", "#pdfFile");
 			console.log(type);
@@ -269,6 +270,7 @@ if (!isset($_SESSION['loggedin'])) {
 						document.body.removeChild(link);
 
 					} else */
+					
 					if (data.node.text.includes(".pdf")) {
 						PDFObject.embed(data.node.a_attr.href, "#pdfFile");
 					} else {
@@ -281,6 +283,9 @@ if (!isset($_SESSION['loggedin'])) {
 						$("#fileName").empty();
 						$("#fileName").append(data.node.text);
 						$("#fileHerf").attr("href", data.node.a_attr.href);
+						
+						$("#fileDate").empty();
+						$("#fileDate").append(data.node.a_attr.time);
 					}
 
 

+ 1 - 1
script/php/getBIMData.php

@@ -30,7 +30,7 @@ function FindPath($root, $folder, $ajax)
                     echo ("<li data-jstree='{ " . '"type" : "file"' . " }' >");
                 }
                 
-                $path = "<a href='" . substr($rootPath, 4) . "/" . $path . "'>" . $path . "</a>";
+                $path = "<a href='" . substr($rootPath, 4) . "/" . $path . "' time='".date("Y-m-d H:i:s", filemtime("../.".substr($rootPath, 4) . "/" . $path))."'>" . $path . "</a>";
                 echo ($path);
                 echo ("</li>");
             //}