📄 editarticle.jsp
字号:
<%@ include file="../checklogin.jsp" %>
<%@ page contentType="text/html; charset=gb2312"%>
<%@ page language="java"%>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.index.Article" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<%
request.setCharacterEncoding("gb2312");
int id=Integer.parseInt(request.getParameter("id"));
Article art=new Article();
art.ViewArticle(id);
int sort_id=art.sortid;
String type="";
if (sort_id==1){
type="公告";
}
else if (sort_id==2){
type="教程";
}
else if (sort_id==3){
type="课件";
}
%>
<script language="javascript">
var ctimer;
function init(){
if (document.all){
tim2.style.left=tim1.style.posLeft;
tim2.style.top=tim1.style.posTop+tim1.offsetHeight-6;
settimes();
}
}
function settimes(){
var time= new Date();
years=time.getYear();
months=time.getMonth();
days=time.getDay();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
if (hours<10)
hours="0"+hours;
if(mins<10)
mins="0"+mins;
if (secs<10)
secs="0"+secs;
tim1.innerHTML=years+"-"+months+"-"+days+" "+hours+":"+mins+":"+secs
tim2.innerHTML=years+"-"+months+"-"+days+" "+hours+":"+mins+":"+secs
ctimer=setTimeout('settimes()',960);}
function check(){
document.form1.content.value=frames.frameobj.document.body.innerHTML;
if(document.frames["filename"].Upload.filename.value!=""){
document.form1.filename.value=document.frames["filename"].Upload.filename.value;
}
if(form1.title.value==""){
alert("请输入标题!");
}else if(form1.auth.value==""){
alert("请输入作者!");
} else{
form1.submit();
}
}
</script>
<style type="text/css">
<!--
.STYLE6 {
font-size: 12px;
font-weight: bold;
}
.STYLE7 {font-size: 12px}
-->
</style>
<link href="../css/left.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-image: url(../images/aa.gif);
}
-->
</style></head>
<html>
<body onLoad="init()">
<div align="center" Id="tim1" Style="position:absolute; width:102px; height:11px; top:19px; left:180px"
class="time"></div>
<div Id="tim2"
Style="position:absolute; filter:flipv() alpha(opacity=20); font-style:italic"
class="time"></div>
<link href="../css/left.css" rel="stylesheet" type="text/css">
<form action="edit.jsp" method="post" name="form1" >
<br />
<table width="731" border="0" align="center" >
<tr>
<td width="43"> </td>
<td width="559"><span class="STYLE7">当前时间:</span></td>
<td width="115"><a href="../../index.jsp" target="_blank">网站首页</a></td>
</tr>
</table>
<br />
<table width="712" border="0" align="center" class="tableBorder">
<tr >
<td colspan="2"><span class="STYLE7">·</span><span class="STYLE6">
<%if (art.flag!=1){%>审核<%}else{%>修改<%}out.print(type);%></span></td>
</tr>
<tr >
<td width="100"><div align="right" class="STYLE7">文章类别:</div></td>
<td><div align="left">
<select name="sortid" id="sortid">
<option value="1" <%if (sort_id==1){%>selected<%}%>>公告</option>
<option value="2" <%if (sort_id==2){%>selected<%}%>>教程</option>
<option value="3" <%if (sort_id==3){%>selected<%}%>>课件</option>
</select>
<input name="id" type="hidden" id="id" value="<%=request.getParameter("id")%>">
</div></td>
</tr>
<tr >
<td><div align="right" class="STYLE7">标 题:</div></td>
<td><input name="title" type="text" class="textbox" id="title" value="<%=art.title.trim()%>" size="50" maxlength="100"></td>
</tr>
<tr >
<td><div align="right" class="STYLE7">作 者:</div></td>
<td><input name="auth" type="text" class="textbox" id="auth" value="<%=art.author.trim()%>" maxlength="15"></td>
</tr>
<tr>
<td><div align="right" class="STYLE7">文件上传:</div></td>
<td>
<input name="filename" type="hidden" id="file" value="<%=art.filename%>" class="textbox">
<iframe id="filename" <%if (art.filename.trim().equals("")){%>src="upload.jsp"<%}else{%>src="showfilename.jsp"<%}%> width="650" height="30" marginwidth="0" marginheight="0" border="0" frameborder="0" scrolling="no"></iframe>
</td>
</tr>
<%if (art.flag!=1){%>
<tr>
<td><div align="right" class="STYLE7">审 核:</div></td>
<td><select name="audit" id="select">
<option value="1" <%if (art.flag==1){%>selected<%}%>>通过</option>
<option value="2" <%if (art.flag==2){%>selected<%}%>>审核中</option>
<option value="3" <%if (art.flag==3){%>selected<%}%>>未通过</option>
</select></td>
</tr>
<%}%>
<tr >
<td><div align="right" class="STYLE7">内 容:</div></td>
<td><input name="content" type="hidden" value="<%=art.content.replace("\"","\''")%>"><iframe id="frameobj" width="650" height="300" marginwidth="1" marginheight="1" border="1" frameborder="0" STYLE="border bottom: A9BAC9 10px solid;border top: A9BAC9 1px solid;border left: A9BAC9 1px solid;border right: A9BAC9 1px solid;" ></iframe></td>
</tr>
<tr >
<td colspan="2">
<div align="center">
<input type="button" name="Submit" value="提交" onClick="check()" class="btn">
<INPUT type=reset name=b2 value="重填" class="btn">
</div></td>
</tr>
</table>
</form>
<script>
frameobj=frames[0];
bodyHtml="<head>\n<style type=\"text/css\">body {font: 10pt verdana;}</style>\n</head>\n<BODY bgcolor=\"#FFFFFF\" MONOSPACE>"
bodyHtml += document.form1.content.value;
bodyHtml+="</BODY>";
frameobj.document.open();
frameobj.document.write(bodyHtml);
frameobj.document.close();
frameobj.document.designMode="On";
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -