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

📄 edit.asp

📁 求职建站直通车
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="admin/checkuser.asp"-->
<!--#include file="Config.asp"-->
<%
Dim ID,Msg
	ID = Request.QueryString("ID")
	If Request.QueryString("Action") = "Save" Then SaveData ID
	Sub SaveData(ID)
	If ID < 1 Then 
	Response.Write("参数错误")
	Response.End()
	End If
	myConn.execute("update info set FILETITLE='"&Request.Form("fname")&"',FILEDESC='"&Request.Form("fdesc")&"',FILETYPE='"&Request.Form("ftype")&"',FILEPATH='"&Request.Form("fpath")&"',FILESIZE='"&Request.Form("fsize")&"' where ID="&ID)
	Msg = "成功修改了文件数据信息"
	End Sub

If msg <> "" Then
Response.Write("<meta http-equiv=refresh content='3;URL=Admin/main.asp'>"&Msg&"<br>本页将在3秒内返回")
Response.End()
End If
%>
<html>
<head>
<title></title>
<link href="css/css.css" rel="stylesheet" type="text/css">
<script src="Images/up.Js"></script>
</head>
<body>

 
<table> 
<form name="Edit" action="Edit.asp?Action=Save&ID=<%=ID%>" method="post"> 
  <tr>  
    <td height="25"> <% 
	set frst = Server.CreateObject("adodb.recordset") 
	sql = "select * from info Where Id="&ID 
	frst.open sql,myconn,1,1 
	If not frst.Eof then 
			fid = frst("id").Value 
			ftitle = frst("fileTitle").Value 
			fdesc = frst("fileDesc").Value 
			ftype = frst("fileType").Value 
			fpath = frst("filePath").Value 
			fsize = frst("filesize").Value 
			fhits = frst("hits").Value 
			fuploadtime = frst("uploadTime").Value 
'FileNameStr=Server.Mappath(fpath) 
'Isize.GetImgSize Cstr(FileNameStr) 
	%> 
      <table width="567" border="0" align="center" cellpadding="3" cellspacing="0"> 
          <tr class="text">  
            <td width="55"><div align="right">名称:</div></td> 
            <td width="358"><input type="text" name="fname" class="TextBoxT" value="<%=ftitle%>">  
            </td> 
            <td width="130" rowspan="3">&nbsp; </td> 
          </tr> 
          <tr class="text">  
            <td width="55"><div align="right">类型:</div></td> 
            <td width="358"><select name="ftype" class="TextBoxT" id="filetype"> 
                <option value="证书"<%if ftype="证书" then%> selected<% end if %>>证书</option> 
                <option value="奖状"<%if ftype="奖状" then%> selected<% end if %>>奖状</option> 
                <option value="其他"<%if ftype="其他" then%> selected<% end if %>>其他</option> 
              </select></td> 
          </tr> 
          <tr class="text">  
            <td width="55"><div align="right">路径:</div></td> 
            <td width="358"><input name="fpath" type="text" class="TextBoxT" value="<%=fpath%>" size="50">   
            </td>  
          </tr>  
          <tr class="text">   
            <td width="55"><div align="right">说明:</div></td>  
            <td colspan="2" width="496"><input type="text" name="fdesc" class="TextBoxT" value="<%=fdesc%>"></td>  
          </tr>  
          <tr class="text">   
            <td height="1" align="right" bgcolor="#FFFFFF" width="55">文件大小:</td>  
            <td height="1" colspan="2" bgcolor="#FFFFFF" width="496"> <input type="text" name="fsize" class="TextBoxT" value="<%=fsize%>">  
              bytes</td>    
          </tr>    
          <tr class="text">     
            <td height="1" align="right" bgcolor="#FFFFFF" width="55">&nbsp;</td>    
            <td height="1" colspan="2" bgcolor="#FFFFFF" width="496"> <input type="submit" name="Submit" value="修改">&nbsp;<input type="button" name="Submit2" value="返回" onclick='javascript:window.location="Admin/main.asp"'></td>    
          </tr>    
          <tr class="text">     
            <td height="1" align="right" bgcolor="#FFFFFF" width="55">&nbsp;</td>    
            <td height="1" colspan="2" bgcolor="#FFFFFF" width="496"></td>    
          </tr>    
        </table>    
      <%    
	  else    
	  %>     
      <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0">    
        <tr class="text">     
          <td>没有对应的数据!</td>    
        </tr>    
      </table>    
      <%    
	  end if    
	  frst.close    
	  set frst = nothing    
	  myconn.close    
	  set myconn = nothing    
	  %>    
	  <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0">    
        <tr class="text">     
            <td align="right" class="heading">&nbsp;&nbsp;&nbsp;&nbsp;</td>    
        </tr>    
      </table></td>    
  </tr></form>    
</table>     
</body>    
</html>

⌨️ 快捷键说明

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