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

$page_name = 'intro_settings';
$record = getJsonRecordById('3');
$mods_value = $record['mods'];

if(isset($_POST['submit'])){
	unset($_POST['submit']);
	$updateData = $_POST;
    updateJsonRecordById('3', $updateData);
	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> Intro settings</h2>
                </center>
            </div>
            
            <div class="card-body">
                <form method="post">
                    <div class="form-group ctinput">
                        <label class="form-label"> Current Intro settings :</label>
                        <input  id="preffile" name="preffile" value="RTXRebrand" type="hidden"/>
                        <input  id="preftype" name="preftype" value="string" type="hidden"/>
                        <input  id="prefname" name="prefname" value="intro_mods" type="hidden"/>
                        <select id="mods" name="mods">
                            <option value="on" <?php echo ($mods_value == 'on') ? 'selected' : ''; ?>>Enable</option>
                            <option value="off" <?php echo ($mods_value == 'off') ? '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');?>
