( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
<?php
$VideoPath = "uploads/live/";
$live_img = 'uploads/images/';
$result = $db->getallprofilepictures();
$msg_idC= $msg_id;
$msg_id= $result[0]["id"];
if(empty($result)){
header("Location: indexAlone.php?mode=editprofilepicture&category=alert-success&msg=You+have+not+uploaded+content+to+manage.++Kindly+upload+on+your+right");
}
$catalogid = $result[0]["catalogid"];
$yanani= $result[0]["yanani"];
$original= $result[0]["picture"];
$title = $result[0]["title"];
$content = $result[0]["content"];
$viewnum = $result[0]["viewnum"];
$rating = $result[0]["rating"];
$picture = $result[0]["picture"];
$ratenum = $result[0]["ratenum"];
$episodeid = $result[0]["episodeid"];
$slug = $result[0]["slug"];
$keywords = $result[0]["keywords"];
$isdisplay = $result[0]["isdisplay"];
$description = $result[0]["description"];
$vcat = $result[0]["vcat"];
$summary = $result[0]["summary"];
$video = $result[0]["video"];
$thumb= $result[0]["thumb"];
$post_id= $_GET["msg_id3"];
$src= "v/uploads/gallery/$original";
list($upana, $urefu) = getimagesize($src);
/* if ($upana > 1500 || $urefu > 1500 )
{
$maxWidtha = 1500;
$maxHeighta = 1500;
$mode = "indexAlone.php?mode=cropP&action=filter&msg_id=0&pp=1";
$photo="/v/uploads/gthumbs/$original";
$resizedPhoto="v/uploads/gthumbs/$original";
include("pages/fixit.php");
exit();
}
*/
?>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.Jcrop.js"></script>
<script type="text/javascript">
jQuery(function($){
// Create variables (in this scope) to hold the API and image size
var jcrop_api,
boundx,
boundy,
// Grab some information about the preview pane
$preview = $('#preview-pane'),
$pcnt = $('#preview-pane .preview-container'),
$pimg = $('#preview-pane .preview-container img'),
xsize = $pcnt.width(),
ysize = $pcnt.height();
console.log('init',[xsize,ysize]);
$('#cropbox').Jcrop({
onChange: updatePreview,
onSelect: updatePreview,
minSize: [ 50, 50 ],
maxSize: [ 1000, 1000 ],
aspectRatio: 600/600 ,
setSelect: [ 1, 1, 600, 600 ],
onSelect: updateCoords,
bgFade: true,
bgOpacity: .3
},function(){
// Use the API to get the real image size
var bounds = this.getBounds();
boundx = bounds[0];
boundy = bounds[1];
// Store the API in the jcrop_api variable
jcrop_api = this;
// Move the preview into the jcrop container for css positioning
$preview.appendTo(jcrop_api.ui.holder);
});
function checkCoords()
{
if (parseInt($('#w').val())) return true;
alert('Please select a crop region then press submit.');
return false;
};
function updateCoords(c)
{$('#appno').val(AppNo);
$('#x').val(c.x);
$('#y').val(c.y);
$('#w').val(c.w);
$('#h').val(c.h);
};
function updatePreview(c)
{
if (parseInt(c.w) > 0)
{
var rx = xsize / c.w;
var ry = ysize / c.h;
$pimg.css({
width: Math.round(rx * boundx) + 'px',
height: Math.round(ry * boundy) + 'px',
marginLeft: '-' + Math.round(rx * c.x) + 'px',
marginTop: '-' + Math.round(ry * c.y) + 'px'
});
}
};
});
</script>
<link rel="stylesheet" href="demo_files/main.css" type="text/css" />
<link rel="stylesheet" href="css/jquery.Jcrop.css" type="text/css" />
<style type="text/css">
/* Apply these styles only when #preview-pane has
been placed within the Jcrop widget */
.jcrop-holder #preview-pane {
display: block;
position: absolute;
z-index: 2000;
top: 10px;
right: -280px;
padding: 6px;
border: 1px rgba(0,0,0,.4) solid;
background-color: white;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 1px 1px 5px 2px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 1px 1px 5px 2px rgba(0, 0, 0, 0.2);
box-shadow: 1px 1px 5px 2px rgba(0, 0, 0, 0.2);
}
/* The Javascript code will set the aspect ratio of the crop
area based on the size of the thumbnail preview,
specified here */
#preview-pane .preview-container {
width: 250px;
height: 170px;
overflow: hidden;
}
</style>
<table width="100%" border="0">
<tr>
<td width="348" ><h2 style="margin-top:0px" class="post-title" id="status"> Crop Profile Picture</h2> </td>
<td align="right">
<?php $msg_idx = $db->base64url_encode($msg_id);
if(!empty($_GET["joinApp"])){
$url = "&route=$msg_idC|$view|joinApp";
}
else{
$url = "";
}
?>
<form action="indexAlone.php?mode=editprofilepicture<?php echo $url; ?>" method="post" onsubmit="return checkCoords();">
<?php if(!empty($mag))
{?>
<input type="hidden" id="mag" name="mag" value="mag" />
<?php }
?>
<input name="route" type="hidden" value="<?php echo $url; ?>">
<input type="hidden" id="action" name="action" value="<?php echo $_GET["action"]; ?>" />
<input type="hidden" id="x" name="x" />
<input type="hidden" id="y" name="y" />
<input type="hidden" id="w" name="w" />
<input type="hidden" id="appno" name="appno" />
<input type="hidden" id="h" name="h" />
<input type="hidden" id="photo" name="photo" value="<?php echo $original ?>" />
<input type="hidden" id="msg_id" name="msg_id" value="<?php echo $msg_idx ?>" />
<?php /*?> <input type="submit" name="skip" value="Skip" class="btn-lg btn-info " style=" background-color:#333; margin-top:2px;border:0px;width:105px; margin-right:5px" /><?php */?>
<input type="submit" name="crop" value="Crop" class="btn-lg btn-info pull-right " style=" margin-top:2px;border:0px;width:105px; margin-right:5px; background-color:#F2B601" />
</form></td>
</tr>
</table>
<div id="preview-pane" style="display:none">
<div class="preview-container">
<img src="" class="jcrop-preview" alt="Preview" />
</div>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left">
<img src="taswira.php?nocache=1&image=/v/uploads/gthumbs/<?php echo $picture ?>#<?php rand(1,3);?>" style="-moz-border-radius : 3px 3px 3px 3px:-webkit-border-radius : 3px 3px 3px 3px;border-radius : 3px 3px 3px 3px; " id="cropbox" >
</td>
</tr>
</table>