wy_trip_fun.inc
资源名称:lyxxgl.rar [点击查看]
上传用户:hnxqingdao
上传日期:2013-05-22
资源大小:1283k
文件大小:3k
源码类别:
其他行业
开发平台:
ASP/ASPX
- <!--#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
- %>