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

📄 update.asp

📁 一款用ASP写的办公自动化软件
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=data/conn.asp-->
<!--#include file=connfig.asp-->
<!--#include file=inc/yan.asp-->
<%
	call case1'验证用户权限
	set rs1=server.CreateObject("adodb.recordset")
	sql1="select * from fajian where id="&request("id")
	rs1.open sql1,conn,1,1
	session("id")=rs1("id")
	if rs1("shen")<>1 then
	if request("post")="true" then 
	call wri
	end if 
	function wri
		if request("title")<>"" and request("content")<>"" then 
			set rs=server.CreateObject("adodb.recordset")
			sql="select * from fajian where id="&session("id")
			rs.open sql,conn,1,3
			rs("title")=request("title")
			rs("content")=request("content")
			rs("time")=now()
			rs.update
			rs.close
			response.Redirect("chenggong.htm")
		else
			response.Write("<script language=javascript>alert('请把信息填写完整')</script>")
		end if 
	end function
	if request("id")="" then 
	response.Redirect("piguan.asp")
	end if
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
@import url("biaodan.css");
.style1 {
	font-size: 16px;
	font-weight: bold;
	color: #FFFFFF;
}
body,td,th {
	font-size: 12px;
}
body {
	background-color: #ffffff;
}
.style4 {
	color: #000000;
	font-size: 14px;
}
-->
</style>
</head>

<body>
<form name="form1" method="post" action="">
  <table width="626" height="231" border="0" align="center" cellspacing="1" bgcolor="#336699">
    <tr>
      <td height="45" colspan="2" background="images/tile_sub.gif"><div align="center" class="style1 style4">修改文件</div></td>
    </tr>
    <tr>
      <td width="74" height="33" bgcolor="#FFFFFF"><div align="right">标题:</div></td>
      <td width="545" bgcolor="#FFFFFF"><input name="title" type="text" class="unnamed1" id="title" value="<%=rs1("title")%>" size="50">
      <input name="post" type="hidden" id="post" value="true"></td>
    </tr>
    <tr>
      <td width="74" height="113" valign="top" bgcolor="#FFFFFF" ><div align="right">内容:</div></td>
      <td bgcolor="#FFFFFF"><textarea name="content" cols="76" rows="20" id="content" class="unnamed1"><%=rs1("content")%></textarea></td>
    </tr>
    <tr bgcolor="#F3F3F3">
      <td height="35" colspan="2"><div align="center">
        <input type="submit" name="Submit" value="提交">
         
        <input type="reset" name="Submit2" value="重填">
      </div></td>
    </tr>
  </table>
</form>
</body>
</html>
<%
else
response.Write("<script language=javascript>alert('对不起您现在不能修改!');location='javascript:history.go(-1)'</script>")

end if                                                                               
%>

⌨️ 快捷键说明

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