⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 articlesacceptform.jsp

📁 一个很有用的电子刊物发布系统
💻 JSP
字号:
<%@ page language="java" contentType="text/html;charset=gb2312" %>
<%@ page import="java.sql.*,com.am.*" %>
<html>
<head>
	<title>刊物文章管理系统</title>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language=javascript>
<!--
function checkForm()
{
	var check = true;
	var i = 0;
	for(;i<document.all.chkAccept.length;i++)
	{
		if((document.all.chkRefuse[i].checked) && ( document.all.chkAccept[i].checked))
		{
			alert("文章不能同时选中录用与拒录!");
			check = false;
			break;
		}
	}
	if(check)
	{
		document.all.form1.action="articlesAcceptSave.jsp" ;	
	}
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<jsp:useBean id="dbconn" scope="application" class="com.am.OpenDB"/>
<jsp:useBean id="no1" scope="page" class="com.am.register"/>
<jsp:useBean id="no2" scope="page" class="com.am.register"/>
<jsp:useBean id="theauthor" scope="page" class="com.am.register"/>
<%
String allID="";
no1.setConnection(dbconn.getConnection());
no2.setConnection(dbconn.getConnection());

theauthor.setConnection(dbconn.getConnection());
String fieldID=(String)request.getParameter("ID");
String strArticleSql="";
String strAuditSql1;
String strAuditSql2;

int intNum1=0;
int intNum2=0;
long audit1=0;
long audit2=0;
ResultSet rsAudit1;
ResultSet rsAudit2;


Statement stmt=dbconn.getConnection().createStatement();

strArticleSql="select * from articles where tag!=-1 and workgroup='" + fieldID + "'";
	
ResultSet rsArticle=stmt.executeQuery(strArticleSql);

Statement stmt1=dbconn.getConnection().createStatement();
Statement stmt2=dbconn.getConnection().createStatement();
%>
<div align=center>
<form name="form1" id="form1" method="post" onsubmit="checkForm()">
<input type=hidden name=fieldID value=<%=fieldID%> >


  <table width="100%" border="1" cellpadding="3" cellspacing="0">
    <tr bgcolor="#DFDFDF">
      <td width="6%"><b><font size="3">文章编号</font></b></td>
      <td width="28%"><b><font size="3">文章标题</font></b></td>
      <td width="12%"><b><font size="3">评审结果-1</font></b></td>
      <td width="12%"><b><font size="3">评审结果-2</font></b></td>
      <td width="18%">作者</td>
      
      <td width="8%">修改</td>
      <td width="8%">录用</td>
      <td width="8%">拒录</td>
    </tr>
    <tr>
      <%
	int rowno=0;
	allID="0";
	while(rsArticle.next())
       { 
			rowno=rowno+1;
			theauthor.ID=rsArticle.getLong("issuer");
			theauthor.init();
			allID=allID  +"," + rsArticle.getLong("ID") ;
			
			strAuditSql1="select * from articlesaudit where tag!=-1 and articleID=" + rsArticle.getLong("ID") + " and reviewer='" + rsArticle.getLong("reviewer1") + "'";
			strAuditSql2="select * from articlesaudit where tag!=-1 and articleID=" + rsArticle.getLong("ID") + " and reviewer='" + rsArticle.getLong("reviewer2") + "'";


			rsAudit1=stmt1.executeQuery(strAuditSql1);
			rsAudit2=stmt2.executeQuery(strAuditSql2);

			if (rsAudit1.next())
			{
				no1.ID=rsAudit1.getLong("reviewer");
				no1.init();
				intNum1=rsAudit1.getInt("point");
				audit1=rsAudit1.getLong("ID");	
			}


			if (rsAudit2.next())
			{
				no2.ID=rsAudit2.getLong("reviewer");
				no2.init();
				intNum2=rsAudit2.getInt("point");
				audit2=rsAudit2.getLong("ID");
			}
 %>
     <tr>
      <td ><%=rsArticle.getLong("ID")%></td>
      <td ><a href="../articleShow.jsp?ID=<%=rsArticle.getLong("ID")%>" target="_blank"><%=rsArticle.getString("title") %></a>
        <input type="hidden" name="txtID" value=<%=rsArticle.getLong("ID")%>>
      </td>
      <td >
    <%
    if(intNum1==0)
     {
	 %>
        未评审
    <%
	}
      else
	{
	%>
        <a href="../auditShow.jsp?ID=<%=audit1%>" target="_blank">查看结果</a><br>
        
	<%}%>
	</td>
   <td >
    <%
    if(intNum2==0)
    {
		%>
        未评审
   <%
		}
       else
       {
		   %>
        <a href="../auditShow.jsp?ID=<%=audit2%>" target="_blank">查看结果</a><br>
        
       
      <%
		  }
	  %>
	  </td>
      <td ><%=rsArticle.getString("author")%>&nbsp;</td>
      
      <td>
        
        <input type="checkbox" <%if(rsArticle.getInt("allowmodify")==1) out.println(" checked ");
%> name="chkAllowmodify" value="<%=rsArticle.getLong("ID")%>" id=chkAllowmodify>
       	
      </td>
      <td>
        
        <input type="checkbox" <%if(rsArticle.getInt("accept")==1) out.println(" checked ");
%> name="chkAccept" value="<%=rsArticle.getLong("ID")%>" id=chkAccept>
        
      </td>
      <td >
        
        <input type="checkbox" <%if(rsArticle.getInt("accept")==-1) out.println(" checked ");
%> name="chkRefuse" value="<%=rsArticle.getLong("ID")%>" id=chkRefuse>
        
      </td>
    </tr>
    <%
    }
  %>
  </table>

  <p>
   <input type="hidden" name="allID" value=<%=allID%>>

    <input type="submit" name="btnSumbit" value="保存">
    <input type="reset" name="btnReset" value="重设">
  </p>
  </div>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -