<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<%
	useflag=1
%>
<!--#include file="flag.asp"-->
<!--#include file="../inc/char.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/sql.asp"-->
<%
	end if
	action=ReplaceBadChar(Trim(Request("action")))
	id=int(ReplaceBadChar(Trim(Request("id"))))

	if action="edit_1" then
		title = ReplaceBadChar(Trim(Request.Form("title")))
		uname = ReplaceBadChar(Trim(Request.Form("Author")))
		notice = ReplaceBadChar(Trim(Request.Form("content")))
		F_point =ReplaceBadChar(Trim(Request.Form("square")))
		W_point = ReplaceBadChar(Trim(Request.Form("object")))
		codestr = ReplaceBadChar(Trim(Request.Form("codestr")))
		id = ReplaceBadChar(Trim(Request.Form("id")))

		set rs=server.createobject("adodb.recordset")
		sql="select * from pk where id="&id&""
		rs.open sql,conn,2,3
		if rs.eof and rs.bof then
			response.write "<script language=JavaScript>" &"alert('该思想对决题不存在，请查询后再试！');" & "history.back()" & "</script>"
			rs.close
			set rs=nothing
			set conn=nothing
			response.end()
		else
			rs("title") = title
			rs("uname") = uname
			rs("notice") = notice
			rs("F_point") = F_point
			rs("W_point") = W_point
			rs("ip") = Request.servervariables("remote_host")
			rs("stime") = now()
			rs("zhuangtai") = 0
			rs.update
			response.write"<SCRIPT language=JavaScript>alert('您的思想对决话题已经修改成功,话题待审核后将会显示出来,现在为您返回！');"
			response.write"this.location.href='pk_list.asp';</SCRIPT>"
			response.end
		end if
		rs.close
		set rs=nothing

	end if
	
	if action="edit" then
		set rs=server.createobject("adodb.recordset")
		sql="select * from pk where id = "&id&""
		rs.open sql,conn,2,3
		if rs.eof then
			response.write "<script language=JavaScript>" &"alert('该思想对决题不存在，请查询后再试！');" & "history.back()" & "</script>"
		else
			pk_title=rs("title")
			uname=rs("uname")
			notice=rs("notice")
			F_point=rs("F_point")
			W_point=rs("W_point")
		end if
		rs.close
		set rs=nothing
	end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href='Include/Admin_Style.CSS' rel='stylesheet' type='text/css'>
<SCRIPT language=javascript src="../pk/js/check_js.js"></SCRIPT>
</head>
<body>
<TABLE cellSpacing=0 cellPadding=0 width="99%" align=center border=0>
  <TBODY>
  <TR>
    <TD vAlign=top bgColor=#ffffff>
     <form name="myform" method="post" action="?" onSubmit="return Check();">
      <input name="action" type="hidden" id="action" value="edit_1" />
	  <input name="id" type="hidden" id="id" value="<%= Trim(Request.QueryString("id")) %>" />
      <table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#D2E9FB">
        <tr>
          <th height="25" scope="col"><span class="style15"><span class="style14"><span class="bsz">我要修改PK话题</span></span></span></th>
        </tr>
        <tr>
          <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="0">

            <tr>
              <td style="border-left:1px #ccc solid;border-right:1px #ccc solid;padding:10px;"><table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#E7E7E7">
                  <tr>
                    <td width="188" align="right" bgcolor="#FFFFFF"><span class="tt1">*</span> 观点标题：</td>
                    <td colspan="2" bgcolor="#FFFFFF"><input name="title" type="text" class="kuang_txsx" id="title" size="40" value="<%= pk_title %>"/>
                      &nbsp;例如：<font color="#666666">明星该不该热衷于炒作？</font></td>
                  </tr>
                  <tr>
                    <td align="right" bgcolor="#FFFFFF"><span class="tt1">*</span> 我的昵称：</td>
                    <td colspan="2" bgcolor="#FFFFFF"><input name="Author" type="text" class="kuang_txsx" id="Author" size="20" value="<%= uname %>"/></td>
                  </tr>
                  <tr>
                    <td align="right" bgcolor="#FFFFFF"><span class="tt1">*</span> 话题描述：</td>
                    <td width="327" bgcolor="#FFFFFF"><textarea name="content" cols="40" rows="10" class="kuang_txsx" id="content"><%= notice %></textarea></td>
                    <td width="612" bgcolor="#FFFFFF" class="12px_160_back">例如：<br />
                        <font color="#666666">有人说，明星天生是一个喜欢炒作的行业。如今已被国家有关部门紧急叫停。明星究竟要不要热衷于炒作呢？</font></td>
                  </tr>
                  <tr>
                    <td align="right" bgcolor="#FFFFFF"><span class="tt1">*</span> 正方观点：</td>
                    <td bgcolor="#FFFFFF"><textarea name="square" cols="40" rows="4" class="kuang_txsx" id="square"><%= F_point %></textarea></td>
                    <td bgcolor="#FFFFFF"><span class="12px_160_back">例如：<br />
                          <font color="#666666">该！炒作可以一夜成名。</font></span></td>
                  </tr>
                  <tr>
                    <td align="right" bgcolor="#FFFFFF"><span class="tt1">*</span> 反方观点：</td>
                    <td bgcolor="#FFFFFF"><textarea name="object" cols="40" rows="4" class="kuang_txsx" id="object"><%= W_point %></textarea></td>
                    <td bgcolor="#FFFFFF"><span class="12px_160_back">例如：<br />
                          <font color="#666666">不该。无论别人怎么恶炒，我始终认真做着自己的事情。</font></span></td>
                  </tr>

                  <tr>
                    <td colspan="3" align="center" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="19%">&nbsp;</td>
                          <td width="44%" align="center"><input type="submit" name="Submit" value="马上提交" />
                            &nbsp;&nbsp;
                            <input type="reset" name="Submit2" value="重新写过" /></td>
                          <td width="37%">&nbsp;</td>
                        </tr>
                    </table></td>
                  </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
      </table>
      </FORM>
	  </TR>
	 </TBODY>
</TABLE>
<%
	conn.close
	set conn=nothing
%>
</BODY>
</HTML>

