<html lang="zh_CN">
<!--
<?php
$forsiteurl2=$forsiteurl?"var forsiteurl='$forsiteurl';":'var forsiteurl=0;';
$formatimg1=urlencode($formatimg);
$forsiteurl1=urlencode($forsiteurl);
print <<<EOT
-->
<head>
<meta charset="gb2312" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-status-bar-style" content="black"  />
<meta name="apple-mobile-web-app-capable" content="yes">
<title>图片裁剪</title>
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/default.css">
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<link href="dist/cropper.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
</head>
<body>
<form name="form1" method="post" action="?formatimg=$formatimg1&aspectRatio=$aspectRatio&forsiteurl=$forsiteurl1">
<div style="max-width:640px; margin:10px auto;overflow:hidden;">
	<div class="img-container"><img src="$formatimg" alt="Picture"></div>
</div>
<div class="col-md-3" style="display:none;">
	<div class="docs-data">
	  <div class="input-group">
		<label class="input-group-addon" for="dataX">X</label>
		<input class="form-control" id="dataX" type="text" placeholder="x" name="x"/>
		<span class="input-group-addon">px</span>
	  </div>
	  <div class="input-group">
		<label class="input-group-addon" for="dataY">Y</label>
		<input class="form-control" id="dataY" type="text" placeholder="y" name="y"/>
		<span class="input-group-addon">px</span>
	  </div>
	  <div class="input-group">
		<label class="input-group-addon" for="dataWidth">Width</label>
		<input class="form-control" id="dataWidth" type="text" placeholder="width" name="rw"/>
		<span class="input-group-addon">px</span>
	  </div>
	  <div class="input-group">
		<label class="input-group-addon" for="dataHeight">Height</label>
		<input class="form-control" id="dataHeight" type="text" placeholder="height" name="rh" />
		<span class="input-group-addon">px</span>
	  </div>
	  <div class="input-group">
		<label class="input-group-addon" for="dataRotate">Rotate</label>
		<input class="form-control" id="dataRotate" type="text" placeholder="rotate">
		<span class="input-group-addon">deg</span>
	  </div>
	  <div class="input-group">
		<label class="input-group-addon" for="dataRotate">scale</label>
		<input class="form-control" id="datascale" type="text" value="100" placeholder="scale">
		<span class="input-group-addon">%</span>
	  </div>
	</div>
</div>
<style>
.SubMitBox{clear:both;text-align:center;padding:0 10px;width:100%;}
.submitbox{display:inline-block;position:relative;width:80px;height:35px;margin:auto;}
.submitbox span{display:inline-block;position:absolute;width:80px;border:#F30 solid 1px;background:#F60;line-height:35px;height:35px;text-align:center;color:#FFF;border-radius:5px;left:0;top:-1px;}
.submitbox input{width:80px;height:35px;filter:alpha(opacity=1);-moz-opacity:0.01;opacity:0.01;position:relative;cursor:pointer;}
.notcutimg{display:inline-block;width:80px;text-align:center;line-height:35px;height:35px;border:#666 solid 1px;background:#999;color:#FFF;border-radius:5px;}
.notcutimg1{display:inline-block;width:35px;text-align:center;line-height:35px;height:35px;border-radius:18px;}
.notcutimg2{background:blue url(ro1.png) center center no-repeat;background-size:25px 25px;}
.notcutimg3{background:blue url(ro2.png) center center no-repeat;background-size:25px 25px;}
.notcutimg1 span{filter:alpha(opacity=1);-moz-opacity:0.01;opacity:0.01;}
</style>
<div style="text-align:center;padding:10px;">
  <input type="hidden" name="action" value="cutimg">
  <a href="javascript:;rotate(-90)" class="notcutimg1 notcutimg2"><span>左旋</span></a>
  <a href="javascript:;rotate(90)" class="notcutimg1 notcutimg3"><span>右旋</span></a>
  <span class="submitbox"><span>确定剪切</span><input type="submit" class="submits" value="修改"/></span> <a href="#" onClick="hide_cutimg()" class="notcutimg">不剪切</a>  
</div>
</form>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min1.js"></script>
<script src="dist/cropper.js"></script>
<script>
function rotate(nums){
	$.get("?formatimg="+escape("$formatimg")+"&action=rotate&rotate="+nums+"&"+Math.random(),function(d){
		//window.location.href="$thisurl";
		window.location.href="?formatimg="+escape("$formatimg")+"&aspectRatio=$aspectRatio&forsiteurl="+escape("$forsiteurl")+"&"+Math.random();
	});
}
function hide_cutimg(){
	$forsiteurl2
	if(forsiteurl){
		window.location.href=forsiteurl;
	}else{
		if(self==top){
			window.self.close();
		}else{
			window.parent.hide_cutimg('$formatimg');
		}
	}
}
var aspectRatioval=$aspectRatio;
</script>
<script src="js/main2.js"></script>
</body>
</html>
<!--
EOT;
?>
-->