<!--#include file="../setting/conn.asp"--><!--#include file="../Inc/UploadCls.asp"-->
<%
If Not SoonBiz.CheckUp Then
ShowErr("您所在的用户组没有上传权限")
End If:fid="user":cid=0:act=SoonBiz.ract():Select Case act:Case "" : main():Case "addnew" : addnew():Case "save" : Dosave():Case "list" : uplist():Case "delimg" : delimg():End Select:SoonBiz.adfoot:Setallnothing:Sub main():SoonBiz.title="上传文件管理":SoonBiz.adhead:SoonBiz.nstate("上传文件管理"):nav:Response.Write chkupsize:End Sub:Sub addnew():SoonBiz.title="上传文件":SoonBiz.adhead:SoonBiz.nstate("上传文件"):nav:Response.Write "<table cellspacing=1 class=tableborder1>":Response.Write "<form action=""?act=save&cid=0&fid=0"" method=post name=myform enctype=""multipart/form-data"">":Response.Write "<tr>":Response.Write "<th>选择上传文件</th>":Response.Write "</tr>":Response.Write "<tr>":Response.Write "<td>":Response.Write "<input type=""file"" name=""file1"" size=""60"">":Response.Write "</td>":Response.Write "</tr>":Response.Write "</table>":Response.Write "<div class=""operate""><input type=""submit"" value=""上传""></div></td>":Response.Write "</form>":End Sub:Sub nav():Response.Write "<table cellspacing=""1"" class=tableborder1>":Response.Write " <tr>":Response.Write " <th colspan=2 height=22>上传管理</th>":Response.Write " </tr>":Response.Write " <tr>":Response.Write " <td width=75 height=30><b>管理导航:</b></td>":Response.Write " <td width=* height=30><a href=""?"">上传管理首页</a> | <a href=""?act=addnew"">上传文件</a> | <a href=""?act=list"">管理已上传文件</a></td>":Response.Write " </tr>":Response.Write "</table>":Response.Write "<br />":End Sub:Sub uplist():Dim sql:Dim tr:tr="<tr onmouseover=""this.style.backgroundColor='#e2e8f4';"" onmouseout=""this.style.backgroundColor='';"" align='center'> <td>{$id}</td> <td align='left'><a href=""{$ufilename}"" target=""new"" class=""ahover"">{$ufilename}<script type=""text/javascript"">hoverview(""{$ufilename}"");</script></a></td> <td><script type=""text/javascript"">document.write(channelname['{$cid}']);</script></td> <td style='text-align:right;'>{$ufilewidth}*{$ufileheight} <script type=""text/javascript"">getsize({$filesize});</script></td> <td>{$stime_short}</td> <td><input type='checkbox' name='id' value='{$id}'></td></tr>":sql="select * from ["& sheethead &"_uplist] where isdel=0 and uid="& SoonBiz.user_id &" order by id desc":SoonBiz.adhead():SoonBiz.nstate("本页上传文件管理"):nav:Response.Write SoonBiz.JsChannel:Response.Write "<div class=""adminup"">":Response.Write " <form method=post action=""?"" id=""myform"" name=""myform"">":Response.Write " <table cellspacing=1 class=tableborder1>":Response.Write " <tr>":Response.Write " <th width=40>ID</th>":Response.Write " <th>文件名</th>":Response.Write " <th>频道</th>":Response.Write " <th width=100 style='text-align:right;'>属性</th>":Response.Write " <th>时间</th>":Response.Write " <th width=30>选择</th>":Response.Write " </tr>":Response.Write SoonBiz.ReplaceMdb("admin_img",sql,tr,16,0):Response.Write "</table>":Response.Write "<div class=""operate"">":Response.Write " <input type=""button"" onClick=""CheckAll(myform)"" value=""全选"">":Response.Write " <input type=""button"" onClick=""ContraSel(myform)"" value=""反选"">":Response.Write " <input type=""button"" onClick=""Csubmit('myform','?act=delimg&fid="& fid &"','确定要删除选择的文件么?\n此操作不可以恢复!')"" value=""删除"">":Response.Write "</div>":Response.Write "</form>":Response.Write "</div>":Response.Write SoonBiz.pagelist(""):End Sub:Sub delimg():SoonBiz.execute("update "& sheethead &"_uplist set isdel=1 where uid="& SoonBiz.user_id &" and id in("& SoonBiz.rids &")"):SoonBiz.ok:End Sub:Function Tonum(str)
If str="y" Then
Tonum=1
Else:Tonum=0
End If:End Function
%>