Home Files
Adminer
Execute Command
PHP Eval
Symlink
File Upload
Owner :
www-data
PHP Version
8.1.8
Disk Space
203.89 GB
Server Addr
171.9.3.2
Your IP
171.9.3.1
Edit File
File:
<?php class Graficos { function jsonCreat ($json, $data, $sql, $arrayCor = null) { if ($arrayCor == null) { $ArrayCoresP = array(0 => "#27ae60", 1 => "#f39c12", 2 => "#2980b9", 3 => "#1abc9c", 4 => "#34495e", 5 => "#e74c3c", 6 => "#8e44ad", 7 => "#e67e22", 8 => "#7f8c8d"); } else { $ArrayCoresP = $arrayCor; } while ($dtGraf = $sql->resultado($data)) { $graf[] = array ('value' => $dtGraf['CONTAR'] , 'label' => substr($dtGraf['Descricao'], 0, 16) ); } $grafico = array( 'dados' => $graf, 'color' => $ArrayCoresP ); $this->jsonSave($json, $grafico); } function jsonSave($json, $grafico) { $fileJson = 'cache/'.$json.'.json'; $json_estatistica = json_encode($grafico); $fh = fopen($fileJson, 'w'); fwrite($fh, $json_estatistica); fclose($fh); } }