forked from qwerty/milfs
24 lines
782 B
PHP
24 lines
782 B
PHP
|
<?php
|
||
|
function marcador_grabar($formulario) {
|
||
|
$respuesta = new xajaxResponse('utf-8');
|
||
|
$resultado = "Hola mundo ".$formulario[498][0]."--- $formulario[debugConsole] ---";
|
||
|
$imgData = str_replace(' ','+',$formulario['debugConsole']);
|
||
|
$imgData = substr($imgData,strpos($imgData,",")+1);
|
||
|
$imgData = base64_decode($imgData);
|
||
|
// Path where the image is going to be saved
|
||
|
$nombre= MD5(rand().time());
|
||
|
$filePath = "milfs/tmp/".$nombre.".png";
|
||
|
// Write $imgData into the image file
|
||
|
$file = fopen($filePath, 'w');
|
||
|
fwrite($file, $imgData);
|
||
|
fclose($file);
|
||
|
|
||
|
|
||
|
$respuesta->addAssign("aviso","innerHTML","$resultado");
|
||
|
//$respuesta->addAlert("$resultado");
|
||
|
//$respuesta->addScript("javascript:location.reload(true);");
|
||
|
return $respuesta;
|
||
|
}
|
||
|
$xajax->registerFunction("marcador_grabar");
|
||
|
|
||
|
?>
|