📄 templet.asp
字号:
<%'--------------------------------------------------------------------------
' Project: AMBER-SOFT网络办公系统
' Module : 文档摸版
' By: spAce
' Discription: 模板般管理
'--------------------------------------------------------------------------%>
<%response.expiresabsolute=#jan 01,1980 00:00:00#
'if session("userid")="" then
' response.write "<SCRIPT LANGUAGE='JavaScript'>"&chr(13)
' response.write "<!--"&chr(13)
' response.write "parent.location.href=""/error/error.htm"""&chr(13)&chr(13)
' response.write "//-->"&chr(13)
' response.write "</SCRIPT>"&chr(13)
'end if
%>
<!--#include virtual="/_inc/GeneralADO.asp"-->
<!--#include virtual="/_inc/upFuncs.ASP"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/css/001//person.css" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
dim job
if GetValue("NAME")<>"" then
Set ambFile = CreateObject("AmbCom.AmbFile")
if ambFile.CreateFile(server.mappath("/DOCTEMPLET/_TEMPLET")&"\"&GetFilename("AttachFile"),2,1) then
if ambFile.SetBin(GetFile("AttachFile")) then
if GetValue("ID")<>"" then
oRS.Open "select * from DOC_TEMPLET where deleted=0 and ID="&GetValue("ID"),oCon,2,3
if not oRS.EOF then
oRS.addNew
oRS("NAME")=GetValue("NAME")
oRS("FILEPATH")=GetFilename("AttachFile")
oRS.update
end if
oRS.close
else
oRS.Open "select * from DOC_TEMPLET where 0=1",oCon,2,3
oRS.addNew
oRS("NAME")=GetValue("NAME")
oRS("FILEPATH")=GetFilename("AttachFile")
oRS.update
oRS.close
end if
job="add"
end if
RESPONSE.WRITE ambFile.GetErrMsg()
end if
end if
%>
<%
if request.querystring("modifyID")<>"" then
oRS.Open "select * from DOC_TEMPLET where deleted=0 and id="&request.querystring("modifyID"),oCon,1
if not oRS.EOF then
ID=oRS("ID")
NAME=oRS("NAME")
else
servercopy=1
end if
oRS.close
job="mod"
else
servercopy=1
end if
%>
<%
if request.querystring("deleteID")<>"" then
oRS.Open "select * from DOC_TEMPLET where deleted=0 and id="&request.querystring("deleteID"),oCon,2,3
if not oRS.EOF then
oRS("deleted")=1
oRS.update
end if
oRS.close
job="del"
end if
%>
<%
Set oTBL = CreateObject("Amber.Table")
otbl.setconnection oCon
otbl.pagesize=25
otbl.setsql "select * from DOC_TEMPLET"," deleted=0"
'otbl.tablestyle.cssclass=""
otbl.tablestyle.cellspacing=0
otbl.tablestyle.cellpadding=0
otbl.tablestyle.align="center"
'oTBL.setTitle ("<h2>所有任务列表:</h2>")
'otbl.title.intable=true
'otbl.title.style.stylestring="bgcolor=#FFFF66"
oTBL.Footer.value = "<hr>%&_RECCOUNT_% contact(s).<br>"
oTBL.Header.Style.align="center"
'oTBL.turnPage.Style.bgcolor="#FFE2CA"
'oTBL.Footer.Style.bgcolor="#FFE2CA"
'oTBL.AddDefaultCols "bgcolor=#CCFFFF"
otbl.addcolumn "NAME","文档摸版名称","%&NAME%","width=30%"
otbl.addcolumn "CREATEDATE","创建时间","%&CREATEDATE%","width=20% align=center"
otbl.addcolumn "DOWNLOAD","下载","<A HREF='/DOCTEMPLET/_TEMPLET/%&FILEPATH%'>下载</A>","width=20% align=center"
otbl.addcolumn "MODIFY","修改","<A HREF=""templet.asp?modifyID=%&ID%"">修改</A>","width=10% align=center"
otbl.addcolumn "DELETED","删除","<A HREF=""templet.asp?deleteID=%&ID%"">删除</A>","width=10% align=center"
otbl.imagePath="../../images/amber-table/002/"
otbl.tablestyle.width="100%"
otbl.tablestyle.stylestring="+border=0"
'otbl.adddelcol "delete",""
'otbl.cols("delete").caption=" "
otbl.company=""
' otbl.keyfield="id"
' otbl.delconfirm="确定要删除么?"
oTBL.createtable
otbl.displaytable
%>
<FORM METHOD=POST ACTION="Templet.asp" ENCTYPE="multipart/form-data">
<INPUT TYPE="Hidden" NAME="ID" value=<%=ID%> >
<TABLE Width=92% cellspacing=0 cellpadding=0 align=center border=0 >
<TR>
<TD>摸板名称</TD>
<TD><INPUT TYPE="TEXT" NAME="NAME" value="<%=NAME%>"> </TD>
</TR>
<TR>
<TD>模板文件</TD>
<TD><INPUT TYPE="File" NAME="AttachFile"></TD>
</TR>
<TR>
<TD colspan=2 align="center">
<%if request.querystring("modifyID")="" then%>
<INPUT TYPE="submit" value="加入">
<%else%>
<INPUT TYPE="submit" value="修改">
<%end if%>
</TD>
</TR>
</TABLE>
</FORM>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -