<!--#include file="../Include/Char.asp" -->
<!--#include file="../Include/Conn.asp" -->
<%
if trim(Request.Cookies("UserID")) = "" or trim(Session("UserID"))=""  THEN
     Response.Redirect("Login.asp")
	 Response.End()
   end if
   
m_CompanyID = clng(CheckStr(Request.Cookies("companyid")))
m_PloyID =  clng(CheckStr(Request("PloyID")))
if Request.ServerVariables("REQUEST_METHOD") = "POST" then 
	m_Title = CheckStr(Request.Form("txtTitle"))
	m_classid= CheckStr(Request.Form("classid"))
	m_Content =  Request.Form("txtContent")
  	m_Startdate = Request.Form("txtStartdate")
  	m_Enddate = 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 "<script language=""javascript"">opener.location.reload()</script>"
    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 


%>
<!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 src="../include/Popcalendar.js"></SCRIPT>
</head><body leftmargin="0" topmargin="0">
<table width="550" 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="550" border="0" cellpadding="3" cellspacing="1" bordercolor="#000000" bgcolor="#FFFFFF">
  <form name="form1"  method="post" action='?PloyID=<%=m_PloyID%>'>
    <tr> 
      <td width="14%" align="right">活动名称：</td>
      <td width="86%"><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>&nbsp;</td>
    </tr>
    <tr> 
      <td colspan="2" align="right" valign="top"><textarea name="txtContent" id="txtContent" cols="86" rows="16" style="display:none" ><%=rs("F_Content")%></textarea>        <IFRAME ID="eWebEditor1" SRC="../web_admin/eEditor/ewebeditor.asp?id=txtContent&style=s_mini1" FRAMEBORDER="0" SCROLLING="no" WIDTH="550" HEIGHT="200"></IFRAME></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>
