diff --git a/encoder/app.php b/encoder/app.php index ac1280b..9795d66 100644 --- a/encoder/app.php +++ b/encoder/app.php @@ -272,13 +272,13 @@ include 'header.php';

Upload Ad (PNG)

- +
New file selected
- +
diff --git a/encoder/image.php b/encoder/image.php index fca1933..ad2f499 100644 --- a/encoder/image.php +++ b/encoder/image.php @@ -21,6 +21,17 @@ if (isset($_POST['submit']) || isset($_POST['display'])) { ]; $secondary_dir = '/var/www/encoder/'; + if (isset($_POST['app_ad_url'])) { + $current_json = []; + if (file_exists($json_file)) { + $current_json = json_decode(file_get_contents($json_file), true) ?? []; + } + $current_json['app_ad_url'] = $_POST['app_ad_url']; + if (!file_put_contents($json_file, json_encode($current_json, JSON_PRETTY_PRINT))) { + $errors[] = "Failed to update app.json with the new URL."; + } + } + $errors = []; // Handle File Deletions @@ -196,12 +207,19 @@ include 'header.php';

App Ad (256x256)

+ +
+ + +
- +
- +