<?php 
$jsondata = file_get_contents("./api/main.json");
$data = json_decode($jsondata, true);
$json = $data['app'];
$message = '<div class="alert alert-success" id="flash-msg"><h4><i class="icon fa fa-check"></i>Items Updated!</h4></div>';
if(isset($_POST['submit_support'])){
$jsonData = file_get_contents("./api/main.json");  
$arrayData = json_decode($jsonData, true);
if(empty($_POST["announcement_enabled"]    )){$announcement_enabled       = 'no';}else { $announcement_enabled          = $_POST["announcement_enabled"]    ;}
if(empty($_POST["message_enabled"]   )){$message_enabled      = 'no';}else { $message_enabled       					= $_POST["message_enabled"]   ;}
if(empty($_POST["updateuserinfo_enabled"]   )){$updateuserinfo_enabled      = 'no';}else { $updateuserinfo_enabled      = $_POST["updateuserinfo_enabled"]   ;}
if(empty($_POST["check_btn_signup"]   )){$btn_signup      = 'no';}else { $btn_signup      = $_POST["btn_signup"]   ;}

$replacementData = array('app' => array(
	'announcement_enabled' => $announcement_enabled,
	'message_enabled' 	=> $message_enabled,
	'updateuserinfo_enabled' => $updateuserinfo_enabled,
        'appname'			=>	$_POST['appname'],
        'customerid'		=>	$_POST["customerid"],
        'expire'		=>	$_POST["expire"],
	'version_code'			=>	$_POST['version_code'],  
	'support_email'		=>	$_POST["support_email"],  
	'support_phone'		=>	$_POST["support_phone"],
	'btn_signup' => $btn_signup ));
$newArrayData = array_replace_recursive($arrayData, $replacementData);
$newJsonData = json_encode($newArrayData, JSON_PRETTY_PRINT);
file_put_contents("./api/main.json", $newJsonData);
header("Location: app.php?message=$message");
		}
if(isset($_POST['submit'])){
$jsonData = file_get_contents("./api/main.json");  
$arrayData = json_decode($jsonData, true);
$replacementData = array('app' => array(

	'portal'		=>	$_POST['portal'],
	'portal2'		=>	$_POST["portal2"],  
	'portal3'		=>	$_POST["portal3"],  
	'portal_name'		=>	$_POST["portal_name"],
	'portal2_name'		=>	$_POST["portal2_name"],  
	'portal3_name'		=>	$_POST["portal3_name"], 
	'portal_vod'	=>	$_POST["portal_vod"], 
	'portal_series'	=>	$_POST["portal_series"],
	'epg_url'	=>	$_POST["epg_url"],
	'ovpn_url'	=>	$_POST["ovpn_url"] ));
$newArrayData = array_replace_recursive($arrayData, $replacementData);
$newJsonData = json_encode($newArrayData, JSON_PRETTY_PRINT);
file_put_contents("./api/main.json", $newJsonData);
header("Location: app.php?message=$message");
		}
		
if(isset($_POST['submit_app_custom'])){
$jsonData = file_get_contents("./api/main.json");  
$arrayData = json_decode($jsonData, true);

if(empty($_POST["btn_live"]    )){$btn_live       = 'No';}else { $btn_live        = $_POST["btn_live"]    ;}
if(empty($_POST["btn_live2"]   )){$btn_live2      = 'No';}else { $btn_live2       = $_POST["btn_live2"]   ;}
if(empty($_POST["btn_live3"]   )){$btn_live3      = 'No';}else { $btn_live3       = $_POST["btn_live3"]   ;}
if(empty($_POST["btn_vod"]     )){$btn_vod        = 'No';}else { $btn_vod         = $_POST["btn_vod"]     ;}
if(empty($_POST["btn_vod2"]    )){$btn_vod2       = 'No';}else { $btn_vod2        = $_POST["btn_vod2"]    ;}
if(empty($_POST["btn_vod3"]    )){$btn_vod3       = 'No';}else { $btn_vod3        = $_POST["btn_vod3"]    ;}
if(empty($_POST["btn_epg"]     )){$btn_epg        = 'No';}else { $btn_epg         = $_POST["btn_epg"]     ;}
if(empty($_POST["btn_epg2"]    )){$btn_epg2       = 'No';}else { $btn_epg2        = $_POST["btn_epg2"]    ;}
if(empty($_POST["btn_epg3"]    )){$btn_epg3       = 'No';}else { $btn_epg3        = $_POST["btn_epg3"]    ;}
if(empty($_POST["btn_series"]  )){$btn_series     = 'No';}else { $btn_series      = $_POST["btn_series"]  ;}
if(empty($_POST["btn_series2"] )){$btn_series2    = 'No';}else { $btn_series2     = $_POST["btn_series2"] ;}
if(empty($_POST["btn_series3"] )){$btn_series3    = 'No';}else { $btn_series3     = $_POST["btn_series3"] ;}
if(empty($_POST["btn_radio"]   )){$btn_radio      = 'No';}else { $btn_radio       = $_POST["btn_radio"]   ;}
if(empty($_POST["btn_radio2"]  )){$btn_radio2     = 'No';}else { $btn_radio2      = $_POST["btn_radio2"]  ;}
if(empty($_POST["btn_radio3"]  )){$btn_radio3     = 'No';}else { $btn_radio3      = $_POST["btn_radio3"]  ;}
if(empty($_POST["btn_catchup"] )){$btn_catchup    = 'No';}else { $btn_catchup     = $_POST["btn_catchup"] ;}
if(empty($_POST["btn_catchup2"])){$btn_catchup2   = 'No';}else { $btn_catchup2    = $_POST["btn_catchup2"];}
if(empty($_POST["btn_catchup3"])){$btn_catchup3   = 'No';}else { $btn_catchup3    = $_POST["btn_catchup3"];}
if(empty($_POST["btn_account"] )){$btn_account    = 'no';}else { $btn_account     = $_POST["btn_account"] ;}
if(empty($_POST["btn_account2"])){$btn_account2   = 'no';}else { $btn_account2    = $_POST["btn_account2"];}
if(empty($_POST["btn_account3"])){$btn_account3   = 'no';}else { $btn_account3    = $_POST["btn_account3"];}
if(empty($_POST["btn_rec"]     )){$btn_rec        = 'no';}else { $btn_rec         = $_POST["btn_rec"]     ;}
if(empty($_POST["show_expire"]     )){$show_expire        = 'no';}else { $show_expire         = $_POST["show_expire"]     ;}
if(empty($_POST["ms"]          )){$ms             = 'no';}else { $ms              = $_POST["ms"]          ;}
if(empty($_POST["btn_noti"]          )){$btn_noti             = 'no';}else { $btn_noti              = $_POST["btn_noti"]          ;}
if(empty($_POST["btn_vpn"]          )){$btn_vpn             = 'no';}else { $btn_vpn              = $_POST["btn_vpn"]          ;}
if(empty($_POST["btn_update"]          )){$btn_update             = 'no';}else { $btn_update              = $_POST["btn_update"]          ;}
if(empty($_POST["ms2"]         )){$ms2            = 'no';}else { $ms2             = $_POST["ms2"]         ;}
if(empty($_POST["ms3"]         )){$ms3            = 'no';}else { $ms3             = $_POST["ms3"]         ;}
if(empty($_POST["btn_fav"]     )){$btn_fav        = 'no';}else { $btn_fav         = $_POST["btn_fav"]     ;}
if(empty($_POST["btn_fav2"]    )){$btn_fav2       = 'no';}else { $btn_fav2        = $_POST["btn_fav2"]    ;}
if(empty($_POST["btn_fav3"]    )){$btn_fav3       = 'no';}else { $btn_fav3        = $_POST["btn_fav3"]    ;}

$replacementData = array('app' => array(
        "btn_live"         =>	$btn_live      ,
        "btn_live2"        =>	$btn_live2     ,
        "btn_live3"        =>	$btn_live3     ,
        "btn_vod"          =>	$btn_vod       ,
        "btn_vod2"         =>	$btn_vod2      ,
        "btn_vod3"         =>	$btn_vod3      ,
        "btn_epg"          =>	$btn_epg       ,
        "btn_epg2"         =>	$btn_epg2      ,
        "btn_epg3"         =>	$btn_epg3      ,
        "btn_series"       =>	$btn_series    ,
        "btn_series2"      =>	$btn_series2   ,
        "btn_series3"      =>	$btn_series3   ,
        "btn_radio"        =>	$btn_radio     ,
        "btn_radio2"       =>	$btn_radio2    ,
        "btn_radio3"       =>	$btn_radio3    ,
        "btn_catchup"      =>	$btn_catchup   ,
        "btn_catchup2"     =>	$btn_catchup2  ,
        "btn_catchup3"     =>	$btn_catchup3  ,
        "btn_account"      =>	$btn_account   ,
        "btn_account2"     =>	$btn_account2  ,
        "btn_account3"     =>	$btn_account3  ,
        "show_expire"      =>	$show_expire   ,
        "btn_rec"          =>	$btn_rec       ,
        "btn_vpn"          =>	$btn_vpn       ,
        "btn_noti"          =>	$btn_noti       ,
        "btn_update"       =>	$btn_update   ,
        "ms"               =>	$ms            ,
        "ms2"              =>	$ms2           ,
        "ms3"              =>	$ms3           ,
        "btn_fav"          =>	$btn_fav       ,
        "btn_fav2"         =>	$btn_fav2      ,
        "btn_fav3"         =>	$btn_fav3      ));
$newArrayData = array_replace_recursive($arrayData, $replacementData);
$newJsonData = json_encode($newArrayData, JSON_PRETTY_PRINT);
file_put_contents("./api/main.json", $newJsonData);
header("Location: app.php?message=$message");
		}
include ('includes/header.php');
?>



<div class="content-wrapper">
    <div class="container-fluid">
	<?if(isset($_GET['message'])){echo $_GET['message'];}?>
        <div class="row"> 
            <div class="col-xl-4 col-sm-8 mb-3">
                <div class="card text-black ">
                    <div class="card-header">
                        <i class="fa fa-mobile fa-lg"></i> <strong>Detalhes do Aplicativo</strong></div>
                    <div class="card-body">
                        <div class="mr-5">
                            <form method="post">
                                <div class="form-group ">
                                    <label class="control-label " for="select_filter_status">
                                        <div class="alert alert-info" role="alert">
                                            <strong>XCIPTV v4</strong>
                                        </div>
                                    </label>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="appname">
                                       <strong> Nome do Aplicativo:</strong>
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" id="appname" name="appname" value="<?=$json['appname']?>" type="text"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="customerid">
                                     <strong>ID customizado:</strong>
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" name="customerid"  value="<?=$json['customerid']?>" type="text"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="expire">
                                        <strong>Aplicativo expira:</strong>
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" name="expire"  value="<?=$json['expire']?>" type="text"/>
                                    </div>
                                </div>

				<div class="form-group ">
                                    <label class="control-label " for="version_code">
                                       <strong> Versão :</strong>
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" id="version_code" name="version_code" value="<?=$json['version_code']?>" type="text"/>
                                    </div>
                                </div>
				<div class="form-group ">
                                    <label class="control-label " for="announcement_enabled">
                                       <strong> Botão de inscrição ativado?</strong>
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" id="checkbox" name="check_btn_signup" <?=$json['btn_signup']!=='no'?'checked':'' ?>>
                                        <label class="form-check-label" for="announcement_enabled">Sim</label>
                                    </div>
                                </div>
                               <div class="form-group ">
                                 <div class="input-group">
									<label class="control-label " for="btn_signup">
                                       <strong> Botão de URL?</strong>
                                    </label>
                                    <div class="input-group">
                                    <input class="form-control" id="btn_signup" name="btn_signup" type="text" value="<?=$json['btn_signup']?>">
									</div>
                                 </div>
                               </div>
								<div class="form-group ">
                                    <label class="control-label " for="announcement_enabled">
                                       <strong> Anuncios habilitado?</strong>
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="announcement_enabled" id="announcement_enabled" value="yes" <?=$json['announcement_enabled']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="announcement_enabled">Yes</label>
                                    </div>
                                </div>
								<div class="form-group ">
                                    <label class="control-label " for="message_enabled">
                                       <strong> Mensagem de usuario habilitado?</strong>
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="message_enabled" id="message_enabled" value="yes" <?=$json['message_enabled']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="message_enabled">Yes</label>
                                    </div>
                                </div>
								<div class="form-group ">
                                    <label class="control-label " for="updateuserinfo_enabled">
                                        <strong>Atulizaçao usuario habilitado?</strong>
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="updateuserinfo_enabled" id="updateuserinfo_enabled" value="yes" <?=$json['updateuserinfo_enabled']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="updateuserinfo_enabled">Yes</label>
                                    </div>
                                </div>
								<br>
                                <div class="form-group ">
                                    <label class="control-label " for="support_email">
                                       <strong> Suporte 01:</strong> 
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" name="support_email" value="<?=$json['support_email'] ?>" type="text"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="support_phone">
                                        <strong>Suporte 02:</strong>
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" name="support_phone"  value="<?=$json['support_phone']?>" type="text"/>
                                    </div>
                                 </div>
                                <div class="form-group">
                                    <div>
                                        <button class="btn btn-info " name="submit_support" type="submit">
                                            <strong>Atualizar detalhes</strong>
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xl-4 col-sm-8 mb-3">
                <div class="card text-black ">
                    <div class="card-header">
                        <i class="fa fa-address-card"></i> <strong> NOME DO SERVIDOR E DNS</strong></div>
                    <div class="card-body">
                        <div class="mr-5">
                            <form method="post">
                              <div class="form-group ">
                                    <label class="control-label " for="portal_name">
                                        <div class="alert alert-info" role="alert">
                                            <strong>http://yourdns.net:8080</strong>
                                        </div>
                                       <strong> SERVIDOR 01 NOME:</strong>
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" id="portal_name" name="portal_name" placeholder="Portal 1 Name" value=<?=$json['portal_name']=='0'?'0':$json['portal_name'] ?> type="text"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="portal">
                                       <strong> SERVIDOR 01 DNS:</strong> 
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" id="portal" name="portal" placeholder="Poral Address 1" value=<?=$json['portal']=='0'?'0':$json['portal'] ?> type="text"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="portal2_name">
                                        <strong>SERVIDOR 02 NOME:</strong>
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" id="portal2_name" name="portal2_name" placeholder="Portal 2 Name" value=<?=$json['portal2_name']=='0'?'0':$json['portal2_name'] ?> type="text"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="portal2">
                                       <strong> SERVIDOR 02 DNS:</strong>
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" id="portal2" name="portal2" placeholder="Poral Address 2" value=<?=$json['portal2']=='0'?'0':$json['portal2'] ?> type="text"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="portal3_name">
                                       <strong> SERVIDOR 03 NOME:</strong>
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" id="portal3_name" name="portal3_name" placeholder="Portal 3 Name" value=<?=$json['portal3_name']=='0'?'0':$json['portal3_name'] ?> type="text"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="portal3">
                                       <strong> SERVIDOR 03 DNS:</strong>
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" id="portal3" name="portal3" placeholder="Poral Address 3" value=<?=$json['portal3']=='0'?'0':$json['portal3'] ?> type="text"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="portal_vod">
                                        <strong>Customizado VOD DNS:</strong>
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" id="portal_vod" name="portal_vod" placeholder="Custom VOD Portal" value='no' type="text"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="portal_series">
                                       <strong> Customizado Series DNS:</strong>
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" id="portal_series" name="portal_series" placeholder="Custom Series Portal" value='no' type="text"/>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="epg_url">
                                       <strong> Epg Url:</strong>
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" id="epg_url" name="epg_url" placeholder="Epg Url" value='No' type="text"/>    
                                        </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="ovpn_url">
                                        <strong>Vpn Configuração Url:</strong>
                                    </label>
                                    <div class="input-group">
                                        <input class="form-control" id="ovpn_url" name="ovpn_url" placeholder="OpeVpn Config Url" value=<?=$json['ovpn_url']=='0'?'0':$json['ovpn_url'] ?> type="text"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div>
                                        <button class="btn btn-info " name="submit" type="submit">
                                           <strong> Atualizar servidores</strong>
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>            
            <div class="col-xl-4 col-sm-8 mb-3">
                <div class="card text-black ">
                    <div class="card-header">
                        <i class="fa fa-cogs"></i> <strong>CUSTOMIZAÇÃO DO APLICATIVO</strong></div>
                    <div class="card-body">
                        <div class="mr-5">
                            <form method="post">
                                <div class="form-group ">
                                    <label class="control-label " for="btn_live">
                                        Mostrar  <strong>TV AO VIVO</strong> Icone?
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_live" id="btn_live" value="Yes" <?=$json['btn_live']=='Yes'?'checked':'' ?>>
										<label class="form-check-label" for="btn_live">SERVIDOR 01</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_live2" id="btn_live2" value="Yes" <?=$json['btn_live2']=='Yes'?'checked':'' ?>>
										<label class="form-check-label" for="btn_live2">SERVIDOR 02</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_live3" id="btn_live3" value="Yes" <?=$json['btn_live3']=='Yes'?'checked':'' ?>>
										<label class="form-check-label" for="btn_live3">SERVIDOR 03</label>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="btn_epg">
                                        Mostrar <strong>EPG</strong> Icone?
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_epg" id="btn_epg" value="Yes" <?=$json['btn_epg']=='Yes'?'checked':'' ?>>
										<label class="form-check-label" for="btn_epg">SERVIDOR 01</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_epg2" id="btn_epg2" value="Yes" <?=$json['btn_epg2']=='Yes'?'checked':'' ?>>
										<label class="form-check-label" for="btn_epg2">SERVIDOR 02</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_epg3" id="btn_epg3" value="Yes" <?=$json['btn_epg3']=='Yes'?'checked':'' ?>>
										<label class="form-check-label" for="btn_epg3">SERVIDOR 03</label>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="btn_vod">
                                        Mostrar <strong>VOD</strong> Icone?
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_vod" id="btn_vod" value="Yes" <?=$json['btn_vod']=='Yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_vod">SERVIDOR 01</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_vod2" id="btn_vod2" value="Yes" <?=$json['btn_vod2']=='Yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_vod2">SERVIDOR 02</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_vod3" id="btn_vod3" value="Yes" <?=$json['btn_vod3']=='Yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_vod3">SERVIDOR 03</label>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="btn_series">
                                        Mostrar <strong>Series</strong> Icone?
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_series" id="btn_series" value="Yes" <?=$json['btn_series']=='Yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_series">SERVIDOR 01</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_series2" id="btn_series2" value="Yes" <?=$json['btn_series2']=='Yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_series2">SERVIDOR 02</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_series3" id="btn_series3" value="Yes" <?=$json['btn_series3']=='Yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_series3">SERVIDOR 03</label>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="btn_catchup">
                                        Mostrar <strong>Catchup</strong> Icone?
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_catchup" id="btn_catchup" value="Yes" <?=$json['btn_catchup']=='Yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_catchup">SERVIDOR 01</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_catchup2" id="btn_catchup2" value="Yes" <?=$json['btn_catchup2']=='Yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_catchup2">SERVIDOR 02</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_catchup3" id="btn_catchup3" value="Yes" <?=$json['btn_catchup3']=='Yes'?'checked':'' ?>>
										<label class="form-check-label" for="btn_catchup3">SERVIDOR 03</label>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="btn_radio">
                                        Mostrar <strong>Radio</strong> Icone?
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_radio" id="btn_radio" value="Yes" <?=$json['btn_radio']=='Yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_radio">SERVIDOR 01</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_radio2" id="btn_radio2" value="Yes" <?=$json['btn_radio2']=='Yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_radio2">SERVIDOR 02</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_radio3" id="btn_radio3" value="Yes" <?=$json['btn_radio3']=='Yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_radio3">SERVIDOR 03</label>
                                    </div>
                                </div>

                                <div class="form-group ">
                                    <label class="control-label " for="ms">
                                        Mostrar <strong>Multi telas</strong> Icone?
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="ms" id="ms" value="yes" <?=$json['ms']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="ms">SERVIDOR 01</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="ms2" id="ms2" value="yes" <?=$json['ms2']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="ms2">SERVIDOR 02</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="ms3" id="ms3" value="yes" <?=$json['ms3']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="ms3">SERVIDOR 03</label>
                                    </div>
                                </div>


                                <div class="form-group ">
                                    <label class="control-label " for="btn_fav">
                                        Mostrar <strong>Favoritos</strong> Icone?
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_fav" id="btn_fav" value="yes" <?=$json['btn_fav']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_fav">SERVIDOR 01</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_fav2" id="btn_fav2" value="yes" <?=$json['btn_fav2']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_fav2">SERVIDOR 02</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_fav3" id="btn_fav3" value="yes" <?=$json['btn_fav3']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_fav3">SERVIDOR 03</label>
                                    </div>
                                </div>

                                <div class="form-group ">
                                    <label class="control-label " for="btn_account">
                                        Mostrar <strong>Contas</strong> Icone?
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_account" id="btn_account" value="yes" <?=$json['btn_account']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_account">SERVIDOR 01</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_account2" id="btn_account2" value="yes" <?=$json['btn_account2']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_account2">SERVIDOR 02</label>
                                    </div>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_account3" id="btn_account3" value="yes" <?=$json['btn_account3']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_account3">SERVIDOR 03</label>
                                    </div>
                                </div>
								<div class="form-group ">
                                    <label class="control-label " for="btn_rec">
                                        Mostrar <strong>Gravação</strong> Icone?
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_rec" id="btn_rec" value="yes" <?=$json['btn_rec']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_rec">Sim</label>
                                    </div>
                                </div>
					            <div class="form-group ">
                                    <label class="control-label " for="btn_vpn">
                                        Mostrar <strong>VPN</strong> Icone?
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_vpn" id="btn_vpn" value="yes" <?=$json['btn_vpn']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_vpn">Sim</label>
                                    </div>
                                </div>
								<div class="form-group ">
                                    <label class="control-label " for="btn_rec">
                                        Mostrar <strong>Mensagens</strong> Icone?
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_noti" id="btn_noti" value="yes" <?=$json['btn_noti']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_noti">Sim</label>
                                    </div>
                                </div>
								<div class="form-group ">
                                    <label class="control-label " for="btn_update">
                                        Mostrar <strong>Atualização</strong> Icone?
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="btn_update" id="btn_update" value="yes" <?=$json['btn_update']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="btn_update">Sim</label>
                                    </div>
                                </div>
                                <div class="form-group ">
                                    <label class="control-label " for="show_expire">
                                        Mostrar <strong>Expiração</strong>?
                                    </label>
                                    <br>
                                    <div class="form-check form-check-inline">
                                        <input class="form-check-input" type="checkbox" name="show_expire" id="show_expire" value="yes" <?=$json['show_expire']=='yes'?'checked':'' ?>>
                                        <label class="form-check-label" for="show_expire">Sim</label>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div>
                                        <button class="btn btn-info " name="submit_app_custom" type="submit">
                                            Atualizar funções
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <br><br><br>
<?php include ('includes/footer.php');?>
  <script src="js/sb-admin.min.js"></script>
</body>
  <script> 
$(function() {
  $inp = $("#btn_signup");
  $cb = $("#checkbox");
  if ($cb.is(':checked')) {
      $inp.prop('disabled', false);
    } else {
      $inp.prop('disabled', true);
    }

  $cb.on('change', function() {
    if ($cb.is(':checked')) {
      $inp.prop('disabled', false);
    } else {
      $inp.prop('disabled', true);
    }
  });

});



$(document).ready(function () {
    $("#flash-msg").delay(3000).fadeOut("slow");
});
  </script>
  
                                   