网页版文件(证照、档案、合同等)管理系统

来源:https://www.52pojie.cn/thread-2108354-1-1.html 主要更新内容: 1、支持自定义字段的标签名称、自定义字段的显示顺序(包括是否显示),满足文件管理之外的多种业务需求和便于用户根据侧重点灵活查看数据。 也就是说,在系统设置模块中,不仅可以对字段的标签名进行自定义,还可以分别对文件列表页面的字段展示内容、文件增改看页面的字段内容进行设置,自行决定展示哪…

6效率工具52pojie吾爱破解

来源:https://www.52pojie.cn/thread-2108354-1-1.html



主要更新内容:
1、支持自定义字段的标签名称、自定义字段的显示顺序(包括是否显示),满足文件管理之外的多种业务需求和便于用户根据侧重点灵活查看数据。
也就是说,在系统设置模块中,不仅可以对字段的标签名进行自定义,还可以分别对文件列表页面的字段展示内容、文件增改看页面的字段内容进行设置,自行决定展示哪些字段以及字段的出现顺序。
2、针对网友提出的附件预览的要求,可点击附件列表前的眼睛图标进行预览(支持预览的类型包括:word文档、excel文档、txt和md纯文本文档、pdf文档、jpg/bmp/png/gif/tiff图片文档)。如果部署在公网服务器,可以使用微软的在线预览服务完美预览office文档;但是如果不能访问公网或在localhost本机测试时,系统内置的js库对旧板的doc文档无法预览,对新版的docx能查看文字和图片(复杂排版支持不佳)。示例数据中已包括了docx/doc/xlsx/pdf/txt/jpg的文件实体,测试时可以查看效果,再说一遍:在本机localhost测试时,office文档的展示不佳,但在公网服务器上没问题!
新增了测试截屏如下。










===================
之前的帖子内容如下
===================在原创区看到了Thebzk君的原创软件:证照管理系统(https://www.52pojie.cn/thread-2105011-1-1.html),现在把我以前写的一个网页版的放上来,方便有需求的网友。
软件名称:中科文件存档系统(名称等均可自定义,详见下方的介绍)
软件类型:经典ASP + Access数据库
运行环境:Windows 7 以上 需要 IIS,没有IIS的可以安装压缩包里engine目录下的绿色版ASP服务软件和ADO数据库驱动。
本系统旨在便于中小型企事业单位集中收集、管理文件资料,支持灵活部署于内网或公网的 IIS 服务器上。
主要模块:
文件管理模块:支持文件的录入、编辑、删除以及附件管理。
用户管理模块:支持用户的录入、编辑、删除,并可设置用户的权限等级。
系统设置模块:可自定义系统名称、权限等级名称、下拉选项内容及字段标签等信息。
数据库中自带了20条演示数据。

以下为文件列表页的代码:
[HTML] 纯文本查看 复制代码
<!-- #include file="db.asp" -->

<%
CheckLogin 0

' 处理删除请求(在iframe内部直接处理)
if request("act") = "del" and request("id") <> "" then
        CheckLogin 2
        id = request("id")
        Set rsd = Server.CreateObject("ADODB.Recordset")
        sqld = "SELECT * FROM files WHERE id=" & id
        rsd.Open sqld, conn, 1, 3
        if rsd.eof then
                msg = "未找到要删除的数据"
        else
                ' 删除相关附件
                Set rsa= Server.CreateObject("ADODB.Recordset")
                        Sqla = "Select * From att where f_id='"&id&"'"
                rsa.open sqla, conn, 1, 3
                if not rsa.eof then
                        do while not rsa.eof
                        fileName = rsa("url")
                        filePath = Server.MapPath("uploads/" & fileName)
                        Set fso = CreateObject("Scripting.FileSystemObject")
                        If fso.FileExists(filePath) Then
                                fso.DeleteFile(filePath), True
                        End If
                        Set fso = Nothing
                        rsa.delete
                        rsa.update
                        rsa.movenext
                        loop   
                end if
                rsa.close
                set rsa = nothing
                set rsa=nothing
        
                rsd.delete
                rsd.update
                msg = "成功删除数据"
        End If
        rsd.Close
        set rsd = nothing
%>

<script>
// 删除后父页面左侧列表隐藏已被删除的条目
const reminderRow = parent.window.document.getElementById('reminder_<%=id%>');
if(reminderRow) reminderRow.style.display = 'none';
// 本页面弹出对话框并刷新
alert('<%=msg %>');
window.location.href='file_list.asp';
</script>

<%
        Response.End
end if

keyword = Trim(Request.QueryString("keyword"))
page = Request.QueryString("page")
If IsNumeric(page) = False Or page = "" Then page = 1 Else page = CInt(page)
'构建查询语句
sql = "SELECT * FROM files WHERE 1=1"
        If keyword <> "" Then
        sql = sql & " AND (文件名称 LIKE '%" & Replace(keyword,"'","''") & "%' OR 责任部门 LIKE '%" & Replace(keyword,"'","''") & "%' OR 责任人 LIKE '%" & Replace(keyword,"'","''") & "%' OR 内容摘要 LIKE '%" & Replace(keyword,"'","''") & "%' OR 备注 LIKE '%" & Replace(keyword,"'","''") & "%' )"
        End If


Set rs = Server.CreateObject("ADODB.Recordset")
sql = sql & " ORDER BY id desc"
rs.Open sql, conn, 1, 1
file_count=rs.recordcount
if file_count > 0 then
file_count="("&file_count&")"
else
file_count=""
end if
pagesize = conn.execute("select top 1 显示数量 from system ")(0)
If Not rs.EOF Then rs.PageSize = pagesize
totalPages = rs.PageCount
If page > totalPages Then page = totalPages
If page < 1 Then page = 1
If Not rs.EOF Then rs.AbsolutePage = page
%>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
* {box-sizing:border-box;outline:none;}
body { margin:0; padding:30px; text-align: center; }
a {text-decoration:none;transition: all 0.3s ease;}
a:link, a:visited, a:hover, a:active { color: inherit; /* 继承父元素的颜色 */}

li, li a {list-style:none;line-height:1.5;font-size:0.75rem;color:#666;}
li a:hover {color:#000;}

table {border-collapse: collapse; width:100%;border-radius:8px; text-align:left;overflow:hidden;box-shadow:0px 0px 30px rgba(0,0,0,0.3);justify-self:center;letter-spacing:1px;font-weight:100;table-layout: fixed;}

tr {border-top: 1px solid #ccc;}
tr:nth-of-type(odd) {background-color: #ffffff;}
tr:nth-of-type(even) {background-color: #f8f8f8;}
tr:last-child {border-bottom:0;}

th {padding:12px 10px;font-size:14px;font-weight:700;color:#555; background-image: linear-gradient(to top, #c5c5c5 0%, #F5F5F5 60%, #fff 100%);}


td {padding:8px 10px;font-size:0.8rem;  word-break: break-word; }
th:last-child, td:last-child {text-align:center;}

textarea {resize: vertical;} /*只允许纵向拉伸*/

/*搜索框*/
#searchform {font-size:0;display:flex;box-shadow:0px 0px 15px rgba(0,0,0,0.4);border-radius:20px;height:40px;}
#searchKeyword {border-radius:20px 0px 0px 20px;border:none;padding:0 1rem;width:260px;height:100%;background:#fff;}
#btn-search {padding:0.5rem 1rem;cursor:pointer;background:#fff;color:#555;border:none;margin-left:0;border-radius:0px 20px 20px 0px;height:100%;transition:0.3s;}

/*页码导航框*/
.page_nav {font-weight:100;display:flex;align-items:baseline;justify-content:space-between;border:none;border-radius:40px;padding:6px 16px;box-shadow:0px 0px 15px rgba(0,0,0,0.4);width:300px;height:40px;}
/* 页码 */
.page_num {background: #666;color: #fff;border-radius: 40px;padding: 6px 16px;font-weight: 500;font-size: 0.75rem;letter-spacing: 0.2px; white-space: nowrap;display: inline-flex;align-items: baseline;gap: 0.2rem;}
.page_icon  {color:#666;transition:0.5s ease;display: inline-block;}/*关键:a元素是默认inline,一定要设置为inlin-bolck或block*/
.page_icon:hover {animation: rotateOnce 0.5s ease forwards;  /* forwards 保持最终状态 */}
@keyframes rotateOnce {
    0% {transform: rotate(0deg);} 100% {transform: rotate(360deg);}
}
.page_icon a, .page_icon a:visited {color:#666;}
.disabled {cursor:not-allowed;opacity: 0.3;}
.disabled:hover {animation:none;}

/*按钮*/
.btn { padding:8px 20px; cursor:pointer; background-image: linear-gradient(to top, #c5c5c5 0%, #F5F5F5 60%, #fff 100%); color:#555; border-radius:4px; margin:0 1px; transition:0.3s ease; border:1px solid #c5c5c5;}
.btn:hover { border-color:#666;}
.small-btn {padding:4px 8px; cursor:pointer; background-image: linear-gradient(to top, #c5c5c5 0%, #F5F5F5 60%, #fff 100%); color:#555; border-radius:4px; margin:0 1px; transition:0.3s ease; border:1px solid #c5c5c5;}
.small-btn:hover { border-color:#666;}

</style>

</head>
<body>

<!--顶部搜索框和页码-->
<div style="display:flex;justify-content:space-between;margin-bottom:20px;height:40px;align-items: stretch; ">
        <form id="searchform">
                <div style="display:flex;align-items:center;">
                        <input type="text" id="searchKeyword" name="keyword" value="<%=keyword%>" placeholder="请输入关键字">
                        <button id="btn-search" type="submit" style=""><svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="currentColor" viewBox="0 0 24 24"><path d="M18 10c0-4.41-3.59-8-8-8s-8 3.59-8 8 3.59 8 8 8c1.85 0 3.54-.63 4.9-1.69l5.1 5.1L21.41 20l-5.1-5.1A8 8 0 0 0 18 10M4 10c0-3.31 2.69-6 6-6s6 2.69 6 6-2.69 6-6 6-6-2.69-6-6"></path></svg></button>
                </div>
        </form>

        <div  class="page_nav" style="font-size:20px; font-weight:100; color:#555; letter-spacing:0.1em; text-align:center; display:flex; align-items:baseline; justify-content:center; border:none; border-radius:40px; padding:6px 16px; box-shadow:0px 0px 15px rgba(0,0,0,0.4); width:400px; height:40px;">文件列表<%=file_count%></div>

        <div class="page_nav">
                <%if page=1 then%>
                <span class="page_icon disabled">&#9664;</span>
                <span class="page_icon disabled">&#9665;</span>
                <%else%>
                <span class="page_icon"><a href="?keyword=<%=keyword%>&page=1" <%if page=1 then%>disabled<%end if%>>&#9664;</a></span>
                <span class="page_icon"><a href="?keyword=<%=keyword%>&page=<%=page-1%>">&#9665;</a></span>
                <%end if%>

                <span class="page_num"><%=page%> / <%=totalPages%></span>

                <%if page=totalPages then%>
                <span class="page_icon disabled">&#9655;</span>
                <span class="page_icon disabled">&#9654;</span>
                <%else%>
                <span class="page_icon"><a href="?keyword=<%=keyword%>&page=<%=page+1%>">&#9655;</a> </span>
                <span class="page_icon"><a href="?keyword=<%=keyword%>&page=<%=totalPages%>">&#9654;</a></span>
                <%end if%>
        </div>
</div>

<!--文件列表主体-->

<table>
<%
Set rsl_show = Server.CreateObject("ADODB.Recordset")
sql_show = "SELECT top 1 * FROM system"
rsl_show.Open sql_show, conn, 1, 1

label_list = rsl_show("列表显示字段")
label_list = Trim(label_list)
If Right(label_list, 1) = "|" Then
    label_list = Left(label_list, Len(label_list) - 1)
End If

rsl_show.close
set rsl_show = nothing

' 将label_list转换为数组
label_array = split(label_list, "|")

' 检查是否包含"附件"
Dim hasAttachment : hasAttachment = False
Dim attachmentIndex : attachmentIndex = -1
For i = 0 to UBound(label_array)
    If label_array(i) = "附件" Then
        hasAttachment = True
        attachmentIndex = i
        Exit For
    End If
Next
%>
<thead>


        <tr>
                <%
                For i = 0 to UBound(label_array)
                        If label_array(i) = "附件" Then
                                ' 附件直接显示表头
                %>
                                <th>附件</th>
                <%
                        Else
                                ' 从labels表获取显示名称
                                Set rs_label = Server.CreateObject("ADODB.Recordset")
                                sql_label = "select label_name from labels where relation='" & Replace(label_array(i), "'", "''") & "'"
                                rs_label.Open sql_label, conn, 1, 1
                                if not rs_label.eof then
                                        label_display = rs_label("label_name")
                                else
                                        label_display = label_array(i)
                                end if
                                rs_label.Close
                                Set rs_label = Nothing
                %>
                                <th style="width:<%=85 / (UBound(label_array) + 1)%>%;"><%=label_display%></th>
                <%
                        End If
                Next
                %>
                <th style="width:15%;">操作</th>
        </tr>
</thead>
<tbody>
        <%
        If Not rs.EOF Then
                For iRow = 1 To rs.PageSize
                If rs.EOF Then Exit For
                id = rs("id")
        %>
        <tr>
                <%
                ' 按label_array的顺序显示字段
                For i = 0 to UBound(label_array)
                        If label_array(i) = "附件" Then
                                ' 显示附件内容
                %>
                                <td>
                                <%
                                set rsa = server.CreateObject("adodb.recordset")
                                Sqla = "Select * From att where f_id='" & id & "'"
                                rsa.open sqla, conn, 1, 1
                                if not rsa.eof then
                                        do while not rsa.eof
                                                att_id = rsa("att_id")
                                                att_url = rsa("url")
                                                splitpos = InStr(att_url, "_") ' 从左向右找第一个下划线
                                                att_name = Left(att_url, splitpos - 1) ' 从下划线开始取到开头,不包含下划线
                                                lastdot = InStrRev(att_url, ".") ' 从右往左找第一个点
                                                ext = Mid(att_url, lastdot) ' 从点开始取到末尾,包含点
                                                att_name=att_name&ext
                                %>
                                                <li id='del<%=att_id%>'>
                                                        <a href='uploads/<%=att_url%>' download>&#128196; <%=att_name%></a>
                                                </li>
                                <%
                                                rsa.movenext
                                        loop
                                else
                                        Response.Write "-"
                                end if
                                rsa.close
                                set rsa = nothing
                                %>
                                </td>
                <%
                        Else
                                ' 显示普通字段
                                For each f in rs.Fields
                                        If f.name = label_array(i) Then
f_value=f.value
If Not IsNull(f_value) Then
f_value=replace(f_value,"/","-")
end if
if len(f_value)>8 then f_value=left(f_value, 8)&"..."
                %>
                                                <td><%=f_value%></td>
                <%
                                                Exit For
                                        End If
                                Next
                        End If
                Next
                %>
                <td>
                <% If g_UserRole >= 2 Then %>
                        <a href="file_edit.asp?id=<%=id%>"><button class="small-btn">编辑</button></a>
                        <a href="?act=del&id=<%=id%>"><input type="button" class="small-btn" value="删除"></a>
                <% End If %>
                        <a href="file_view.asp?id=<%=id%>"><button class="small-btn">查看</button></a>
                </td>
        </tr>
        <%
                rs.MoveNext
                Next
        Else
                Response.Write "<tr><td colspan='" & (UBound(label_array) + 2) & "' style='text-align:center;padding:20px;'>暂无数据</td></tr>"
        End If
        %>
</tbody>
</table>

<%
rs.Close
Set rs = Nothing
%>
</body>
</html>


下载地址:
通过网盘分享的文件:文件存档系统
链接: https://pan.baidu.com/s/13Uh2c8n2lcPkkmB-hVDt7g?pwd=52pj 提取码: 52pj

下载地址