📄 editrecord.asp
字号:
<!-- #include file="fieldtype.asp" -->
<!-- #include file="connmdb.asp" -->
<%
dim tablename,fieldname,val,fieldtype,no
tablename = request("tablename")
fieldname = request("fieldname")
val = request("val")
fieldtype = request("fieldtype")
fieldtype = clng(fieldtype)
rs.close
select case fieldtype
case vtext,vmemo
sql = "select * from ["&tablename&"] where ["&fieldname&"] = '"&val&"'"
case vint,vbool
sql = "select * from ["&tablename&"] where ["&fieldname&"] = "&val&""
case vdate
sql = "select * from ["&tablename&"] where ["&fieldname&"] = cdate('"&val&"')"
end select
rs.open sql,conn,1,1
%>
<html>
<head>
<title>SmartCity 远程数据库管理系统</title>
<link rel="stylesheet" type="text/css" href="data/css.css">
</head>
<body background="data/background.gif" bgproperties=fixed>
<table width="100%" align="center">
<tr>
<td align="center">
<b><font size="5">SmartCity 远程数据库管理系统</font><br><font size="4">Version 1.0 beta</font><br><br></b>
</td>
</tr>
<tr>
<td align="center">
<div style="width: 740;">
<table width="100%">
<tr>
<td align="center" width="80"><a href="index.asp">重选数据库</a></td>
<td align="center" width="70"><a href="tablelist.asp">数据库列表</a></td>
<td align="center" width="70"><a href="createnewtable.asp">新建表格</a></td>
<td align="center" width="70"><a href="recordlist.asp?tablename=<%=tablename%>"><%=tablename%>列表</a></td>
<td></td>
<td align="center" width="50"><a href="changepsw.asp">修改密码</a></td>
<td align="center" width="45"><a href="recordlist.asp?tablename=<%=tablename%>">返回</a></td>
</tr>
</table>
</div>
<br>
</td>
</tr>
<tr>
<td align="center">
<form action="saverecord.asp?tablename=<%=tablename%>&fieldname=<%=fieldname%>&val=<%=val%>&fieldtype=<%=fieldtype%>" method="post">
<table class="line" width="740">
<tr>
<td width="15%" bgcolor="#CCCFFF">字段名</td>
<td bgcolor="#CCCFFF">字段值</td>
</tr>
<%
for each field in rs.fields
%>
<tr>
<td class="line"><%=field.name%></td>
<%
select case field.type
case vint,vtext
%>
<td class="line"><input type="text" name=<%=field.name%> class="txt" onmouseover="this.style.color='FF9966'" onmouseout="this.style.color='#4B69D8'" value=<%=rs(field.name)%>></td>
<%
case vdate
%>
<td class="line"><input type="text" name=<%=field.name%> class="txt" onmouseover="this.style.color='FF9966'" onmouseout="this.style.color='#4B69D8'" value=<%=rs(field.name)%>> (形如:2003-10-1或12:12:12或2003-10-1 12:12:12)</td>
<%
case vbool
%>
<td class="line"><input type="checkbox" name=<%=field.name%> class="txt" onmouseover="this.style.color='FF9966'" onmouseout="this.style.color='#4B69D8'"
<%
if rs(field.name) = true then
%>
checked
<%
end if
%>
></td>
<%
case vmemo
%>
<td class="line"><textarea name=<%=field.name%> rows="5" cols="60" onmouseover="this.style.color='FF9966'" onmouseout="this.style.color='#4B69D8'"><%=rs(field.name)%></textarea></td>
<%
end select
%>
</tr>
<%
next
%>
<tr>
<td><br><br></td>
<td><input type="submit" value="修改" class="btn" onmouseover="this.style.color='FF9966'" onmouseout="this.style.color='#4B69D8'"></td>
</tr>
</table>
</form>
<br><br><br>
</td>
</tr>
<tr>
<td align="center">
小城工作室作品 2003.9<br>
欢迎访问<a href="http://218.4.50.118/smartcity">『SmartCity 小城在线』</a>
</td>
</tr>
</talbe>
<%
rs.close
conn.close
set rs = nothing
set conn = nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -