diff --git a/Readme.md b/Readme.md index 92016e1..49c8a13 100755 --- a/Readme.md +++ b/Readme.md @@ -1,7 +1,7 @@ Urmi Universal Encoder Decoder ( INTELQSV ) ---------------------------------------- -H264 - H265 Encoder +H264 - H265 - Encoder/Decoder HLS - DASH - RTMP - SRT - UDP - HTTPS - FFMPEG Output Support Instalation diff --git a/encoder/app.php b/encoder/app.php new file mode 100644 index 0000000..2411e62 --- /dev/null +++ b/encoder/app.php @@ -0,0 +1,153 @@ + + +
+

Company Information Entry

+
+
+ +
+ + +
+
+ + +
+ + +
+ + +
+ + +
+ Enforcement Officer + +
+
+ + +
+ + +
+ + +
+
+ + +
+
+ + +
+ + +
+ + + +
+ Current Ad: + Current Ad +
+ +
+
+ + + +
+ Current Logo: + Current Logo +
+ +
+
+ +
+ +
+
+ + '/var/www/html/app_ad.png', + 'app_logo' => '/var/www/html/app_logo.png' + ]; + + $errors = []; + + foreach ($upload_paths as $input_name => $destination) { + if (isset($_FILES[$input_name]) && $_FILES[$input_name]['error'] == 0) { + $ext = pathinfo($_FILES[$input_name]['name'], PATHINFO_EXTENSION); + if (strtolower($ext) !== 'png') { + $errors[] = "File for $input_name must be a PNG."; + } else { + if (move_uploaded_file($_FILES[$input_name]['tmp_name'], $destination)) { + echo "
$input_name uploaded successfully.
"; + } else { + $errors[] = "Failed to upload $input_name. Check folder permissions."; + } + } + } + } + + // Save text data to JSON + $text_fields = [ + 'channel_name', 'office_address', 'contact_details', 'enforcement_officer', + 'eo_contact_details', 'company_name', 'cin_number', 'gstin_number' + ]; + + $data_to_save = []; + foreach ($text_fields as $field) { + $data_to_save[$field] = $_POST[$field] ?? ''; + } + + if (empty($errors)) { + if (file_put_contents($json_file, json_encode($data_to_save, JSON_PRETTY_PRINT))) { + echo "
All data and files processed successfully!
"; + // Refresh to show updated data in form + echo ""; + } else { + $errors[] = "Failed to save JSON data. Check folder permissions."; + } + } + + if (!empty($errors)) { + foreach ($errors as $error) { + echo "
$error
"; + } + } + } + ?> +
+ + \ No newline at end of file