-
Notifications
You must be signed in to change notification settings - Fork 2
/
mancrop.php
705 lines (566 loc) · 19 KB
/
mancrop.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
<?php
include_once 'phppagestart.php';
echo '<!DOCTYPE html>';
include_once('config.inc.php');
include_once('lang.php');
$clipX = (int)$_GET['crop_x'];
$clipY = (int)$_GET['crop_y'];
$filename = (string)$_GET['image'];
$resizedHeight = (int)$_GET['height'];
$resizedWidth = (int)$_GET['width'];
//$newcrop= substr($filename, 0, -4).$mcrop.'.jpg';
$newcrop= substr($filename, 0, -4).$mcrop.'.'.$ext;
$now=time();
$ext = strtolower(pathinfo($image, PATHINFO_EXTENSION));
$basename = pathinfo($_GET['image'], PATHINFO_FILENAME);
if ($ext=='jpg')
{
$mimeext='jpeg';
}
else
{
$mimeext=$ext;
}
function get_all_get()
{
$output = "?";
$firstRun = true;
foreach($_GET as $key=>$val) {
if($key != $parameter) {
if(!$firstRun) {
$output .= "&";
} else {
$firstRun = false;
}
$output .= $key."=".$val;
}
}
return $output;
}
$url= get_all_get();
if ((isset($_SESSION['username'])) && ($_SESSION['loggedin']=='yes') && (isset($_SESSION['password'])) && (isset($_SESSION['expire'])) && ($_SESSION['expire'] >= $now))
{
if (($_SESSION['expire'] - $now) <= $addtime)
{
$_SESSION['expire']=($_SESSION['expire'] + $buytime);
}
else
{
echo '';
}
}
else
{
echo '';
}
/* exec("convert $target_path -crop ".$w."x".$h."+$x+$y +repage $target_path");
https://stackoverflow.com/questions/29089307/cropping-an-image-using-jcrop-and-imagemagick
convert input.png -crop ${x}x${y}+${a}+${b} output.png */
// $filename=$_POST['image'];
if (($requireauth=='yes') && ($_SESSION['loggedin']=='yes') && ($_SESSION['expire'] >= $now) && ($_SESSION['password']!='PAM'))
{
//$previewimage = $_SESSION['userpath'].$image;
$userpath=$_SESSION['userpath'];
$mcropcmd=$imagemagicklocation.' '.$root.$_SESSION['userpath'].$filename.' -crop '.$_GET["width"].'x'.$_GET["height"].'+'.$_GET["crop_x"].'+'.$_GET['crop_y'].' +repage '.$root.$userpath.$_GET['newname'].'.'.$_GET['newext'];
//$chmod= 'chmod 777 '.$_SESSION['userpath'].$_GET['newimage'].'.'.$_GET['newext'];
}
elseif (($requireauth=='yes') && ($_SESSION['loggedin']=='yes') && ($_SESSION['expire'] >= $now)&& ($_SESSION['password']=='PAM'))
{
//$previewimage = $_SESSION['userpath'].$image;
$userpath=$_SESSION['userpath'];
$mcropcmd=$imagemagicklocation.' '.$_SESSION['userpath'].$filename.' -crop '.$_GET["width"].'x'.$_GET["height"].'+'.$_GET["crop_x"].'+'.$_GET['crop_y'].' +repage '.$userpath.$_GET['newname'].'.'.$_GET['newext'];
$chmod= 'chmod 777 '.$_SESSION['userpath'].$_GET['newimage'].'.'.$_GET['newname'].'.'.$_GET['newext'];
echo $mcropcmd;
}
elseif ($requireauth !='yes')
{
//$previewimage = $filepath.$image;
$userpath=$filepath;
$mcropcmd=$imagemagicklocation.' '.$root.$_SESSION['userpath'].$filename.' -crop '.$_GET["width"].'x'.$_GET["height"].'+'.$_GET["crop_x"].'+'.$_GET['crop_y'].' +repage '.$root.$_userpath.$_GET['newname'].'.'.$_GET['newext'];
}
else
{
$mcropcmd='';
}
if ((isset($_SESSION['username'])) && ($_SESSION['loggedin']=='yes') && (isset($_SESSION['password'])) && (isset($_SESSION['expire'])) && ($_SESSION['expire'] >= $now))
{
if (($_SESSION['expire'] - $now) <= $addtime)
{
$_SESSION['expire']=($_SESSION['expire'] + $buytime);
}
else
{
echo '';
}
}
else
{
echo '';
}
echo '<html lang="'.$lang.'">';
?>
<head>
<?php
/*
if ($_POST['confirmdelete']=='yes')
{
echo '<meta HTTP-EQUIV="REFRESH" content="'.$deleterefresh.'; url='.$refreshurl.'">';
}
else
{
echo '';
}
*/
if (($requireauth=='yes') && ($_SESSION['loggedin']=='yes') && (($_SESSION['expire'] - $now ) > 1) && ($_SESSION['password']!='PAM'))
{
//echo '<meta HTTP-EQUIV="REFRESH" content="'.($_SESSION['expire'] - $now).'; url=/logout.php?sound=yes">';
if (($_GET['return']!='airscan.php') && (isset($_GET['image'])) && (isset($_GET['crop_x'])) && (isset($_GET['crop_y'])) && (isset($_GET['height'])) && (isset($_GET['width'])))
{
echo '<meta HTTP-EQUIV="REFRESH" content="'.$autocroprefresh.'; url='.$userpath.'index.php?rand='.$rand.'#'.$_GET['newname'].'.'.$_GET['newext'].'">';
}
elseif (($_GET['return']=='airscan.php') && (isset($_GET['image'])) && (isset($_GET['crop_x'])) && (isset($_GET['crop_y'])) && (isset($_GET['height'])) && (isset($_GET['width'])))
{
list($path, $query_string) = explode('?', $url, 2);
// parse the query string
parse_str($query_string, $params);
// delete image param
unset($params['image']);
// change the print param
//$params['image'] = $blackwhitefile;
$params['rand'] = $rand;
// rebuild the query
$query_string = http_build_query($params);
// reassemble the URL
$urlvars = $path . '?' . $query_string;
echo '<meta HTTP-EQUIV="REFRESH" content="'.$autocroprefresh.'; url=airscan.php'.$urlvars.'&image='.$_GET['newname'].'.'.$_GET['newext'].'">';
}
elseif ((!isset($_GET['image'])) || (!isset($_GET['crop_x'])) || (!isset($_GET['crop_y'])) || (!isset($_GET['height'])) || (!isset($_GET['width'])))
{
echo '<meta HTTP-EQUIV="REFRESH" content="'.($_SESSION['expire'] - $now).'; url=/logout.php?sound=yes">';
}
else
{
echo '<meta HTTP-EQUIV="REFRESH" content="0; url=/logout.php?sound=yes">';
session_unset($_SESSION["loggedin"]);
session_unset($_SESSION["expire"]);
session_unset($_SESSION["username"]);
session_unset($_SESSION["password"]);
session_unset($_SESSION["userpath"]);
session_unset($_SESSION['scanneronline']);
session_unset($_SESSION['fromuserfolder']);
session_unset($_SESSION['fromuserfilelister']);
session_destroy();
}
}
elseif (($requireauth=='yes') && ($_SESSION['loggedin']=='yes') && (($_SESSION['expire'] - $now ) > 1) && ($_SESSION['password']=='PAM'))
{
//echo '<meta HTTP-EQUIV="REFRESH" content="'.($_SESSION['expire'] - $now).'; url=/logout.php?sound=yes">';
if ((isset($_GET['image'])) && (isset($_GET['crop_x'])) && (isset($_GET['crop_y'])) && (isset($_GET['height'])) && (isset($_GET['width'])))
{
echo '<meta HTTP-EQUIV="REFRESH" content="10; url=pamindex.php?rand='.$rand.'#'.$_GET['newname'].'.'.$_GET['newext'].'">';
}
elseif ((!isset($_GET['image'])) || (!isset($_GET['crop_x'])) || (!isset($_GET['crop_y'])) || (!isset($_GET['height'])) || (!isset($_GET['width'])))
{
echo '<meta HTTP-EQUIV="REFRESH" content="'.($_SESSION['expire'] - $now).'; url=/logout.php?sound=yes">';
}
else
{
echo '<meta HTTP-EQUIV="REFRESH" content="0; url=/logout.php?sound=yes">';
session_unset($_SESSION["loggedin"]);
session_unset($_SESSION["expire"]);
session_unset($_SESSION["username"]);
session_unset($_SESSION["password"]);
session_unset($_SESSION["userpath"]);
session_unset($_SESSION['scanneronline']);
session_unset($_SESSION['fromuserfolder']);
session_unset($_SESSION['fromuserfilelister']);
session_destroy();
}
}
elseif ($requireauth!='yes')
{
//echo '<meta HTTP-EQUIV="REFRESH" content="'.($_SESSION['expire'] - $now).'; url=/logout.php?sound=yes">';
if ((isset($_GET['image'])) && (isset($_GET['crop_x'])) && (isset($_GET['crop_y'])) && (isset($_GET['height'])) && (isset($_GET['width'])))
{
echo '<meta HTTP-EQUIV="REFRESH" content="'.$autocroprefresh.'; url='.$userpath.'index.php?rand='.$rand.'#'.$newcrop.'">';
}
elseif ((!isset($_GET['image'])) || (!isset($_GET['crop_x'])) || (!isset($_GET['crop_y'])) || (!isset($_GET['height'])) || (!isset($_GET['width'])))
{
echo '<meta HTTP-EQUIV="REFRESH" content="'.($_SESSION['expire'] - $now).'; url=/logout.php?sound=yes">';
}
else
{
echo '<meta HTTP-EQUIV="REFRESH" content="0; url=/logout.php?sound=yes">';
}
}
else
{
echo '<meta HTTP-EQUIV="REFRESH" content="0; url=/logout.php">';
}
?>
<meta charset="UTF-8">
<meta http-equiv="Cache-Control" content="private, no-store" />
<meta name="Expires" content="<?php echo $rfc_1123_date;?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="root">
<meta name="robots" content="noindex">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title><?php echo $pagetitle; ?></title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<script src="javascript/jquery.min.js"></script>
<script src="javascript/jquery.jcrop.min.js"></script>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/jquery.jcrop.css" type="text/css" />
<?php /* <link rel="stylesheet" href="css/jcrop.main.css" type="text/css" /> */ ?>
<style>
/*drop downs*/
/* -------------------- Select Box Styles: bavotasan.com Method (with special adaptations by ericrasch.com) */
/* -------------------- Source: http://bavotasan.com/2011/style-select-box-using-only-css/ */
.styled-select {
background: url(images/15xvbd5.png) no-repeat 90% 0;
height: 25px;
overflow: hidden;
width:70px;
}
.styled-select select {
background: transparent;
border: none;
font-size: 13px;
font-weight: bold;
height: 29px;
padding: 0px; /* If you add too much padding here, the options wont show in IE */
width: 66px;
}
.styled-select.slate {
background: url(images/2e3ybe1.jpg) no-repeat right center;
height: 34px;
width: 240px;
}
.styled-select.slate select {
border: 1px solid #ccc;
font-size: 16px;
height: 34px;
width: 268px;
}
/* -------------------- Rounded Corners */
.rounded {
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
}
.semi-square {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
/* -------------------- Colors: Background */
.slate { background-color: #ddd; }
.green { background-color: #779126; }
.blue { background-color: #ddd; }
.yellow { background-color: #eec111; }
.black { background-color: #000; }
/* -------------------- Colors: Text */
.slate select { color: #000; }
.green select { color: #fff; }
.blue select { color: #666; }
.yellow select { color: #000; }
.black select { color: #fff; }
/* -------------------- Select Box Styles: danielneumann.com Method */
/* -------------------- Source: http://danielneumann.com/blog/how-to-style-dropdown-with-css-only/ */
#mainselection select {
border: 0;
color: #EEE;
background: transparent;
font-size: 20px;
font-weight: bold;
padding: 2px 10px;
width: 378px;
*width: 350px;
*background: #58B14C;
-webkit-appearance: none;
}
#mainselection {
overflow:hidden;
width:350px;
-moz-border-radius: 9px 9px 9px 9px;
-webkit-border-radius: 9px 9px 9px 9px;
border-radius: 9px 9px 9px 9px;
box-shadow: 1px 1px 11px #330033;
background: #58B14C url("images/15xvbd5.png") no-repeat scroll 319px center;
}
/* -------------------- Select Box Styles: stackoverflow.com Method */
/* -------------------- Source: http://stackoverflow.com/a/5809186 */
select#soflow, select#soflow-color {
-webkit-appearance: button;
-webkit-border-radius: 2px;
-webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
-webkit-padding-end: 20px;
-webkit-padding-start: 2px;
-webkit-user-select: none;
background-image: url(images/15xvbd5.png), -webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5);
background-position: 97% center;
background-repeat: no-repeat;
border: 1px solid #AAA;
color: #555;
font-size: inherit;
margin: 20px;
overflow: hidden;
padding: 5px 10px;
text-overflow: ellipsis;
white-space: nowrap;
width: 300px;
}
select#soflow-color {
color: #fff;
background-image: url(images/15xvbd5.png), -webkit-linear-gradient(#779126, #779126 40%, #779126);
background-color: #779126;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
padding-left: 15px;
}
/* begin overlay , pinned menu*/
/* body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}*/
.top-container {
background-color: #f1f1f1;
padding: 0px;
text-align: center;
}
.header {
padding: 0px 16px;
background: #FFF;
color: #f1f1f1;
}
.content {
padding: 0px;
}
.sticky {
position: fixed;
top: 0;
width: 100%;
z-index: 1;
}
.sticky + .content {
padding-top: 2px;
}
/* end overlay */
</style>
</head>
<body>
<table id='page_header'><tr><td>
<a href='/airscan.php'>
<img id='logo' src='/images/AirScan.png' alt='AirScan'>
</a></td>
</tr>
<tr><td><hr></td></tr><tr><td>
<?php
list($imgwidth, $imgheight, $imgtype, $imgattr) = getimagesize($userpath.$_GET['image']);
$exif = exif_read_data($userpath.$_GET['image']);
$xres = eval('return '.$exif["XResolution"].';');
$yres = eval('return '.$exif["YResolution"].';');
if ((!is_numeric($yres)) || (!is_numeric($xres)))
{
$resolution=$dpierror;
}
elseif ((is_numeric($yres)) || (is_numeric($xres)))
{
$resolution=$xres.' x '.$yres.$dpi;
}
else
{
$resolution=$dpierror;
}
if ((!isset($_GET['crop_x'])) || (!isset($_GET['crop_y'])) || (!isset($_GET['width'])) || (!isset($_GET['height']))) //crop_x=104&crop_y=27&width=452&height
{
include_once 'livemenu.php';
}
else
{
}
?>
</td></tr>
</table>
<center>
<?php
if ((!isset($_GET['crop_x'])) || (!isset($_GET['crop_y'])) || (!isset($_GET['height'])) || (!isset($_GET['width'])))
{
if ($showtips=='yes')
{
echo '<span style="color:#A80; font-weight:bold">'.$mancroptip1.'</span>';
}
else
{
}
?>
<span style="color:#666; font-weight:bold"><?php echo $cropping;?> <?php echo $filename;?>
<br/><?php echo $imgwidth;?> x <?php echo $imgheight.$pixels;?> <?php echo $resolution;?></span><br/>
<span style="color:#666; font-weight:bold"><p><?php echo $mancroptxt;?></p></span>
<?php
if ($_SESSION['password'] != 'PAM')
{
echo '<img style="z-index: 0" id="cropbox" src="'.$userpath.$filename.'"/>';
}
elseif ($_SESSION['password'] == 'PAM')
{
$b64image = base64_encode(file_get_contents($userpath.$filename));
echo "<img id='cropbox' class='js-img' src = 'data:image/$mimeext;base64,$b64image' download='$image' alt='$image' style='z-index: 0 width:$fileopwidth;max-width:$fileopmaxwidth;height:$fileopheight;max-height:$fileopmaxheight'/>";
}
?>
<span style="color:#666; font-weight:bold"><p><?php echo $mancroptxt2;?></p></span>
<table border=0><tr><td colspan=3><center>
<form action="mancrop.php" enctype="multipart/form-data" method="get">
<input name="image" type="hidden" value="<?php echo $filename; ?>" />
<input id="crop_x" name="crop_x" type="hidden" value="0" />
<input id="crop_y" name="crop_y" type="hidden" value="0" />
<input id="width" name="width" type="text" style="width: 45px; height: 15px; color:#666; background-color: #DDD; font-weight:bold" value="" /><span style="color:#666; font-weight:bold"><?php echo $widthtxt.' x';?></span>
<input id="height" name="height" type="text" style="width: 45px; height: 15px; color:#666; background-color: #DDD; font-weight:bold" value="" /><span style="color:#666; font-weight:bold"><?php echo $heighttxt ;?></span><br/>
</center></td></tr><tr><td colspan=3> </td></tr>
<tr><td colspan=3>
<table style="width: 100%; text-align:center; border: 0px solid black;">
<tr><td style="text-align: center">
<input type="text" id="newname" name="newname" value="<?php echo $basename.$mcrop;?>"style="width: 160px; height: 15px; color:#666; background-color: #DDD; font-weight:bold">
</td><td>
<span style="color:#666; font-weight:bold">.</span></td><td>
<div class="styled-select blue semi-square"><select name="newext">
<?php
// above was ; font-weight:bold" placeholder="Enter height..." onblur="calc
//if ($ext=='jpg') //from jpg
//{
echo '<option value="gif"'; //start to gif
if ($ext=="gif")
{
echo ' selected ';
}
else
{
echo '';
}
echo '>gif</option>
<option value="jpg"'; //start to jpg
if ($ext=="jpg")
{
echo ' selected ';
}
else
{
echo '';
}
echo '>jpg</option>
<option value="pdf"'; //start to pdf
if ($ext=="pdf")
{
echo ' selected ';
}
else
{
echo '';
}
echo '>pdf</option>
<option value="png"'; //start to png
if ($ext=="png")
{
echo ' selected ';
}
else
{
echo '';
}
echo '>png</option>';
?>
</div></td></tr></table>
</td></tr><tr><td colspan=3> </td></tr><tr><td>
<input type="submit" value="<?php echo $confirm; ?>" /></form>
</td>
<td><span style="color:#666; font-weight:bold"> </span></td><td>
<?php
//echo $_GET['return'];
if ($_GET['return'] !='airscan.php')
{
echo '<form method="post" action="'.$userpath.'index.php?rand='.$rand.'#'.$_GET['image'].'"><input type="submit" value="'.$cancel.'"></form></td></tr></table>';
}
elseif ($_GET['return'] =='airscan.php')
{
///echo'cccc';
list($path, $query_string) = explode('?', $url, 2);
// parse the query string
parse_str($query_string, $params);
// delete image param
//unset($params['image']);
// change the print param
//$params['image'] = $blackwhitefile;
$params['rand'] = $rand;
// rebuild the query
$query_string = http_build_query($params);
// reassemble the URL
$urlvars = $path . '?' . $query_string;
//echo $urlvars;
echo '<form method="post" action="airscan.php'.$urlvars.'"><input type="submit" value="'.$cancel.'"></form></td></tr></table>';
//echo ' <form method="post" action="'.$userpath.'index.php"><input type="submit" value="'.$cancel.'"></form></td></tr></table>';
}
?>
<br/><center>
</center>
<?php include'footer.inc.php';?>
<?php /*
$("#crop_x").Math.round(val(cropbox.x));
$("#crop_y").Math.round(val(cropbox.y));
$("#width").Math.round(val(cropbox.w));
$("#height").Math.round(val(cropbox.h));
$("#crop_x").val(Math.round(cropbox.x));
$("#crop_y").val(Math.round(cropbox.y));
$("#width").val(Math.round(cropbox.w));
$("#height").val(Math.round(cropbox.h));
*/
//echo $basename;
?>
<script>
$(function() {
$('#cropbox').Jcrop({ boxWidth: <?php echo $boxwidth;?>, boxHeight: <?php echo $boxheight;?> });
});
$(document).ready(function()
{
// Update co-ordinates
function updateCoordinates(cropbox)
{
$("#crop_x").val(Math.round(cropbox.x));
$("#crop_y").val(Math.round(cropbox.y));
$("#width").val(Math.round(cropbox.w));
$("#height").val(Math.round(cropbox.h));
}
// Attach jCrop
$("#cropbox").Jcrop({
<?php echo (isset($_POST['aspect_ratio']) ? 'aspectRatio: ' . ((float)$_POST['width'] / (float)$_POST['height']) . ',' : ''); ?>
onChange: updateCoordinates,
onSelect: updateCoordinates
});
});
-->
</script>
<?php
}
if ((isset($_GET['image'])) && (isset($_GET['crop_x'])) && (isset($_GET['crop_y'])) && (isset($_GET['height'])) && (isset($_GET['width'])))
{
echo '<center><p><span style="color:#666; font-weight:bold">'.$waitcroppingtxt.'... '.$filename.' '.$to.' '.$_GET['newname'].'.'.$_GET['newext'].'</span></p></center>';
echo '<center><img src="images/spinner.gif"></center>';
//$mcropcmd=$imagemagicklocation.' '.$_SESSION['userpath'].$filename.' -crop '.$_GET["width"].'x'.$_GET["height"].'+'.$_GET["crop_x"].'+'.$_GET['crop_y'].' +repage '.$_SESSION['userpath'].$newcrop;
ob_flush();
flush();
shell_exec("$mcropcmd");
if ($_SESSION['password']=='PAM')
{
sleep("$chmodsleep");
shell_exec("$chmod");
}
else
{
}
//echo $mcropcmd;
}
?></center>
<?php include_once 'livemenujs.php';?>
</body>
</html>