📄 owner.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="checkuser.asp"-->
<html>
<head>
<title>∷企业生产管理信息系统:.</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/main.css" rel="stylesheet" type="text/css">
<SCRIPT language=javascript src="js/selectcity.js"></script>
<script language="JavaScript" src="js/validate.js" type="text/JavaScript"></script>
<SCRIPT language=javascript src="css/init.js"></SCRIPT>
<style type="text/css">
<!--
td { font-family: "宋体"; font-size: 9pt}
body { font-family: "宋体"; font-size: 9pt}
select { font-family: "宋体"; font-size: 9pt}
A {text-decoration: none; color: #336699; font-family: "宋体"; font-size: 9pt}
A:hover {text-decoration: underline; color: #FF0000; font-family: "宋体"; font-size: 9pt}
-->
</style>
<SCRIPT LANGUAGE=javascript>
<!--
function Juge(myform)
{
if (myform.Owner_name.value == "")
{
alert("购货单位名称不能为空!");
myform.Owner_name.focus();
return (false);
}
}
function SelectAll() {
for (var i=0;i<document.selform.selBigClass.length;i++) {
var e=document.selform.selBigClass[i];
e.checked=!e.checked;
}
}
//-->
</script>
</HEAD>
<BODY topMargin=0 rightMargin=0 leftMargin=0>
<!--#include file="top.asp"--><% dim sql,rs
select case request("action")
case "add"
call SaveAdd()
case "modify"
call SaveModify()
case "del"
call delCate()
case "edit"
isEdit=True
call myform(isEdit)
case "view"
isEdit=True
call myform(isview)
case else
isEdit=False
call myform(isEdit)
end select
sub SaveAdd
set rs=server.createobject("adodb.recordset")
sql="select * from Owner"
rs.open sql,conn,1,3
rs.addnew
rs("Owner_name") = trim(request.Form("Owner_name"))
rs("Contact_person") = trim(request.Form("Contact_person"))
rs("adr") = trim(request.Form("adr"))
rs("zip") = trim(request.Form("zip"))
rs("tel") = trim(request.Form("tel"))
rs("Facsimile") = trim(request.Form("Facsimile"))
rs("Condition") = trim(request.Form("Condition"))
rs("content") = trim(request.Form("content"))
rs.update
response.Write "<script language=javascript>alert('添加成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=Owner.asp"">"
response.end
rs.close
set rs=nothing
end sub
sub SaveModify
set rs=server.createobject("adodb.recordset")
sql="select * from Owner where id="&request.Form("id")
rs.open sql,conn,1,3
rs("Owner_name") = trim(request.Form("Owner_name"))
rs("Contact_person") = trim(request.Form("Contact_person"))
rs("adr") = trim(request.Form("adr"))
rs("zip") = trim(request.Form("zip"))
rs("tel") = trim(request.Form("tel"))
rs("Facsimile") = trim(request.Form("Facsimile"))
rs("Condition") = trim(request.Form("Condition"))
rs("content") = trim(request.Form("content"))
rs.update
response.Write "<script language=javascript>alert('修改成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=Owner.asp"">"
response.end
rs.close
set rs=nothing
end sub
sub delCate()
conn.execute("delete from Owner where id in ("&Request.Form("selBigClass")&")")
response.Write "<script language=javascript>alert('删除成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=Owner.asp"">"
response.end
end sub
%> <% sub myform(isEdit) %>
<TABLE width=800 align=center border="1" cellspacing="0" cellpadding="0" bordercolor="#0055E6">
<TR>
<td align="center" valign="top">
<%if oskey="supper" or oskey="xiaoshou" then%>
<%
set rs=server.createobject("adodb.recordset")
if isedit then
rs.open "select * from Owner where id=" & request("id"),conn,1,1
%>
<TABLE width=800 align=center border="1" cellspacing="0" cellpadding="0" bordercolor="#0055E6">
<tr >
<td height=26 background="images/background.gif">
<b><font color="#ffffff">编 辑 购 货 单 位</font></b>
</td>
</tr>
</table>
<%
else
%>
<table width="800" border="0" cellpadding="0" cellspacing="0" >
<tr >
<td height=26 background="images/background.gif">
<b><font color="#ffffff">添加 购 货 单 位</font></b>
</td>
</tr>
</table>
<%end if %>
<table width="800" border="0" cellpadding="0" cellspacing="0" bordercolor="#0055E6">
<tr class="but">
<td width="200" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">单位名称</td>
<td width="100" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">联系人</td>
<td width="200" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">单位地址</td>
<td width="100" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">邮 编</td>
<td width="100" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">电 话</td>
<td width="100" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">传 真</td>
</tr>
<form name="reg" method="post" action="Owner.asp" onSubmit="return Juge(this)" >
<tr> <input type="Hidden" name="action" value='<% If isedit then%>modify<% Else %>add<% End If %>'>
<% If isedit then%><input type="Hidden" name="id" value="<%=rs("id")%>"> <% End If %>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><input name="Owner_name" type="text" size="25" value='<% if isedit then
response.write rs("Owner_name")
end if %>'></td>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><input name="Contact_person" type="text" size="15" value='<% if isedit then
response.write rs("Contact_person")
end if %>'></td>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><input name="adr" type="text" size="25" value='<% if isedit then
response.write rs("adr")
end if %>'></td>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><input name="Condition" type="text" size="15" value='<% if isedit then
response.write rs("Condition")
end if %>'></td>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><input name="tel" type="text" size="15" value='<% if isedit then
response.write rs("tel")
end if %>'></td>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><input name="Facsimile" type="text" size="15" value='<% if isedit then
response.write rs("Facsimile")
end if %>'></td>
</tr>
<tr>
<td width="800" colspan="6" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">备 注</td>
</tr>
<tr>
<td colspan="5"><textarea name="content" cols="93" rows="3"><% if isedit then
response.write rs("content")
end if %></textarea></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -