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

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

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

$dados_servidor_camera_studio = mysqli_fetch_array(mysqli_query($conexao,"SELECT * FROM servidores where codigo = '".$dados_stm["codigo_servidor_camera_studio_atual"]."'"));

if($dados_servidor_camera_studio["nome_principal"]) {
$servidor_camera_studio = code_decode($dados_servidor_camera_studio["nome_principal"].".".$dados_config["dominio_padrao"],"E");
} else {
$servidor_camera_studio = code_decode($dados_servidor_camera_studio["nome"].".".$dados_config["dominio_padrao"],"E");
}

if($_POST["acao_form"]) {

if(empty($_POST["nome"])) {
$_SESSION["status_acao"] = '<div class="alert alert-danger text-center" role="alert">O nome da r&aacute;dio &eacute; obrigat&oacute;rio!</div>';

header("Location: /app-multi-plataforma");
exit();
}

if($_FILES["logo"]["tmp_name"]) {
@copy($_FILES["logo"]["tmp_name"],$_SERVER['DOCUMENT_ROOT']."/player/app-multi-plataforma/logo-".$dados_stm["porta"].".png");
}
if($_FILES["fundo"]["tmp_name"]) {
@copy($_FILES["fundo"]["tmp_name"],$_SERVER['DOCUMENT_ROOT']."/player/app-multi-plataforma/background-".$dados_stm["porta"].".jpg");
}

$url_chat = ($_POST["ativar_chat"]) ? $_POST["url_chat"] : "";
$url_camera_studio = ($_POST["ativar_camera_studio"]) ? $_POST["url_camera_studio"] : "";
$url_pedir_musica = ($_POST["ativar_pedido_musica"]) ? $_POST["url_pedir_musica"] : "";
$exibir_capa = ($_POST["exibir_capa"]) ? "sim" : "nao";

$whatsapp = str_replace("+", "", $_POST["whatsapp"]);
$whatsapp = str_replace(" ", "", $_POST["whatsapp"]);
$whatsapp = str_replace("(", "", $_POST["whatsapp"]);
$whatsapp = str_replace(")", "", $_POST["whatsapp"]);

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

mysqli_query($conexao,"Update app_multi_plataforma set nome = '".$_POST["nome"]."', email = '".$_POST["email"]."', whatsapp = '".$whatsapp."', url_facebook = '".$_POST["url_facebook"]."', url_instagram = '".$_POST["url_instagram"]."', url_twitter = '".$_POST["url_twitter"]."', url_site = '".$_POST["url_site"]."', visualizer = '".$_POST["visualizer"]."', cor_texto = '".$_POST["cor_texto"]."', cor_menu_claro = '".$_POST["cor_menu_claro"]."', cor_menu_escuro = '".$_POST["cor_menu_escuro"]."', cor_splash = '".$_POST["cor_splash"]."', url_logo = '/app-multi-plataforma/logo-".$dados_stm["porta"].".png', url_background = '/app-multi-plataforma/background-".$dados_stm["porta"].".jpg', url_chat = '".$url_chat."', url_camera_studio = '".$url_camera_studio."', url_pedir_musica = '".$url_pedir_musica."', text_prog = '".$_POST["text_prog"]."', text_hist = '".$_POST["text_hist"]."', url_youtube = '".$_POST["url_youtube"]."', exibir_capa = '".$exibir_capa."' where codigo = '".$dados_app_multi_plataforma["codigo"]."'");

}

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

mysqli_query($conexao,"INSERT INTO app_multi_plataforma (codigo_stm,nome,email,url_facebook,url_instagram,url_twitter,url_youtube,url_site,url_chat,url_camera_studio,url_pedir_musica,url_logo,url_background,whatsapp,cor_texto,cor_menu_claro,cor_menu_escuro,cor_splash,visualizer,exibir_capa,text_prog,text_hist) VALUES ('".$dados_stm["codigo"]."','".$_POST["nome"]."','".$_POST["email"]."','".$_POST["url_facebook"]."','".$_POST["url_instagram"]."','".$_POST["url_twitter"]."','".$_POST["url_youtube"]."','".$_POST["url_site"]."','".$_POST["url_chat"]."','".$url_camera_studio."','".$url_pedir_musica."','/app-multi-plataforma/logo-".$dados_stm["porta"].".png','/app-multi-plataforma/background-".$dados_stm["porta"].".jpg','".$whatsapp."','".$_POST["cor_texto"]."','".$_POST["cor_menu_claro"]."','".$_POST["cor_menu_escuro"]."','".$_POST["cor_splash"]."','".$_POST["visualizer"]."','".$exibir_capa."','".$_POST["text_prog"]."','".$_POST["text_hist"]."')");
}

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

header("Location: /app-multi-plataforma");
exit();
}

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

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

$lang[ 'lang_info_streaming_app_android_tab_app_pronto' ] = 'Pr&eacute;via App' ;
$lang[ 'lang_info_streaming_app_android_tab_configurar_app' ] = 'Configurar App' ;
$lang[ 'lang_info_streaming_app_android_info_configuracoes' ] = '1-Preencha os dados abaixo para configurar seu App. Ap&oacute;s a configura&ccedil;&atilde;o ser&aacute; exibido a pr&eacute;via e c&oacute;digo para instala&ccedil;&atilde;o em seu site.<br>2-Insira em seu site o c&oacute;digo do bot&atilde;o de instala&ccedil;&atilde;o.<br>3-Seu visitante ir&aacute; clicar no bot&atilde;o de instala&ccedil;&atilde;o e o app ser&aacute; instalado de forma segura.' ;
$lang[ 'lang_info_streaming_app_android_info_desativar_campo' ] = '(deixe este campo em branco para desativa-lo)';
$lang[ 'lang_info_streaming_app_android_app_cor_texto' ] = 'Cor Texto';
$lang[ 'lang_info_streaming_app_android_app_cor_menu_claro' ] = 'Cor Menu Claro';
$lang[ 'lang_info_streaming_app_android_app_cor_menu_escuro' ] = 'Cor Menu Escuro';
$lang[ 'lang_info_streaming_app_android_app_cor_splash' ] = 'Cor Fundo Abertura(Splash)';
$lang[ 'lang_info_streaming_app_android_app_historia' ] = 'Texto Hist&oacute;ria';
$lang[ 'lang_info_streaming_app_android_app_programacao' ] = 'Texto Programa&ccedil;&atilde;o';
$lang[ 'lang_info_streaming_app_android_info_instalar_app' ] = 'Bot&atilde;o Instala&ccedil;&atilde;o:';
$lang[ 'lang_info_streaming_app_android_info_instalar_app2' ] = 'Insira o c&oacute;digo acima em seu site, ao clicar, ser&aacute; aberto o app no navegador do ouvinte e ser&aacute; exibido uma mensagem para instala&ccedil;&atilde;o do app.';

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

$lang[ 'lang_info_streaming_app_android_tab_app_pronto' ] = 'App Preview' ;
$lang[ 'lang_info_streaming_app_android_tab_configurar_app' ] = 'Configure App' ;
$lang[ 'lang_info_streaming_app_android_info_configuracoes' ] = '1-Fill in the data below to configure your App. After the configuration the preview and installation code on your website is displayed. <br> 2-Insert the code of the installation button on your website. <br> 3-Your visitor will click on the install button and the app will be safely installed .' ;
$lang[ 'lang_info_streaming_app_android_info_desativar_campo' ] = '(leave empty to disable displaying)';
$lang[ 'lang_info_streaming_app_android_app_cor_texto' ] = 'Text Color';
$lang[ 'lang_info_streaming_app_android_app_cor_menu_claro' ] = 'Menu Color Light';
$lang[ 'lang_info_streaming_app_android_app_cor_menu_escuro' ] = 'Menu Color Dark';
$lang[ 'lang_info_streaming_app_android_app_cor_splash' ] = 'Splash Color';
$lang[ 'lang_info_streaming_app_android_app_historia' ] = 'Text Radio Story';
$lang[ 'lang_info_streaming_app_android_app_programacao' ] = 'Text Radio Schedules';
$lang[ 'lang_info_streaming_app_android_info_instalar_app' ] = 'Install Button:';
$lang[ 'lang_info_streaming_app_android_info_instalar_app2' ] = 'Add the code above on your website, when clicking, it will be open the app in the listener\'s browser and a message is displayed to install the app.';

} else {

$lang[ 'lang_info_streaming_app_android_tab_app_pronto' ] = 'Vista Previa App' ;
$lang[ 'lang_info_streaming_app_android_tab_configurar_app' ] = 'Configurar App' ;
$lang[ 'lang_info_streaming_app_android_info_configuracoes' ] = '1-Complete los datos a continuaci&oacute;n para crear su aplicaci&oacute;n. Despu&eacute;s de la configuraci&oacute;n se mostrar&aacute; la previa y el c&oacute;digo de instalaci&oacute;n en su sitio web.<br>2-A&ntilde;ade el c&oacute;digo del bot&oacute;n de instalaci&oacute;n en su sitio web.<br>3-Su visitante har&aacute; clic en el bot&oacute;n de instalaci&oacute;n y se agregar&aacute; la aplicaci&oacute;n.' ;
$lang[ 'lang_info_streaming_app_android_info_desativar_campo' ] = '(deje este campo en blanco para deshabilitarlo)';
$lang[ 'lang_info_streaming_app_android_app_cor_texto' ] = 'Color Texto';
$lang[ 'lang_info_streaming_app_android_app_cor_menu_claro' ] = 'Color Menu Claro';
$lang[ 'lang_info_streaming_app_android_app_cor_menu_escuro' ] = 'Color Menu Oscuro';
$lang[ 'lang_info_streaming_app_android_app_cor_splash' ] = 'Color Inicio(Splash)';
$lang[ 'lang_info_streaming_app_android_app_historia' ] = 'Texto Historial';
$lang[ 'lang_info_streaming_app_android_app_programacao' ] = 'Texto Programaci&oacute;n';
$lang[ 'lang_info_streaming_app_android_info_instalar_app' ] = 'Botón de Instalación:';
$lang[ 'lang_info_streaming_app_android_info_instalar_app2' ] = 'A&ntilde;ade el c&oacute;digo anterior en su sitio web, al hacer clic, abra la aplicaci&oacute;n en el navegador del oyente y se muestra un mensaje para instalar la aplicaci&oacute;n.';

}
?>
<!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>
<script type="text/javascript" src="/admin/inc/tinymce/tiny_mce.js"></script>
<style type="text/css">.strong-txt {font-weight: bold;}</style>
</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>
          <div class="row">            
             <?php if($dados_app_multi_plataforma["codigo"] > 0) { ?>
            <div class="col-lg-12">
              <div class="card">
                  <div class="card-header">
                    <header><?php echo $lang['lang_info_streaming_app_android_tab_app_pronto']; ?></header>
                  </div>
                  <div class="card-body">
                      <table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="40%" height="400" align="center"><iframe src="https://<?php echo $url_player; ?>/player-app-multi-plataforma/<?php echo $dados_stm["porta"]; ?>?app-multi=preview" style="width:300px; height:500px" frameborder="0" onmousewheel=""></iframe></td>
    <td width="60%" align="center" style="padding:10px"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="50%" height="85" align="center"><img src="https://<?php echo $url_player; ?>/app-multi-plataforma/img-instalar-app-android.png" width="150" height="48" /></td>
        <td width="50%" align="center"><textarea name="textarea" readonly="readonly" style="width:95%; height:70px;font-size:10px" onmouseover="this.select()"><a href="https://<?php echo $url_player; ?>/player-app-multi-plataforma/<?php echo $dados_stm["porta"]; ?>" target="_blank"><img src="https://<?php echo $url_player; ?>/app-multi-plataforma/img-instalar-app-android.png" width="150" height="48" /></a></textarea></td>
      </tr>
      <tr>
        <td height="85" align="center"><img src="https://<?php echo $url_player; ?>/app-multi-plataforma/img-instalar-app-iphone.png" width="150" height="48" /></td>
        <td align="center"><textarea name="textarea" readonly="readonly" style="width:95%; height:70px;font-size:10px" onmouseover="this.select()"><a href="https://<?php echo $url_player; ?>/player-app-multi-plataforma/<?php echo $dados_stm["porta"]; ?>" target="_blank"><img src="https://<?php echo $url_player; ?>/app-multi-plataforma/img-instalar-app-iphone.png" width="150" height="48" /></a></textarea></td>
      </tr>
      <tr>
        <td height="85" align="center"><img src="https://<?php echo $url_player; ?>/app-multi-plataforma/img-instalar-app-windows.png" width="150" height="48" /></td>
        <td align="center"><textarea name="textarea" readonly="readonly" style="width:95%; height:70px;font-size:10px" onmouseover="this.select()"><a href="https://<?php echo $url_player; ?>/player-app-multi-plataforma/<?php echo $dados_stm["porta"]; ?>" target="_blank"><img src="https://<?php echo $url_player; ?>/app-multi-plataforma/img-instalar-app-windows.png" width="150" height="48" /></a></textarea></td>
      </tr>
      <tr>
        <td height="70" align="center"><img src="http://chart.apis.google.com/chart?cht=qr&chs=120x120&chl=https://<?php echo $url_player; ?>/player-app-multi-plataforma/<?php echo $dados_stm["porta"]; ?>" /></td>
        <td align="center"><textarea name="textarea" readonly="readonly" style="width:95%; height:60px;font-size:10px" onmouseover="this.select()"><img src="http://chart.apis.google.com/chart?cht=qr&chs=200x200&chl=https://<?php echo $url_player; ?>/player-app-multi-plataforma/<?php echo $dados_stm["porta"]; ?>" /></textarea></td>
      </tr>
      <tr>
        <td height="60" colspan="2" align="center" class="texto_padrao"><?php echo $lang['lang_info_streaming_app_android_info_instalar_app2']; ?></td>
        </tr>
    </table></td>
  </tr>
</table>
                  </div>
              </div>
            </div>           
            <?php } ?>
            <div class="col-lg-12">
              <div class="card">
                  <div class="card-header">
                    <header><?php echo $lang['lang_info_streaming_app_android_tab_configurar_app']; ?></header>
                  </div>
                  <div class="card-body">
                      <form method="post" action="/app-multi-plataforma" style="padding:0px; margin:0px" enctype="multipart/form-data">
      <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-bottom:5px; background-color: #C1E0FF; border: #006699 1px solid">
      <tr>
        <td width="35" height="60" align="center" scope="col"><img src="/img/icones/ajuda.gif" width="16" height="16" /></td>
        <td align="left" class="texto_padrao_pequeno" scope="col" style="color:#003366"><?php echo $lang['lang_info_streaming_app_android_info_configuracoes']; ?></td>
      </tr>
    </table>
     <table width="100%" border="0" cellpadding="0" cellspacing="0">
     <tr>
      <td width="20%" height="40" class="strong-txt"><?php echo $lang['lang_info_streaming_app_android_radio_nome']; ?></td>
      <td width="80%" class="texto_padrao_pequeno">
        <input name="nome" type="text" id="nome" style="width:350px" value="<?php echo $dados_app_multi_plataforma["nome"]; ?>" required="required" /></td>
    </tr>
    <tr>
      <td width="20%" height="50" class="strong-txt">E-mail</td>
      <td width="80%" class="texto_padrao_pequeno">
        <input name="email" type="text" id="email" style="width:350px" value="<?php echo $dados_app_multi_plataforma["email"]; ?>" required="required" />
        <br />
        <?php echo $lang['lang_info_streaming_app_android_info_desativar_campo']; ?>
        </td>
    </tr>
    <tr>
      <td width="20%" height="50" class="strong-txt">Site</td>
      <td width="80%" class="texto_padrao_pequeno">
        <input name="url_site" type="text" id="url_site" style="width:350px" value="<?php echo $dados_app_multi_plataforma["url_site"]; ?>" />
        <br />
        <?php echo $lang['lang_info_streaming_app_android_info_desativar_campo']; ?></td>
    </tr>
    <tr>
      <td width="20%" height="50" class="strong-txt">FaceBook</td>
      <td width="80%" class="texto_padrao_pequeno">
        <input name="url_facebook" type="text" id="url_facebook" style="width:350px" value="<?php echo $dados_app_multi_plataforma["url_facebook"]; ?>" />
        <br />
        <?php echo $lang['lang_info_streaming_app_android_info_desativar_campo']; ?></td>
    </tr>
    <tr>
      <td width="20%" height="50" class="strong-txt">Twitter</td>
      <td width="80%" class="texto_padrao_pequeno">
        <input name="url_twitter" type="text" id="url_twitter" style="width:350px" value="<?php echo $dados_app_multi_plataforma["url_twitter"]; ?>" />
        <br />
        <?php echo $lang['lang_info_streaming_app_android_info_desativar_campo']; ?></td>
    </tr>    
    <tr>
      <td width="20%" height="50" class="strong-txt">Instagram</td>
      <td width="80%" class="texto_padrao_pequeno">
        <input name="url_instagram" type="text" id="url_instagram" style="width:350px" value="<?php echo $dados_app_multi_plataforma["url_instagram"]; ?>" />
        <br />
        <?php echo $lang['lang_info_streaming_app_android_info_desativar_campo']; ?></td>
    </tr> 
    <tr>
      <td width="20%" height="50" class="strong-txt">Canal YouTube</td>
      <td width="80%" class="texto_padrao_pequeno">
        <input name="url_youtube" type="text" id="url_youtube" style="width:350px" value="<?php echo $dados_app_multi_plataforma["url_youtube"]; ?>" />
        <br />
        <?php echo $lang['lang_info_streaming_app_android_info_desativar_campo']; ?></td>
    </tr>
    <tr>
      <td width="20%" height="50" class="strong-txt">WhatsApp</td>
      <td width="80%" class="texto_padrao_pequeno">
        <input name="whatsapp" type="text" id="whatsapp" style="width:350px" value="<?php echo $dados_app_multi_plataforma["whatsapp"]; ?>" />
        <br />
        +00 00000000000 <?php echo $lang['lang_info_streaming_app_android_info_desativar_campo']; ?></td>
    </tr>
    <tr>
      <td width="20%" height="100" class="strong-txt"><?php echo $lang['lang_info_streaming_app_android_app_programacao']; ?></td>
      <td width="80%" class="texto_padrao_pequeno"><textarea name="text_prog" id="text_prog" style="width:350px" rows="5"><?php echo $dados_app_multi_plataforma["text_prog"]; ?></textarea></td>
    </tr>
    <tr>
      <td width="20%" height="100" class="strong-txt"><?php echo $lang['lang_info_streaming_app_android_app_historia']; ?></td>
      <td width="80%" class="texto_padrao_pequeno"><textarea name="text_hist" id="text_hist" style="width:350px" rows="5"><?php echo $dados_app_multi_plataforma["text_hist"]; ?></textarea></td>
    </tr>
    <tr>
      <td width="20%" height="50" class="strong-txt">Modulo Chat</td>
      <td width="80%" class="texto_padrao_pequeno"><input name="ativar_chat" type="checkbox" value="sim" <?php if($dados_app_multi_plataforma["url_chat"]) { echo ' checked="checked"'; } ?> />
        <input name="url_chat" type="hidden" id="url_chat" value="<?php echo "/app-multi-plataforma/chat/".$dados_stm["porta"].""; ?>" /></td>
    </tr>
    <tr>
      <td width="20%" height="50" class="strong-txt">Modulo Pedido Musical</td>
      <td width="80%" class="texto_padrao_pequeno"><input name="ativar_pedido_musica" type="checkbox" value="sim" <?php if($dados_app_multi_plataforma["url_pedir_musica"]) { echo ' checked="checked"'; } ?> />
        <input name="url_pedir_musica" type="hidden" id="url_pedir_musica" value="/app-multi-plataforma/pedido/<?php echo $dados_stm["porta"]; ?>" /></td>
    </tr>
  <?php if($dados_stm["camera_studio"] == "sim" && $dados_stm["camera_studio_instalado"] == "sim") { ?>    
    <tr>
      <td width="20%" height="50" class="strong-txt">Modulo Camera Studio</td>
      <td width="80%" class="texto_padrao_pequeno"><input name="ativar_camera_studio" type="checkbox" value="sim" <?php if($dados_app_multi_plataforma["url_camera_studio"]) { echo ' checked="checked"'; } ?> />
        <input name="url_camera_studio" type="hidden" id="url_camera_studio" value="https://player.<?php echo $dados_config["dominio_padrao"]; ?>/camera-studio/<?php echo $dados_stm["porta"]; ?>/<?php echo $servidor_camera_studio; ?>/16:9/true" /></td>
    </tr>
    <?php } else { ?> 
    <tr>
      <td width="20%" height="50" class="strong-txt">Modulo Camera Studio</td>
      <td width="80%" class="texto_padrao_pequeno"><input name="ativar_camera_studio" type="checkbox" value="sim" <?php if($dados_app_multi_plataforma["url_camera_studio"]) { echo ' checked="checked"'; } ?> />
        <input name="url_camera_studio" type="text" id="url_camera_studio" value="<?php echo $dados_app_multi_plataforma["url_camera_studio"]; ?>" style="width:320px" /></td>
    </tr>
    <?php } ?> 
    <tr>
      <td width="21%" height="50" class="strong-txt">Exibir Capa Artista</td>
      <td width="79%" class="texto_padrao_pequeno"><input name="exibir_capa" type="checkbox" value="sim" <?php if($dados_app_multi_plataforma["exibir_capa"] == "sim") { echo ' checked="checked"'; } ?> /></td>
    </tr>
    <tr>
      <td height="50" class="strong-txt">Visualizer(VU spectro)</td>
      <td class="texto_padrao_pequeno">
        <select name="visualizer" id="visualizer" style="width:100px; height:30px">
          <option value="1"<?php if($dados_app_multi_plataforma["visualizer"] == "1") { echo ' selected="selected"'; } ?>>1</option>
          <option value="2"<?php if($dados_app_multi_plataforma["visualizer"] == "2") { echo ' selected="selected"'; } ?>>2</option>
          <option value="3"<?php if($dados_app_multi_plataforma["visualizer"] == "3") { echo ' selected="selected"'; } ?>>3</option>
          <option value="4"<?php if($dados_app_multi_plataforma["visualizer"] == "4") { echo ' selected="selected"'; } ?>>4</option>
          <option value="5"<?php if($dados_app_multi_plataforma["visualizer"] == "5") { echo ' selected="selected"'; } ?>>5</option>
          <option value="6"<?php if($dados_app_multi_plataforma["visualizer"] == "6") { echo ' selected="selected"'; } ?>>6</option>
        </select></td>
    </tr> 
    <tr>
      <td height="50" class="strong-txt"><?php echo $lang['lang_info_streaming_app_android_app_cor_texto']; ?></td>
      <td class="texto_padrao_pequeno">
        <input type="color" name="cor_texto" style="width:100px; height:30px" value="<?php echo $dados_app_multi_plataforma['cor_texto']; ?>" /></td>
    </tr>
    <tr>
      <td height="50" class="strong-txt"><?php echo $lang['lang_info_streaming_app_android_app_cor_menu_claro']; ?></td>
      <td class="texto_padrao_pequeno">
        <input type="color" name="cor_menu_claro" style="width:100px; height:30px" value="<?php echo $dados_app_multi_plataforma['cor_menu_claro']; ?>" /></td>
    </tr>
    <tr>
      <td height="50" class="strong-txt"><?php echo $lang['lang_info_streaming_app_android_app_cor_menu_escuro']; ?></td>
      <td class="texto_padrao_pequeno">
        <input type="color" name="cor_menu_escuro" style="width:100px; height:30px" value="<?php echo $dados_app_multi_plataforma['cor_menu_escuro']; ?>" /></td>
    </tr>
    <tr>
      <td height="50" class="strong-txt"><?php echo $lang['lang_info_streaming_app_android_app_cor_splash']; ?></td>
      <td class="texto_padrao_pequeno">
        <input type="color" name="cor_splash" style="width:100px; height:30px" value="<?php echo $dados_app_multi_plataforma['cor_splash']; ?>" /></td>
    </tr>
    <tr>
      <td width="20%" height="50" class="strong-txt"><?php echo $lang['lang_info_streaming_app_android_radio_logo']; ?></td>
      <td width="80%" class="texto_padrao_pequeno"><input name="logo" type="file" id="logo" style="width:350px" />
        <br />PNG / 300x300</td>
    </tr>
    <tr>
      <td height="50" class="strong-txt"><?php echo $lang['lang_info_streaming_app_android_radio_fundo']; ?></td>
      <td class="texto_padrao_pequeno"><input name="fundo" type="file" id="fundo" style="width:350px" />
        <br />JPG / 640x1136</td>
    </tr>
    <?php if(empty($dados_app_multi_plataforma["nome"])) { ?>
          <tr>
            <td height="40" colspan="2" align="center"><button type="submit" class="btn btn-info"><?php echo $lang['lang_info_streaming_app_android_botao_submit']; ?></button><input name="acao_form" type="hidden" id="acao_form" value="criar" /></td>
          </tr>
    <?php } else { ?>
       <tr>
            <td height="40" colspan="2" align="center"><button type="submit" class="btn btn-info"><?php echo $lang['lang_botao_titulo_alterar_config']; ?></button><input name="acao_form" type="hidden" id="acao_form" value="configurar" /></td>
          </tr>
    <?php } ?>
  </table>
  </form>
                  </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/theme.js"></script>
  <script>
  status_streaming('<?php echo $porta_code; ?>');
  setInterval("status_streaming('<?php echo $porta_code; ?>')",60000);

tinyMCE.init({
  mode : 'exact',
  elements : 'text_prog,text_hist',
  theme : "advanced",
  skin : "o2k7",
  skin_variant : "silver",
  plugins : "table,inlinepopups,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking",
  dialog_type : 'modal',
  force_br_newlines : true,
  force_p_newlines : false,
  theme_advanced_toolbar_location : 'top',
  theme_advanced_toolbar_align : 'left',
  theme_advanced_path_location : 'bottom',
  theme_advanced_buttons1 : 'newdocument,|,bold,italic,underline,|,forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,undo,redo,|,link,unlink,image,media,|,code',
  theme_advanced_buttons2 : '',
  theme_advanced_buttons3 : '',
  theme_advanced_resize_horizontal : false,
  theme_advanced_resizing : false,
  valid_elements : "*[*]"
});
  </script>
</body>
</html>