向自己的页面提交

<%@ page contentType="text/html; charset=gb2312" language="java" %>
<%@ page import="com.sgai.suvery.model.SuverySubject" %>
<%@ page import="com.sgai.suvery.dao.SuverySubjectDao" %>
<%@ page import="com.sgai.framework.sql.DbOperator" %>
<%@ include file="../permission/permission.jsp" %>
<%@ include file="../permission/permission_ survey.jsp" %>
<html>
<script type="text/javascript">
</script>
<head>
<link rel="stylesheet" href="../css/Admin_STYLE.CSS">
<link rel="stylesheet" href="../css/style2.css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.style3 {
color: #FFFFFF;
font-weight: bold;
}

-->
</style>
</head>
<%
String leibie = request.getParameter("leibie");
if(leibie == null){
%>
<form action="editstate.jsp">
<input type="hidden" name="leibie" value="1">
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table cellpadding="2" cellspacing="1" border="0" width="100%" class="border" align=center>
<tr align="right">
<td height=25 class="topbg">
<table cellpadding="0" cellspacing="0" border="0" width="100%" align=center>
<tr>
<td align="right">
<div align="center" class="style3">修 改 发 布 状 态</div>
<div align="center"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
String myid = request.getParameter("id");
String Tflag = "0";
String Ts_type = "0";
SuverySubjectDao SuverysubjectDaoobj = new SuverySubjectDao();
if (myid != null) {
SuverySubject SuverySubjectobj = SuverysubjectDaoobj.loadByID(myid);
Tflag = SuverySubjectobj.getFlag();
}
%>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="border">
<tr class="tdbg">
<td align="right">是否发布</td>
<td><select name="flag">
<option <%if (Tflag != null && Tflag.equals("0")) {%> selected<%}%> value="0">未发布</option>
<option <%if (Tflag != null && Tflag.equals("1")) {%> selected<%}%> value="1">发布</option>
</select></td>
</tr>
<tr class="tdbg">
</table>
<table width="100%" border="0" align="center">
<td colspan="2" align="center">
<tr class="tdbg" align="center">
<input type="hidden" name="flag">
<input type="hidden" name="myid" value="<%=myid%>">
<input name="button" type="Submit" class="buttona" value="确定">
</tr>
</td>
</table>
</body>
</form>
<%
}
else {
String myid = request.getParameter("myid");
String flag = request.getParameter("flag");
boolean Uflag = false;
String updatesql = "update INNE_SUVERY_SUBJECT set flag=" + flag + "where id=" + myid;
if (myid != null && flag != null) {
DbOperator.executeUpdate(updatesql);
Uflag = true;
}
if (Uflag == true) {
out.println("<script language='javascript'>alert('修改成功!');self.opener.location.reload();window.close();</script>");
} else {
out.println("<script language='javascript'>alert('修改失败!');window.opener = null;window.close();</script>");
}
}
%>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值