<!--#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 = 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_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 


%>
<!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="../Files/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" 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>
