CMS
Version 3.9
save_image.inc
Go to the documentation of this file.
1
<?php
2
3
$image
=
$_POST
[
"img"
];
4
$filename
= checkIdentifier(
$_POST
[
"filename"
]);
5
6
trace(
$image
, 3);
7
8
$image
= str_replace(array(
";"
,
","
), array(
":"
,
":"
),
$image
);
9
10
list($protocol,
$mimeType
,$encoding,$data) = explode(
":"
,
$image
);
11
12
13
if
($encoding ==
"base64"
)
14
{
15
$data = base64_decode($data);
16
}
17
18
header(
"Pragma: private"
);
19
header(
"Content-Disposition: attachment;filename=\"{$filename}.png\""
);
20
header(
"Cache-Control: must-revalidate"
);
21
header(
"Content-Type: $mimeType"
);
22
echo $data;
23
?>
$_POST
$_POST["owner_id"]
Definition:
blog_form.inc:54
$mimeType
$mimeType
Definition:
download.inc:43
$filename
$filename
Definition:
save_image.inc:4
$image
$image
Definition:
save_image.inc:3
code
cms.sonjara.com
cms
components
svg_charts
handlers
save_image.inc
Generated on Tue Mar 23 2021 15:36:14 for CMS by
1.9.1