【调度系统】广东民航医疗快线调度系统源代码
wanglizhong
2025-04-21 b8349bc19da36ab153c5466db7d089888a89f955
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<!--include virtual="/inc/chkadmin.gds"-->
<!--#include file='upfileconfig.asp'-->
<%
PicLinkDatabase    = request("PicLinkDatabase")
PicLinkDataname    = request("PicLinkDataname")
PicLinkDataID    = request("PicLinkDataID")
PICs    = request("PICs")
PicUp    = request("PicUp")
 
if PICs="" then
  PICs=1
else
  PICs=cint(PICs)
end If
if PicAlbumsID="" then PicAlbumsID=0
 
'删除图片
DelID    = request("DelID")
if DelID<>"" then
    sql="delete from GBR.dbo.Picture where PicID="&DelID
    objConn.Execute sql
end if
'删除图片End
%>
<title>图片管理页面</title>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
BODY{
BACKGROUND-COLOR: #FFFFFF;
font-size:9pt
}
TABLE.Form TD 
    {
        padding-left:5px;
        line-height: 20px;
        background-color:#FFFFFF;
        font-family:宋体;
        font-size: 9pt;
    }
.tx1 { height: 20px;font-size: 9pt; border: 1px solid; border-color: #000000; color: #0000FF}
.tx2 { font-size: 9pt}
    </style>
</head>
<body bgcolor="#d6dff7" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="Menu">
<%
'On Error Resume Next
Server.ScriptTimeOut=999999
response.write request("act")
if request("act")="upload" Then
 
    savepath=Server.MapPath("/"&UploadFilePath)
    'savepath=UploadFilePath
    '创建文件夹
    set MyFile=server.CreateObject("Scripting.FileSystemObject")
    ymd = year(now) & month(now)
    savepath = savepath & "\" & ymd & "\"
    filepath = UploadFilePath & "/" & ymd
    If Not MyFile.FolderExists(savepath) Then
    MyFile.CreateFolder(savepath)
    End If
    CreateFolder(savepath)
    Set Upload=Server.CreateObject("Persits.Upload")
    Upload.SetMaxSize UploadLimitSize*1024, True
    Upload.OverwriteFiles = false
    if Request.QueryString("PID") = "" then
        Upload.ProgressID="010D60EB00C5AA4B"
    else
        Upload.ProgressID=Request.QueryString("PID")
    end if
    Count=Upload.Save(savepath)
    If Err.Number <> 0 Then
        Response.Write "<div style=""color:red;font-size:12px;"">出现错误: " & Err.Number & "、" & Err.Description &"<a href=""javascript:history.go(-1)"">重新上传</a></div>"
    End If
    If Err.Number = 8 Then
        Response.Write "<div style=""color:red;font-size:12px;"">你上传的文件超过限制("& UploadLimitSize/1024 &"M)<a href=""javascript:history.go(-1)"">重新上传</a></div>" 
        response.end
    end If
    TotalBytesint=UploadLimitSize
    
    '上传文件
    dim inputname
    dim size,rs_upfile
    For Each File in Upload.Files
        if not  CanUpload(File.ext) then
            File.Delete
            response.write "<div style=""color:red;font-size:12px;"">"&file.filename &"("& file.size &") 格式不正确!<a href=""javascript:history.go(-1)"">重新上传</a></div>"
        Else
            '文件重命名
            dim NewName
            NewName = year(now())&month(now())&day(now())&hour(now())&minute(now())&second(now())&File.ext
            File.Move savepath & "\" & NewName
            formPath=savepath&"\"
            filename=NewName
 
            '-------自动压缩图片 720*720 -------
            W = cint(720)
            H = cint(720)
            Call BuildSmallPic(formPath&filename, formPath&filename, W, H, 80)
            
            '-------------end--------------------
 
            '写入数据库
            sql="Insert into Picture (PicLinkDatabase,PicLinkDataname,PicLinkDataID,PicAlbumsID,PicUp,PicURL,PicAdminID,PicTotalBytes) values ('"&PicLinkDatabase&"','"&PicLinkDataname&"',"&PicLinkDataID&","&PicAlbumsID&","&PicUp&",'"&filepath&"/"&filename&"','"&session("adminID")&"',"&TotalBytesint&")"
            'Response.Write sql
            'objConn.Execute sql
        end if
    next
end if%>
 
<%
Set rs = Server.CreateObject("ADODB.Recordset")
i=0
If 1=2 then
    sql="select * from GBR.dbo.Picture WHERE PicLinkDatabase='"&PicLinkDatabase&"' and PicLinkDataname='"&PicLinkDataname&"' and PicLinkDataID="&PicLinkDataID&" order by PicUp"
    'rs.open sql,objConn,1,1
 
    if not rs.eof then Response.Write "<tr>"
    do while not rs.eof
      PicID    = rs("PicID")
      PicURL= rs("PicURL")
      PicUp    = rs("PicUp")
      i=i+1
    if i=5 or i=10 or i=15 or i=20 then Response.Write "</tr><tr>"
    %>
      <td  class="tx2">
      <a href="/<%=PicURL%>" target="_blank"><img src="/<%=PicURL%>" height="100" border="0"></a>
      <br>[<a href="upload_products.asp?PicLinkDatabase=<%=PicLinkDatabase%>&PicLinkDataname=<%=PicLinkDataname%>&PicLinkDataID=<%=PicLinkDataID%>&PICs=<%=PICs%>&DelID=<%=PicID%>"><font color="#000000">删除图片</font></a>]
      <br>&nbsp;
      </td>
    <%
    rs.MoveNext
    loop
    rs.close()
 
    if i<0 then Response.Write "</tr>"
End If
%>
 
<%if i<PICs Then%>
 
    
    
 
  <tr><FORM NAME="MyForm" method="post" ENCTYPE="multipart/form-data" ACTION="?act=upload&PicLinkDatabase=<%=PicLinkDatabase%>&PicLinkDataname=<%=PicLinkDataname%>&PicLinkDataID=<%=PicLinkDataID%>&PicUp=<%=PicUp+1%>&PICs=<%=PICs%>">
      <td  class="tx2" colspan="<%=i%>">
       <INPUT NAME="FILE1" TYPE="FILE" SIZE="16"> <input name="Submit" type="submit" value="上传图片" onclick="return chk()">
      [<a href="upload_products.asp?filename=/TVupfile/LOGO.jpg"><font color="#000000">不使用图片</font></a>]
      </td>
    </FORM>
  </tr>
<%end if%>
</table>
 
</body>
</html>