📄 edit.asp
字号:
<%response.expires=0%>
<%Response.Buffer=true%>
<!-- #include file="../conn_lr.asp"-->
<!-- #include file="../css.asp"-->
<%
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then
response.write("<script language=""javascript"">")
response.write("window.top.location.href='../../default.asp';")
response.write("</script>")
response.end
end if
%>
<head>
<title>拟稿</title>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<!-- #Include File=../inc/css.asp -->
<% '定义变量
dim Number,opFlag,title,image
'设置操作对象
opFlag=request("opFlag")
if opFlag="" then opFlag="cmdAddNew"
Number=request("Number")
if Number="" then Number="0"
on error resume next
SET rs=Server.CreateObject("ADODB.RecordSet")
'选择操作程序
if opFlag<>"cmdAddNew" then
rs.open Session("SQL"),Session("conn"),1,1
rs.move Number
end if
'显示当前文件标题
select case opFlag
case "cmdAddNew"
title="新书入库"
case "cmdEdit"
title="图书资料修改"
end select
image="../images/books.gif"
%>
<style>
.css0{<%=vinputtext%>;border:none;}
</style>
<script language=JavaScript>
<!--
//读取表内字符串信息
function ds(sstr)
{
var dstr="";
for (i=0;i<sstr.length;i++)
{ if (sstr.charAt(i)!=' ') dstr+=sstr.charAt(i);
}
return dstr;
}
function getit()
{
//判断书的标题是否为空
if (ds(document.submitinput.vtitle.value)=="")
{
alert("对不起,书的标题不允许为空!");
document.submitinput.vtitle.focus();
return;
}
if(document.submitinput.vtitle.value.length>255)
{
alert("对不起,书的标题过长,请重新输入!");
document.submitinput.vtitle.focus();
return false;
}
//判断书的编号是否为空
if (ds(document.submitinput.vnumber.value)=="")
{
alert("对不起,书号不允许为空!");
document.submitinput.vnumber.focus();
return;
}
if(document.submitinput.vnumber.value.length>100)
{
alert("对不起,您输入的书号不标准,请重新输入!");
document.submitinput.vnumber.focus();
return false;
}
if(document.submitinput.vpage.value.length>5)
{
alert("对不起,您输入的页码不规范,请重新输入!");
document.submitinput.vpage.focus();
return false;
}
if(document.submitinput.vcount.value.length>4)
{
alert("对不起,公司没有买这么多的书,请重新输入!");
document.submitinput.vcount.focus();
return false;
}
if(document.submitinput.vpublisher.value.length>255)
{
alert("对不起,出版社输入数据不合理,请重新输入!");
document.submitinput.vpublisher.focus();
return false;
}
if(document.submitinput.vver.value.length>255)
{
alert("对不起,此书的版本输入太详细,请重新输入!");
document.submitinput.vver.focus();
return false;
}
else {rphtml('vtitle','vver','vpublisher','vauthor','vtext','vkeyword','vnumber');
document.all.submitinput.submit();
}
}
//-->
</script>
</head>
<body id=all class=vtext onLoad="document.submitinput.vtitle.focus()">
<form name=submitinput action="save.asp?opFlag=<%=opFlag%>&Number=<%=Number%>" method=post >
<!-- #include file="../inc/title.asp" -->
<table cellspacing=1 cellpadding=2 width=95% bgcolor=<%=Session("vtablebordercolor")%> border=0 class=vtext align="center">
<tr>
<td align=right bgcolor=<%=Session("vtabletitlebackcolor")%> width="85" nowrap height="25">书名(T):</td>
<td bgcolor=<%=Session("vcolcolor")%> nowrap colspan="7">
<p align=left>
<input name=vtitle class=css0 style="width=100%" value="<%if opFlag="cmdAddNew" then response.write("") else response.write(rs("vtitle"))%>" accesskey="t" tabindex="0" onKeyDown=gonext("vauthor")>
<input type="hidden" name="voutcount" value="<%if opFlag="cmdAddNew" then response.write("0") else response.write(rs("voutcount"))%>">
<input type="hidden" name="vregtime" value="<%if opFlag="cmdAddNew" then response.write(nowdate) else response.write(rs("vregtime"))%>">
</p>
</td>
</tr>
<tr>
<td bgcolor=<%=Session("vtabletitlebackcolor")%> width="85" align="right" nowrap height="25">作者(A):</td>
<td bgcolor=<%=Session("vcolcolor")%> width="40%" colspan="3" >
<p align=left>
<input size=20 name=vauthor class=css0 style="width=100%" value="<%=rs("vauthor")%>" accesskey="a" onKeyDown=gonext("vnumber")>
</p>
</td>
<td bgcolor=<%=Session("vtabletitlebackcolor")%> width="70" align="right" height="0" nowrap >书号(N):</td>
<td bgcolor=<%=Session("vcolcolor")%> width="35%" colspan="3" >
<input name=vnumber class=css0 style="width=100%" value="<%=rs("vnumber")%>" accesskey="n" onKeyDown=gonext("vkeyword")>
</td>
</tr>
<tr>
<td bgcolor=<%=Session("vtabletitlebackcolor")%> width="85" align="right" nowrap height="25">关键字(W):</td>
<td bgcolor=<%=Session("vcolcolor")%> colspan="7" >
<input size=31
name=vkeyword class=css0 style="width=100%" value="<%=rs("vkeyword")%>" accesskey="w" onKeyDown=gonext("vsize")>
</td>
</tr>
<tr>
<td bgcolor=<%=Session("vtabletitlebackcolor")%> width="85" align="right" nowrap height="25">开本(Z):</td>
<td bgcolor=<%=Session("vcolcolor")%> >
<select name="vsize" accesskey="z" onKeyDown=gonext("vzd")>
<option value="16K">16K</option>
<option value="32K">32K</option>
<option value="64K">64K</option>
<option value="A3">A3</option>
<option value="A4">A4</option>
<option value="A5">A5</option>
<option value="其他">其他</option>
</select>
</td>
<td bgcolor=<%=Session("vtabletitlebackcolor")%> width="15%" align="right" >装订方式(L):</td>
<td bgcolor=<%=Session("vcolcolor")%> >
<select name="vzd" accesskey="l" onKeyDown=gonext("vcount") onChange="document.submitinput.vcount.focus()" >
<option value="简装">简装</option>
<option value="精装">精装</option>
<option value="线装">线装</option>
<option value="珍藏纪念装">珍藏纪念装</option>
</select>
</td>
<td bgcolor=<%=Session("vtabletitlebackcolor")%> align="right" height="0" width="70" nowrap >数量(C):</td>
<td bgcolor=<%=Session("vcolcolor")%> width="60" >
<input name=vcount class=css0 style="width=100%" value="<%if opFlag="cmdAddNew" then response.write("1") else response.write(rs("vcount"))%>" accesskey="c" onKeyDown=gonext("vpage") onKeyPress=checkkey()>
</td>
<td bgcolor=<%=Session("vtabletitlebackcolor")%> width="70" align="right" >页数(P):</td>
<td bgcolor=<%=Session("vcolcolor")%> width="70" >
<input name=vpage class=css0 style="width=100%" value="<%if opFlag="cmdAddNew" then response.write("100") else response.write(rs("vpage"))%>" accesskey="p" onKeyDown=gonext("vpublisher") onKeyPress=checkkey()>
</td>
</tr>
<tr>
<td bgcolor=<%=Session("vtabletitlebackcolor")%> width="85" align="right" nowrap height="25">出版社(D):</td>
<td bgcolor=<%=Session("vcolcolor")%> width="40%" colspan="3" >
<p align=left>
<input size=20 name=vpublisher class=css0 style="width=100%" value="<%=rs("vpublisher")%>" accesskey="d" onKeyDown=gonext("vver")>
</p>
</td>
<td bgcolor=<%=Session("vtabletitlebackcolor")%> width="70" align="right" nowrap >版本(V):</td>
<td bgcolor=<%=Session("vcolcolor")%> width="35%" colspan="3" >
<input name=vver class=css0 style="width=100%" value="<%=rs("vver")%>" accesskey="v" onKeyDown=gonext("vtext")>
</td>
</tr>
<tr>
<td bgcolor=<%=Session("vtabletitlebackcolor")%> width="85" align="right" nowrap height="25">内容简介(X):</td>
<td bgcolor=<%=Session("vcolcolor")%> colspan="7" >
<textarea name="vtext" class="css0" style="width=100%" rows="5" cols="50" accesskey="x" ><%=rs("vtext")%></textarea>
</td>
</tr>
</table>
<table cellspacing=0 cellpadding=0 width=90% border=0 align="center">
<tr>
<td>
<p align=center>
<br>
<button class=vinputbutton style="height=24" onClick="getit();"><img src="../images/save.gif" align="absmiddle"> 保存</button>
<button class=vinputbutton style="height=24" name=chongxie onClick=javascript:history.go(-2);><img src="../images/back.gif" align="absmiddle"> 返回</button>
<br> </p>
</td>
</tr>
</table>
</form>
<% rs.close
set rs=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -