$lang = "en"; $pageId = $id%100; } if ($id == 0) { $page .= "index.html"; } else { $array = getPages($lang); $page .= $lang . "/"; $page .= $array[$pageId - 1]; $page .= ".html"; } return $page; } $chosenPage = getIt($_REQUEST['id']); $pageName = $_REQUEST['url']; echo $pageName; ?> </span> </h1> <br/> <h1>Gestionar las fotos:</h1> <?php include("manageFotos.php"); ?> <h1> Editar contenidos: <div id="imgLoader" style="color:red;">
if (isset($GLOBALS["HTTP_RAW_POST_DATA"])) { $number = getLastId(); $sitrng = "poczekalnia/z" . "{$number}" . ".png"; // Get the data $imageData = $GLOBALS['HTTP_RAW_POST_DATA']; // Remove the headers (data:,) part. // A real application should use them according to needs such as to check image type $filteredData = substr($imageData, strpos($imageData, ",") + 1); // Need to decode before saving since the data we received is already base64 encoded $unencodedData = base64_decode($filteredData); //echo "unencodedData".$unencodedData; // Save file. This example uses a hard coded filename for testing, // but a real application can specify filename in POST variable $fp = fopen($sitrng, 'wb'); fwrite($fp, $unencodedData); fclose($fp); add($sitrng, $_COOKIE['words'], $_COOKIE['author'], $_COOKIE['nick'], $_COOKIE['book'], $_COOKIE['tag']); setcookie("words", "", time()); $files = glob('upload/*'); // get all file names foreach ($files as $file) { // iterate files if (is_file($file)) { unlink($file); } // delete file } } } getIt(); echo "<script> document.location.href='poczekalnia.php';</script>";