📄 admin_messages.jsp
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title>Messages Page</title>
</head>
<body bgcolor="#C0C0C0" topmargin="0" background="http:\\localhost:8000\music\Background.bmp" >
<table border="0" width="100%">
<tr>
<td width="100%">
<table border="0" width="97%" height="19">
<tr>
<td width="18%" height="13" valign="middle" align="right">
<font face="Arial" size="5" color="#800000"><b><i>eMusicWorld-----> The World of Music</i></b></font>
</td>
</tr>
</table>
</td>
</tr>
</table>
<form method="get" action="http://localhost:8000/music/admin_home_page.htm">
<table border="0" width="100%">
<tr>
<td width="100%"><table border="0" width="100%" height="19">
<tr>
<td width="9%" height="13" valign="middle" align="center"><font face="Arial" size="2" color="#800000"><b><a HREF="http://localhost:8000/music/admin_home_page.htm">Home</a></b></font></td>
<td width="10%" height="13" valign="middle" align="center"></td>
<td width="19%" height="13" valign="middle" align="center"></td>
<td width="13%" height="13" valign="middle" align="center"></td>
<td width="13%" height="13" valign="middle" align="center"></td>
<td width="11%" height="13" valign="middle" align="center"></td>
<td width="10%" height="13" valign="middle" align="center"></td>
<td width="9%" height="13" valign="middle" align="center"><font face="Arial" size="2" color="#800000"><b><a HREF="logout_page.jsp">Logout</b></font></td>
<td width="9%" height="13" valign="middle" align="center"><font face="Arial" size="2" color="#800000"><b><a HREF="http://localhost:8000/music/admin_home_page_old.htm">Help</a></b></font></td>
</tr>
</table>
</td>
</tr>
</table>
<table border="1" width="100%" height="353">
<tr>
<td width="15%" height="347" valign="top">
<p><font face="Arial" size="2" color="#800000"><b><a HREF="http://localhost:8000/music/admin_del_user.jsp">Delete User</a></b></font></p>
<p><font face="Arial" size="2" color="#800000"><b><a HREF="http://localhost:8000/ItemContext/ItemAlias">Add Item</a></b></font></p>
<p><font face="Arial" size="2" color="#800000"><b><a HREF="http://localhost:8000/music/admin_mod_item.jsp">Modify Item</a></b></font></p>
<p><font face="Arial" size="2" color="#800000"><b>Sales Reports<br>---<a HREF="http://localhost:8000/music/daily_sales_report.jsp">Choose a Date</a><br>---<a HREF="http://localhost:8000/music/weekly_sales_report.jsp">Previous
Week</a><br>---<a HREF="http://localhost:8000/music/monthly_sales_report.jsp">Previous Month</a></b></font></p>
<p><font face="Arial" size="2" color="#800000"><b><a HREF="http://localhost:8000/music/admin_wishlist.jsp">View Wishlist</a></b></font></p>
<p><font face="Arial" size="2" color="#800000"><b><a HREF="http://localhost:8000/music/admin_messages.jsp">View Messages</a></b></font></p>
</td>
<td width="85%" height="347" valign="top">
<p align="center"><font size="2"><b>
<font face="Arial" color="#800000"><u>Messages from Users</u></font>
</b></font>
</p>
<table border="0" width="100%" height="117">
<tr>
<td width="15%" height="19"><b><font face="Arial" color="#800000" size="2">User
Name</font></b></td>
<td width="15%" height="19"><b><font face="Arial" color="#800000" size="2">E-mail</font></b></td>
<td width="30%" height="19"><b><font face="Arial" color="#800000" size="2">Message</font></b></td>
<td width="19%" height="19"><b><font face="Arial" color="#800000" size="2">Date</font></b></td>
</tr>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.text.*" %>
<%@ page import="java.sql.Date" %>
<%@ page language = "java" %>
<%
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connect, connect1;
connect=DriverManager.getConnection("jdbc:odbc:RegisterDataSource","wasiqr","bhalbabatu");
Statement state;
state = connect.createStatement();
String strQuery1 = "select * from Feedback_Master Order by Msg_Date desc";
ResultSet result = state.executeQuery(strQuery1);
String username, email, message, msgdate;
while(result.next())
{
username=result.getString("User_name");
connect1=DriverManager.getConnection("jdbc:odbc:RegisterDataSource","wasiqr","bhalbabatu");
username=username.trim();
Statement state1;
state1 = connect1.createStatement();
String strQuery2 = "select E_mail from User_Info where User_Name='"+username+"'";
ResultSet result1 = state1.executeQuery(strQuery2);
email="";
while(result1.next())
{
email=result1.getString("E_mail");
}
message=result.getString("Message");
msgdate=result.getString("Msg_Date");
msgdate=msgdate.substring(0,10);
out.println("<tr>");
out.println("<td width=\"15%\"><font face=\"Arial\" size=\"2\" color=\"#800000\">" + username + "</font></td>");
out.println("<td width=\"15%\"><font face=\"Arial\" size=\"2\" color=\"#800000\">" + email + "</font></td>");
out.println("<td width=\"30%\"><font face=\"Arial\" size=\"2\" color=\"#800000\">" + message + "</font></td>");
out.println("<td width=\"19%\"><font face=\"Arial\" size=\"2\" color=\"#800000\">" + msgdate+ "</font></td>");
out.println("</tr>");
}
connect.close();
}
catch(Exception e)
{
out.println("Exception: " + e + " occured.");
}
%>
</table>
<table border="0" width="100%">
<tr>
<td width="50%" valign="middle" align="right"><input type="submit" value="OK" name="submit_button"></td>
<td width="50%" valign="middle" align="right"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -