mobile){ phpalert("请先登陆!"); exit(); } $mobile = $WebUsrInfo->mobile; //if(!eregi("diy.php",$_SERVER[HTTP_REFERER]) && !eregi("compose.php",basename($_SERVER[HTTP_REFERER]))) die("访问来源页面无效".$_SERVER[HTTP_REFERER]); //if(!eregi($_SERVER[HTTP_HOST],$_SERVER[HTTP_REFERER])) die("无效来源IP"); if(basename($PHP_SELF)!="compose.php") die("自身无效"); if($_SERVER[REDIRECT_URL] && $_SERVER[REDIRECT_URL]!=$PHP_SELF) die("访问目标无效"); if($_SERVER[REDIRECT_URL] && basename($_SERVER[REDIRECT_URL])!="compose.php") die("非法访问"); if($acts=="compose" && $framesource){ if(!is_file($framesource)){ phpalert("像框文件不存在!".$framesource); gotopage("$PHP_SELF"); exit(); } $image = new ClsImage(); $p_num = $WebUsrInfo->crop[id]+1; $src_path_file = $WebUsrInfo->src_path_file; $dst_path_file = "./tmp/$mobile"."_src".$p_num.".png";//第p_num个新图 $isok = $image->Image2in1($framesource,$src_path_file,$dst_path_file,$px,$py,$framezoom,$zoom,"ffffff"); if($isok){ $WebUsrInfo->crop[id] = $p_num; $WebUsrInfo->crop[src_files][$p_num] = $dst_path_file;//记录为原图 $WebUsrInfo->src_path_file = $dst_path_file;//成功则把目标图设定为下一次操作的原图 $WebUsrInfo->refresh=2;//刷新 jsExeString("if(parent && parent.middleframe){ parent.middleframe.location.href='preview.php';}"); } gotopage("$PHP_SELF"); exit(); }else if($acts=="cancel"){ $p_num = $WebUsrInfo->crop[id]; @unlink($WebUsrInfo->crop[src_files][$p_num]); unset($WebUsrInfo->crop[src_files][$p_num]); $p_num--; $WebUsrInfo->crop[id] = $p_num; $WebUsrInfo->src_path_file = $WebUsrInfo->crop[src_files][$p_num]; gotopage("$PHP_SELF"); exit(); } if($WebUsrInfo->refresh>0){ echo ""; $WebUsrInfo->refresh =""; exit(); } $workImageFile = $WebUsrInfo->src_path_file; $frame_path_file = $WebUsrInfo->frame_path_file; ?> 添加像框
图片缩放
相框缩放
X Y  
拖动图片到适当位置后单击"确定"按钮。 crop[id]<=1 ) echo "disabled";?> name="btcancel" type="button" id="btcancel5" value="撤消" onClick="docancel()" style="width:65px;">