www.gusucode.com > 仿51.com的php源码 1.1 > Photo/PhotoMagicCrop.php

    <?php
include("../User/CheckLogined.php");
include("../include/dbclass.php");
include("../User/GDImage.inc.php");
$dbc=new DbConn();
$uid=$_COOKIE["uid"];
$user=$_GET["user"];
$w=$_GET["w"];
$h=$_GET["h"];
$url=$_GET["url"];
$x=$_GET["x"];
$y=$_GET["y"];
$id=$_GET["id"];
//echo $w;
//echo "<br>";
//echo $h;
//echo "<br>";
//echo $x;
//echo $y;

//exit();
$fext = strrchr(strtolower($url), '/');
//echo $fext;
$path=str_replace($fext,'',$url);
//$dstFile=$path."/"."4.jpg";
//echo $path;
$sfext=str_replace("/",'',$fext);
//echo "<br>";
//echo $sfext;
//$width,$height,$x,$y

$GDImg=new GDImage($path . "/",$path . "/","../authpage/");
if ($_GET["sdofijwner"]=="woe98xsdf")
{
$GDImg->toFile = true;
}
//$TheSmall=$GDImg->make_Thumbs($user,$dstFile,150,120, $option=OP_TO_FILE,$cutmode=CM_LEFT_OR_TOP,$x,$y,$w,$h) ;
$TheSmall=$GDImg->make_Thumb($sfext,150,120,$x,$y,$w,$h) ;
?>