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

📄 editcustomer.asp

📁 统架构:ASP+ACCESS 版本系列:个人版 开发时间:2005年12月20日 开发者: 搏天网络 联系QQ:359042595 演示地址:http://www.bootweb.cn/oa
💻 ASP
字号:
<%Option Explicit%>
<!--#include file="config.asp"-->
<%
If session("admin")<>"ok" Then
 response.redirect"index.asp"
End If

Dim Id,Company,Address,Name,eTitle,Tel1,Tel2,VIP,Demo
Id=request.querystring("Id")
If Id="" Then
Dim strJS
strJS=strJS+"<script language='javascript'>"
strJS=strJS+"alert('页面参数不正确,请返回!');"
strJS=strJS+"location.href='main.asp';"
strJS=strJS+"</script>"

response.write strJS
End If
%>
<!--#include file="conn.asp"-->
<%
Dim objRS,strSQL
set objRS=Server.createobject("adodb.recordset")
strSQL="select * from customer where Id="&Id
objRS.Open strSQL,objConn,1,3
Company=objRS("Company")
Address=objRS("Address")
Name=objRS("Name")
eTitle=objRS("Title")
Tel1=objRS("Tel1")
Tel2=objRS("Tel2")
VIP=objRS("VIP")
Demo=objRS("Demo")
objRS.Close
objConn.Close
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title><%=title%></title>
<style type="text/css">
td{font-size:10pt;font-family:宋体;color:#000000;height:30px}
textarea,input{border-top:1 solid #cccccc;border-left:1 solid #cccccc;}
</style>
<script language="javascript">
function check(f){
 var f1=f.Company.value;
 if(!f1){
 alert("请输入客户单位名称!");
 f.Company.focus();
 return false;
 }
 var f2=f.Tel1.value;
 if(!f2){
 alert("请输入该客户的联系电话!");
 f.Tel1.focus();
 return false;
 }
 return true;
}
</script>
</head>

<body bgcolor="#000000">
<table width="500" align="center" bordre=0 bgcolor="#ffffff"><tr><td width="100%">

<table align="center" border=0 width="98%" cellspacing=0 cellpadding=0>
 <tr>
  <td width="100%" align="center" valign="middle" style="font-size:11pt"><b><%=cnVersion%></b></td>
 </tr>
</table>
<table align="center" border=1 width="98%" cellspacing="0" cellpadding="0" bordercolorlight="#D4D0C8" bordercolordark="#999999">
 <tr bgcolor="#D4D0C8">
  <td width="100%" align="left" colspan=2>&nbsp;&nbsp;++编辑客户资料++</td>
 </tr>
 <form name="addForm" method="post" onsubmit="return check(this);" action="editcustomerok.asp">
 <tr>
  <td width="25%" align="center" bgcolor="#D4D0C8">单位名称</td>
  <td width="75%" align="left">&nbsp;&nbsp;<input type="text" name="Company" style="width:250px" value="<%=Company%>">&nbsp;<font color="#ff0000">*</font></td>
 </tr>
 <tr>
  <td width="25%" align="center" bgcolor="#D4D0C8">单位地址</td>
  <td width="75%" align="left">&nbsp;&nbsp;<input type="text" name="Address" style="width:250px" value="<%=Address%>"></td>
 </tr>
 <tr>
  <td width="25%" align="center" bgcolor="#D4D0C8">联 系 人</td>                             
  <td width="75%" align="left">&nbsp;&nbsp;<input type="text" name="Name" style="width:250px" value="<%=Name%>"></td>                             
 </tr>                             
 <tr>                             
  <td width="25%" align="center" bgcolor="#D4D0C8">现任职务</td>                             
  <td width="75%" align="left">&nbsp;&nbsp;<input type="text" name="Title" style="width:250px" value="<%=eTitle%>"></td>                             
 </tr>                             
 <tr>                             
  <td width="25%" align="center" bgcolor="#D4D0C8">办公电话</td>                             
  <td width="75%" align="left">&nbsp;&nbsp;<input type="text" name="Tel1" style="width:250px" value="<%=Tel1%>">&nbsp;<font color="#ff0000">*</font></td>                             
 </tr>                             
 <tr>                             
  <td width="25%" align="center" bgcolor="#D4D0C8">个人电话</td>                             
  <td width="75%" align="left">&nbsp;&nbsp;<input type="text" name="Tel2" style="width:250px" value="<%=Tel2%>"></td>                             
 </tr>                             
 <tr>                             
  <td width="25%" align="center" bgcolor="#D4D0C8">重要程度</td>                             
  <td width="75%" align="left">                  
  <%If 1=VIP Then%>                  
  &nbsp;&nbsp;<input type="radio" name="VIP" value="1" checked>普通&nbsp;<input type="radio" name="VIP" value="2"><font color="#008000">重要</font>&nbsp;<input type="radio" name="VIP" value="3"><font color="#ff0000">非常重要</font>            
  <%ElseIf 2=VIP Then%>                  
  &nbsp;&nbsp;<input type="radio" name="VIP" value="1">普通&nbsp;<input type="radio" name="VIP" value="2" checked><font color="#008000">重要</font>&nbsp;<input type="radio" name="VIP" value="3"><font color="#ff0000">非常重要</font>                  
  <%ElseIf 3=VIP Then%>                  
  &nbsp;&nbsp;<input type="radio" name="VIP" value="1">普通&nbsp;<input type="radio" name="VIP" value="2"><font color="#008000">重要</font>&nbsp;<input type="radio" name="VIP" value="3" checked><font color="#ff0000">非常重要</font>                  
  <%End If%>                  
  </td>                  
 </tr>                             
 <tr>                             
  <td width="25%" align="center" bgcolor="#D4D0C8">备  注</td>                             
  <td width="75%" align="left">&nbsp;&nbsp;<textarea name="Demo" style="width:250px;height:80px" rows="1" cols="20"><%=Demo%></textarea></td>                             
 </tr>                             
 <tr bgcolor="#D4D0C8">                             
  <td width="100%" align="center" colspan=2>                  
  <input type="hidden" name="Id" value="<%=Id%>">                  
  <input type="submit" name="S1" value="&lt;修改&gt;" style="border:0">&nbsp;&nbsp;                       
  <input style="border:0" type="reset" name="r1" value="&lt;重写&gt;">&nbsp;&nbsp;                       
  <a href="main.asp">返回</a>                       
  </td>                             
 </tr>                             
 </form>                             
</table>           
<table align="center" border=0 width="98%" cellspacing=0 cellpadding=0>      
 <tr>      
  <td width="100%" align="center" valign="middle" style="font-size:10pt"><%=enVersion%></td>      
 </tr>      
</table>      
</td></tr></table>                  
</body>                             
                             

⌨️ 快捷键说明

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