<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
<!--#include file="../../inc/config.asp"-->
<!--#include FILE="../../inc/upload_5xsoft.inc"-->
<%
  Response.Buffer = true
  Response.ExpiresAbsolute=now()-1
  Response.Expires=0
  Response.CacheControl="no-cache"
%>
<%
if Not ChkPost then 
response.redirect ("../../login/chklogin.asp?login=4")
response.end
end if

if session("id")="" then
response.Redirect("../../login/login1.asp")
response.end
end if

set upload=new upload_5xSoft

formPath=bizrepic

name1=Replace_Text(upload.form("name"))
bh=Replace_Text(upload.form("bh"))
counter=Replace_Text(upload.form("counter"))
fzjg=Replace_Text(upload.form("fzjg"))
typeid=Replace_Text(upload.form("typeid"))
fzrq=Replace_Text(upload.form("fzrq"))
gqrq=Replace_Text(upload.form("gqrq"))
gsid=session("id")

'iCount=0
for each formName in upload.objFile 
set file=upload.file(formName)
if file.FileSize>0 then
if file.filesize>2000000 then
response.write"<SCRIPT language=JavaScript>alert('您上传的图片大于规定大小(200K),请改变文件大小后再进行上传。');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
FileExt	= Mid(file.Filename, InStrRev(file.Filename, ".")+1)
FileExt	= FixName(FileExt)
If Not ( CheckFileExt(FileExt) and CheckFileType(File.FileType) ) Then
'if trim(right(file.FileName,3))<>"jpg" and trim(right(file.FileName,3))<>"gif" then
response.write"<SCRIPT language=JavaScript>alert('您上传的文件必须是gif|jpg|jpeg|bmp|png图象文件，请将你上传的文件转换为以上格式后再进行上传。');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
'FileName=gsid&MakedownName()&"."&mid(file.FileName,InStrRev(file.FileName, ".")+1)
FileName=gsid&MakedownName()&"."&FileExt
file.SaveAs Server.mappath(formPath&FileName)
picture=FileName
'iCount=iCount+1
end if
next
set file=nothing

set rs=server.createobject("adodb.recordset")
sql="select * from bizre where name='"&name1&"' and gsid="&gsid&""
'response.write sql 
rs.open sql,conn,1,3
if not rs.eof then
response.write"<SCRIPT language=JavaScript>alert('对不起，您已经提交过此信息！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end 
else
rs.addnew
rs("name")=name1
rs("bh")=bh
rs("counter")=counter
rs("fzjg")=fzjg
rs("typeid")=typeid
rs("fzrq")=fzrq
rs("gqrq")=gqrq

if picture="" then picture="nopicture.gif"
rs("picture")=picture
rs("gsid")=gsid
rs("dateandtime")=now()
rs.update
rs.close
set rs=noting
conn.close
set conn=nothing
set upload=nothing 
'response.redirect ("eidt.asp")
end if
'end if
'end if
'set file=nothing
'end if
'next
%>
<%
'if TrustpassFlag="true" then
'response.write"发邮件"
'end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>操作成功</title>
<link href="../../images/css.css" rel="stylesheet" type="text/css">
<meta HTTP-EQUIV=refresh Content='1;url=../bizre/index.asp'>
</head>

<table border="0" cellspacing="0" width="100%" cellpadding="0" height="418" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width="100%" height="418" valign="middle" align="center">
<b>恭喜您，您的证书信息已经发布成功！<a href="../bizre/index.asp">返回</a></b></td>
</tr>
</table>
</body>
</html>