<?php
require_once("admin/inc/protecao-final.php");

@mysqli_query($conexao,"ALTER TABLE `streamings` ADD `player_hp_nome` VARCHAR(255) NOT NULL;");
@mysqli_query($conexao,"ALTER TABLE `streamings` ADD `player_hp_cores` VARCHAR(255) NOT NULL DEFAULT '150,150,249,1|63,63,255,1|0,0,83,1';");
@mysqli_query($conexao,"ALTER TABLE `streamings` ADD `player_hp_url_facebook` VARCHAR(255) NOT NULL;");
@mysqli_query($conexao,"ALTER TABLE `streamings` ADD `player_hp_url_twitter` VARCHAR(255) NOT NULL;");
@mysqli_query($conexao,"ALTER TABLE `streamings` ADD `player_hp_url_youtube` VARCHAR(255) NOT NULL;");
@mysqli_query($conexao,"ALTER TABLE `streamings` ADD `player_hp_url_instagram` VARCHAR(255) NOT NULL;");
@mysqli_query($conexao,"ALTER TABLE `streamings` ADD `player_hp_whatsapp` VARCHAR(255) NOT NULL;");
@mysqli_query($conexao,"ALTER TABLE `streamings` ADD `player_hp_url_noticias` VARCHAR(255) NOT NULL;");
@mysqli_query($conexao,"ALTER TABLE `streamings` ADD `player_hp_url_logo` VARCHAR(255) NOT NULL;");
@mysqli_query($conexao,"ALTER TABLE `streamings` ADD `player_hp_exibir_capa` CHAR(3) NOT NULL DEFAULT 'sim';");
@mysqli_query($conexao,"ALTER TABLE `streamings` ADD `player_hp_exibir_pedido` CHAR(3) NOT NULL DEFAULT 'sim';");
@mysqli_query($conexao,"ALTER TABLE `streamings` ADD `player_hp_exibir_historico` CHAR(3) NOT NULL DEFAULT 'sim';");
@mysqli_query($conexao,"ALTER TABLE `streamings` ADD `player_hp_exibir_chat` CHAR(3) NOT NULL DEFAULT 'sim';");


$total_avisos_ativos = mysqli_num_rows(mysqli_query($conexao,"SELECT * FROM avisos WHERE area = 'streaming'"));
$checar_status_aviso = mysqli_num_rows(mysqli_query($conexao,"SELECT * FROM avisos_desativados WHERE area = 'streaming' AND codigo_usuario = '".$dados_stm["porta"]."'"));
$total_avisos_exibir = ($total_avisos_ativos > $checar_status_aviso) ? $total_avisos_ativos-$checar_status_aviso : 0;


$url_player = (!empty($dados_revenda["dominio_padrao"])) ? "player.".$dados_revenda["dominio_padrao"]."" : "player.".$dados_config["dominio_padrao"]."";

if($_POST) {

$player_hp_exibir_capa = ($_POST["player_hp_exibir_capa"]) ? "sim" : "nao";
$player_hp_exibir_pedido = ($_POST["player_hp_exibir_pedido"]) ? "sim" : "nao";
$player_hp_exibir_historico = ($_POST["player_hp_exibir_historico"]) ? "sim" : "nao";
$player_hp_exibir_chat = ($_POST["player_hp_exibir_chat"]) ? "sim" : "nao";

mysqli_query($conexao,"Update streamings set player_hp_nome = '".$_POST["player_hp_nome"]."', player_hp_cores = '".$_POST["player_hp_cores"]."', player_hp_url_facebook = '".$_POST["player_hp_url_facebook"]."', player_hp_url_twitter = '".$_POST["player_hp_url_twitter"]."', player_hp_url_youtube = '".$_POST["player_hp_url_youtube"]."', player_hp_url_instagram = '".$_POST["player_hp_url_instagram"]."', player_hp_whatsapp = '".$_POST["player_hp_whatsapp"]."', player_hp_url_noticias = '".$_POST["player_hp_url_noticias"]."', player_hp_url_logo = '".$_POST["player_hp_url_logo"]."', player_hp_exibir_capa = '".$player_hp_exibir_capa."', player_hp_exibir_pedido = '".$player_hp_exibir_pedido."', player_hp_exibir_historico = '".$player_hp_exibir_historico."', player_hp_exibir_chat = '".$player_hp_exibir_chat."' where codigo = '".$dados_stm["codigo"]."'");

if(!mysqli_error($conexao)) {

// Cria o sessão do status das ações executadas e redireciona.
$_SESSION["status_acao"] = '<div class="alert alert-success text-center" role="alert">'.$lang['lang_info_config_painel_resultado_ok'].'</div>';

} else {

// Cria o sessão do status das ações executadas e redireciona.
$_SESSION["status_acao"] = '<div class="alert alert-success text-center" role="alert">Erro mysql: '.mysqli_error($conexao).'</div>';

}

header("Location: /gerenciar-player-home-page");
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>Streaming <?php echo $dados_stm["porta"]; ?></title>
  <link rel="stylesheet" href="/inc/materialdesignicons.min.css">
  <link rel="stylesheet" href="/inc/font-awesome.min.css">
  <link rel="stylesheet" href="/inc/vendor.bundle.base.css">
  <link rel="stylesheet" href="/inc/vendor.bundle.addons.css">
  <link rel="stylesheet" href="/inc/theme.css">
  <link rel="shortcut icon" href="/img/favicon.ico">
  <script type="text/javascript" src="/inc/ajax-streaming.js"></script>
  <script type="text/javascript" src="/inc/javascript.js"></script>
</head>

<body>
  <div class="container-scroller">
      <nav class="navbar col-lg-12 col-12 p-0 fixed-top d-flex flex-row">
      <div class="text-center navbar-brand-wrapper d-flex align-items-center justify-content-center">
        <?php if($dados_revenda["url_logo"]) { ?>
        <a class="navbar-brand brand-logo" href="/dashboard"><img id="logo" src="<?php echo $dados_revenda["url_logo"]; ?>" title="Painel" height="60" border="0"></a>
        <?php } else { ?>
        <a class="navbar-brand brand-logo" href="/dashboard"><span>Painel Streaming</span></a>
        <?php } ?>
        <a class="navbar-brand brand-logo-mini" href="/dashboard"><img src="/img/icones/img-icone-logo.png" title="Painel" width="32" height="32" border="0"></a>
      </div>
      <div class="navbar-menu-wrapper d-flex align-items-center justify-content-end justify-content-lg-start">
        <button class="navbar-toggler navbar-toggler align-self-center" type="button" data-toggle="minimize">
          <span class="mdi mdi-menu text-icones"></span>
        </button>
        <ul class="navbar-nav navbar-nav-right">
          <li class="nav-item nav-profile dropdown show">
            <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" id="profileDropdown" aria-expanded="true">
              <i class="fa fa-power-off f-18 text-icones" data-toggle="tooltip" data-placement="bottom" title="<?php echo $lang['lang_botao_titulo_ligar']; ?>/<?php echo $lang['lang_botao_titulo_desligar']; ?>"></i>
            </a>
            <div class="dropdown-menu dropdown-menu-right navbar-dropdown" aria-labelledby="profileDropdown">
              <a class="dropdown-item text-success" href="javascript:ligar_streaming('<?php echo $porta_code; ?>');"> <?php echo $lang['lang_botao_titulo_ligar']; ?> Streaming</a>
              <a class="dropdown-item text-danger" href="javascript:desligar_streaming('<?php echo $porta_code; ?>');"> <?php echo $lang['lang_botao_titulo_desligar']; ?> Streaming</a>
              <?php if($dados_stm["autodj"] == "sim") { ?>
              <div class="dropdown-divider"></div>              
              <a class="dropdown-item text-success" href="javascript:carregar_opcoes_ligar_autodj('<?php echo $porta_code; ?>');"> <?php echo $lang['lang_botao_titulo_ligar']; ?> AutoDJ</a>
              <a class="dropdown-item text-danger" href="javascript:desligar_autodj('<?php echo $porta_code; ?>');"> <?php echo $lang['lang_botao_titulo_desligar']; ?> AutoDJ</a>
              <?php } ?>
            </div>
          </li>
          <li class="nav-item dropdown">
            <a class="nav-link count-indicator dropdown-toggle d-flex align-items-center justify-content-center" id="notificationDropdown" href="#" data-toggle="dropdown" aria-expanded="false">
              <i class="mdi mdi-bell f-22 text-icones" data-toggle="tooltip" data-placement="bottom" title="<?php echo $lang['lang_info_pagina_informacoes_tab_avisos']; ?>"></i>
              <?php if($total_avisos_exibir > 0) { ?><span class="count bg-success"><?php echo $total_avisos_exibir; ?></span><?php } ?>           
            </a>
            <div class="dropdown-menu dropdown-menu-right navbar-dropdown preview-list" aria-labelledby="notificationDropdown">
              <a class="dropdown-item">
                <p class="mb-0 font-weight-normal float-left"><?php echo $lang['lang_info_pagina_informacoes_tab_avisos']; ?></p>
              </a>
              <div class="dropdown-divider"></div>
              <?php carregar_avisos_streaming($conexao,$dados_stm["porta"],$dados_servidor["codigo"]); ?>
            </div>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="/sair"><i class="mdi mdi-logout f-22 text-icones" data-toggle="tooltip" data-placement="bottom" title="Sair/logout"></i></a>
          </li>
          <li>
            <button type="button" class="btn btn-info" id="status-streaming" onClick="status_streaming('<?php echo $porta_code; ?>');" style="margin: 10px;min-width: 150px; min-height: 40px"><i class="fa fa-refresh"></i></button>
          </li>
        </ul>
        <button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button" data-toggle="offcanvas">
          <span class="mdi mdi-menu text-icones"></span>
        </button>
      </div>
    </nav>

    <!-- modal -->
      <div class="modal fade" id="avisos" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title"><?php echo $lang['lang_info_pagina_informacoes_tab_avisos']; ?></h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                </div>
                <div class="modal-body" id="avisos-conteudo"><img src="/img/ajax-loader.gif" align="center" /></div>
            </div>
        </div>
      </div>
                
      <div class="modal fade" id="playlists-autodj" tabindex="-1" role="dialog" aria-hidden="true">
          <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">AutoDJ</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                </div>
                <div class="modal-body text-center" id="playlists-autodj-conteudo" style="text-align: center;"><img src="/img/ajax-loader.gif" /></div>
            </div>
          </div>
      </div>
                
      <div class="modal fade" id="log-sistema" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-body" id="log-sistema-conteudo" style="text-align:center"><img src="/img/ajax-loader.gif" /></div>
            </div>
        </div>
      </div>
      
    <div class="container-fluid page-body-wrapper">      
    <?php require_once("menu.php"); ?>
      <div class="main-panel">
        <div class="content-wrapper">
          <div id="local-status-acoes"><?php echo $_SESSION['status_acao'];unset($_SESSION['status_acao']); ?></div>
          <form action="/gerenciar-player-home-page" method="post" name="configurar">
                    <div class="row">

                        <div class="col-md-6 col-sm-12">
                            <div class="card">
                                <div class="card-header">
                                    <header>Configura&ccedil;&otilde;es</header>
                                </div>
                                <div class="card-body">
                  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                      <tr>
                                        <td width="150" height="50" class="texto_padrao_destaque" style="padding-left:5px;">Web Radio</td>
                                        <td class="texto_padrao_pequeno"><input class="form-control" name="player_hp_nome" type="text" id="player_hp_nome" value="<?php echo $dados_stm["player_hp_nome"]; ?>" /></td>
                                      </tr>
                                      <tr>
                                        <td width="150" height="50" class="texto_padrao_destaque" style="padding-left:5px;">URL Logo<br><small>512x512</small></td>
                                        <td class="texto_padrao_pequeno"><input class="form-control" name="player_hp_url_logo" type="text" id="player_hp_url_logo" value="<?php echo $dados_stm["player_hp_url_logo"]; ?>" placeholder="https://" /></td>
                                      </tr>
                                      <tr>
                                        <td width="150" height="50" align="left" class="texto_padrao_destaque" style="padding-left:5px;">Cor Fundo</td>
                                        <td align="left">
                                        <select name="player_hp_cores" class="form-control" id="player_hp_cores">
                                      <option value="150,150,249,1|63,63,255,1|0,0,83,1"<?php if($dados_stm["player_hp_cores"] == "150,150,249,1|63,63,255,1|0,0,83,1") { echo ' selected="selected"'; } ?> style="background-color:#0099CC;font-size:20px; color:#FFFFFF">Azul/Blue</option>
                                    <option value="85,251,94,1|0,198,10,1|0,119,6,1"<?php if($dados_stm["player_hp_cores"] == "85,251,94,1|0,198,10,1|0,119,6,1") { echo ' selected="selected"'; } ?> style="background-color:#00796B;font-size:20px; color:#FFFFFF">Verde/Green</option>
                                    <option value="255,98,204,1|203,0,138,1|161,0,109,1"<?php if($dados_stm["player_hp_cores"] == "255,98,204,1|203,0,138,1|161,0,109,1") { echo ' selected="selected"'; } ?> style="background-color:#FF6699;font-size:20px; color:#FFFFFF">Rosa/Pink</option>
                                    <option value="255,100,100,1|266,0,0,1|161,5,5,1"<?php if($dados_stm["player_hp_cores"] == "255,100,100,1|266,0,0,1|161,5,5,1") { echo ' selected="selected"'; } ?> style="background-color:#FF5959;font-size:20px; color:#FFFFFF">Vermelho/Red</option>
                                    <option value="255,253,87,1|255,253,20,1|237,234,0,1"<?php if($dados_stm["player_hp_cores"] == "255,253,87,1|255,253,20,1|237,234,0,1") { echo ' selected="selected"'; } ?> style="background-color:#FFCC66;font-size:20px; color:#FFFFFF">Amarelo/Yellow</option>
                                    <option value="255,176,79,1|224,123,0,1|169,93,0,1"<?php if($dados_stm["player_hp_cores"] == "255,176,79,1|224,123,0,1|169,93,0,1") { echo ' selected="selected"'; } ?> style="background-color:#CD853F;font-size:20px; color:#FFFFFF">Marrom/Brown</option>
                                    <option value="255,225,0,1|249,107,6,1|244,0,11,1"<?php if($dados_stm["player_hp_cores"] == "255,225,0,1|249,107,6,1|244,0,11,1") { echo ' selected="selected"'; } ?> style="background-color:#FFA500;font-size:20px; color:#FFFFFF">Laranja/Orange</option>
                                     </select>         </td>
                                      </tr>
                                      <tr>
                                        <td width="150" height="50" class="texto_padrao_destaque" style="padding-left:5px;">Exibir Pedido de Musica</td>
                                        <td class="texto_padrao_pequeno"><input name="player_hp_exibir_pedido" type="checkbox" value="sim" <?php if($dados_stm["player_hp_exibir_pedido"]) { echo ' checked="checked"'; } ?> /></td>
                                      </tr>
                                      <tr>
                                        <td width="150" height="50" class="texto_padrao_destaque" style="padding-left:5px;">Exibir Capa Artista</td>
                                        <td class="texto_padrao_pequeno"><input name="player_hp_exibir_capa" type="checkbox" value="sim" <?php if($dados_stm["player_hp_exibir_capa"] == "sim") { echo ' checked="checked"'; } ?> /></td>
                                      </tr>
                                      <tr>
                                        <td width="150" height="50" class="texto_padrao_destaque" style="padding-left:5px;">Exibir Historico Musicas</td>
                                        <td class="texto_padrao_pequeno"><input name="player_hp_exibir_historico" type="checkbox" value="sim" <?php if($dados_stm["player_hp_exibir_historico"] == "sim") { echo ' checked="checked"'; } ?> /></td>
                                      </tr>
                                      <tr>
                                        <td width="150" height="50" class="texto_padrao_destaque" style="padding-left:5px;">Exibir Chat</td>
                                        <td class="texto_padrao_pequeno"><input name="player_hp_exibir_chat" type="checkbox" value="sim" <?php if($dados_stm["player_hp_exibir_chat"] == "sim") { echo ' checked="checked"'; } ?> /></td>
                                      </tr>
                                          <tr>
                                            <td height="50" colspan="2" align="right"><button type="button" class="btn btn-info" onClick="document.configurar.submit();"><?php echo $lang['lang_botao_titulo_alterar_config']; ?></button></td>
                                          </tr>
                                    </table>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-6 col-sm-12">
                            <div class="card">
                                <div class="card-header">
                                    <header>Redes Sociais</header>
                                </div>
                                <div class="card-body">
                                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                          <tr>
                                            <td width="150" height="50" class="texto_padrao_destaque" style="padding-left:5px;">Facebook</td>
                                            <td class="texto_padrao_pequeno"><input class="form-control" name="player_hp_url_facebook" type="text" id="player_hp_url_facebook" value="<?php echo $dados_stm["player_hp_url_facebook"]; ?>" placeholder="Deixe em branco para desativar/Dejelo en blanco para deshabilitar" /></td>
                                          </tr>
                                          <tr>
                                            <td width="150" height="50" align="left" class="texto_padrao_destaque" style="padding-left:5px;">Twitter</td>
                                            <td class="texto_padrao_pequeno"><input class="form-control" name="player_hp_url_twitter" type="text" id="player_hp_url_twitter" value="<?php echo $dados_stm["player_hp_url_twitter"]; ?>" placeholder="Deixe em branco para desativar/Dejelo en blanco para deshabilitar" /></td>
                                          </tr>
                                          <tr>
                                            <td width="150" height="50" class="texto_padrao_destaque" style="padding-left:5px;">Youtube</td>
                                            <td class="texto_padrao_pequeno"><input class="form-control" name="player_hp_url_youtube" type="text" id="player_hp_url_youtube" value="<?php echo $dados_stm["player_hp_url_youtube"]; ?>" placeholder="Deixe em branco para desativar/Dejelo en blanco para deshabilitar" /></td>
                                          </tr>
                                          <tr>
                                            <td width="150" height="50" class="texto_padrao_destaque" style="padding-left:5px;">Instagram</td>
                                            <td class="texto_padrao_pequeno"><input class="form-control" name="player_hp_url_instagram" type="text" id="player_hp_url_instagram" value="<?php echo $dados_stm["player_hp_url_instagram"]; ?>" placeholder="Deixe em branco para desativar/Dejelo en blanco para deshabilitar" /></td>
                                          </tr>
                                          <tr>
                                            <td width="150" height="50" class="texto_padrao_destaque" style="padding-left:5px;">Whatsapp</td>
                                            <td class="texto_padrao_pequeno"><input class="form-control" name="player_hp_whatsapp" type="text" id="player_hp_whatsapp" value="<?php echo $dados_stm["player_hp_whatsapp"]; ?>" placeholder="Deixe em branco para desativar/Dejelo en blanco para deshabilitar" /></td>
                                          </tr>
                                          <tr>
                                            <td height="50" colspan="2" align="right"><button type="button" class="btn btn-info" onClick="document.configurar.submit();"><?php echo $lang['lang_botao_titulo_alterar_config']; ?></button></td>
                                          </tr>
                                          <tr>
                                            <td height="50" colspan="2" align="right"></td>
                                          </tr>
                                        </table>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-6 col-sm-12">
                            <div class="card">
                                <div class="card-header">
                                    <header>Not&iacute;cias</header>
                                </div>
                                <div class="card-body">
                                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                      <tr>
                                        <td width="150" height="50" class="texto_padrao_destaque" style="padding-left:5px;">Not&iacute;cias</td>
                                        <td class="texto_padrao_pequeno">
                                        <select class="form-control" id="rss" onchange="document.getElementById('player_hp_url_noticias').value = this.value">
                                          <optgroup label="Portugu&ecirc;s">
                                          <option value="https://g1.globo.com/dynamo/rss2.xml">G1 - Todas as noticias</option>
                                          <option value="https://g1.globo.com/dynamo/brasil/rss2.xml">G1 - Brasil</option>
                                          <option value="https://g1.globo.com/dynamo/mundo/rss2.xml">G1 - Mundo</option>
                                          <option value="https://g1.globo.com/dynamo/ciencia-e-saude/rss2.xml">G1 - Ciencia e Saude</option>
                                          <option value="https://g1.globo.com/dynamo/economia/rss2.xml">G1 - Economia</option>
                                          <option value="https://g1.globo.com/dynamo/educacao/rss2.xml">G1 - Educa&ccedil;&atilde;o</option>
                                          <option value="https://g1.globo.com/dynamo/musica/rss2.xml">G1 - Musica </option>
                                          <option value="https://g1.globo.com/dynamo/politica/mensalao/rss2.xml">G1 - Politica</option>
                                          <option value="https://g1.globo.com/dynamo/pop-arte/rss2.xml">G1 - Pop & Arte</option>
                                          <option value="https://g1.globo.com/dynamo/tecnologia/rss2.xml">G1 - Tecnologia</option>
                                          <option value="https://noticias.r7.com/brasil/feed.xml">R7.com - Brasil</option>
                                          <option value="https://noticias.r7.com/educacao/feed.xml">R7.com - Educa&ccedil;&atilde;o</option>
                                          <option value="https://noticias.r7.com/tecnologia-e-ciencia/feed.xml">R7.com - Tecnologia</option>
                                          <option value="https://noticias.r7.com/saude/feed.xml">R7.com - Saude</option>
                                          <option value="https://noticias.r7.com/transito/feed.xml">R7.com - Transito</option>
                                          <option value="https://noticias.r7.com/economia/feed.xml">R7.com - Economia</option>
                                          <option value="https://esportes.r7.com/feed.xml">R7.com - Esportes</option>
                                          <option value="https://entretenimento.r7.com/musica/feed.xml">R7.com - Musica</option>
                                          <option value="https://entretenimento.r7.com/famosos-e-tv/feed.xml">R7.com - Fomosos & TV</option>
                                          <option value="https://www.bbc.co.uk/portuguese/topicos/brasil/index.xml">BBC - Brasil</option>
                                          <option value="https://www.bbc.co.uk/portuguese/topicos/america_latina/index.xml">BBC - America Latina</option>
                                          <option value="https://feeds.elpais.com/mrss-s/pages/ep/site/brasil.elpais.com/portada">El Pais - Brasil</option>
                                          <option value="https://www.gospelprime.com.br/feed/">Gospel - GospelPrime.com.br</option>      
                                          <option value="https://www.guiame.com.br/gospel/noticias/feed">Gospel - Guiame.com.br</option>  
                                          <option value="https://noticias.gospelmais.com.br/feed">Gospel - GospelMais.com.br</option>
                                          <option value="https://www.obuxixogospel.com.br/feed/">Gospel - OBuxixoGospel.com.br</option>
                                          <option value="https://www.gospelcontei.com.br/feed/">Gospel - GospelContei.com.br</option>
                                          <option value="https://folhagospel.com/feed/">Gospel - FolhaGospel.com</option>                                          
                                          </optgroup>
                                          <optgroup label="Portugu&ecirc;s - Regi&atilde;o(G1 Not&iacute;cias)">
                                          <option value="https://g1.globo.com/rss/g1/ac/acre/">G1 - Acre</option>
                                          <option value="http://g1.globo.com/dynamo/al/alagoas/rss2.xml">G1 - Alagoas</option>
                                          <option value="https://g1.globo.com/dynamo/ap/amapa/rss2.xml">G1 - Amap&aacute;</option>
                                          <option value="https://g1.globo.com/dynamo/am/amazonas/rss2.xml">G1 - Amazonas</option>
                                          <option value="https://g1.globo.com/dynamo/bahia/rss2.xml">G1 - Bahia</option>
                                          <option value="https://g1.globo.com/dynamo/ceara/rss2.xml">G1 - Cear&aacute;</option>
                                          <option value="https://g1.globo.com/dynamo/distrito-federal/rss2.xml">G1 - Distrito Federal</option>
                                          <option value="https://g1.globo.com/dynamo/espirito-santo/rss2.xml">G1 - Esp&iacute;rito Santo</option>
                                          <option value="https://g1.globo.com/dynamo/goias/rss2.xml">G1 - Goi&aacute;s</option>
                                          <option value="https://g1.globo.com/dynamo/ma/maranhao/rss2.xml">G1 - Maranh&atilde;o</option>
                                          <option value="https://g1.globo.com/dynamo/mato-grosso/rss2.xml">G1 - Mato Grosso</option>
                                          <option value="https://g1.globo.com/dynamo/mato-grosso-do-sul/rss2.xml">G1 - Mato Grosso do Sul</option>
                                          <option value="https://g1.globo.com/dynamo/minas-gerais/rss2.xml">G1 - Minas Gerais</option>
                                          <option value="https://g1.globo.com/dynamo/mg/centro-oeste/rss2.xml">G1 - MG - Centro-Oeste</option>
                                          <option value="https://g1.globo.com/dynamo/mg/grande-minas/rss2.xml">G1 - MG - Grande Minas</option>
                                          <option value="https://g1.globo.com/dynamo/mg/sul-de-minas/rss2.xml">G1 - MG - Sul de Minas</option>
                                          <option value="https://g1.globo.com/dynamo/minas-gerais/triangulo-mineiro/rss2.xml">G1 - MG - Tri&acirc;ngulo Mineiro</option>
                                          <option value="https://g1.globo.com/dynamo/mg/vales-mg/rss2.xml">G1 - MG - Vales de Minas Gerais</option>
                                          <option value="https://g1.globo.com/dynamo/mg/zona-da-mata/rss2.xml">G1 - MG - Zona da Mata</option>
                                          <option value="https://g1.globo.com/dynamo/pa/para/rss2.xml">G1 - Par&aacute;</option>
                                          <option value="https://g1.globo.com/rss/g1/pb/paraiba/">G1 - Paraíba</option>
                                          <option value="https://g1.globo.com/dynamo/pr/parana/rss2.xml">G1 - Paraná</option>
                                          <option value="https://g1.globo.com/dynamo/pr/campos-gerais-sul/rss2.xml">G1 - PR - Campos Gerais e Sul</option>
                                          <option value="https://g1.globo.com/dynamo/pr/oeste-sudoeste/rss2.xml">G1 - PR - Oeste e Sudoeste </option>
                                          <option value="https://g1.globo.com/dynamo/pr/norte-noroeste/rss2.xml">G1 - PR - Norte e Noroeste</option>
                                          <option value="https://g1.globo.com/dynamo/pernambuco/rss2.xml">G1 - Pernambuco</option>
                                          <option value="https://g1.globo.com/dynamo/pe/caruaru-regiao/rss2.xml">G1 - PE - Caruaru e Regi&atilde;o</option>
                                          <option value="https://g1.globo.com/dynamo/pe/petrolina-regiao/rss2.xml">G1 - PE - Petrolina e Regi&atilde;o</option>
                                          <option value="https://g1.globo.com/dynamo/rio-de-janeiro/rss2.xml">G1 - Rio de Janeiro</option>
                                          <option value="https://g1.globo.com/dynamo/rj/regiao-serrana/rss2.xml">G1 - RJ - Regi&atilde;o Serrana</option>
                                          <option value="https://g1.globo.com/dynamo/rj/regiao-dos-lagos/rss2.xml">G1 - RJ - Regi&atilde;o dos Lagos</option>
                                          <option value="https://g1.globo.com/dynamo/rj/norte-fluminense/rss2.xml">G1 - RJ - Norte Fluminense</option>
                                          <option value="https://g1.globo.com/dynamo/rj/sul-do-rio-costa-verde/rss2.xml">G1 - RJ - Sul e Costa Verde</option>
                                          <option value="https://g1.globo.com/dynamo/rn/rio-grande-do-norte/rss2.xml">G1 - Rio Grande do Norte</option>
                                          <option value="https://g1.globo.com/dynamo/rs/rio-grande-do-sul/rss2.xml">G1 - Rio Grande do Sul</option>
                                          <option value="https://g1.globo.com/dynamo/ro/rondonia/rss2.xml">G1 - Rond&ocirc;nia</option>
                                          <option value="https://g1.globo.com/dynamo/rr/roraima/rss2.xml">G1 - Roraima</option>
                                          <option value="https://g1.globo.com/dynamo/sc/santa-catarina/rss2.xml">G1 - Santa Catarina</option>
                                          <option value="https://g1.globo.com/dynamo/sao-paulo/rss2.xml">G1 - São Paulo</option>
                                          <option value="https://g1.globo.com/dynamo/sp/bauru-marilia/rss2.xml">G1 - SP - Bauru e Marília</option>
                                          <option value="https://g1.globo.com/dynamo/sp/campinas-regiao/rss2.xml">G1 - SP - Campinas e Regi&atilde;o</option>
                                          <option value="https://g1.globo.com/dynamo/sao-paulo/itapetininga-regiao/rss2.xml">G1 - SP - Itapetininga e Regi&atilde;o</option>
                                          <option value="https://g1.globo.com/dynamo/sp/mogi-das-cruzes-suzano/rss2.xml">G1 - SP - Mogi das Cruzes e Suzano</option>
                                          <option value="https://g1.globo.com/dynamo/sp/piracicaba-regiao/rss2.xml">G1 - SP - Piracicaba e Regi&atilde;o</option>
                                          <option value="https://g1.globo.com/dynamo/sp/presidente-prudente-regiao/rss2.xml">G1 - SP - Prudente e Regi&atilde;o</option>
                                          <option value="https://g1.globo.com/dynamo/sp/ribeirao-preto-franca/rss2.xml">G1 - SP - Ribeir&atilde;o Preto e Franca</option>
                                          <option value="https://g1.globo.com/dynamo/sao-paulo/sao-jose-do-rio-preto-aracatuba/rss2.xml">G1 - SP - Rio Preto e Ara&ccedil;atuba</option>
                                          <option value="https://g1.globo.com/dynamo/sp/santos-regiao/rss2.xml">G1 - SP - Santos e Regi&atilde;o</option>
                                          <option value="https://g1.globo.com/dynamo/sp/sao-carlos-regiao/rss2.xml">G1 - SP - São Carlos e Araraquara</option>
                                          <option value="https://g1.globo.com/dynamo/sao-paulo/sorocaba-jundiai/rss2.xml">G1 - SP - Sorocaba e Jundiaí</option>
                                          <option value="https://g1.globo.com/dynamo/sp/vale-do-paraiba-regiao/rss2.xml">G1 - SP - Vale do Paraíba e Regi&atilde;o</option>
                                          <option value="https://g1.globo.com/dynamo/se/sergipe/rss2.xml">G1 - Sergipe</option>
                                          <option value="https://g1.globo.com/dynamo/to/tocantins/rss2.xml">G1 - Tocantins</option>
                                          <option value="https://g1.globo.com/dynamo/to/tocantins/rss2.xml">G1 - Tocantins</option>
                                          </optgroup>
                                          <optgroup label="Espa&ntilde;ol">
                                          <option value="https://feeds.bbci.co.uk/mundo/rss.xml">BBC - Mundo</option>
                                          <option value="https://feeds.elpais.com/mrss-s/pages/ep/site/elpais.com/section/internacional/portada">El Pais - Mundo</option>
                                          <option value="https://feeds.elpais.com/mrss-s/pages/ep/site/elpais.com/portada">El Pais - Espa&ntilde;a</option>
                                          <option value="https://feeds.elpais.com/mrss-s/pages/ep/site/elpais.com/section/america/portada">El Pais - America Latina</option>
                                          <option value="https://feeds.elpais.com/mrss-s/pages/ep/site/elpais.com/section/cultura/portada">El Pais - Cultura</option>
                                          <option value="https://feeds.elpais.com/mrss-s/pages/ep/site/elpais.com/section/tecnologia/portada">El Pais - Tecnologia</option>
                                          <option value="https://feeds.elpais.com/mrss-s/pages/ep/site/elpais.com/section/economia/portada">El Pais - Economia</option>
                                          </optgroup>
                                          <option value="digite aqui a URL do rss desejado/escriba aquí la url de la rss deseada">Personalizado/Custom</option>
                                        </select>
                                      </td>
                                      </tr>
                                      <tr>
                                        <td width="150" height="50" class="texto_padrao_destaque" style="padding-left:5px;">RSS Feed</td>
                                        <td class="texto_padrao_pequeno"><input class="form-control" name="player_hp_url_noticias" type="text" id="player_hp_url_noticias" value="<?php echo $dados_stm["player_hp_url_noticias"]; ?>" placeholder="seleciona uma acima/elija una arriba" /></td>
                                      </tr>
                                          <tr>
                                            <td height="50" colspan="2" align="right"><button type="button" class="btn btn-info" onClick="document.configurar.submit();"><?php echo $lang['lang_botao_titulo_alterar_config']; ?></button></td>
                                          </tr>
                                          <tr>
                                            <td height="137" colspan="2" align="right"></td>
                                          </tr>
                                    </table>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-6 col-sm-12">
                            <div class="card">
                                <div class="card-header">
                                    <header>C&oacute;digo HTML</header>
                                </div>
                                <div class="card-body">
                                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
                                      <tr>
                                        <td height="30" align="left" class="texto_padrao_destaque" style="padding:5px;">
                                          URL Direta:<br>
                                          <input class="form-control" readonly="readonly" type="text" style="width:98%;font-size:11px" onmouseover="this.select()" value="https://<?php echo $url_player; ?>/player-home-page/<?php echo $dados_stm["porta"]; ?>">
                                          iFrame:<br>
                                          <textarea class="form-control" name="textarea" readonly="readonly" style="width:98%; height:40px;font-size:11px" onmouseover="this.select()"><iframe src="https://<?php echo $url_player; ?>/player-home-page/<?php echo $dados_stm["porta"]; ?>" frameborder="0" width="100%" height="465"></iframe></textarea>HTML Pagina Inteira(index.html):<br>
                                          <textarea class="form-control" name="textarea" readonly="readonly" style="width:98%; height:120px;font-size:11px" onmouseover="this.select()"><!DOCTYPE html>
                            <html lang="pt-BR">
                               <head>
                                  <meta charset="utf-8">
                                  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
                                  <meta http-equiv="Content-Language" content="pt-BR" />
                                  <title>Site</title>
                                  <style type="text/css">html,body{width:100%;height:100%;overflow: hidden;}</style>
                               </head>
                            <body>
                            <iframe src="https://<?php echo $url_player; ?>/player-home-page/<?php echo $dados_stm["porta"]; ?>" frameborder="0" style="border: 0; position:fixed; top:0; left:0; right:0; bottom:0; width:100%; height:100%"></iframe>
                            </body>
                            </html></textarea>
                                        </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-12 col-sm-12">
                            <div class="card">
                                <div class="card-header">
                                    <header>Pr&eacute;via</header>
                                </div>
                                <div class="card-body">
                                    <iframe src="https://<?php echo $url_player; ?>/player-home-page/<?php echo $dados_stm["porta"]; ?>" frameborder="0" width="100%" height="465"></iframe>
                                </div>
                            </div>
                        </div>
                    </div>
                        </form>
        </div>
      </div>      

    </div>
  </div>
  <script src="/inc/vendor.bundle.base.js"></script>
  <script src="/inc/vendor.bundle.addons.js"></script>
  <script src="/inc/theme.js"></script>
  <script>
  status_streaming('<?php echo $porta_code; ?>');
  setInterval("status_streaming('<?php echo $porta_code; ?>')",60000);
  </script>
</body>
</html>