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

📄 uploadphoto.asp

📁 嘉缘人才6.0精简 ,很好用的人才系统
💻 ASP
字号:
<%ds="../"%>
<!--#include file="../conn/conn.asp" -->
<!--#include file="../inc/sub.asp"-->
<%
link="uploadphoto.asp"
%>
<!--#include file="checkpmember.asp" -->
<%
step=trim(request("step"))
if step<>"" then
picture_id=clng(trim(request("id")))
select case step
 case "hidden"
  conn.execute("update job_p_picture set picture_status=0 where picture_id="&picture_id&"")
 case "show"
  conn.execute("update job_p_picture set picture_status=1 where picture_id="&picture_id&"")
 case "del"

  Set rs= Server.CreateObject("ADODB.RecordSet")
  sql="select picture_filename from job_p_picture where picture_id="&picture_id&""
  rs.open sql,conn,1,1
   prepicture=rs("picture_filename")
  rs.close
  set rs=nothing
  if prepicture<>"" and not isnull(prepicture) then      '原来有图片
  set fileobject=server.createobject("scripting.filesystemobject")
  path=Server.MapPath("..\upimages\perpic") & "\" & prepicture
  response.Write(path)
  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_id="&picture_id)
end select
conn.close
set conn=nothing
response.redirect "uploadphoto.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;
  } } }
}
//-->
</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="500" 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><TABLE cellSpacing=0 cellPadding=6 width="98%" align=center border=0>
          <TBODY>
            <TR>
              <TD height=40 bgcolor="#efefef" style="line-height:140%">&nbsp;&nbsp;所传照片一律为<FONT 
                        face=Verdana><B>JPG</B></FONT>、<FONT 
                        face=Verdana><B>JPEG</B></FONT>、或<FONT 
                        face=Verdana><B>GIF</B></FONT>格式。如果您没有扫描仪,可以将照片邮寄给我们,我们免费为您服务。 </TD>
            </TR>
            <TR>
              <TD bgcolor="#f9f9f9">
                <%
							   Set rs= Server.CreateObject("ADODB.RecordSet")
                               sql="select * from job_p_picture where picture_pmember='"&pmember_login&"' and picture_type=1"
                               rs.open sql,conn,1,1
							  %>
                <TABLE cellSpacing=0 cellPadding=5 width="98%" border=0>
                  <TBODY>
                    <TR>
                      <TD align=middle>
                        <%
									if not rs.eof then
									 if rs("picture_status")=1 then
									  response.write "<INPUT type='button' value='屏蔽' name='btnhidden' onClick=""window.location='uploadphoto.asp?step=hidden&id="&rs("picture_id")&"'"">"
									 else
									  response.write "<INPUT type='button' value='显示' name='btnShow' onClick=""window.location='uploadphoto.asp?step=show&id="&rs("picture_id")&"'"">"
									 end if
									 response.write "&nbsp;&nbsp;&nbsp;&nbsp;<INPUT type='button' value='删除' name='btnDel' onClick=""window.location='uploadphoto.asp?step=del&id="&rs("picture_id")&"'"">"
									end if
									%>
                      </TD>
                    </TR>
                    <TR>
                      <TD align=middle>
                        <TABLE cellSpacing=0 cellPadding=0 width=110 border=0>
                          <TBODY>
                            <TR>
                              <TD align=middle>
                                <%
											  if not rs.eof then
											    if rs("picture_status")=0 then 
											  %>
                                <DIV id=screen style="Z-INDEX: 1; WIDTH: 111px; POSITION: absolute; HEIGHT: 15px; left: 541px; top: 320px;"><BR>
                                    <BR>
                                    <BR>
                                    <BR>
                                    <TABLE height=20 cellSpacing=0 cellPadding=0 width="100%" border=0>
                                      <TBODY>
                                        <TR>
                                          <TD vAlign=center align=middle bgColor=#EFEFEF> <STRONG>屏&nbsp;蔽</STRONG> </TD>
                                        </TR>
                                      </TBODY>
                                    </TABLE>
                                </DIV>
                                <%
											   end if
											  end if
											  if not rs.eof then
											  %>
                                <A href="../upimages/perpic/<%=rs("picture_filename")%>" target=_blank><IMG height=140 src="../upimages/perpic/<%=rs("picture_filename")%>" width=110 border=0 style="BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #666666 1px solid"></a>
                                <%else%>
                                <IMG height=140 src="../upimages/perpic/nophoto.gif" width=110 border=0 style="BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #666666 1px solid">
                                <%
											  end if
											  rs.close
											  set rs=nothing
											  conn.close
											  set conn=nothing
											  %>
                              </TD>
                            </TR>
                          </TBODY>
                      </TABLE></TD>
                    </TR>
                  </TBODY>
              </TABLE></TD>
            </TR>
            <TR>
              <form action="photosave.asp" method="post" enctype="multipart/form-data" name="form1" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG');return document.MM_returnValue">
                <TD height=28 bgcolor="#efefef"><STRONG><font color="#FF3300">请选择上传照片:</font></STRONG>
                    <input name="attachment" type="file" id="attachment">
                    <input type=submit name="b122" value="上传照片">
                </TD>
              </form>
            </TR>
            <TR>
              <TD bgcolor="#f9f9f9"><FONT 
                        color=#333333>(您可以在上面预览您的照片;如果照片显示超出区域,说明照片太大。)</FONT></TD>
            </TR>
            <TR>
              <TD bgcolor="#efefef">&nbsp;</TD>
            </TR>
            <TR>
              <TD bgcolor="#f9f9f9" style="line-height:140%"><FONT 
                        color=#0000ff>如何使您的照片显示达到最佳效果?</FONT><BR>
        1、将照片尺寸设置为<STRONG>110(宽)*140(高)</STRONG>像素。(图片标准尺寸)<BR>
        2、<FONT 
                        color=#333333>图片大小不能超过</FONT><STRONG>100</STRONG><FONT 
                        color=#333333>K</FONT>。<BR>
        3、图片区域应清晰显示您的头像或半身/全身相。(请勿使用艺术照)</TD>
            </TR>
          </TBODY>
        </TABLE></td>
  </tr>
</table>
<!--#include file="../inc/bottom.asp"-->
</body>


⌨️ 快捷键说明

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