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

📄 add.jsp

📁 JSP+oracle开发实例精粹》随书光盘
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%@ page language="java" contentType="text/html;charset=gb2312"%>
<%@ 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.location.href=\"index.jsp\";</script>");
		}
%>
<%@ include file="lib/everyinc.jsp" %>
<%
    String action = request.getParameter("action");
		if(action == null || action.equals(""))
		{
		    int i = 0,j = 0,k = 0,m = 0,n = 0;
				String cop_manna = "",job_manna = "",job_grada = "",job_langa = "",job_expea = "";
				for(i = 0; i < data.cop_mann.length ; i++)
				{
				    cop_manna += "<option value="+i+">"+data.cop_mann[i]+"</option>\n";
				}
				
				for(j = 0; j < data.job_mann.length ; j++)
				{
				    job_manna += "<option value="+j+">"+data.job_mann[j]+"</option>\n";
				}
				
				for(k = 0; k < data.job_grad.length ; k++)
				{
				    job_grada += "<option value="+k+">"+data.job_grad[k]+"</option>\n";
				}
				
				for(m = 0; m < data.job_lang.length ; m++)
				{
				    job_langa += "<option value="+m+">"+data.job_lang[m]+"</option>\n";
				}
				
				for(n = 0; n < data.job_expe.length ; n++)
				{
				    job_expea += "<option value="+n+">"+data.job_expe[n]+"</option>\n";
				}
				%>
<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="100%" cellpadding="0" cellspacing="0">
  <tr> 
    <td colspan="3" valign="top"> <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">&nbsp;</font></td>
        </tr>
      </table>
      <table width="100%" height="35" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="80%" align="center" background="ima/header_bg.gif"><img src="ima/header_arrows.gif" width="206" height="35"></td>
          <td width="20%" align="center" background="ima/header_bg.gif">&nbsp;</td>
        </tr>
      </table>
      <table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="right" background="ima/top_bg.gif"><script language="JavaScript" src="css_js/bar.js"></script></td>
        </tr>
      </table>
      <table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td background="ima/shadow.gif">&nbsp;</td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="1" cellpadding="2">
        <tr> 
          <td align="center"> <form action="add.jsp?action=add" method="post" name="form" id="form">
              <table width="99%" height="20" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td background="ima/info_bg.gif" class="text-login">&nbsp;&nbsp;<font color="#FFFFFF"><strong>Add&nbsp;Job</strong></font></td>
                </tr>
              </table>
              <table width="99%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td bgcolor="#8C8A84"><table width="100%" border="0" cellspacing="1" cellpadding="2">
                      <tr align="center" class="text-login"> 
                        <td height="25" colspan="2" bgcolor="#EEEEEE"><strong>公司信息</strong></td>
                        <td height="25" colspan="2" bgcolor="#EEEEEE"><strong>职位信息</strong></td>
                      </tr>
                      <tr class="text-login"> 
                        <td width="8%" bgcolor="#FFFFFF">公司名称</td>
                        <td width="42%" bgcolor="#FFFFFF"><input name="cop_name" type="text" class="addinput" id="cop_name"></td>
                        <td width="8%" bgcolor="#FFFFFF">职位名称</td>
                        <td width="42%" bgcolor="#FFFFFF"><input name="job_name" type="text" class="addinput" id="job_name"></td>
                      </tr>
                      <tr class="text-login"> 
                        <td width="8%" bgcolor="#EEEEEE">公司性质</td>
                        <td width="42%" bgcolor="#EEEEEE"><select name="cop_mann" class="addlist" id="cop_mann">
                            <option value="no">请选择公司性质</option>
                            <%=cop_manna%> </select></td>
                        <td width="8%" bgcolor="#EEEEEE">职位性质</td>
                        <td width="42%" bgcolor="#EEEEEE"><select name="job_mann" class="addlist" id="job_mann">
                            <option value="no">请选择职位性质</option>
                            <%=job_manna%> </select></td>
                      </tr>
                      <tr class="text-login"> 
                        <td width="8%" bgcolor="#FFFFFF">联系人</td>
                        <td width="42%" bgcolor="#FFFFFF"><input name="cop_cont" type="text" class="addinput" id="cop_cont"></td>
                        <td width="8%" bgcolor="#FFFFFF">工作地点</td>
                        <td width="42%" bgcolor="#FFFFFF"><input name="job_addr" type="text" class="addinput" id="job_addr"></td>
                      </tr>
                      <tr class="text-login"> 
                        <td width="8%" bgcolor="#EEEEEE">联系电话</td>
                        <td width="42%" bgcolor="#EEEEEE"><input name="cop_tel" type="text" class="addinput" id="cop_tel" maxlength="20"></td>
                        <td width="8%" bgcolor="#EEEEEE">招聘人数</td>
                        <td width="42%" bgcolor="#EEEEEE"><input name="job_num" type="text" class="addinput" id="job_num"></td>
                      </tr>
                      <tr class="text-login"> 
                        <td width="8%" bgcolor="#FFFFFF">E-mail</td>
                        <td width="42%" bgcolor="#FFFFFF"><input name="cop_mail" type="text" class="addinput" id="cop_mail" maxlength="100"></td>
                        <td width="8%" bgcolor="#FFFFFF">工资待遇</td>
                        <td width="42%" bgcolor="#FFFFFF"><input name="job_get" type="text" class="addinput" id="job_get" maxlength="20"></td>
                      </tr>
                      <tr class="text-login"> 
                        <td width="8%" bgcolor="#EEEEEE">传真</td>
                        <td width="42%" bgcolor="#EEEEEE"><input name="cop_fax" type="text" class="addinput" id="cop_fax"></td>
                        <td width="8%" bgcolor="#EEEEEE">有效期</td>
                        <td width="42%" bgcolor="#EEEEEE"><input name="job_sta" type="text" class="addinputtime" id="job_sta" maxlength="8">
                          <input name="job_end" type="text" class="addinputtime" id="job_end"></td>
                      </tr>
                      <tr class="text-login"> 
                        <td width="8%" bgcolor="#FFFFFF">地址</td>
                        <td width="42%" bgcolor="#FFFFFF"><input name="cop_addr" type="text" class="addinput" id="cop_addr"></td>
                        <td width="8%" bgcolor="#FFFFFF">年龄</td>
                        <td width="42%" bgcolor="#FFFFFF"><input name="job_age1" type="text" class="addinputtime" id="job_age1" maxlength="2">
                          <input name="job_age2" type="text" class="addinputtime" id="job_age2" maxlength="2"></td>
                      </tr>
                      <tr class="text-login"> 
                        <td width="8%" bgcolor="#EEEEEE">邮政编码</td>
                        <td width="42%" bgcolor="#EEEEEE"><input name="cop_zip" type="text" class="addinput" id="cop_zip" maxlength="6"></td>
                        <td width="8%" bgcolor="#EEEEEE">学历要求</td>
                        <td width="42%" bgcolor="#EEEEEE"><select name="job_grad" class="addlist" id="job_grad">
                            <option value="no">请选择学历要求</option>
                            <%=job_grada%> </select></td>
                      </tr>
                      <tr class="text-login"> 
                        <td width="8%" bgcolor="#FFFFFF">网址</td>
                        <td width="42%" bgcolor="#FFFFFF"><input name="cop_www" type="text" class="addinput" id="cop_www"></td>
                        <td width="8%" bgcolor="#FFFFFF">语言要求</td>
                        <td width="42%" bgcolor="#FFFFFF"><select name="job_lang" class="addlist" id="job_lang">
                            <option value="no">请选择语言要求</option>
                            <%=job_langa%> </select></td>
                      </tr>
                      <tr class="text-login"> 
                        <td width="8%" rowspan="3" valign="top" bgcolor="#FFFFFF">公司简介</td>
                        <td width="42%" rowspan="3" valign="top" bgcolor="#EEEEEE"><textarea name="cop_desc" class="addtextarea" id="cop_desc"></textarea></td>
                        <td bgcolor="#EEEEEE">工作经验</td>
                        <td bgcolor="#EEEEEE"><select name="job_expe" class="addlist" id="job_expe">
                            <option value="no">请选择工作经验要求</option>
                            <%=job_expea%> </select></td>
                      </tr>
                      <tr bgcolor="#FFFFFF" class="text-login"> 
                        <td width="8%">其它待遇</td>
                        <td width="42%"><input name="job_oget" type="text" class="addinput" id="job_oget"></td>
                      </tr>
                      <tr bgcolor="#FFFFFF" class="text-login"> 
                        <td width="8%" valign="top" bgcolor="#EEEEEE">其它要求</td>
                        <td width="42%" valign="top" bgcolor="#EEEEEE"><textarea name="job_odem" class="addtextarea" id="job_odem"></textarea></td>
                      </tr>
                    </table></td>
                </tr>
              </table>
              <table width="99%" border="0" cellspacing="1" cellpadding="2">
                <tr> 
                  <td height="40" align="right"><input name="Submit" type="submit" class="logbutton" value="Submit"> 
                    &nbsp;</td>
                </tr>
              </table>
            </form></td>
        </tr>
      </table>
      <!-- 新版表格 -->
    </td>
  </tr>
  <tr> 
    <td height="35" background="ima/bottom_bg.gif"><table width="110" height="35" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td><img src="ima/bottom.gif" width="110" height="35"></td>
        </tr>
      </table></td>
</table>
<!-- 新版表格结束 -->
</body>
</html>
<%
		}
		else if(action.equals("add"))
		{
		    //添加
				String cop_name = request.getParameter("cop_name"); 
				if(cop_name == null || cop_name.equals("")) 
					cop_name = "无";
				else
					cop_name = new String(cop_name.getBytes("ISO8859_1"));
				String cop_mann = request.getParameter("cop_mann");
				if(cop_mann == null || cop_mann.equals("") ||cop_mann.equals("no")) 
					cop_mann = "0";
				else
					cop_mann = new String(cop_mann.getBytes("ISO8859_1"));
				String cop_cont = request.getParameter("cop_cont");
				if(cop_cont == null || cop_cont.equals("")) 
					cop_cont = "无";
				else
					cop_cont = new String(cop_cont.getBytes("ISO8859_1"));
				String cop_tel  = request.getParameter("cop_tel");
				if(cop_tel == null || cop_tel.equals("")) 
					cop_tel = "无";
				else
					cop_tel = new String(cop_tel.getBytes("ISO8859_1"));
				String cop_mail = request.getParameter("cop_mail"); 
				if(cop_mail == null || cop_mail.equals(""))
					cop_mail = "无";
				else
					cop_mail = new String(cop_mail.getBytes("ISO8859_1"));
				String cop_fax  = request.getParameter("cop_fax");  
				if(cop_fax == null || cop_fax.equals("")) 
					cop_fax = "无";
				else
					cop_fax = new String(cop_fax.getBytes("ISO8859_1"));
				String cop_addr = request.getParameter("cop_addr"); 
				if(cop_addr == null || cop_addr.equals("")) 
					cop_addr = "无";
				else
					cop_addr = new String(cop_addr.getBytes("ISO8859_1"));
				String cop_zip  = request.getParameter("cop_zip");  
				if(cop_zip == null || cop_zip.equals("")) 
					cop_zip = "无";
				else
					cop_zip = new String(cop_zip.getBytes("ISO8859_1"));
				String cop_www  = request.getParameter("cop_www");  
				if(cop_www == null || cop_www.equals("")) 
					cop_www = "无";
				else
					cop_www = new String(cop_www.getBytes("ISO8859_1"));
				String cop_desc = job.HtmlSpecialChars(request.getParameter("cop_desc")); 
				if(cop_desc == null || cop_desc.equals(""))
					cop_desc = "无";
				else
					cop_desc = new String(cop_desc.getBytes("ISO8859_1"));
				
				String job_name = request.getParameter("job_name"); 

⌨️ 快捷键说明

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