?? addxinxi.asp
字號:
<!--#include file="conn1.asp"-->
<!--#include file="err.asp"-->
<!--#include file=usercookies.asp-->
<!--#include file="config.asp"-->
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=title%>-信息發布</title>
<link href="inc_style.css" rel="stylesheet" type="text/css">
</head>
<SCRIPT language=javascript>
<!--
function CheckForm()
{
if(document.myform.biaoti.value.length<1)
{
alert("信息標題沒有填寫!");
return false;
}
if(document.myform.jiage.value.length<1)
{
alert("價格填寫正確!");
return false;
}
if(document.myform.memo.value.length<1)
{
alert("信息內容沒有填寫!");
return false;
}
if(document.myform.name.value.length<1)
{
alert("聯系人姓名沒有填寫!");
return false;
}
if(document.myform.dianhua.value.length<1)
{
alert("聯系電話沒有填寫!");
return false;
}
}
//-->
</SCRIPT>
<body topmargin="0">
<!--#include file=top.asp-->
<div align="center">
<center>
<table border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" width="768" bgcolor="#FFFFFF">
<tr>
<td width="163" valign="top">
<!--#include file=userleft.asp--></td>
<td width="10" height="533" background="images/line_01.gif" rowspan="2"> </td>
<td width="555" valign="top" rowspan="2"><div align="center">
<center>
<table width="489" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<form action="addxinxichk.asp" name="myform" method="POST">
<tr>
<td width="16">
<img src="images/obj_waku3_01.gif"></td>
<td width="456">
<img src="images/ba_home.gif" width="490" height="31"></td>
<td width="17">
<img src="images/obj_waku3_02.gif"></td>
</tr>
<tr>
<td width="16" background="images/obj_waku3_03.gif">
</td>
<td width="456" bgcolor="#EEEEEE">
<table width="486" border="0" cellspacing="0" cellpadding="0" height="126">
<tr>
<td height="27" bgcolor="#EEEEEE" colspan="2" width="486">
<p align="center"><b>發布信息</b></td>
</tr>
<tr>
<td height="25" bgcolor="#EEEEEE" width="90" align="right">
信息類別:</td>
<td height="25" bgcolor="#EEEEEE" width="409">
<%
dim rs,sql,count,username
username=request.cookies("cnmai")("username")
set rs=server.createobject("adodb.recordset")
sql = "select * from class2 order by paixu desc"
rs.open sql,conn,1,1
%><SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("class2"))%>","<%= trim(rs("class1"))%>","<%= trim(rs("id"))%>");
<%
count = count + 1
rs.movenext
loop
rs.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>
<%
sql = "select * from class1 order by paixu desc"
rs.open sql,conn,1,1
if rs.eof and rs.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="0">==分類==</OPTION>
<%do while not rs.eof
%><OPTION value="<%=trim(rs("id"))%>"><%=trim(rs("class1"))%></OPTION>
<%
rs.movenext
loop
end if
rs.close
%></SELECT>
<SELECT name="class2">
<OPTION selected value="0">==二級分類==</OPTION>
</SELECT> <font color="#FF0000">*</font> </td>
</tr>
<tr>
<td height="25" bgcolor="#EEEEEE" width="90" align="right">
信息標題:</td>
<td height="19" bgcolor="#EEEEEE" width="409">
<input type="text" maxlength="40" name="biaoti" size="43">(<font color="#CC5200">40字以內</font>) <font color="#FF0000">*</font> </td>
</tr>
<tr>
<td height="25" bgcolor="#EEEEEE" width="90" align="right">
交易方式:</td>
<td height="25" bgcolor="#EEEEEE" width="409">
<select name="leixing">
<option value="1"><%=leixing1%></option>
<option value="2"><%=leixing2%></option>
<option value="3"><%=leixing3%></option>
<option value="4"><%=leixing4%></option>
<option value="5"><%=leixing5%></option>
<option value="6"><%=leixing6%></option>
<option value="7"><%=leixing7%></option>
<option value="8"><%=leixing8%></option>
<option value="9"><%=leixing9%></option>
</select></td>
</tr>
<tr>
<td height="25" bgcolor="#EEEEEE" width="90" align="right">
物品價格:</td>
<td height="25" bgcolor="#EEEEEE" width="409">
<!--webbot bot="Validation" s-data-type="String" b-allow-letters="TRUE" b-allow-digits="TRUE" b-allow-whitespace="TRUE" i-maximum-length="30" --><input type="text" name="jiage" size="10" maxlength="30" value="0">
元 (<font color="#CC5200">建議寫清楚有關費用方面的信息,</font>0<font color="#CC5200">元表示面議</font>)</td>
</tr>
<tr>
<td height="25" bgcolor="#EEEEEE" width="90" align="right">
交易地區:</td>
<td height="25" bgcolor="#EEEEEE" width="409">
<!--webbot bot="Validation" S-Data-Type="String" B-Allow-Letters="TRUE" B-Allow-Digits="TRUE" B-Allow-WhiteSpace="TRUE" I-Maximum-Length="20" -->
<input type="text" name="diqu" size="12" maxlength="20"></td>
</tr>
<tr>
<td height="25" bgcolor="#EEEEEE" width="90" align="right">
<p>詳細說明:</td>
<td height="25" bgcolor="#EEEEEE" width="409">
<textarea rows="11" name="memo" cols="50"></textarea> <font color="#FF0000">*</font> </td>
</tr>
<%
sql = "select * from [user] where username='"&username&"'"
rs.open sql,conn,1,1
if rs.eof then
errcnmai(9)
response.end
end if
%>
<tr>
<td height="25" bgcolor="#EEEEEE" width="90" align="right">
聯系人:</td>
<td height="25" bgcolor="#EEEEEE" width="409">
<input type="text" name="name" size="23" maxlength="15" value="<%=rs("name")%>">
<font color="#FF0000">*</font> </td>
</tr>
<tr>
<td height="25" bgcolor="#EEEEEE" width="90" align="right">
聯系電話:</td>
<td height="25" bgcolor="#EEEEEE" width="409">
<input type="text" name="dianhua" size="23" maxlength="15" value="<%=rs("dianhua")%>"> <font color="#FF0000">*</font> </td>
</tr>
<tr>
<td height="25" bgcolor="#EEEEEE" width="90" align="right">
QQ或MSN:</td>
<td height="25" bgcolor="#EEEEEE" width="409">
<input type="text" name="qq" size="23" maxlength="15" value="<%=rs("qq")%>"></td>
</tr>
<tr>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -