<!--#include file="../Include/Conno.asp" -->
<!--#include file="IsLogin.asp" -->
<!--#include file="../include/Char.asp"-->
<!--#include file="../include/function.asp"-->
<%
muserid=Session("CurUserID")
 m_Sql = "SELECT * FROM T_Member WHERE F_ID=" & muserid
 Set rs = conn.Execute(m_Sql)
 if rs.Eof then
   Response.write "对不起，无此会员！"
   Response.end
 end if
F_RealName= rs("F_RealName")
F_Mobile=rs("F_Mobile")
F_Pas=rs("F_Pas")
F_qq=rs("F_qq")
F_Email=rs("F_Email")
F_UserName=rs("F_Email")
F_Address=rs("F_Address")

musername=Session("CurUserName")
if Request.ServerVariables("REQUEST_METHOD") = "POST" then 
	m_Title = CheckStr(Request.Form("title"))
	m_txtclass = CheckStr(Request.Form("txtclass"))
	F_RealName = CheckStr(Request.Form("F_RealName"))
	F_Mobile = CheckStr(Request.Form("F_Mobile"))
	F_Email = CheckStr(Request.Form("F_Email"))
	F_qq = CheckStr(Request.Form("F_qq"))
	F_Address = CheckStr(Request.Form("F_Address"))
	if m_txtclass = "" then
	  call msgbox("对不起，请选择信息分类！",1)
	  response.end()
	end if
	if m_Title = "" then
	  call msgbox("对不起，信息标题不能为空",1)
	  response.end()
	end if
	m_Content =  CheckStr(Request.Form("content"))
	 if m_Content = "" then
	  call msgbox("对不起，信息内容不能为空",1)
	  response.end()
	end if
	
	if CheckStr(Request.Form("zone"))<>"" then
	m_area = CheckStr(Request.Form("zone"))
	else
	m_area=17  '市区
	end if
	
	if CheckStr(Request.Form("gqyear"))<>"" then
  	m_update =cdate(CheckStr(Request.Form("gqyear"))&"-"&CheckStr(Request.Form("gqmonth"))&"-"&CheckStr(Request.Form("gqday")))
    else
	m_update=cdate(date()+10)
	end if
	musernames=request("F_username")
	if muserid="" then
	muserid=0
	end if
	gqonoff=request("gqonoff")
	if gqonoff="off" then
	gqonoff="off"
	else
	gqonoff="on"
	end if
	titlecolor=request("titlecolor")
	SQL="INSERT INTO info_ad(F_adclassID,F_title,F_Content,F_area,F_regtime,F_update,F_username,f_userid,gqonoff,F_RealName,F_Mobile,F_Email,F_qq,F_Address) VALUES("&m_txtclass&",'"&m_Title&"','"&m_Content&"','"&m_area&"','"&now&"','"&m_update&"','"&musernames&"',"&muserid&",'"&gqonoff&"','"&F_RealName&"','"&F_Mobile&"','"&F_Email&"','"&F_qq&"','"&F_Address&"')"
	Conn.Execute SQL
    Response.Write("<script language=javascript>alert('信息发布成功。点确定进入信息管理页面！');window.location.replace('msmdy.asp');</script>")
	Response.End()
end if
%>
<HTML><HEAD><TITLE>黄冈信息港会员俱乐部修改密码</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link href="../css/member.css" rel="stylesheet" type="text/css">
<SCRIPT language=JavaScript src="../js/fclick.js"></SCRIPT>
<script language="JavaScript" src="../js/CheckForm.js"></script>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</HEAD>
<BODY leftMargin=0 topMargin=0>
<!--#include file="../include/top.asp" -->
<!--#include file="../include/member_top.asp" --><!--#include file="club_top.asp" -->
<!--#include file="Top.asp" -->
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="183" height="400" align="center" valign="top"> 
      <!--#include file="left.asp" -->
    </td>
    <td width="597" align="center" valign="top"><table width="96%"  border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="60%" height="40" align="left" valign="bottom"><img src="../Images/member/fire.gif" width="13" height="13"><a href="msmdy.asp" class="style1">我己以布的信息</a></td>
          <td width="40%" align="right"><img src="../Images/member/hy_c_11.gif" width="230" height="80"></td>
        </tr>
        <tr> 
          <td height="1" colspan="2" bgcolor="#c7c7c7"></td>
        </tr>
      </table>
      <table width="100%"  border="0" cellspacing="2" cellpadding="2">
        <tr>
          <td><FORM id=post name=post action=msadd.asp method=post onsubmit="return CheckForm(this)">
                    <table width="583"  border="0" cellpadding="0" cellspacing="1" bgcolor="#F4F4F4">
                      <tr>
                        <td width="103" height="25" align="center" bgcolor="#F4F4F4">信息标题：</td>
                        <td width="477" bgcolor="#FFFFFF"><input name="title" type="text" id="title" check="^\S+$" warning="信息标题不能为空">                        <select size="1" name="titlecolor">
                          <option value="#000000" selected>默认颜色</option>
                          <option <%if titlecolor="000000" then response.write "selected"%> value="000000" style="background-color:#000000"></option>
                          <option <%if titlecolor="008000" then response.write "selected"%> value="008000" style="background-color:#008000"></option>
                          <option <%if titlecolor="800000" then response.write "selected"%> value="800000" style="background-color:#800000"></option>
                          <option <%if titlecolor="808000" then response.write "selected"%> value="808000" style="background-color:#808000"></option>
                          <option <%if titlecolor="000080" then response.write "selected"%> value="000080" style="background-color:#000080"></option>
                          <option <%if titlecolor="800080" then response.write "selected"%> value="800080" style="background-color:#800080"></option>
                          <option <%if titlecolor="808080" then response.write "selected"%> value="808080" style="background-color:#808080"></option>
                          <option <%if titlecolor="00FF00" then response.write "selected"%> value="00FF00" style="background-color:#00FF00"></option>
                          <option <%if titlecolor="FF00FF" then response.write "selected"%> value="FF00FF" style="background-color:#FF00FF"></option>
                          <option <%if titlecolor="FF0000" then response.write "selected"%> value="FF0000" style="background-color:#FF0000"></option>
                          <option <%if titlecolor="0000FF" then response.write "selected"%> value="0000FF" style="background-color:#0000FF"></option>
                          <option <%if titlecolor="008080" then response.write "selected"%> value="008080" style="background-color:#008080"></option>
                        </select></td>
                      </tr>
                      <tr>
                        <td width="103" height="25" align="center" bgcolor="#F4F4F4">信息类型：</td>
                        <td width="477" bgcolor="#FFFFFF">
                            <select name="txtclass" id="txtclass" check="^\S+$" warning="请选择信息类型">
                  <option value="">选择类型</option>
                  <% 
				classsql="select * from info_adClass"
	  'classsql="select f_id,f_value from mall_shopcategory order by f_index desc"
	  Set rsclass=Conn.Execute(classSql)
	  do while not rsclass.eof 
	  %>
                  <option value="<%=rsclass("f_id")%>"><%=rsclass("f_value")%></option>
                  <%
	  rsclass.movenext 
	  loop
	  rsclass.close
	  set rsclass=nothing
	  %>
                </select></td>
                      </tr>
                      <tr>
                        <td height="25" align="center" bgcolor="#F4F4F4">所在区域：</td>
                        <td bgcolor="#FFFFFF"><INPUT onclick=document.post.zone.disabled=true type=radio 
            CHECKED value=off name=areaonoff>
                关闭 | 
                <INPUT 
            onclick=document.post.zone.disabled=false type=radio value=on 
            name=areaonoff>
                开启 
                <SELECT disabled name=zone>
				 <%
             mSql="Select F_ID,F_Value From T_areaType where F_CityTypeID=15 order by f_grade"
			 Set rst = conn.Execute(mSql)
			 do while not rst.eof
          %>
          <option value="<%=rst("f_id")%>"><%=rst("f_value")%></option>
          <%
		  rst.movenext
		  loop
		  rst.close
		  set rst=nothing
		  %>                
                </SELECT>
                <FONT 
            style="FONT-SIZE: 12px" face=MingLiU 
            color=#ff0000>根据实际情况选择是否开启默认选项</FONT></td>
                      </tr>
                      <tr>
                        <td height="25" align="center" bgcolor="#F4F4F4">有效时间：</td>
                        <td bgcolor="#FFFFFF"><INPUT 
            onclick=document.post.gqyear.disabled=true;document.post.gqmonth.disabled=true;document.post.gqday.disabled=true 
            type=radio CHECKED value=off name=gqonoff>
                关闭 | 
                  <input 
            onClick=document.post.gqyear.disabled=false;document.post.gqmonth.disabled=false;document.post.gqday.disabled=false 
            type=radio value=on name=gqonoff>
                开启 
                <SELECT disabled name=gqyear>
				<%
				for n=cint(year(now())) to cint(year(now())+10)
				%>
                  <OPTION value="<%=n%>" <% if n=cint(year(now())) then %> selected<% end if %>><%=n%></OPTION>
				<%
				next
				%>            
                </SELECT>
                年 
                <SELECT disabled name=gqmonth>
				<% for n=1 to 12 %>
                  <OPTION value="<%=n%>" <% if n=cint(month(now()+10)) then%>selected<% end if %>><%=n%></OPTION>
				 <% next %>                
                </SELECT>
                月 
                <SELECT disabled name=gqday>
                 	<% for n=1 to 31 %>
                  <OPTION value="<%=n%>" <% if n=cint(day(now()+20)) then%>selected<% end if %>><%=n%></OPTION>
				 <% next %> 
                </SELECT>
                日 </td>
                      </tr>
                      <tr>
                        <td height="25" align="center" bgcolor="#F4F4F4">联系姓名：</td>
                        <td bgcolor="#FFFFFF"><input name="F_RealName" type="text" id="F_RealName" value="<%=F_RealName%>" check="^\S+$" warning="请输入联系姓名"> ←<a href="javascript:" onClick="document.post.F_RealName.value='<%=musername%>'">使用妮称</a></td>
                      </tr>
                      <tr>
                        <td height="25" align="center" bgcolor="#F4F4F4">联系电话：</td>
                        <td bgcolor="#FFFFFF"><input name="F_Mobile" type="text" id="F_Mobile" value="<%=F_Mobile%>" check="^\S+$" warning="请输入联系电话"> ←<a href="javascript:" onClick="document.post.F_Mobile.value='<%=F_Pas%>'">使用小灵通</a></td>
                      </tr>
                      <tr>
                        <td height="25" align="center" bgcolor="#F4F4F4">联系信箱：</td>
                        <td bgcolor="#FFFFFF"><input name="F_Email" type="text" id="F_Email" value="<%=F_Email%>"></td>
                      </tr>
                      <tr>
                        <td height="25" align="center" bgcolor="#F4F4F4">联系 Q Q:</td>
                        <td bgcolor="#FFFFFF"><input name="F_qq" type="text" id="F_qq" value="<%=F_qq%>"></td>
                      </tr>
                      <tr>
                        <td height="25" align="center" bgcolor="#F4F4F4">联系地址：</td>
                        <td bgcolor="#FFFFFF"><input name="F_Address" type="text" id="F_Address" value="<%=F_Address%>"></td>
                      </tr>
					  <tr>
					    <td height="25" align="center" bgcolor="#F4F4F4">信息说明：</td>
					    <td bgcolor="#FFFFFF"><textarea name="content" id="content"></textarea></td>
				      </tr>
					  <tr>
                        <td height="25" colspan="2" align="center" bgcolor="#F4F4F4">
					      </td>
                      </tr>

                      <tr align="center">
                        <td height="25" colspan="2">
                            <input type="submit" name="Submit2" value="发布此信息">
                            <input type="reset" name="Submit" value="重置"></td>
                      </tr>
                      <tr>
                        <td height="25" colspan="2">&nbsp;</td>
                      </tr>
                    </table>
                </form></td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="../include/bottom.asp" -->
</BODY></HTML>
