⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 detail.jsp

📁 JSP+oracle开发实例精粹》随书光盘
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page language="java" %>
<%@ page import="java.sql.*" %>
<jsp:useBean id="job" class="qiuzhi.personaljob"/>
<jsp:useBean id="data" class="qiuzhi.personaljobdata"/>
<%@ include file="lib/config.jsp" %>
<%
		if(!job.init(OracleDriver,OracleUrl,OracleUser,OraclePsw))
		{
		    out.println("<script language=\"JavaScript\" type=\"text/javascript\">alert(\"Fail to Connect Oracle Server!  Please check the settings!\");window.close();</script>");
		}
		HttpSession mysession = request.getSession();
		String username = (String)mysession.getAttribute("user");
		String password = (String)mysession.getAttribute("pass");
		
    job.setUsername(username);
		job.setPasswrod(password);
		
		//验证未通过
		if(job.logcheck() == -1)
		{
		    out.println("<script language=\"JavaScript\" type=\"text/javascript\">alert(\"Wrong username or password!\");window.close();location.href=\"index.jsp\";</script>");
		}
		
		String action = request.getParameter("action");
		if(action == null || action.equals(""))
		{
		    out.println("<script language=\"JavaScript\" type=\"text/javascript\">alert(\"Wrong action!\");window.close();location.href=\"index.jsp\";</script>");
		}
		else if(action.equals("showcop"))
		{
		    //get ID
		    //int id = Integer.parseInt((String)request.getParameter("id"));
				String id = request.getParameter("id");
				if(id == null || id.equals(""))
				{
				    out.println("<script language=\"JavaScript\" type=\"text/javascript\">alert(\"Miss job ID!\");window.close();</script>");
				}
				else
				{
						ResultSet res = null;
						res = job.getCopInfo(id);
						if(res == null)
						{
						    out.println("<script language=\"JavaScript\" type=\"text/javascript\">alert(\"没有对应的公司信息!\");window.close();</script>");
						}
						else
						{
						    res.next();
								String cop_name = res.getString("cop_name");
								String cop_mann = data.cop_mann[res.getInt("cop_mann")];
								String cop_cont = res.getString("name");
								String cop_tel  = res.getString("cop_tel");
								String cop_mail = res.getString("cop_mail");
								if(cop_mail != null && !cop_mail.equals(""))
								{
								    cop_mail = "<a href=\"mailto:"+cop_mail+"\" target=\"_blank\">"+cop_mail+"</a>";
								}
								
								String cop_fax  = res.getString("cop_tex");
								String cop_addr = res.getString("cop_addr");
								String cop_zip  = res.getString("cop_zip");
								String cop_www  = res.getString("cop_www");
								if(cop_www != null && !cop_www.equals(""))
								{
								    cop_www = "<a href=\""+cop_www+"\" target=\"_blank\">"+cop_www+"</a>";
								}
								String cop_desc = res.getString("cop_desc");
								String info = "<a href=\"detail.jsp?action=showjob&id="+id+"\" title=\"查看该公司的职位信息\"><font color=\"#FF0000\">查看职位信息</font></a>";
								%>
<html>
<head>
<title>网上求职平台</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css_js/style.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="50" border="0" cellpadding="0" cellspacing="0" bgcolor="#30483C">
  <tr> 
    <td width="290" valign="middle"><img src="ima/title.gif" width="290" height="50" border="0"></td>
    <td align="right" valign="bottom"><font color="#FFFFFF"><strong>公司信息</strong></font>&nbsp;&nbsp;</td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="1" cellspacing="1">
  <tr>
    <td align="center" valign="top"><table width="350" border="0" cellspacing="1" cellpadding="1">
        <tr class="text-login"> 
          <td width="60" height="20">公司名称</td>
          <td width="290" height="20">&nbsp;<%=cop_name%>&nbsp;&nbsp;&nbsp;&nbsp;<%=info%></td>
        </tr>
        <tr bgcolor="#EEEEEE" class="text-login"> 
          <td width="60" height="20">公司性质</td>
          <td width="290" height="20">&nbsp;<%=cop_mann%></td>
        </tr>
        <tr class="text-login"> 
          <td width="60" height="20">联系人</td>
          <td width="290" height="20">&nbsp;<%=cop_cont%></td>
        </tr>
        <tr bgcolor="#EEEEEE" class="text-login"> 
          <td width="60" height="20">联系电话</td>
          <td width="290" height="20">&nbsp;<%=cop_tel%></td>
        </tr>
        <tr class="text-login"> 
          <td width="60" height="20">E-mail</td>
          <td width="290" height="20">&nbsp;<%=cop_mail%></td>
        </tr>
        <tr bgcolor="#EEEEEE" class="text-login"> 
          <td width="60" height="20">传真</td>
          <td width="290" height="20">&nbsp;<%=cop_fax%></td>
        </tr>
        <tr class="text-login"> 
          <td width="60" height="20">地址</td>
          <td width="290" height="20">&nbsp;<%=cop_addr%></td>
        </tr>
        <tr bgcolor="#EEEEEE" class="text-login"> 
          <td width="60" height="20">邮编</td>
          <td width="290" height="20">&nbsp;<%=cop_zip%></td>
        </tr>
        <tr class="text-login"> 
          <td width="60" height="20">网址</td>
          <td width="290" height="20">&nbsp;<%=cop_www%></td>
        </tr>
        <tr bgcolor="#EEEEEE" class="text-login"> 
          <td width="60" height="135" valign="top">公司简介</td>
          <td width="290" height="135" valign="top"><%=cop_desc%></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="100%" height="35" border="0" cellpadding="0" cellspacing="0" bgcolor="#446655">
  <tr> 
    <td width="200" background="ima/pop_bg.gif">&nbsp;</td>
    <td align="right" valign="middle"><input name="Button" type="button" class="logbutton" value="关闭" onClick="window.close();">&nbsp;&nbsp;</td>
  </tr>
</table>
</body>
</html>

								<%
						}
				}
		}
		else if(action.equals("showjob"))
		{
		    //get ID
		    //int id = Integer.parseInt((String)request.getParameter("id"));
				String id = request.getParameter("id");
				if(id == null || id.equals(""))
				{
				    out.println("<script language=\"JavaScript\" type=\"text/javascript\">alert(\"Miss job ID!\");window.close();</script>");
				}
				else
				{
						ResultSet res = null;
						res = job.getJobInfo(id);
						if(res == null)
						{
						    out.println("<script language=\"JavaScript\" type=\"text/javascript\">alert(\"没有对应的职位信息!\");window.close();</script>");
						}
						else
						{
						    res.next();
								String cop_id = String.valueOf(res.getInt("cop_id"));
								String job_name = res.getString("job_name");
								String job_mann = data.job_mann[res.getInt("jop_mann")];
								String job_addr = res.getString("job_addr");
								int job_num = res.getInt("job_num");
								String job_get = res.getString("job_get");
								String time = "从"+res.getInt("job_sta")+"至"+res.getInt("job_end");
								String job_grad = data.job_grad[res.getInt("job_grad")];
								String age = res.getInt("job_age1")+"~"+res.getInt("job_age2");
								String job_expe = data.job_expe[res.getInt("job_expe")];
								String job_lang = data.job_lang[res.getInt("job_lang")];
								String job_odem = res.getString("job_odem");
								String job_oget = res.getString("job_oget");
								String info = "<a href=\"detail.jsp?action=showcop&id="+cop_id+"\" title=\"查看该职位的公司信息\"><font color=\"#FF0000\">查看公司信息</font></a>";
								%>
								<html>
<head>
<title>个人求职管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css_js/style.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="50" border="0" cellpadding="0" cellspacing="0" bgcolor="#30483C">
  <tr> 
    <td width="290" valign="middle"><img src="ima/title.gif" width="290" height="50" border="0"></td>
    <td align="right" valign="bottom"><font color="#FFFFFF"><strong>职位信息</strong></font>&nbsp;&nbsp;</td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="1" cellspacing="1">
  <tr>
    <td align="center" valign="top"><table width="350" border="0" cellspacing="1" cellpadding="1">
        <tr class="text-login"> 
          <td width="60" height="20">职位名称</td>
          <td width="290" height="20">&nbsp;<%=job_name%>&nbsp;&nbsp;&nbsp;&nbsp;<%=info%></td>
        </tr>
        <tr bgcolor="#EEEEEE" class="text-login"> 
          <td width="60" height="20">职位性质</td>
          <td width="290" height="20">&nbsp;<%=job_mann%></td>
        </tr>
        <tr class="text-login"> 
          <td width="60" height="20">工作地点</td>
          <td width="290" height="20">&nbsp;<%=job_addr%></td>
        </tr>
        <tr bgcolor="#EEEEEE" class="text-login"> 
          <td width="60" height="20">招聘人数</td>
          <td width="290" height="20">&nbsp;<%=job_num%></td>
        </tr>
        <tr class="text-login"> 
          <td width="60" height="20">工资待遇</td>
          <td width="290" height="20">&nbsp;<%=job_get%></td>
        </tr>
        <tr bgcolor="#EEEEEE" class="text-login"> 
          <td width="60" height="20">有效期限</td>
          <td width="290" height="20">&nbsp;<%=time%></td>
        </tr>
        <tr class="text-login"> 
          <td width="60" height="20">学历要求</td>
          <td width="290" height="20">&nbsp;<%=job_grad%></td>
        </tr>
        <tr bgcolor="#EEEEEE" class="text-login"> 
          <td width="60" height="20">年龄要求</td>
          <td width="290" height="20">&nbsp;<%=age%></td>
        </tr>
        <tr class="text-login"> 
          <td width="60" height="20">工作经验</td>
          <td width="290" height="20">&nbsp;<%=job_expe%></td>
        </tr>
        <tr bgcolor="#EEEEEE" class="text-login"> 
          <td height="20">语言要求</td>
          <td height="20">&nbsp;<%=job_lang%></td>
        </tr>
        <tr class="text-login"> 
          <td height="20">其它待遇</td>
          <td height="20">&nbsp;<%=job_oget%></td>
        </tr>
        <tr bgcolor="#EEEEEE" class="text-login"> 
          <td width="60" height="135" valign="top">其他要求</td>
          <td width="290" height="135" valign="top"><%=job_odem%></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="100%" height="35" border="0" cellpadding="0" cellspacing="0" bgcolor="#446655">
  <tr> 
    <td width="200" background="ima/pop_bg.gif">&nbsp;</td>
    <td align="right" valign="middle"><input name="Button" type="button" class="logbutton" value="关闭" onClick="window.close();">&nbsp;&nbsp;</td>
  </tr>
</table>
</body>
</html>

								<%
						}
				}
		}
		else
		{
		    out.println("<script language=\"JavaScript\" type=\"text/javascript\">alert(\"Wrong action!\");window.close();location.href=\"index.jsp\";</script>");
		}
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -