📄 view_dep.jsp
字号:
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*"%>
<%
oa.bean.MynewsBean newsBean = null;
oa.bean.MainBean myBean = null;
try{
newsBean = new oa.bean.MynewsBean();
myBean = new oa.bean.MainBean();
oa.main.DealString ds = new oa.main.DealString();
String uid = (String)session.getAttribute("zgbh");
// myBean1.setPersonNO(uid.trim());
// String name = myBean1.getPsBmName();
/* String bmbh = myBean1.getBMBH();
// String name = myBean1.getFatherName(bmbh);//strOrgNO
if(name.equals(""))
name = myBean1.getPsBmName();
else
name = name.substring(0,name.length()-1);
myBean1.closeConn();
String lx = ds.toGBK(ds.toString(request.getParameter("lx")));
*/
newsBean.setUID(uid);
String strFileId = ds.toString((String)request.getParameter("id"));
if(strFileId.equals(""))strFileId = "0";
//增加访问次数
myBean.addTime(strFileId);
//(3)取得文章编号
String appendix="0";
String ftp = "0";
String pathappendix= "upload/appendix/";
String path= "upload/img/";
String strftpsite=myBean.getftpsite()+"/";
String strtitle ="";
String strfrom = "";
String strwriter= (String)session.getAttribute("zgbh");
strwriter = myBean.toName("zz_zgb","zgbh","xm",strwriter);
String straddtime = ds.getDateTime();
String strtimes = "";
String strcontent ="";
String strOrgid = "";
String strpic ="";
String strftp ="";
String strauthor = "";
String strOldOrgid = "";
String name = "";
String lx = "";
if(!strFileId.equals("0"))
{
Hashtable hash = (Hashtable)myBean.getOneNews(strFileId);
strtitle = (String)hash.get("TITLE");
strfrom = (String)hash.get("FROMSITE");
strwriter= myBean.toName("ZZ_ZGB","ZGBH","XM",(String)hash.get("WRITER"));
straddtime = (String)hash.get("ADDTIME");
strtimes = (String)hash.get("TIMES");
strcontent = myBean.getOneContent(strFileId);
strOrgid = (String)hash.get("ORGID");
strpic = (String)hash.get("IMG");
strftp = (String)hash.get("FTPFILE");
strauthor = (String)hash.get("AUTHOR");
strOldOrgid=(String)hash.get("OLDORGID");
name = (String)hash.get("ORGANID");
lx = (String)hash.get("WZLX");
name = myBean.toName("ZZ_BMB","BMBH","BMMC",name);
lx = myBean.toName("ORGMENU","BH","MC",lx);
String strOrgids[] = strOrgid.split(",");
String strftps[] = strftp.split(",");
String strOldOrgids[] = strOldOrgid.split(",");
//对于已经发布的文章进行特殊处理
String confdir = oa.main.ParentBean.FilesPath;
confdir = (new oa.main.DealString()).Replace(confdir,"\\","/");
String ip = "http://"+request.getServerName();
String port = request.getServerPort()+"";
if(!port.equals("80"))ip+=":"+port;
strcontent = (new oa.main.DealString()).Replace(strcontent,ip+"/oa/manage/upload/img/","photo.jsp?photo="+confdir+"news/img/");
strcontent = (new oa.main.DealString()).Replace(strcontent,ip+"/oa/manage/upload/appendix/",confdir+"news/appendix/");
strcontent = (new oa.main.DealString()).Replace(strcontent,"/temp_sure/","/downloadservlet?type=1&&filename=temp_sure/");
ip = "http://10.0.0.92";
strcontent = (new oa.main.DealString()).Replace(strcontent,ip+"/oa/manage/upload/img/","photo.jsp?photo="+confdir+"news/img/");
strcontent = (new oa.main.DealString()).Replace(strcontent,ip+"/oa/manage/upload/appendix/",confdir+"news/appendix/");
strcontent = (new oa.main.DealString()).Replace(strcontent,"/temp_sure/","/downloadservlet?type=1&&filename=temp_sure/");
%>
<html>
<head>
<title><%=strtitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link rel="stylesheet" href="css/my_new.css" type="text/css">
<LINK href="../css/main.css" rel=stylesheet>
<link href="../css/person.css" type=text/css rel=stylesheet>
</head>
<body class="bgl" bgcolor="#F7F7F7">
<div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0" valign=top>
<tr width="100%">
<td width="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="2969B5">
<td width="12" height="22"><img src="../../image/index/connerx1.gif" width="12" height="22"></td>
<td height="22"><img src="../../image/index/alert_2.gif" width="17" height="22"></td>
<td width="50%" height="22"><q style="font-size:10pt;color:#ffffff;"><%=lx%>(<%=name%>)</q></td>
<td width="50%" height="22" align=right><font color="#ffffff"><font></td>
<td width="12" height="22">
<div align="right"><img src="../../image/index/connerx2.gif" width="12" height="22"></div>
</td>
</tr>
</table>
</td>
</tr>
<tr width="100%" valign=top>
<td width="100%" valign=top bgcolor="#F2F2F2">
<table width="100%" border="0">
<tr>
<td height="40" align="center"><font style="font-size:16px"><b><%=strtitle%></b></font></td>
</tr>
<tr>
<td align="right"><font color="#999999">来源:<%=strfrom%><font color="#CC0000"></font>
发布时间:<%=straddtime%></font> </td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing=0 cellpadding="4">
<tr><td align=center>
<table width="96%" border="0" cellspacing=0 cellpadding="0" style="word-break:break-all;">
<tr><td><p><font id="zoom"><%=strcontent%></font></p></td><tr>
</table>
</td>
</tr>
<tr><td align="right">编辑:<%=strauthor%> 被访问次数:<%=strtimes%> </td><tr>
<tr><td bgcolor="#dddddd">【 附件下载】</td></tr>
<tr><td bgcolor="#eeeeee"> <font color=red>附件: </font>
<%
//分割改过名的文件名串
String[] newname=strOrgid.split(",");
//分割未改过名的文件名串
String[] newfile=strOldOrgid.split(",");
for(int i=0;i<newname.length;i++)
{
if(!newname[i].equals(""))
{appendix="1";%>
<a href="../../articledownloadservlet?newname=<%=newname[i]%>&newfile=<%=newfile[i]%>"><%=newfile[i]%></a>
<%}
} if(appendix.equals("0")){%> 没有附件<%}%>
</td></tr>
<!--tr><td bgcolor="#dddddd">【 FTP下载】</td></tr>
<tr>
<%/*for(int i=0;i<strftps.length;i++)
{
if(!strftps[i].equals(""))
{ftp="1";*/%>
<td bgcolor="#eeeeee"><a target='_blank' href=<%//=strftpsite%><%//=strftps[i]%>><li>下载</li><%//=i+1%></a></td>
<%/*}
}
if(ftp.equals("0")){*/%><td bgcolor="#eeeeee"> 没有FTP文件</td><%//}%>
</tr--->
</table>
<%}else{%>
<html>
<head>
<script>
document.write("<title>");
document.write(window.opener.document.all.Title.value);
document.write("</title>");
</script>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link rel="stylesheet" href="css/my_new.css" type="text/css">
<LINK href="../css/main.css" rel=stylesheet>
<link href="../css/person.css" type=text/css rel=stylesheet>
</head>
<body class="bgl" bgcolor="#F7F7F7">
<div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0" valign=top>
<tr width="100%">
<td width="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="2969B5">
<td width="12" height="22"><img src="../../image/index/connerx1.gif" width="12" height="22"></td>
<td height="22"><img src="../../image/index/alert_2.gif" width="17" height="22"></td>
<td width="50%" height="22"><q style="font-size:10pt;color:#ffffff;">
<script>
document.write(window.opener.document.all.wzlx.value);
document.write("("+window.opener.document.all.txt_bmmc.value+")");
</script>
</q></td>
<td width="50%" height="22" align=right><font color="#ffffff"><font></td>
<td width="12" height="22">
<div align="right"><img src="../../image/index/connerx2.gif" width="12" height="22"></div>
</td>
</tr>
</table>
</td>
</tr>
<tr width="100%" valign=top>
<td width="100%" valign=top bgcolor="#F2F2F2">
<table width="100%" border="0">
<tr>
<td height="40" align="center"><font style="font-size:16px"><b>
<script>
document.write(window.opener.document.all.Title.value);
</script>
</b></font></td>
</tr>
<tr>
<td align="right"><font color="#999999">来源:
<script>
if(window.opener.document.all.fromsite.value=="")
document.write(window.opener.document.all.txt_bmmc.value);
else
document.write(window.opener.document.all.fromsite.value);
</script>
<font color="#CC0000"></font>
发布时间:<%=straddtime%></font> </td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing=0 cellpadding="4">
<tr><td align=center>
<table width="96%" border="0" cellspacing=0 cellpadding="0" style="word-break:break-all;">
<tr><td><p><font id="zoom">
<script>
document.write(window.opener.document.all.Content.value);
</script>
</font></p></td><tr>
</table>
</td>
</tr>
<tr><td align="right">编辑:
<script>
if(window.opener.document.all.author.value=="")
document.write("<%=strwriter%>");
else
document.write(window.opener.document.all.author.value);
</script>
被访问次数:1 </td><tr>
<tr><td bgcolor="#dddddd">【 附件下载】</td></tr>
<tr><td bgcolor="#eeeeee"> <font color=red>附件: </font>
<script>
var strOrgids = window.opener.document.all.ORGID.value+",";
var strOldOrgids = window.opener.document.all.OLDORGID.value+",";
var k=0;
for(var i=0,j=1;j<strOldOrgids.length;j++){
if(strOldOrgids.charAt(j)==','){
var strOldOrgid = strOldOrgids.substring(i,j);
var strOrgid = strOrgids.substring(i,j);
i=j+1;
k++;
document.write("<font color=#ff0000>"+strOldOrgid+"</font> ");
}
}
if(k==0) document.write(" 没有附件");
</script>
</td></tr>
<!--tr><td bgcolor="#dddddd">【 FTP下载】</td></tr>
<tr>
<%/*for(int i=0;i<strftps.length;i++)
{
if(!strftps[i].equals(""))
{ftp="1";*/%>
<td bgcolor="#eeeeee"><a target='_blank' href=<%//=strftpsite%><%//=strftps[i]%>><li>下载</li><%//=i+1%></a></td>
<%/*}
}
if(ftp.equals("0")){*/%><td bgcolor="#eeeeee"> 没有FTP文件</td><%//}%>
</tr--->
</table>
<%
}
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="2969B5">
<td width="12" height="22"><img src="../../image/index/connerx3.gif" width="12" height="22"></td>
<td height="22" align=right><script language=JavaScript>
<!-- Begin
if (window.print) {
document.write('<font color=#ffffff>【</font><a href="#" onClick="javascript:window.print()"><font color=#ffffff>打印本文</font></a><font color=#ffffff>】</font>');
}
// End -->
</script>
<font color=#ffffff>【</font> <a href="javascript:doZoom(16)"><font color=#ffffff>大</font></a>
<a href="javascript:doZoom(14)"><font color=#ffffff>中</font></a>
<a href="javascript:doZoom(12)"><font color=#ffffff>小</font></a><font color=#ffffff>】</font>
</td>
<td width="12" height="22">
<div align="right"><img src="../../image/index/connerx4.gif" width="12" height="22"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<br>
<script>
function doZoom(size)
{
document.getElementById('zoom').style.fontSize=size+'px'
}
</script>
<%}finally{
if(myBean!=null)myBean.closeConn();
if(newsBean!=null)newsBean.closeConn();
}%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -