主题:  用插件更新图片问题

UC无限概念 站长

职务:普通成员
等级:2
金币:1.0
发贴:397
注册:2003/3/2 14:56:31
#12004/2/15 15:38:16
涉及两个叶子,更新时老是提示file is required(在295行)

叶子一
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../Connections/market.asp" -->
<!--#include file="../ScriptLibrary/incPureUpload.asp" -->

<%
'*** Pure ASP File Upload -----------------------------------------------------
' Copyright (c) 2001-2002 George Petrov, www.UDzone.com
' Process the upload
' Version: 2.0.9
'------------------------------------------------------------------------------
'*** File Upload to: """../file""", Extensions: "", Form: form1, Redirect: "", "path", "", "over", "true", "", "" , "", "", "", "", "600", "", "300", "100"

Dim GP_redirectPage, RequestBin, UploadQueryString, GP_uploadAction, UploadRequest
PureUploadSetup

If (CStr(Request.QueryString("GP_upload" <> "" Then
on error resume next
Dim reqPureUploadVersion, foundPureUploadVersion
reqPureUploadVersion = 2.09
foundPureUploadVersion = getPureUploadVersion()
if err or reqPureUploadVersion > foundPureUploadVersion then
Response.Write "<b>You don't have latest version of ScriptLibrary/incPureUpload.asp uploaded on the server.</b><br>"
Response.Write "This library is required for the current page. It is fully backwards compatible so old pages will work as well.<br>"
Response.End
end if
on error goto 0
GP_redirectPage = ""
Server.ScriptTimeout = 600

RequestBin = Request.BinaryRead(Request.TotalBytes)
Set UploadRequest = CreateObject("Scripting.Dictionary"
BuildUploadRequest RequestBin, """../file""", "path", "", "over"

If (GP_redirectPage <> "" and not (CStr(UploadFormRequest("MM_insert" <> "" or CStr(UploadFormRequest("MM_update" <> "" Then
If (InStr(1, GP_redirectPage, "?", vbTextCompare) = 0 And UploadQueryString <> "" Then
GP_redirectPage = GP_redirectPage & "?" & UploadQueryString
End If
Response.Redirect(GP_redirectPage)
end if
else
if UploadQueryString <> "" then
UploadQueryString = UploadQueryString & "&GP_upload=true"
else
UploadQueryString = "GP_upload=true"
end if
end if
' End Pure Upload
'------------------------------------------------------------------------------
%>

<%
' *** Edit Operations: (Modified for File Upload) declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"
If (UploadQueryString <> "" Then
MM_editAction = MM_editAction & "?" & UploadQueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Update Record: (Modified for File Upload) set variables

If (CStr(UploadFormRequest("MM_update" = "form1" And CStr(UploadFormRequest("MM_recordId" <> "" Then

MM_editConnection = MM_market_STRING
MM_editTable = "market_digital"
MM_editColumn = "ID"
MM_recordId = "" + UploadFormRequest("MM_recordId" + ""
MM_editRedirectUrl = "main6pic_update.asp"
MM_fieldsStr = "uc_title|value|uc_type|value|uc_image7|value|uc_explain|value|uc_source|value|uc_author|value|uc_editor|value|uc_keyword1|value|uc_keyword2|value|uc_content1|value|uc_content2|value|uc_content3|value|uc_content4|value|uc_content5|value|uc_content6|value|uc_image1|value|uc_image2|value|uc_image3|value|uc_image4|value|uc_image5|value|uc_image6|value"
MM_columnsStr = "uc_title|',none,''|uc_type|',none,''|uc_image7|',none,''|uc_explain|',none,''|uc_source|',none,''|uc_author|',none,''|uc_editor|',none,''|uc_keyword1|',none,''|uc_keyword2|',none,''|uc_content1|',none,''|uc_content2|',none,''|uc_content3|',none,''|uc_content4|',none,''|uc_content5|',none,''|uc_content6|',none,''|uc_image1|',none,''|uc_image2|',none,''|uc_image3|',none,''|uc_image4|',none,''|uc_image5|',none,''|uc_image6|',none,''"

' create the MM_fields and MM_columns arrays
MM_columnsStr = FixColumnsForUpload(MM_fieldsStr,MM_columnsStr)
MM_fieldsStr = FixFieldsForUpload(MM_fieldsStr,MM_columnsStr)
MM_fields = Split(MM_fieldsStr, "|"
MM_columns = Split(MM_columnsStr, "|"

' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(UploadFormRequest(MM_fields(MM_i)))
Next

' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And UploadQueryString <> "" Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And UploadQueryString <> "" Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & UploadQueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & UploadQueryString
End If
End If

End If
%>
<%
' *** Update Record: (Modified for File Upload) construct a sql update statement and execute it

If (CStr(UploadFormRequest("MM_update" <> "" And CStr(UploadFormRequest("MM_recordId" <> "" Then

' create the sql update statement
MM_editQuery = "update " & MM_editTable & " set "
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),","
MM_delim = MM_typeArray(0)
If (MM_delim = "none" Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none" Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none" Then MM_emptyVal = ""
If (MM_formVal = "" Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "" Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'" Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''" & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_editQuery = MM_editQuery & ","
End If
MM_editQuery = MM_editQuery & MM_columns(MM_i) & " = " & MM_formVal
Next
MM_editQuery = MM_editQuery & " where " & MM_editColumn & " = " & MM_recordId

If (Not MM_abortEdit) Then
' execute the update
Set MM_editCmd = Server.CreateObject("ADODB.Command"
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

If (MM_editRedirectUrl <> "" Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

End If
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("ID" <> "" Then
Recordset1__MMColParam = Request.QueryString("ID"
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset"
Recordset1.ActiveConnection = MM_market_STRING
Recordset1.Source = "SELECT * FROM market_digital WHERE ID = " + Replace(Recordset1__MMColParam, "'", "''" + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim MM_paramName
%>

<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth

Dim MM_removeList
Dim MM_item
Dim MM_nextItem

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "" Then
MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If

MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
End If
Next

' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "" Then
MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "" Then
MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "" Then
MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "" Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>

<%
Dim Repeat2__numRows
Dim Repeat2__index

Repeat2__numRows = -1
Repeat2__index = 0
Recordset2_numRows = Recordset2_numRows + Repeat2__numRows
%>


<html>
<head>
<title>::..Unlimited Concept Studio - 影像集市..::</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!-- Fireworks MX Dreamweaver MX target. Created Fri Oct 24 16:44:55 GMT+0800 (?D1ú±ê×?ê±??) 2003-->
<script language="javascript" type="text/javascript">


function checkFileUpload(form,extensions,requireUpload,sizeLimit,minWidth,minHeight,maxWidth,maxHeight,saveWidth,saveHeight) { //v2.09
document.MM_returnvalue = true;
for (var i = 0; i<form.elements.length; i++) {
field = form.elements[i];
if (field.type.toUpperCase() != 'FILE') continue;
checkOneFileUpload(field,extensions,requireUpload,sizeLimit,minWidth,minHeight,maxWidth,maxHeight,saveWidth,saveHeight);
} }

function checkOneFileUpload(field,extensions,requireUpload,sizeLimit,minWidth,minHeight,maxWidth,maxHeight,saveWidth,saveHeight) { //v2.09
document.MM_returnvalue = true;
if (extensions != '') var re = new RegExp("\.(" + extensions.replace(/,/gi,"|".replace(/\s/gi,"" + "$","i";
if (field.value == '') {
if (requireUpload) {alert('File is required!');document.MM_returnvalue = false;field.focus();return;}
} else {
if(extensions != '' && !re.test(field.value)) {
alert('This file type is not allowed for uploading.\nOnly the following file extensions are allowed: ' + extensions + '.\nPlease select another file and try again.');
document.MM_returnvalue = false;field.focus();return;
}
document.PU_uploadForm = field.form;
re = new RegExp(".(gif|jpg|png|bmp|jpeg)$","i";
if(re.test(field.value) && (sizeLimit != '' || minWidth != '' || minHeight != '' || maxWidth != '' || maxHeight != '' || saveWidth != '' || saveHeight != '')) {
checkImageDimensions(field,sizeLimit,minWidth,minHeight,maxWidth,maxHeight,saveWidth,saveHeight);
} }
}

function showImageDimensions(fieldImg) { //v2.09
var isNS6 = (!document.all && document.getElementById ? true : false);
var img = (fieldImg && !isNS6 ? fieldImg : this);
if (img.width > 0 && img.height > 0) {
if ((img.minWidth != '' && img.minWidth > img.width) || (img.minHeight != '' && img.minHeight > img.height)) {
alert('Uploaded Image is too small!\nShould be at least ' + img.minWidth + ' x ' + img.minHeight); return;}
if ((img.maxWidth != '' && img.width > img.maxWidth) || (img.maxHeight != '' && img.height > img.maxHeight)) {
alert('Uploaded Image is too big!\nShould be max ' + img.maxWidth + ' x ' + img.maxHeight); return;}
if (img.sizeLimit != '' && img.fileSize > img.sizeLimit) {
alert('Uploaded Image File Size is too big!\nShould be max ' + (img.sizeLimit/1024) + ' KBytes'); return;}
if (img.saveWidth != '') document.PU_uploadForm[img.saveWidth].value = img.width;
if (img.saveHeight != '') document.PU_uploadForm[img.saveHeight].value = img.height;
document.MM_returnvalue = true;
} }

function checkImageDimensions(field,sizeL,minW,minH,maxW,maxH,saveW,saveH) { //v2.09
if (!document.layers) {
var isNS6 = (!document.all && document.getElementById ? true : false);
document.MM_returnvalue = false; var imgURL = 'file:///' + field.value.replace(/\\/gi,'/').replace(/:/gi,'|').replace(/"/gi,'').replace(/^\//,'');
if (!field.gp_img || (field.gp_img && field.gp_img.src != imgURL) || isNS6) {field.gp_img = new Image();
with (field) {gp_img.sizeLimit = sizeL*1024; gp_img.minWidth = minW; gp_img.minHeight = minH; gp_img.maxWidth = maxW; gp_img.maxHeight = maxH;
gp_img.saveWidth = saveW; gp_img.saveHeight = saveH; gp_img.onload = showImageDimensions; gp_img.src = imgURL; }
} else showImageDimensions(field.gp_img);}
}
</script>
</head>
<body bgcolor="#ffffff" background="../images/bg1.gif" leftmargin="0" topmargin="0" onLoad="MM_preloadImages('../main1_r1_c6-on.gif','../main1_r1_c9-on.gif','../main1_r1_c10-on.gif','../main1_r1_c11-on.gif','../main1_r1_c12-on.gif','../main1_r1_c13-on.gif','../main1_r1_c14-on.gif')">
<table width="1025" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<!-- fwtable fwsrc="未命名" fwbase="main2.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td width="90"><img src="../spacer.gif" width="90" height="1" border="0" alt=""></td>
<td width="32"><img src="../spacer.gif" width="32" height="1" border="0" alt=""></td>
<td width="3"><img src="../spacer.gif" width="3" height="1" border="0" alt=""></td>
<td width="1"><img src="../spacer.gif" width="1" height="1" border="0" alt=""></td>
<td width="99"><img src="../spacer.gif" width="99" height="1" border="0" alt=""></td>
<td width="7"><img src="../spacer.gif" width="7" height="1" border="0" alt=""></td>
<td width="319"><img src="../spacer.gif" width="319" height="1" border="0" alt=""></td>
<td width="3"><img src="../spacer.gif" width="3" height="1" border="0" alt=""></td>
<td width="7"><img src="../spacer.gif" width="7" height="1" border="0" alt=""></td>
<td width="2"><img src="../spacer.gif" width="2" height="1" border="0" alt=""></td>
<td width="335"><img src="../spacer.gif" width="335" height="1" border="0" alt=""></td>
<td width="3"><img src="../spacer.gif" width="3" height="1" border="0" alt=""></td>
<td width="33"><img src="../spacer.gif" width="33" height="1" border="0" alt=""></td>
<td width="90"><img src="../spacer.gif" width="90" height="1" border="0" alt=""></td>
<td width="1"><img src="../spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="19" background="../images/bg1.gif"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td rowspan="19" background="../images/bg2.gif"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td rowspan="19"><img name="main2_r1_c3" src="../main2_r1_c3.jpg" width="3" height="991" border="0" alt=""></td>
<td height="132" colspan="8" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="29" colspan="2" valign="top"><img name="main1_r1_c4" src="../main1_r1_c4.gif" width="100" height="29" border="0" alt=""></td>
<td width="673" valign="top"><img src="../main1_r1_c6.gif" alt="" name="main1_r1_c6" width="91" height="29" border="0" onMouseOver="MM_swapImage('main1_r1_c6','','../main1_r1_c6-on.gif',1)" onMouseOut="MM_swapImgRestore()"><a href="main2_list_news.asp"><img src="../main1_r1_c9.gif" alt="" name="main1_r1_c9" width="92" height="29" border="0" onMouseOver="MM_swapImage('main1_r1_c9','','../main1_r1_c9-on.gif',1)" onMouseOut="MM_swapImgRestore()"></a><a href="main3_list_web.asp"><img src="../main1_r1_c10.gif" alt="" name="main1_r1_c10" width="92" height="29" border="0" onMouseOver="MM_swapImage('main1_r1_c10','','../main1_r1_c10-on.gif',1)" onMouseOut="MM_swapImgRestore()"></a><a href="main4_list_bar.asp"><img src="../main1_r1_c11.gif" alt="" name="main1_r1_c11" width="92" height="29" border="0" onMouseOver="MM_swapImage('main1_r1_c11','','../main1_r1_c11-on.gif',1)" onMouseOut="MM_swapImgRestore()"></a><a href="main5_list_study.asp"><img src="../main1_r1_c12.gif" alt="" name="main1_r1_c12" width="91" height="29" border="0" onMouseOver="MM_swapImage('main1_r1_c12','','../main1_r1_c12-on.gif',1)" onMouseOut="MM_swapImgRestore()"></a><a href="main6_list_digital.asp"><img src="../main1_r1_c13.gif" alt="" name="main1_r1_c13" width="93" height="29" border="0" onMouseOver="MM_swapImage('main1_r1_c13','','../main1_r1_c13-on.gif',1)" onMouseOut="MM_swapImgRestore()"></a><a href="#"><img src="../main1_r1_c14.gif" alt="" name="main1_r1_c14" width="91" height="29" border="0" onMouseOver="MM_swapImage('main1_r1_c14','','../main1_r1_c14-on.gif',1)" onMouseOut="MM_swapImgRestore()"></a><img name="main1_r1_c16" src="../main1_r1_c16.gif" width="30" height="29" border="0" alt=""></td>
</tr>
<tr>
<td width="99" height="101" valign="top"><a href="../index.htm"><img name="main1_r2_c4" src="../main1_r2_c4.gif" width="99" height="101" border="0" alt=""></a></td>
<td width="1"></td>
<td valign="top" background="../images/main6/title.jpg"><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
<tr>
<td height="2"></td>
<td></td>
<td></td>
</tr>
</table></td>
<td rowspan="19"><img name="main2_r1_c12" src="../main2_r1_c12.jpg" width="3" height="991" border="0" alt=""></td>
<td rowspan="19" background="../images/bg3.gif"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td rowspan="19" background="../images/bg1.gif"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td><img src="../spacer.gif" width="1" height="132" border="0" alt=""></td>
</tr>
<tr>
<td height="28" colspan="2" background="../images/bg4.gif"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td rowspan="17" background="../images/bg4.gif"><img name="main2_r2_c6" src="../main2_r2_c6.jpg" width="7" height="844" border="0" alt=""></td>
<td colspan="5" background="../images/bg4.gif"></td>
<td><img src="../spacer.gif" width="1" height="28" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="2" colspan="2"><img name="main2_r3_c4" src="../main2_r3_c4.jpg" width="100" height="18" border="0" alt=""></td>
<td colspan="5" rowspan="2" valign="top" background="../images/bg4.gif"><img src="../images/main6/subtitle-1.jpg" width="319" height="18"></td>
<td height="1"><img src="../spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td height="17"><img src="../spacer.gif" width="1" height="17" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="15"><img name="main2_r5_c4" src="../main2_r5_c4.jpg" width="1" height="813" border="0" alt=""></td>
<td rowspan="14" background="../images/bg4.gif"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td colspan="5" rowspan="14" valign="top" background="../images/bg4.gif">&nbsp;
<form action="<%=MM_editAction%>" method="post" enctype="multipart/form-data" name="form1" onSubmit="checkFileUpload(this,'',true,'','','','','','','');return document.MM_returnvalue">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">Uc_title:</td>
<td> <input type="text" name="uc_title" value="<%=(Recordset1.Fields.Item("uc_title".value)%>" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Uc_type:</td>
<td> <input type="text" name="uc_type" value="<%=(Recordset1.Fields.Item("uc_type".value)%>" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Uc_image7:</td>
<td> <input name="uc_image7" type="file" onChange="checkOneFileUpload(this,'',true,'','','','','','','')" value="<%=(Recordset1.Fields.Item("uc_image7".value)%>" size="32">
<img src="<%=(Recordset1.Fields.Item("uc_image7".value)%>" width="30" height="30">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Uc_explain:</td>
<td> <input type="text" name="uc_explain" value="<%=(Recordset1.Fields.Item("uc_explain".value)%>" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Uc_source:</td>
<td> <input type="text" name="uc_source" value="<%=(Recordset1.Fields.Item("uc_source".value)%>" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Uc_author:</td>
<td> <input type="text" name="uc_author" value="<%=(Recordset1.Fields.Item("uc_author".value)%>" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Uc_editor:</td>
<td> <input type="text" name="uc_editor" value="<%=(Recordset1.Fields.Item("uc_editor".value)%>" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Uc_keyword1:</td>
<td> <input type="text" name="uc_keyword1" value="<%=(Recordset1.Fields.Item("uc_keyword1".value)%>" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Uc_keyword2:</td>
<td> <input type="text" name="uc_keyword2" value="<%=(Recordset1.Fields.Item("uc_keyword2".value)%>" size="32">
</td>
</tr>
<tr>
<td nowrap align="right" valign="top">Uc_content1:</td>
<td valign="baseline"> <textarea name="uc_content1" cols="50" rows="5"><%=(Recordset1.Fields.Item("uc_content1".value)%></textarea>
</td>
</tr>
<tr>
<td nowrap align="right" valign="top">Uc_content2:</td>
<td valign="baseline"> <textarea name="uc_content2" cols="50" rows="5"><%=(Recordset1.Fields.Item("uc_content2".value)%></textarea>
</td>
</tr>
<tr>
<td nowrap align="right" valign="top">Uc_content3:</td>
<td valign="baseline"> <textarea name="uc_content3" cols="50" rows="5"><%=(Recordset1.Fields.Item("uc_content3".value)%></textarea>
</td>
</tr>
<tr>
<td nowrap align="right" valign="top">Uc_content4:</td>
<td valign="baseline"> <textarea name="uc_content4" cols="50" rows="5"><%=(Recordset1.Fields.Item("uc_content4".value)%></textarea>
</td>
</tr>
<tr>
<td nowrap align="right" valign="top">Uc_content5:</td>
<td valign="baseline"> <textarea name="uc_content5" cols="50" rows="5"><%=(Recordset1.Fields.Item("uc_content5".value)%></textarea>
</td>
</tr>
<tr>
<td nowrap align="right" valign="top">Uc_co<img src="<%=(Recordset1.Fields.Item("uc_image1".value)%>" width="30" height="30">ntent6:</td>
<td valign="baseline"> <textarea name="uc_content6" cols="50" rows="5"><%=(Recordset1.Fields.Item("uc_content6".value)%></textarea>
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Uc_image1:</td>
<td> <input name="uc_image1" type="file" onChange="checkOneFileUpload(this,'',true,'','','','','','','')" value="<%=(Recordset1.Fields.Item("uc_image1".value)%>" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Uc_image2:</td>
<td> <input name="uc_image2" type="file" onChange="checkOneFileUpload(this,'',true,'','','','','','','')" value="<%=(Recordset1.Fields.Item("uc_image2".value)%>" size="32">
<img src="<%=(Recordset1.Fields.Item("uc_image2".value)%>" width="30" height="30">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Uc_image3:</td>
<td> <input name="uc_image3" type="file" onChange="checkOneFileUpload(this,'',true,'','','','','','','')" value="<%=(Recordset1.Fields.Item("uc_image3".value)%>" size="32">
<img src="<%=(Recordset1.Fields.Item("uc_image3".value)%>" width="30" height="30">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Uc_image4:</td>
<td> <input name="uc_image4" type="file" onChange="checkOneFileUpload(this,'',true,'','','','','','','')" value="<%=(Recordset1.Fields.Item("uc_image4".value)%>" size="32">
<img src="<%=(Recordset1.Fields.Item("uc_image4".value)%>" width="30" height="30">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Uc_image5:</td>
<td> <input name="uc_image5" type="file" onChange="checkOneFileUpload(this,'',true,'','','','','','','')" value="<%=(Recordset1.Fields.Item("uc_image5".value)%>" size="32">
<img src="<%=(Recordset1.Fields.Item("uc_image5".value)%>" width="30" height="30">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Uc_image6:</td>
<td> <input name="uc_image6" type="file" onChange="checkOneFileUpload(this,'',true,'','','','','','','')" value="<%=(Recordset1.Fields.Item("uc_image6".value)%>" size="32">
<img src="<%=(Recordset1.Fields.Item("uc_image6".value)%>" width="30" height="30">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">&nbsp;</td>
<td> <input type="submit" value="更新记录"> </td>
</tr>
</table>
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="MM_recordId" value="<%= Recordset1.Fields.Item("ID".value %>">
</form>
<p>&nbsp;</p>
</td>
<td height="197"><img src="../spacer.gif" width="1" height="197" border="0" alt=""></td>
</tr>
<tr>
<td height="23"><img src="../spacer.gif" width="1" height="23" border="0" alt=""></td>
</tr>
<tr>
<td height="18"><img src="../spacer.gif" width="1" height="18" border="0" alt=""></td>
</tr>
<tr>
<td height="70"><img src="../spacer.gif" width="1" height="70" border="0" alt=""></td>
</tr>
<tr>
<td height="21"><img src="../spacer.gif" width="1" height="21" border="0" alt=""></td>
</tr>
<tr>
<td height="18"><img src="../spacer.gif" width="1" height="18" border="0" alt=""></td>
</tr>
<tr>
<td height="184"><img src="../spacer.gif" width="1" height="184" border="0" alt=""></td>
</tr>
<tr>
<td height="24"><img src="../spacer.gif" width="1" height="24" border="0" alt=""></td>
</tr>
<tr>
<td height="18"><img src="../spacer.gif" width="1" height="18" border="0" alt=""></td>
</tr>
<tr>
<td height="189"><img src="../spacer.gif" width="1" height="189" border="0" alt=""></td>
</tr>
<tr>
<td height="1"><img src="../spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td height="11"><img src="../spacer.gif" width="1" height="11" border="0" alt=""></td>
</tr>
<tr>
<td height="1"><img src="../spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td height="23"><img src="../spacer.gif" width="1" height="23" border="0" alt=""></td>
</tr>
<tr>
<td colspan="7"><img name="main2_r19_c5" src="../main2_r19_c5.jpg" width="772" height="15" border="0" alt=""></td>
<td><img src="../spacer.gif" width="1" height="15" border="0" alt=""></td>
</tr>
</table>
</body>
</html>

<%session("id"= Recordset1.Fields.Item("ID".value
session("Uc_image7"=(Recordset1.Fields.Item("uc_image7".value)
session("Uc_image1"=(Recordset1.Fields.Item("uc_image1".value)
session("Uc_image2"=(Recordset1.Fields.Item("uc_image2".value)
session("Uc_image3"=(Recordset1.Fields.Item("uc_image3".value)
session("Uc_image4"=(Recordset1.Fields.Item("uc_image4".value)
session("Uc_image5"=(Recordset1.Fields.Item("uc_image5".value)
session("Uc_image6"=(Recordset1.Fields.Item("uc_image6".value)
Recordset1.Close()
Set Recordset1 = Nothing
%>

叶子二(也就是叶子也更新后转到的叶面main6pic_update.asp)
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../Connections/market.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Session("ID" <> "" Then
Recordset1__MMColParam = Session("ID"
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset"
Recordset1.ActiveConnection = MM_market_STRING
Recordset1.Source = "SELECT * FROM market_digital WHERE ID = " + Replace(Recordset1__MMColParam, "'", "''" + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
for i=1 to 7
if session("Uc_image"&i) <> (Recordset1.Fields.Item("uc_image"&i).value) then
path="d:/uc"&session("Uc_image"&i)
response.Write(path)
Set fs=Server.CreateObject("Scripting.FileSystemObject"
if fs.FileExists(path) then
fs.DeleteFile path,True
response.write "成功删除旧图片!..."&i
else
response.write "添加新图片成功...!"
end if
Set fs=nothing
end if
next
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
Response.Redirect("main6_edit_digital.asp?id="&session("id"
%>


麻烦大家了