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

📄

📁 我的图书管理系统
💻
字号:
<%
dim Pri
mkmc=request("mkmc")
Pri=CheckUrl("打印催还单")
%>
<!--#include virtual="/school/public/CheckUrl.asp"-->


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>借书证目录报表 欢迎使用欣科软件</title>
</head>

<body background="Bkg35.jpg" topmargin="0">

<p><img src="../images/soft.gif" width="45" height="30"><font size="6" color="#ff0000">催还单打印
<OBJECT classid=clsid:BD96C556-65A3-11D0-983A-00C04FC29E33 height=14 id=rds1 
width=14>
	<PARAM NAME="ExecuteOptions" VALUE="2">
	<PARAM NAME="FetchOptions" VALUE="3">
	<PARAM NAME="SortDirection" VALUE="-1">
	<PARAM NAME="InternetTimeout" VALUE="500000">
</OBJECT>
<OBJECT classid=clsid:BD96C556-65A3-11D0-983A-00C04FC29E33 height=14 id=rds2 
width=14>
	<PARAM NAME="ExecuteOptions" VALUE="2">
	<PARAM NAME="FetchOptions" VALUE="3">
	<PARAM NAME="SortDirection" VALUE="-1">
	<PARAM NAME="InternetTimeout" VALUE="500000">
</OBJECT></font>


<OBJECT classid=clsid:00028CD1-0000-0000-0000-000000000046 
 CODEBASE="http://<%=Request.ServerVariables("SERVER_NAME")%>/school/public/tdbg6.ocx"
dataSrc=#rds1 height=319 id=msGrid 
style="HEIGHT: 319px; LEFT: 0px; TOP: 0px; WIDTH: 740px" width=740 
VIEWASTEXT></OBJECT>

<div align="left">

<table border="0" cellpadding="3" cellspacing="1">
  <tr>
    <td><input type="button" value="按借书证号查询"
    onclick="find_click()" name="find"><input type="button" value="按读者编号查询"
    name="find1" onclick="find1_click()"><INPUT id=button1 name=button1 type=button value=按分类编号查询 onclick="find2_click()"><input type="button" 
    value="打印报表"    onclick="print_click()" name="report"><input type="submit" value="返 回" onclick="history.go(-1)"> 
            </td>
  </tr>
</table>
</div>
<script language="vbscript">
   
    dim courseNoArray,courseArray,yearnoArray,termnoArray,xhArray,xmArray,courseSelectArray
	dim courseCount,termCount,XHCount,courseSelectCount
	dim course_sql
	dim total_score
	dim print_lineno
	dim havedCourseArray,havedCourseCount '所有开设过的课程数组和课程数目
	dim formatstr,headstr
	dim bodyline(100)


   
   public  text11
   
   RDS1.Server = "http://<%=Request.ServerVariables("SERVER_NAME")%>"

   RDS1.Connect = "database=school;uid=sa;pwd=;dsn=school"
   
   RDS2.Server = "http://<%=Request.ServerVariables("SERVER_NAME")%>"

   RDS2.Connect = "database=school;uid=sa;pwd=;dsn=school"
   
   
   sub find_click()
   
      
      jszhvalue=inputbox("请输入欲查询的借书证号","查询")
      
      if  len(trim(jszhvalue))<>0 or trim(jszhvalue)<>"" then
    
        ' rds2.SQL="execute p_jszh_query" +"'"&jszhvalue&"'"
       '  rds2.ExecuteOptions = 1
       '  rds2.Refresh
         
       '  if rds2.Recordset.recordcount>0 then 

             rds1.SQL="execute p_jszh_query" +"'"&jszhvalue&"'"
             rds1.ExecuteOptions = 1
             rds1.Refresh
         if rds1.Recordset.recordcount>0 then    
         else
         
             msgbox "此借书证没有借书或还没有超过限借天数",,"提示窗口"
            
         end if
    
      end if
      
   end sub
   
   
sub find1_click()
     
      bjvalue=inputbox("请输入欲查询的读者编号","查询")
      
      if  len(trim(bjvalue))<>0 or trim(bjvalue)<>"" then
    
         'rds2.SQL="execute p_bj_query" +"'"&bjvalue&"'"
         'rds2.ExecuteOptions = 1
         'rds2.Refresh
        
         
         'if rds2.Recordset.recordcount>0 then 

             rds1.SQL="execute p_bj_query" +"'"&bjvalue&"'"
             rds1.ExecuteOptions = 1
             rds1.Refresh
         if rds1.Recordset.recordcount>0 then     
         else
         
             msgbox "此班级没有借书或还没有超过限借天数",,"提示窗口"
            
         end if
    
      end if
  
   
         
end sub 

sub find2_click()
     
      fllbvalue=inputbox("请输入欲查询的分类编号","查询")
      
      if  len(trim(fllbvalue))<>0 or trim(fllbvalue)<>"" then
    
         'rds2.SQL="execute p_give_back" +"'"&fllbvalue&"'"
         'rds2.ExecuteOptions = 1
         'rds2.Refresh
         
         'if rds2.Recordset.recordcount>0 then 

             rds1.SQL="execute p_give_back" +"'"&fllbvalue&"'"
             rds1.ExecuteOptions = 1
             rds1.Refresh
         
         if rds1.Recordset.recordcount>0 then 
         else
         
             msgbox "此分类没有被借或还没有超过限借天数",,"提示窗口"
            
         end if
    
      end if
  
   
         
end sub 

'=========================================
'打印报表


'=========================================
sub print_click()

    print_lineno = 0  
    
    vp.Preview = TRUE
	vp.StartDoc 
	'rds1.recordset.movefirst
	'allrecords=rds1.Recordset.recordcount
	'for i =1 to allrecords
	'		if rds1.Recordset.fields(2).value="打  印" then
	'			call ToClassprint(rds1.Recordset.fields(0).value) 
	'		end if 
	'		rds1.Recordset.movenext
	'next
	'rds1.Recordset.movefirst
	
   
   'xlSheet.Cells(print_lineno,courseSelectCount/2) = rtrim(classno)+"班"+yearno.value+"年"+termno.value+"学期成绩表"
   vp.Header = "|琼海师范学校图书馆催还单|"
'   vp.Footer = " ||第%d页"
   formatstr = "^+800|<+800|+<800"
   headstr = "" 

   scoreCount = rds1.Recordset.fields.count-2
   
   for k=0 to rds1.Recordset.fields.count-1 
	   
     'xlsheet.cells(print_lineno,k+1)=rds2.Recordset.fields(k).name
     
     if k >2 and k<scoreCount then
		formatstr = formatstr+ "|<+400"
	 end if
	 
	 if K>=scoreCount then
		formatstr = formatstr+ "|^+400"
	 end if
	  
	 headstr = headstr + trim(rds1.Recordset.fields(k).name)+"|"
	 msgbox headstr
     
    next 
   
	'print_lineno = print_lineno + 1
    rds1.Recordset.movefirst
    
    
    while not rds1.Recordset.eof
	onelinestr =""
	
     For j = 0 To  rds1.Recordset.fields.count-1 

      If isnull(rds1.Recordset.fields(j))=false  then   ' or trim(rds1.Recordset.fields(j))<>"" then
    
      
         if IsNumeric(rds1.Recordset.fields(j)) = true  Then
    
                   'xlSheet.Cells(print_lineno, j + 1) = trim(cstr(rds2.Recordset.fields(j)))
                   if j <>0 and j <>scoreCount +1 then
					onelinestr = onelinestr + trim(cstr(formatnumber(rds1.Recordset.fields(j),0))) +"|"
				    msgbox onelinestr
				    else
				    
					onelinestr = onelinestr + trim(cstr(rds1.Recordset.fields(j))) +"|"
					msgbox onelinestr
				   end if
				   
               
         else        

          'xlSheet.Cells(print_lineno, j + 1) = trim(cstr(rds2.Recordset.fields(j)))
                   onelinestr = onelinestr + trim(cstr(rds1.Recordset.fields(j))) +"|"
                   

         End If
     else  ' It is Null
		  onelinestr = onelinestr + "  |"  
 
    
    end if   

    Next
   
    print_lineno=print_lineno+1
    if print_lineno = 1 then
		vp.AddTable formatstr,headstr,onelinestr,,,false
    
    else
		vp.AddTable formatstr,headstr,onelinestr,,,true
	end if 
    rds1.Recordset.movenext
    
 wend 
    rds1.Recordset.movefirst
    vp.EndDoc 
	vp.SaveDoc "c:\xkprint.prn"
	window.open "http://<%=REQUEST.SERVERVARIABLES("SERVER_NAME")%>/school/public/print.asp"
   
   

end sub


 
   
    
   
 Sub Excel_Click()
       
    
         
   Set xlApp = CreateObject("Excel.Application") 
 
   xlApp.Visible = True 
 
   Set xlBook =xlApp.Workbooks.Add
   
   'On Error Resume Next 
 
  ' Set xlBook = xlApp.Workbooks.Add
 
   'Open("c:\temp\tjh.xls")
 
   Set xlSheet = xlBook.Worksheets(1)
 
  
   'Set xlSheet = xlBook.Worksheets(1) 

     xlSheet.Cells(3, 2) = "催还单"

   for k=0 to rds1.Recordset.fields.count-1 
   
     xlsheet.cells(4,k+1)=rds1.Recordset.fields(k).name
     
    next 
   

    rds1.Recordset.movefirst
    
     while not rds1.Recordset.eof


     For j = 0 To  rds1.Recordset.fields.count-1 

  

      If isnull(rds1.Recordset.fields(j))=false  then   ' or trim(rds1.Recordset.fields(j))<>"" then
    
      
         if IsNumeric(rds1.Recordset.fields(j)) = true  Then
    
         '  msgbox "tt1"
         '  msgbox rds1.Recordset.fields(j)
    
            xlSheet.Cells(i + 5, j + 1) = trim(cstr(rds1.Recordset.fields(j)))
               
         else        

        '   msgbox "tt2"
        '   msgbox rds1.Recordset.fields(j)
          
      
          xlSheet.Cells(i + 5, j + 1) = trim(cstr(rds1.Recordset.fields(j)))

       End If
 
    
    
    end if   

    Next
   
    i=i+1
    rds1.Recordset.movenext
    
 wend 

end sub 
	
</script>
<p><img src="../images/xkrj.gif"></p>
<OBJECT classid=clsid:6E84D662-9599-11D2-9367-20CC03C10627 height=3 id=vp width =3  VIEWASTEXT>
</OBJECT>

</body>
</html>

⌨️ 快捷键说明

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