Add DrawTown (2)
|
Before Width: | Height: | Size: 507 KiB |
|
Before Width: | Height: | Size: 878 KiB |
|
Before Width: | Height: | Size: 573 KiB |
|
Before Width: | Height: | Size: 1 MiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 1 MiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 679 KiB |
|
Before Width: | Height: | Size: 620 KiB |
|
Before Width: | Height: | Size: 1 MiB |
|
|
@ -8,14 +8,14 @@ if(isset($_POST["i"]) && isset($_POST["t"]) && isset($_SESSION["ts_user"])){
|
|||
$id = rand(1000,3999);
|
||||
$arry = array("from"=>$_SESSION["ts_user"],"time"=>time(),"src"=>"default","title"=>$_POST["t"]);
|
||||
$aencode = json_encode($arry);
|
||||
if(!(file_exists("data/".$id.".json"))){
|
||||
//if(!(file_exists("data/".$id.".json"))){
|
||||
file_put_contents("data/".$id.".json",$aencode);
|
||||
list($type, $data) = explode(';', $data);
|
||||
list(, $data) = explode(',', $data);
|
||||
$data = base64_decode($data);
|
||||
|
||||
file_put_contents('out/'.$id.'.png', $data);
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||