📄 com_workedit.asp
字号:
<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<!--#include file="../Public/Company_Cookies.asp" -->
<%
Dim Comid,Username,Tmp
Dim Cmd,Rs,Action
Dim PhoneKeep,EmailKeep,PublishCount,Publish_Flag,EndDate
Action = Request.QueryString("action")
If Action = "submit" Then Call Submit() '//调用保存数据的函数
'//获取会员登陆的标记
Username = Session("Company")(0)
Comid = Session("Company")(2)
'//调用存储过程
Set Cmd = Server.CreateObject("ADODB.Command")
Cmd.ActiveConnection = Conn
Cmd.CommandText = "Com_Dept"
Cmd.CommandType = 4
Cmd.Parameters.Append Cmd.CreateParameter("@Comid",200,1,30)
Cmd.Parameters("@Comid") = Comid
Set Rs = Cmd.Execute
If Rs.Eof Then
Rs.Close
Set Cmd = Nothing
CloseDB
Response.write "没有找到会员资料!"
Response.End()
End if
''Tmp = Rs.GetRows() '//将数据填充到数组
'//0企业名称
'//如 Tmp(0,0) 表示企业名称
'//关闭数据库对象
CompanyName = Rs(0)
Rs.Close
Id = SafeRequest("Id")
Set Rs = Conn.Execute("Select Title,AdBody,WorkType,Users,EndValids,Province,City From [PH_WorkInfo] Where UserType='Com' And Userid='"&Comid&"' And Id="&Cstr(Id))
If Rs.eof Then
Rs.Close
CloseDB
Response.write "没有找到信息!"
Response.End()
End if
Tmp = Rs.GetRows()
Rs.Close
AdBody = Tmp(1,0)
If AdBody<>"" Then AdBody = Replace(AdBody,"<br>",Chr(13))
Set Cmd = Nothing
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<SCRIPT language=JavaScript src="../js/funlib.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/ua.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/ftiens4.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/persontreeviewnodes.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/areacityselector.js"></SCRIPT>
<SCRIPT language=JavaScript src="../js/joball.js"></SCRIPT>
<script language="JavaScript">
function check(){
if (document.theForm.title.value==""){
alert("-劳务供求信息标题必须输入!-");
document.theForm.title.focus();
return false;
}
if (document.theForm.users.value==""){
alert("-人数必须输入,人数不限请输入数字0!-");
document.theForm.users.focus();
return false;
}
if (document.theForm.users.value.match(/\D/)){
alert("-人数必须是合法数字!-");
document.theForm.users.focus();
return false;
}
if (document.theForm.slt_selectedplaces.options.length<1){
alert("-请选择工作地点!-");
document.theForm.slt_selectedplaces.focus();
return false;
}
if (document.theForm.Adcontent.value==""){
alert("-具体内容必须输入!-");
document.theForm.Adcontent.focus();
return false;
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../Css/Style.css" type=text/css rel=stylesheet>
<title><%= Cls_WebName %> -- 企业会员管理中心 -- 发布劳务信息</title>
</head>
<body>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td>
<!--#include file="../Include/Header.asp" -->
</td>
</tr>
</table>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td><table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="4"></td>
</tr>
<tr>
<td height="1" bgcolor="#eeeeee"></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="175" valign="top">
<!--#include file="../Public/Company_Left.asp" -->
</td>
<td width="5"> </td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"><img src="../Images/icon.gif" width="11" height="11" align="absmiddle">
<%= CompanyName %> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form action="?action=submit" name="theForm" method="post" onSubmit="return check();">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
<tr>
<td bgcolor="#FFFFFF"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="2"></td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
<tr>
<td height="25" bgcolor="f5f5f5"><b><font color="#000000"> 劳务信息</font></b></td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="18%" height="25" align="right"><STRONG><FONT
color=#ff6600>*</FONT></STRONG> 信息类型:</td>
<td height="25">
<input name="worktype" type="radio" value="0" <% If Tmp(2,0) = 0 Then Response.write "Checked" %>>
劳务需求
<input type="radio" name="worktype" value="1" <% If Tmp(2,0) = 1 Then Response.write "Checked" %>>
劳务输出 </td>
</tr>
<tr>
<td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT
color=#ff6600>*</FONT></STRONG>信息标题:</td>
<td height="25" bgcolor="f9f9f9"><input name="title" type="text" id="title" maxlength="40" style="width:180px" value="<%= Tmp(0,0) %>"></td>
</tr>
<tr>
<td height="25" align="right"><STRONG><FONT
color=#ff6600>*</FONT></STRONG> 人 数:</td>
<td height="25"><input name="users" type="text" id="users" style="width:100px" value="<%= Tmp(3,0) %>" maxlength="4">
人 ( 默认为0,表示若干人 )</td>
</tr>
<tr>
<td height="25" align="right"><STRONG><FONT
color=#ff6600>*</FONT></STRONG> 有效期限:</td>
<td height="25"><SELECT name="endvalids" size=1 id="endvalids" >
<option value="0" <% If Tmp(4,0) = 0 Then Response.write "Selected" %>>长期有效
<OPTION value="1" <% If Tmp(4,0) = 1 Then Response.write "Selected" %>>一星期
<option value="2" <% If Tmp(4,0) = 2 Then Response.write "Selected" %>>半个月
<OPTION value="3" <% If Tmp(4,0) = 3 Then Response.write "Selected" %>>一个月
<OPTION value="4" <% If Tmp(4,0) = 4 Then Response.write "Selected" %>>三个月
<OPTION value="5" <% If Tmp(4,0) = 5 Then Response.write "Selected" %>>半年
<option value="6" <% If Tmp(4,0) = 6 Then Response.write "Selected" %>>一年 </SELECT></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT
color=#ff6600>*</FONT></STRONG> 工作地区:</td>
<td height="25" bgcolor="f9f9f9">先选择上排的省区,再在下排选择相应的城市,然后按添加<br>
如果想要删出选好的工作地点,请先选中该项,然后按移除</td>
</tr>
<tr>
<td height="25" align="right"> </td>
<td height="25"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25%"><FONT
color=#333333>选择工作地点</FONT></td>
<td width="15%"> </td>
<td><FONT
color=#333333>已经选择的工作地点</FONT></td>
</tr>
<tr>
<td><select style="width:110px" name=slt_workplacearea>
</select> <select name=slt_workplacecity size="1" style="width:110px">
</select></td>
<td><table width="98%" border="0" cellspacing="0" class="text01">
<tr>
<td height="25" align="center"><input type="button" name="Submit22" value="添加>>" onclick="AddItemToList('slt_workplacearea','slt_workplacecity','slt_selectedplaces',1, 2, '-')"></td>
</tr>
<tr>
<td height="25" align="center"><input type="button" name="Submit32" value="<<移除" onclick="DeleteListSelectedItem('slt_selectedplaces', 0)"></td>
</tr>
</table></td>
<td>
<SELECT name=slt_selectedplaces size=3 multiple id=select8 style="width:120px">
<option value="<%= Tmp(5,0)&"-"&Tmp(6,0) %>" selected><%= Tmp(5,0)&Tmp(6,0) %></option>
</SELECT></td>
</tr>
</table></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="f9f9f9"><STRONG><FONT
color=#ff6600>*</FONT></STRONG> 具体内容:</td>
<td height="25" bgcolor="f9f9f9">简单阐述职位具体要求/待遇 ;</td>
</tr>
<tr>
<td height="25" align="right"> </td>
<td height="25"><textarea name="adbody" cols="50" rows="6" id="adbody" ><%= AdBody %></textarea></td>
</tr>
</table>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="2"></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="40" align="center"><SCRIPT language=JavaScript>
var objJobCPSelector, objJobCCSelector, objAreaSelector, objCitySelector
objAreaSelector = new PlaceAssociateList(document.theForm.slt_workplacearea, null, document.theForm.slt_workplacecity, ALOptions);
objAreaSelector.init();
objCitySelector = new PlaceAssociateList(document.theForm.slt_workplacecity, document.theForm.slt_workplacearea, null, CLOptions);
objCitySelector.incPValue = true;
objCitySelector.incPValueFormat = "%PText%-不限"
objCitySelector.init();
</SCRIPT>
<input type="submit" name="Submit" value=" 保 存 " style="height:35px;">
<input name="id" type="hidden" id="id" value="<%= Id %>">
</td>
</tr>
</form>
</table></td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="1" bgcolor="#eeeeee"></td>
</tr>
</table>
<!--#include file="../Include/Footer.asp" -->
</td>
</tr>
</table>
</body>
</html>
<%
Sub Submit() '保存企业基本数据
Check_Url() '//跨站提交数据检测
Comid = Session("Company")(2)
i_Flag = Session("Nc_Vip")
'//开始接受提交的数据
Id = SafeRequest("Id")
Title = SafeRequest("title")
AdBody = SafeRequest("Adbody")
If AdBody<>"" Then AdBody = Replace(AdBody,Chr(13),"<br>")
WorkType = SafeRequest("worktype")
Users = SafeRequest("users")
EndValids = SafeRequest("endvalids")
Places = Split(Replace_text(Request.Form("slt_selectedplaces")),"-")
Province = Places(0)
City = Places(1)
SQL = "Update [PH_WorkInfo] Set Title='"&Title&"',AdBody='"&AdBody&"',WorkType="&WorkType&",Users="&Users&",EndValids="&EndValids&",Province='"&Province&"',City='"&City&"' Where Userid='"&Comid&"' And Id="&Cstr(Id)
Conn.Execute(SQL)
CloseDB
Response.write "<script>alert('-编辑完成!-');location.href='Com_WorkManage.asp';</script>"
Response.End()
'//关闭数据库连接
CloseDB
End Sub
'//关闭数据库连接
CloseDB
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -