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

📄 kehu.asp

📁 下了就能用 不信你看一下 一定能用的
💻 ASP
字号:
<!--#include file="../conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>基础资料维护--客户资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/body.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
window.resizeTo(screen.width-160,screen.height-30)
//-->
</script>
<script language="JavaScript">
<!--
function SwitchMenu(obj,ckid){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("tr"); //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				ar[i].className= "";
		}
					el.className= "over";
}
document.ck_id.id.value=ckid;
	}
	
function ckmodi(){
if (document.ck_id.id.value==""){
alert('请选择要修改的记录!');
return false;
}
window.open("kehu_modi.asp?id=" + document.ck_id.id.value,"_blank","height=370,width=510,resizable=no,scrollbars=no,statue=no,toolbar=no,menubar=no,location=no,left=150,top=80");
}

function ckdel(){
if (document.ck_id.id.value==""){
alert('请选择要删除的记录!');
return false;
}
if (confirm('你确定要删除吗?')){
window.open("kehu_del.asp?id=" + document.ck_id.id.value,"_blank","height=150,width=450,resizable=no,scrollbars=no,statue=no,toolbar=no,menubar=no,location=no,left=150,top=80");
}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<link href="../inc/test.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
              dim curpage
              if request("curpage")="" then
                 curpage=1
              else
                 curpage=request("curpage")
              end if
			  if not isnumeric(trim(request("curpage"))) then
			     curpage=1
			  end if
			  if cint(curpage)<1 then
			   curpage=1
			 end if
              const numperpage=30
			
              set rs=server.createobject("adodb.recordset")
			  s_type=trim(request("search_type"))
			  s_str=trim(request("search_str"))
              sql="select * from ht_kehu  "
			  if s_str<>"" then
			     sql=sql & " where "&s_type&" like '%"&s_str&"%' "
			  end if
			  sql=sql & " order by dateandtime desc"
              rs.open sql,conn,1,1
              if rs.eof then
              'response.write "<table><tr><td><br></br><center>对不起,没有找到你所需的数据!</center><br></br></td></tr></table>"
              'response.end
              end if
            if not rs.eof then
            rs.pagesize=numperpage
            dim totalpages
            totalpages=rs.pagecount
			if cint(curpage)>cint(totalpages) then
			   curpage=totalpages
			end if
            rs.absolutepage=curpage
            end if        
           dim count
           count=0
		   i=1

%>
<table width="100%" border="0" cellspacing="0" background="../images/bjin.gif">
  <tr>
    <td width="12" OnMouseOver=this.className='borderon' OnMouseOut=this.className='';>
<div align="center"><img src="../images/s.gif" width="3" height="18"></div></td>
    <td width="90" OnMouseOver=this.className='borderon' OnMouseOut=this.className='';> 
      <div align="center"><a href="javascript:;" onClick="MM_openBrWindow('kehu_add.asp','','width=510,height=370')"><img src="../images/bmdd.gif" alt="增加" width="74" height="19" border="0"></a></div></td>
    <td width="90" OnMouseOver=this.className='borderon' OnMouseOut=this.className='';> 
      <div align="center"><img src="../images/vr.gif" alt="修改" width="74" height="19" onClick="ckmodi();"></div></td>
    <td width="90" OnMouseOver=this.className='borderon' OnMouseOut=this.className='';> 
      <div align="center"><img src="../images/dr.gif" alt="删除" width="74" height="19" onClick="ckdel();"></div></td>
    <td width="71" OnMouseOver=this.className='borderon' OnMouseOut=this.className='';> 
      <div align="center"><a href="javascript:window.close();"><img src="../images/tc.gif" alt="返回" width="49" height="19" border="0"></a></div></td>
    <td  width="1" background="../images/su.gif"  ></td>
    <td width="277" ><table width="264" border="0" cellspacing="0">
        <%
	  filename=Request.ServerVariables("script_name")
	  postion = InstrRev(fileName,"/")+1
	  fname=mid(filename,postion)
	  %>
        <tr> 
          <td width="60" height="20" onMouseOver=this.className='button2' onMouseDown=this.className='button4' onMouseOut=this.className=''> 
            <div align="center"> 
              <%
			 if  cint(curpage)>1 then
			    response.write "<a href="&fname&"?curpage="&curpage-1&"&search_type="&s_type&"&search_str="&s_str&"><img src='../images/syy.gif' alt='上一页'  border='0'></a>"
			 else
				response.write "<img src='../images/syy.gif' alt='上一页'  border='0'>"
			 end if
			 %>
            </div></td>
          <td width="80" onMouseOver=this.className='button2' onMouseDown=this.className='button4' onMouseOut=this.className=''> 
            <div align="center"> 
              <%
			 if  cint(curpage)<>cint(totalpages) then
			    response.write "<a href="&fname&"?curpage="&curpage+1&"&search_type="&s_type&"&search_str="&s_str&"><img src='../images/xyy.gif' alt='下一页'  border='0'></a>"
			 else
				response.write "<img src='../images/xyy.gif' alt='下一页'  border='0'>"
			 end if
			 %>
            </div></td>
          <td width="118">当前页:<%=curpage%>/共<%=totalpages%>页</td>
        </tr>
      </table></td>
    <td width="1066" ><table width="212" height="27" border="0" cellpadding="0" cellspacing="0">
        <form name="form1" method="post" action="kehu.asp">
          <tr> 
            <td width="64"><select name="search_type" id="search_type" >
                <option value="coname">单位名称</option>
                <option value="cocode">代码</option>
                <option value="cotype">分类</option>
                <option value="city">省份地区</option>
                <option value="cqys">初期应收</option>
                <option value="lxr">联系人</option>
                <option value="tel">联系电话</option>
                <option value="fax">传真</option>
                <option value="hp">手机</option>
                <option value="email">E-mail</option>
                <option value="addr">地址</option>
                <option value="pc">邮编</option>
                <option value="bank">开户银行</option>
                <option value="banknum">银行帐号</option>
              </select></td>
            <td width="88"><input name="search_str" type="text" id="search_str" style="height='18';background=#cccc" size="10"></td>
            <td width="155"><input name="imageField" type="image" src="../images/search.gif" width="57" height="24" border="0"></td>
          </tr>
        </form>
      </table></td>
    <td width="186" ><form action="" method="post" name="ck_id" id="ck_id">
        <input name="id" type="hidden" id="id">
    </form></td>
  </tr>
</table>
<table  id="masterdiv" width="100%" border="0" cellspacing="1" bgcolor="#E6E6E6">
  <tr> 
    <td height="21" class="borderon"> <div align="center">编号</div></td>
    <td class="borderon"> <div align="center">单位名称</div></td>
    <td class="borderon"> <div align="center">代码</div></td>
    <td class="borderon"> <div align="center">分类</div></td>
    <td class="borderon"> <div align="center">省份地区</div></td>
    <td class="borderon"> <div align="center">初期应收</div></td>
    <td class="borderon"> <div align="center">联系人</div></td>
    <td class="borderon"> <div align="center">联系电话</div></td>
    <td class="borderon"> <div align="center">传真</div></td>
    <td class="borderon"> <div align="center">手机</div></td>
    <td class="borderon"> <div align="center">地址</div></td>
    <td class="borderon"> <div align="center">日期</div></td>
  </tr>
  <%
           do while not rs.eof and count<numperpage
		   %>
  <tr id=<%=i%> bgcolor="#FFFFFF" onClick="SwitchMenu(<%=i%>,<%=trim(rs("id"))%>);"> 
    <td height="20" bgcolor="#E0E0E0" > <div align="center"><%=trim(rs("id"))%></div></td>
    <td > <div align="center"><%=trim(rs("coname"))%></div></td>
    <td > <div align="center"><%=trim(rs("cocode"))%></div></td>
    <td > <div align="center"><%=trim(rs("cotype"))%></div></td>
    <td > <div align="center"><%=trim(rs("city"))%></div></td>
    <td > <div align="center"><%=trim(rs("cqys"))%></div></td>
    <td > <div align="center"><%=trim(rs("lxr"))%></div></td>
    <td > <div align="center"><%=trim(rs("tel"))%></div></td>
    <td > <div align="center"><%=trim(rs("fax"))%></div></td>
    <td > <div align="center"><%=trim(rs("hp"))%></div></td>
    <td > <div align="center"><%=trim(rs("addr"))%></div></td>
    <td > <div align="center"><%=year(trim(rs("dateandtime")))& "-" & month(trim(rs("dateandtime"))) & "-" & day(trim(rs("dateandtime")))%></div></td>
  </tr>
  <%
              rs.movenext  
			  i=i+1     
                count=count+1
                loop
               rs.close
               set rs=nothing
               closedataconn    
              %>
</table>
</body>
</html>

⌨️ 快捷键说明

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