<%@language=vbscript codepage=936%>
<%
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
dim dns
dns="../"
%><!--#Include file="../Common/Inc_DatConn.asp"-->
<!--#Include file="Common/Inc_Config.asp"-->
<!--#Include file="../Common/Inc_Function.asp"-->
<!--#Include file="Common/Inc_Function.asp"-->
<!--#include file="../Common/fy_ClsEmail.asp"-->
<!--#Include file="fy_admin_check.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/Admin_Style.Css" rel="stylesheet" type="text/css">
<script src="../common/Admin.js" type="text/javascript"></script>
<%bbaction=changechr(request("bbaction"))
Select case bbaction
  	Case "viewinfo"
  	id=RtnReplaceInt(request("id"),0)
		call viewinfo
 	Case "addinfo"
		call addinfo
 	Case "saveaddinfo"
		call saveaddinfo
	Case "makehtmlinfo"
	call makehtmlinfo
 	Case "editinfo"
		call editinfo
 	Case "saveeditinfo"
		call saveeditinfo
 	Case "delweishen"
		call delweishen
 	Case "reup"
		call reup
	Case else
if fla11<>1 and fla10<>1 and Session("intUserLevel")<2 then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>错误：操作权限出错，您没有权限操作些功能！</li>"
Call Admin_ShowErr(ErrMsg)
end if
dim strstate,strkeyword,typejj,fyaction,intPage
strstate=RtnReplaceInt(Request("strstate"),1)
if strstate=0 then
if fla16=1 or Session("intUserLevel")>2 then
strstate=0
else
strstate=1
end if
end if
strKeyword = Request("Keyword")
typejj = Request("typejj")
fyaction = Request("fyaction")
id=Request("id")
intPage = Trim(Request("Page"))
if intPage = "" then
	intPage = 1
else
	intPage = Clng(intPage)
end if
Select case fyaction
  	Case "sh"
  		call fyinfosh(1,id,strKeyword,typejj,intPage,strstate,request("userid"),request("email"),request("lxr"))
	Case "sh1"
		call fyinfosh(0,id,strKeyword,typejj,intPage,strstate,request("userid"),"","")
	Case "tj"
		call fyinfotj(1,id,strKeyword,typejj,intPage,strstate)
	Case "tj1"
		call fyinfotj(0,id,strKeyword,typejj,intPage,strstate)
	Case "zd"
		call fyinfozd(1,id,strKeyword,typejj,intPage,strstate)
	Case "zd1"
		call fyinfozd(0,id,strKeyword,typejj,intPage,strstate)
	Case "del"
	if request("submit")="审核选定的信息" then
	call fyinfoplsh(id,strKeyword,typejj,intPage,strstate)
	end if
	if request("submit")="删除选定的信息" then
		call fyinfodel(id,strKeyword,typejj,intPage,strstate)
	end if
		call fyinfodel(id,strKeyword,typejj,intPage,strstate)
End Select
%>
<SCRIPT language=javascript>
function unselectall()
{
    if(document.del.chkAll.checked){
	document.del.chkAll.checked = document.del.chkAll.checked&0;
    } 	
}

function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.Name != "chkAll")
       e.checked = form.chkAll.checked;
    }
  }

</SCRIPT>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<br>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr class="title"> 
    <td height="22" align="center">
	<p align="left"><strong>当前位置：<a href="Admin_Index.asp?Action=admin_main"><font color="#FFFFFF">管理首页</font></a> -&gt; <%if strstate=1 then%>信息管理<%else%>信息审核<%end if%></strong></td>
  </tr>
  <tr> 
            <td class="tdbg" align="center" height="30"> 
<table border="0" width="96%" cellspacing="0" cellpadding="0" align="center">
	    <tr>
<%if fla16=1 or Session("intUserLevel")>2 then%><form name="forddm" method="post" action="?"><td height="25">
<%if strstate=1 then
%><input name="strstate" type="hidden" value="0"><input type="submit" value="未审信息">
<%else%><input name="strstate" type="hidden" value="1">
<input type="submit" value="已审信息">
<%end if%>
</td></form><%end if
if Session("intUserLevel")>2 then%>
<form name="forddma" method="post" action="?"><input name="bbaction" type="hidden" value="guoqi">
		  <td width="13%" height="25"><input type="submit" value="过期信息"></td></form>
<%end if%>
		  <form method="post" action="?" name="Form1">
		  <td width="66%" height="25" align="right">搜索：<input type="text" name="Keyword" size="20" value="<% = Request("Keyword")%>" class="face"> 
			<select size="1" name="typejj">
			<option value="1" selected>按标题</option>
			<option value="2">按电话</option>
			<option value="3">按内容</option>
			</select> <input type="submit" name="Submit" value="搜"></td>
		  </form>
		</tr>
	  </table></td>
          </tr>

  </table><br>
<%if fla10=1 or Session("intUserLevel")>2 then%>
        <div align="center">
        <table border="0" cellspacing="1" cellpadding="4" width="96%" id="table1" class="border">
          <tr> 
            <td class="title"><b>按分类管理</b></td>
          </tr>
          <tr> 
            <td class="tdbg" align="center" height="30"> 
<%set rsadd=server.createobject("adodb.recordset")
if Session("intUserLevel")<2 then
sqladd="select id,BigClassName from BigClass where admin='"&Session("strAccount")&"' order by sj desc"
else
sqladd="select id,BigClassName from BigClass order by sj desc"
end if
rsadd.open sqladd,conn,1,1
do while not rsadd.eof
dqname=rsadd("id")
sbcname=rsadd("BigClassName")
%>
				<a href="?Keyword=<%=dqname%>&typejj=5"><b><%=sbcname%></b></a>
<%
rsadd.movenext
loop
rsadd.close
set rsadd=nothing
%></td>
          </tr>
          </table></div>
<br><%end if%><%if fla11=1 or Session("intUserLevel")>2 then%>
        <div align="center">
        <table border="0" cellspacing="1" cellpadding="4" width="96%" id="table1" class="border">
          <tr> 
            <td class="title"><b>按地区管理</b></td>
          </tr>
          <tr> 
            <td class="tdbg" align="center" height="30"> 
<%set rsadd=server.createobject("adodb.recordset")
if Session("intUserLevel")<2 then
sqladd="select name from mxdq where admin='"&Session("strAccount")&"' order by sj desc"
else
sqladd="select name from mxdq order by sj desc"
end if
rsadd.open sqladd,conn,1,1
do while not rsadd.eof
dqname=rsadd("name")
%>
				<a href="?Keyword=<%=dqname%>&typejj=4"><b><%=dqname%></b></a>
<%
rsadd.movenext
loop
rsadd.close
set rsadd=nothing
%></td>
          </tr>
          </table></div>
<br><%end if%>
	  <table border="0" width="96%" cellspacing="0" cellpadding="0" align="center" class="border">
	    <tr>
	      <td width="100%" class="booktable">
			<table border="0" width="100%" cellspacing="1" cellpadding="0">
			  <tr class="title">
			    <td width="66" height="30"  align="center">选择</td>
			    <td width="111" height="30" align="center">编 号</td>
			    <td width="56" height="30" align="center">类 型</td>
			    <td width="401" height="30" align="center">标 题</td>
			    <td width="106" height="30" align="center">有效期</td>
			    <td width="106" height="30" align="center">发布时间</td>
			    <td width="117" height="30"align="center">操 作</td>
			  </tr><form name="del" method="Post" action="?fyaction=del&Page=<%=intpage%>&Keyword=<% =strKeyword%>&typejj=<% =typejj%>&strstate=<% =strstate%>">	  
<%
Dim rdsInfo    '/通告的数据库对象及SQL语句/
Dim sqlInfo
Dim rdsTotalRec 
Dim intTotalRec	  '/所有记录/
Dim intInfoCot	  '/通告条数/
Dim intInfoCount
Dim n,p,ii	      '/定义一些临时变量/

intInfoCot = 20

set rdsInfo = Server.CreateObject("ADODB.Recordset")
'如果是搜索，开始判断搜索类型
if strKeyword <> "" then
Select case typejj
	  Case 1
	set rdsTotalRec = Conn.Execute("Select Count(InfoKey) From Dat_Information Where State ="&strstate&" And Topic like '%"& strKeyword &"%'")
	intTotalRec = rdsTotalRec(0)
	sqlInfo = "Select * From Dat_Information Where State ="&strstate&" And Topic like '%"& strKeyword &"%' Order By CreateTime Desc"
	  Case 2
	set rdsTotalRec = Conn.Execute("Select Count(InfoKey) From Dat_Information Where State ="&strstate&" And Tel like '%"& strKeyword &"%'")
	intTotalRec = rdsTotalRec(0)
	sqlInfo = "Select * From Dat_Information Where State ="&strstate&" And Tel like '%"& strKeyword &"%' Order By CreateTime Desc"
	  Case 3
	set rdsTotalRec = Conn.Execute("Select Count(InfoKey) From Dat_Information Where State ="&strstate&" And Content like '%"& strKeyword &"%'")
	intTotalRec = rdsTotalRec(0)
	sqlInfo = "Select * From Dat_Information Where State ="&strstate&" And Content like '%"& strKeyword &"%' Order By CreateTime Desc"
	  Case 4
	set rdsTotalRec = Conn.Execute("Select Count(InfoKey) From Dat_Information Where State ="&strstate&" And InfoAdd='"&strKeyword&"'")
	intTotalRec = rdsTotalRec(0)
	sqlInfo = "Select * From Dat_Information Where State ="&strstate&" And InfoAdd='"&strKeyword&"' Order By CreateTime Desc"
	  Case 5
	set rdsTotalRec = Conn.Execute("Select Count(InfoKey) From Dat_Information Where State ="&strstate&" And dl='"&strKeyword&"'")
	intTotalRec = rdsTotalRec(0)
	sqlInfo = "Select * From Dat_Information Where State ="&strstate&" And dl='"&strKeyword&"' Order By CreateTime Desc"
End Select
'判断完毕
else
if bbaction="guoqi" then
if is_sqldata=0 then
	set rdsTotalRec = Conn.Execute("Select Count(InfoKey) From Dat_Information Where State ="&strstate&" and  CInt(DateDiff('d',CreateTime,Now()))>CInt(InfoDate) ")
	intTotalRec = rdsTotalRec(0)
	sqlInfo = "Select * From Dat_Information Where State ="&strstate&" and  CInt(DateDiff('d',CreateTime,Now()))>CInt(InfoDate)  Order By CreateTime Desc"
else
	set rdsTotalRec = Conn.Execute("Select Count(InfoKey) From Dat_Information Where State ="&strstate&" and Cast(DateDiff(day,CreateTime,GetDate()) as int)>Cast(InfoDate As Int) ")
	intTotalRec = rdsTotalRec(0)
	sqlInfo = "Select * From Dat_Information Where State ="&strstate&" and Cast(DateDiff(day,CreateTime,GetDate()) as int)>Cast(InfoDate As Int)  Order By CreateTime Desc"
end if
else
	set rdsTotalRec = Conn.Execute("Select Count(InfoKey) From Dat_Information Where State ="&strstate&"")
	intTotalRec = rdsTotalRec(0)
	sqlInfo = "Select * From Dat_Information Where State ="&strstate&" Order By CreateTime Desc"
end if
end if
rdsInfo.Open sqlInfo,Conn,1,1
if not rdsInfo.EOF then
	if intTotalRec mod intInfoCot = 0 then
		n = intTotalRec \ intInfoCot
	else
		n = intTotalRec \ intInfoCot + 1
	end if
	rdsInfo.MoveFirst
	if intPage > n then intPage = n
	if intPage < 1 then intPage = 1
	rdsInfo.Move (intPage - 1) * intInfoCot
	do while not rdsInfo.EOF and intInfoCount < Clng(intInfoCot)
		intInfoCount = intInfoCount + 1
		xxlx3=rdsInfo("InfoClass")
		fyxxid=rdsInfo("InfoKey")
		strcolor=rdsInfo("color")
		CreateTime=rdsinfo("CreateTime")
%>	  
			  <tr class="tdbg" onMouseOut="this.className='tdbg'" onMouseOver="this.className='tdbg2'">
			    <td height="25" align="center" width=66><input name='ID' type='checkbox' onClick="unselectall()" id="ID" value='<% = rdsInfo("InfoKey")%>'>
			    </td>
			    <td height="25" align="center" width=111><% =fyxxid%></td>
			    <td height="25" align="center"><%call gqlx(2,xxlx3)%></td>
			    <td height="25">&nbsp;<a href="?bbaction=viewinfo&id=<% =fyxxid%>"><%if  strcolor<>""  then%><font color="#<%=strcolor%>"><% = rdsInfo("Topic")%></font><%else%><% = rdsInfo("Topic")%><%end  if%></a></td>
			    <td height="25" align="center" width=106><%
			    yxq=rdsinfo("InfoDate")
fbsj=FormatTime(CreateTime,8)
dqsj=DateAdd( "d" ,yxq ,fbsj)
sysj=DateDiff ("d",date(),dqsj)
if sysj<0 then
response.write "<font color=#808080>过期</font> <a href=?bbaction=reup&id="&fyxxid&"><font color=#ff0000>重发</font></a>"
else
response.write "<font color=#ff0000>"&sysj&"</font>&nbsp;天"
end if
			    %></td>
			    <td height="25" align="center" width=106><% = FormatTime(CreateTime,5)%></td>
			    <td height="25" align="center" width=117>
			    <%if fla16=1 or Session("intUserLevel") > 2 then%><%if rdsInfo("State") = 1 then%><a href='?fyaction=sh1&id=<% =fyxxid%>&Page=<% =intpage%>&Keyword=<% =strKeyword%>&typejj=<% =typejj%>&strstate=<% =strstate%>' title=取消审核 onClick="{if(confirm('确定取消审核吗?')){return true;}return false;}"><font color="#008000">审</font></a><%else%>&nbsp;<a href='?fyaction=sh&id=<% =fyxxid%>&Page=<% =intpage%>&Keyword=<% =strKeyword%>&typejj=<% =typejj%>&strstate=<% =strstate%>&email=<%=rdsInfo("email")%>&lxr=<%=rdsInfo("ContactMan")%>' onClick="{if(confirm('确定审核此信息吗?')){return true;}return false;}" title=审核信息><font color="#FF0000">审</font></a><%end if%><%end if%><%if fla13=1 or Session("intUserLevel") > 2 then%><%if rdsInfo("tj")=1 then%>&nbsp;<a href='?fyaction=tj1&id=<% =fyxxid%>&Page=<% =intpage%>&Keyword=<% =strKeyword%>&typejj=<% =typejj%>&strstate=<% =strstate%>' title=取消推荐 onClick="{if(confirm('确定取消此信息推荐吗?')){return true;}return false;}"><font color="#008000">荐</font></a><%else%>&nbsp;<a href='?fyaction=tj&id=<% =fyxxid%>&Page=<% =intpage%>&Keyword=<% =strKeyword%>&typejj=<% =typejj%>&strstate=<% =strstate%>' onClick="{if(confirm('确定推荐此信息吗?')){return true;}return false;}" title=设为推荐信息><font color="#FF0000">荐</font></a><%end if%><%end if%><%if fla14=1 or Session("intUserLevel") > 2 then%><%if rdsInfo("infotop")=1 then%>&nbsp;<a href='?fyaction=zd1&id=<% =fyxxid%>&Page=<% =intpage%>&Keyword=<% =strKeyword%>&typejj=<% =typejj%>&strstate=<% =strstate%>' onClick="{if(confirm('确定取消置顶吗?')){return true;}return false;}" title=取消置顶><font color="#008000">顶</font></a><%else%>&nbsp;<a href='?fyaction=zd&id=<% =fyxxid%>&Page=<% =intpage%>&Keyword=<% =strKeyword%>&typejj=<% =typejj%>&strstate=<% =strstate%>' onClick="{if(confirm('确定设为置顶信息吗?')){return true;}return false;}" title=设为置顶信息><font color="#FF0000">顶</font></a><%end if%><%end if%><%if fla15=1 or Session("intUserLevel") > 2 then%>&nbsp;<a href="?bbaction=editinfo&id=<% =fyxxid%>" title=修改信息><font color="#0000FF">修</font></a><%end if%><%if fla17=1 or Session("intUserLevel") > 2 then%>&nbsp;<a href='?fyaction=del&id=<% =fyxxid%>&Page=<% =intpage%>&Keyword=<% =strKeyword%>&typejj=<% =typejj%>&strstate=<% =strstate%>' onClick="{if(confirm('确定删除此信息吗?')){return true;}return false;}" title=删除信息><font color="#0000FF">删</font></a><%end if%></td>
			  </tr>
<%
		rdsInfo.MoveNext
	loop
else
	Response.Write "<tr><td width=""100%"" height=""25"" colspan=""7"" class=""banma1"">&nbsp;<font color=""#FF0000"">没有供求信息...</font></td></tr>"
end if
rdsInfo.Close
set rdsInfo = nothing

if intPage - 1 mod 10 = 0 then
	p = (intPage - 1) \ 10
else
	p = (intPage - 1) \ 10
end if	
%><tr>
			    <td height="12" align="center" class="tdbg" colspan="7"><table width="550" border="0" cellpadding="0" cellspacing="0">
          <tr> 
            <td width="250" height="30"><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
              选中本页显示的所有记录</td>
            <td><%if strstate=0 and (fla16=1 or Session("intUserLevel") > 2) then%><input name="submit" type='submit' value='审核选定的信息'><%end if%>
            <%if fla17=1 or Session("intUserLevel") > 2 then%><input name="submit" type='submit' value='删除选定的信息'><%end if%>
</td>
          </tr>
        </table></td>
			  </tr></form></table>		
	      </td>
		</tr>
	  </table>
	  <table border="0" width="96%" cellspacing="0" cellpadding="0" align="center">
	    <form method="post" action="?" name="Form2">
	    <input type="hidden" name="Keyword" value="<% = strKeyword%>">
	    	    <input type="hidden" name="typejj" value="<% = typejj%>">
	    	    <input type="hidden" name="strstate" value="<% =strstate%>">
	    	    <input type="hidden" name="bbaction" value="<% =bbaction%>">
	    <tr>
		  <td width="30%" height="30" valign="middle">页次：<b><%= intPage %></b>/<b><%= n %></b>页 每页<b><%= intInfoCot %></b>条 共<b><%= intTotalRec %></b>条</td>
		  <td width="70%" height="30" valign="middle"><div align="right">分页：
			<%
				if intPage = 1 then
					Response.Write "<font face=webdings>9</font>   "
				else
					Response.Write "<a href='?Page=1&Keyword="& strKeyword &"&typejj="& typejj &"&strstate="&strstate&"&bbaction="&bbaction&"' title=首页><font face=webdings>9</font></a>   "
				end if
				if p * 10 > 0 then Response.Write "<a href='?Page="&Cstr(p*10)&"&Keyword="& strKeyword &"&typejj="& typejj &"&strstate="&strstate&"&bbaction="&bbaction&"' title=上十页><font face=webdings>7</font></a>   "
				Response.Write "<b>"
				for ii = p * 10 + 1 to P * 10 + 10
					   if ii = intPage then
				          Response.Write "<font color=""#FF0000"">"+Cstr(ii)+"</font> "
					   else
					      Response.Write "<a href='?Page="&Cstr(ii)&"&Keyword="& strKeyword &"&typejj="& typejj &"&strstate="&strstate&"&bbaction="&bbaction&"'>"+Cstr(ii)+"</a>   "
					   end if
					if ii = n then exit for
				next
				Response.Write "</b>"
				if ii < n then Response.Write "<a href='?Page="&Cstr(ii)&"&Keyword="& strKeyword &"&typejj="& typejj &"&strstate="&strstate&"&bbaction="&bbaction&"' title=下十页><font face=webdings>8</font></a>   "
				if intPage=n then
					Response.Write "<font face=webdings>:</font>   "
				else
					Response.Write "<a href='?Page="&Cstr(n)&"&Keyword="& strKeyword &"&typejj="& typejj &"&strstate="&strstate&"&bbaction="&bbaction&"' title=尾页><font face=webdings>:</font></a>   "
				end if
			%>
			转到：<input type="text" name="Page" size="2" maxlength="10" value="<%= intPage %>" class="face"> <input type="submit" value="Go" name="submit" class="button">
			</div></td>
		</tr>
		</form>
	  </table>
	  <br>&nbsp;&nbsp; 注：操作项文字颜色为<b><font color="#FF0000">红</font></b>色，表示否定，为<b><font color="#008000">绿</font></b>色表示肯定。
<%End Select
sub viewinfo
if fla12<>1 and Session("intUserLevel")<2 then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>错误：操作权限出错，您没有权限操作些功能！</li>"
Call Admin_ShowErr(ErrMsg)
end if
intInfoKey =RtnReplaceInt(Request.QueryString("Id"),0)
intInfoKey =RtnReplaceInt(Request.QueryString("Id"),0)
set rdsInfo = Server.CreateObject("ADODB.Recordset")
sqlInfo = "Select * From Dat_Information Where InfoKey = "& intInfoKey
rdsInfo.Open sqlInfo,Conn,1,1
if not rdsInfo.EOF then
%>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><br>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" height="73">
  <tr class="title"> 
    <td height="22" colspan="2" align="center"><strong>来自 <font color="#FF0000"><% = rdsInfo("ContactMan")%></font> 的信息资料</strong></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">主题：</td>
    <td height="23" width="87%"><% = rdsInfo("Topic")%></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">信息状态：<strong>：</strong></td>
    <td height="23" width="87%"><%
        if rdsInfo("State") = 0 then
			Response.Write "&nbsp;<font color=""#FF0000"">关闭</font>"
	    else
			Response.Write "&nbsp;<font color=""#FF0000"">开启</font>"
	    end if	
        %></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">供求类别：</td>
    <td height="23" width="87%"><%call gqlx(2,rdsInfo("InfoClass"))%></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">价格：</td>
    <td height="23" width="87%"><% = rdsInfo("jg")%></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">内容：</td>
    <td height="23" width="87%"><table border="0" width="96%" cellspacing="0" cellpadding="0">
              <tr>
                <td width="100%" height="50" style="line-height:150%"><% =replace(rdsInfo("Content"),"{%gqwebdir%}",gqwebdir)%></td>
              </tr>
            </table></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">联系人：</td>
    <td height="23" width="87%"><% = rdsInfo("ContactMan")%></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">企业名称：</td>
    <td height="23" width="87%"><% = rdsInfo("CompanyName")%></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">地址：</td>
    <td height="23" width="87%"><% = rdsInfo("Add")%></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">邮编：</td>
    <td height="23" width="87%"><% = rdsInfo("Postalcode")%></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">电话：</td>
    <td height="23" width="87%"><% = rdsInfo("Tel")%></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">传真：</td>
    <td height="23" width="87%"><% = rdsInfo("Fax")%></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">Homepage：</td>
    <td height="23" width="87%"><% = rdsInfo("Homepage")%></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">E-Mail：</td>
    <td height="23" width="87%"><% = rdsInfo("Email")%></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="24">面向地区：</td>
    <td height="24" width="87%"><% = rdsInfo("InfoAdd")%></td>
  </tr>
    <tr class="tdbg"> 
    <td width="12%" height="24">有效期：</td>
    <td height="24" width="87%"><%
        if rdsInfo("InfoDate") = "1" then
			Response.Write "&nbsp;一天"
		elseif rdsInfo("InfoDate") = "3" then
			Response.Write "&nbsp;三天"
		elseif rdsInfo("InfoDate") = "7" then
			Response.Write "&nbsp;一星期"
		elseif rdsInfo("InfoDate") = "15" then
			Response.Write "&nbsp;半个月"
		elseif rdsInfo("InfoDate") = "30" then
			Response.Write "&nbsp;一个月"
		elseif rdsInfo("InfoDate") = "60" then
			Response.Write "&nbsp;两个月"
		elseif rdsInfo("InfoDate") = "90" then
			Response.Write "&nbsp;一个季度"
        elseif rdsInfo("InfoDate") = "182" then
			Response.Write "&nbsp;半年"
		else
			Response.Write "&nbsp;一年"
		end if
        %>
</td>
  </tr>
    <tr class="tdbg"> 
    <td width="12%" height="24">IP 地址：</td>
    <td height="24" width="87%"><% = rdsInfo("ip")%></td>
  </tr>
      <tr class="tdbg"> 
    <td width="12%" height="24">发布时间：</td>
    <td height="24" width="87%"><% = rdsInfo("CreateTime")%></td>
  </tr>    <tr class="tdbg"> 
    <td width="99%" height="24" colspan="2" align=center><input onClick="parent.location.href='Javascript:history.back()'" type="button" value="返 回" name=button1></td>
  </tr>
</table>
<%
end if
rdsInfo.Close
set rdsInfo = nothing
end sub
sub editinfo
if fla15<>1 and Session("intUserLevel")<2 then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>错误：操作权限出错，您没有权限操作些功能！</li>"
Call Admin_ShowErr(ErrMsg)
end if
%>
<%
set rss=server.createobject("adodb.recordset")
sqls = "select * from SmallClass order by sj desc"
rss.open sqls,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
        <%
        count = 0
        do while not rss.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rss("id"))%>","<%=trim(rss("dl"))%>","<%= trim(rss("smallclassname"))%>");
        <%
        count = count + 1
        rss.movenext
        loop
        rss.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.editinfo.SmallClassName.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.editinfo.SmallClassName.options[document.editinfo.SmallClassName.length] = new Option(subcat[i][2], subcat[i][0]);
            }        
        }
    }    

</script>
<script language="javascript">
//检查email的合法性
function checkemail(inputstr){
	if(inputstr.indexOf('@') != -1 && inputstr.indexOf('.')!= -1)
		return true;
	else 
   		return false;	
}
//检验表单的合法性
function addinfock(){
	if (document.editinfo.sheng.value == "0") {
		alert("\请选择信息面向的地区！");
		document.editinfo.sheng.focus();
		return false;
	}
    else if (document.editinfo.Topic.value == "") {
		alert("\请填写信息主题！");
		document.editinfo.Topic.focus();
		return false;
	}
    else if (document.editinfo.Topic.value.length < 2) {
		alert("\信息主题不能少于2个字符！");
		document.editinfo.Topic.focus();
		return false;
	}
	else if (document.editinfo.ContactMan.value == "") {
		alert("\请填写联系人！");
		document.editinfo.ContactMan.focus();
		return false;
	}
	else if (document.editinfo.Tel.value == "") {
		alert("\请填写联系电话！");
		document.editinfo.Tel.focus();
		return false;
	}
		else if (document.editinfo.Email.value == "") {
		alert("\请填写联系 E-Mail！");
		document.editinfo.Email.focus();
		return false;
	}
	else if (document.editinfo.Email.value == "" || !checkemail(document.editinfo.Email.value)) {
		alert("\E-Mail 填写错误，请填写有效的信箱，如 username@163.com ！");
		document.editinfo.Email.focus();
		return false;
	}
	else if (document.editinfo.InfoDate.value == "0") {
		alert("\请选择信息有效期！");
		document.editinfo.InfoDate.focus();
		return false;
	}
  for(var i=0;i<document.editinfo.TempUploadFiles.length;i++){
      if (document.editinfo.UploadFiles.value=="") document.editinfo.UploadFiles.value=document.editinfo.TempUploadFiles.options[i].value;
      else document.editinfo.UploadFiles.value+="|"+document.editinfo.TempUploadFiles.options[i].value;
  }
}
</script><%
			Dim inff
			Dim rsd
			Dim sql

			inff=changechr(Request("Id"))
			
			set rsd = Server.CreateObject("ADODB.Recordset")
						sql = "Select * From Dat_Information Where infoKey = "&inff
						rsd.Open sql,Conn,1,1
%>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><br>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" height="73">
<form action="?bbaction=saveeditinfo" name="editinfo" method="POST" OnSubmit="return editinfoForm()">
  <tr class="title">
  <input type="hidden" name="id" value="<%=inff%>">
    <td height="22" colspan="2" align="center"><strong>修改供求信息</strong></td>
  </tr>
  <tr class="tdbg">
    <td width="12%" height="23">选择分类：</td>
    <td height="23" width="87%"><%
		set rsb=server.createobject("adodb.recordset")
        sqlb = "select * from BigClass order by sj desc"
        rsb.open sqlb,conn,1,1
		if rsb.eof and rsb.bof then
			response.write "请先添加栏目。"
		else
		%><select name="BigClassName" onChange="changelocation(document.editinfo.BigClassName.options[document.editinfo.BigClassName.selectedIndex].value)" size="1">
      <%
		    do while not rsb.eof
		    dim selclass
		    selclass=cstr(rsb("id"))
			%>
                      <option <%if rsd("dl") =selclass then Response.Write "selected" end if%> value="<%=trim(rsb("id"))%>"><%=trim(rsb("BigClassName"))%></option>
                      <%
		        rsb.movenext
    	    loop
		end if
        rsb.close
			%>
                    </select> <select name="SmallClassName">
                      <option value="" selected>不指定小类</option>
                      <%
           set rsss=server.createobject("adodb.recordset")
			sqlss="select * from SmallClass where dl='"&rsd("dl")&"' order by sj desc"
			rsss.open sqlss,conn,1,1
			if not(rsss.eof and rsss.bof) then
				do while not rsss.eof
				xlid=rsss("id")
				%>
                      <option <%if rsd("xl") =cstr(xlid) then Response.Write "selected" end if%> value="<%=rsss("id")%>"><%=rsss("SmallClassName")%></option>
                      <%
			    	rsss.movenext
				loop
			end if
	        rsss.close
			%>
</td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">面向地区：</td>
    <td height="23" width="87%"><%
set rs=server.createobject("adodb.recordset")
sql = "select * from fysmallmxdq order by sj desc"
rs.open sql,conn,1,1
%><SCRIPT language = "JavaScript">
var onenumdq;
onenumdq=0;
subcat1dq = new Array();
        <%
        numdq = 0
        do while not rs.eof 
        %>
subcat1dq[<%=numdq%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("dl"))%>","<%= trim(rs("SmallClassName"))%>");
        <%
        numdq = numdq + 1
        rs.movenext
        loop
        rs.close
        %>
onenumdq=<%=numdq%>;

function changelocation1dq(shengid)
    {
    document.editinfo.shi.length = 0; 

    var shengid=shengid;
    var n;
    for (n=0;n < onenumdq; n++)
        {
            if (subcat1dq[n][1] == shengid)
            { 
                document.editinfo.shi.options[document.editinfo.shi.length] = new Option(subcat1dq[n][0], subcat1dq[n][2]);
            }        
        }
        
    }    
                      </SCRIPT><%
dim num
sql = "select * from mxdq order by sj desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else
%>
<SELECT name="sheng" onChange="changelocation1dq(document.editinfo.sheng.options[document.editinfo.sheng.selectedIndex].value)" size="1">
                                <OPTION selected value="0">==省份==</OPTION>
                                <%do while not rs.eof
%>
                                <OPTION value="<%=trim(rs("Name"))%>" <%if rsd("InfoAdd") =""&rs("Name")&"" then Response.Write "selected" end if%>><%=trim(rs("Name"))%></OPTION>
                                <%
        rs.movenext
        loop
	    end if
        rs.close
%>
                              </SELECT>
                              <SELECT name="shi">
                                <OPTION selected value="0">==市地==</OPTION>
                                <%
           set rsss=server.createobject("adodb.recordset")
			sqlss="select * from fysmallmxdq where dl='"&rsd("InfoAdd")&"' order by sj desc"
			rsss.open sqlss,conn,1,1
			if not(rsss.eof and rsss.bof) then
				do while not rsss.eof
				%>
                      <option <%if rsd("smalldq") =""&rsss("SmallClassName")&"" then Response.Write "selected" end if%> value="<%=rsss("smallclassname")%>"><%=rsss("SmallClassName")%></option>
                      <%
			    	rsss.movenext
				loop
			end if
	        rsss.close
			%>
                              </SELECT></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">选择供求类别：</td>
    <td height="23" width="87%"><select size="1" name="InfoClass">
<%call gqlx(1,rsd("InfoClass"))%>
						</select></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">主&nbsp;&nbsp;&nbsp; 题：</td>
    <td height="23" width="87%"><input type="text" name="Topic" size="50" maxlength="200" value="<% = rsd("Topic")%>">
    <%
    strcolor=rsd("color")
    %>
    <select name="infocolor" class="face">
                                  <option style="COLOR: black" value=<%=strcolor%>>标题颜色</option>
                                  <option style="background: #000088" value="000088" <%if strcolor="000088" then Response.Write "selected"%>> </option>
                                  <option style="background: #0000ff" value="0000ff" <%if strcolor="0000ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #008800" value="008800" <%if strcolor="008800" then Response.Write "selected"%>> </option>
                                  <option style="background: #008888" value="008888" <%if strcolor="008888" then Response.Write "selected"%>> </option>
                                  <option style="background: #0088ff" value="0088ff" <%if strcolor="0088ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #00a010" value="00a010" <%if strcolor="00a010" then Response.Write "selected"%>> </option>
                                  <option style="background: #1100ff" value="1100ff" <%if strcolor="1100ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #111111" value="111111" <%if strcolor="111111" then Response.Write "selected"%>> </option>
                                  <option style="background: #333333" value="333333" <%if strcolor="333333" then Response.Write "selected"%>> </option>
                                  <option style="background: #50b000" value="50b000" <%if strcolor="50b000" then Response.Write "selected"%>> </option>
                                  <option style="background: #880000" value="880000" <%if strcolor="880000" then Response.Write "selected"%>> </option>
                                  <option style="background: #8800ff" value="8800ff" <%if strcolor="8800ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #888800" value="888800" <%if strcolor="888800" then Response.Write "selected"%>> </option>
                                  <option style="background: #888888" value="888888" <%if strcolor="888888" then Response.Write "selected"%>> </option>
                                  <option style="background: #8888ff" value="8888ff" <%if strcolor="8888ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #aa00cc" value="aa00cc" <%if strcolor="aa00cc" then Response.Write "selected"%>> </option>
                                  <option style="background: #aaaa00" value="aaaa00" <%if strcolor="aaaa00" then Response.Write "selected"%>> </option>
                                  <option style="background: #ccaa00" value="ccaa00" <%if strcolor="ccaa00" then Response.Write "selected"%>> </option>
                                  <option style="background: #ff0000" value="ff0000" <%if strcolor="ff0000" then Response.Write "selected"%>> </option>
                                  <option style="background: #ff0088" value="ff0088" <%if strcolor="ff0088" then Response.Write "selected"%>> </option>
                                  <option style="background: #ff00ff" value="ff00ff" <%if strcolor="ff00ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #ff8800" value="ff8800" <%if strcolor="ff8800" then Response.Write "selected"%>> </option>
                                  <option style="background: #ff0005" value="ff0005" <%if strcolor="ff0005" then Response.Write "selected"%>> </option>
                                  <option style="background: #ff88ff" value="ff88ff" <%if strcolor="ff88ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #ee0005" value="ee0005" <%if strcolor="ee0005" then Response.Write "selected"%>> </option>
                                  <option style="background: #ee01ff" value="ee01ff" <%if strcolor="ee01ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #3388aa" value="3388aa" <%if strcolor="3388aa" then Response.Write "selected"%>> </option>
                                  <option style="background: #000000" value="000000" <%if strcolor="000000" then Response.Write "selected"%>> </option>
                                </select></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">价格：</td>
    <td height="23" width="87%"><input type="text" name="jg" size="15" value="<% = rsd("jg")%>" onKeyUp="this.value=this.value.replace(/\D/gi,'')">元</td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">内容：</td>
    <td height="23" width="87%">
<input name="content" type="hidden" value="<%=server.htmlencode(rsd("content"))%>">
<iframe id="eWebEditor1" src="editor/ewebeditor.htm?id=content&style=coolblue" frameborder="0" scrolling="no" width="500" HEIGHT="350"></iframe>
</td>
  </tr>
<!--tr>
                      <td height="25" bgcolor="#DEF0FA">首页图片：</td> 
                      <td height="25" bgcolor="#DEF0FA">
						<input class="face" type="text" name="pic" size="42" value="<% = rsd("pic")%>" readonly><br>
						<iframe style="top:2px" ID="UpFile" src="../common/Upload.asp?MID=1&Type=0&Obj=pic&TObj=TempUploadFiles" frameborder=0 scrolling=no width="490" height="25"></iframe><br>
						用于在首页图片及信息浏览处显示</td>
                    </tr>
					<tr>
                      <td height="25" align="center" colspan="2" bgcolor="#DEF0FA">
						<table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" width="25">已<br>
						上<br>
						传<br>
						图<br>
						片</td>
								<td align="center">
								<select name="TempUploadFiles" style="width:324;height:121" size="2" onclick="doPreviewa('TempUploadFiles','<%=gqwebdir%>','<%=upload0%>')"><%
				dim sUploadFiles
				sUploadFiles = Trim(rsd("UploadFiles"))
				if Instr(sUploadFiles,"|") >0 then
					sUploadFiles = Split(sUploadFiles,"|")
					for i=0 to Ubound(sUploadFiles)
				%>
					<option value="<%=sUploadFiles(i)%>"><%=sUploadFiles(i)%></option>
				<%
					Next
				elseif sUploadFiles<>"" then
				%>
				<option value="<%=sUploadFiles%>"><%=sUploadFiles%></option>
				<%end if%></select><br>
				<input type="button" name="SetDefaultPic" value="设为首页图片" onClick="SetPicUrl('TempUploadFiles','pic');">
				<input type="button" name="InsEditor" value="插入编辑器" onClick="InsertEditor('TempUploadFiles','<%=gqwebdir%>','<%=upload0%>');">
				<input type="hidden" name="UploadFiles" value=""></td>
								<td align="center" valign="top"><fieldset style="height:100%">
				<legend>预览</legend>
				<table border=0 cellpadding=0 cellspacing=1 width="180" height="100" valign=top>
				<tr><td align=center valign=middle id=tdPreview height="100%">

				</td></tr>
				</table>
				</fieldset>
</td>
							</tr>
						</table>
						</td>                             
                    </tr-->
  <%if rsd("ContactMan")<>"" then%>
  <tr class="tdbg"> 
    <td width="12%" height="23">联系人：</td>
    <td height="23" width="87%"><input name="ContactMan" type="text" size="20" maxlength="20" value="<% = rsd("ContactMan")%>"></td>
  </tr><%else%>
  <tr class="tdbg"> 
    <td width="12%" height="23">企业名称：</td>
    <td height="23" width="87%"><input name="CompanyName" type="text" size="40" maxlength="200" value="<% = rsd("CompanyName")%>"></td>
  </tr><%end if%>
  <tr class="tdbg"> 
    <td width="12%" height="23">联系地址：</td>
    <td height="23" width="87%"><input type="text" name="Add" size="40" maxlength="200" value="<% = rsd("Add")%>"></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">邮编：</td>
    <td height="23" width="87%"><input type="text" name="Postalcode" size="20" maxlength="6" value="<% = rsd("Postalcode")%>" onKeyUp="this.value=this.value.replace(/\D/gi,'')"></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">腾讯QQ：</td>
    <td height="23" width="87%"><input type="text" name="qq" size="20" value="<% = rsd("qq")%>" onKeyUp="this.value=this.value.replace(/\D/gi,'')"></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">电话：</td>
    <td height="23" width="87%"><input type="text" name="Tel" size="20" maxlength="20" value="<% = rsd("Tel")%>" onKeyUp="this.value=this.value.replace(/\D/gi,'')"></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">传真：</td>
    <td height="23" width="87%"><input type="text" name="Fax" size="20" maxlength="20" value="<% = rsd("Fax")%>" onKeyUp="this.value=this.value.replace(/\D/gi,'')"></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">Homepage：</td>
    <td height="23" width="87%"><input type="text" name="Homepage" size="20" maxlength="50" value="<% = rsd("Homepage")%>"></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">E-Mail：</td>
    <td height="23" width="87%"><input type="text" name="Email" size="20" maxlength="50" value="<% = rsd("Email")%>"></td>
  </tr>
    <tr class="tdbg"> 
    <td width="12%" height="24">有效期：</td>
    <td height="24" width="87%"><input type="text" name="InfoDate" size="20" maxlength="50" value="<% = rsd("InfoDate")%>">天</td>
  </tr>
    <tr class="tdbg"> 
    <td width="12%" height="24">是否推荐：</td>
    <td height="24" width="87%"><%if rsd("tj")=true then%>是<%else%>否<%end if%></td>
  </tr>
    <tr class="tdbg"> 
    <td width="12%" height="24">IP 地址：</td>
    <td height="24" width="87%"><% =rsd("ip")%></td>
  </tr>
      <tr class="tdbg"> 
    <td width="12%" height="24">发布时间：</td>
    <td height="24" width="87%"><% =rsd("CreateTime")%></td>
  </tr>    <tr class="tdbg"> 
    <td width="99%" height="24" colspan="2" align=center><p align="center"><input type="submit" value="提交修改" name="Submit" class="button">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重新填写" name="Reset" class="Button"></td>
  </tr></form>
</table>
<%rsd.Close
set rsd = nothing
end sub
sub addinfo
set rss=server.createobject("adodb.recordset")
sqls = "select * from SmallClass order by sj desc"
rss.open sqls,conn,1,1
%>
<script language = "JavaScript">
var onecount;
subcat = new Array();
        <%
        count = 0
        do while not rss.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rss("id"))%>","<%=trim(rss("dl"))%>","<%= trim(rss("smallclassname"))%>");
        <%
        count = count + 1
        rss.movenext
        loop
        rss.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.editinfo.SmallClassName.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.editinfo.SmallClassName.options[document.editinfo.SmallClassName.length] = new Option(subcat[i][2], subcat[i][0]);
            }        
        }
    }    

</script>
<script language="javascript">
//检查email的合法性
function checkemail(inputstr){
	if(inputstr.indexOf('@') != -1 && inputstr.indexOf('.')!= -1)
		return true;
	else 
   		return false;	
}
//检验表单的合法性
function addinfock1(){
	if (document.editinfo.sheng.value == "0") {
		alert("\请选择信息面向的地区！");
		document.editinfo.sheng.focus();
		return false;
	}
    else if (document.editinfo.Topic.value == "") {
		alert("\请填写信息主题！");
		document.editinfo.Topic.focus();
		return false;
	}
    else if (document.editinfo.Topic.value.length < 2) {
		alert("\信息主题不能少于2个字符！");
		document.editinfo.Topic.focus();
		return false;
	}
	else if (document.editinfo.ContactMan.value == "") {
		alert("\请填写联系人！");
		document.editinfo.ContactMan.focus();
		return false;
	}
	else if (document.editinfo.Tel.value == "") {
		alert("\请填写联系电话！");
		document.editinfo.Tel.focus();
		return false;
	}
		else if (document.editinfo.Email.value == "") {
		alert("\请填写联系 E-Mail！");
		document.editinfo.Email.focus();
		return false;
	}
	else if (document.editinfo.Email.value == "" || !checkemail(document.editinfo.Email.value)) {
		alert("\E-Mail 填写错误，请填写有效的信箱，如 username@163.com ！");
		document.editinfo.Email.focus();
		return false;
	}
	else if (document.editinfo.InfoDate.value == "0") {
		alert("\请选择信息有效期！");
		document.editinfo.InfoDate.focus();
		return false;
	}

  for(var i=0;i<document.editinfo.TempUploadFiles.length;i++){
      if (document.editinfo.UploadFiles.value=="") document.editinfo.UploadFiles.value=document.editinfo.TempUploadFiles.options[i].value;
      else document.editinfo.UploadFiles.value+="|"+document.editinfo.TempUploadFiles.options[i].value;
  }
}
</script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><br>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" height="73">
<form action="?bbaction=saveaddinfo" name="editinfo" method="POST" OnSubmit="return addinfock1()">
  <tr class="title">
    <td height="22" colspan="2" align="center"><strong>添加供求信息</strong></td>
  </tr>
  <tr class="tdbg">
    <td width="12%" height="23">选择分类：</td>
    <td height="23" width="87%"><%
		set rsb=server.createobject("adodb.recordset")
        sqlb = "select * from BigClass order by sj desc"
        rsb.open sqlb,conn,1,1
		if rsb.eof and rsb.bof then
			response.write "请先添加栏目。"
		else
		%><select class="face" name="BigClassName" onChange="changelocation(document.editinfo.BigClassName.options[document.editinfo.BigClassName.selectedIndex].value)" size="1">
                      <option selected value="<%=trim(rsb("id"))%>"><%=trim(rsb("BigClassName"))%></option>
                      <%
			dim selclass
		    selclass=cstr(rsb("id"))
        	rsb.movenext
		    do while not rsb.eof
			%>
                      <option value="<%=trim(rsb("id"))%>"><%=trim(rsb("BigClassName"))%></option>
                      <%
		        rsb.movenext
    	    loop
		end if
        rsb.close
			%>
                    </select> <select class="face" name="SmallClassName">
                      <option value="" selected>不指定小类</option>
                      <%
           set rsss=server.createobject("adodb.recordset")
			sqlss="select * from SmallClass where dl='"&selclass&"'"
			rsss.open sqlss,conn,1,1
			if not(rsss.eof and rsss.bof) then
			%>
                      <option value="<%=rsss("id")%>"><%=rsss("SmallClassName")%></option>
                      <% rsss.movenext
				do while not rsss.eof%>
                      <option value="<%=rsss("id")%>"><%=rsss("SmallClassName")%></option>
                      <%
			    	rsss.movenext
				loop
			end if
	        rsss.close
			%>
                      </td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">面向地区：</td>
    <td height="23" width="87%"><%
set rs=server.createobject("adodb.recordset")
sql = "select * from fysmallmxdq order by sj desc"
rs.open sql,conn,1,1
%><SCRIPT language = "JavaScript">
var onenumdq;
onenumdq=0;
subcat1dq = new Array();
        <%
        numdq = 0
        do while not rs.eof 
        %>
subcat1dq[<%=numdq%>] = new Array("<%= trim(rs("SmallClassName"))%>","<%= trim(rs("dl"))%>","<%= trim(rs("SmallClassName"))%>");
        <%
        numdq = numdq + 1
        rs.movenext
        loop
        rs.close
        %>
onenumdq=<%=numdq%>;

function changelocation1dq(shengid)
    {
    document.editinfo.shi.length = 0; 

    var shengid=shengid;
    var n;
    for (n=0;n < onenumdq; n++)
        {
            if (subcat1dq[n][1] == shengid)
            { 
                document.editinfo.shi.options[document.editinfo.shi.length] = new Option(subcat1dq[n][0], subcat1dq[n][2]);
            }        
        }
        
    }    
                      </SCRIPT><%
dim num
sql = "select * from mxdq order by sj desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else
%><SELECT name="sheng" onChange="changelocation1dq(document.editinfo.sheng.options[document.editinfo.sheng.selectedIndex].value)" size="1">
                                <OPTION selected value="0">==省份==</OPTION>
                                <%do while not rs.eof
%>
                                <OPTION value="<%=trim(rs("Name"))%>"><%=trim(rs("Name"))%></OPTION>
                                <%
        rs.movenext
        loop
	    end if
        rs.close
%>
                              </SELECT>
                              <SELECT name="shi">
                                <OPTION selected value="0">==市地==</OPTION>
                              </SELECT>
　</td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">选择供求类别：</td>
    <td height="23" width="87%"><select size="1" name="InfoClass">
<%call gqlx(1,0)%>
</select></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">主&nbsp;&nbsp;&nbsp; 题：</td>
    <td height="23" width="87%"><input type="text" name="Topic" size="50" maxlength="200" value="">
    <select name="infocolor" class="face">
                                  <option style="COLOR: black" value=<%=strcolor%>>标题颜色</option>
                                  <option style="background: #000088" value="000088" <%if strcolor="000088" then Response.Write "selected"%>> </option>
                                  <option style="background: #0000ff" value="0000ff" <%if strcolor="0000ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #008800" value="008800" <%if strcolor="008800" then Response.Write "selected"%>> </option>
                                  <option style="background: #008888" value="008888" <%if strcolor="008888" then Response.Write "selected"%>> </option>
                                  <option style="background: #0088ff" value="0088ff" <%if strcolor="0088ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #00a010" value="00a010" <%if strcolor="00a010" then Response.Write "selected"%>> </option>
                                  <option style="background: #1100ff" value="1100ff" <%if strcolor="1100ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #111111" value="111111" <%if strcolor="111111" then Response.Write "selected"%>> </option>
                                  <option style="background: #333333" value="333333" <%if strcolor="333333" then Response.Write "selected"%>> </option>
                                  <option style="background: #50b000" value="50b000" <%if strcolor="50b000" then Response.Write "selected"%>> </option>
                                  <option style="background: #880000" value="880000" <%if strcolor="880000" then Response.Write "selected"%>> </option>
                                  <option style="background: #8800ff" value="8800ff" <%if strcolor="8800ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #888800" value="888800" <%if strcolor="888800" then Response.Write "selected"%>> </option>
                                  <option style="background: #888888" value="888888" <%if strcolor="888888" then Response.Write "selected"%>> </option>
                                  <option style="background: #8888ff" value="8888ff" <%if strcolor="8888ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #aa00cc" value="aa00cc" <%if strcolor="aa00cc" then Response.Write "selected"%>> </option>
                                  <option style="background: #aaaa00" value="aaaa00" <%if strcolor="aaaa00" then Response.Write "selected"%>> </option>
                                  <option style="background: #ccaa00" value="ccaa00" <%if strcolor="ccaa00" then Response.Write "selected"%>> </option>
                                  <option style="background: #ff0000" value="ff0000" <%if strcolor="ff0000" then Response.Write "selected"%>> </option>
                                  <option style="background: #ff0088" value="ff0088" <%if strcolor="ff0088" then Response.Write "selected"%>> </option>
                                  <option style="background: #ff00ff" value="ff00ff" <%if strcolor="ff00ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #ff8800" value="ff8800" <%if strcolor="ff8800" then Response.Write "selected"%>> </option>
                                  <option style="background: #ff0005" value="ff0005" <%if strcolor="ff0005" then Response.Write "selected"%>> </option>
                                  <option style="background: #ff88ff" value="ff88ff" <%if strcolor="ff88ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #ee0005" value="ee0005" <%if strcolor="ee0005" then Response.Write "selected"%>> </option>
                                  <option style="background: #ee01ff" value="ee01ff" <%if strcolor="ee01ff" then Response.Write "selected"%>> </option>
                                  <option style="background: #3388aa" value="3388aa" <%if strcolor="3388aa" then Response.Write "selected"%>> </option>
                                  <option style="background: #000000" value="000000" <%if strcolor="000000" then Response.Write "selected"%>> </option>
                                </select></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">价格：</td>
    <td height="23" width="87%"><input type="text" name="jg" size="15" value="" onKeyUp="this.value=this.value.replace(/\D/gi,'')">元</td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">内容：</td>
    <td height="23" width="87%">
<input name="content" type="hidden">
<iframe id="eWebEditor1" src="editor/ewebeditor.htm?id=content&style=coolblue" frameborder="0" scrolling="no" width="500" HEIGHT="350"></iframe>
</td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">联系人：</td>
    <td height="23" width="87%"><input name="ContactMan" type="text" size="20" maxlength="20" value=""></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">企业名称：</td>
    <td height="23" width="87%"><input name="CompanyName" type="text" size="40" maxlength="200" value=""></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">联系地址：</td>
    <td height="23" width="87%"><input type="text" name="Add" size="40" maxlength="200" value=""></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">邮编：</td>
    <td height="23" width="87%"><input type="text" name="Postalcode" size="20" maxlength="6" value="" onKeyUp="this.value=this.value.replace(/\D/gi,'')"></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">腾讯QQ：</td>
    <td height="23" width="87%"><input type="text" name="qq" size="20" value="" onKeyUp="this.value=this.value.replace(/\D/gi,'')"></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">电话：</td>
    <td height="23" width="87%"><input type="text" name="Tel" size="20" maxlength="20" value="" onKeyUp="this.value=this.value.replace(/\D/gi,'')"></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">传真：</td>
    <td height="23" width="87%"><input type="text" name="Fax" size="20" maxlength="20" value="" onKeyUp="this.value=this.value.replace(/\D/gi,'')"></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">Homepage：</td>
    <td height="23" width="87%"><input type="text" name="Homepage" size="20" maxlength="50" value=""></td>
  </tr>
  <tr class="tdbg"> 
    <td width="12%" height="23">E-Mail：</td>
    <td height="23" width="87%"><input type="text" name="Email" size="20" maxlength="50" value=""></td>
  </tr>
    <tr class="tdbg"> 
    <td width="12%" height="24">有效期：</td>
    <td height="24" width="87%">
                        <select class="face" size="1" name="InfoDate">
                          <option value="0">--选择信息有效期--</option>
                          <option value="1" selected>一天</option>
                          <option value="3">三天</option>
                          <option value="7">一星期</option>
                          <option value="15">半个月</option>
                          <option value="30">一个月</option>
                          <option value="60">两个月</option>
                          <option value="90">一个季度</option>
                          <option value="182">半年</option>
                          <option value="365">一年</option>
                        </select></td>
  </tr>
    <tr class="tdbg"> 
    <td width="12%" height="24">推荐：</td>
    <td height="24" width="87%"><input class="face" type="checkbox" name="tj" value="true"></td>
  </tr>
    <tr class="tdbg"> 
    <td width="12%" height="24">置顶：</td>
    <td height="24" width="87%">
	<input class="face" type="checkbox" name="infotop" value="true"></td>
  </tr>
    <tr class="tdbg"> 
    <td width="99%" height="24" colspan="2" align=center><p align="center"><input type="submit" value="提交" name="Submit" class="button">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重新填写" name="Reset" class="Button"></td>
  </tr></form>
</table>
<%
end sub
sub reup
id=RtnReplaceInt(Request("id"),0)
if is_sqldata=0 then
conn.execute("Update Dat_Information Set CreateTime=now() Where InfoKey = ("&id&")")
else
conn.execute("Update Dat_Information Set CreateTime=getdate() Where InfoKey = ("&id&")")
end if
Response.Redirect "info.asp"
end sub
%>