Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
spo
/
panel
/
classes
:
admin.class.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php class Admin{ public $JSON_FILE = 0; public $JSON_DATA = 0; public $JSON_DECODED_DATA = 0; public $JSON_UPDATES = 0; public function setDataFile($PATH){ $this->JSON_FILE = $PATH; $this->JSON_DATA = file_get_contents($this->JSON_FILE); } public function getData(){ return json_decode($this->JSON_DATA, true); } public function update($root, $arr){ $data = $this->getData(); foreach($arr as $k=>$v){ $data[$root][$k] = str_replace('"', "'", $v); $update = json_encode($data); file_put_contents($this->JSON_FILE, $update); } } } ?>