<!--#include file="../Include/Char.jsp" -->
<!--#include file="../Include/Conn.jsp" -->
<%
   if Request.Cookies("UserID") = ""  THEN
     Response.Redirect("Login.jsp")
	 Response.End()
   end if
   
m_CompanyID = CheckStr(Request.Cookies("companyid"))
m_PloyID =  CheckStr(Request("PloyID"))
if Request.ServerVariables("REQUEST_METHOD") = "POST" then 
	m_Title = CheckStr(Request.Form("txtTitle"))
	m_classid= CheckStr(Request.Form("classid"))
	m_Content =  CheckStr(Request.Form("txtContent"))
  	m_Startdate = CheckStr(Request.Form("txtStartdate"))
  	m_Enddate = CheckStr(Request.Form("txtEnddate"))
	
	if m_Title = "" then
	  call msgbox("对不起，活动名不能为空",1)
	  response.end()
	end if
  

    SQL="UPDATE CityCard_LeaguePloy SET F_Title = '"&m_Title&"' ,F_classid="&m_classid&",F_Startdate='"& m_Startdate &"',F_Enddate='"& m_Enddate &"',F_Content = '"&m_Content&"'  WHERE F_ID="&m_PloyID

    Conn.Execute SQL
  
    Response.write "<br><br><br><br><center><font size = 2 color=ff0000>修改成功!!<a href='#' onclick='window.close()'>关闭窗口</a></font></center>"
	response.end 

end if

 SET rs=server.createobject("adodb.recordset")
 SQL="SELECT * FROM  CityCard_LeaguePloy WHERE F_ID ="&m_PloyID
 Rs.Open SQL,conn,1,1 


%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>商家管理系统</title>
<link href="../Include/Style.css" rel="stylesheet" type="text/css">
<SCRIPT language=JavaScript src="../include/Popcalendar.js"></SCRIPT>
</head><body leftmargin="0" topmargin="0">
<table width="420" height="36" border="1" cellpadding="0" cellspacing="5" bordercolor="e2e2e2" bgcolor="f5f5f5">
  <tr> 
    <td height="25" background="images/about_bj.gif" class="p4">&nbsp;<b>·</b><strong>活动信息修改　</strong></td>
  </tr>
</table>
<table width="420" border="0" cellpadding="3" cellspacing="1" bordercolor="#000000" bgcolor="#FFFFFF">
  <form name="form1"  method="post" action='?PloyID=<%=m_PloyID%>'>
    <tr> 
      <td width="19%" align="right">活动名称：</td>
      <td><input name="txtTitle" type="text"  value="<%=rs("F_Title")%>" size="44"> 
      </td>
    </tr>
    <tr> 
      <td align="right">活动分类：</td>
      <td>	<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")%>" <% if cstr(rs("f_classid"))=cstr(rst("f_id")) then %> selected<% end if %>><%=rst("f_value")%></OPTION>
      <%
	   rst.MoveNext
	   Loop
	   rst.Close
	  %>
              </select>
      </td>
    </tr>
    <tr> 
      <td align="right">活动时间：</td>
      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td>自 
              <script language=JavaScript>
var FaultStr=""
arrowtag("txtStartdate","<%=rs("F_Startdate")%>" );
</script>
              至 
              <script language=JavaScript>
var FaultStr=""
arrowtag("txtEnddate","<%=rs("F_Enddate")%>");
</script></td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td align="right" valign="top">活动说明：</td>
      <td> <textarea name="txtContent" cols="44" rows="16" ><%=rs("F_Content")%></textarea></td>
    </tr>
    <tr> 
      <td align="right">&nbsp;</td>
      <td> <input type="submit" name="Submit" value="修　改"> <input type="reset" name="Submit2" value="重　新"></td>
    </tr>
  </form>
</table>
<%
 rs.close
 SET  rs = Nothing
%>
</body>
</html>
