<!--#include file="../Include/Class_Conn.asp" -->
<!--#include file="../Include/Class_Main.asp" -->
<!--#include file="../Public/Person_Cookies.asp" -->
<%
'地区分站参数
Dim c_City,c_Name
If Session("c_City") = "" Then 
 Response.Redirect "../Index.asp"
 Response.End()
End if
c_City = Session("c_City")
c_Name = Session("c_Name")

Dim upload,file,formName,formPath,iCount,filename,fileExt,rs,sql,username,photochk,photo,tupian

Username = Session("Person")(0)
Perid    = Session("Person")(2)

Set Rs = Server.Createobject("adodb.recordset")
SQL = "Select Username,PhotoUrl From [pH_Person_Info] Where Username='"&username&"'"
Rs.Open SQL,Conn,1,3
if rs("photourl") <> "" then
	response.write "<script>alert('您已经拍摄或者上传了照片，请先删除照片');window.close();</script>"
	response.end
end if

%>
<html>
<head>
<title><%= Cls_WebName&" | "&c_Name&"站" %> -- 在线拍照</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">td img {display: block;}</style>
<link href="images/table.css" rel="stylesheet" type="text/css">
<script language=JavaScript> 
var me; //代表swf的id 
//获取正确的引用 
function getID(swfID) { 
   if (navigator.appName.indexOf("Microsoft") > -1) { 
      me = window[swfID]; 
   } else { 
      me = document[swfID]; 
   }
} 

function Changepic(str){ 
   me.Changepic(str);

} 
function Moveleft(Num){ 
   me.Moveleft(Num);

} 

function Moveright(Num){ 
   me.Moveright(Num);

}

function Rotationl(Num){ 
   me.Rotationl(Num);

}

function Rotationr(Num){ 
   me.Rotationr(Num);

}

function Upok(filename)
{

 
   document.forms.form1.action="Per_WriteScreen.asp?picurl="+filename;
  document.forms.form1.submit();
 
}

function Iniok()
{

 
  document.getElementById("ps").style.visibility="visible";
   document.getElementById("sc").style.visibility="hidden";
    document.getElementById("yxz").style.visibility="hidden";
	 document.getElementById("zxz").style.visibility="hidden";
	  document.getElementById("zy").style.visibility="hidden";
	   document.getElementById("sy").style.visibility="hidden";
	    document.getElementById("yy").style.visibility="hidden";
		 document.getElementById("xy").style.visibility="hidden";
		  document.getElementById("fd").style.visibility="hidden";
		   document.getElementById("sx").style.visibility="hidden";
  
}
function Inifail()
{

  alert("请确认您的摄像头是否正在使用,谢谢^_^");

  document.getElementById("ps").style.visibility="hidden";
   document.getElementById("sc").style.visibility="hidden";
    document.getElementById("yxz").style.visibility="hidden";
	 document.getElementById("zxz").style.visibility="hidden";
	  document.getElementById("zy").style.visibility="hidden";
	   document.getElementById("sy").style.visibility="hidden";
	    document.getElementById("yy").style.visibility="hidden";
		 document.getElementById("xy").style.visibility="hidden";
		  document.getElementById("fd").style.visibility="hidden";
		   document.getElementById("sx").style.visibility="hidden";
  
}

function Initial()
{
  me.Initial();
}

function Upfail()
{
  alert("文件上传失败");
 
}

function Capok()
{
  alert("拍照结束\n请开始填写下面的表后 点击上传");
  document.getElementById("ps").style.visibility="hidden";
   document.getElementById("sc").style.visibility="visible";
    document.getElementById("yxz").style.visibility="visible";
	 document.getElementById("zxz").style.visibility="visible";
	  document.getElementById("zy").style.visibility="visible";
	   document.getElementById("sy").style.visibility="visible";
	    document.getElementById("yy").style.visibility="visible";
		 document.getElementById("xy").style.visibility="visible";
		  document.getElementById("fd").style.visibility="visible";
		   document.getElementById("sx").style.visibility="visible";
 
}


function Capture()
{
  me.Capture();

}

function checkform()
{
temp1=document.getElementById("username");
temp2=document.getElementById("usercontent");

return(true);



}

function Uppic(f)
{
if(checkform()){
  var temp=document.getElementById("maskdiv");
  temp.style.width=screen.availWidth;
  temp.style.height=screen.availHeight;
  temp.style.display="block";
  me.Uppic(f);}

}

function Showversion()
{
  me.Showversion();

}

function Zoomout(num)
{
  me.Zoomout(num);

}


function Zoomin(num)
{
  me.Zoomin(num);

}

function Moveup(num)
{
  me.Moveup(num);

}

function Movedown(num)
{
  me.Movedown(num);

}

</script> 

<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<LINK href="../Css/css_offices.css" type=text/css rel=stylesheet>
</head>
<body bgcolor="#ffffff" onLoad="getID('aojie');Initial();">
<div id="maskdiv" style="display: none; background-image: url('images/overlay.png'); position: absolute; top: 0px; left: 0px">Waiting...........</div>

  
<table width="549" height="237" border="0" align="center" cellpadding="4" cellspacing="0">
  <tr>
      <td width="220"><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="220" height="184" id="aojie">
        <param name="movie" value="../Include/Class_Screen.swf" />
        <param name="quality" value="high" />
        <embed src="../Include/Class_Screen.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="220" height="184" name="aojie"></embed>
      </object></td>
      
    <td width="329"><p><span style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><br>
        1.摆好Pose后,点击"拍照"按钮即可看到拍到的照片效果,如果觉得没有拍好可重新点击"拍照"按钮,直到拍出的效果令您满意为止;<br>
        2.感觉对您自己的照片满意时，请点击&quot;上传&quot;，将照片保存到服务器;<br>
        3.注意,服务器保存您的照片可能需要20-90秒时间,请您耐心等待</span>;<br>
      </p>
      </td>
    </tr>
    <tr>
      <td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="../IMAGES/photo_P.GIF" alt="" name="ps" width="101" height="44" border="0" usemap="#index_r8_c1MapMap" id="ps"  style="visibility:hidden;"/>
              <map name="index_r8_c1MapMap" id="index_r8_c1Map2">
                <area shape="rect" coords="1,0,112,47" href="javascript:Capture()" />
              </map></td>
            <td>&nbsp;</td>
            <td align="center"><img src="../IMAGES/photo_U.GIF" alt="" name="sc" width="101" height="44" border="0" usemap="#index_r8_c3MapMap" id="sc"  />
                <map name="index_r8_c3MapMap" id="index_r8_c3Map2">
                  <area shape="rect" coords="-2,-2,100,64" href="javascript:Uppic('Per_UploadScreen.asp');" />
              </map></td>
        </tr>
        </table>
        </td>
      <td align="center">&nbsp;</td>
    </tr>
</table>
  <form name="form1" method="post" action="Per_WriteScreen.asp" id="tj"> </form>
</body>              
        
</html>                    




