<!--#include file="../Include/Char.jsp" -->
<!--#include file="../Include/Conn.jsp" -->
<!--#include file="../Include/upload_5xsoft.inc" -->
<!--#include file="../Include/const.jsp" -->
<%
   if Request.Cookies("UserID") = ""  THEN
     Response.Redirect("Login.jsp")
	 Response.End()
   end if
   m_CompanyID = Request.Cookies("companyid")
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 =  CheckStr(Request.Form("txtContent"))
	 if m_Content = "" then
	  call msgbox("对不起，活动内容不能为空",1)
	  response.end()
	end if
    m_classid = CheckStr(Request.Form("classid"))
	m_Startdate = CheckStr(Request.Form("Startdate"))
  	m_Enddate = CheckStr(Request.Form("Enddate"))
    SQL="INSERT INTO CityCard_LeaguePloy(F_CompanyID,f_classid,F_Title,F_Content,F_Image,F_Addtime,F_Startdate,F_Enddate) VALUES('"&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.jsp"
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=site_info(0)%>--商家管理系统</title>
<link href="../Include/Style.css" rel="stylesheet" type="text/css">
<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')">

<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td width="170" height="500" valign="top" bgcolor="f5f5f5">
      <!--#include file="Left.jsp" -->
    </td>
    <td width="10" valign="top"></td>
    <td width="600" valign="top">
      <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.jsp">活动信息管理</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 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"> <textarea name="txtContent" cols="60" rows="16" ></textarea></td>
          </tr>
          <tr> 
            <td align="right" bgcolor="f2f2f2">图片上传：</td>
            <td colspan="4" bgcolor="f2f2f2"><iframe src="UploadImage.jsp" name="upfile" width="100%" height="22" align="default" frameborder="0" scrolling="no"></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>
  </tr>
</table>

</body>
</html>
