分类分类
关注+2004-11-07作者:蓝点
/* addemployee.asp */
*************************************************************************
/* transact1.asp*/
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Dim Fields
Dim strTitle,strSort,strContent
Dim rs,sSql
Dim iMaxid
Dim strMaxid
Dim strlen
Set Fields = GetUpload()
strTitle=BinaryToString(Fields("txtTitle").value)
strSort=BinaryToString(Fields("txtSort").value)
strContent=BinaryToString(Fields("txtContent").value)
strSort=split(trim(strSort),"-")
if instr(1,lcase(Fields("file").FileName),".jpg")=0 and instr(1,lcase(Fields("file").FileName),".gif")=0 then
response.write ""
response.write ""
Response.end
end if
if Fields("file").Length>500000 then
response.write ""
response.write ""
response.end
end if
'/*存至数据库*/
if Fields("file").FileName<>"" then
Set rs=Server.CreateObject("ADODB.Recordset")
sSql="select * from employee order by id desc"
rs.open sSql,conn,2,2
if not rs.eof then
iMaxid=Clng(rs("id"))+1
strlen=4-len(cstr(iMaxid))
strMaxid=string(strlen,"0") & cstr(iMaxid)
else
strMaxid="0001"
end if
rs.addnew
rs("id")=strMaxid
rs("title")=strTitle
rs("sort")=strSort(0)
rs("img").AppendChunk Fields("file").Value
rs("content")=quoteChg(strContent)
rs("todate")=date()
rs.update
rs.close
response.write ""
end if
end if
%>
**********************************************************************
/*fupload.inc*/
相关文章
更多+相同厂商
热门推荐
点击查看更多
点击查看更多
点击查看更多
说两句网友评论