【JSP开源代码栏目提醒】:网学会员鉴于大家对JSP开源代码十分关注,论文会员在此为大家搜集整理了“fastadd.jsp”一文,供大家参考学习
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*,java.io.*,oa.main.DealString"%>
<%
oa.bean.ArticleBean myBean = null;
try{
myBean = new oa.bean.ArticleBean();
DealString ds = new DealString();
String stredit = ds.toString((String)request.getParameter("txt_edit"));//新增?修改?
if(stredit.equals(""))
stredit = "1";
String strwh = ds.toString((String)request.getParameter("wh"));//公司?部门?
String strgoto = "addcom.jsp";
String strbmbh = ds.toString((String)request.getParameter("bmbh"));//部门编号
String strwhere = ds.toString((String)request.getParameter("where"));//修改后回到那个页
String uid = (String)session.getAttribute("zgbh");
Hashtable hashbm = (Hashtable)myBean.getorgqx(uid);
String bmbh = (String)hashbm.get("LR");
if(strbmbh.equals("")&&!bmbh.equals(""))
{
strbmbh = bmbh.substring(0,20);
}
if(stredit.equals(""))
{
stredit = "1";
}
if(strwh.equals(""))
{
strwh = "1";
}
if(stredit.equals("1")&&strwh.equals("1"))
{
strgoto = "addcom.jsp";
}
if(stredit.equals("1")&&strwh.equals("2"))
{
strgoto = "adddep.jsp?bmbh="+strbmbh;
}
if(stredit.equals("2"))
{
strgoto = "addcom.jsp?where="+strwhere;
}
%>
<%if(stredit.equals("1")&&strwh.equals("2")){
StringTokenizer st = new StringTokenizer(bmbh,",");
%>
<table>
<tr>
<td>
<% if(st.countTokens()>1){
out.print("发表到 ");
while(st.hasMoreElements())
{
String strid = (String)st.nextElement();
if(strid.equals(""))continue;
String bmmc = (String)myBean.toName("zz_bmb","bmbh","bmmc",strid);
%>
<input type=radio value="发表到<%=bmmc%>" onclick="addwz('2','<%=strid%>');"<%if(strbmbh.equals(strid)){%>checked<%}%>><a style="cursor:hand" onclick="addwz('2','<%=strid%>')"><font color=<%if(strbmbh.equals(strid)){%>#CC0000<%}else{%>#006600<%}%>><%=bmmc%></font></a>
<% }
}
%>
</td>
</tr>
</table>
<% if(bmbh.equals("")){
strgoto="";
out.print("<br><br><br><br><center><font size=3 color=red>对不起,您现在不能发表部门文章,请确认您有发表部门文章的权限</font></center><br><br><br><br>");
}
}%>
<jsp:include page="<%=strgoto%>"/>
<script>
function addwz(id,wh)
{
if(id=='1')
{
document.all.txt_type.value = "11";
document.all.txt_edit.value = "1";
document.all.form1.action = "index.jsp?wh=1";
document.all.form1.submit();
}
if(id=='2')
{
document.all.txt_type.value = "11";
document.all.txt_edit.value = "1";
document.all.form1.action = "index.jsp?wh=2&bmbh="+wh;
document.all.form1.submit();
}
}
</script>
<%}finally{
if(myBean!=null)
myBean.closeConn();
}
%>
上一篇:
faq_reservation_item.jsp
下一篇:
关于广告设计人才培养模式研究