?? company.jsp
字號:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page language="java" %>
<%@ page import="java.sql.*,qiuzhi.*" %>
<jsp:useBean id="db" class="qiuzhi.connectDB"/>
<jsp:useBean id="data" class="qiuzhi.personaljobdata"/>
<jsp:useBean id="job" class="qiuzhi.personaljob"/>
<%
String action = request.getParameter("action");
if(action == null || action.length() == 0)
{
ResultSet res = db.getCopInfo((String)session.getAttribute("user_id"));
if(res == null)
{
%>
<script language="javascript">
alert("綁定公司!");
</script>
<%
}
else
{
if(res.next())
{
String cop_name = res.getString("cop_name");
String cop_mann = null;
for(int i = 0;i<data.cop_mann.length;i++)
{
if(i == res.getInt("cop_mann"))
cop_mann += "<option value=\""+i+"\" selected>"+data.cop_mann[i]+"</option>\n";
else
cop_mann += "<option value=\""+i+"\">"+data.cop_mann[i]+"</option>\n";
}
//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");
cop_desc += "\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">
<form action="company.jsp?action=update&id=<%=res.getInt("id")%>" method="post">
<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> </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">
<input type="text" class="addinput" name="cop_name" value="<%=cop_name%>"></td>
</tr>
<tr bgcolor="#EEEEEE" class="text-login">
<td width="60" height="20">公司性質</td>
<td width="290" height="20">
<select name="cop_mann" class="addlist"><%=cop_mann%></select></td>
</tr>
<tr class="text-login">
<td width="60" height="20">聯系電話</td>
<td width="290" height="20">
<input type="text" class="addinput" name="cop_tel" value="<%=cop_tel%>"></td>
</tr>
<tr bgcolor="#EEEEEE" class="text-login">
<td width="60" height="20">E-mail</td>
<td width="290" height="20">
<input type="text" class="addinput" name="cop_mail" value="<%=cop_mail%>"></td>
</tr>
<tr class="text-login">
<td width="60" height="20">傳真</td>
<td width="290" height="20">
<input type="text" class="addinput" name="cop_fax" value="<%=cop_fax%>"></td>
</tr>
<tr bgcolor="#EEEEEE" class="text-login">
<td width="60" height="20">地址</td>
<td width="290" height="20">
<input type="text" class="addinput" name="cop_addr" value="<%=cop_addr%>"></td>
</tr>
<tr class="text-login">
<td width="60" height="20">郵編</td>
<td width="290" height="20">
<input type="text" class="addinput" name="cop_zip" value="<%=cop_zip%>"></td>
</tr>
<tr bgcolor="#EEEEEE" class="text-login">
<td width="60" height="20">網址</td>
<td width="290" height="20">
<input type="text" class="addinput" name="cop_www" value="<%=cop_www%>"></td>
</tr>
<tr class="text-login">
<td width="60" height="110" valign="top">公司簡介</td>
<td width="290" height="110" valign="top">
<textarea name="cop_desc"><%=cop_desc%></textarea></td>
</tr>
</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"> </td>
<td align="right" valign="middle">
<input name="Button" type="submit" class="logbutton" value="更新">
<input name="Button" type="button" class="logbutton" value="關閉" onClick="window.close();"> </td>
</tr>
</table>
</form>
</body>
</html>
<%
}
else
{
out.print("haha");
}
}
}
else
{
if("update".equals(action))
{
String id = request.getParameter("id");
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_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"));
copTable ct = new copTable();
ct.setId(id);
ct.setCopname(cop_name);
ct.setCopmann(cop_mann);
ct.setCoptel(cop_tel);
ct.setCoptex(cop_fax);
ct.setCopmail(cop_mail);
ct.setCopaddr(cop_addr);
ct.setCopzip(cop_zip);
ct.setCopwww(cop_www);
ct.setCopdesc(cop_desc);
int re = db.editCop(ct);
if(re == 1)
{
%>
<script language="javascript">
alert("成功!");
self.location.href="company.jsp";
</script>
<%
}
else
{
%>
<script language="javascript">
alert("錯誤!");
window.close();
opener.location.reload();
</script>
<%
}
}
if("insert".equals(action))
{
}
}
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -