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

📄 wy_trip_fun.inc

📁 旅游信息管理系统,带论文,可作为课程设计参考资料
💻 INC
字号:
<!--#include file="../wy_trip_inc/wy_trip_cnn.inc"-->
<%
    '处理登录字符
    function wylog(infor)
          infor=trim(infor)
          infor=replace(infor,"'","''")
    end function

    '获得指定图片的名称
    function pictitle(tablename)
         set rst=server.createobject("adodb.recordset")
         sqlstr="select * from "&tablename
         
         rst.open sqlstr,conn,1,1
         if not (rst.eof or rst.bof) then
              pname=rst("picpath")
         end if
         rst.close
         set rst=nothing
         
         pictitle="../wy_trip_images/"&pname     
    end function
    
  
  
    '提取数据库中指定表,指定字段 信息
    function sqlshow(sqlstr,strname)
        
        revalue=""
        set rst=server.CreateObject("adodb.recordset")
      	rst.open sqlstr,conn,1,1
      	
      	if not(rst.eof or rst.bof) then
      	   revalue=rst(strname).value
      	end if
      	rst.close
      	set rst=nothing
      	
      	sqlshow=revalue
    end function
  

   '更新数据库中指定表,指定字段 信息
   function sqlupdata(sqlstr,strname,updatainfor)
        
        updatainfor=replace(updatainfor,chr(13),"<br>")
        i=0
        set rst=server.CreateObject("adodb.recordset")
				rst.open sqlstr,conn,1,3
				
				if not(rst.eof or rst.bof) then
			      rst(strname)=updatainfor
			      rst.update
			      i=1
			  end if
			  
			  rst.close
			  set rst=nothing
			  
			  sqlupdata=i
   end function
  
  
  '删除说明信息及图片数据表,指定记录
  'return 1 complete ; 0 fair
   function deleteitem(solname,tablename)
          i=0
		      set rst=server.createobject("adodb.recordset")
		      sqlstr="select * from "&tablename&" where  solname='"&solname&"'"
		      rst.open sqlstr,conn,1,3
		      if not (rst.eof or rst.bof) then
		            rst.delete
		            i=1
		      end if
		      
		      deletesta=i
   end function
       
	   
   sub systemerror(infor)
         %>
           <html>
						<head>
						<title>PTrip Server 2005 For 数据库课程设计
						</title>
						<META http-equiv=Content-Type content="text/html; charset=gb2312">
						<link rel="stylesheet" type="text/css" href="../wy_trip.css">
						</head>
         
            <body leftmargin="0" topmargin="0"  bottommargin="0" rightmargin="0" link="#3357B3" vlink="#3357B3" alink="#3357B3" bgcolor="#e8eefc">
            <table width="750" height="700" cellpadding="0" cellspacing="0">
							<tr>
	  							<td valign="top" class="Main">
									<p class="NoBreakBeforeAfter"><img src="../wy_trip_images/TopCol3.gif" WIDTH="247" HEIGHT="23"></p>
									<p class="NoBreakBeforeAfter"><img src="../wy_trip_images/HeaderOtherDestination.gif" width="229" height="28"></p>
									<p class="Indented1" align="center"><font size="6"><b><%=infor%></b></font></p>
							</tr>			
            </body>
            </html>
         <%
   end sub
      
   
   'get now time
   function wytime()
        wyyear=year(now)
        wyday=day(now)
        wymonth=month(now)
        
        wytime=wyyear&"-"&wymonth&"-"&wyday
   end function
   
   
   
   
   'return the strlen1/3
   function wystrlenonethird(infor)
           allstrlen=len(infor)
           onepart=allstrlen / 3
           onepart=int(onepart)
           
           wystrlenonethird=onepart
   end function
  
  
   'format note
   function wynote(infor)
            wynote=replace(trim(infor),chr(13),"<br>")
   end function
  
  
%>

⌨️ 快捷键说明

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