⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 save_edit.asp

📁 OA最新破解2008版 全新 破解 希望大家用着舒服
💻 ASP
字号:
<!--#include file="../../conn/dbconn2.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

if Chkrequest(upload.form("info_id")) then
info_id=upload.form("info_id")
else
Response.Redirect ("../../login/chklogin.asp?login=4")
end if
 
p_z_Z_Type=Replace_Text(upload.form("p_z_Z_Type"))
p_z_Z_Subject=Replace_Text(upload.form("p_z_Z_Subject"))
sortid=Replace_Text(upload.form("sortid"))
typeid=Replace_Text(upload.form("typeid"))
p_z_Z_Keywords=Replace_Text(upload.form("p_z_Z_Keywords"))
content=Replace_Text(upload.form("content"))
period=Replace_Text(upload.form("period"))
more_info=Replace_Text(upload.form("more_info"))
Specifications=Replace_Text(upload.form("Specifications"))
Quantity=Replace_Text(upload.form("Quantity"))
Packaging=Replace_Text(upload.form("Packaging"))
PriceTerms=Replace_Text(upload.form("PriceTerms"))
TrustpassFlag=Replace_Text(upload.form("TrustpassFlag"))
if TrustpassFlag="" then
TrustpassFlag=0
else
TrustpassFlag=1
end if
FeedbackFlag=Replace_Text(upload.form("FeedbackFlag"))
if FeedbackFlag="" then
FeedbackFlag=0
else
FeedbackFlag=1
end if
gsid=session("id")

sql="select info_id from info where type='"&p_z_Z_Type&"' and showname='"&p_z_Z_Subject&"' and gsid="&gsid&" and info_id<>"&info_id&"" 
set rs=conn.Execute(sql)
if not rs.eof then
response.write"<SCRIPT language=JavaScript>alert('对不起,您已经提交过此信息!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end 
end if

if upload.form("cimg")=2 then
filepath=newspic&upload.form("img")
set fs=server.CreateObject("scripting.filesystemobject")
filepath=server.MapPath(filepath)
formPath=newspic

if right(formPath,1)<>"/" then formPath=formPath&"/" 
'iCount=0
for each formName in upload.objFile
set file=upload.file(formName)
if file.FileSize>0 then
if file.filesize>200000 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

sql="select picture from info where info_id="&info_id&""
set rs=conn.Execute(sql)
if fs.FileExists(filepath) and rs("picture")<>"nopicture.gif" then
     fs.DeleteFile filepath,true
end if


'FileName=gsid&MakedownName()&"."&mid(file.FileName,InStrRev(file.FileName, ".")+1)
file.SaveAs Server.mappath(formPath&FileName)
picture=FileName
'iCount=iCount+1
end if
next
set file=nothing
end if

set rs=server.createobject("adodb.recordset")
sql="select * from info where info_id="&info_id&""
'response.write sql 
rs.open sql,conn,1,3
rs("type")=p_z_Z_Type
rs("showname")=p_z_Z_Subject
rs("sortid")=sortid
rs("typeid")=typeid
rs("keywords")=p_z_Z_Keywords
rs("content")=content
rs("period")=period

if upload.form("cimg")=2 then
 if trim(right(picture,3))="jpg" or trim(right(picture,3))="gif" then
    rs("picture")=picture
 end if
end if

rs("Specifications")=Specifications
rs("Quantity")=Quantity
rs("Packaging")=Packaging
rs("PriceTerms")=PriceTerms
rs("TrustpassFlag")=TrustpassFlag
rs("FeedbackFlag")=FeedbackFlag
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
'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=edit.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="edit.asp">返回</a></b></td>
</tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -