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

📄 cscx.asp

📁 一个很好的在线购物系统
💻 ASP
字号:

<!--#include file="../include/Pubconn.asp"-->
<!--#include file="../include/PubFun.asp"-->
<%username=getuser()
 departid=session("departid")
userclass=tablevisitor("f_aimdepart",username)%>
<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><link href="../cread.css" rel="stylesheet" type="text/css">

 <%

 bz=request("bz") 
ddbh=request("ddbh") 
'response.write ddbh
dyear=request("dyear")
 if request("currentpage")<>"" then
   currentpage=cint(request.querystring("currentpage"))
else
   currentpage=1
end if 
%>
</head>
<script language="vbscript">
   sub win()
    dyear=document.myform.dyear.value        
    ddbh=document.myform.ddbh.value
  window.location="cscx.asp?currentpage="+document.myform.page1.value+"&dyear="+dyear+"&ddbh="+ddbh+"&bz="+document.myform.bz.value
   end sub
   
  sub win1()
    dyear=document.myform.dyear.value        
     window.location="cscx.asp?currentpage="+document.myform.page1.value+"&dyear="+dyear+"&ddbh="+document.myform.ddbh.value
   end sub
   
sub cxch()
bz="1"
    ddbh=document.myform.ddbh.value
    dyear=document.myform.dyear.value        
   
  window.location="cscx.asp?dyear="+dyear+"&ddbh="+ddbh+"&bz="+bz
  end sub

sub qx()
msgbox "您无此权限!"
 exit sub
end sub
</script> 
<body bgcolor="#FFFFFF">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="100%"><b><font size="3"><img border="0" src="../pic/it_22.gif"> 
     </font><font size="2">部门目标</font></b><hr width="40%" size="1" align="left">                 
                      
    </td>                
  </tr>                
</table>      
    
<form method="post" action="xzqx.asp" name=myform>    
<table border="1" cellspacing="0" width="100%">      
  <tr>      
    <td width="9%" align="right" bgcolor="#F1E8DA" bordercolor="#F1E8DA" bordercolorlight="#F1E8DA"><font size="2">部门名称</font></td>      
    <td width="15%" bgcolor="#F1E8DA" bordercolor="#F1E8DA" bordercolorlight="#F1E8DA">      
  <%                                                           
    '部门列表                                                           
    set rst=Server.CreateObject("ADODB.RecordSet")                                                           
    sql1="Select * from A_DepartInfo where departcode<>'01' and delflag='0'"                                                           
    rst.open sql1,pubconn,1,3                                                           
                                                              
    %>  
    <select  name="ddbh" style="width:100" size="1">                           
      <option value="" selected>全部</option>                              
       <% 
      
       do while not rst.eof
        %>                                                           
        <option  value="<%=rst("DepartCode")%>" <%                
        if ddbh<>"" then                
           if trim(ddbh)=rst("DepartCode") then                
               response.write("selected")                
           end if                 
        end if                 
                        
        %> ><%=rst("Name")%></option>                                                           
       <%                                                          
       rst.movenext                                                          
       loop                                                          
      set rst=nothing                                                          
        %>                                                          
                                                           
      </select>          
<!--<%if ddbh<>"" then%>      
    <input type="text" name="ddbh" size="18" value=<%=ddbh%>>       
    <%else%>                                             
  <input type="text" name="ddbh" size="18" >      
  <%end if%> --></td>      
    <td width="6%" align="right" bgcolor="#F1E8DA" bordercolor="#F1E8DA" bordercolorlight="#F1E8DA"><font size="2">时间</font></td>      
    <td width="31%" bgcolor="#F1E8DA" bordercolor="#F1E8DA" bordercolorlight="#F1E8DA">      
<select name="dyear" >
                   
			 <!--<%if dyear<>"" then %>       
              <option value=<% =dyear%> selected> <% =dyear %> </option>       
             <%end if %> -->
               <option value="">全部</option>   
                <%  for i=1990 to 2010   %>                         
                <option value="<%=i%>" 
               <% if dyear<>"" then
                     if cint(dyear)=i then
                         response.write ("selected")
                     end if 
                end if
               %> 
                ><%=i%></option>         
             <%next%>          
              </select>年      
   </td>        
    <td width="9%" bgcolor="#F1E8DA" bordercolor="#F1E8DA" bordercolorlight="#F1E8DA">      
<input type="button" value="查询" onclick="cxch()" style="background-color: #D1D1D1; border-style: solid; border-width: 1" class="hand">        
   </td>        
  </tr>        
</table>        
<input type=hidden name=bz value="<%=bz%>">       
<p align="center">                      
                       
<%             
set rs=server.createobject("adodb.recordset")                
 rs.CursorLocation=3                     
rs.CursorType = adOpenStatic                
             
'if bz="1" then                
 qsql="select  distinct departcode,name,year,authors,departid from viewaim1 where departcode<>'01'"                      
if ddbh<>"" then          
     qsql=qsql&"and departcode='"&ddbh&"'"                     
end if                   
if dyear<>""  then               
     qsql=qsql&"and year='"&dyear&"'"                 
end if               
         
         
 %>                     
 <%'else%>                           
                          
<%'qsql="select distinct departcode,name,year from viewaim1 where departcode<>'01'"                           
%>                               
<%'end if           
               
'response.write qsql                  
                     
rs.open qsql,pubconn,1,3                               
                         
 if rs.recordcount>=1 then                                 
 rs.pagesize=5                               
 if currentpage>=rs.pagecount then                                 
   currentpage=rs.pagecount                                 
else                                 
   if currentpage<1 then                                 
      currentpage=1                                 
   end if                                 
end if                                 
rs.absolutepage=currentpage                                 
  pagenum=rs.pagecount                                 
  if pagenum<1 then                                 
 pagenum=1                                 
 end if                                 
                               
 %>                                   
<table border="1" cellspacing="0" width="100%" height="38">                                 
  <tr>                      
   <td width="4%" height="1" align="center" bgcolor="#DDD2C4"><font size="2">操作</font></td>                       
         <td width="9%" height="1" align="center" bgcolor="#DDD2C4"><font size="2">部门</font></td>                                 
    <td width="9%" height="1" align="center" bgcolor="#DDD2C4"><font size="2">年度</font></td>                                 
                          
                                     
  </tr>                                 
  <%                               
 for i=1 to rs.pagesize                             
                                       
     %>                                 
  <%                       
 if i mod 2=1 then%>                      
  <tr  bgcolor="#f7f7f7"   >                         
  <%else%>                      
  <tr bgcolor="#EDEBEC" >                       
          <%end if%>                            
       <td width="4%" height="1" align="center">              
  <%if (userclass=2 and username=rs("authors") and departid=rs("departid")) or (userclass=3 and departid=rs("departid")) then%>                               
   <input type="checkbox"  name="sc<%=i%>" value="on">    
    <%else%>  
    <input type="checkbox" name="sc" value="1" onmousedown="qx()"> 
    <%end if%> 
        
 </td>           
 <input type=hidden name="xsbm<%=i%>" value=<%=rs("departcode")%>>           
     <input type=hidden name="syear<%=i%>" value=<%=rs("year")%>>              
    <td width="9%" height="1" align="center"><a href="xx.asp?dyear=<%=rs("year")%>&xsbm=<%=rs("departcode")%>" ><%=rs("name")%></a></td>                                 
                                 
     <td width="8%" height="1" align="center"><%=rs("year")%></td>                 
  </tr>                                 
  <%                              
  rs.MoveNext                                     
   if rs.eof then  exit for                                                                                                                                     
		next %>                          
</table>                                 
<p align="left">                                
<font size="2"> 
<input type="submit" value="删除" style="background-color: #D1D1D1; border-style: solid; border-width: 1" class="hand">  <br>                
                               
共<%=rs.pagecount%>页                                    
<a href="cscx.asp?currentPage=1&bz=<%=bz%>&ddbh=<%=ddbh%>&amp;dyear=<%=dyear%>">首 页</a>                                    
<%if pagenum<>0 then                                    
if currentPage<pagenum then%> <a href="cscx.asp?currentPage=<%=currentpage+1%>&bz=<%=bz%>&ddbh=<%=ddbh%>&amp;dyear=<%=dyear%>">下一页</a>                                     
   <% else%>                                 
下一页   <%                                            
end if                                           
if currentPage>1 then                                           
%> <a href="cscx.asp?currentPage=<%=currentpage-1%>&bz=<%=bz%>&ddbh=<%=ddbh%>&amp;dyear=<%=dyear%>">上一页</a>                                             
  <% else%>                                 
上一页    <%                                            
end if                                           
end if %>                                     
<a href="cscx.asp?currentPage=<%=rs.pagecount%>&bz=<%=bz%>&ddbh=<%=ddbh%>&amp;dyear=<%=dyear%>">尾 页</a>                                      
  <select name="page1" >                               
                <%                      
                for j=1 to rs.pagecount%>                               
                   <option value=<%=j%>><%=j%>                               
                <%next%>                                  
             </select>                        
            <%if bz="" then%>                  
           <input type="button" value="Go" name="page" onclick="win1()" style="background-color: #D1D1D1; border-style: solid; border-width: 1" class="hand">                   
            <%else%>                  
         <input type="button" value="Go" name="page" onclick="win()" style="background-color: #D1D1D1; border-style: solid; border-width: 1" class="hand">                  
        <%end if%>                  
                                      
<%else%></font>                              
<p align="left">                                 
<font size="2">经查询,没有记录显示!<br>                         
<%end if                                          
%></font> <hr size="1">
<%if userclass>1 then%>                                 
   <input type=button value=新增 onclick=javascript:location.href='frame.asp' style="background-color: #D1D1D1; border-style: solid; border-width: 1" class="hand">                           
  <%else%>             
  <input type=button value=新增 onclick=javascript:location.href='frame.asp?qx=1' style="background-color: #D1D1D1; border-style: solid; border-width: 1" class="hand">                                        
      
<%end if%>                               
 <a href="index.htm">返回</a>                                                                                     
                                                                         
    </form>                                        
<p align="right"><a href="ywy/cscx.asp">                                     
业务员目标</a>&nbsp; <a href="jxs/cscx.asp"></a><a href="jxs/cscx.asp">公司目标</a>                                              
                                                                
</body>                                                                              
                                                                              
</html>

⌨️ 快捷键说明

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