📄 youandme.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="mfk_body.asp"-->
<html>
<head>
<title><%=title1%>--结伴同行</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<script language="javascript">
function SelectDate(obj)
{
var obj = eval('document.form1.'+obj);
result = window.showModalDialog('giveme_ok.asp?action=showdate',obj.value,'help:no;status: no;dialogWidth=184px;dialogHeight=220px');
if (result!=null) { obj.value = result; }
}
function check(){
if(form1.textfield1.value==""){
alert('请填写您的姓名!');
return false;
}
if(form1.textfield2.value==""){
alert("请填写您的所在地址!");
return false;
}
if(form1.textfield3.value==""){
alert("请填写您出发的日期!");
return false;
}
if(form1.textfield4.value==""){
alert("请填写您要去的景区!");
return false;
}
if(form1.textfield5.value==""){
alert("请填写您出行的人数!");
return false;
}
if(form1.textfield6.value==""){
alert("请填写您的联系方式!");
return false;
}
if(form1.textfield8.value==""){
alert("请填写出游的方式!");
return false;
}
if(form1.textfield9.value==""){
alert("请填写您发布信息的主题!");
return false;
}
if(form1.textfield10.value==""){
alert("请填写您发布信息的内容!");
return false;
}
}
</script>
<%
dim action
action=trim(request("action"))
if action="add" then
dim text(12)
for i=1 to 12
text(i)=replace(trim(request("textfield"&i&"")),"'","")
next
if not isdate(text(3)) then
response.redirect("error.asp?errormsg=<li>错误的数据类型!请选择日期!</li>")
end if
if not isnumeric(text(5)) then
response.redirect("error.asp?errormsg=<li>错误的数据类型!只能为数字!</li>")
end if
sql="insert into youandme (Yname,Yadd,Ytime,Ygoto,Ynum,Ycall,Yqq"&_
",Yyou,Ytitle,Ytext,Ybio,Ysex,Yttime)values("&_
"'"&text(1)&"','"&text(2)&"','"&text(3)&"','"&text(4)&"','"&text(5)&"',"&_
"'"&text(6)&"','"&text(7)&"','"&text(8)&"','"&text(9)&"','"&text(10)&"','"&text(11)&"',"&_
"'"&text(12)&"',#"&now()&"#)"
conn.execute(sql)
closeconn
response.Redirect("ok.asp?msg=<li>您本次发布结伴同行信息成功!</li><br><li>感谢您的参与!</li>")
end if
call pagestart
%>
<table width="755" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="27"><img src="skins/mfk_skin(<%=skin%>)/mfk_lefttitle1.gif"></td>
<td width="701" background="skins/mfk_skin(<%=skin%>)/mfk_midtitle1.gif"> </td>
<td width="27"><img src="skins/mfk_skin(<%=skin%>)/mfk_righttitle1.gif"></td>
</tr>
</table>
<table width="755" border="0" align="center" cellpadding="0" cellspacing="0" class="lefttablebox">
<tr>
<td width="236" height="30" align="center">发 布 结 伴 同 行 信 息</td>
<td width="517" align="center">浏 览 结 伴 同 行 信 息</td>
</tr>
<tr>
<td height="400" class="table1"><table width="236" border="0" cellspacing="0" cellpadding="2">
<form action="?action=add" method="post" name="form1" onSubmit="return check();">
<tr>
<td width="60" height="26" align="center">姓 名</td>
<td width="168"><input name="textfield1" type="text" id="textfield1" size="12" onMouseOver="this.focus();">
<select name="textfield12" id="textfield12">
<option value="先生" selected>先生</option>
<option value="小姐">小姐</option>
</select></td>
</tr>
<tr>
<td height="26" align="center">身在何地</td>
<td><input name="textfield2" type="text" size="15" onMouseOver="this.focus();"></td>
</tr>
<tr>
<td height="26" align="center">出发日期</td>
<td><input name="textfield3" type="text" onClick="SelectDate('textfield3');" onMouseOver="this.focus();" value="点击选择" size="12"> </td>
</tr>
<tr>
<td height="26" align="center">欲去景区</td>
<td><input type="text" name="textfield4" onMouseOver="this.focus();"></td>
</tr>
<tr>
<td height="26" align="center">出游人数</td>
<td><input name="textfield5" type="text" size="10" onMouseOver="this.focus();"></td>
</tr>
<tr>
<td height="26" align="center">联系方式</td>
<td><input type="text" name="textfield6" onMouseOver="this.focus();"></td>
</tr>
<tr>
<td height="26" align="center">联系OICQ</td>
<td><input name="textfield7" type="text" size="18" onMouseOver="this.focus();"></td>
</tr>
<tr>
<td height="26" align="center">出游方式</td>
<td><input type="text" name="textfield8" onMouseOver="this.focus();"></td>
</tr>
<tr>
<td height="26" align="center">信息标题</td>
<td><input type="text" name="textfield9" onMouseOver="this.focus();"></td>
</tr>
<tr>
<td height="50" align="center">信息内容<br>
支持UBB</td>
<td><textarea name="textfield10" cols="20" rows="3" id="textfield10" onMouseOver="this.focus();"></textarea></td>
</tr>
<tr>
<td height="50" align="center">备注项目<br>
支持UBB</td>
<td><textarea name="textfield11" cols="20" rows="3" id="textfield11" onMouseOver="this.focus();"></textarea></td>
</tr>
<tr>
<td height="26" colspan="2" align="center"><input type="submit" name="Submit" value="发布">
<input type="reset" name="Submit2" value="重写"></td>
</tr>
</form>
</table></td>
<td valign="top" class="tablebg"><table width="515" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="364" valign="top"><table width="515" border="0" cellspacing="0" cellpadding="0">
<%
set rs=server.createobject("adodb.recordset")
sql="select * from youandme order by id desc"
rs.open sql,conn,1,2
if rs.eof or rs.bof then
response.write ("<tr height=45 align=center><td><font color=red>提示:暂没有结伴同行信息!</font></td></tr>")
else
rs.pagesize=14
dim page
page=trim(request("page"))
if page<>"" then
page=cint(page)
else
page=1
end if
pagec=rs.pagecount
if page>pagec then
page=pagec
end if
rs.absolutepage=page
colori=1
a=0
do while not rs.eof and a<rs.pagesize
if colori>2 then colori=1
%>
<tr <%if colori=2 then response.write(" class=""table1""")%>>
<td width="415" height="26"><a href="lookyouandme.asp?id=<%=rs("id")%>"><%=mfkiqpl(rs("Yadd"))%> 的 <%=mfkiqpl(rs("Yname"))%>(<%=rs("Ysex")%>) 于 <%=rs("Ytime")%> 去 <b><%=mfkiqpl(rs("Ygoto"))%></b> 旅行。</a></td>
<td width="50" height="26">点:<%=rs("Yclick")%></td>
<td width="50" height="26">回:<%=rs("RENUM")%></td>
</tr>
<%
rs.movenext
a=a+1
colori=colori+1
loop
end if
closers(rs)
%>
</table></td>
</tr>
<tr>
<td height="36" align="center" class="titletable">
<%
response.write ("<a href=?page=1>首页</a> ")
if page>1 then
response.write ("<a href=?page="&page-1&">上一页</a> ")
else
response.write("上一页 ")
end if
if page<pagec then
response.write("<a href=?page="&page+1&">下一页</a> ")
else
response.write("下一页 ")
end if
response.write ("<a href=?page="&pagec&">尾页</a> ")
response.write ("当前:"&page&"/"&pagec&"")
%>
</td>
</tr>
</table></td>
</tr>
</table>
<table width="755" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="7"><img src="skins/mfk_skin(<%=skin%>)/mfk_lefttitle1_1.gif"></td>
<td width="741" background="skins/mfk_skin(<%=skin%>)/mfk_midtitle1_1.gif"> </td>
<td width="7"><img src="skins/mfk_skin(<%=skin%>)/mfk_righttitle1_1.gif"></td>
</tr>
</table>
<table width="755" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="6"></td>
</tr>
</table>
<%
call pageend
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -