Permalink
Browse files

Update index.php

  • Loading branch information...
FinlayDaG33k committed Mar 7, 2017
1 parent f1d532c commit 2366291048c58fbcacb521655647f2e006d59a1d
Showing with 10 additions and 1 deletion.
  1. +10 −1 index.php
@@ -1,15 +1,24 @@
<?php
error_reporting(E_ALL);
print_r();
function update($data){
for($i = 0;$i <= count($data);$i++){
$data['buildings'][$i]['isUnderConstruction'] = 0;
$data['buildings'][$i]['constructionCounter'] = 0;
$data['buildings'][$i]['constructionPercentage'] = 0;
$data['buildings'][$i]['constructionProgress'] = null;
$data['buildings'][$i]['constructionTotal'] = 0;
$data['buildings'][$i]['constructionCounter'] = 0;
}
return $data;
}
if (!empty($_FILES)){
$mcz = json_decode(base64_decode(file_get_contents($_FILES['mcz']['tmp_name'])),1);
echo json_encode($mcz['buildings']);
echo json_encode(update($mcz['buildings']));
}else{
?>

0 comments on commit 2366291

Please sign in to comment.