📄 person_certificate.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/Commoncode.asp"-->
<!--#include file="../inc/CommonFunction.asp"-->
<%link="person_certificate.asp"%>
<!--#include file="checkpmember.asp" -->
<%
sUploadDir=UpFilesPath("Person")
step=trim(request("step"))
if step<>"" then
picture_certiid=trim(request("certi"))
if picture_certiid <>"" then
mystring=split(picture_certiid,",")
select case step
case "show"
conn.execute("update job_p_picture set picture_status=0 where picture_pmember='"&pmember_login&"' and picture_type=2")
for i=0 to ubound(mystring)
certiid=trim(mystring(i))
conn.execute("update job_p_picture set picture_status=1 where picture_pmember='"&pmember_login&"' and picture_type=2 and picture_certiid="&certiid&"")
next
case "del"
Set rs= Server.CreateObject("ADODB.RecordSet")
for i=0 to ubound(mystring)
certiid=trim(mystring(i))
sql="select picture_filename from job_p_picture where picture_pmember='"&pmember_login&"' and picture_type=2 and picture_certiid="&certiid&""
rs.open sql,conn,1,1
prepicture=rs("picture_filename")
rs.close
if prepicture<>"" and not isnull(prepicture) then '原来有图片
set fileobject=server.createobject("scripting.filesystemobject")
path=Server.MapPath(sUploadDir&prepicture)
if fileobject.fileexists(path) then
set afile=fileobject.getfile(path)
afile.delete
end if
end if
conn.execute("delete from job_p_picture where picture_pmember='"&pmember_login&"' and picture_type=2 and picture_certiid="&certiid&"")
next
set rs=nothing
end select
end if
conn.close
set conn=nothing
response.redirect "person_certificate.asp"
response.end
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>简历列表--<%=SiteTitle%></title>
<link href="../css/<%=MainWebCss%>.css" rel="stylesheet" type="text/css" />
<script language="JavaScript">
<!--
function getFileExtension(filePath) { //v1.0
fileName = ((filePath.indexOf('/') > -1) ? filePath.substring(filePath.lastIndexOf('/')+1,filePath.length) : filePath.substring(filePath.lastIndexOf('\\')+1,filePath.length));
return fileName.substring(fileName.lastIndexOf('.')+1,fileName.length);
}
function checkFileUpload(form,extensions) { //v1.0
document.MM_returnValue = true;
if (extensions && extensions != '') {
for (var i = 0; i<form.elements.length; i++) {
field = form.elements[i];
if (field.type.toUpperCase() != 'FILE') continue;
if (field.value == '') {
alert('文件框中必须保证已经有文件被选中!');
document.MM_returnValue = false;field.focus();break;
}
if (extensions.toUpperCase().indexOf(getFileExtension(field.value).toUpperCase()) == -1) {
alert('这种文件类型不允许上传!.\n只有以下类型的文件才被允许上传: ' + extensions + '.\n请选择别的文件并重新上传.');
document.MM_returnValue = false;field.focus();break;
} } }
}
function Juge(theForm)
{
var flag=false; //是否有选择证书
var k=0;
var refid;
for(i=0;i<theForm.elements.length;i++)
{
if (theForm.elements[i].name=="certi")
{
if (theForm.elements[i].checked==true)
{
flag=true;
break;
}
}
}
if (flag==false)
{
alert("请至少选择一项!");
return false;
}
}
//-->
</script></head>
<body>
<center>
<div id="head">
<div id="logo"><img src="<%=SiteUrl&InstallDir&LogoUrl%>" alt="欢迎访问<%=SiteName%>" /></div>
<div id="banner"><%Call Loginshow()%></div>
<ul><%Call Membernav(1)%></ul>
</div>
<%Call Pmembermenu(2)%>
<div class="maintaba">
<span class="maintit">相关证书</span>
<ul><li><span style="MARGIN-LEFT: 5px; LINE-HEIGHT: 18px"><strong>选择需要上传的证书图片:</strong><br />
<font color="#333333">(上传证书格式一律为JPG、JPEG或GIF格式,图片大小不能超过</font><strong>100</strong><font color="#333333">K;证件类型包括:学历证书、学位证书、相关技能等级证书……,最多上传四个证书;如果需要更新证书,请再上传一次。)</font></span></li>
<li><form action="certificatesave.asp?certiid=1" method="post" enctype="multipart/form-data" name="form1" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG');return document.MM_returnValue">
证书一:
<INPUT style="FONT-SIZE: 12px; FONT-FAMILY: 宋体" type="file" name="attachment">
<INPUT style="FONT-SIZE: 12px; FONT-FAMILY: 宋体" type=submit value=" 上 传 " name=Send1>
</form>
<form action="certificatesave.asp?certiid=2" method="post" enctype="multipart/form-data" name="form2" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG');return document.MM_returnValue">
证书二:
<INPUT name="attachment" type="file" id="attachment" style="FONT-SIZE: 12px; FONT-FAMILY: 宋体">
<INPUT style="FONT-SIZE: 12px; FONT-FAMILY: 宋体" type=submit value=" 上 传 " name=Send2>
</form>
<form action="certificatesave.asp?certiid=3" method="post" enctype="multipart/form-data" name="form3" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG');return document.MM_returnValue">
证书三:
<INPUT name="attachment" type="file" id="attachment" style="FONT-SIZE: 12px; FONT-FAMILY: 宋体">
<INPUT style="FONT-SIZE: 12px; FONT-FAMILY: 宋体" type=submit value=" 上 传 " name=Send3>
</form>
<form action="certificatesave.asp?certiid=4" method="post" enctype="multipart/form-data" name="form4" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG');return document.MM_returnValue">
证书四:
<INPUT name="attachment" type="file" id="attachment" style="FONT-SIZE: 12px; FONT-FAMILY: 宋体">
<INPUT style="FONT-SIZE: 12px; FONT-FAMILY: 宋体" type=submit value=" 上 传 " name=Send4>
</form></li>
<li><strong>给简历配置相关证书:</strong></li>
<li><form name="certiform" action="person_certificate.asp" method="post" onSubmit="return Juge(this)">
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#111111 cellSpacing=0 cellPadding=6 width="95%" border=0>
<TBODY>
<TR>
<%
Set rs= Server.CreateObject("ADODB.RecordSet")
for i=1 to 4
sql="select * from job_p_picture where picture_pmember='"&pmember_login&"' and picture_type=2 and picture_certiid="&i&""
rs.open sql,conn,1,1
response.write "<TD align='middle' width='50%'>"
if not rs.eof then
response.write "<A href='"&sUploadDir&rs("picture_filename")&"' target=_blank><IMG height=120 src='"&sUploadDir&rs("picture_filename")&"' width=200 border=0></A>"
else
response.write "<IMG height=120 src='../images/nocerti.gif' width=200 border=0>"
end if
response.write "<br><INPUT name='certi' type='checkbox' id='certi' value='"&i&"'"
if not rs.eof then
if rs("picture_status")=1 then
response.write " checked"
end if
end if
if rs.eof then
response.write " disabled"
end if
response.write "> 证书"
select case i
case 1
response.write "一"
case 2
response.write "二"
case 3
response.write "三"
case 4
response.write "四"
end select
response.write "</TD>"
if i mod 2=0 then
response.write "</TR><TR>"
end if
rs.close
next
set rs=nothing
%>
</TBODY>
</TABLE>
<br>
<br>
<div align="center">
<input type="hidden" name="step">
<INPUT name=configure type=submit class="inputa2" OnClick="document.certiform.step.value='show'" value="附加至我的简历">
<INPUT name=deletecer type=submit class="inputa3" OnClick="document.certiform.step.value='del'" value="删 除"> </div>
</form></li>
</ul>
</div>
<%call bottom()
conn.close:set conn=nothing%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -