📄 sendmail.jsp
字号:
<% String puid= (String) session.getValue("puid");
if((puid==null)|(puid=="")){
out.print("<SCRIPT language=JavaScript>alert('操作超时,请重新登录!');");
out.print("this.location.href='../default.jsp';</SCRIPT>");
}
%>
<%@ include file="../conn.jsp"%>
<%
request.setCharacterEncoding("GB2312");
String uname= (String) session.getValue("puid");
String reid=request.getParameter("reid");
String sendname;
String rename;
String sql="select * from scott.person where uname='"+uname+"' and job is not null";
ResultSet rs=stmt.executeQuery(sql);
if(!rs.next()){
out.print("<SCRIPT language=JavaScript>alert('请先登录个人求职简历!');");
out.print("javascript:window.close();</SCRIPT>");
}else{
sendname=rs.getString("iname");
sql="select * from scott.company where uname='"+reid+"' and job is not null";
ResultSet rs1=stmt.executeQuery(sql);
if(!rs1.next()){
out.print("<SCRIPT language=JavaScript>alert('用户["+reid+"]不存在!');");
out.print("javascript:window.close();</SCRIPT>");
}else{
rename=rs1.getString("cname");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<link rel="stylesheet" href="../inc/register.css" type="text/css">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>发送站内信件</title>
</head>
<body>
<form method=post action="sendmail.jsp?reid=<%=reid%>">
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" width="408" height="231" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td height="15" width="406" valign="bottom" background="../images/t-bg1.gif">
<p align="center">=== 发送站内信件 ===</td>
</tr>
<tr>
<td height="216" width="406" valign="top" bgcolor="#fffff4">
<p align="center"><br>
收信单位:<%=rename%></p>
<p align="center">标 题:
<input type="text" name="title" size="28" maxlength="20"></p>
<p align="center">正 文:<br>
<textarea rows="14" name="mailtext" cols="44"></textarea>
<p align="center"><input type="submit" value="确 定" style="position: relative; height: 19"><br>
<br>
</p>
</td>
</tr>
</center>
</table>
</div>
<p align="left"> </p>
</FORM>
</body>
</html>
<% String mailtext=request.getParameter("mailtext");
String title=request.getParameter("title");
if(mailtext!=null){
stmt.executeUpdate("INSERT INTO scott.cmailbox(id,reid,senduid,sendname,title,mailtext) VALUES(scott.pmailboxid.nextval,'"+reid+"', '"+uname+"','"+sendname+"','"+title+"','"+mailtext+"')");
out.print("<SCRIPT language=JavaScript>alert('信件发送成功!');");
out.print("javascript:window.close();</script>");
}
}
}%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -