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

📄 index.asp

📁 中介之家房产中介系统 V4.0企业共享版
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%@ Language=VBScript %>
<!--#INCLUDE FILE="conn.asp" -->
<!--#INCLUDE FILE="config.asp" -->
<% 
response.buffer=true
Response.Expires=0
Set rs9 = Server.CreateObject("ADODB.Recordset")
sql9 ="SELECT * From about Order By id DESC"
RS9.open sql9,Conn,3,3
%>
<%
dim rs
dim sql
dim page
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "Select * FROM enet Order By dateandtime Desc"
rs.open sql,conn,1,1

IF not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Then
page=1
Else
Page=Int(Abs(Request("page")))
End if
rs.pagesize =5
total  = rs.RecordCount
mypagesize=rs.pagesize
rs.absolutepage = page
%>
<%
if request("test")="insert" then
txtname=left(request("txtname"),30)
txtemail=left(request("txtemail"),30)
txthomepage=left(request("txthomepage"),50)
txtoicq=left(request("txtoicq"),10)
if request.form("xxx")="" then
pic="images/1.gif"
else
pic=request.form("xxx")
end if
txtcome=left(request("txtcome"),20)
sex=request("sex")
txtcontent=left(request("txtcontent"),500)
if txtoicq="" then txtoicq="打死我也不说"
if txtcome="" then txtcome="保密"
if txthomepage="" or txthomepage="http://" then txthomepage="还没有呢!"

if txtname="" then
		response.write "<script language='javascript'>" & VbCRlf
	    response.write "alert('请填入你的名字');" & VbCrlf
	    response.write "history.go(-1);" & vbCrlf
	    response.write "</script>" & VbCRLF
	    response.end
end if

If txtemail="" or IsValidEmail(txtemail)=false then
	    response.write "<script language='javascript'>" & VbCRlf
	    response.write "alert('错误的email输入');" & VbCrlf
	    response.write "history.go(-1);" & vbCrlf
	    response.write "</script>" & VbCRLF
	    response.end
end if

if txtcontent=""  then
	    response.write "<script language='javascript'>" & VbCRlf
	    response.write "alert('别椤着,输入内容啊~~~');" & VbCrlf
	    response.write "history.go(-1);" & vbCrlf
	    response.write "</script>" & VbCRLF
	    response.end
'else 
'response.write txtcontent
'response.end
end if
function IsValidEmail(email)
 dim names, name, i, c
 IsValidEmail = true
 names = Split(email, "@")
 if UBound(names) <> 1 then 
   IsValidEmail = false
   exit function
 end if
 for each name in names 
   if Len(name) <= 0 then
     IsValidEmail = false
     exit function
   end if
   for i = 1 to Len(name)
     c = Lcase(Mid(name, i, 1))
     if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
       IsValidEmail = false
       exit function
     end if
   next
   if Left(name, 1) = "." or Right(name, 1) = "." then 
      IsValidEmail = false
      exit function
   end if
 next
 if InStr(names(1), ".") <= 0 then
   IsValidEmail = false
   exit function
 end if
 i = Len(names(1)) - InStrRev(names(1), ".")
 if i <> 2 and i <> 3 then
   IsValidEmail = false
   exit function
 end if
 if InStr(email, "..") > 0 then
   IsValidEmail = false
 end if

end function 
function IsLongStr(str) 
dim longStrs,longstr
IsLongStr = true
longStrs = Split(str,"")
for each longStr in longStrs
	if len(longstr) >50 then
	ISlongStr = false
	end if
next
end function


txtname=server.htmlencode(txtname)
txtcome=server.htmlencode(txtcome)
txtemail=server.htmlencode(txtemail)
txtcome=server.htmlencode(txtcome)
txthomepage=txthomepage
txtoicq=server.htmlencode(txtoicq)
txtcontent=server.htmlencode(txtcontent)
reply = "没有"

Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from enet"
rs.open sql,conn,3,2
rs.addnew

		rs("name")=txtname
		rs("email")=txtemail
       	rs("homepage")=txthomepage
        rs("come")=txtcome
		rs("oicq")=txtoicq
		rs("content")=txtcontent
		rs("head")=pic
		rs("dateandtime")=now()
		rs("reply")=reply
		rs("ip")=Request.ServerVariables("REMOTE_HOST")
		rs("writename")=txt_writename
		rs("sex")=cstr(sex)
		rs.update
		rs.close
		response.redirect "index.asp"

end if
%>
<HTML>
<HEAD>
<TITLE><%=rs9("name")%></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
BODY{ SCROLLBAR-FACE-COLOR: #cccccc; FONT-SIZE: 10px; SCROLLBAR-HIGHLIGHT-COLOR: #cccccc; SCROLLBAR-SHADOW-COLOR: #cccccc; COLOR: #333333; SCROLLBAR-3DLIGHT-COLOR: #ffffff; LINE-HEIGHT: normal; SCROLLBAR-ARROW-COLOR: #000000; SCROLLBAR-TRACK-COLOR: #efefef; FONT-STYLE: normal; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; SCROLLBAR-DARKSHADOW-COLOR: #999999 }
table,td{ font:9pt "宋体" }
A { COLOR: #ffffff; TEXT-DECORATION: none }
A:hover { COLOR: #ffffff; TEXT-DECORATION:line-through }
.td{ font-family:"宋体";font-size:9pt;line-height:150% }
.big{ font:14.8px "宋体" }
input{ height:18px;border-left:1 ridge #ffffff;border-top:1 ridge #ffffff;border-bottom:1;border-right:1;border-style:ridge;background-color:#efefef;font:9pt "宋体" }
-->
</style>
<script language=javascript>
<!--
function check()
{
if(document.login.txtname.value=="")
{alert("咖啡设计提醒您!姓名不能为空^_^");return false}
if(document.login.txtcontent.value=="")
{alert("咖啡设计提醒您!留言内容不能为空^_^");return false}
}
-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="8">
<table width="531" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
  <tr> 
    <td width="531"> <table width="82%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="530" background="images/bg_top.gif"> <table width="83%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td colspan="3"><img src="images/left_kuang_top.gif" width="530" height="4"></td>
              </tr>
              <tr> 
                <td width="4" background="images/left_kuang_left.gif"><img src="images/left_kuang_left.gif" width="4" height="2"></td>
                <td width="522" height="100"><img src="images/top.jpg" width="522" height="100"> 
                </td>
                <td width="4" background="images/left_kuang_left.gif"><img src="images/left_kuang_left.gif" width="4" height="2"></td>
              </tr>
              <tr> 
                <td colspan="3"><img src="images/left_kuang_bottom.gif" width="530" height="4"></td>
              </tr>
            </table></td>
          <td width="120"></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="531" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td background="images/bg_left.gif" valign="top" width="530"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td colspan="3"><img src="images/left_kuang_top.gif" width="530" height="4"></td>
        </tr>
        <tr> 
          <td width="4" background="images/left_kuang_left.gif"><img src="images/left_kuang_left.gif" width="4" height="2"></td>
          <td width="522" height="450" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="5" height="100%">
              <tr> 
                <td class="td" valign="top"> <table align=center border=0 cellpadding=0 cellspacing=1 bgcolor="<%=rs9("bian")%>" width=100%>
                    <tbody>
                      <%
dim i 
i=1
do while not rs.eof  and mypagesize>0
id=rs("gbookid")
name=rs("name")
email=rs("email")
homepage=rs("homepage")
oicq=rs("oicq")
head=rs("head")
content=rs("content")
content=Autolink(content)
dateandtime=rs("dateandtime")
reply=rs("reply")
sex=rs("sex")
%>
                      <tr> 
                        <td bgcolor="<%=rs9("bgss")%>" rowspan=2 width=80> <center>
                            <img border=0 src="<%=head%>"> <br>
                            <br>
                            <%=name%> </center></td>
                        <td bgcolor="<%=rs9("bgss")%>" height=20> <table border=0 cellpadding=0 cellspacing=0 width="99%">
                            <tbody>

⌨️ 快捷键说明

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