查看文件: ajax_img_rotate.php
大小: 1.12 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); if (!isset($_SESSION)){ session_start(); } if (isset($_POST["imgid"]) && $_POST["imgid"]>0 ) { if(strtolower($_POST["imgxt"])=='jpg' || strtolower($_POST["imgxt"])== 'jpeg'){ //$v=$_SESSION['login_memid']; $f=sprintf("%07d",$_SESSION['login_memid']).'.'.$_POST["imgxt"] ; // $filename="image.jpg";// Load the image $pic1= "/www2/skybni/ecard/img/user_".$f; $pic2= "/www2/skybni/ecard/reimg/user_".$f; $source = imagecreatefromjpeg($pic1); $rotate = imagerotate($source, 90, 0);// Rotate imagejpeg($rotate,$pic1); $source = imagecreatefromjpeg($pic2); $rotate = imagerotate($source, 90, 0); imagejpeg($rotate,$pic2); //and save it on your server... $updateSQL = sprintf("UPDATE member SET mcapture=0 WHERE mem_auto=%s", GetSQLValueString($_SESSION['login_memid'], "int")); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($updateSQL, $BE2) or die(mysql_error()); echo '轉換圖檔完成...'; } else{ echo ' 圖檔只支援 jpg ! '; } } else { echo '資料錯誤..!'; } ?>
保存
取消
返回文件列表