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

📄 uploadcertificate.asp

📁 嘉缘人才6.0精简 ,很好用的人才系统
💻 ASP
字号:
<%ds="../"%>
<!--#include file="../conn/conn.asp" -->
<!--#include file="../inc/sub.asp"-->
<%
link="uploadcertificate.asp"
%>
<!--#include file="checkpmember.asp" -->
<%
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("..\upimages\perpic") & "\" & 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 "uploadcertificate.asp"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>上传证书-个人求职管理中心-<%=SiteName%></title>
<LINK href="../css/css.css" rel=stylesheet>
<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>
<!--#include file="../inc/head.asp"-->
<br class="br">
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" class="table2">
  <tr>
    <td width="200" height="299" rowspan="4" valign="top"><!--#include file="menu.asp" --></td>
  </tr>
  <tr>
    <td width="639" height="35" background="../images/companyleftregbg.gif">&nbsp;<font class=font-14><b><img src="../images/arrow_01.gif" width="11" height="11" align="absmiddle"> </b></font><font class=font-14><b>姓名:</b></font><font 
            class=font-title color="#FF6600"><%=session("user_pname")%></FONT></td>
    <td width="122" background="../images/companyleftregbg.gif"><font 
            class=font-title color="#FF6600"><A 
            style="CURSOR: hand" 
            href="logout.asp"><IMG src="../images/exit.gif" width=79 
            height=19 border="0"></A></font></td>
  </tr>
  <tr>
    <td height="223" colspan="2" valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="orange-bar">
        <tr>
          <td width="2%" align="right">&nbsp;</td>
          <td width="97%" class="white14">  相关证书</td>
          <td width="1%">&nbsp;</td>
        </tr>
      </table>
        <br class="br">
        <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=6 width="98%" align=center border=0>
          <TBODY>
            <TR>
              <TD width= height=134 bgcolor="#f9f9f9">
                <P 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> <BR>
                <form action="certificatesave.asp?certiid=1" method="post" enctype="multipart/form-data" name="form1" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG');return document.MM_returnValue">
&nbsp;证书一:
          <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">
&nbsp;证书二:
          <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">
&nbsp;证书三:
          <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">
&nbsp;证书四:
          <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>
                <P style="MARGIN-LEFT: 5px; LINE-HEIGHT: 18px"><STRONG>给简历配置相关证书:</STRONG>
                <form name="certiform" action="uploadcertificate.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='../upimages/perpic/"&rs("picture_filename")&"' target=_blank><IMG height=120 src='../upimages/perpic/"&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
									conn.close
									set conn=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="附加至我的简历">
&nbsp;
            <INPUT name=deletecer type=submit class="inputa3" OnClick="document.certiform.step.value='del'" value="删 除"> </div>
              </form></TD>
            </TR>
          </TBODY>
        </TABLE></td>
  </tr>
</table>
<!--#include file="../inc/bottom.asp"-->
</body>


⌨️ 快捷键说明

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