-
Notifications
You must be signed in to change notification settings - Fork 10
/
upload.php
48 lines (44 loc) · 1.25 KB
/
upload.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
<?php
// disable error if you want
//error_reporting(0);
include_once('includes/config.php');
include_once('includes/functions.php');
if ($_GET['act'] == 'thumb') {
$arr = array(
'uploaddir' => $imgthumb,
'tempdir' => $imgtemp,
'height' => $_POST['height'],
'width' => $_POST['width'],
'x' => $_POST['x'],
'y' => $_POST['y'],
'img_src' => $_POST['img_src'],
'thumb' => true,
'fileError' => $fileError,
'sizeError' => $sizeError,
'maxfilesize' => $maxuploadfilesize,
'canvasbg' => $canvasbg,
'bigWidthPrev' => $bigWidthPrev,
'bigHeightPrev' => $bigHeightPrev,
);
resizeThumb($arr);
exit;
} elseif ($_GET['act'] == 'upload') {
$big_arr = array(
'uploaddir' => $imgbig,
'tempdir' => $imgtemp,
'height' => $_POST['height'],
'width' => $_POST['width'],
'x' => 0,
'y' => 0,
'thumb' => false,
'fileError' => $fileError,
'sizeError' => $sizeError,
'maxfilesize' => $maxuploadfilesize,
'canvasbg' => $canvasbg,
'bigWidthPrev' => $bigWidthPrev,
'bigHeightPrev' => $bigHeightPrev,
);
resizeImg($big_arr);
} else {
//nothing to do here
}