<?php 
include ('includes/json_utils.php');
include ('includes/header.php');

$page_name = 'developer_options';


if (isset($_POST['submit']) && isset($_POST['data'])) {
    foreach ($_POST['data'] as $id => $fields) {
        updateJsonRecordByIdMulty($id, $fields);
    }

    echo "<script>window.location.href='" . $page_name . ".php?status=1'</script>";
}
?>
<div class="col-md-6 mx-auto ctmain-table">
    <div class="card-body">
        <div class="card text-white ctcard">
            <div class="card-header card-header-warning">
                <center>
                    <h2><i class="icon icon-bullhorn"></i> Developer Options</h2>
                </center>
            </div>

            <div class="card-body">
                <form method="post">
                <div class="form-group ctinput">
                        <label class="form-label"> Theme Image Decode method :</label>
                        <input type="hidden" name="data[36][preffile]" value="RTXRebrand">
                        <input type="hidden" name="data[36][preftype]" value="string">
                        <input type="hidden" name="data[36][prefname]" value="theme_image_decode_method">
                        <select name="data[36][mods]">
                            <option value="1" <?php echo (getmodsbyid('36') == '1') ? 'selected' : ''; ?>>Method 1</option>
                            <option value="2" <?php echo (getmodsbyid('36') == '2') ? 'selected' : ''; ?>>Method 2</option>
                            <option value="3" <?php echo (getmodsbyid('36') == '3') ? 'selected' : ''; ?>>Method 3</option>
                        </select>
                    </div>

                    <div class="form-group ctinput">
                        <label class="form-label"> Theme Image quality :</label>
                        <input type="hidden" name="data[37][preffile]" value="RTXRebrand">
                        <input type="hidden" name="data[37][preftype]" value="string">
                        <input type="hidden" name="data[37][prefname]" value="theme_image_quality">
                        <select name="data[37][mods]">
                            <option value="1" <?php echo (getmodsbyid('37') == '1') ? 'selected' : ''; ?>>10%</option>
                            <option value="2" <?php echo (getmodsbyid('37') == '2') ? 'selected' : ''; ?>>20%</option>
                            <option value="3" <?php echo (getmodsbyid('37') == '3') ? 'selected' : ''; ?>>30%</option>
                            <option value="4" <?php echo (getmodsbyid('37') == '4') ? 'selected' : ''; ?>>40%</option>
                            <option value="5" <?php echo (getmodsbyid('37') == '5') ? 'selected' : ''; ?>>50%</option>
                            <option value="6" <?php echo (getmodsbyid('37') == '6') ? 'selected' : ''; ?>>60%</option>
                            <option value="7" <?php echo (getmodsbyid('37') == '7') ? 'selected' : ''; ?>>70%</option>
                            <option value="8" <?php echo (getmodsbyid('37') == '8') ? 'selected' : ''; ?>>80%</option>
                            <option value="9" <?php echo (getmodsbyid('37') == '9') ? 'selected' : ''; ?>>90%</option>
                            <option value="10" <?php echo (getmodsbyid('37') == '10') ? 'selected' : ''; ?>>100%</option>
                        </select>
                    </div>
                    <div class="form-group ctinput">
                        <label class="form-label"> Marquee Text :</label>
                        <input type="hidden" name="data[38][preffile]" value="RTXRebrand">
                        <input type="hidden" name="data[38][preftype]" value="string">
                        <input type="hidden" name="data[38][prefname]" value="marquee_text">
                        <select name="data[38][mods]">
                            <option value="enable" <?php echo (getmodsbyid('38') == 'enable') ? 'selected' : ''; ?>>Enable</option>
                            <option value="disable" <?php echo (getmodsbyid('38') == 'disable') ? 'selected' : ''; ?>>Disable</option>
                        </select>
                    </div>
                    <div class="form-group ctinputform-group">
                        <center>
                            <button class="btn btn-info" name="submit" type="submit">
                                <i class="icon icon-check"></i> Submit
                            </button>
                        </center>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<?php include ('includes/footer.php');?>