<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/Commoncode.asp"-->
<!--#include file="../inc/CommonFunction.asp"-->
<%link="person_photo.asp"%>
<!--#include file="checkpmember.asp" -->
<%
sUploadDir=UpFilesPath("Person")
step=trim(request("step"))
if step<>"" then
select case step
 case "hidden"
  conn.execute("update job_member set Member_logostatus=0 where Member_login='"&pmember_login&"' and Member_typeid=1")
 case "show"
  conn.execute("update job_member set Member_logostatus=1 where Member_login='"&pmember_login&"' and Member_typeid=1")
 case "del"
  Set rs= Server.CreateObject("ADODB.RecordSet")
  sql="select Member_logo from job_member where Member_login='"&pmember_login&"' and Member_typeid=1"
  rs.open sql,conn,1,1
   prepicture=rs("Member_logo")
  rs.close
  set rs=nothing
  if prepicture<>"" and not isnull(prepicture) and prepicture<>"nophoto.gif" and prepicture<>"error.gif" 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("update job_member set Member_logo=null where Member_login='"&pmember_login&"' and Member_typeid=1")
end select
conn.close
set conn=nothing
response.redirect "person_photo.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="../member/css.css" rel="stylesheet" type="text/css" />
<script src="../js/main.js" language="javascript"></script>
<script type="text/javascript" src="../js/input.js"></script>
<SCRIPT language=javascript type=text/javascript>
var img=null;
var ff;
function chkimg(inp){
	if(img)img.removeNode(true); 
	img=document.createElement("img");
	img.attachEvent("onreadystatechange",isimg);
	img.attachEvent("onerror",notimg);
	img.src=inp;}
function isimg(){
	ff=img.src;
	window.catphoto1.huoqu(ff);}
function notimg(){
	alert("温馨提示：\n\n您选择的不是图片，请重新选择！");}
function CheckImg(){

    if (document.all.catphoto2.contentWindow.document.getElementById('show_img2').src.indexOf("/bg.gif")>0)
    {
        alert("温馨提示：\n\n请先剪切图片！");
        return false;    
    }
    
}
</SCRIPT>
<script language="JavaScript">
<!--
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 unSearchLayer(){
  document.all.bodyly.style.display='none';
  document.getElementById("SearchDiv").style.display='none';
  } 
function JumpSearchLayer(){
document.all.bodyly.style.display="block";   
document.all.bodyly.style.width=document.body.clientWidth;   
document.all.bodyly.style.height=document.body.clientHeight;   
document.getElementById("SearchDiv").style.display='block';
document.all.SearchDiv.style.top=document.documentElement.scrollTop+40;   
document.all.SearchDiv.style.left=document.body.clientWidth/2-200;
} 
//-->
</script></head>
<body>
<div id="bodyly" style="position:absolute;top:0px;FILTER: alpha(opacity=80);background-color:#333; z-index:0;left:0px;display:none;"></div>
<div id="SearchDiv" style="position:absolute;background-color:#fff; z-index:9999;display:none; width:400px;">
<div onmousedown=MDown(SearchDiv) title="可以随意拖动" style="cursor:move;" class="memmenul">
<div class="leftmenutit"><span>在线拍照V1.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="cursor:pointer; color:#FFFFFF" onclick="unSearchLayer()">关 闭</a></span></div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="386" height="296">
      <param name="movie" value="../plus/photo/photo.swf?surl=<%=InstallDir%>plus/photo/uploadphoto.asp" />
      <param name="quality" value="high" />
      <embed src="../plus/photo/photo.swf?surl=<%=InstallDir%>plus/photo/uploadphoto.asp" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="386" height="296"></embed>
    </object>
</div>
</div>
<div class="memmenul">
<div class="leftmenutit"><span>照片上传</span></div>
<table width="98%" border="0" align="center" cellpadding="4" cellspacing="0">
  <tr>
    <td height="21" colspan="2"><span class="tdcolor">所传照片一律为JPG、JPEG、BMP、PNG或GIF格式。如果您没有扫描仪，可以将照片邮寄给我们，我们免费为您服务。</span></td>
    </tr>
  <tr>
    <td height="156" colspan="2" align="center">
      <table width="98%" border="0" align="center" cellpadding="4" cellspacing="0">
        <tr>
          <td width="30%"><%
Set rs= Server.CreateObject("ADODB.RecordSet")
sql="select * from job_member where Member_login='"&pmember_login&"' and Member_logo is not null and Member_typeid=1"
rs.open sql,conn,1,1
if not rs.eof then
%>
  <A href="<%=sUploadDir&rs("Member_logo")%>" target=_blank><IMG height=120 src="<%=sUploadDir&rs("Member_logo")%>" width=100 border=0 style="BORDER: #000000 1px solid;"></a><br /><%if rs("Member_logostatus")=0 then %>照片已屏蔽<%end if%><br />
      <%if rs("Member_logostatus")=1 then
		  response.write "<INPUT type='button' class='inputs' value='屏蔽' name='btnhidden' onClick=""window.location='person_photo.asp?step=hidden'"">"
		 else
		  response.write "<INPUT type='button' class='inputs' value='显示' name='btnShow' onClick=""window.location='person_photo.asp?step=show'"">"
		 end if
	 response.write "&nbsp;&nbsp;<INPUT type='button' class='inputs' value='删除' name='btnDel' onClick=""window.location='person_photo.asp?step=del'"">"%>
      <%else%>
      <IMG height=120 src="<%=sUploadDir%>/nophoto.gif" width=100 border=0 style="BORDER: #000000 1px solid;">
      <%end if%>
      <%
rs.close
set rs=nothing
%></td>
          <td width="70%"><table width="98%" border="0" cellspacing="0" cellpadding="0" class="mtable">
            <tr>
              <td align="left">上传你的照片，展现你的形象！相片人才面试机会是普通人才的8.5倍！</td>
            </tr>
            <tr>
              <td align="left" class="tdcolor">如何使您的照片显示达到最佳效果？</td>
            </tr>
            <tr>
              <td align="left">1、将照片尺寸设置为<strong>100(宽)*120(高)</strong>像素。（图片标准尺寸）</td>
            </tr>
            <tr>
              <td align="left">2、图片大小不能超过</font><strong>100</strong><font color="#333333">K</td>
            </tr>
            <tr>
              <td align="left">3、图片区域应清晰显示您的头像或半身/全身相。（请勿使用艺术照）</td>
            </tr>
          </table></td>
        </tr>
      </table></td>
    </tr>
  <tr>
    <td height="21" colspan="2" class="mtitle">您可以通过一下三种方式在线提交形象照片</td>
    </tr><form action="photosave.asp" method="post" enctype="multipart/form-data" name="form2" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG,BMP,PNG');return document.MM_returnValue">
  <tr>
    <td height="21" colspan="2" class="mtitle">方法一：直接上传照片：<input name="attachment" type="file" class="inputs" id="attachment">
    <input name="b122" type=submit class="inputs" value="上传照片"></td>
  </tr>
  </form>
    <FORM id=form1 name=form1 action="../plus/photo/photosave.asp" method=post encType=multipart/form-data>
  <tr>
    <td height="21"><span class="mtitle">方法二：裁切上传</span>      <INPUT id=fileField onpropertychange=chkimg(this.value) type=file size=20 name=fileField></td>
    <td height="21" class="mtitle">方法三：在线拍照</td>
  </tr>
  <tr>
    <td width="500" height="21"><table cellspacing="0" cellpadding="0" width="500" align="center" border="0">
      <tbody>
        <tr>
          <td valign="top" width="350"><iframe id="catphoto1" src="../plus/photo/photocat1.htm" 
      frameborder="0" width="100%" scrolling="No" height="306"></iframe></td>
          <td width="140"><table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
            <tbody>
              <tr>
                <td align="center"><iframe id="catphoto2" src="../plus/photo/photocat2.htm" frameborder="0" 
            width="140" scrolling="No" height="177"></iframe></td>
              </tr>
              <tr>
                <td align="center" height="30"><input id="Button1" onclick="return CheckImg();" type="submit" value="确定上传" name="Button1" />
                  <input id="Button2" onclick="javascript:location.href='person_photo.asp';" type="submit" value="取消" name="Button2" /></td>
              </tr>
              <tr>
                <td height="98"><input id="hidWidth" type="hidden" name="hidWidth" />
                  <input 
            id="hidHeight" type="hidden" name="hidHeight" />
                  <input id="hidLeft" 
            type="hidden" name="hidLeft" />
                  <input id="hidTop" type="hidden" name="hidTop" />
                  <input id="hidTurn" type="hidden" name="hidTurn" /></td>
              </tr>
            </tbody>
          </table></td>
        </tr>
      </tbody>
    </table>
      <table width="100%" style="border:#D3EEFC 1px solid" align="center" cellpadding="4" cellspacing="0">
        <tbody>
          <tr>
            <td style="LINE-HEIGHT: 140%" width="919" 
      bgcolor="#EEF8FF"><strong>在线上传操作方法：</strong><br />
              1、点击<font 
      color="#ff0000">&ldquo;浏览&rdquo;</font>键，选择您要上传的照片。<br />
              2、您选择的照片会出现在下方修改框内，按中间<font 
      color="#ff0000">红色边框</font>大小，您可<font 
      color="#ff0000">放大、缩小，旋转</font>您的照片，<font 
      color="#ff0000">确定剪切</font>，在右侧预览框里预览您剪切的照片，如不满意可重新修改。<br />
              3、点击<font 
      color="#ff0000">&ldquo;确定上传&rdquo;</font>按键，上传剪切好的照片。</td>
          </tr>
        </tbody>
      </table></td>
    <td><table width="98%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="256"><img src="../plus/photo/images/vpic.gif" width="206" height="209" title="点击可进行在线拍照！" style="CURSOR: hand" onClick="JumpSearchLayer();" /></td>
      </tr>
    </table>
      <table width="100%" style="border:#D3EEFC 1px solid" align="center" cellpadding="4" cellspacing="0">
        <tbody>
          <tr>
            <td style="LINE-HEIGHT: 140%" width="919" 
      bgcolor="#EEF8FF"><strong>在线拍照操作方法：</strong><br />
              1、确定您安装了摄像头，点击<font 
      color="#ff0000">&ldquo;在线拍照&rdquo;</font>键，打开在线视频拍照窗口。<br />
              2、如果弹出&ldquo;Adobe Flash Player设置&rdquo;窗口，请点击<font 
      color="#ff0000">&ldquo;允许&rdquo;</font>，在预览状态下选择最佳效果点击<font 
      color="#ff0000">&ldquo;拍照&rdquo;</font>，在右侧预览框里预览您拍摄的照片，如不满意可重新拍照。<br />
              3、点击<font 
      color="#ff0000">&ldquo;保存&rdquo;</font>按键，上传拍好的照片。</td>
          </tr>
        </tbody>
      </table></td>
    </tr>
    </FORM>
  <tr>
    <td height="21">&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
</table>
</div>
</body>
</html>
<%conn.close:set conn=nothing%>