<!--#include file="../Include/Char.asp" -->
<!--#include file="../Include/Conn.asp" -->
<!--#include file="../Include/upload_5xsoft.inc" -->
<%
if trim(Request.Cookies("UserID")) = "" or trim(Session("UserID"))=""  THEN
     Response.Redirect("Login.asp")
	 Response.End()
   end if
   m_CompanyID = Request.Cookies("companyid")
         SET rs=server.createobject("adodb.recordset")
      SQL="SELECT [name] FROM  CityCard_League WHERE CompanyID ="&m_CompanyID
      rs.Open SQL,conn,1,1 
       F_Companyname = rs("name")
   
if Request.ServerVariables("REQUEST_METHOD") = "POST" then 
    m_Image = CheckStr(Request.cookies("UploadImage"))
	m_Title = CheckStr(Request.Form("txtTitle"))
	if m_Title = "" then
	  call msgbox("对不起，活动名不能为空",1)
	  response.end()
	end if

	m_Content =  Request.Form("txtContent")
	 if m_Content = "" then
	  call msgbox("对不起，活动内容不能为空",1)
	  response.end()
	end if
    m_classid = CheckStr(Request.Form("classid"))
	m_Startdate = Request.Form("Startdate")
  	m_Enddate = Request.Form("Enddate")
    SQL="INSERT INTO CityCard_LeaguePloy(F_Companyname,F_CompanyID,f_classid,F_Title,F_Content,F_Image,F_Addtime,F_Startdate,F_Enddate) VALUES('"&F_Companyname&"','"&m_CompanyID&"',"&m_classid&",'"&m_Title&"','"&m_Content&"','"&m_Image&"','"&now&"','"&m_StartDate&"','"&m_EndDate&"')"
	Conn.Execute SQL  
    Response.Cookies("uploadImage") = "" 
	Response.redirect "Ploy_Manage.asp"
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>襄樊生活网-商家管理系统</title>
<link href="../css/Style.css" rel="stylesheet" type="text/css"><link href="../css/Menu.css" rel="stylesheet" type="text/css"><link href="../css/aCardList.css" rel="stylesheet" type="text/css"><SCRIPT src="../js/029bxw.js" type=text/javascript></SCRIPT>
<script language="JavaScript" type="text/JavaScript">
<!--



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<SCRIPT language=JavaScript src="../include/Popcalendar.js"></SCRIPT>
</head>

<body onLoad="MM_preloadImages('images/xf_link1b.gif','images/xf_link2b.gif','images/xf_link3b.gif','images/xf_link4b.gif','images/xf_link5b.gif','images/ly_b_2b.gif','images/ly_b_4b.gif','images/ly_b_1b.gif','images/ly_b_3b.gif','images/ly_b_5b.gif')">
<!--#include file="../Include/cardMenu.htm" -->
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td width="170" height="500" valign="top" bgcolor="f5f5f5">
      <!--#include file="Left.asp" -->    </td>
    <td width="10" valign="top"></td>
    <td width="600" valign="top">
      <!--#include file="Ad.asp" -->
      <table width="600" border="1" cellpadding="0" cellspacing="5" bordercolor="e2e2e2" bgcolor="f5f5f5">
        <tr> 
          <td height="25" background="images/about_bj.gif" class="p4">&nbsp;<b>·<a href="?">活动发布</a></b> 
            　　 <strong><a href="Ploy_Manage.asp">活动信息管理</a></strong></td>
        </tr>
      </table>
      <table width="600" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="5"></td>
        </tr>
        <tr> 
          <td height="1" background="images/line.gif" ></td>
        </tr>
      </table>
      <br>
      <table width="97%" border="0" align="center" cellpadding="3" cellspacing="1" bordercolor="#000000">
        <form name="form1"  method="post" action="?">
          <tr>
            <td align="right" bgcolor="f2f2f2">商家名称：</td>
            <td colspan="4" bgcolor="f2f2f2"><input name="F_Companyname" type="text" id="F_Companyname" value="<%=F_Companyname%>" size="60" disabled=true></td>
          </tr>
          <tr> 
            <td width="16%" align="right" bgcolor="f2f2f2">活动名称：</td>
            <td colspan="4" bgcolor="f2f2f2"><input name="txtTitle" type="text" size="60">            </td>
          </tr>
          <tr> 
            <td align="right" bgcolor="f2f2f2">活动分类：</td>
            <td colspan="4" bgcolor="f2f2f2">
			<select name="classid" id="classid">
                <%
	  m_SQL = "SELECT * FROM CityCard_LeaguePloyclass order by F_id"
	   Set rst = conn.Execute(m_SQL)
	  Do While Not rst.Eof
	  %>
       <OPTION value=<%=rst("f_id")%>><%=rst("f_value")%></OPTION>
      <%
	   rst.MoveNext
	   Loop
	   rst.Close
	  %>
              </select>		    </td>
          </tr>
          <tr> 
            <td align="right" bgcolor="f2f2f2">活动时间：</td>
            <td width="3%" bgcolor="f2f2f2">自 </td>
            <td width="12%" bgcolor="f2f2f2"><script language=JavaScript>
								var FaultStr=""
								arrowtag("Startdate"," " );
							 </script></td>
            <td width="3%" bgcolor="f2f2f2">至</td>
            <td width="66%" bgcolor="f2f2f2"><SCRIPT language=JavaScript>
								var FaultStr=""
								arrowtag("Enddate","");
							 </SCRIPT></td>
          </tr>
          <tr>
            <td align="right" valign="top" bgcolor="f2f2f2">活动说明：</td>
            <td colspan="4" bgcolor="f2f2f2">&nbsp;</td>
          </tr>
          <tr> 
            <td colspan="5" align="right" valign="top" bgcolor="f2f2f2"> <textarea name="txtContent" id="txtContent" cols="86" rows="16" style="display:none" ></textarea>              <IFRAME ID="eWebEditor1" SRC="../ditor/ewebeditor.asp?id=txtContent&style=s_mini1" FRAMEBORDER="0" SCROLLING="no" WIDTH="550" HEIGHT="300"></IFRAME></td>
          </tr>
          <tr> 
            <td align="right" bgcolor="f2f2f2">&nbsp;</td>
            <td colspan="4" bgcolor="f2f2f2"> <input type="submit" name="Submit" value="发　布"> 
              <input type="reset" name="Submit2" value="重　新"></td>
          </tr>
        </form>
      </table> </td>
    <td valign="top">
	<!--#include file="Inc_Ser.asp"-->
</td>
  </tr>
</table>
<!--#include file="../Include/CopyRight.htm" -->
</body>
</html>
