更新文件: fs_share.py, requirements.txt, sim.txt, xy115-1.txt, get115list.py 等159个文件

This commit is contained in:
ZJP Monitor
2025-05-11 09:58:11 +08:00
parent 2c8af4fce2
commit 3def5a2b51
159 changed files with 80579 additions and 0 deletions

BIN
htdocs/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
htdocs/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

99
htdocs/script.js Normal file
View File

@ -0,0 +1,99 @@
// Cached plugin reference (or null. if it could not be instantiated)
var sharePointPlugin = undefined;
function onLoad() {
// console.log("loaded.");
}
/**
* Find (and cache) an available ActiveXObject Sharepoint plugin.
*
* @returns {ActiveXObject} or null
*/
function getSharePointPlugin() {
if( sharePointPlugin !== undefined ) {
return sharePointPlugin;
}
sharePointPlugin = null;
var plugin = document.getElementById("winFirefoxPlugin");
if ( plugin && typeof plugin.EditDocument === "function" ) {
window.console && console.log("Using embedded custom SharePoint plugin.");
sharePointPlugin = plugin;
} else if( "ActiveXObject" in window ){
plugin = null;
try {
plugin = new ActiveXObject("SharePoint.OpenDocuments.3"); // Office 2007+
} catch(e) {
try {
plugin = new ActiveXObject("SharePoint.OpenDocuments.2"); // Office 2003
} catch(e2) {
try {
plugin = new ActiveXObject("SharePoint.OpenDocuments.1"); // Office 2000/XP
} catch(e3) {
window.console && console.warn("Could not create ActiveXObject('SharePoint.OpenDocuments'): (requires IE <= 11 and matching security settings.");
}
}
}
if( plugin ){
window.console && console.log("Using native SharePoint plugin.");
sharePointPlugin = plugin;
}
}
return sharePointPlugin;
}
/**
* Open an MS Office document either with SharePoint plugin or using the 'ms-' URL prefix.
*
* @param {object} opts
* @returns {boolean} true if the URL could be opened
*/
function openWebDavDocument(opts) {
var ofe_link = opts.ofe + opts.href, // (e.g. 'ms-word:ofe|u|http://server/path/file.docx')
url = opts.href;
var plugin = getSharePointPlugin();
var res = false;
if( plugin ) {
try {
res = plugin.EditDocument(url);
if( res === false ) {
window.console && console.warn("SharePoint plugin.EditDocument(" + url + ") returned false");
}
} catch(e) {
window.console && console.warn("SharePoint plugin.EditDocument(" + url + ") raised an exception", e);
}
}
if ( res === false ) {
if( ofe_link ) {
window.console && console.log("Could not use SharePoint plugin: trying " + ofe_link);
window.open(ofe_link, "_self");
res = true;
}
}
return res;
}
/**
* Event delegation handler for clicks on a-tags with class 'msoffice'.
*/
function onClickTable(event) {
var target = event.target || event.srcElement,
opts = {
href: target.href,
ofe: target.getAttribute("data-ofe")
};
if( target.className === "msoffice" ){
if( openWebDavDocument(opts) ){
// prevent default processing if the document could be opened
return false;
}
}
}

59
htdocs/style.css Normal file
View File

@ -0,0 +1,59 @@
body {
margin: 0;
padding: 8px;
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}
h1 {
margin: 4px 0 4px 0;
}
img {
border: 0;
padding: 0 2px;
vertical-align: text-bottom;
}
table.dir-listing {
border: 0;
border-collapse: collapse;
}
table.dir-listing tbody tr:hover
{
background-color: #eee;
}
table.dir-listing tbody tr td a
{
color: #000;
text-decoration: none;
}
table.dir-listing tbody tr:hover td a
{
text-decoration: underline;
}
table.dir-listing tr.directory td a
{
font-weight: bold;
}
table.dir-listing tr td a.symlink {
font-style: italic;
color: darkmagenta;
}
table.dir-listing th,
table.dir-listing td
{
padding: 2px 20px 2px 2px;
/* text-align: left; */
font-family: monospace;
vertical-align: bottom;
/* white-space: pre; */
}
table.dir-listing th:nth-child(3),
table.dir-listing td:nth-child(3)
{
text-align: right;
}
p.auth-user {
font-size: smaller;
text-align: right;
}
p.trailer {
font-size: smaller;
}

105
htdocs/template.html Normal file
View File

@ -0,0 +1,105 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="WsgiDAV/{{ version }}">
<title>WsgiDAV - Index of {{ display_path }} </title>
<link rel="shortcut icon" href="{{ htdocs }}/favicon.ico">
<link rel="stylesheet" href="{{ htdocs }}/style.css" />
<script defer src="{{ htdocs }}/script.js"></script>
<style type="text/css"> A {behavior: url(#default#AnchorClick);} </style>
</head>
<body onload="onLoad()">
<h1>
{%- if config.icon %}
<img class="logo" alt="WsgiDAV" title="WsgiDAV" src="{{ htdocs }}/logo.png">
{% endif -%}
Index of {{ display_path }}
</h1>
{% if config.davmount_links %}
<p class="links">
<a title="Open this folder in a registered WebDAV client." href="{{ url }}?davmount">Mount</a>
</p>
{% endif %}
{%- if user_name and config.show_user %}
<p class="auth-user">
Authenticated user: "{{user_name}}", realm: "{{realm}}", access: {{access}}.
{%- if is_authenticated and config.show_logout %}
<a title="Logout current user" href="{{ url }}?logout" target="_blank" rel="noopener noreferrer">Logout</a>
{% endif -%}
{%- if user_roles %}
, roles: {{ user_roles }}
{% endif -%}
</p>
{% endif -%}
<hr>
<table class="dir-listing" onclick="return onClickTable(event)">
<colgroup>
<col>
<col>
<col class="right">
<col class="right">
</colgroup>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Size</th>
<th>Last modified</th>
</tr>
</thead>
<tbody>
{%- if not is_top_dir %}
<tr class="directory">
<td>
<a href="..">..</a>
</td>
<td>Directory</td>
<td>-</td>
<td></td>
</tr>
{% endif -%}
{% for row in rows %}
<tr class="{{ row.tr_class }}">
<td>
<a class="{{ row.a_class }}" href="{{row.href}}" {% if row.ofe_prefix %} data-ofe="{{row.ofe_prefix}}" {% endif %} >
{{row.display_name}}
</a>
{%- if row.href_2 %}
<a class="{{ row.a_class_2 }}" href="{{row.href_2}}" {% if row.ofe_prefix_2%} data-ofe="{{row.ofe_prefix_2}}" {% endif %} >
{{row.display_name_2}}
</a>
{% endif -%}
{%- if row.add_link_html %}
{{row.add_link_html | safe}}
{% endif -%}
</td>
<td>{{ row.display_type }}</td>
<td>{{ row.str_size }}</td>
<td>{{ row.str_modified }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<hr>
{% if trailer %}
<p class="trailer">{{ trailer | safe }}</p>
{% endif %}
<object id="winFirefoxPlugin" type="application/x-sharepoint"
width="0" height="0" style="visibility: hidden;"></object>
</body>
</html>