You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
130 lines
5.1 KiB
130 lines
5.1 KiB
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
|
<title>剪切图片</title>
|
|
<script type="text/javascript">
|
|
//全局变量
|
|
var GV = {
|
|
JS_ROOT: "{THEME_PATH}js/crop/"
|
|
};
|
|
</script>
|
|
<script src="{THEME_PATH}js/crop/wind.js"></script>
|
|
<script type="text/javascript">var memberpath = "{MEMBER_PATH}";</script>
|
|
<script type="text/javascript" src="{THEME_PATH}js/{SITE_LANGUAGE}.js"></script>
|
|
<script type="text/javascript" src="{THEME_PATH}js/jquery.min.js"></script>
|
|
<script type="text/javascript" src="{THEME_PATH}js/jquery.artDialog.js?skin=default"></script>
|
|
<script type="text/javascript" src="{THEME_PATH}js/validate.js"></script>
|
|
<script type="text/javascript" src="{THEME_PATH}js/admin.js"></script>
|
|
<script type="text/javascript" src="{THEME_PATH}js/dayrui.js"></script>
|
|
</head>
|
|
<body style="width:520px; height:360px;">
|
|
<script>
|
|
// 获取页面上的flash实例。
|
|
// @param flashID 这个参数是:flash 的 ID 。本例子的flash ID是 "myFlashID" ,在本页面搜索一下 "myFlashID" 可看到。
|
|
function getFlash(flashID)
|
|
{
|
|
// 判断浏览器类型
|
|
if (navigator.appName.indexOf("Microsoft") != -1)
|
|
{
|
|
return window[flashID];
|
|
}
|
|
else
|
|
{
|
|
return document[flashID];
|
|
}
|
|
}
|
|
|
|
// flash 上传图片完成时回调的函数。
|
|
function uploadComplete(pic) {
|
|
|
|
var file = pic.split("|");
|
|
if (file[0] == 0) {
|
|
dr_tips(file[1]);
|
|
} else {
|
|
var win = art.dialog.open.origin;
|
|
dr_tips('图片处理完成', 3, 1);
|
|
setTimeout(function() {
|
|
win.$(".dr_{$name}_upload_value").val(file[0]);
|
|
win.$(".dr_{$name}_upload_img").attr({src:file[1]});
|
|
window.top.art.dialog({id: 'crop'}).close();
|
|
}, 1500);
|
|
}
|
|
|
|
}
|
|
|
|
function uploadfile() {
|
|
dr_tips('图片处理中...', 99999, 2);
|
|
getFlash('myFlashID').upload();
|
|
|
|
}
|
|
var swfVersionStr = "10.0.0";
|
|
var xiSwfUrlStr = "{THEME_PATH}js/crop/images/playerProductInstall.swf";
|
|
|
|
var flashvars = {};
|
|
// 图片地址
|
|
flashvars.picurl = "{$image}";
|
|
// 上传地址,使用了 base64 加密
|
|
flashvars.uploadurl = "<?php echo base64_encode($upload); ?>";
|
|
|
|
var params = {};
|
|
params.quality = "high";
|
|
params.bgcolor = "#ffffff";
|
|
params.allowscriptaccess = "always";
|
|
params.allowfullscreen = "true";
|
|
params.wmode = "transparent";
|
|
var attributes = {};
|
|
attributes.id = "myFlashID";
|
|
attributes.name = "myFlashID";
|
|
attributes.align = "middle";
|
|
Wind.use("swfobject", function() {
|
|
swfobject.embedSWF(
|
|
"{THEME_PATH}js/crop/images/Main.swf", "flashContent",
|
|
"520", "360",
|
|
swfVersionStr, xiSwfUrlStr,
|
|
flashvars, params, attributes);
|
|
<!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
|
|
swfobject.createCSS("#flashContent", "display:block;text-align:left;");
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="flashContent">
|
|
<p> To view this page ensure that Adobe Flash Player version
|
|
10.0.0 or greater is installed. </p>
|
|
<script type="text/javascript">
|
|
var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
|
|
document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
|
|
+ pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>");
|
|
</script>
|
|
</div>
|
|
<noscript>
|
|
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="520" height="360" id="myFlashID">
|
|
<param name="movie" value="{$config_siteurl}statics/js/crop/images/Main.swf" />
|
|
<param name="quality" value="high" />
|
|
<param name="wmode" value="Opaque" />
|
|
<param name="bgcolor" value="#ffffff" />
|
|
<param name="allowScriptAccess" value="always" />
|
|
<param name="allowFullScreen" value="true" />
|
|
<!--[if !IE]>-->
|
|
<object type="application/x-shockwave-flash" data="{$config_siteurl}statics/js/crop/images/Main.swf" width="520" height="360">
|
|
<param name="quality" value="high" />
|
|
<param name="bgcolor" value="#ffffff" />
|
|
<param name="wmode" value="Opaque" />
|
|
<param name="allowScriptAccess" value="always" />
|
|
<param name="allowFullScreen" value="true" />
|
|
<!--<![endif]-->
|
|
<!--[if gte IE 6]>-->
|
|
<p> Either scripts and active content are not permitted to run or Adobe Flash Player version
|
|
10.0.0 or greater is not installed. </p>
|
|
<!--<![endif]-->
|
|
<a href="http://www.adobe.com/go/getflashplayer"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" /> </a>
|
|
<!--[if !IE]>-->
|
|
</object>
|
|
<!--<![endif]-->
|
|
</object>
|
|
</noscript>
|
|
|
|
</body>
|
|
</html>
|