1234567891011121314151617181920212223242526272829 |
- <?php
-
- header('Content-Type: application/json; charset=UTF-8');
-
-
-
- if ($_SERVER['REQUEST_METHOD'] == "GET") {
- create();
- } else if ($_SERVER['REQUEST_METHOD'] == "POST") {
- create();
- }
-
- function create() {
-
-
-
- $json = json_decode(file_get_contents("settings"), true);
-
- $json['web_lang'] = $_GET['lang'];
-
- file_put_contents("settings", json_encode($json));
- exec("cp settings /Storage/settings");
- shell_exec('sync;sync;sync');
-
- header('Location: ' . $_SERVER['HTTP_REFERER']);
- }
- ?>
|