📄 fbmm.asp
字号:
<%
'########################################
'
'XinYou-pK(CMS)(v1.0)拼客内容管理系统
'
'使用过程中,如有问题,请联系QQ:16129825 E-mail:liuxing99@tom.com
'
'演示地址:http://www.XinYou88.net
'
'程序简单易用,基本设置都有后台设置,不需要专业的知识就可以建立一个拼客网站
'
'如有BUG,请通知一声,谢谢!!!
'
'########################################
%>
<!--#include file="inc/config.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
<meta name="keywords" content="<%=rs("key")%>">
<meta name="author" content="版权所有:XINYOU(QQ:16129825 TEL:0518-5526465)连云港信友科技有限公司,诚接各种网站建设,程序编写!">
<title><%=rs("title")%>-发布买卖信息</title>
<style type="text/css">
<!--
body {
margin-top: 0px;
}
-->
</style>
<script language=javascript>
<!--
function checkform()
{
if(document.myform.biaoti.value.length<1)
{
alert("请填写信息标题!");
document.myform.biaoti.focus();
return false;
}
if(document.myform.class1.value.length<1)
{
alert("请选择一级分类!");
document.myform.class1.focus();
return false;
}
if(document.myform.class2.value.length<1)
{
alert("请选择二级分类!");
document.myform.class2.focus();
return false;
}
if(document.myform.neirong.value.length<2)
{
alert("请填写信息内容!");
document.myform.neirong.focus();
return false;
}
if(document.myform.lxr.value.length<1)
{
alert("请填写联系人!");
document.myform.lxr.focus();
return false;
}
if(document.myform.dianhua.value.length<1)
{
alert("请填写联系电话!");
document.myform.dianhua.focus();
return false;
}
}
//-->
</script>
</head>
<body>
<% call top() %>
<%
dim user,urs,usql
user=request.cookies("xinyou88")("user")
if user="" then
%>
<div align="center">
<table width="980">
<tr>
<!--左侧-->
<td width="250" valign="top">
<div align="center">
<table width="99%">
<Tr><td>
<table width="100%" class="table">
<tr>
<td height="30" class="title">热门买卖信息</td>
</tr>
<tr>
<td><table width="100%"><% call hotmm()%></table></td>
</tr>
</table>
</td></Tr>
<Tr><td>
<table width="100%" class="table">
<tr>
<td height="30" class="title">最新买卖信息</td>
</tr>
<tr>
<td><table width="100%"><% call newmm()%></table></td>
</tr>
</table>
</td></Tr>
</table>
</div> </td>
<!--左侧结束-->
<!--中部-->
<Td width="720" align="center" valign="top"><div align="center">
<table width="100%" align="center">
<tr><td>
<table width="100%" class="table" >
<tr>
<td height="30" class="title" ><div align="center">发布买卖信息</div></td>
</tr>
<tr>
<Td>
<form name="myform" action="fbmmok.asp" method="post">
<table width="90%" align="center">
<tr>
<td width="25%"><div align="right">标题:</div></td>
<td><input name="biaoti" type="text" size="35" maxlength="35">
<font color="red">*</font> </td>
</tr>
<tr>
<td width="25%"><div align="right">分类:</div></td>
<td><%
dim rsclass,sqlclass
set rsclass=server.createobject("adodb.recordset")
sqlclass = "select * from mmclass2"
rsclass.open sqlclass,conn,1,1
%><SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rsclass.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rsclass("class2"))%>","<%= trim(rsclass("class1"))%>","<%= trim(rsclass("id"))%>");
<%
count = count + 1
rsclass.movenext
loop
rsclass.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.class2.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.class2.options[document.myform.class2.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</SCRIPT><%
sqlclass = "select * from mmclass1"
rsclass.open sqlclass,conn,1,1
if rsclass.eof and rsclass.bof then
response.write "请先添加分类。"
response.end
else
%><SELECT name="class1" onChange="changelocation(document.myform.class1.options[document.myform.class1.selectedIndex].value)" size="1">
<OPTION selected value=>一级分类</OPTION>
<%do while not rsclass.eof
%><OPTION value="<%=trim(rsclass("id"))%>"><%=trim(left(rsclass("class1"),5))%></OPTION>
<%
rsclass.movenext
loop
end if
rsclass.close
%></SELECT>
<SELECT name="class2">
<OPTION selected value=>二级分类</OPTION>
</SELECT>
<font color="red">*</font> </td>
</tr>
<tr>
<td width="25%"><div align="right">有效期:</div></td>
<td><select name="yxq">
<option value="1" selected>1天</option>
<option value="2">2天</option>
<option value="3">3天</option>
<option value="7">7天</option>
<option value="10">10天</option>
<option value="15">15天</option>
<option value="20">20天</option>
<option value="30">30天</option>
<option value="45">45天</option>
<option value="30">一个月</option>
<option value="90">三个月</option>
</select><font color="red">*</font> </td>
</tr>
<tr>
<td width="25%"><div align="right">详细内容:</div></td>
<td><textarea name="neirong" cols="35" rows="8"></textarea>
<font color="red">*</font> </td>
</tr>
<tr>
<td width="25%"><div align="right">发布人:</div></td>
<td><input name="fbr" type="text" size="35" maxlength="15">
<font color="red">*</font> </td>
</tr>
<tr>
<td width="25%"><div align="right">联系电话:</div></td>
<td><input name="dianhua" type="text" size="35" maxlength="30">
<font color="red">*</font> </td>
</tr>
<tr>
<td width="25%"><div align="right">联系QQ:</div></td>
<td><input name="qq" type="text" size="35" maxlength="11">
</td>
</tr>
<tr>
<td width="25%" height="21"><div align="right">联系地址:</div></td>
<td><input name="dizhi" type="text" size="35" maxlength="50">
</td>
</tr>
<tr>
<td width="25%" height="40"><div align="right">上传相关图片:</div></td>
<td><iframe name="I1" frameborder="0" width="100%" height="40" scrolling="no" src="upload.asp"></iframe>
<input type="hidden" name="tupian" size="40">
</td>
</tr>
<tr>
<td colspan="2"><div align="center"><input type="submit" value="发布买卖信息" onclick="javascript:return checkform();">
<input type="reset" value="取消发布"></div></td>
</tr>
</table>
</form>
</Td>
</tr>
</table>
</td></tr>
</table>
</div></Td>
</tr>
</table>
</div>
<%else
set urs=server.CreateObject("adodb.recordset")
usql="select top 1 * from user where name = '"&user&"'"
urs.open usql,conn,1,1
'response.write usql
%>
<div align="center">
<table width="980">
<tr>
<!--左侧-->
<td width="250" valign="top">
<div align="center">
<table width="99%">
<Tr><td>
<table width="100%" class="table">
<tr>
<td height="30" class="title">热门买卖信息</td>
</tr>
<tr>
<td><table width="100%"><% call hotmm()%></table></td>
</tr>
</table>
</td></Tr>
<Tr><td>
<table width="100%" class="table">
<tr>
<td height="30" class="title">最新买卖信息</td>
</tr>
<tr>
<td><table width="100%"><% call newmm()%></table></td>
</tr>
</table>
</td></Tr>
</table>
</div> </td>
<!--左侧结束-->
<!--中部-->
<Td width="720" align="center" valign="top"><div align="center">
<table width="100%" align="center">
<tr><td>
<table width="100%" class="table" >
<tr>
<td height="30" class="title" ><div align="center">发布买卖信息</div></td>
</tr>
<tr>
<Td>
<form name="myform" action="fbmmok.asp" method="post">
<table width="90%" align="center">
<tr>
<td width="25%"><div align="right">标题:</div></td>
<td><input name="biaoti" type="text" size="35" maxlength="35">
<font color="red">*</font> </td>
</tr>
<tr>
<td width="25%"><div align="right">分类:</div></td>
<td><%
dim rsclass1,sqlclass1
set rsclass1=server.createobject("adodb.recordset")
sqlclass1 = "select * from mmclass2"
rsclass1.open sqlclass1,conn,1,1
%><SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rsclass1.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rsclass1("class2"))%>","<%= trim(rsclass1("class1"))%>","<%= trim(rsclass1("id"))%>");
<%
count = count + 1
rsclass1.movenext
loop
rsclass1.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.class2.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.class2.options[document.myform.class2.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</SCRIPT><%
sqlclass1 = "select * from mmclass1"
rsclass1.open sqlclass1,conn,1,1
if rsclass1.eof and rsclass1.bof then
response.write "请先添加分类。"
response.end
else
%><SELECT name="class1" onChange="changelocation(document.myform.class1.options[document.myform.class1.selectedIndex].value)" size="1">
<OPTION selected value=>一级分类</OPTION>
<%do while not rsclass1.eof
%><OPTION value="<%=trim(rsclass1("id"))%>"><%=trim(left(rsclass1("class1"),5))%></OPTION>
<%
rsclass1.movenext
loop
end if
rsclass1.close
%></SELECT>
<SELECT name="class2">
<OPTION selected value=>二级分类</OPTION>
</SELECT>
<font color="red">*</font> </td>
</tr>
<tr>
<td width="25%"><div align="right">有效期:</div></td>
<td><select name="yxq">
<option value="1" selected>1天</option>
<option value="2">2天</option>
<option value="3">3天</option>
<option value="7">7天</option>
<option value="10">10天</option>
<option value="15">15天</option>
<option value="20">20天</option>
<option value="30">30天</option>
<option value="45">45天</option>
<option value="30">一个月</option>
<option value="90">三个月</option>
</select><font color="red">*</font> </td>
</tr>
<tr>
<td width="25%"><div align="right">详细内容:</div></td>
<td><textarea name="neirong" cols="35" rows="8"></textarea>
<font color="red">*</font> </td>
</tr>
<tr>
<td width="25%"><div align="right">发布人:</div></td>
<td><input name="fbr" type="text" size="35" maxlength="15" value="<%=urs("name")%>">
<font color="red">*</font> </td>
</tr>
<tr>
<td width="25%"><div align="right">联系电话:</div></td>
<td><input name="dianhua" type="text" size="35" maxlength="30" value="<%=urs("shouji")%>">
<font color="red">*</font> </td>
</tr>
<tr>
<td width="25%"><div align="right">联系QQ:</div></td>
<td><input name="qq" type="text" size="35" maxlength="11" value="<%=urs("qq")%>">
</td>
</tr>
<tr>
<td width="25%" height="21"><div align="right">联系地址:</div></td>
<td><input name="dizhi" type="text" size="35" maxlength="50" value="<%=urs("dizhi")%>">
</td>
</tr>
<tr>
<td width="25%" height="40"><div align="right">上传相关图片:</div></td>
<td><iframe name="I1" frameborder="0" width="100%" height="40" scrolling="no" src="upload.asp"></iframe>
<input type="hidden" name="tupian" size="40">
</td>
</tr>
<tr>
<td colspan="2"><div align="center"><input type="submit" value="发布买卖信息" onclick="javascript:return checkform();">
<input type="reset" value="取消发布"></div></td>
</tr>
</table>
</form>
</Td>
</tr>
</table>
</td></tr>
</table>
</div></Td>
</tr>
</table>
</div>
<% end if%>
<% call foot() %>
<%
rsclass.close
set rsclass=nothing
rsclass1.close
set rsclass1=nothing
urs.close
set urs=nothing
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -