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

$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;

@mysqli_query($conexao,"CREATE TABLE IF NOT EXISTS `siteadm_onepage` (
  `codigo` int(10) NOT NULL AUTO_INCREMENT,
  `codigo_stm` int(10) NOT NULL,
  `nome` VARCHAR(255) NOT NULL DEFAULT 'Web Radio',
  `email` VARCHAR(255) NOT NULL,
  `localidade` VARCHAR(255) NOT NULL DEFAULT 'Cidade, Estado - Brasil',
  `url_facebook` VARCHAR(255) NOT NULL,
  `url_instagram` VARCHAR(255) NOT NULL,
  `url_twitter` VARCHAR(255) NOT NULL,
  `url_youtube` VARCHAR(255) NOT NULL,
  `url_chat` VARCHAR(255) NOT NULL,
  `url_camera_studio` VARCHAR(255) NOT NULL,
  `url_pedir_musica` VARCHAR(255) NOT NULL,
  `whatsapp` VARCHAR(255) NOT NULL,
  `cor_texto` CHAR(7) NOT NULL DEFAULT '#FFFFFF',
  `cor_background1` CHAR(7) NOT NULL DEFAULT '#000000',
  `cor_background2` CHAR(7) NOT NULL DEFAULT '#ff8000',
  `visualizer` int(1) NOT NULL DEFAULT '1',
  `exibir_capa` CHAR(3) NOT NULL DEFAULT 'sim',
  `exibir_menu_app` CHAR(3) NOT NULL DEFAULT 'sim',
  `exibir_menu_quem_somos` CHAR(3) NOT NULL DEFAULT 'sim',
  `exibir_menu_nosso_trabalho` CHAR(3) NOT NULL DEFAULT 'sim',
  `exibir_menu_programacao` CHAR(3) NOT NULL DEFAULT 'sim',
  `exibir_menu_noticias` CHAR(3) NOT NULL DEFAULT 'sim',
  `exibir_menu_contato` CHAR(3) NOT NULL DEFAULT 'sim',
  `titulo_menu_app` VARCHAR(255) NOT NULL DEFAULT 'Nosso Aplicativo',
  `titulo_menu_quem_somos` VARCHAR(255) NOT NULL DEFAULT 'Quem Somos',
  `titulo_menu_nosso_trabalho` VARCHAR(255) NOT NULL DEFAULT 'Nosso Trabalho',
  `titulo_menu_programacao` VARCHAR(255) NOT NULL DEFAULT 'Programação',
  `titulo_menu_noticias` VARCHAR(255) NOT NULL DEFAULT 'Notícias',
  `titulo_menu_contato` VARCHAR(255) NOT NULL DEFAULT 'Contato',
  `conteudo_menu_app` LONGTEXT NOT NULL,
  `conteudo_menu_quem_somos` LONGTEXT NOT NULL,
  `conteudo_menu_nosso_trabalho` LONGTEXT NOT NULL,
  `conteudo_menu_programacao` LONGTEXT NOT NULL,
  `conteudo_menu_noticias` LONGTEXT NOT NULL,
  `conteudo_menu_contato` LONGTEXT NOT NULL,
  `app_url_google_play` VARCHAR(255) NOT NULL,
  `app_url_apple_store` VARCHAR(255) NOT NULL,
  PRIMARY KEY (`codigo`)
) ENGINE=MyISAM;");

$dados_onepage = @mysqli_fetch_array(@mysqli_query($conexao,"SELECT * FROM siteadm_onepage where codigo_stm = '".$dados_stm["codigo"]."'"));

if(!isset($dados_onepage["codigo"])) {
mysqli_query($conexao,"INSERT INTO siteadm_onepage (codigo_stm) VALUES ('".$dados_stm["codigo"]."')");
$dados_onepage = @mysqli_fetch_array(@mysqli_query($conexao,"SELECT * FROM siteadm_onepage where codigo_stm = '".$dados_stm["codigo"]."'"));
}

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

if($_POST["acao_form"] == "geral") {

if(isset($_FILES["logo"])) {
copy($_FILES["logo"]["tmp_name"],"player/site-adm-onepage/logo-".$dados_stm["porta"].".png");
}

mysqli_query($conexao,"Update siteadm_onepage set nome = '".$_POST["nome"]."', url_facebook = '".$_POST["url_facebook"]."', url_instagram = '".$_POST["url_instagram"]."', url_twitter = '".$_POST["url_twitter"]."', url_youtube = '".$_POST["url_youtube"]."' where codigo = '".$dados_onepage["codigo"]."'") or die(mysqli_error($conexao));


$_SESSION["status_acao"] = '<div class="alert alert-success text-center" role="alert">'.$lang['lang_info_config_painel_resultado_ok'].'</div>';

header("Location: /configuracoes-one-page");
exit();
}

if($_POST["acao_form"] == "configuracoes") {

mysqli_query($conexao,"Update siteadm_onepage set exibir_capa = '".$_POST["exibir_capa"]."', exibir_menu_app = '".$_POST["exibir_menu_app"]."', exibir_menu_quem_somos = '".$_POST["exibir_menu_quem_somos"]."', exibir_menu_nosso_trabalho = '".$_POST["exibir_menu_nosso_trabalho"]."', exibir_menu_programacao = '".$_POST["exibir_menu_programacao"]."', exibir_menu_noticias = '".$_POST["exibir_menu_noticias"]."', exibir_menu_contato = '".$_POST["exibir_menu_contato"]."', url_chat = '".$_POST["url_chat"]."', url_pedir_musica = '".$_POST["url_pedir_musica"]."', url_camera_studio = '".$_POST["url_camera_studio"]."', visualizer = '".$_POST["visualizer"]."', cor_texto = '".$_POST["cor_texto"]."', cor_background1 = '".$_POST["cor_background1"]."', cor_background2 = '".$_POST["cor_background2"]."' where codigo = '".$dados_onepage["codigo"]."'") or die(mysqli_error($conexao));


$_SESSION["status_acao"] = '<div class="alert alert-success text-center" role="alert">'.$lang['lang_info_config_painel_resultado_ok'].'</div>';

header("Location: /configuracoes-one-page");
exit();
}

if($_POST["acao_form"] == "menu_app") {

mysqli_query($conexao,"Update siteadm_onepage set titulo_menu_app = '".$_POST["titulo_menu_app"]."', conteudo_menu_app = '".$_POST["texto"]."', app_url_google_play = '".$_POST["app_url_google_play"]."', app_url_apple_store = '".$_POST["app_url_apple_store"]."' where codigo = '".$dados_onepage["codigo"]."'") or die(mysqli_error($conexao));

$_SESSION["status_acao"] = '<div class="alert alert-success text-center" role="alert">'.$lang['lang_info_config_painel_resultado_ok'].'</div>';

header("Location: /configuracoes-one-page");
exit();
}

if($_POST["acao_form"] == "menu_quem_somos") {

mysqli_query($conexao,"Update siteadm_onepage set titulo_menu_quem_somos = '".$_POST["titulo_menu_quem_somos"]."', conteudo_menu_quem_somos = '".$_POST["texto"]."' where codigo = '".$dados_onepage["codigo"]."'");

$_SESSION["status_acao"] = '<div class="alert alert-success text-center" role="alert">'.$lang['lang_info_config_painel_resultado_ok'].'</div>';

header("Location: /configuracoes-one-page");
exit();
}

if($_POST["acao_form"] == "menu_nosso_trabalho") {

mysqli_query($conexao,"Update siteadm_onepage set titulo_menu_nosso_trabalho = '".$_POST["titulo_menu_nosso_trabalho"]."', conteudo_menu_nosso_trabalho = '".$_POST["texto"]."' where codigo = '".$dados_onepage["codigo"]."'");

$_SESSION["status_acao"] = '<div class="alert alert-success text-center" role="alert">'.$lang['lang_info_config_painel_resultado_ok'].'</div>';

header("Location: /configuracoes-one-page");
exit();
}

if($_POST["acao_form"] == "menu_programacao") {

mysqli_query($conexao,"Update siteadm_onepage set titulo_menu_programacao = '".$_POST["titulo_menu_programacao"]."', conteudo_menu_programacao = '".$_POST["texto"]."' where codigo = '".$dados_onepage["codigo"]."'");

$_SESSION["status_acao"] = '<div class="alert alert-success text-center" role="alert">'.$lang['lang_info_config_painel_resultado_ok'].'</div>';

header("Location: /configuracoes-one-page");
exit();
}

if($_POST["acao_form"] == "menu_contato") {

mysqli_query($conexao,"Update siteadm_onepage set titulo_menu_contato = '".$_POST["titulo_menu_contato"]."', email = '".$_POST["email"]."', whatsapp = '".$_POST["whatsapp"]."', localidade = '".$_POST["localidade"]."'  where codigo = '".$dados_onepage["codigo"]."'");

$_SESSION["status_acao"] = '<div class="alert alert-success text-center" role="alert">'.$lang['lang_info_config_painel_resultado_ok'].'</div>';

header("Location: /configuracoes-one-page");
exit();
}

if($_POST["acao_form"] == "menu_noticias") {

mysqli_query($conexao,"Update siteadm_onepage set titulo_menu_noticias = '".$_POST["titulo_menu_noticias"]."', conteudo_menu_noticias = '".$_POST["rss"]."' where codigo = '".$dados_onepage["codigo"]."'");

$_SESSION["status_acao"] = '<div class="alert alert-success text-center" role="alert">'.$lang['lang_info_config_painel_resultado_ok'].'</div>';

header("Location: /configuracoes-one-page");
exit();
}


/////////////////////////////////////////////////
/////////////////// Idioma //////////////////////
/////////////////////////////////////////////////

if($dados_stm["idioma_painel"] == "pt-br") {

$lang[ 'lang_info_one_page_titulo' ] = 'Titulo Menu';
$lang[ 'lang_info_one_page_exibir' ] = 'Exibir';
$lang[ 'lang_info_one_page_conteudo' ] = 'Conte&uacute;do';
$lang[ 'lang_info_one_page_exibir_capa' ] = 'Capa Artista';
$lang[ 'lang_info_one_page_exibir_menu_app' ] = 'Menu Aplicativo';
$lang[ 'lang_info_one_page_exibir_menu_quem_somos' ] = 'Menu Quem Somos';
$lang[ 'lang_info_one_page_exibir_menu_nosso_trabalho' ] = 'Menu Nosso Trabalho';
$lang[ 'lang_info_one_page_exibir_menu_programacao' ] = 'Menu Programa&ccedil;&atilde;o';
$lang[ 'lang_info_one_page_exibir_menu_noticias' ] = 'Menu Not&iacute;cias';
$lang[ 'lang_info_one_page_exibir_menu_contato' ] = 'Menu Contato';
$lang[ 'lang_info_one_page_exibir_menu_pedidos' ] = 'Menu Pedidos';
$lang[ 'lang_info_desativar_campo' ] = '(deixe este campo em branco para desativa-lo)';
$lang[ 'lang_info_one_page_cor_texto' ] = 'Cor Texto';
$lang[ 'lang_info_one_page_cor_background1' ] = 'Cor Fundo 1';
$lang[ 'lang_info_one_page_cor_background2' ] = 'Cor Fundo 2';
$lang[ 'lang_info_logo' ] = 'Somente PNG transparente maximo 200px altura.';

} else if($dados_stm["idioma_painel"] == "en") {

$lang[ 'lang_info_one_page_titulo' ] = 'Menu Title';
$lang[ 'lang_info_one_page_exibir' ] = 'Show';
$lang[ 'lang_info_one_page_conteudo' ] = 'Content';
$lang[ 'lang_info_one_page_exibir_capa' ] = 'Album Art';
$lang[ 'lang_info_one_page_exibir_menu_app' ] = 'Menu App';
$lang[ 'lang_info_one_page_exibir_menu_quem_somos' ] = 'Menu About';
$lang[ 'lang_info_one_page_exibir_menu_nosso_trabalho' ] = 'Menu Our Work';
$lang[ 'lang_info_one_page_exibir_menu_programacao' ] = 'Menu Schedules';
$lang[ 'lang_info_one_page_exibir_menu_noticias' ] = 'Menu News';
$lang[ 'lang_info_one_page_exibir_menu_contato' ] = 'Menu Contact';
$lang[ 'lang_info_one_page_exibir_menu_pedidos' ] = 'Menu Requests';
$lang[ 'lang_info_desativar_campo' ] = '(leave empty to disable displaying)';
$lang[ 'lang_info_one_page_cor_texto' ] = 'Text Color';
$lang[ 'lang_info_one_page_cor_background1' ] = 'Background Color 1';
$lang[ 'lang_info_one_page_cor_background2' ] = 'Background Color 2';
$lang[ 'lang_info_logo' ] = 'Only PNG transparent max 200px height.';

} else {

$lang[ 'lang_info_one_page_titulo' ] = 'Titulo Menu';
$lang[ 'lang_info_one_page_exibir' ] = 'Exibir';
$lang[ 'lang_info_one_page_conteudo' ] = 'Contenido';
$lang[ 'lang_info_one_page_exibir_capa' ] = 'Caratula';
$lang[ 'lang_info_one_page_exibir_menu_app' ] = 'Menu Aplicativo';
$lang[ 'lang_info_one_page_exibir_menu_quem_somos' ] = 'Menu Quienes Somos';
$lang[ 'lang_info_one_page_exibir_menu_nosso_trabalho' ] = 'Menu Nuestro Trabajo';
$lang[ 'lang_info_one_page_exibir_menu_programacao' ] = 'Menu Calendario';
$lang[ 'lang_info_one_page_exibir_menu_noticias' ] = 'Menu Not&iacute;cias';
$lang[ 'lang_info_one_page_exibir_menu_contato' ] = 'Menu Contacto';
$lang[ 'lang_info_one_page_exibir_menu_pedidos' ] = 'Menu Pedidos';
$lang[ 'lang_info_desativar_campo' ] = '(deje este campo en blanco para deshabilitarlo)';
$lang[ 'lang_info_one_page_cor_texto' ] = 'Color Texto';
$lang[ 'lang_info_one_page_cor_background1' ] = 'Color Fondo 1';
$lang[ 'lang_info_one_page_cor_background2' ] = 'Color Fondo 2';
$lang[ 'lang_info_logo' ] = 'Solamente PNG transparente maximo 200px altura.';

}
?>
<!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/summernote-bs4.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>
              <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>
            </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>
          <div class="row">            

            <div class="col-12">
                <div class="card">
                  <div class="card-body">
                    <h4 class="card-title">Site Administr&aacute;vel One Page</h4>
                    <div class="table-responsive">
                      <strong>URL:</strong><br>
                        <input class="form-control" readonly="readonly" type="text" onmouseover="this.select()" value="https://<?php echo $url_player; ?>/one-page/<?php echo $dados_stm["porta"]; ?>">
                      <strong>iFrame:</strong><br>
                      <input class="form-control" readonly="readonly" type="text" onmouseover="this.select()"  value='<iframe src="https://<?php echo $url_player; ?>/one-page/<?php echo $dados_stm["porta"]; ?>" frameborder="0" width="100%" height="465"></iframe>'>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-6">
                <div class="card">
                  <div class="card-body">
                    <h4 class="card-title">Site</h4>
                    <div class="table-responsive">
                      <form method="post" action="/configuracoes-one-page" style="padding:0px; margin:0px" enctype="multipart/form-data">
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td width="20%" height="50" align="left"><strong><?php echo $lang['lang_info_streaming_app_android_radio_nome']; ?></strong></td>
                            <td align="left"><input name="nome" type="text" class="form-control" id="nome" value="<?php echo $dados_onepage["nome"]; ?>" required="required" /></td>
                          </tr>
                          <tr>
                            <td height="50"><strong>FaceBook</strong></td>
                            <td>
                              <input class="form-control" name="url_facebook" type="text" id="url_facebook" value="<?php echo $dados_onepage["url_facebook"]; ?>" />
                              <code style="font-size:12px"><?php echo $lang['lang_info_desativar_campo']; ?></code></td>
                          </tr>
                          <tr>
                            <td height="50"><strong>Twitter</strong></td>
                            <td>
                              <input class="form-control" name="url_twitter" type="text" id="url_twitter" value="<?php echo $dados_onepage["url_twitter"]; ?>" />
                              <code style="font-size:12px"><?php echo $lang['lang_info_desativar_campo']; ?></code></td>
                          </tr>    
                          <tr>
                            <td height="50"><strong>Instagram</strong></td>
                            <td>
                              <input class="form-control" name="url_instagram" type="text" id="url_instagram" value="<?php echo $dados_onepage["url_instagram"]; ?>" />
                              <code style="font-size:12px"><?php echo $lang['lang_info_desativar_campo']; ?></code></td>
                          </tr> 
                          <tr>
                            <td height="50"><strong>Canal YouTube</strong></td>
                            <td>
                              <input class="form-control" name="url_youtube" type="text" id="url_youtube" value="<?php echo $dados_onepage["url_youtube"]; ?>" />
                              <code style="font-size:12px"><?php echo $lang['lang_info_desativar_campo']; ?></code></td>
                          </tr>
                          <tr>
                            <td width="20%" height="50" align="left"><strong>Logo</strong></td>
                            <td align="left"><input class="form-control" type="file" name="logo">
                              <code style="font-size:12px"><?php echo $lang['lang_info_logo']; ?></code></td>
                          </tr> 
                          <tr>
                            <td height="43"></td>
                            <td></td>
                          </tr>
                          <tr>
                            <td height="50" colspan="2" align="right"><button type="submit" class="btn btn-info"><?php echo $lang['lang_botao_titulo_alterar_config']; ?></button><input class="form-control" name="acao_form" type="hidden" id="acao_form" value="geral" /></td>
                          </tr>
                        </table>
                      </form>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-6">
                <div class="card">
                  <div class="card-body">
                    <h4 class="card-title"><?php echo $lang['lang_botao_titulo_config']; ?></h4>
                    <div class="table-responsive">
                      <form method="post" action="/configuracoes-one-page" style="padding:0px; margin:0px">
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td width="40%" height="30" align="left"><strong><?php echo $lang['lang_info_one_page_exibir']; ?> <?php echo $lang['lang_info_one_page_exibir_capa']; ?></strong></td>
                            <td align="left"><input type="checkbox" id="exibir_capa" name="exibir_capa" value="sim" <?php if($dados_onepage["exibir_capa"] == "sim") { echo ' checked="checked"'; } ?> /></td>
                          </tr>
                          <tr>
                            <td height="30" align="left"><strong><?php echo $lang['lang_info_one_page_exibir']; ?> <?php echo $lang['lang_info_one_page_exibir_menu_app']; ?></strong></td>
                            <td align="left"><input type="checkbox" id="exibir_menu_app" name="exibir_menu_app" value="sim" <?php if($dados_onepage["exibir_menu_app"] == "sim") { echo ' checked="checked"'; } ?> /></td>
                          </tr>
                          <tr>
                            <td height="35" align="left"><strong><?php echo $lang['lang_info_one_page_exibir']; ?> <?php echo $lang['lang_info_one_page_exibir_menu_quem_somos']; ?></strong></td>
                            <td align="left"><input type="checkbox" id="exibir_menu_quem_somos" name="exibir_menu_quem_somos" value="sim" <?php if($dados_onepage["exibir_menu_quem_somos"] == "sim") { echo ' checked="checked"'; } ?> /></td>
                          </tr>
                          <tr>
                            <td height="35" align="left"><strong><?php echo $lang['lang_info_one_page_exibir']; ?> <?php echo $lang['lang_info_one_page_exibir_menu_nosso_trabalho']; ?></strong></td>
                            <td align="left"><input type="checkbox" id="exibir_menu_nosso_trabalho" name="exibir_menu_nosso_trabalho" value="sim" <?php if($dados_onepage["exibir_menu_nosso_trabalho"] == "sim") { echo ' checked="checked"'; } ?> /></td>
                          </tr>
                          <tr>
                            <td height="35" align="left"><strong><?php echo $lang['lang_info_one_page_exibir']; ?> <?php echo $lang['lang_info_one_page_exibir_menu_programacao']; ?></strong></td>
                            <td align="left"><input type="checkbox" id="exibir_menu_programacao" name="exibir_menu_programacao" value="sim" <?php if($dados_onepage["exibir_menu_programacao"] == "sim") { echo ' checked="checked"'; } ?> /></td>
                          </tr>
                          <tr>
                            <td height="35" align="left"><strong><?php echo $lang['lang_info_one_page_exibir']; ?> <?php echo $lang['lang_info_one_page_exibir_menu_noticias']; ?></strong></td>
                            <td align="left"><input type="checkbox" id="exibir_menu_noticias" name="exibir_menu_noticias" value="sim" <?php if($dados_onepage["exibir_menu_noticias"] == "sim") { echo ' checked="checked"'; } ?> /></td>
                          </tr>
                          <tr>
                            <td height="35" align="left"><strong><?php echo $lang['lang_info_one_page_exibir']; ?> <?php echo $lang['lang_info_one_page_exibir_menu_contato']; ?></strong></td>
                            <td align="left"><input type="checkbox" id="exibir_menu_contato" name="exibir_menu_contato" value="sim" <?php if($dados_onepage["exibir_menu_contato"] == "sim") { echo ' checked="checked"'; } ?> /></td>
                          </tr>
                          <tr>
                            <td height="35" align="left"><strong><?php echo $lang['lang_info_one_page_exibir']; ?> Chat</strong></td>
                            <td align="left"><input type="checkbox" id="url_chat" name="url_chat" value="sim" <?php if($dados_onepage["url_chat"] == "sim") { echo ' checked="checked"'; } ?> /></td>
                          </tr>
                          <tr>
                            <td height="35" align="left"><strong><?php echo $lang['lang_info_one_page_exibir']; ?> Camera Studio</strong></td>
                            <td align="left"><input type="checkbox" id="url_camera_studio" name="url_camera_studio" value="sim" <?php if($dados_onepage["url_camera_studio"] == "sim") { echo ' checked="checked"'; } ?> /></td>
                          </tr>
                          <tr>
                            <td height="35"><strong>Visualizer(VU spectro)</strong></td>
                            <td align="left">
                              <select class="form-control" name="visualizer" id="visualizer" style="width:100px; height:30px">
                                <option value="1"<?php if($dados_onepage["visualizer"] == "1") { echo ' selected="selected"'; } ?>>1</option>
                                <option value="2"<?php if($dados_onepage["visualizer"] == "2") { echo ' selected="selected"'; } ?>>2</option>
                                <option value="3"<?php if($dados_onepage["visualizer"] == "3") { echo ' selected="selected"'; } ?>>3</option>
                                <option value="4"<?php if($dados_onepage["visualizer"] == "4") { echo ' selected="selected"'; } ?>>4</option>
                                <option value="5"<?php if($dados_onepage["visualizer"] == "5") { echo ' selected="selected"'; } ?>>5</option>
                                <option value="6"<?php if($dados_onepage["visualizer"] == "6") { echo ' selected="selected"'; } ?>>6</option>
                              </select></td>
                          </tr> 
                          <tr>
                            <td height="35"><strong><?php echo $lang['lang_info_one_page_cor_texto']; ?></strong></td>
                            <td align="left">
                              <input class="form-control" type="color" name="cor_texto" style="width:100px; height:30px" value="<?php echo $dados_onepage['cor_texto']; ?>" /></td>
                          </tr>
                          <tr>
                            <td height="35"><strong><?php echo $lang['lang_info_one_page_cor_background1']; ?></strong></td>
                            <td align="left">
                              <input class="form-control" type="color" name="cor_background1" style="width:100px; height:30px" value="<?php echo $dados_onepage['cor_background1']; ?>" /></td>
                          </tr>
                          <tr>
                            <td height="35"><strong><?php echo $lang['lang_info_one_page_cor_background2']; ?></strong></td>
                            <td align="left">
                              <input class="form-control" type="color" name="cor_background2" style="width:100px; height:30px" value="<?php echo $dados_onepage['cor_background2']; ?>" /></td>
                          </tr>
                          <tr>
                            <td height="50" colspan="2" align="right"><button type="submit" class="btn btn-info"><?php echo $lang['lang_botao_titulo_alterar_config']; ?></button><input class="form-control" name="acao_form" type="hidden" id="acao_form" value="configuracoes" /></td>
                          </tr>
                        </table>
                      </form>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-6">
                <div class="card">
                  <div class="card-body">
                    <h4 class="card-title"><?php echo $lang['lang_info_one_page_exibir_menu_app']; ?></h4>
                    <div class="table-responsive">
                      <form method="post" action="/configuracoes-one-page" style="padding:0px; margin:0px">
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="50" align="left"><input class="form-control" name="titulo_menu_app" type="text" id="titulo_menu_app" value="<?php echo $dados_onepage["titulo_menu_app"]; ?>" placeholder="<?php echo $lang['lang_info_one_page_titulo']; ?>" required="required" /></td>
                          </tr>
                          <tr>
                            <td height="50" align="left"><input class="form-control" name="app_url_google_play" type="url" id="app_url_google_play" value="<?php echo $dados_onepage["app_url_google_play"]; ?>" placeholder="URL app Google Play" />
                              <code style="font-size:12px"><?php echo $lang['lang_info_desativar_campo']; ?></code></td>
                          </tr>
                          <tr>
                            <td height="50" align="left"><input class="form-control" name="app_url_apple_store" type="url" id="app_url_apple_store" value="<?php echo $dados_onepage["app_url_apple_store"]; ?>" placeholder="URL app Apple Store" />
                              <code style="font-size:12px"><?php echo $lang['lang_info_desativar_campo']; ?></code></td>
                          </tr>
                          <tr>
                            <td height="50" align="left"><textarea class="form-control html-editor" id="texto" name="texto" rows="10"><?php echo $dados_onepage["conteudo_menu_app"]; ?></textarea></td>
                          </tr>
                          <tr>
                            <td height="50" align="right"><button type="submit" class="btn btn-info"><?php echo $lang['lang_botao_titulo_alterar_config']; ?></button><input class="form-control" name="acao_form" type="hidden" id="acao_form" value="menu_app" /></td>
                          </tr>
                        </table>
                      </form>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-6">
                <div class="card">
                  <div class="card-body">
                    <h4 class="card-title"><?php echo $lang['lang_info_one_page_exibir_menu_programacao']; ?></h4>
                    <div class="table-responsive">
                      <form method="post" action="/configuracoes-one-page" style="padding:0px; margin:0px">
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="50" align="left"><input class="form-control" name="titulo_menu_programacao" type="text" id="titulo_menu_programacao" value="<?php echo $dados_onepage["titulo_menu_programacao"]; ?>" placeholder="<?php echo $lang['lang_info_one_page_titulo']; ?>" required="required" /></td>
                          </tr>
                          <tr>
                            <td height="50" align="left"><textarea class="form-control html-editor2" id="texto" name="texto" rows="10"><?php echo $dados_onepage["conteudo_menu_programacao"]; ?></textarea></td>
                          </tr>
                          <tr>
                            <td height="50" align="right"><button type="submit" class="btn btn-info"><?php echo $lang['lang_botao_titulo_alterar_config']; ?></button><input class="form-control" name="acao_form" type="hidden" id="acao_form" value="menu_programacao" /></td>
                          </tr>
                        </table>
                      </form>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-6">
                <div class="card">
                  <div class="card-body">
                    <h4 class="card-title"><?php echo $lang['lang_info_one_page_exibir_menu_quem_somos']; ?></h4>
                    <div class="table-responsive">
                      <form method="post" action="/configuracoes-one-page" style="padding:0px; margin:0px">
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="50" align="left"><input class="form-control" name="titulo_menu_quem_somos" type="text" id="titulo_menu_quem_somos" value="<?php echo $dados_onepage["titulo_menu_quem_somos"]; ?>" placeholder="<?php echo $lang['lang_info_one_page_titulo']; ?>" required="required" /></td>
                          </tr>
                          <tr>
                            <td height="50" align="left"><textarea class="form-control html-editor" id="texto" name="texto" rows="10"><?php echo $dados_onepage["conteudo_menu_quem_somos"]; ?></textarea></td>
                          </tr>
                          <tr>
                            <td height="50" align="right"><button type="submit" class="btn btn-info"><?php echo $lang['lang_botao_titulo_alterar_config']; ?></button><input class="form-control" name="acao_form" type="hidden" id="acao_form" value="menu_quem_somos" /></td>
                          </tr>
                        </table>
                      </form>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-6">
                <div class="card">
                  <div class="card-body">
                    <h4 class="card-title"><?php echo $lang['lang_info_one_page_exibir_menu_nosso_trabalho']; ?></h4>
                    <div class="table-responsive">
                      <form method="post" action="/configuracoes-one-page" style="padding:0px; margin:0px">
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="50" align="left"><input class="form-control" name="titulo_menu_nosso_trabalho" type="text" id="titulo_menu_nosso_trabalho" value="<?php echo $dados_onepage["titulo_menu_nosso_trabalho"]; ?>" placeholder="<?php echo $lang['lang_info_one_page_titulo']; ?>" required="required" /></td>
                          </tr>
                          <tr>
                            <td height="50" align="left"><textarea class="form-control html-editor" id="texto" name="texto" rows="10"><?php echo $dados_onepage["conteudo_menu_nosso_trabalho"]; ?></textarea></td>
                          </tr>
                          <tr>
                            <td height="50" align="right"><button type="submit" class="btn btn-info"><?php echo $lang['lang_botao_titulo_alterar_config']; ?></button><input class="form-control" name="acao_form" type="hidden" id="acao_form" value="menu_nosso_trabalho" /></td>
                          </tr>
                        </table>
                      </form>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-6">
                <div class="card">
                  <div class="card-body">
                    <h4 class="card-title"><?php echo $lang['lang_info_one_page_exibir_menu_contato']; ?></h4>
                    <div class="table-responsive">
                      <form method="post" action="/configuracoes-one-page" style="padding:0px; margin:0px">
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="50" align="left"><input class="form-control" name="titulo_menu_contato" type="text" id="titulo_menu_contato" value="<?php echo $dados_onepage["titulo_menu_contato"]; ?>" placeholder="<?php echo $lang['lang_info_one_page_titulo']; ?>" required="required" /></td>
                          </tr>
                          <tr>
                            <td height="50" align="left"><input class="form-control" name="email" type="text" id="email" value="<?php echo $dados_onepage["email"]; ?>" placeholder="E-mail" />
                              <code style="font-size:12px"><?php echo $lang['lang_info_desativar_campo']; ?></code></td>
                          </tr>
                          <tr>
                            <td height="50" align="left"><input class="form-control" name="localidade" type="text" id="localidade" value="<?php echo $dados_onepage["localidade"]; ?>" />
                              <code style="font-size:12px"><?php echo $lang['lang_info_desativar_campo']; ?></code></td>
                          </tr>
                          <tr>
                            <td height="50" align="left"><input class="form-control" name="whatsapp" type="text" id="whatsapp" value="<?php echo $dados_onepage["whatsapp"]; ?>" />
                              <code style="font-size:12px">+00 00000000000 <?php echo $lang['lang_info_desativar_campo']; ?></code></td>
                          </tr>
                          <tr>
                            <td height="50" align="right"><button type="submit" class="btn btn-info"><?php echo $lang['lang_botao_titulo_alterar_config']; ?></button><input class="form-control" name="acao_form" type="hidden" id="acao_form" value="menu_contato" /></td>
                          </tr>
                        </table>
                      </form>
                    </div>
                  </div>
                </div>
              </div>

              <div class="col-6">
                <div class="card">
                  <div class="card-body">
                    <h4 class="card-title"><?php echo $lang['lang_info_one_page_exibir_menu_noticias']; ?></h4>
                    <div class="table-responsive">
                      <form method="post" action="/configuracoes-one-page" style="padding:0px; margin:0px">
                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="50" align="left"><input class="form-control" name="titulo_menu_noticias" type="text" id="titulo_menu_noticias" value="<?php echo $dados_onepage["titulo_menu_noticias"]; ?>" placeholder="<?php echo $lang['lang_info_one_page_titulo']; ?>" required="required" /></td>
                          </tr>
                          <tr>
                            <td height="50" align="left"><select class="form-control" onchange="document.getElementById('rss').value = this.value">
                                          <option value="">Escolha um site</option>
                                          <option value="digite aqui a URL do rss desejado/escriba aquí la url de la rss deseada">Personalizado/Custom</option>
                                          <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="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>
                                        </select></td>
                                        </tr>
                                        <tr>
                        <td align="left" height="50"><input name="rss" type="text" id="rss" class="form-control" value="<?php echo $dados_onepage["conteudo_menu_noticias"]; ?>" /></td>
                      </tr>
                          <tr>
                            <td height="50" align="right"><button type="submit" class="btn btn-info"><?php echo $lang['lang_botao_titulo_alterar_config']; ?></button><input class="form-control" name="acao_form" type="hidden" id="acao_form" value="menu_noticias" /></td>
                          </tr>
                        </table>
                      </form>
                    </div>
                  </div>
                </div>
              </div>

          </div>
        </div>
      </div>      

    </div>
  </div>
  <script src="/inc/vendor.bundle.base.js"></script>
  <script src="/inc/vendor.bundle.addons.js"></script>
    <script src="/inc/summernote-bs4.min.js"></script>
  <script src="/inc/theme.js"></script>
  <script>
  status_streaming('<?php echo $porta_code; ?>');
  setInterval("status_streaming('<?php echo $porta_code; ?>')",60000);
    $('.html-editor').summernote({
            height: 300,
            tabsize: 2
    });
    $('.html-editor2').summernote({
            height: 413,
            tabsize: 2
    });
  </script>
</body>
</html>