📄 guanli-shezhi.asp
字号:
<!--#include file="bkconn.asp"-->
<%Response.Expires=0
Response.Buffer=true
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>小灵通管理系统</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<link rel="stylesheet" href="../setup.css">
<script language="javascript">
function ljl1()
{
if(document.ljl.name.value.length<1)
{
alert("无效材料名称!");
return ;
}
if(document.ljl.name.value.indexOf("|")!=-1)
{
alert("无效材料名称,名称中不可以用字符[|]!");
return ;
}
if(document.ljl.danwei.value.length<1)
{
alert("请正确输入材料的单位[如个、件、套、盘等]!");
return ;
}
if(document.ljl.danwei.value.length>2)
{
alert("请正确输入材料的单位[如个、件、套、盘等]!");
return ;
}
if(document.ljl.xinghao.value.length<1)
{
alert("型号不能为空!");
return ;
}
if(document.ljl.beizhu.value.length<1)
{
alert("备注不能为空,如没有可填写[无]!");
return ;
}
document.ljl.submit();
}
</script>
</head>
<%
const MaxPerPage=15
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim typename
dim keyword
keyword=request("guestname")
typename="客户域名信息管理系统"
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<body style="background-color: #FFFFFF">
<div align="center" style="width: 527; height: 223"><center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-size:9pt" bordercolor="#111111" width="100%" id="AutoNumber1" height="20">
<tr>
<td width="100%" height="20"><img border="0" src="PIC/hand.gif"><span lang="zh-cn"><b><font color="#FF0000"><a target="_self" href="guanli-shezhi.asp"><font color="#FF0000">材料分类维护</font></a></font></b>
<img border="0" src="PIC/hand.gif"><a target="_self" href="guanli-shezhicangku.asp">仓库维护</a>
<img border="0" src="PIC/hand.gif"><a target="_self" href="guanli-shezhigongfang.asp">供方资料维护</a></span></td>
</tr>
<tr>
<td width="100%" height="43">
<form method="POST" target="_self" action="guanli-shezhisave.asp" name="ljl">
<p> <span lang="zh-cn">
<b><font color="#FF0000"> 新材料添加<br>
</font></b><br>
材料</span>名称:
<input class=smallInput type="text" name="name" size="40" style="background-color: #FFFFFF"> <font color="#C0C0C0"><span lang="zh-cn">*不可以与原来的材料名称相同</span></font><br>
<span lang="zh-cn">材料型号</span>:
<input class=smallInput type="text" name="xinghao" size="40" style="background-color: #FFFFFF"><span lang="zh-cn"><br>
材料单位</span>:<span lang="zh-cn"> </span>
<input class=smallInput type="text" name="danwei" size="27" style="background-color: #FFFFFF"><span lang="zh-cn"><font color="#C0C0C0">*如:件、套、盘、个等<br>
</font>备 注: </span>
<input class=smallInput type="text" name="beizhu" size="40" style="background-color: #FFFFFF" value="无"><span lang="zh-cn">
</span><font color="#C0C0C0">*<span lang="zh-cn">无信息的请填写“无”</span></font><br>
<span lang="zh-cn">
</span><INPUT onclick=javascript:ljl1() type=button value='添 加' name=button><span lang="zh-cn">
</span> <INPUT type=reset value='取消' name=button1> </p>
</form>
</td>
</tr>
</table>
<table border="0" width="77%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<%
sql="select * from 材料分类 where 可用=false and 材料名称 like '%"&keyword&"%' order by id desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>没有或没有找到任何数据</p>"
else
totalPut=rs.recordcount
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showpage totalput,MaxPerPage,"guanli-shezhi.asp"
showContent
showpage totalput,MaxPerPage,"guanli-shezhi.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpage totalput,MaxPerPage,"guanli-shezhi.asp"
showContent
showpage totalput,MaxPerPage,"guanli-shezhi.asp"
else
currentPage=1
showpage totalput,MaxPerPage,"guanli-shezhi.asp"
showContent
showpage totalput,MaxPerPage,"guanli-shezhi.asp"
end if
end if
rs.close
end if
set rs=nothing
sub showContent
dim i
i=0
%>
<div align="center"><center>
<table border="1" cellspacing="0" width="523" bordercolorlight="#D4D0C8" bordercolordark="#D4D0C8" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width="168" align="center"><strong>材料名称</strong></td>
<td width="81" align="center"><strong><span lang="zh-cn">规格</span></strong></td>
<td width="53" align="center"><strong>单位</strong></td>
<td width="113" align="center"><strong>备注信息</strong></td>
<td width="98" align="center" colspan="2"><strong>操 作</strong></td>
</tr>
<%do while not rs.eof%>
<tr>
<form method="POST" target="_self" action="cailiaoedit.asp?id=<%=rs("id")%>">
<td width="168"><p>
<input class=smallInput type="text" name="guestname" size="25" style="padding:0; background-color: #FFFFFF" value="<%=rs("材料名称")%>"></td>
<td width="81"><p align="left">
<input class=smallInput type="text" name="dw" size="11" style="background-color: #FFFFFF" value="<%=rs("材料型号")%>"></td>
<center>
<td width="53">
<input class=smallInput type="text" name="dj" size="6" style="background-color: #FFFFFF" value="<%=rs("材料单位")%>"></td>
<td width="113">
<input class=smallInput type="text" name="dw1" size="17" style="background-color: #FFFFFF" value="<%=rs("备注")%>"></td>
<td width="55">
<p align="center"><input type="submit" value="修改" name="button"></td>
<td width="42">
<p align="center">
<a target="_self" href="delcuo.asp?id=<%=rs("id")%>">
<font color="#FF0000">删除</font></a></td>
</form>
</tr>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</table>
</div><%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<form method=Post action="&filename&">"
' response.write "<p align='center'><font color='red'>"&typename&"</font> "
if CurrentPage<2 then
response.write "<font color='#000080'>首页 上一页</font> "
else
response.write "<a href="&filename&"?page=1&guestname="&keyword&">首页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&"&guestname="&keyword&">上一页</a> "
end if
if n-currentpage<1 then
response.write "<font color='#000080'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&guestname="&keyword&">尾页</a>"
end if
response.write "<font color='#000080'> 页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
response.write "<font color='#000080'> 共<b>"&totalnumber&"</b>条记录 <b>"&maxperpage&"</b>条记录/页</font> "
response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=smallInput type='text' name='txtitle' value="¤tpage&">"
response.write "<input class=buttonface type='submit' value=' Goto ' name='cndok'></span></p></form>"
end function
%>
<form name="searchtitle" method="POST" action="guanli-shezhi.asp">
<p> <span lang="zh-cn">名称</span>: <input class=smallInput type="text" name="guestname" size="13" style="background-color: #FFFFFF">
<input class=buttonface type="submit" value="查 询" name="title"> </p>
</form>
<!---查询-------end----------------->
</td>
</tr>
</table>
</div>
</body>
</html>
<html></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -