<?php
require_once 'application/libraries/thumb/ThumbLib.inc.php';
$m = $_REQUEST['m'];
$s = $_REQUEST['s'];
if(!is_file($m)) $m= "uploads/customers/profile_images/no_image.png";
$thumb = PhpThumbFactory::create($m);
if($s == 'big'){
$arr_iwh = array(600,600);
$thumb->resize($arr_iwh[0], $arr_iwh[1]);
//$thumb->cropFromCenter(200,200);
}elseif($s == 'med'){
$arr_iwh = array(400,350);
$thumb->resize($arr_iwh[0], $arr_iwh[1]);
//$thumb->cropFromCenter(200,200);
}elseif($s == 'f'){
$arr_iwh = array(570,700);
$thumb->resize($arr_iwh[0], $arr_iwh[1]);
//$thumb->cropFromCenter(200,200);
}elseif($s == 'l'){
$arr_iwh = array(300,300);
$thumb->resize($arr_iwh[0], $arr_iwh[1]);
//$thumb->cropFromCenter(250,300);
}elseif($s == 't'){
$arr_iwh = array(200,200);
$thumb->resize($arr_iwh[0], $arr_iwh[1]);
//$thumb->crop(0,0,200,200);
}elseif($s == 'e'){
$arr_iwh = array(200,200);
$thumb->resize($arr_iwh[0], $arr_iwh[1]);
// $thumb->crop(0,5,250,80);
}elseif($s == 's'){
$arr_iwh = array(75,75);
$thumb->resize($arr_iwh[0], $arr_iwh[1]);
}elseif($s == 'i'){
$arr_iwh = array(12,12);
$thumb->resize($arr_iwh[0], $arr_iwh[1]);
}elseif($s == 'z'){
$arr_iwh = array(100,100);
$thumb->resize($arr_iwh[0], $arr_iwh[1]);
}else{
$arr_iwh = array(100,100);
$thumb->resize($arr_iwh[0], $arr_iwh[1]);
//$thumb->cropFromCenter(60,60);
//$thumb->crop(20,0,50,50);
}
$thumb->show();
?>